diff --git a/.coderabbit.yaml b/.coderabbit.yaml index 4bac6823..bbfaba31 100644 --- a/.coderabbit.yaml +++ b/.coderabbit.yaml @@ -160,7 +160,6 @@ knowledge_base: enabled: true filePatterns: - '**/CLAUDE.md' - - '**/INSTRUCTIONS.md' learnings: scope: local # Keep learnings repository-specific diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..b68628a6 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,38 @@ +--- +name: Bug Report +about: Report a bug to help us improve +labels: bug +--- + +## Describe the Bug + +A clear description of what the bug is. + +## To Reproduce + +Steps to reproduce the behavior: + +1. Run `...` +2. With config `...` +3. See error + +## Expected Behavior + +What you expected to happen. + +## Error Output + +```text +Paste any error messages or unexpected output here. +``` + +## Environment + +- **Node.js version:** (e.g., 20.10.0) +- **Package version:** (e.g., 1.0.0-pre.0) +- **OS:** (e.g., macOS 15, Ubuntu 24.04) +- **Package manager:** (npm / pnpm / yarn) + +## Additional Context + +Any other context — config files, feature files, annotation examples — that helps explain the problem. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..f495af47 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,21 @@ +--- +name: Feature Request +about: Suggest a new feature or improvement +labels: enhancement +--- + +## Is your feature request related to a problem? + +A clear description of the problem. Ex. "I'm always frustrated when..." + +## Describe the Solution You'd Like + +A clear description of what you want to happen. + +## Describe Alternatives You've Considered + +Any alternative solutions or features you've considered. + +## Additional Context + +Any other context — use cases, examples, screenshots — that helps explain the request. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 85df6c1e..b73ab97b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,6 +49,4 @@ jobs: - name: Test run: pnpm test - # Note: verify-dist check removed due to non-deterministic TypeScript - # declaration file ordering between macOS and Ubuntu builds. - # The dist/ is rebuilt during test jobs and tests verify correctness. + # dist/ is not tracked in git — built fresh during CI and publish workflows. diff --git a/.gitignore b/.gitignore index 653c284d..bf904e0a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,8 @@ # Dependencies node_modules/ -# Build cache (but NOT dist/ - needed for git dependencies) +# Build output +dist/ *.tsbuildinfo # IDE diff --git a/.husky/pre-push b/.husky/pre-push index 97307b79..b5f0ba12 100755 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -3,22 +3,4 @@ set -e echo "Running tests..." pnpm test -echo "Building dist/..." -pnpm build - -# Check if dist/ has uncommitted changes after build -if ! git diff --quiet dist/; then - echo "" - echo "ERROR: dist/ is out of sync with source code!" - echo "" - echo "The build produced changes in dist/. Please commit them:" - git diff --stat dist/ - echo "" - echo "Run these commands to fix:" - echo " git add dist/" - echo " git commit --amend --no-edit" - echo "" - exit 1 -fi - echo "All checks passed!" diff --git a/.npmrc b/.npmrc deleted file mode 100644 index 1fe52714..00000000 --- a/.npmrc +++ /dev/null @@ -1 +0,0 @@ -onlyBuiltDependencies[]=@libar-dev/modular-claude-md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 00000000..94a557dd --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,197 @@ +# AGENTS.md + +This file helps future Codex sessions ramp up quickly in this repository. + +## Project Identity + +- Package: `@libar-dev/delivery-process` +- Purpose: context engineering toolkit that extracts patterns from TypeScript + Gherkin into a queryable delivery state, generated docs, and workflow enforcement. +- Core principle: code/spec annotations are the source of truth; generated docs are projections. + +## Where To Read First + +1. Manual docs index: `/Users/darkomijic/dev-projects/delivery-process/docs/INDEX.md` +2. Config entry point: `/Users/darkomijic/dev-projects/delivery-process/delivery-process.config.ts` +3. Live generated area index: `/Users/darkomijic/dev-projects/delivery-process/docs-live/PRODUCT-AREAS.md` +4. Key generated area docs: + - `/Users/darkomijic/dev-projects/delivery-process/docs-live/product-areas/ANNOTATION.md` + - `/Users/darkomijic/dev-projects/delivery-process/docs-live/product-areas/CONFIGURATION.md` + - `/Users/darkomijic/dev-projects/delivery-process/docs-live/product-areas/CORE-TYPES.md` + - `/Users/darkomijic/dev-projects/delivery-process/docs-live/product-areas/DATA-API.md` + - `/Users/darkomijic/dev-projects/delivery-process/docs-live/product-areas/GENERATION.md` + - `/Users/darkomijic/dev-projects/delivery-process/docs-live/product-areas/PROCESS.md` + - `/Users/darkomijic/dev-projects/delivery-process/docs-live/product-areas/VALIDATION.md` + +## Onboarding Context (Tutorial WIP) + +- External tutorial source: `/Users/darkomijic/dev-projects/delivery-process-tutorials/TUTORIAL-ARTICLE-v1.md` +- Tutorial goal: bootstrap from blank project to full docs/query flow (`11 patterns`, `26 generated files` in demo scenario). +- Treat tutorial outputs as illustrative; validate commands against current CLI behavior before codemods/docs changes. +- Important known alignment points from tutorial review: + - `process-api overview` includes the Data API helper section in output (not always shown in article snippets). + - Current `generate-docs --list-generators` output does not include `product-area-docs`. + - `generate-docs` accepts both repeated `-g` flags and comma-separated generator lists. + - Shape-derived entries can affect counts and `stubs` output (shape patterns appear as separate entries). + - `arch context` groups only patterns carrying explicit `@libar-docs-arch-context`. + +## Consumer Repo Setup Conventions + +When guiding users in external repos, pick command style based on config format: + +- If the repo uses `delivery-process.config.js` (or no config), package binaries are fine: + +```bash +npx generate-docs --help +npx process-api --help +npx lint-patterns --help +npx lint-process --help +npx validate-patterns --help +``` + +- If the repo uses `delivery-process.config.ts`, use `tsx`-based wrappers (or switch to `.js` config). + - Reason: plain Node execution may fail to import `.ts` config files in some environments. + +Use `delivery-process.config.ts` or `.js` as the main integration contract and keep scripts thin wrappers around package CLIs. + +## Architecture Snapshot + +- Pipeline: `Config -> Scanner -> Extractor -> Transformer -> Codec`. +- Central read model: `MasterDataset` (consumed by docs generation, Data API, and validators). +- Preset in this repo config: `libar-generic` (`@libar-docs-*` tags). +- Source ownership invariant: + - TypeScript owns runtime relationships (`uses`, `used-by`, category-like tags). + - Gherkin owns planning/process metadata (`depends-on`, quarter, team, phase, deliverables). + +## Repository Map + +- Source code: `/Users/darkomijic/dev-projects/delivery-process/src` +- Feature specs (roadmap/process/decisions/releases): + - `/Users/darkomijic/dev-projects/delivery-process/delivery-process/specs` + - `/Users/darkomijic/dev-projects/delivery-process/delivery-process/decisions` + - `/Users/darkomijic/dev-projects/delivery-process/delivery-process/releases` +- Design stubs (non-compiled on purpose): `/Users/darkomijic/dev-projects/delivery-process/delivery-process/stubs` +- Tests: + - Feature files: `/Users/darkomijic/dev-projects/delivery-process/tests/features` + - Step definitions: `/Users/darkomijic/dev-projects/delivery-process/tests/steps` + +## Session Workflow (Project Convention) + +Session types and expected outcomes: + +1. Planning: create/update roadmap `.feature` spec (status typically `roadmap`). +2. Design: produce decision specs and/or stubs in `delivery-process/stubs/` (no implementation). +3. Implementation: transition `roadmap -> active -> completed` while implementing deliverables. + +FSM/protection conventions: + +- `roadmap` / `deferred`: fully editable +- `active`: scope-locked (do not add deliverables) +- `completed`: hard-locked (changes require unlock-reason tag) + +## Data API First (Preferred Discovery Path) + +Use the CLI instead of broad file exploration whenever possible: + +```bash +pnpm process:query -- overview +pnpm process:query -- scope-validate implement +pnpm process:query -- context --session implement +pnpm process:query -- dep-tree +pnpm process:query -- files --related +``` + +Useful discovery commands: + +```bash +pnpm process:query -- list --status roadmap --names-only +pnpm process:query -- arch blocking +pnpm process:query -- stubs --unresolved +pnpm process:query -- unannotated --path src +``` + +## Build, Test, Validation Commands + +Core dev: + +```bash +pnpm build +pnpm typecheck +pnpm lint +pnpm test +``` + +Process/quality checks: + +```bash +pnpm lint:steps +pnpm lint-patterns +pnpm lint:process +pnpm validate:patterns +pnpm validate:dod +pnpm validate:all +``` + +## Docs Generation + +- Main generated output root from config: `docs-generated/` +- Product area and ADR outputs are overridden to `docs-live/` in config. + +Common commands: + +```bash +pnpm docs:product-areas +pnpm docs:reference +pnpm docs:decisions +pnpm docs:all +``` + +Rule: do not hand-edit generated artifacts when regeneration is the intended flow. + +Current built-in generator list is discovered from CLI (`generate-docs --list-generators`). +Do not assume undocumented generator names are available without checking. + +## Testing Rules (Important) + +- This repo follows strict Gherkin-first testing: + - Specs in `.feature` + - Step definitions in `.steps.ts` + - Avoid introducing classic `*.test.ts` files for new coverage unless explicitly requested. +- Never commit skipped/only tests (`it.skip`, `it.only`, `describe.skip`, `describe.only`). +- For `vitest-cucumber`: + - `Scenario`: use Cucumber expressions (`{string}`, `{int}`) and function params. + - `ScenarioOutline`: use `` placeholders and read via `variables.column`. + +## Change Hygiene + +- Keep edits focused; prefer changing source-of-truth files over generated docs. +- If changing tags/taxonomy/config, run relevant validation and at least targeted docs generation. +- For workflow/status/deliverable changes, run process guard checks before finalizing. + +## Practical Start Checklist For New Sessions + +1. Read `docs/INDEX.md` and `delivery-process.config.ts`. +2. Run `pnpm process:query -- overview`. +3. If working on a specific pattern, run: + - `pnpm process:query -- scope-validate implement` + - `pnpm process:query -- context --session ` +4. Make minimal source changes. +5. Run targeted tests + relevant lint/validation. +6. Regenerate docs if source annotations/specs/config changed. + +## Future Enhancement Candidate: Interactive Init CLI + +There is currently no dedicated interactive onboarding command in this package. +If implementing one, design for existing-repo adoption first: + +1. Command shape + - Add a new bin command (example: `delivery-process-init`) so users can run `npx delivery-process-init`. +2. Wizard responsibilities + - Detect package manager and module mode (`type: module`). + - Scaffold `delivery-process.config.ts` with chosen preset and discovered source globs. + - Offer optional npm scripts for `process-api`, docs generation, and validation commands. + - Optionally scaffold starter folders (`delivery-process/specs`, `delivery-process/stubs`) and sample spec/stub templates. +3. Safety requirements + - Dry-run mode and explicit overwrite confirmations. + - Never silently overwrite existing `delivery-process.config.ts` or user scripts. +4. Success criteria + - User can run `process-api overview` and `generate-docs --list-generators` immediately after setup. diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..11fda3e4 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,31 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +## [1.0.0-pre.0] - 2026-02-21 + +First npm-published pre-release for monorepo validation. + +### Added + +- Stable public API with 12 subpath exports (including new `./api`) +- Process Data API with 27 CLI subcommands for AI-native delivery state queries +- FSM-enforced workflow validation via pre-commit hooks +- Codec-based document generation (patterns, roadmap, decisions, product areas, etc.) +- Cross-source validation (TypeScript + Gherkin dual-source merging) +- MasterDataset single read model (ADR-006) + +### Changed + +- Published to npm registry (previously consumed via `git+https://` only) +- `dist/` removed from git tracking -- built fresh during publish +- `@libar-dev/modular-claude-md` moved from dependencies to devDependencies +- Package size trimmed (removed self-referential docs from tarball) + +[Unreleased]: https://github.com/libar-dev/delivery-process/compare/v1.0.0-pre.0...HEAD +[1.0.0-pre.0]: https://github.com/libar-dev/delivery-process/releases/tag/v1.0.0-pre.0 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..9065816c --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,77 @@ +# Contributing to @libar-dev/delivery-process + +We welcome contributions! This guide covers how to get started. + +## Prerequisites + +- **Node.js** >= 18.0.0 +- **pnpm** (recommended package manager) +- ESM project (`"type": "module"`) + +## Getting Started + +```bash +# Fork the repo on GitHub, then: +git clone https://github.com//delivery-process.git +cd delivery-process +pnpm install +pnpm build && pnpm test +``` + +## Development Workflow + +```bash +pnpm build # Compile TypeScript +pnpm dev # Watch mode +pnpm test # Run all tests +pnpm test # Run specific tests +pnpm typecheck # Type check without emit +pnpm lint # ESLint +pnpm format:check # Prettier check +``` + +## Testing Policy + +This package enforces **strict Gherkin-only testing**: + +- All tests are `.feature` files with step definitions in `.steps.ts` +- No `.test.ts` files — exception-free policy +- Edge cases use `Scenario Outline` with Examples tables +- Feature files live in `tests/features/`, step defs in `tests/steps/` + +A package that generates documentation from `.feature` files should demonstrate that Gherkin is sufficient for testing. + +## Pre-commit Hooks + +The project uses Husky with lint-staged. On every commit: + +- ESLint + Prettier auto-fix on staged `.ts` files +- Prettier on staged `.json`, `.md`, `.yml` files + +These run automatically — no manual setup needed after `pnpm install`. + +## Making Changes + +1. Create a branch from `main` +2. Make your changes +3. Run the full validation suite: + ```bash + pnpm build && pnpm test && pnpm typecheck && pnpm lint && pnpm format:check + ``` +4. Commit with a clear message describing the "why" + +## Pull Requests + +- PRs target the `main` branch +- CI runs on Node.js 18, 20, and 22 +- All checks (build, test, typecheck, lint, format) must pass +- We review for consistency with the four-stage pipeline architecture (Scanner, Extractor, Transformer, Codec) + +## Reporting Issues + +- Use [GitHub Issues](https://github.com/libar-dev/delivery-process/issues) +- For security vulnerabilities, see [SECURITY.md](SECURITY.md) + +## Code of Conduct + +Be respectful, constructive, and inclusive. We follow the [Contributor Covenant](https://www.contributor-covenant.org/version/2/1/code_of_conduct/). diff --git a/INSTRUCTIONS.md b/INSTRUCTIONS.md deleted file mode 100644 index a0daa682..00000000 --- a/INSTRUCTIONS.md +++ /dev/null @@ -1,344 +0,0 @@ -# Tag Reference & CLI Guide - -Complete reference for documentation tags and CLI commands. - -> **Configurable Prefixes:** This document uses `@libar-docs-*` examples (the default `libar-generic` preset). -> For other prefixes (e.g., `@docs-*` with `generic` preset), substitute the configured prefix. -> See [docs/CONFIGURATION.md](./docs/CONFIGURATION.md) for preset options and custom prefixes. - -> **Source of Truth:** All tags are defined in TypeScript at `src/taxonomy/`. -> Generate a complete reference with: `npx generate-tag-taxonomy -o TAG_TAXONOMY.md -f` - -## Table of Contents - -- [File-Level Opt-In](#file-level-opt-in) -- [Category Tags](#category-tags) -- [Metadata Tags](#metadata-tags) -- [Aggregation Tags](#aggregation-tags) -- [CLI Reference](#cli-reference) -- [Gherkin Integration](#gherkin-integration) - ---- - -## File-Level Opt-In - -Files must have an opt-in marker to be scanned. The marker depends on your configuration. - -| Preset | Opt-In Marker | Tag Prefix | -| ------------------------- | ------------------- | ---------------- | -| `libar-generic` (default) | `@libar-docs` | `@libar-docs-` | -| `ddd-es-cqrs` | `@libar-docs` | `@libar-docs-` | -| `generic` | `@docs` | `@docs-` | -| Custom | Your `fileOptInTag` | Your `tagPrefix` | - -**Basic usage:** - -```typescript -/** @libar-docs */ -// This file will be scanned for documentation patterns -``` - -Without the opt-in marker, the file is skipped entirely. - -> **See:** [CONFIGURATION.md](./docs/CONFIGURATION.md) for preset details, custom tag prefixes, and hierarchical configuration. - ---- - -## Category Tags - -Assign patterns to categories. Multiple categories allowed per pattern. - -> **Complete list:** See `src/taxonomy/categories.ts` for all 21 `ddd-es-cqrs` categories. -> The `libar-generic` (default) and `generic` presets include only 3 categories (core, api, infra). - -| Tag | Domain | Priority | -| ----------------------------- | -------------------- | -------- | -| `@libar-docs-domain` | Strategic DDD | 1 | -| `@libar-docs-ddd` | Domain-Driven Design | 2 | -| `@libar-docs-bounded-context` | Bounded Context | 3 | -| `@libar-docs-event-sourcing` | Event Sourcing | 4 | -| `@libar-docs-decider` | Decider | 5 | -| `@libar-docs-fsm` | FSM | 5 | -| `@libar-docs-cqrs` | CQRS | 5 | -| `@libar-docs-projection` | Projections | 6 | -| `@libar-docs-saga` | Sagas/Workflows | 7 | -| `@libar-docs-command` | Command Handling | 8 | -| `@libar-docs-arch` | Architecture | 9 | -| `@libar-docs-infra` | Infrastructure | 10 | -| `@libar-docs-validation` | Validation | 11 | -| `@libar-docs-testing` | Testing | 12 | -| `@libar-docs-performance` | Performance | 13 | -| `@libar-docs-security` | Security | 14 | -| `@libar-docs-core` | Core Utilities | 15 | -| `@libar-docs-api` | Public APIs | 16 | -| `@libar-docs-generator` | Generators | 17 | -| `@libar-docs-middleware` | Middleware | 18 | -| `@libar-docs-correlation` | Correlation | 19 | - -**Priority:** Lower number = higher priority. When a pattern has multiple categories, the lowest-priority-number category becomes primary. - -**Aliases:** Some categories have aliases (e.g., `es` for `event-sourcing`, `process-manager` for `saga`). - -> **See:** [TAXONOMY.md](./docs/TAXONOMY.md) for TypeScript API and extending categories. - ---- - -## Metadata Tags - -Enrich patterns with structured data. - -### Core Metadata - -| Tag | Format | Required | Purpose | -| --------------------- | ------------- | ----------- | ---------------------------- | -| `@libar-docs-pattern` | `PatternName` | **Yes** | Explicit pattern name | -| `@libar-docs-status` | enum | Recommended | FSM status (per PDR-005) | -| `@libar-docs-core` | flag | No | Marks as essential/must-know | -| `@libar-docs-phase` | number | No | Roadmap phase number | -| `@libar-docs-release` | `v0.1.0` | No | Target release version | - -**Status values:** `roadmap` (default), `active`, `completed`, `deferred` - -### Relationship Tags - -| Tag | Format | Purpose | -| ------------------------ | ------ | ---------------------------- | -| `@libar-docs-uses` | csv | Patterns this depends on | -| `@libar-docs-used-by` | csv | Patterns that depend on this | -| `@libar-docs-depends-on` | csv | Roadmap dependencies | -| `@libar-docs-enables` | csv | Patterns this enables | -| `@libar-docs-usecase` | quoted | Use case (repeatable) | - -### Process Metadata - -| Tag | Format | Purpose | -| --------------------------- | ------------ | ----------------------------------------------------------- | -| `@libar-docs-quarter` | `Q1-2026` | Delivery quarter | -| `@libar-docs-completed` | `2026-01-08` | Completion date (YYYY-MM-DD) | -| `@libar-docs-effort` | `2d` | Estimated effort (4h, 2d, 1w) | -| `@libar-docs-effort-actual` | `3d` | Actual effort | -| `@libar-docs-team` | value | Team assignment | -| `@libar-docs-workflow` | enum | `implementation`, `planning`, `validation`, `documentation` | -| `@libar-docs-risk` | enum | `low`, `medium`, `high` | -| `@libar-docs-priority` | enum | `critical`, `high`, `medium`, `low` | - -### PRD/Requirements Tags - -| Tag | Format | Purpose | -| ---------------------------- | ------ | --------------------------------- | -| `@libar-docs-product-area` | value | Product area for PRD grouping | -| `@libar-docs-user-role` | value | Target user persona | -| `@libar-docs-business-value` | value | Business value statement | -| `@libar-docs-constraint` | value | Technical constraint (repeatable) | -| `@libar-docs-brief` | path | Path to pattern brief markdown | - -### Hierarchy Tags - -| Tag | Format | Purpose | -| -------------------- | ------ | --------------------------------- | -| `@libar-docs-level` | enum | `epic`, `phase` (default), `task` | -| `@libar-docs-parent` | value | Parent pattern name | - -### ADR/PDR Tags - -| Tag | Format | Purpose | -| ------------------------------- | ------ | -------------------------------------------------------------------------------------------- | -| `@libar-docs-adr` | `015` | ADR/PDR number | -| `@libar-docs-adr-status` | enum | `proposed` (default), `accepted`, `deprecated`, `superseded` | -| `@libar-docs-adr-category` | value | Decision category | -| `@libar-docs-adr-supersedes` | value | ADR number this supersedes | -| `@libar-docs-adr-superseded-by` | value | ADR number that supersedes this | -| `@libar-docs-adr-theme` | enum | `persistence`, `isolation`, `commands`, `projections`, `coordination`, `taxonomy`, `testing` | -| `@libar-docs-adr-layer` | enum | `foundation`, `infrastructure`, `refinement` | - -### Traceability Tags (PDR-007) - -| Tag | Format | Purpose | -| ------------------------------ | ------ | ------------------------------------------ | -| `@libar-docs-executable-specs` | csv | Links to package executable spec locations | -| `@libar-docs-roadmap-spec` | value | Links back to roadmap pattern | - ---- - -## Aggregation Tags - -Route patterns to specific generated documents. - -| Tag | Target Document | Purpose | -| ---------------------- | --------------- | --------------------- | -| `@libar-docs-overview` | OVERVIEW.md | Architecture overview | -| `@libar-docs-decision` | DECISIONS.md | ADR-style decisions | -| `@libar-docs-intro` | (template) | Package introduction | - ---- - -## CLI Reference - -### generate-docs - -Generate documentation from annotated sources. - -```bash -generate-docs [options] -``` - -| Flag | Short | Description | Default | -| ---------------------------- | ----- | ---------------------------------------------- | ------------------- | -| `--input ` | `-i` | Glob pattern for TypeScript files (repeatable) | required | -| `--generators ` | `-g` | Generator names (comma-separated) | required | -| `--features ` | | Glob pattern for Gherkin files | - | -| `--exclude ` | `-e` | Exclude pattern (repeatable) | - | -| `--output ` | `-o` | Output directory | `docs/architecture` | -| `--base-dir ` | `-b` | Base directory | cwd | -| `--overwrite` | `-f` | Overwrite existing files | false | -| `--workflow ` | `-w` | Workflow config JSON file | - | -| `--list-generators` | | List available generators | - | -| `--git-diff-base ` | | PR Changes: base branch for diff | - | -| `--changed-files ` | | PR Changes: explicit file list | - | -| `--release-filter ` | | PR Changes: filter by release | - | - -**Basic usage:** - -```bash -generate-docs -g patterns -i "src/**/*.ts" -o docs -f -generate-docs --list-generators -``` - -### lint-patterns - -Validate pattern annotation quality. - -```bash -lint-patterns [options] -``` - -| Flag | Short | Description | Default | -| ------------------------ | ----- | ----------------------------------- | -------- | -| `--input ` | `-i` | Glob pattern (required, repeatable) | required | -| `--exclude ` | `-e` | Exclude pattern (repeatable) | - | -| `--base-dir ` | `-b` | Base directory | cwd | -| `--strict` | | Treat warnings as errors | false | -| `--format ` | `-f` | Output: `pretty` or `json` | `pretty` | -| `--quiet` | `-q` | Only show errors | false | -| `--min-severity ` | | `error`, `warning`, `info` | - | - -**Exit Codes:** `0` = no errors, `1` = errors (or warnings with `--strict`) - -> **See:** [VALIDATION.md](./docs/VALIDATION.md) for lint rules and CI/CD integration. - -### lint-process - -Process Guard linter for delivery process FSM validation (PDR-005). - -```bash -lint-process [options] -``` - -| Flag | Short | Description | Default | -| ------------------ | ----- | ------------------------------------- | ------------ | -| `--staged` | | Validate staged changes | default mode | -| `--all` | | Validate all changes vs main | - | -| `--files` | | Validate specific files mode | - | -| `--file` | `-f` | Specify file to validate (repeatable) | - | -| `--base-dir` | `-b` | Base directory | cwd | -| `--strict` | | Treat warnings as errors | false | -| `--ignore-session` | | Ignore session scope rules | false | -| `--show-state` | | Show derived process state (debug) | false | -| `--format` | | Output: `pretty` or `json` | `pretty` | - -**Exit Codes:** `0` = no errors, `1` = errors (or warnings with `--strict`) - -> **See:** [PROCESS-GUARD.md](./docs/PROCESS-GUARD.md) for FSM rules, protection levels, and troubleshooting. - -### validate-patterns - -Cross-source pattern validator with DoD and anti-pattern detection. - -```bash -validate-patterns [options] -``` - -| Flag | Short | Description | Default | -| --------------------------- | ----- | ------------------------------------------------ | -------- | -| `--input` | `-i` | Glob for TypeScript files (required, repeatable) | required | -| `--features` | `-F` | Glob for Gherkin files (required, repeatable) | required | -| `--exclude` | `-e` | Exclude pattern (repeatable) | - | -| `--base-dir` | `-b` | Base directory | cwd | -| `--strict` | | Treat warnings as errors | false | -| `--format` | `-f` | Output: `pretty` or `json` | `pretty` | -| `--dod` | | Enable Definition of Done validation | false | -| `--phase` | | Validate specific phase (repeatable) | - | -| `--anti-patterns` | | Enable anti-pattern detection | false | -| `--scenario-threshold` | | Max scenarios per feature | 20 | -| `--mega-feature-threshold` | | Max lines per feature | 500 | -| `--magic-comment-threshold` | | Max magic comments | 5 | - -**Exit Codes:** `0` = no errors, `1` = errors (or warnings with `--strict`) - -> **See:** [VALIDATION.md](./docs/VALIDATION.md) for validation rules, anti-pattern detection, and DoD checks. - -### generate-tag-taxonomy - -Generate TAG_TAXONOMY.md reference from TypeScript taxonomy. - -```bash -generate-tag-taxonomy [options] -``` - -| Flag | Short | Description | Default | -| ------------------ | ----- | ----------------------- | ----------------------------------- | -| `--output ` | `-o` | Output file path | `docs/architecture/TAG_TAXONOMY.md` | -| `--overwrite` | `-f` | Overwrite existing file | false | -| `--base-dir ` | `-b` | Base directory | cwd | - ---- - -## Gherkin Integration - -Link Gherkin scenarios to patterns using `@pattern:*` tags. - -### In Feature Files - -```gherkin -@orders @pattern:CommandOrchestrator -Feature: Order Management - - @pattern:DeciderTypes @pattern:FSMTypes - Scenario: Submit draft order - Given an order in draft status - When I submit the order - Then the order status should be "submitted" -``` - -**Rules:** - -- Feature-level `@pattern:X` applies to all scenarios -- Scenario-level `@pattern:X` applies to that scenario only -- Names are normalized (case-insensitive, spaces removed) - -### Process Metadata Tags - -In `.feature` files, use `@libar-docs-*` tags (same as TypeScript): - -```gherkin -@libar-docs -@libar-docs-pattern:DeciderPattern -@libar-docs-status:active -@libar-docs-phase:14 -@libar-docs-quarter:Q1-2026 -Feature: Decider Pattern Implementation -``` - -> **See:** [GHERKIN-PATTERNS.md](./docs/GHERKIN-PATTERNS.md) for Gherkin writing guidelines and best practices. - ---- - -## Related Documentation - -| Document | Purpose | -| ------------------------------------------------- | ---------------------------------------- | -| [CONFIGURATION.md](./docs/CONFIGURATION.md) | Presets, custom prefixes, config files | -| [VALIDATION.md](./docs/VALIDATION.md) | Lint rules, anti-patterns, DoD, CI/CD | -| [PROCESS-GUARD.md](./docs/PROCESS-GUARD.md) | FSM rules, protection levels, pre-commit | -| [TAXONOMY.md](./docs/TAXONOMY.md) | TypeScript taxonomy API | -| [GHERKIN-PATTERNS.md](./docs/GHERKIN-PATTERNS.md) | Writing good Gherkin specs | diff --git a/LICENSE b/LICENSE index ab4de4a6..71521c03 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2024 libar-dev +Copyright (c) 2024-2026 libar-dev Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index f9c90cbf..bef847f4 100644 --- a/README.md +++ b/README.md @@ -1,29 +1,26 @@ # @libar-dev/delivery-process -**A source-first delivery process where everything is code.** +**Context engineering for AI-assisted codebases.** -Turn TypeScript annotations and Gherkin feature files into **living documentation**, **architecture diagrams**, **dependency graphs**, and **enforced delivery workflows**. +Turn TypeScript annotations and Gherkin specs into a **structured, queryable delivery state** — living documentation, architecture graphs, and FSM-enforced workflows that AI agents consume without hallucinating. [![npm version](https://img.shields.io/npm/v/@libar-dev/delivery-process.svg)](https://www.npmjs.com/package/@libar-dev/delivery-process) [![Build Status](https://github.com/libar-dev/delivery-process/workflows/CI/badge.svg)](https://github.com/libar-dev/delivery-process/actions) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Node.js Version](https://img.shields.io/node/v/@libar-dev/delivery-process.svg)](https://nodejs.org/) +[![npm provenance](https://img.shields.io/badge/provenance-verified-brightgreen)](https://docs.npmjs.com/generating-provenance-statements) -> **Pre-release v0.1.0-pre.0** — We welcome feedback and contributions. +> **v1.0.0-pre.0** — Pre-release for validation. We welcome feedback and contributions. --- -## The Problem +## Why This Exists -Documentation drifts from reality. Roadmaps get stale. Requirements live in Jira, code in GitHub, and status tracking in spreadsheets. When AI coding assistants need context, they parse Markdown files that may already be outdated. +AI coding agents (Claude Code, Cursor, Copilot Workspace) need architectural context to generate correct code. Today they scrape README files, parse stale Markdown, and guess at relationships — leading to hallucinated imports, violated patterns, and wasted context windows. -Teams spend time **updating docs** instead of **updating code that generates docs**. +This package makes **code the single source of truth** for both humans and machines: -## The Solution - -Make **code the single source of truth**: - -| Aspect | Traditional Docs | Source-First (This Package) | +| Aspect | Traditional Docs | Context Engineering (This Package) | | ------------------ | ---------------------------- | ----------------------------------- | | **Source** | Separate Markdown/Confluence | Annotations in code + Gherkin specs | | **Freshness** | Manual updates → drift | Generated → always current | @@ -48,133 +45,66 @@ pnpm process:query -- query isValidTransition roadmap active pnpm process:query -- dep-tree DualSourceExtractor ``` -**Claude Code, Cursor, GitHub Copilot Workspace** — any AI that can run shell commands gets typed JSON access to your delivery state. No Markdown parsing. No context drift. +**Claude Code, Cursor, GitHub Copilot Workspace** — any AI that can run shell commands gets typed JSON access to your delivery state. No Markdown parsing. No context drift. No hallucinated relationships. --- -## Proven: Structured Specs Beat Human Prompts - -This methodology was validated across **422 executable specifications** and a **8.8M line monorepo**. The results challenged assumptions about AI context management. - -### The Discovery - -| Metric | Traditional Prompts | Structured Specs | -| ---------------------------------- | ------------------- | ------------------------------------ | -| Context usage during heavy editing | ~100% (fills up) | **50-65%** (stays low) | -| After context compaction | Breaks continuity | **No impact** — results stay perfect | -| Work completed per session | 1X baseline | **5X increase** | -| Planning/decision overhead | High | **Near zero** | - -### Why Structured Specs Work Better - -Traditional AI prompts are verbose and imprecise: - -``` -"We need to implement a validation system that checks if status transitions -are valid according to the FSM rules defined in our methodology document. -It should handle the four states (roadmap, active, completed, deferred) and -validate that transitions follow the allowed paths..." -``` +## Quick Start -Structured specs are concise and typed: +### 1. Install -```gherkin -Rule: Status transitions must follow FSM +```bash +# npm +npm install @libar-dev/delivery-process@pre - Scenario Outline: Valid transitions pass - Given a file with status "" - When status changes to "" - Then validation passes +# pnpm (recommended) +pnpm add @libar-dev/delivery-process@pre - Examples: - | from | to | - | roadmap | active | - | active | completed | +# yarn +yarn add @libar-dev/delivery-process@pre ``` -**The AI understands structure better than prose.** Gherkin files compress into context more efficiently than explanatory paragraphs. - -### Real Results: 3-Session MVP - -The Process Guard validation system was implemented in 3 sessions using only structured specs as context: - -| Session | Context Used | Observation | -| ------- | ----------------- | -------------------------------------------------- | -| 1 | 100% → compressed | Speed **increased** after compression | -| 2 | **65%** | First time context stayed low during heavy editing | -| 3 | **55%** | Context actually **decreased** during work | - -### Implementation Sessions Become Mechanical - -With structured specs: - -- **No complicated planning** in implementation sessions -- **No decision-making overhead** — decisions live in specs -- **No prose explanations** — structured patterns are self-documenting -- **Context compaction doesn't break anything** — specs survive compression +**Requirements:** -> "Providing the specs and the implementation workflow doc is all that is needed." +- Node.js >= 18.0.0 +- ESM project (`"type": "module"` in package.json) -This transforms implementation sessions from creative problem-solving to **mechanical spec-to-test transformation** — dramatically more reliable and 5X more productive. +### 2. Annotate Your Code -### Before: Fighting AI-Generated Code with ESLint +Add opt-in marker and pattern metadata: -Before structured specs, AI assistants generated patterns that violated architectural constraints. The "solution" was **106 custom ESLint rules**: +```typescript +/** @docs */ +/** + * @docs-pattern UserAuthentication + * @docs-status roadmap + * @docs-uses SessionManager, TokenValidator + * + * ## User Authentication + * + * Handles user login, logout, and session management. + */ +export class UserAuthentication { + // ... +} ``` -eslint-rules/ -├── prevent-unsafe-patterns.ts # 800+ lines catching AI mistakes -├── enforce-parallel-queries.ts # AI forgot async patterns -├── no-action-wrapper-queries.ts # AI mixed action/query contexts -├── require-query-bounds.ts # AI forgot pagination -├── workflow-determinism/ # 13 rules for workflow safety -│ ├── no-date-now.ts -│ ├── no-math-random.ts -│ ├── no-process-env.ts -│ └── ... (10 more) -└── ... (90+ more rules) -``` - -Each rule required tests, maintenance, exception lists, and `@architectural-directive` comments scattered through code. **Constant whack-a-mole.** - -### After: AI Understands Structured Patterns - -With structured specs, the AI generates correct patterns _from the start_: -```gherkin -Rule: Workflow functions must be deterministic +> **Note:** Tag prefix is configurable. The `generic` preset uses `@docs-*` (shown above). The default `libar-generic` preset uses `@libar-docs-*`. See [Configuration](#configuration). - Scenario Outline: Non-deterministic calls are forbidden - Given a workflow function - When it calls "" - Then compilation fails +### 3. Generate Documentation - Examples: - | forbidden | - | Date.now() | - | Math.random() | - | process.env | +```bash +npx generate-docs -g patterns -i "src/**/*.ts" -o docs -f ``` -**Result:** 106 ESLint rules → 0. The AI reads the spec and generates deterministic code. No enforcement needed. - -### Scale Validation - -The methodology was proven on a complex monorepo: +### 4. Enforce Workflow (Pre-commit Hook) +```bash +npx lint-process --staged ``` -Monorepo totals: -├── 8.8M lines of code -├── 43,949 files -├── 378 Gherkin feature files -├── 12,770 TypeScript files -└── Built in 3-4 weeks with this approach - -delivery-process package: -├── 1.6M lines -├── 120 feature files -└── 422 executable specifications -``` + +This validates FSM transitions and blocks invalid status changes. --- @@ -230,135 +160,145 @@ npx generate-docs -g patterns -i "src/**/*.ts" --features "specs/**/*.feature" - **Get living documentation** — pattern registries, dependency graphs, roadmaps — all generated from your annotated source. +**Pipeline:** `Config → Scanner → Extractor → Transformer → Codec` — files become patterns, patterns become a MasterDataset, the MasterDataset renders to Markdown and JSON. + --- -## Quick Start +## What Gets Generated -### 1. Install +The codec pipeline produces rich, multi-format documents from a single config declaration. Every content block below is **derived from annotations** — not hand-authored: -```bash -# npm -npm install @libar-dev/delivery-process@pre +| Content Block | Source | Example | +| --------------------------------- | ---------------------------------------------- | --------------------------------------------------------- | +| **Convention tables** | Gherkin `Rule:` Invariant/Rationale | FSM protection levels, tag format types, source ownership | +| **Live Mermaid diagrams** | `@docs-uses`, `@docs-depends-on` relationships | C4Context, sequence, class, state, flowchart (6 types) | +| **API Types** | `@docs-shape` on TypeScript declarations | Functions, interfaces, constants, type aliases with JSDoc | +| **Behavior specifications** | Feature descriptions + `Rule:` blocks | Collapsible rules with verified-by scenario lists | +| **Architecture decision records** | Decision feature files | Context/Decision/Consequences with structured tables | +| **Roadmap & status tracking** | `@docs-status`, `@docs-phase` tags | Phase progress, deliverable tables, completion metrics | -# pnpm (recommended) -pnpm add @libar-dev/delivery-process@pre +**Config-driven generation:** A single `ReferenceDocConfig` object produces a complete reference document — convention tables, scoped diagrams, extracted types, and behavior specs composed automatically. 13 configs produce 27 generators (detailed + AI-compact pairs). -# yarn -yarn add @libar-dev/delivery-process@pre -``` +**See it live:** [docs-live/product-areas/](docs-live/product-areas/) contains 7 generated product area documents with live Mermaid diagrams and extracted API types — all from annotations in this codebase. -**Requirements:** +--- -- Node.js >= 18.0.0 -- ESM project (`"type": "module"` in package.json) +## CLI Commands -### 2. Annotate Your Code +| Command | Purpose | Docs | +| ----------------------- | ------------------------------------------------------ | ----------------------------------------- | +| `generate-docs` | Generate documentation from annotated sources | See flags below | +| `process-api` | Query delivery state for AI coding sessions | [PROCESS-API.md](docs/PROCESS-API.md) | +| `lint-patterns` | Validate annotation quality (missing tags, etc.) | [VALIDATION.md](docs/VALIDATION.md) | +| `lint-process` | Validate delivery workflow FSM transitions | [PROCESS-GUARD.md](docs/PROCESS-GUARD.md) | +| `lint-steps` | Validate vitest-cucumber feature/step compatibility | [VALIDATION.md](docs/VALIDATION.md) | +| `validate-patterns` | Cross-source validation with Definition of Done checks | [VALIDATION.md](docs/VALIDATION.md) | +| `generate-tag-taxonomy` | _(Deprecated)_ Generate tag reference from taxonomy | See flags below | -Add opt-in marker and pattern metadata: +### generate-docs -```typescript -/** @docs */ +Generate documentation from annotated sources. -/** - * @docs-pattern UserAuthentication - * @docs-status roadmap - * @docs-uses SessionManager, TokenValidator - * - * ## User Authentication - * - * Handles user login, logout, and session management. - */ -export class UserAuthentication { - // ... -} +```bash +generate-docs [options] ``` -> **Note:** Tag prefix is configurable. Default generic preset uses `@docs-*`. See [Configuration](#configuration). +| Flag | Short | Description | Default | +| ---------------------------- | ----- | ---------------------------------------------- | ------------------- | +| `--input ` | `-i` | Glob pattern for TypeScript files (repeatable) | from config | +| `--generators ` | `-g` | Generator names (comma-separated) | `patterns` | +| `--features ` | | Glob pattern for Gherkin files | - | +| `--exclude ` | `-e` | Exclude pattern (repeatable) | - | +| `--output ` | `-o` | Output directory | `docs/architecture` | +| `--base-dir ` | `-b` | Base directory | cwd | +| `--overwrite` | `-f` | Overwrite existing files | false | +| `--workflow ` | `-w` | Workflow config JSON file | - | +| `--list-generators` | | List available generators | - | +| `--git-diff-base ` | | PR Changes: base branch for diff | - | +| `--changed-files ` | | PR Changes: explicit file list | - | +| `--release-filter ` | | PR Changes: filter by release | - | -### 3. Generate Documentation +```bash +# Generate pattern docs +generate-docs -g patterns -i "src/**/*.ts" -o docs -f + +# List all available generators +generate-docs --list-generators + +# Generate with Gherkin specs +generate-docs -g patterns -i "src/**/*.ts" --features "specs/**/*.feature" -o docs -f +``` + +### generate-tag-taxonomy + +> **Deprecated:** Use `generate-docs -g taxonomy` instead for codec-based generation with progressive disclosure. This standalone command will be removed in a future version. + +Generate a complete tag reference document from the TypeScript taxonomy source. ```bash -npx generate-docs -g patterns -i "src/**/*.ts" -o docs -f +generate-tag-taxonomy [options] ``` -### 4. Enforce Workflow (Pre-commit Hook) +| Flag | Short | Description | Default | +| ------------------ | ----- | ----------------------- | ----------------------------------- | +| `--output ` | `-o` | Output file path | `docs/architecture/TAG_TAXONOMY.md` | +| `--overwrite` | `-f` | Overwrite existing file | false | +| `--base-dir ` | `-b` | Base directory | cwd | ```bash -npx lint-process --staged +npx generate-tag-taxonomy -o TAG_TAXONOMY.md -f ``` -This validates FSM transitions and blocks invalid status changes. +For tag concepts and taxonomy architecture, see [docs/TAXONOMY.md](docs/TAXONOMY.md). --- -## CLI Commands +## Proven at Scale -| Command | Purpose | -| ----------------------- | ------------------------------------------------------ | -| `generate-docs` | Generate documentation from annotated sources | -| `lint-patterns` | Validate annotation quality (missing tags, etc.) | -| `lint-process` | Validate delivery workflow FSM transitions | -| `validate-patterns` | Cross-source validation with Definition of Done checks | -| `generate-tag-taxonomy` | Generate tag reference from TypeScript taxonomy | +This methodology was validated across **422 executable specifications** and an **8.8M line monorepo** (43,949 files). The results challenged assumptions about AI context management. -See [INSTRUCTIONS.md](INSTRUCTIONS.md) for full CLI reference. +### The Discovery ---- +| Metric | Traditional Prompts | Structured Specs | +| ---------------------------------- | ------------------- | ------------------------------------ | +| Context usage during heavy editing | ~100% (fills up) | **50-65%** (stays low) | +| After context compaction | Breaks continuity | **No impact** — results stay perfect | +| Work completed per session | 1X baseline | **5X increase** | +| Planning/decision overhead | High | **Near zero** | -## Design-First Development +### Why It Works -The package enforces a clear separation between **design artifacts** and **production code**. +Traditional AI prompts are verbose and imprecise. Structured specs are concise and typed: -### The Problem with Design Stubs in src/ +```gherkin +Rule: Status transitions must follow FSM -Many projects mix design artifacts with production code: + Scenario Outline: Valid transitions pass + Given a file with status "" + When status changes to "" + Then validation passes -```javascript -// eslint.config.js — Don't do this -{ - files: ["**/src/durability/intentCompletion.ts"], - rules: { "@typescript-eslint/no-unused-vars": "off" } // ESLint exceptions for "not-yet-real" code -} + Examples: + | from | to | + | roadmap | active | + | active | completed | ``` -This causes confusion, accidental imports of unimplemented code, and maintenance burden. - -### The Solution: Design Artifacts Outside src/ - -| Location | Content | ESLint | When Moved | -| -------------------------------------------- | --------------------------------------------- | ---------- | ---------------------- | -| `delivery-process/stubs/{pattern-name}/*.ts` | API shapes, interfaces, throw-not-implemented | Excluded | Implementation session | -| `src/**/*.ts` | **Production code only** | Full rules | Already there | +**The AI understands structure better than prose.** Gherkin files compress into context more efficiently than explanatory paragraphs. -**Design stub pattern:** +### Real Results: 3-Session MVP -```typescript -// delivery-process/stubs/my-feature/my-feature.ts -/** - * @libar-docs - * @libar-docs-status roadmap - * @libar-docs-implements MyFeature - * - * ## My Feature - Design Stub - * - * API design for the upcoming feature. - * Target: src/path/to/final/location.ts - */ -export interface MyConfig { - timeout: number; -} +The Process Guard validation system was implemented in 3 sessions using only structured specs as context: -export function myFeature(config: MyConfig): Result { - throw new Error('MyFeature not yet implemented - roadmap pattern'); -} -``` +| Session | Context Used | Observation | +| ------- | ----------------- | -------------------------------------------------- | +| 1 | 100% → compressed | Speed **increased** after compression | +| 2 | **65%** | First time context stayed low during heavy editing | +| 3 | **55%** | Context actually **decreased** during work | -**Benefits:** +### Before/After: ESLint Rules -- No ESLint exceptions needed — stubs are excluded from linting -- Clear separation: `delivery-process/stubs/` = design, `src/` = production -- Safe iteration on API shapes without breaking anything -- Moving to `src/` signals implementation started +Before structured specs, AI assistants generated patterns that violated architectural constraints. The workaround was **106 custom ESLint rules** — each requiring tests, maintenance, and exception lists. With structured specs, the AI reads the spec and generates correct patterns from the start. **106 ESLint rules → 0.** --- @@ -451,68 +391,37 @@ graph TD ## How It Compares -| Tool | Living Docs | FSM Enforcement | AI API | Code-First | Context Efficient | -| -------------------- | ----------- | --------------- | ------ | ---------- | ----------------- | -| **This package** | ✓ | ✓ | ✓ | ✓ | ✓ (50-65%) | -| Backstage | ✓ | ✗ | ✗ | ✗ (YAML) | ✗ | -| Notion/Confluence | ✗ | ✗ | ✗ | ✗ | ✗ | -| Docusaurus/VitePress | ✗ | ✗ | ✗ | Partial | ✗ | -| Gherkin Living Doc | ✓ | ✗ | ✗ | ✓ | Partial | -| Human prompts to AI | ✗ | ✗ | ✗ | ✗ | ✗ (100%) | +| Tool | Living Docs | FSM Enforcement | AI API | Code-First | AI Context Optimized | +| -------------------------- | ----------- | --------------- | ------ | ---------- | -------------------- | +| **This package** | Yes | Yes | Yes | Yes | Yes (50-65%) | +| Backstage | Yes | No | No | No (YAML) | No | +| Mintlify / GitBook | Partial | No | No | No | No | +| Notion / Confluence | No | No | No | No | No | +| Docusaurus / VitePress | No | No | No | Partial | No | +| Gherkin Living Doc | Yes | No | No | Yes | Partial | +| CLAUDE.md / manual prompts | No | No | No | No | No (100%) | **Key differentiators:** -- **FSM enforcement** — Not just docs; validated state machine transitions -- **Dual-source** — TypeScript relationships + Gherkin planning = complete picture +- **FSM enforcement** — Not just docs; validated state machine transitions at commit time +- **Dual-source** — TypeScript owns runtime relationships, Gherkin owns planning constraints = complete picture - **AI-native** — CLI provides typed JSON queries, not string parsing - **Context efficient** — Structured specs use 50-65% context vs 100% for prose prompts - **Compaction resilient** — Specs survive context compression; prose doesn't -**Note on AI models:** This methodology was validated primarily with Claude Opus 4.5. The structured spec approach appears to leverage advanced pattern-recognition capabilities particularly well. +**Note on AI models:** This methodology was validated primarily with Claude (Anthropic). The structured spec approach benefits any LLM-based coding assistant, leveraging pattern-recognition capabilities particularly well. --- -## Document Durability Model - -Not all specs are equal. The package recognizes different durability levels: - -| Document Type | Durability | After Implementation | Content Ownership | -| --------------------------- | ---------- | ------------------------------ | --------------------------- | -| **Decision docs (ADR/PDR)** | Permanent | Remains valid until superseded | Intro, context, rationale | -| **Behavior specs** | Permanent | Must pass tests | Rules, examples, edge cases | -| **Tier 1 roadmap specs** | Temporary | Becomes clutter | Deliverables (until done) | -| **Generated docs** | Derived | Regenerated from sources | — | - -### Why This Matters - -**Decisions own "why"** — they're durable by design: - -```gherkin -Rule: Context - Why we need FSM validation - # This content remains valid for years - -Rule: Decision - How FSM validation works - # Implementation details that rarely change -``` - -**Behavior specs own "what"** — they're tested: +## Design-First Development -```gherkin -Scenario: Invalid transition fails - Given status "roadmap" - When changing to "completed" - Then validation fails # If this breaks, tests fail -``` +The package enforces a clear separation between **design artifacts** (stubs in `delivery-process/stubs/`) and **production code** (in `src/`). Design stubs use `throw new Error('not yet implemented')` and are excluded from ESLint, avoiding the need for lint exceptions on unfinished code. See [docs/METHODOLOGY.md](docs/METHODOLOGY.md) for the full stub workflow. -**Tier 1 specs own "when"** — they're temporary: +--- -```gherkin -Background: Deliverables - | Deliverable | Status | - | FSM types | Done | # Tracking until completion -``` +## Document Durability Model -This hierarchy enables **documentation generation from durable sources** — decisions and behavior specs stay current; tier 1 specs can be archived. +Not all specs are equal. Decision docs and behavior specs are **permanent** (tested, durable). Tier 1 roadmap specs are **temporary** (tracking until completion). Generated docs are **derived** (regenerated from source). This hierarchy enables documentation generation from durable sources — details in [docs/METHODOLOGY.md](docs/METHODOLOGY.md). --- @@ -586,18 +495,7 @@ See [docs/CONFIGURATION.md](docs/CONFIGURATION.md) for custom presets. | [GHERKIN-PATTERNS](docs/GHERKIN-PATTERNS.md) | Writers | Writing effective specs | | [PROCESS-GUARD](docs/PROCESS-GUARD.md) | Team Leads | FSM enforcement rules | | [VALIDATION](docs/VALIDATION.md) | CI/CD | Automated quality checks | -| [INSTRUCTIONS](INSTRUCTIONS.md) | Reference | Tag and CLI reference | - ---- - -## Contributing - -We welcome contributions! Please see our [contributing guidelines](CONTRIBUTING.md). - -1. Fork the repository -2. Create a feature branch -3. Run tests: `pnpm test` -4. Submit a pull request +| [TAXONOMY](docs/TAXONOMY.md) | Reference | Tag taxonomy and API | --- diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 00000000..9a6b8121 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,21 @@ +# Security Policy + +## Supported Versions + +| Version | Supported | +| ----------- | ------------------ | +| 1.0.0-pre.x | :white_check_mark: | + +## Reporting a Vulnerability + +If you discover a security vulnerability, please report it responsibly: + +1. **Do NOT open a public issue** +2. Use [GitHub's private vulnerability reporting](https://github.com/libar-dev/delivery-process/security/advisories/new) +3. Or email: security@libar.dev + +We will acknowledge receipt within 48 hours and provide an initial assessment within 7 days. + +## Scope + +This package runs as a dev tool (pre-commit hooks, CLI commands, doc generation). It processes local source files and does not make network requests. Supply chain integrity is maintained via npm provenance attestation on all published versions. diff --git a/delivery-process/decisions/adr-001-taxonomy-canonical-values.feature b/delivery-process/decisions/adr-001-taxonomy-canonical-values.feature index fbb7ab96..1cac056c 100644 --- a/delivery-process/decisions/adr-001-taxonomy-canonical-values.feature +++ b/delivery-process/decisions/adr-001-taxonomy-canonical-values.feature @@ -48,6 +48,8 @@ Feature: ADR-001 - Taxonomy Canonical Values and Process Constants **Invariant:** The product-area tag uses one of 7 canonical values. Each value represents a reader-facing documentation section, not a source module. + **Rationale:** Without canonical values, organic drift (e.g., Generator vs Generators) produces inconsistent grouping in generated documentation and fragmented product area pages. + **Verified by:** Canonical values are enforced | Value | Reader Question | Covers | | Annotation | How do I annotate code? | Scanning, extraction, tag parsing, dual-source | @@ -65,6 +67,8 @@ Feature: ADR-001 - Taxonomy Canonical Values and Process Constants Rule: ADR category canonical values **Invariant:** The adr-category tag uses one of 4 values. + **Rationale:** Unbounded category values prevent meaningful grouping of architecture decisions and make cross-cutting queries unreliable. + **Verified by:** Canonical values are enforced | Value | Purpose | | architecture | System structure, component design, data flow | @@ -80,6 +84,8 @@ Feature: ADR-001 - Taxonomy Canonical Values and Process Constants **Invariant:** Pattern status uses exactly 4 values with defined protection levels. These are enforced by Process Guard at commit time. + **Rationale:** Without protection levels, active specs accumulate scope creep and completed specs get silently modified, undermining delivery process integrity. + **Verified by:** Canonical values are enforced | Status | Protection | Can Add Deliverables | Allowed Actions | | roadmap | None | Yes | Full editing | @@ -95,6 +101,8 @@ Feature: ADR-001 - Taxonomy Canonical Values and Process Constants **Invariant:** Only these transitions are valid. All others are rejected by Process Guard. + **Rationale:** Allowing arbitrary transitions (e.g., roadmap to completed) bypasses the active phase where scope-lock and deliverable tracking provide quality assurance. + **Verified by:** Canonical values are enforced | From | To | Trigger | | roadmap | active | Start work | @@ -114,6 +122,8 @@ Feature: ADR-001 - Taxonomy Canonical Values and Process Constants **Invariant:** Every tag has one of 6 format types that determines how its value is parsed. + **Rationale:** Without explicit format types, parsers must guess value structure, leading to silent data corruption when CSV values are treated as single strings or numbers are treated as text. + **Verified by:** Canonical values are enforced | Format | Parsing | Example | | flag | Boolean presence, no value | @libar-docs-core | @@ -131,6 +141,8 @@ Feature: ADR-001 - Taxonomy Canonical Values and Process Constants **Invariant:** Relationship tags have defined ownership by source type. Anti-pattern detection enforces these boundaries. + **Rationale:** Cross-domain tag placement (e.g., runtime dependencies in Gherkin) creates conflicting sources of truth and breaks the dual-source architecture ownership model. + **Verified by:** Canonical values are enforced | Tag | Correct Source | Wrong Source | Rationale | | uses | TypeScript | Feature files | TS owns runtime dependencies | @@ -146,6 +158,8 @@ Feature: ADR-001 - Taxonomy Canonical Values and Process Constants **Invariant:** The quarter tag uses `YYYY-QN` format (e.g., `2026-Q1`). ISO-year-first sorting works lexicographically. + **Rationale:** Non-standard formats (e.g., Q1-2026) break lexicographic sorting, which roadmap generation and timeline queries depend on for correct ordering. + **Verified by:** Canonical values are enforced # =========================================================================== # RULE 8: Canonical Phase Definitions @@ -156,6 +170,8 @@ Feature: ADR-001 - Taxonomy Canonical Values and Process Constants **Invariant:** The default workflow defines exactly 6 phases in fixed order. These are the canonical phase names and ordinals used by all generated documentation. + **Rationale:** Ad-hoc phase names and ordering produce inconsistent roadmap grouping across packages and make cross-package progress tracking impossible. + **Verified by:** Canonical values are enforced | Order | Phase | Purpose | | 1 | Inception | Problem framing, scope definition | @@ -173,6 +189,8 @@ Feature: ADR-001 - Taxonomy Canonical Values and Process Constants **Invariant:** Deliverable status (distinct from pattern FSM status) uses exactly 6 values, enforced by Zod schema at parse time. + **Rationale:** Freeform status strings bypass Zod validation and break DoD checks, which rely on terminal status classification to determine pattern completeness. + **Verified by:** Canonical values are enforced | Value | Meaning | | complete | Work is done | diff --git a/delivery-process/decisions/adr-002-gherkin-only-testing.feature b/delivery-process/decisions/adr-002-gherkin-only-testing.feature index e94f9ece..d4347288 100644 --- a/delivery-process/decisions/adr-002-gherkin-only-testing.feature +++ b/delivery-process/decisions/adr-002-gherkin-only-testing.feature @@ -47,6 +47,8 @@ Feature: ADR-002 - Gherkin-Only Testing Policy **Invariant:** Feature files serve as both executable specs and documentation source. This dual purpose is the primary benefit of Gherkin-only testing for this package. + **Rationale:** Parallel `.test.ts` files create a hidden test layer invisible to the documentation pipeline, undermining the single source of truth principle this package enforces. + **Verified by:** Gherkin-only policy enforced | Artifact | Without Gherkin-Only | With Gherkin-Only | | Tests | .test.ts (hidden from docs) | .feature (visible in docs) | diff --git a/delivery-process/decisions/adr-003-source-first-pattern-architecture.feature b/delivery-process/decisions/adr-003-source-first-pattern-architecture.feature index 13b1812e..27f8aa88 100644 --- a/delivery-process/decisions/adr-003-source-first-pattern-architecture.feature +++ b/delivery-process/decisions/adr-003-source-first-pattern-architecture.feature @@ -51,6 +51,8 @@ Feature: ADR-003 - Source-First Pattern Architecture **Invariant:** A pattern is defined by `@libar-docs-pattern` in a TypeScript file — either a stub (pre-implementation) or source code (post-implementation). + **Rationale:** If pattern identity lives in tier 1 specs, it becomes stale after implementation and diverges from the code that actually realizes the pattern. + **Verified by:** TypeScript source is canonical pattern definition **Pattern Definition Lifecycle:** @@ -72,6 +74,8 @@ Feature: ADR-003 - Source-First Pattern Architecture **Invariant:** Tier 1 roadmap specs serve planning and delivery tracking. They are not the source of truth for pattern identity, invariants, or acceptance criteria. After completion, they may be archived. + **Rationale:** Treating tier 1 specs as durable creates a maintenance burden — at scale only 39% maintain traceability, and duplicated Rules/Scenarios average 200-400 stale lines. + **Verified by:** TypeScript source is canonical pattern definition **Value by lifecycle phase:** @@ -88,6 +92,8 @@ Feature: ADR-003 - Source-First Pattern Architecture **Invariant:** The delivery process produces three artifact types with long-term value. All other artifacts are projections or ephemeral. + **Rationale:** Without a clear boundary between durable and ephemeral artifacts, teams maintain redundant documents that inevitably drift from the source of truth. + **Verified by:** TypeScript source is canonical pattern definition | Artifact | Purpose | Owns | | Annotated TypeScript | Pattern identity, architecture graph | Name, status, uses, categories | @@ -103,6 +109,8 @@ Feature: ADR-003 - Source-First Pattern Architecture **Invariant:** `@libar-docs-implements` declares a realization relationship. Multiple files can implement the same pattern. One file can implement multiple patterns (CSV format). + **Rationale:** Without many-to-one realization, cross-cutting patterns that span multiple files cannot be traced back to a single canonical definition. + **Verified by:** TypeScript source is canonical pattern definition | Relationship | Tag | Cardinality | | Definition | `@libar-docs-pattern` | Exactly one per pattern | @@ -117,6 +125,8 @@ Feature: ADR-003 - Source-First Pattern Architecture **Invariant:** `@libar-docs-pattern:X` may appear in exactly one file across the entire codebase. The `mergePatterns()` conflict check in `orchestrator.ts` correctly enforces this. + **Rationale:** Duplicate pattern definitions cause merge conflicts in the MasterDataset and produce ambiguous ownership in generated documentation. + **Verified by:** TypeScript source is canonical pattern definition **Migration path for existing conflicts:** @@ -135,6 +145,8 @@ Feature: ADR-003 - Source-First Pattern Architecture **Invariant:** `@libar-docs-implements` (reverse: "I verify this pattern") is the primary traceability mechanism. `@libar-docs-executable-specs` (forward: "my tests live here") is retained but not required. + **Rationale:** Forward links in tier 1 specs go stale when specs are archived, while reverse links in test files are self-maintaining because the test cannot run without the implementation. + **Verified by:** TypeScript source is canonical pattern definition | Mechanism | Usage | Reliability | | `@implements` (reverse) | 14 patterns (32%) | Self-maintaining, lives in test | diff --git a/delivery-process/decisions/adr-006-single-read-model-architecture.feature b/delivery-process/decisions/adr-006-single-read-model-architecture.feature index 317e419f..80440398 100644 --- a/delivery-process/decisions/adr-006-single-read-model-architecture.feature +++ b/delivery-process/decisions/adr-006-single-read-model-architecture.feature @@ -7,6 +7,7 @@ @libar-docs-product-area:Generation @libar-docs-include:process-workflow,codec-transformation @libar-docs-depends-on:ADR005CodecBasedMarkdownRendering +@libar-docs-unlock-reason:Add-Verified-by-sections-and-acceptance-criteria Feature: ADR-006 - Single Read Model Architecture **Context:** @@ -49,6 +50,8 @@ Feature: ADR-006 - Single Read Model Architecture cross-source resolution, or dependency information consumes the MasterDataset. Direct scanner/extractor imports are permitted only in pipeline orchestration code that builds the MasterDataset. + **Rationale:** Bypassing the read model forces consumers to re-derive data that the MasterDataset already computes, creating duplicate logic and divergent behavior when the pipeline evolves. + **Verified by:** Feature consumers import from MasterDataset not from raw pipeline stages | Layer | May Import | Examples | | Pipeline Orchestration | scanner/, extractor/, pipeline/ | orchestrator.ts, process-api.ts pipeline setup | @@ -64,6 +67,8 @@ Feature: ADR-006 - Single Read Model Architecture discard fields from ExtractedPattern. If a consumer needs a subset, the type system provides the projection — not a hand-written extraction function that becomes a barrier between the consumer and canonical data. + **Rationale:** Lossy local types silently drop fields that later become needed, causing bugs that only surface when new MasterDataset capabilities are added and the local type lacks them. + **Verified by:** Feature consumers import from MasterDataset not from raw pipeline stages Rule: Relationship resolution is computed once @@ -71,11 +76,15 @@ Feature: ADR-006 - Single Read Model Architecture and reverse lookups (usedBy, implementedBy, extendedBy) are computed in `transformToMasterDataset()`. No consumer re-derives these from raw pattern arrays or scanned file tags. + **Rationale:** Re-deriving relationships in consumers duplicates the resolution logic and risks inconsistency when different consumers implement subtly different traversal or filtering rules. + **Verified by:** Feature consumers import from MasterDataset not from raw pipeline stages Rule: Three named anti-patterns **Invariant:** These are recognized violations, serving as review criteria - for new code and refactoring targets for existing code: + for new code and refactoring targets for existing code. + **Rationale:** Without named anti-patterns, violations appear as one-off style issues rather than systematic architectural drift, making them harder to detect and communicate in code review. + **Verified by:** Feature consumers import from MasterDataset not from raw pipeline stages | Anti-Pattern | Detection Signal | | Parallel Pipeline | Feature consumer imports from scanner/ or extractor/ | @@ -85,24 +94,31 @@ Feature: ADR-006 - Single Read Model Architecture Naming them makes them visible in code review — including AI-assisted sessions where the default proposal is often "add a helper function." -**Good vs Bad** - - """typescript - // Good: consume the read model - function validateCrossSource(dataset: RuntimeMasterDataset): ValidationSummary { - const rel = dataset.relationshipIndex[patternName]; - const isImplemented = rel.implementedBy.length > 0; - } - - // Bad: re-derive from raw state (Parallel Pipeline + Re-derived Relationship) - function buildImplementsLookup( - gherkinFiles: readonly ScannedGherkinFile[], - tsPatterns: readonly ExtractedPattern[] - ): ReadonlySet { ... } - """ - -**References** - - - Monorepo ADR-006: Projections for All Reads (same principle, application domain) - - ADR-005: Codec-Based Markdown Rendering (established MasterDataset as codec input) - - Order-management ARCHITECTURE.md: CommandOrchestrator + Read Model separation + **Good vs Bad** + + """typescript + // Good: consume the read model + function validateCrossSource(dataset: RuntimeMasterDataset): ValidationSummary { + const rel = dataset.relationshipIndex[patternName]; + const isImplemented = rel.implementedBy.length > 0; + } + + // Bad: re-derive from raw state (Parallel Pipeline + Re-derived Relationship) + function buildImplementsLookup( + gherkinFiles: readonly ScannedGherkinFile[], + tsPatterns: readonly ExtractedPattern[] + ): ReadonlySet { ... } + """ + + **References** + + - Monorepo ADR-006: Projections for All Reads (same principle, application domain) + - ADR-005: Codec-Based Markdown Rendering (established MasterDataset as codec input) + - Order-management ARCHITECTURE.md: CommandOrchestrator + Read Model separation + + @acceptance-criteria + Scenario: Feature consumers import from MasterDataset not from raw pipeline stages + Given a feature consumer that needs pattern relationships or status groupings + When reviewing its import statements + Then it imports from MasterDataset or relationshipIndex + And it does not import directly from scanner/ or extractor/ modules diff --git a/delivery-process/decisions/pdr-001-session-workflow-commands.feature b/delivery-process/decisions/pdr-001-session-workflow-commands.feature index d9b72c1e..5a8e3d33 100644 --- a/delivery-process/decisions/pdr-001-session-workflow-commands.feature +++ b/delivery-process/decisions/pdr-001-session-workflow-commands.feature @@ -33,6 +33,10 @@ Feature: PDR-001 - Session Workflow Commands Design Decisions Rule: DD-1 - Text output with section markers + **Invariant:** scope-validate and handoff must return plain text with === SECTION === markers, never JSON. + **Rationale:** Inconsistent output formats force consumers to detect and branch on format type, breaking the dual output path contract. + **Verified by:** scope-validate outputs structured text + Both scope-validate and handoff return string from the router, using === SECTION === markers. Follows the dual output path where text commands bypass JSON.stringify. @@ -43,6 +47,10 @@ Feature: PDR-001 - Session Workflow Commands Design Decisions Rule: DD-2 - Git integration is opt-in via --git flag + **Invariant:** Domain logic must never invoke shell commands or depend on git directly. + **Rationale:** Shell dependencies in domain logic make functions untestable without git fixtures and break deterministic behavior. + **Verified by:** N/A — no-shell constraint verified by code review (no exec/spawn calls in domain logic) + The handoff command accepts an optional --git flag. The CLI handler calls git diff and passes file list to the pure generator function. No shell dependency in domain logic. @@ -53,6 +61,10 @@ Feature: PDR-001 - Session Workflow Commands Design Decisions Rule: DD-3 - Session type inferred from FSM status + **Invariant:** Every FSM status must map to exactly one default session type, overridable by an explicit --session flag. + **Rationale:** Ambiguous or missing inference forces users to always specify --session manually, defeating the ergonomic benefit of status-based defaults. + **Verified by:** N/A — full mapping table (4 statuses) verified by code review; active→implement example in "Active pattern infers implement session" + Handoff infers session type from pattern's current FSM status. An explicit --session flag overrides inference. @@ -68,6 +80,10 @@ Feature: PDR-001 - Session Workflow Commands Design Decisions Rule: DD-4 - Severity levels match Process Guard model + **Invariant:** Scope validation must use exactly three severity levels (PASS, BLOCKED, WARN) consistent with Process Guard. + **Rationale:** Divergent severity models cause confusion when the same violation appears in both systems with different severity classifications. + **Verified by:** N/A — three severity levels defined as type-system enum; verified by code review + Scope validation uses three severity levels: | Severity | Meaning | @@ -83,6 +99,10 @@ Feature: PDR-001 - Session Workflow Commands Design Decisions Rule: DD-5 - Current date only for handoff + **Invariant:** Handoff must always use the current system date with no override mechanism. + **Rationale:** A --date flag enables backdating handoff timestamps, which breaks audit trail integrity for multi-session work. + **Verified by:** N/A — no --date flag by design; verified by code review and CLI arg inventory + Handoff always uses the current date. No --date flag. # =========================================================================== @@ -91,6 +111,10 @@ Feature: PDR-001 - Session Workflow Commands Design Decisions Rule: DD-6 - Both positional and flag forms for scope type + **Invariant:** scope-validate must accept scope type as both a positional argument and a --type flag. + **Rationale:** Supporting only one form creates inconsistency with CLI conventions and forces users to remember which form each subcommand uses. + **Verified by:** N/A — dual-form acceptance verified by code review (both positional and --type flag parsed in CLI handler) + scope-validate accepts scope type as both positional argument and --type flag. @@ -100,6 +124,10 @@ Feature: PDR-001 - Session Workflow Commands Design Decisions Rule: DD-7 - Co-located formatter functions + **Invariant:** Each module must export both its data builder and text formatter as co-located functions. + **Rationale:** Splitting builder and formatter across files increases coupling surface and makes it harder to trace data flow through the module. + **Verified by:** N/A — co-location is a module structure decision; verified by code review of scope-validator.ts and handoff-generator.ts exports + Each module (scope-validator.ts, handoff-generator.ts) exports both the data builder and the text formatter. Simpler than the context-assembler/context-formatter split. diff --git a/delivery-process/specs/cli-behavior-testing.feature b/delivery-process/specs/cli-behavior-testing.feature index fac3639e..52611936 100644 --- a/delivery-process/specs/cli-behavior-testing.feature +++ b/delivery-process/specs/cli-behavior-testing.feature @@ -47,6 +47,7 @@ Feature: CLI Behavior Testing **Invariant:** Invalid arguments produce clear error messages with usage hints. Valid arguments produce expected output files. + **Rationale:** CLI commands are the primary user-facing interface; unclear errors cause developers to bypass the tool and maintain docs manually, defeating the code-first approach. **API:** See `src/cli/generate-docs.ts` @@ -89,6 +90,7 @@ Feature: CLI Behavior Testing **Invariant:** Lint violations are reported with file, line, and severity. Exit codes reflect violation presence based on strictness setting. + **Rationale:** Without structured violation output, CI pipelines cannot distinguish lint failures from crashes, and developers cannot locate the offending annotation to fix it. **API:** See `src/cli/lint-patterns.ts` @@ -129,6 +131,7 @@ Feature: CLI Behavior Testing **Invariant:** DoD and anti-pattern violations are reported per phase. Exit codes reflect validation state. + **Rationale:** Phase-level reporting is required because cross-source validation spans multiple files; a single pass/fail gives no actionable information about which phase needs attention. **API:** See `src/cli/validate-patterns.ts` @@ -162,6 +165,7 @@ Feature: CLI Behavior Testing **Invariant:** Errors include type, file, line (when applicable), and reason. Unknown errors are caught and formatted safely. + **Rationale:** Inconsistent error formats force consumers to write per-CLI parsing logic; a uniform DocError shape enables a single error handler across all CLI commands and CI integrations. **Verified by:** Error formatting, Unknown error handling diff --git a/delivery-process/specs/codec-behavior-testing.feature b/delivery-process/specs/codec-behavior-testing.feature index febf91fe..ece85cc6 100644 --- a/delivery-process/specs/codec-behavior-testing.feature +++ b/delivery-process/specs/codec-behavior-testing.feature @@ -56,6 +56,8 @@ Feature: Codec Behavior Testing **Invariant:** Roadmap shows planned work, Milestones shows completed work, CurrentWork shows active patterns only. + **Rationale:** Mixing statuses across timeline views would bury actionable + information and make it impossible to distinguish planned from delivered work. **API:** See `src/renderable/codecs/timeline.ts` @@ -97,6 +99,8 @@ Feature: Codec Behavior Testing **Invariant:** SessionContext shows active patterns with deliverables. RemainingWork aggregates incomplete work by phase. + **Rationale:** AI sessions without curated context waste tokens on irrelevant + patterns, and unaggregated remaining work obscures project health. **API:** See `src/renderable/codecs/session.ts` @@ -125,6 +129,8 @@ Feature: Codec Behavior Testing **Invariant:** Features include problem, solution, business value. Acceptance criteria are formatted with bold keywords. + **Rationale:** Omitting problem/solution context produces specs that lack + justification, and unformatted acceptance criteria are difficult to scan. **API:** See `src/renderable/codecs/requirements.ts` @@ -151,6 +157,8 @@ Feature: Codec Behavior Testing **Invariant:** Changelog follows Keep a Changelog format. Traceability maps rules to scenarios. + **Rationale:** Non-standard changelog formats break tooling that parses release + notes, and unmapped rules represent unverified business constraints. **API:** See `src/renderable/codecs/reporting.ts` @@ -178,6 +186,8 @@ Feature: Codec Behavior Testing **Invariant:** Planning checklist includes DoD items. Session plan shows implementation steps. + **Rationale:** Missing DoD items in checklists allow incomplete patterns to + pass validation, and sessions without implementation steps lose focus. **API:** See `src/renderable/codecs/planning.ts` diff --git a/delivery-process/specs/config-based-workflow-definition.feature b/delivery-process/specs/config-based-workflow-definition.feature index ce9021f4..c8b91a38 100644 --- a/delivery-process/specs/config-based-workflow-definition.feature +++ b/delivery-process/specs/config-based-workflow-definition.feature @@ -1,6 +1,7 @@ @libar-docs @libar-docs-pattern:ConfigBasedWorkflowDefinition @libar-docs-status:completed +@libar-docs-unlock-reason:Add-missing-Invariant-Rationale-annotations @libar-docs-phase:99 @libar-docs-effort:2h @libar-docs-product-area:Configuration @@ -151,6 +152,11 @@ Feature: Config-Based Workflow Definition Rule: Workflow as a configurable preset field is deferred + **Invariant:** The inline default workflow constant is the only workflow source until preset integration is implemented. No preset or project config field exposes workflow customization. + **Rationale:** Coupling workflow into the preset/config system before the inline fix ships would widen the blast radius and risk type regressions across all config consumers. + + **Verified by:** N/A - deferred until preset integration + Adding `workflow` as a field on `DeliveryProcessConfig` (presets) and `DeliveryProcessProjectConfig` (project config) is a natural next step but NOT required for the MVP fix. diff --git a/delivery-process/specs/cross-source-validation.feature b/delivery-process/specs/cross-source-validation.feature index f0043ab0..7d029163 100644 --- a/delivery-process/specs/cross-source-validation.feature +++ b/delivery-process/specs/cross-source-validation.feature @@ -31,6 +31,10 @@ Feature: Cross-Source Validation Rule: Pattern names must be consistent across sources + **Invariant:** A pattern name referenced in one source must resolve to the same canonical name in all other sources. + **Rationale:** Typos or inconsistencies between TypeScript and Gherkin pattern names cause silent data loss — the pattern appears as two unrelated entries instead of a unified cross-source record. + **Verified by:** Pattern name mismatch detected; Pattern names match across sources + @acceptance-criteria Scenario: Pattern name mismatch detected Given TypeScript phase file with @libar-docs-pattern MyPattern @@ -47,6 +51,10 @@ Feature: Cross-Source Validation Rule: Circular dependencies are detected + **Invariant:** The dependency graph must be a directed acyclic graph (DAG) with no cycles. + **Rationale:** Circular dependencies create unresolvable ordering — no pattern in the cycle can be completed first, blocking the entire chain from progressing. + **Verified by:** Direct circular dependency; Transitive circular dependency + @acceptance-criteria Scenario: Direct circular dependency Given Phase A with @depends-on:PhaseB @@ -64,6 +72,10 @@ Feature: Cross-Source Validation Rule: Dependency references must resolve + **Invariant:** Every `@depends-on` reference must resolve to an existing pattern in the registry. + **Rationale:** Dangling dependency references produce incomplete ordering and missing relationship edges in generated documentation, hiding actual inter-pattern constraints. + **Verified by:** Dependency references non-existent pattern; All dependencies resolve + @acceptance-criteria Scenario: Dependency references non-existent pattern Given Phase A with @depends-on:NonExistentPattern diff --git a/delivery-process/specs/doc-generation-proof-of-concept.feature b/delivery-process/specs/doc-generation-proof-of-concept.feature index 17fc5279..ac2b8679 100644 --- a/delivery-process/specs/doc-generation-proof-of-concept.feature +++ b/delivery-process/specs/doc-generation-proof-of-concept.feature @@ -27,6 +27,11 @@ Feature: ADR-021 - Documentation Generation from Annotated Sources Rule: Context - Manual documentation maintenance does not scale + **Invariant:** Documentation must be generated from annotated source code, never manually maintained as a separate artifact. + **Rationale:** Manual documentation drifts from source as the codebase evolves, creating stale references that mislead both humans and AI coding sessions. + + **Verified by:** Full pipeline generates documentation from decision documents + **The Problem:** Common technical documentation is the hardest part to maintain in a repository. @@ -73,6 +78,11 @@ Feature: ADR-021 - Documentation Generation from Annotated Sources Rule: Decision - Decisions own convention content and durable context, code owns details + **Invariant:** Each content type (intro/rationale, rules/examples, API types) is owned by exactly one source type (decision, behavior spec, or code). + **Rationale:** Shared ownership leads to conflicting updates and ambiguous authority over what the "correct" version is. + + **Verified by:** Decision Rule descriptions become documentation sections; Decision DocStrings become code examples + **The Pattern:** Documentation is generated from three source types with different durability: @@ -144,6 +154,11 @@ Feature: ADR-021 - Documentation Generation from Annotated Sources Rule: Proof of Concept - Self-documentation validates the pattern + **Invariant:** The documentation generation pattern must be validated by generating documentation about itself from its own annotated sources. + **Rationale:** A self-referential proof of concept exposes extraction gaps and source mapping issues that synthetic test data would miss. + + **Verified by:** Full pipeline generates documentation from decision documents + This POC demonstrates the doc-from-decision pattern by generating docs about ITSELF. The DocGenerationProofOfConcept pattern produces: @@ -235,6 +250,11 @@ Feature: ADR-021 - Documentation Generation from Annotated Sources Rule: Expected Output - Compact claude module structure + **Invariant:** Compact output must contain only essential tables and type names, with no JSDoc comments or implementation details. + **Rationale:** AI context windows are finite; including non-essential content displaces actionable information and degrades session effectiveness. + + **Verified by:** Compact and detailed outputs from same sources + **File:** `_claude-md/validation/process-guard.md` The compact module extracts only essential content for AI context. @@ -264,6 +284,11 @@ Feature: ADR-021 - Documentation Generation from Annotated Sources Rule: Consequences - Durable sources with clear ownership boundaries + **Invariant:** Decision documents remain the authoritative source for intro, rationale, and convention content until explicitly superseded. + **Rationale:** Without durable ownership, documentation sections lose their authoritative source and degrade into unattributed prose that no one updates. + + **Verified by:** Decision Rule descriptions become documentation sections + **Benefits:** | Benefit | How | @@ -292,6 +317,11 @@ Feature: ADR-021 - Documentation Generation from Annotated Sources Rule: Consequences - Design stubs live in stubs, not src + **Invariant:** Pre-implementation design stubs must reside in `delivery-process/stubs/`, never in `src/`. + **Rationale:** Stubs in `src/` require ESLint exceptions, create confusion between production and design code, and risk accidental imports of unimplemented functions. + + **Verified by:** N/A - architectural constraint verified by code structure, not runtime scenario + **The Problem:** Design stubs (pre-implementation API shapes) placed in `src/` cause issues: @@ -389,6 +419,9 @@ Feature: ADR-021 - Documentation Generation from Annotated Sources **Invariant:** The source mapping table in a decision document defines how documentation sections are assembled from multiple source files. + **Rationale:** Without a declarative mapping, generators must hard-code source-to-section relationships, making the system brittle to new document types. + + **Verified by:** Source mapping aggregates multiple files; Source mapping validated at generation time **Table Format:** diff --git a/delivery-process/specs/generator-infrastructure-testing.feature b/delivery-process/specs/generator-infrastructure-testing.feature index 93b6d4ef..ab5fea29 100644 --- a/delivery-process/specs/generator-infrastructure-testing.feature +++ b/delivery-process/specs/generator-infrastructure-testing.feature @@ -47,6 +47,8 @@ Feature: Generator Infrastructure Testing **Invariant:** Orchestrator merges TypeScript and Gherkin patterns, handles conflicts, and produces requested document types. + **Rationale:** Without centralized orchestration, consumers would wire pipelines + independently, leading to inconsistent merging and silent data loss. **API:** See `src/generators/orchestrator.ts` @@ -97,6 +99,8 @@ Feature: Generator Infrastructure Testing **Invariant:** Registry prevents duplicate names, returns undefined for unknown generators, and lists available generators alphabetically. + **Rationale:** Duplicate registrations would silently overwrite generators, + causing unpredictable output depending on registration order. **API:** See `src/generators/registry.ts` @@ -143,6 +147,8 @@ Feature: Generator Infrastructure Testing **Invariant:** Generator delegates to underlying codec for transformation. Missing MasterDataset produces descriptive error. + **Rationale:** If the adapter silently proceeds without a MasterDataset, codecs + receive undefined input and produce corrupt or empty documents. **API:** See `src/generators/codec-based.ts` @@ -178,6 +184,8 @@ Feature: Generator Infrastructure Testing Rule: Orchestrator supports PR changes generation options **Invariant:** PR changes can filter by git diff, changed files, or release version. + **Rationale:** Without filtering, PR documentation would include all patterns + in the dataset, making change review noisy and hiding actual modifications. **API:** See `src/generators/orchestrator.ts` prChangesOptions diff --git a/delivery-process/specs/gherkin-rules-support.feature b/delivery-process/specs/gherkin-rules-support.feature index 880917b6..18ca0a9f 100644 --- a/delivery-process/specs/gherkin-rules-support.feature +++ b/delivery-process/specs/gherkin-rules-support.feature @@ -47,6 +47,9 @@ Feature: Gherkin Rules and Custom Content Support Rule: Rules flow through the entire pipeline without data loss + **Invariant:** Rule data (name, description, tags, scenarios) must be preserved through every pipeline stage from parser to ExtractedPattern. + **Rationale:** Any data loss at an intermediate stage makes rule content invisible to all downstream generators, silently producing incomplete documentation. + The @cucumber/gherkin parser extracts Rules natively. Our pipeline must preserve this data through scanner, extractor, and into ExtractedPattern so generators can access rule names, descriptions, and nested scenarios. @@ -74,6 +77,9 @@ Feature: Gherkin Rules and Custom Content Support Rule: Generators can render rules as business documentation + **Invariant:** Rules must render as human-readable Business Rules sections, not as raw Given/When/Then syntax. + **Rationale:** Business stakeholders cannot interpret Gherkin step definitions; without rendering transformation, feature files remain developer-only artifacts. + Business stakeholders see rule names and descriptions as "Business Rules" sections, not Given/When/Then syntax. This enables human-readable PRDs from the same files used for test execution. @@ -89,6 +95,9 @@ Feature: Gherkin Rules and Custom Content Support Rule: Custom content blocks render in acceptance criteria + **Invariant:** DataTables and DocStrings attached to steps must appear in generated documentation as Markdown tables and fenced code blocks respectively. + **Rationale:** Without rendering custom content blocks, acceptance criteria lose the structured data and code examples that make them self-contained and verifiable. + DataTables and DocStrings in steps should appear in generated documentation, providing structured data and code examples alongside step descriptions. @@ -106,6 +115,9 @@ Feature: Gherkin Rules and Custom Content Support Rule: vitest-cucumber executes scenarios inside Rules + **Invariant:** Scenarios nested inside Rule blocks must be executable by vitest-cucumber using the Rule() and RuleScenario() API. + **Rationale:** If Rule-scoped scenarios cannot execute, adding Rule blocks to feature files would break the test suite, forcing a choice between documentation structure and test coverage. + Test execution must work for scenarios inside Rule blocks. Use Rule() function with RuleScenario() instead of Scenario(). diff --git a/delivery-process/specs/mvp-workflow-implementation.feature b/delivery-process/specs/mvp-workflow-implementation.feature index 0f9a9599..046ee598 100644 --- a/delivery-process/specs/mvp-workflow-implementation.feature +++ b/delivery-process/specs/mvp-workflow-implementation.feature @@ -35,6 +35,11 @@ Feature: MVP Workflow Implementation Rule: PDR-005 status values are recognized + **Invariant:** The scanner and validation schemas must accept exactly the four PDR-005 status values: roadmap, active, completed, deferred. + **Rationale:** Unrecognized status values silently drop patterns from generated documents, causing missing documentation across the entire monorepo. + + **Verified by:** Scanner extracts new status values; Scenario Outline: All four status values are valid + @acceptance-criteria Scenario: Scanner extracts new status values Given a feature file with @libar-docs-status:roadmap @@ -56,6 +61,11 @@ Feature: MVP Workflow Implementation Rule: Generators map statuses to documents + **Invariant:** Each status value must route to exactly one target document: roadmap/deferred to ROADMAP.md, active to CURRENT-WORK.md, completed to CHANGELOG-GENERATED.md. + **Rationale:** Incorrect status-to-document mapping causes patterns to appear in the wrong document or be omitted entirely, breaking the project overview for all consumers. + + **Verified by:** Roadmap and deferred appear in ROADMAP.md; Active appears in CURRENT-WORK.md; Completed appears in CHANGELOG-GENERATED.md + @acceptance-criteria Scenario: Roadmap and deferred appear in ROADMAP.md Given patterns with status "roadmap" or "deferred" @@ -69,7 +79,7 @@ Feature: MVP Workflow Implementation Then they appear as active work @acceptance-criteria - Scenario: Completed appears in CHANGELOG + Scenario: Completed appears in CHANGELOG-GENERATED.md Given patterns with status "completed" When generating CHANGELOG-GENERATED.md Then they appear in the changelog diff --git a/delivery-process/specs/phase-numbering-conventions.feature b/delivery-process/specs/phase-numbering-conventions.feature index 13d4cb7e..b57dab7d 100644 --- a/delivery-process/specs/phase-numbering-conventions.feature +++ b/delivery-process/specs/phase-numbering-conventions.feature @@ -29,6 +29,10 @@ Feature: Phase Numbering Conventions and Validation Rule: Phase numbers must be unique within a release + **Invariant:** No two specs within the same release version may share the same phase number. + **Rationale:** Duplicate phase numbers create ambiguous ordering, causing unpredictable generation output and incorrect roadmap sequencing. + **Verified by:** Duplicate phase numbers are detected; Same phase number in different releases is allowed + @acceptance-criteria Scenario: Duplicate phase numbers are detected Given two phases both numbered 47 @@ -45,6 +49,10 @@ Feature: Phase Numbering Conventions and Validation Rule: Phase number gaps are detected + **Invariant:** Large gaps in the phase number sequence must produce warnings during validation. + **Rationale:** Undetected gaps signal accidentally skipped or orphaned specs, leading to misleading roadmap progress and hidden incomplete work. + **Verified by:** Large gaps trigger warnings; Small gaps are acceptable + @acceptance-criteria Scenario: Large gaps trigger warnings Given phases numbered 1, 2, 3, 10 @@ -59,6 +67,10 @@ Feature: Phase Numbering Conventions and Validation Rule: CLI suggests next available phase number + **Invariant:** The suggested phase number must not conflict with any existing phase in the target release. + **Rationale:** Without automated suggestion, authors manually guess the next number, frequently picking duplicates that are only caught later at validation time. + **Verified by:** Suggest next phase number + @acceptance-criteria Scenario: Suggest next phase number Given existing phases 47, 48, 50 diff --git a/delivery-process/specs/phase-state-machine.feature b/delivery-process/specs/phase-state-machine.feature index 13cd8171..0b55ed40 100644 --- a/delivery-process/specs/phase-state-machine.feature +++ b/delivery-process/specs/phase-state-machine.feature @@ -32,6 +32,10 @@ Feature: Phase State Machine Validation Rule: Valid status values are enforced + **Invariant:** Phase status must be one of the four canonical values: roadmap, active, completed, or deferred. + **Rationale:** Freeform status strings bypass FSM transition enforcement and produce undefined behavior in downstream generators and validators. + **Verified by:** Only valid status values are accepted; Invalid status values are rejected + @acceptance-criteria Scenario: Only valid status values are accepted Given a feature file with status tag @@ -46,6 +50,10 @@ Feature: Phase State Machine Validation Rule: Status transitions follow state machine rules + **Invariant:** Every status transition must follow a permitted edge in the FSM transition matrix. + **Rationale:** Skipping states (e.g., roadmap to completed) breaks scope-lock enforcement and allows incomplete deliverables to reach terminal status. + **Verified by:** Scenario Outline: Valid transitions are allowed; Scenario Outline: Invalid transitions are rejected + @acceptance-criteria Scenario Outline: Valid transitions are allowed Given a phase with current status "" @@ -57,7 +65,7 @@ Feature: Phase State Machine Validation | roadmap | active | | roadmap | deferred | | roadmap | roadmap | - | active | complete | + | active | completed | | active | roadmap | | deferred | roadmap | @@ -70,12 +78,16 @@ Feature: Phase State Machine Validation Examples: | from | to | - | complete | active | - | complete | roadmap | + | completed | active | + | completed | roadmap | | roadmap | completed| Rule: Terminal states require completion metadata + **Invariant:** Phases reaching completed status must carry a completion date and actual effort tag. + **Rationale:** Without completion metadata, effort variance tracking and timeline reporting produce gaps that undermine delivery process visibility. + **Verified by:** Completed status requires completion date; Completed phases should have effort-actual + @acceptance-criteria Scenario: Completed status requires completion date Given a phase transitioning to "completed" status diff --git a/delivery-process/specs/process-guard-linter.feature b/delivery-process/specs/process-guard-linter.feature index 5cc89c1d..06941462 100644 --- a/delivery-process/specs/process-guard-linter.feature +++ b/delivery-process/specs/process-guard-linter.feature @@ -59,6 +59,10 @@ Feature: Process Guard Linter Rule: Protection levels determine modification restrictions + **Invariant:** Every file's modification restrictions are determined solely by its `@libar-docs-status` tag, with `completed` requiring an explicit unlock reason for any change. + **Rationale:** Without status-derived protection, completed and approved work can be silently overwritten by bulk edits or accidental modifications. + **Verified by:** Scenario Outline: Protection level from status; Completed file modification without unlock fails; Completed file modification with unlock passes; Active file modification is allowed but scope-locked + Files inherit protection from their `@libar-docs-status` tag. Higher protection levels require explicit unlock to modify. @@ -102,6 +106,10 @@ Feature: Process Guard Linter Rule: Session definition files scope what can be modified + **Invariant:** When an active session exists, only specs explicitly listed in the session definition may be modified without warning, and excluded specs cannot be modified at all. + **Rationale:** Without session scoping, bulk operations and context switches cause unintended modifications to specs outside the current work focus. + **Verified by:** Session file defines modification scope; Modifying spec outside active session scope warns; Modifying explicitly excluded spec fails; No active session allows all modifications + Optional session files (`delivery-process/sessions/*.feature`) explicitly declare which specs are in-scope for modification during a work session. If active, modifications outside scope trigger warnings or errors. @@ -149,6 +157,10 @@ Feature: Process Guard Linter Rule: Status transitions follow PDR-005 FSM + **Invariant:** Every status change must follow a valid edge in the PDR-005 finite state machine; no transition may skip intermediate states. + **Rationale:** Skipping states (e.g., `roadmap` directly to `completed`) bypasses scope-locking and review gates, allowing incomplete work to be marked as done. + **Verified by:** Scenario Outline: Valid status transitions; Scenario Outline: Invalid status transitions + Status changes in a file must follow a valid transition per PDR-005. This extends phase-state-machine.feature to the linter context. @@ -189,6 +201,10 @@ Feature: Process Guard Linter Rule: Active specs cannot add new deliverables + **Invariant:** The deliverables table of an `active` spec is immutable with respect to new rows; only existing deliverable statuses may change. + **Rationale:** Adding deliverables after work has begun constitutes scope creep, undermining effort estimates and blocking completion. + **Verified by:** Adding deliverable to active spec fails; Updating deliverable status in active spec passes; Removing deliverable from active spec warns + Once a spec transitions to `active`, its deliverables table is considered scope-locked. Adding new rows indicates scope creep. @@ -226,6 +242,10 @@ Feature: Process Guard Linter Rule: CLI provides flexible validation modes + **Invariant:** The CLI must support both pre-commit (staged-only) and CI (all-files) validation modes with deterministic exit codes reflecting violation severity. + **Rationale:** Without flexible modes, teams cannot integrate process guard into both local developer workflows and CI pipelines with appropriate strictness levels. + **Verified by:** Validate staged changes (pre-commit default); Validate all tracked files; Show derived state for debugging; Strict mode treats warnings as errors; Ignore session flag bypasses session rules + @acceptance-criteria Scenario: Validate staged changes (pre-commit default) When running "pnpm lint:process --staged" @@ -266,6 +286,10 @@ Feature: Process Guard Linter Rule: Integrates with existing lint infrastructure + **Invariant:** Process guard output format and exit code semantics must be consistent with the existing `lint-patterns` tool. + **Rationale:** Inconsistent output formats force consumers to maintain separate parsers, and inconsistent exit codes break combined lint pipelines. + **Verified by:** Output format matches lint-patterns; Can run alongside lint-patterns + @acceptance-criteria Scenario: Output format matches lint-patterns When lint-process reports violations @@ -284,6 +308,10 @@ Feature: Process Guard Linter Rule: New tags support process guard functionality + **Invariant:** Session and protection tags must be registered in the TypeScript taxonomy with defined formats before use in feature files. + **Rationale:** Unregistered tags bypass schema validation and are silently ignored by the scanner, causing process guard rules to fail without diagnostics. + **Verified by:** Session-related tags are recognized; Protection-related tags are recognized + The following tags are defined in the TypeScript taxonomy to support process guard: @acceptance-criteria diff --git a/delivery-process/specs/release-association-rules.feature b/delivery-process/specs/release-association-rules.feature index ef8087d6..9bf8e0f0 100644 --- a/delivery-process/specs/release-association-rules.feature +++ b/delivery-process/specs/release-association-rules.feature @@ -30,6 +30,10 @@ Feature: Release Association Rules Validation Rule: Spec files must not contain release columns + **Invariant:** Spec file DataTables must never include a Release column; release metadata belongs exclusively in phase files. + **Rationale:** Mixing release metadata into specs couples planning artifacts to release timing, violating the separation defined by PDR-003. + **Verified by:** Spec with release column is rejected; Spec without release column passes + @acceptance-criteria Scenario: Spec with release column is rejected Given a feature file in delivery-process/specs/ @@ -46,6 +50,10 @@ Feature: Release Association Rules Validation Rule: TypeScript phase files must have required annotations + **Invariant:** Every TypeScript phase file must include @libar-docs-pattern, @libar-docs-phase, and @libar-docs-status annotations. + **Rationale:** Missing required annotations cause phase files to be invisible to the scanner, producing incomplete roadmap projections and broken cross-references. + **Verified by:** Phase file with missing required annotations; Scenario Outline: Phase file required annotations + @acceptance-criteria Scenario: Phase file with missing required annotations Given a TypeScript file in delivery-process/src/phases/ @@ -67,6 +75,10 @@ Feature: Release Association Rules Validation Rule: Release version follows semantic versioning + **Invariant:** All release version identifiers must conform to the `vX.Y.Z` semantic versioning format. + **Rationale:** Non-semver version strings break downstream tooling that relies on version ordering and comparison for release planning. + **Verified by:** Scenario Outline: Valid release version formats + @acceptance-criteria Scenario Outline: Valid release version formats Given a release version "" diff --git a/delivery-process/specs/session-file-cleanup.feature b/delivery-process/specs/session-file-cleanup.feature index 996bc6ec..fedfa942 100644 --- a/delivery-process/specs/session-file-cleanup.feature +++ b/delivery-process/specs/session-file-cleanup.feature @@ -33,6 +33,10 @@ Feature: Session File Cleanup Behavior Rule: Cleanup triggers during session-context generation + **Invariant:** Orphaned session files for inactive phases must be removed during session-context generation. + **Rationale:** Stale session files mislead developers into thinking a phase is still active, causing wasted effort on completed or paused work. + **Verified by:** Cleanup runs after generating session files + @acceptance-criteria Scenario: Cleanup runs after generating session files Given session files exist for phases 31 and 33 @@ -44,6 +48,10 @@ Feature: Session File Cleanup Behavior Rule: Only phase-*.md files are candidates for cleanup + **Invariant:** Cleanup must only target files matching the `phase-*.md` naming convention. + **Rationale:** Deleting non-session files (infrastructure files, manual notes) would destroy user content that cannot be regenerated. + **Verified by:** Non-session files are preserved + @acceptance-criteria Scenario: Non-session files are preserved Given sessions/ directory contains: @@ -58,6 +66,10 @@ Feature: Session File Cleanup Behavior Rule: Cleanup failures are non-fatal + **Invariant:** A cleanup failure must never prevent session-context generation from completing successfully. + **Rationale:** Cleanup is a housekeeping side-effect; blocking the primary generation workflow on a file-system error would break the developer's session for a non-critical concern. + **Verified by:** Permission error during cleanup; Missing sessions directory + @acceptance-criteria Scenario: Permission error during cleanup Given orphaned session file with restricted permissions diff --git a/delivery-process/specs/shape-extraction.feature b/delivery-process/specs/shape-extraction.feature index 2f220f36..7b597774 100644 --- a/delivery-process/specs/shape-extraction.feature +++ b/delivery-process/specs/shape-extraction.feature @@ -94,6 +94,7 @@ Feature: TypeScript Shape Extraction for Documentation **Invariant:** The `extract-shapes` tag must exist with CSV format to list multiple type names for extraction. + **Rationale:** Without a CSV-format tag, there is no mechanism to specify which type names to extract, and the extractor cannot discover shapes from source files. @acceptance-criteria @happy-path Scenario: Tag registry contains extract-shapes @@ -112,6 +113,7 @@ Feature: TypeScript Shape Extraction for Documentation **Invariant:** When `@libar-docs-extract-shapes` lists an interface name, the extractor must find and extract the complete interface definition including JSDoc comments, generics, and extends clauses. + **Rationale:** Partial extraction (missing generics, JSDoc, or extends clauses) produces incomplete API documentation that misleads consumers about a type's actual contract. @acceptance-criteria @happy-path Scenario: Extract simple interface @@ -210,6 +212,7 @@ Feature: TypeScript Shape Extraction for Documentation **Invariant:** Type aliases (including union types, intersection types, and mapped types) are extracted when listed in extract-shapes. + **Rationale:** Type aliases define domain vocabulary (status enums, branded types, utility types) that consumers need to understand API signatures; omitting them leaves gaps in generated documentation. @acceptance-criteria @happy-path Scenario: Extract union type alias @@ -265,6 +268,7 @@ Feature: TypeScript Shape Extraction for Documentation **Invariant:** Both string and numeric enums are extracted with their complete member definitions. + **Rationale:** Enum members define the closed set of valid values for a type; extracting only the enum name without its members provides no useful information to documentation consumers. @acceptance-criteria @happy-path Scenario: Extract string enum @@ -313,6 +317,7 @@ Feature: TypeScript Shape Extraction for Documentation **Invariant:** When a function name is listed in extract-shapes, only the signature (parameters, return type, generics) is extracted. The function body is replaced with ellipsis for documentation purposes. + **Rationale:** Including implementation bodies in generated documentation exposes internal logic, bloats output size, and creates a maintenance burden when internals change without API changes. @acceptance-criteria @happy-path Scenario: Extract function signature @@ -376,6 +381,7 @@ Feature: TypeScript Shape Extraction for Documentation **Invariant:** When multiple shapes are listed, they appear in the documentation in the order specified in the tag, not source order. + **Rationale:** Authors intentionally order shapes for progressive disclosure (e.g., output before input); using source order would break the author's intended documentation narrative. @acceptance-criteria @happy-path Scenario: Shapes appear in tag order @@ -417,6 +423,7 @@ Feature: TypeScript Shape Extraction for Documentation **Invariant:** Codecs render extracted shapes as TypeScript fenced code blocks, grouped under an "API Types" or similar section. + **Rationale:** Rendering shapes as plain text or without language hints prevents syntax highlighting and makes API types unreadable in generated markdown documentation. @acceptance-criteria @happy-path Scenario: Shapes render in claude module @@ -454,6 +461,7 @@ Feature: TypeScript Shape Extraction for Documentation **Invariant:** Extracted shapes may reference types from imports. The extractor does NOT resolve imports - it extracts the shape as-is. Consumers understand that referenced types are defined elsewhere. + **Rationale:** Resolving imports would require full dependency graph traversal across the codebase, dramatically increasing complexity and coupling the extractor to the project's module structure. @acceptance-criteria @happy-path Scenario: Shape with imported type reference @@ -507,6 +515,7 @@ Feature: TypeScript Shape Extraction for Documentation **Invariant:** When a function has multiple overload signatures, all signatures are extracted together as they represent the complete API. + **Rationale:** Extracting only one overload signature hides valid call patterns from consumers, leading to incorrect usage assumptions about the function's capabilities. @acceptance-criteria @happy-path Scenario: Extract overloaded function signatures @@ -556,6 +565,7 @@ Feature: TypeScript Shape Extraction for Documentation **Invariant:** Codecs can render shapes grouped in a single code block or as separate code blocks, depending on detail level. + **Rationale:** Compact claude-md modules need grouped blocks to minimize token usage, while detailed human docs benefit from separate blocks with individual JSDoc annotations. @acceptance-criteria @happy-path Scenario: Grouped rendering for compact output diff --git a/delivery-process/specs/step-definition-completion.feature b/delivery-process/specs/step-definition-completion.feature index 92d6810b..ed0b2358 100644 --- a/delivery-process/specs/step-definition-completion.feature +++ b/delivery-process/specs/step-definition-completion.feature @@ -57,6 +57,7 @@ Feature: Step Definition Completion Rule: Generator-related specs need step definitions for output validation **Invariant:** Step definitions test actual codec output against expected structure. + **Rationale:** Testing rendered markdown strings instead of structured codec output makes tests brittle to formatting changes that do not affect correctness. Factory functions from tests/fixtures/ should be used for test data. **Existing Specs:** @@ -101,6 +102,7 @@ Feature: Step Definition Completion Rule: Renderable helper specs need step definitions for utility functions **Invariant:** Helper functions are pure and easy to unit test. + **Rationale:** Renderable helpers are reused across multiple codecs; untested edge cases silently corrupt generated documentation in every consumer. Step definitions should test edge cases identified in specs. **Existing Specs:** @@ -135,6 +137,9 @@ Feature: Step Definition Completion Rule: Remaining specs in other directories need step definitions + **Invariant:** Every feature file in tests/features/ must have a corresponding step definition file. + **Rationale:** Feature files without step definitions are inert documentation that silently fall out of sync with the code they describe. + **Existing Specs:** - `tests/features/generators/table-extraction.feature` - `tests/features/scanner/docstring-mediatype.feature` @@ -159,6 +164,10 @@ Feature: Step Definition Completion Rule: Step definition implementation follows project patterns + **Invariant:** All step definition files must follow the established state-management and import patterns from existing .steps.ts files. + **Rationale:** Inconsistent step definition structure makes tests harder to review, debug, and maintain across the 10+ feature files in this deliverable. + **Verified by:** Existing .steps.ts review, PR review checklist + **Pattern:** All step definitions should follow the established patterns in existing .steps.ts files for consistency. diff --git a/delivery-process/specs/step-lint-vitest-cucumber.feature b/delivery-process/specs/step-lint-vitest-cucumber.feature index a5870f7e..020c2fc1 100644 --- a/delivery-process/specs/step-lint-vitest-cucumber.feature +++ b/delivery-process/specs/step-lint-vitest-cucumber.feature @@ -89,6 +89,8 @@ Feature: Step Lint - vitest-cucumber Static Compatibility Checker scenario cause vitest-cucumber step matching failures. The fix is to consolidate into a single step with a DataTable. + **Rationale:** Duplicate step text silently overwrites step registrations, causing the second And to match the first handler and produce wrong or undefined behavior at runtime. + **Verified by:** Duplicate And step text is flagged, Same And text in different scenarios is allowed @@ -109,6 +111,8 @@ Feature: Step Lint - vitest-cucumber Static Compatibility Checker **Invariant:** The $ character in step text causes matching issues in vitest-cucumber's expression parser. + **Rationale:** The dollar sign is interpreted as a special character in expression parsing, causing steps to silently fail to match and producing confusing StepAbleUnknowStepError messages. + **Verified by:** Dollar in step text produces warning @acceptance-criteria @happy-path @@ -126,6 +130,8 @@ Feature: Step Lint - vitest-cucumber Static Compatibility Checker **Invariant:** vitest-cucumber only supports string patterns with {string} and {int}. Regex patterns throw StepAbleStepExpressionError. + **Rationale:** Regex patterns are a common Cucumber.js habit that compiles without error but throws at runtime in vitest-cucumber, wasting debugging time. + **Verified by:** Regex pattern in Given is flagged @acceptance-criteria @happy-path @@ -139,6 +145,8 @@ Feature: Step Lint - vitest-cucumber Static Compatibility Checker **Invariant:** vitest-cucumber does not support {phrase}. Use {string} with quoted values in the feature file. + **Rationale:** The {phrase} type is valid in standard Cucumber but unsupported in vitest-cucumber, causing silent parameter capture failures that are difficult to trace. + **Verified by:** Phrase type in step string is flagged @acceptance-criteria @happy-path @@ -157,6 +165,8 @@ Feature: Step Lint - vitest-cucumber Static Compatibility Checker object, not function params. Using (_ctx, value: string) means value will be undefined at runtime. + **Rationale:** This is the most common vitest-cucumber trap. Function params compile and even type-check, but the values are always undefined at runtime because ScenarioOutline injects data through the variables object, not positional arguments. + **Verified by:** Function params in ScenarioOutline are flagged, Function params in regular Scenario are not flagged @@ -179,6 +189,8 @@ Feature: Step Lint - vitest-cucumber Static Compatibility Checker **Invariant:** If a feature file has And steps, the step definition must destructure And from the scenario callback. + **Rationale:** Without destructuring And, vitest-cucumber cannot bind And steps and throws StepAbleUnknowStepError at runtime with no indication that a missing destructure is the cause. + **Verified by:** Missing And destructuring is flagged, Present And destructuring passes @@ -201,6 +213,8 @@ Feature: Step Lint - vitest-cucumber Static Compatibility Checker **Invariant:** If a feature file has Rule: blocks, the step definition must destructure Rule from describeFeature. + **Rationale:** Without the Rule() wrapper, scenarios inside Rule: blocks are invisible to vitest-cucumber and silently never execute, giving a false green test suite. + **Verified by:** Missing Rule wrapper is flagged, Present Rule wrapper passes @@ -227,6 +241,8 @@ Feature: Step Lint - vitest-cucumber Static Compatibility Checker **Invariant:** Step files use two loadFeature patterns: simple string paths and resolve(__dirname, relative) paths. Both must be paired. + **Rationale:** Unpaired feature files cannot be cross-checked for compatibility issues, leaving ScenarioOutline param misuse and missing destructures undetected. + **Verified by:** Simple loadFeature path is paired, Resolve-based loadFeature path is paired diff --git a/delivery-process/specs/streaming-git-diff.feature b/delivery-process/specs/streaming-git-diff.feature index 18f83fd6..2ad71f3f 100644 --- a/delivery-process/specs/streaming-git-diff.feature +++ b/delivery-process/specs/streaming-git-diff.feature @@ -51,6 +51,10 @@ Feature: Streaming Git Diff for Process Guard Rule: Git commands stream output instead of buffering + **Invariant:** Git diff output must be consumed as a stream with constant memory usage, never buffered entirely in memory. + **Rationale:** Buffering full diff output causes ENOBUFS crashes on large repositories where diff size exceeds Node.js buffer limits. + **Verified by:** Large diff does not cause memory overflow; Streaming produces same results as buffered + @acceptance-criteria Scenario: Large diff does not cause memory overflow Given a repository with 500+ changed files since main @@ -72,6 +76,10 @@ Feature: Streaming Git Diff for Process Guard Rule: Diff content is parsed as it streams + **Invariant:** Status transitions and deliverable changes must be extracted incrementally as each file section completes, not after the entire diff is collected. + **Rationale:** Batch-processing the full diff reintroduces the memory bottleneck that streaming is designed to eliminate. + **Verified by:** Status transitions detected incrementally; Deliverable changes detected incrementally + @acceptance-criteria Scenario: Status transitions detected incrementally Given a streaming diff with status changes in multiple files @@ -92,6 +100,10 @@ Feature: Streaming Git Diff for Process Guard Rule: Streaming errors are handled gracefully + **Invariant:** Stream failures and malformed diff lines must return Result errors or be skipped without throwing exceptions. + **Rationale:** Unhandled stream errors crash the CLI process, preventing any validation output from reaching the user. + **Verified by:** Git command failure returns Result error; Malformed diff lines are skipped + @acceptance-criteria Scenario: Git command failure returns Result error Given git command exits with non-zero code diff --git a/delivery-process/specs/universal-doc-generator-robustness.feature b/delivery-process/specs/universal-doc-generator-robustness.feature index af30c2ca..394e73dd 100644 --- a/delivery-process/specs/universal-doc-generator-robustness.feature +++ b/delivery-process/specs/universal-doc-generator-robustness.feature @@ -22,6 +22,9 @@ Feature: Universal Document Generator - Robustness Foundation Rule: Context - PoC limitations prevent monorepo-scale operation + **Invariant:** The document generator must produce correct, deduplicated output and surface all errors explicitly before operating at monorepo scale. + **Rationale:** Silent failures and duplicated content in the PoC corrupt generated docs across all 210 target files, making bugs invisible until downstream consumers encounter broken documentation. + **The Problem:** The DecisionDocGenerator PoC (Phase 27) successfully demonstrated code-first @@ -53,6 +56,9 @@ Feature: Universal Document Generator - Robustness Foundation Rule: Decision - Robustness requires four coordinated improvements + **Invariant:** Robustness improvements must be implemented as four distinct, coordinated modules (deduplication, validation, warning collection, file validation) rather than ad-hoc fixes. + **Rationale:** Scattering reliability fixes across existing code creates coupling and makes individual concerns untestable; isolated modules enable independent verification and replacement. + **Architecture:** ``` @@ -113,6 +119,9 @@ Feature: Universal Document Generator - Robustness Foundation Rule: Duplicate content must be detected and merged + **Invariant:** No two sections in a generated document may have identical content fingerprints; duplicates must be merged into a single section with source attribution. + **Rationale:** Duplicate sections confuse readers and inflate document size, undermining trust in generated documentation as a reliable replacement for manually maintained docs. + Content fingerprinting identifies duplicate sections extracted from multiple sources. When duplicates are found, the system merges them intelligently based on source priority. @@ -138,6 +147,9 @@ Feature: Universal Document Generator - Robustness Foundation Rule: Invalid source mappings must fail fast with clear errors + **Invariant:** Every source mapping must pass pre-flight validation (file existence, method validity, readability) before any extraction is attempted. + **Rationale:** Without pre-flight validation, invalid mappings produce silent failures or cryptic runtime errors, making it impossible to diagnose configuration problems at monorepo scale. + Pre-flight validation catches configuration errors before extraction begins. This prevents silent failures and provides actionable error messages. @@ -177,6 +189,9 @@ Feature: Universal Document Generator - Robustness Foundation Rule: Warnings must be collected and reported consistently + **Invariant:** All non-fatal issues during extraction must be captured in a structured warning collector grouped by source, never emitted via console.warn. + **Rationale:** Scattered console.warn calls are lost in CI output and lack source context, making it impossible to trace warnings back to the configuration entry that caused them. + The warning collector replaces scattered console.warn calls with a structured system that aggregates warnings and reports them consistently. @@ -208,6 +223,9 @@ Feature: Universal Document Generator - Robustness Foundation Rule: Consequence - Improved reliability at cost of stricter validation + **Invariant:** Existing source mappings that previously succeeded silently may now fail validation and must be updated to conform to the stricter checks. + **Rationale:** Allowing invalid mappings to bypass validation would preserve the silent-failure behavior the robustness work was designed to eliminate. + **Positive:** - Duplicate content eliminated from generated docs diff --git a/delivery-process/stubs/DataAPIDesignSessionSupport/handoff-generator.ts b/delivery-process/stubs/DataAPIDesignSessionSupport/handoff-generator.ts index fc099a5e..938a0e54 100644 --- a/delivery-process/stubs/DataAPIDesignSessionSupport/handoff-generator.ts +++ b/delivery-process/stubs/DataAPIDesignSessionSupport/handoff-generator.ts @@ -50,6 +50,8 @@ * and passes the resulting file list. Without --git, the section is omitted. * * See: PDR-002 (DD-1 through DD-7), DataAPIDesignSessionSupport spec Rule 2 + * + * **When to Use:** When ending a work session and capturing state for the next session via the `handoff` CLI subcommand. */ import type { SessionType } from '../data-api-context-assembly/context-assembler.js'; diff --git a/delivery-process/stubs/DataAPIDesignSessionSupport/scope-validator.ts b/delivery-process/stubs/DataAPIDesignSessionSupport/scope-validator.ts index 5ea85f1f..72d54e25 100644 --- a/delivery-process/stubs/DataAPIDesignSessionSupport/scope-validator.ts +++ b/delivery-process/stubs/DataAPIDesignSessionSupport/scope-validator.ts @@ -48,6 +48,8 @@ * | WARN | Recommendation not met | No (unless --strict) | * * See: PDR-002 (DD-1 through DD-7), DataAPIDesignSessionSupport spec Rule 1 + * + * **When to Use:** When running pre-flight checks before a session via the `scope-validate` CLI subcommand. */ // --------------------------------------------------------------------------- diff --git a/delivery-process/stubs/config-based-workflow-definition/default-workflow-config.ts b/delivery-process/stubs/config-based-workflow-definition/default-workflow-config.ts index dcc09382..e9a46b32 100644 --- a/delivery-process/stubs/config-based-workflow-definition/default-workflow-config.ts +++ b/delivery-process/stubs/config-based-workflow-definition/default-workflow-config.ts @@ -18,6 +18,8 @@ * DD-1: Inline constant in workflow-loader.ts, not preset integration. * DD-2: Constant satisfies existing WorkflowConfig type from workflow-config.ts. * DD-4: loadDefaultWorkflow() returns LoadedWorkflow synchronously (not Promise). + * + * **When to Use:** When the workflow loader needs a default workflow config — import this constant instead of loading from a JSON file. */ import type { WorkflowConfig } from '../../src/validation-schemas/workflow-config.js'; diff --git a/delivery-process/stubs/data-api-architecture-queries/arch-queries.ts b/delivery-process/stubs/data-api-architecture-queries/arch-queries.ts index fc3b81ea..b9c689d5 100644 --- a/delivery-process/stubs/data-api-architecture-queries/arch-queries.ts +++ b/delivery-process/stubs/data-api-architecture-queries/arch-queries.ts @@ -28,6 +28,8 @@ * Note: SubcommandContext should be defined in src/cli/types.ts (cross-cutting CLI type). * NeighborEntry should be unified in src/api/types.ts (shared with ContextAssembler). * See: DataAPIArchitectureQueries spec, Rules 1-3 + * + * **When to Use:** When exploring architecture structure (neighborhoods, comparisons, tags, sources) via the Data API CLI. */ // --------------------------------------------------------------------------- diff --git a/delivery-process/stubs/data-api-architecture-queries/coverage-analyzer.ts b/delivery-process/stubs/data-api-architecture-queries/coverage-analyzer.ts index 3e2da2be..26d7b4c4 100644 --- a/delivery-process/stubs/data-api-architecture-queries/coverage-analyzer.ts +++ b/delivery-process/stubs/data-api-architecture-queries/coverage-analyzer.ts @@ -30,6 +30,8 @@ * - Same exclusion rules as the scanner: findFilesToScan() defaults * * See: DataAPIArchitectureQueries spec, Rule 2 (Architecture Coverage) + * + * **When to Use:** When checking annotation completeness or finding unannotated files via `arch coverage` or `unannotated` CLI subcommands. */ // --------------------------------------------------------------------------- diff --git a/delivery-process/stubs/data-api-context-assembly/context-assembler.ts b/delivery-process/stubs/data-api-context-assembly/context-assembler.ts index faecb748..57b33478 100644 --- a/delivery-process/stubs/data-api-context-assembly/context-assembler.ts +++ b/delivery-process/stubs/data-api-context-assembly/context-assembler.ts @@ -38,6 +38,8 @@ * | Test files | no | no | yes | * * See: DataAPIContextAssembly spec, Rules 1-5 + * + * **When to Use:** When building a session context bundle for a pattern — use this instead of manually querying MasterDataset views. */ // --------------------------------------------------------------------------- diff --git a/delivery-process/stubs/data-api-context-assembly/context-formatter.ts b/delivery-process/stubs/data-api-context-assembly/context-formatter.ts index 93a61c8e..09ab4aa7 100644 --- a/delivery-process/stubs/data-api-context-assembly/context-formatter.ts +++ b/delivery-process/stubs/data-api-context-assembly/context-formatter.ts @@ -31,6 +31,8 @@ * - truncateText() for long descriptions * * See: DataAPIContextAssembly spec, ADR-008 (text output path) + * + * **When to Use:** When rendering a ContextBundle as plain text for CLI output — use this instead of the markdown codec pipeline. */ import type { diff --git a/delivery-process/stubs/data-api-output-shaping/fuzzy-match.ts b/delivery-process/stubs/data-api-output-shaping/fuzzy-match.ts index 9a50ff6f..aac225d8 100644 --- a/delivery-process/stubs/data-api-output-shaping/fuzzy-match.ts +++ b/delivery-process/stubs/data-api-output-shaping/fuzzy-match.ts @@ -18,6 +18,8 @@ * - `pattern` subcommand: "Did you mean...?" fallback via findBestMatch() * * See: DataAPIOutputShaping spec, Rule 4 (Filtering and Search) + * + * **When to Use:** When resolving user-typed pattern names that may contain typos or partial matches. */ // --------------------------------------------------------------------------- diff --git a/delivery-process/stubs/data-api-output-shaping/output-pipeline.ts b/delivery-process/stubs/data-api-output-shaping/output-pipeline.ts index f18ba9be..d36398d0 100644 --- a/delivery-process/stubs/data-api-output-shaping/output-pipeline.ts +++ b/delivery-process/stubs/data-api-output-shaping/output-pipeline.ts @@ -22,6 +22,8 @@ * via a static PATTERN_ARRAY_METHODS set. * * See: DataAPIOutputShaping spec, Rule 2 (Output Modifiers), Rule 3 (Output Format) + * + * **When to Use:** When processing CLI query results that need output shaping via --names-only, --count, --fields, or --full modifiers. */ // --------------------------------------------------------------------------- diff --git a/delivery-process/stubs/data-api-output-shaping/summarize.ts b/delivery-process/stubs/data-api-output-shaping/summarize.ts index ad7fbde7..546e468a 100644 --- a/delivery-process/stubs/data-api-output-shaping/summarize.ts +++ b/delivery-process/stubs/data-api-output-shaping/summarize.ts @@ -17,6 +17,8 @@ * and PatternSummary is inferred from it. * * See: DataAPIOutputShaping spec, Rule 1 (Pattern Summarization) + * + * **When to Use:** When projecting full ExtractedPattern data down to compact summaries for list and overview queries. */ import { z } from 'zod'; diff --git a/delivery-process/stubs/data-api-stub-integration/stub-resolver.ts b/delivery-process/stubs/data-api-stub-integration/stub-resolver.ts index cf36b724..063ac9d4 100644 --- a/delivery-process/stubs/data-api-stub-integration/stub-resolver.ts +++ b/delivery-process/stubs/data-api-stub-integration/stub-resolver.ts @@ -21,6 +21,8 @@ * annotations. The callback enables testing without filesystem side effects. * * See: DataAPIStubIntegration spec, Rule 2 (Stubs Subcommand) + * + * **When to Use:** When querying design stub status via the `stubs` CLI subcommand or when checking stub resolution in scope validation. */ // --------------------------------------------------------------------------- diff --git a/dist/api/arch-queries.d.ts b/dist/api/arch-queries.d.ts deleted file mode 100644 index ac3f96e8..00000000 --- a/dist/api/arch-queries.d.ts +++ /dev/null @@ -1,93 +0,0 @@ -/** - * @libar-docs - * @libar-docs-pattern ArchQueriesImpl - * @libar-docs-status active - * @libar-docs-implements DataAPIArchitectureQueries - * @libar-docs-uses ProcessStateAPI, MasterDataset - * @libar-docs-used-by ProcessAPICLIImpl - * @libar-docs-arch-role service - * @libar-docs-arch-context api - * @libar-docs-arch-layer domain - * - * ## ArchQueries — Neighborhood, Comparison, Tags, Sources - * - * Pure functions over MasterDataset for deep architecture exploration. - * No I/O — all data comes from pre-computed views. - */ -import type { MasterDataset } from '../validation-schemas/master-dataset.js'; -import type { NeighborEntry } from './types.js'; -export interface NeighborhoodResult { - readonly pattern: string; - readonly context: string | undefined; - readonly role: string | undefined; - readonly layer: string | undefined; - readonly uses: readonly NeighborEntry[]; - readonly usedBy: readonly NeighborEntry[]; - readonly dependsOn: readonly NeighborEntry[]; - readonly enables: readonly NeighborEntry[]; - readonly sameContext: readonly NeighborEntry[]; - readonly implements: readonly string[]; - readonly implementedBy: readonly string[]; -} -export interface ContextSummary { - readonly name: string; - readonly patternCount: number; - readonly patterns: readonly string[]; - readonly allDependencies: readonly string[]; -} -export interface IntegrationPoint { - readonly from: string; - readonly fromContext: string; - readonly to: string; - readonly toContext: string; - readonly relationship: string; -} -export interface ContextComparison { - readonly context1: ContextSummary; - readonly context2: ContextSummary; - readonly sharedDependencies: readonly string[]; - readonly uniqueToContext1: readonly string[]; - readonly uniqueToContext2: readonly string[]; - readonly integrationPoints: readonly IntegrationPoint[]; -} -export interface TagValueCount { - readonly value: string; - readonly count: number; -} -export interface TagUsageEntry { - readonly tag: string; - readonly count: number; - readonly values: readonly TagValueCount[] | null; -} -export interface TagUsageReport { - readonly tags: readonly TagUsageEntry[]; - readonly patternCount: number; -} -export interface SourceTypeEntry { - readonly type: string; - readonly count: number; - readonly locationPattern: string; - readonly files: readonly string[]; -} -export interface SourceInventory { - readonly types: readonly SourceTypeEntry[]; - readonly totalFiles: number; -} -export declare function computeNeighborhood(name: string, dataset: MasterDataset): NeighborhoodResult | undefined; -export declare function compareContexts(ctx1: string, ctx2: string, dataset: MasterDataset): ContextComparison | undefined; -export declare function aggregateTagUsage(dataset: MasterDataset): TagUsageReport; -export declare function buildSourceInventory(dataset: MasterDataset): SourceInventory; -export interface OrphanEntry { - readonly pattern: string; - readonly status: string | undefined; - /** Empty string if pattern metadata is unavailable. */ - readonly file: string; -} -/** - * Find patterns with no relationships at all (isolated nodes in the graph). - * - * A pattern is an orphan if it has no uses, usedBy, dependsOn, enables, - * implementsPatterns, implementedBy, extendedBy, seeAlso, or extendsPattern. - */ -export declare function findOrphanPatterns(dataset: MasterDataset): readonly OrphanEntry[]; -//# sourceMappingURL=arch-queries.d.ts.map \ No newline at end of file diff --git a/dist/api/arch-queries.d.ts.map b/dist/api/arch-queries.d.ts.map deleted file mode 100644 index f06bade6..00000000 --- a/dist/api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IAC3C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAMD,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,aAAa,GACrB,kBAAkB,GAAG,SAAS,CAwChC;AA6DD,wBAAgB,eAAe,CAC7B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,aAAa,GACrB,iBAAiB,GAAG,SAAS,CAwD/B;AAMD,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,aAAa,GAAG,cAAc,CA0CxE;AA4BD,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,aAAa,GAAG,eAAe,CA4B5E;AAMD,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,uDAAuD;IACvD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,aAAa,GAAG,SAAS,WAAW,EAAE,CA6BjF"} \ No newline at end of file diff --git a/dist/api/arch-queries.js b/dist/api/arch-queries.js deleted file mode 100644 index 8c1f6118..00000000 --- a/dist/api/arch-queries.js +++ /dev/null @@ -1,308 +0,0 @@ -/** - * @libar-docs - * @libar-docs-pattern ArchQueriesImpl - * @libar-docs-status active - * @libar-docs-implements DataAPIArchitectureQueries - * @libar-docs-uses ProcessStateAPI, MasterDataset - * @libar-docs-used-by ProcessAPICLIImpl - * @libar-docs-arch-role service - * @libar-docs-arch-context api - * @libar-docs-arch-layer domain - * - * ## ArchQueries — Neighborhood, Comparison, Tags, Sources - * - * Pure functions over MasterDataset for deep architecture exploration. - * No I/O — all data comes from pre-computed views. - */ -import { getPatternName, findPatternByName, getRelationships } from './pattern-helpers.js'; -function resolveNeighborEntry(patterns, name) { - const p = findPatternByName(patterns, name); - return { - name, - status: p?.status, - archRole: p?.archRole, - archContext: p?.archContext, - file: p?.source.file, - }; -} -// --------------------------------------------------------------------------- -// computeNeighborhood -// --------------------------------------------------------------------------- -export function computeNeighborhood(name, dataset) { - const pattern = findPatternByName(dataset.patterns, name); - if (pattern === undefined) - return undefined; - const patternName = getPatternName(pattern); - const rels = getRelationships(dataset, patternName); - // Resolve relationship fields to NeighborEntry - const uses = (rels?.uses ?? []).map((n) => resolveNeighborEntry(dataset.patterns, n)); - const usedBy = (rels?.usedBy ?? []).map((n) => resolveNeighborEntry(dataset.patterns, n)); - const dependsOn = (rels?.dependsOn ?? []).map((n) => resolveNeighborEntry(dataset.patterns, n)); - const enables = (rels?.enables ?? []).map((n) => resolveNeighborEntry(dataset.patterns, n)); - // Same-context siblings - const ctx = pattern.archContext; - const sameContext = []; - if (ctx !== undefined && dataset.archIndex !== undefined) { - const contextPatterns = dataset.archIndex.byContext[ctx]; - if (contextPatterns !== undefined) { - for (const p of contextPatterns) { - if (getPatternName(p) !== patternName) { - sameContext.push(resolveNeighborEntry(dataset.patterns, getPatternName(p))); - } - } - } - } - return { - pattern: patternName, - context: pattern.archContext, - role: pattern.archRole, - layer: pattern.archLayer, - uses, - usedBy, - dependsOn, - enables, - sameContext, - implements: rels?.implementsPatterns ?? [], - implementedBy: (rels?.implementedBy ?? []).map((r) => r.name), - }; -} -// --------------------------------------------------------------------------- -// compareContexts -// --------------------------------------------------------------------------- -function aggregateContextDeps(contextPatterns, relationshipIndex) { - const deps = new Set(); - for (const p of contextPatterns) { - const name = getPatternName(p); - const rels = relationshipIndex?.[name]; - if (rels !== undefined) { - for (const u of rels.uses) - deps.add(u); - for (const d of rels.dependsOn) - deps.add(d); - } - } - return deps; -} -function findIntegrationPoints(ctx1Patterns, ctx1Name, ctx2PatternNames, ctx2Name, relationshipIndex) { - const points = []; - for (const p of ctx1Patterns) { - const name = getPatternName(p); - const rels = relationshipIndex?.[name]; - if (rels === undefined) - continue; - for (const target of rels.uses) { - if (ctx2PatternNames.has(target)) { - points.push({ - from: name, - fromContext: ctx1Name, - to: target, - toContext: ctx2Name, - relationship: 'uses', - }); - } - } - for (const target of rels.dependsOn) { - if (ctx2PatternNames.has(target)) { - points.push({ - from: name, - fromContext: ctx1Name, - to: target, - toContext: ctx2Name, - relationship: 'dependsOn', - }); - } - } - } - return points; -} -export function compareContexts(ctx1, ctx2, dataset) { - const archIndex = dataset.archIndex; - if (archIndex === undefined) - return undefined; - const ctx1Patterns = archIndex.byContext[ctx1]; - const ctx2Patterns = archIndex.byContext[ctx2]; - if (ctx1Patterns === undefined || ctx2Patterns === undefined) - return undefined; - const ctx1Names = ctx1Patterns.map(getPatternName); - const ctx2Names = ctx2Patterns.map(getPatternName); - const ctx2NameSet = new Set(ctx2Names); - const ctx1NameSet = new Set(ctx1Names); - const deps1 = aggregateContextDeps(ctx1Patterns, dataset.relationshipIndex); - const deps2 = aggregateContextDeps(ctx2Patterns, dataset.relationshipIndex); - const shared = []; - const uniqueTo1 = []; - for (const d of deps1) { - if (deps2.has(d)) { - shared.push(d); - } - else { - uniqueTo1.push(d); - } - } - const uniqueTo2 = []; - for (const d of deps2) { - if (!deps1.has(d)) { - uniqueTo2.push(d); - } - } - // Integration points: relationships crossing the context boundary - const integrationPoints = [ - ...findIntegrationPoints(ctx1Patterns, ctx1, ctx2NameSet, ctx2, dataset.relationshipIndex), - ...findIntegrationPoints(ctx2Patterns, ctx2, ctx1NameSet, ctx1, dataset.relationshipIndex), - ]; - return { - context1: { - name: ctx1, - patternCount: ctx1Patterns.length, - patterns: ctx1Names, - allDependencies: [...deps1], - }, - context2: { - name: ctx2, - patternCount: ctx2Patterns.length, - patterns: ctx2Names, - allDependencies: [...deps2], - }, - sharedDependencies: shared, - uniqueToContext1: uniqueTo1, - uniqueToContext2: uniqueTo2, - integrationPoints, - }; -} -// --------------------------------------------------------------------------- -// aggregateTagUsage -// --------------------------------------------------------------------------- -export function aggregateTagUsage(dataset) { - const tagMap = new Map(); - function increment(tag, value) { - let values = tagMap.get(tag); - if (values === undefined) { - values = new Map(); - tagMap.set(tag, values); - } - values.set(value, (values.get(value) ?? 0) + 1); - } - for (const p of dataset.patterns) { - // Always-present fields - if (p.status !== undefined) - increment('status', p.status); - increment('category', String(p.category)); - // Optional enum fields - if (p.archRole !== undefined) - increment('arch-role', p.archRole); - if (p.archContext !== undefined) - increment('arch-context', p.archContext); - if (p.archLayer !== undefined) - increment('arch-layer', p.archLayer); - // Optional value fields - if (p.phase !== undefined) - increment('phase', String(p.phase)); - if (p.priority !== undefined) - increment('priority', p.priority); - if (p.quarter !== undefined) - increment('quarter', p.quarter); - if (p.team !== undefined) - increment('team', p.team); - if (p.effort !== undefined) - increment('effort', p.effort); - } - // Convert to sorted entries - const tags = []; - for (const [tag, values] of tagMap) { - const totalCount = [...values.values()].reduce((a, b) => a + b, 0); - const valueCounts = [...values.entries()] - .map(([value, count]) => ({ value, count })) - .sort((a, b) => b.count - a.count); - tags.push({ tag, count: totalCount, values: valueCounts }); - } - tags.sort((a, b) => b.count - a.count); - return { tags, patternCount: dataset.patterns.length }; -} -// --------------------------------------------------------------------------- -// buildSourceInventory -// --------------------------------------------------------------------------- -function categorizeFile(filePath, pattern) { - if (filePath.includes('/stubs/')) - return 'Stubs'; - if (filePath.includes('/decisions/') || pattern.adr !== undefined) - return 'Decisions'; - if (filePath.endsWith('.feature')) - return 'Gherkin (features)'; - if (filePath.endsWith('.ts')) - return 'TypeScript (annotated)'; - return 'Other'; -} -function deriveLocationPattern(files) { - if (files.length === 0) - return ''; - // Find common prefix directory - const parts = files[0]?.split('/') ?? []; - let commonDepth = 0; - for (let i = 0; i < parts.length - 1; i++) { - if (files.some((f) => f.split('/')[i] !== parts[i])) - break; - commonDepth = i + 1; - } - const prefix = parts.slice(0, commonDepth).join('/'); - const ext = files[0]?.split('.').pop() ?? '*'; - return prefix !== '' ? `${prefix}/**/*.${ext}` : `**/*.${ext}`; -} -export function buildSourceInventory(dataset) { - const groupSets = new Map(); - for (const p of dataset.patterns) { - const filePath = p.source.file; - const type = categorizeFile(filePath, p); - let fileSet = groupSets.get(type); - if (fileSet === undefined) { - fileSet = new Set(); - groupSets.set(type, fileSet); - } - fileSet.add(filePath); - } - const types = []; - for (const [type, fileSet] of groupSets) { - const files = [...fileSet]; - types.push({ - type, - count: files.length, - locationPattern: deriveLocationPattern(files), - files, - }); - } - types.sort((a, b) => b.count - a.count); - const totalFiles = types.reduce((sum, t) => sum + t.count, 0); - return { types, totalFiles }; -} -/** - * Find patterns with no relationships at all (isolated nodes in the graph). - * - * A pattern is an orphan if it has no uses, usedBy, dependsOn, enables, - * implementsPatterns, implementedBy, extendedBy, seeAlso, or extendsPattern. - */ -export function findOrphanPatterns(dataset) { - const index = dataset.relationshipIndex; - if (index === undefined) - return []; - const orphans = []; - for (const [name, rels] of Object.entries(index)) { - const hasAny = rels.uses.length > 0 || - rels.usedBy.length > 0 || - rels.dependsOn.length > 0 || - rels.enables.length > 0 || - rels.implementsPatterns.length > 0 || - rels.implementedBy.length > 0 || - rels.extendedBy.length > 0 || - rels.seeAlso.length > 0 || - rels.extendsPattern !== undefined; - if (!hasAny) { - const p = findPatternByName(dataset.patterns, name); - orphans.push({ - pattern: name, - status: p?.status, - file: p?.source.file ?? '', - }); - } - } - return orphans; -} -//# sourceMappingURL=arch-queries.js.map \ No newline at end of file diff --git a/dist/api/arch-queries.js.map b/dist/api/arch-queries.js.map deleted file mode 100644 index e47c22dd..00000000 --- a/dist/api/arch-queries.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"arch-queries.js","sourceRoot":"","sources":["../../src/api/arch-queries.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AASH,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE3F,SAAS,oBAAoB,CAAC,QAAqC,EAAE,IAAY;IAC/E,MAAM,CAAC,GAAG,iBAAiB,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IAC5C,OAA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dist/api/context-assembler.d.ts b/dist/api/context-assembler.d.ts deleted file mode 100644 index 2e004183..00000000 --- a/dist/api/context-assembler.d.ts +++ /dev/null @@ -1,122 +0,0 @@ -/** - * @libar-docs - * @libar-docs-pattern ContextAssemblerImpl - * @libar-docs-status active - * @libar-docs-implements DataAPIContextAssembly - * @libar-docs-uses ProcessStateAPI, MasterDataset, PatternSummarizerImpl, FuzzyMatcherImpl, StubResolverImpl - * @libar-docs-used-by ProcessAPICLIImpl, ContextFormatterImpl - * @libar-docs-arch-role service - * @libar-docs-arch-context api - * @libar-docs-arch-layer application - * - * ## ContextAssembler — Session-Oriented Context Bundle Builder - * - * Pure function composition over MasterDataset. Reads from 5 pre-computed - * views (patterns, relationshipIndex, archIndex, deliverables, FSM) and - * assembles them into a ContextBundle tailored to the session type. - * - * The assembler does NOT format output. It produces structured data that - * the ContextFormatter renders as plain text (see ADR-008). - */ -import type { ProcessStateAPI } from './process-state.js'; -import type { MasterDataset } from '../validation-schemas/master-dataset.js'; -import { type DeliverableStatus } from '../taxonomy/index.js'; -import type { NeighborEntry } from './types.js'; -export type SessionType = 'planning' | 'design' | 'implement'; -export declare function isValidSessionType(value: string): value is SessionType; -export interface ContextOptions { - readonly patterns: readonly string[]; - readonly sessionType: SessionType; - readonly baseDir: string; -} -export interface DepTreeOptions { - readonly pattern: string; - readonly maxDepth: number; - readonly includeImplementationDeps: boolean; -} -export interface PatternContextMeta { - readonly name: string; - readonly status: string | undefined; - readonly phase: number | undefined; - readonly category: string; - readonly file: string; - readonly summary: string; -} -export interface StubRef { - readonly stubFile: string; - readonly targetPath: string; - readonly name: string; -} -export interface DepEntry { - readonly name: string; - readonly status: string | undefined; - readonly file: string; - readonly kind: 'planning' | 'implementation'; -} -export interface DeliverableEntry { - readonly name: string; - readonly status: DeliverableStatus; - readonly location: string; -} -export interface FsmContext { - readonly currentStatus: string; - readonly validTransitions: readonly string[]; - readonly protectionLevel: 'none' | 'scope' | 'hard'; -} -export interface ContextBundle { - readonly patterns: readonly string[]; - readonly sessionType: SessionType; - readonly metadata: readonly PatternContextMeta[]; - readonly specFiles: readonly string[]; - readonly stubs: readonly StubRef[]; - readonly dependencies: readonly DepEntry[]; - readonly sharedDependencies: readonly string[]; - readonly consumers: readonly DepEntry[]; - readonly architectureNeighbors: readonly NeighborEntry[]; - readonly deliverables: readonly DeliverableEntry[]; - readonly fsm: FsmContext | undefined; - readonly testFiles: readonly string[]; -} -export interface DepTreeNode { - readonly name: string; - readonly status: string | undefined; - readonly phase: number | undefined; - readonly isFocal: boolean; - readonly truncated: boolean; - readonly children: readonly DepTreeNode[]; -} -export interface FileReadingList { - readonly pattern: string; - readonly primary: readonly string[]; - readonly completedDeps: readonly string[]; - readonly roadmapDeps: readonly string[]; - readonly architectureNeighbors: readonly string[]; -} -export interface ProgressSummary { - readonly total: number; - readonly completed: number; - readonly active: number; - readonly planned: number; - readonly percentage: number; -} -export interface ActivePhaseSummary { - readonly phase: number; - readonly name: string | undefined; - readonly patternCount: number; - readonly activeCount: number; -} -export interface BlockingEntry { - readonly pattern: string; - readonly status: string | undefined; - readonly blockedBy: readonly string[]; -} -export interface OverviewSummary { - readonly progress: ProgressSummary; - readonly activePhases: readonly ActivePhaseSummary[]; - readonly blocking: readonly BlockingEntry[]; -} -export declare function assembleContext(dataset: MasterDataset, api: ProcessStateAPI, options: ContextOptions): ContextBundle; -export declare function buildDepTree(dataset: MasterDataset, options: DepTreeOptions): DepTreeNode; -export declare function buildFileReadingList(dataset: MasterDataset, patternName: string, includeRelated: boolean): FileReadingList; -export declare function buildOverview(dataset: MasterDataset): OverviewSummary; -//# sourceMappingURL=context-assembler.d.ts.map \ No newline at end of file diff --git a/dist/api/context-assembler.d.ts.map b/dist/api/context-assembler.d.ts.map deleted file mode 100644 index f08523d5..00000000 --- a/dist/api/context-assembler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"context-assembler.d.ts","sourceRoot":"","sources":["../../src/api/context-assembler.ts"],"names":[],"mappings":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,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;CACvC;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC;IACnC,QAAQ,CAAC,YAAY,EAAE,SAAS,kBAAkB,EAAE,CAAC;IACrD,QAAQ,CAAC,QAAQ,EAAE,SAAS,aAAa,EAAE,CAAC;CAC7C;AA+GD,wBAAgB,eAAe,CAC7B,OAAO,EAAE,aAAa,EACtB,GAAG,EAAE,eAAe,EACpB,OAAO,EAAE,cAAc,GACtB,aAAa,CA2If;AAMD,wBAAgB,YAAY,CAAC,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,cAAc,GAAG,WAAW,CAkBzF;AAmHD,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,aAAa,EACtB,WAAW,EAAE,MAAM,EACnB,cAAc,EAAE,OAAO,GACtB,eAAe,CAoEjB;AAMD,wBAAgB,aAAa,CAAC,OAAO,EAAE,aAAa,GAAG,eAAe,CAiDrE"} \ No newline at end of file diff --git a/dist/api/context-assembler.js b/dist/api/context-assembler.js deleted file mode 100644 index 952ecf72..00000000 --- a/dist/api/context-assembler.js +++ /dev/null @@ -1,470 +0,0 @@ -/** - * @libar-docs - * @libar-docs-pattern ContextAssemblerImpl - * @libar-docs-status active - * @libar-docs-implements DataAPIContextAssembly - * @libar-docs-uses ProcessStateAPI, MasterDataset, PatternSummarizerImpl, FuzzyMatcherImpl, StubResolverImpl - * @libar-docs-used-by ProcessAPICLIImpl, ContextFormatterImpl - * @libar-docs-arch-role service - * @libar-docs-arch-context api - * @libar-docs-arch-layer application - * - * ## ContextAssembler — Session-Oriented Context Bundle Builder - * - * Pure function composition over MasterDataset. Reads from 5 pre-computed - * views (patterns, relationshipIndex, archIndex, deliverables, FSM) and - * assembles them into a ContextBundle tailored to the session type. - * - * The assembler does NOT format output. It produces structured data that - * the ContextFormatter renders as plain text (see ADR-008). - */ -import { VALID_PROCESS_STATUS_SET, } from '../taxonomy/index.js'; -import { isPatternComplete } from '../taxonomy/normalized-status.js'; -import { QueryApiError } from './types.js'; -import { findBestMatch } from './fuzzy-match.js'; -import { extractDescription } from '../utils/string-utils.js'; -import { getPatternName, findPatternByName as findPatternByNameFromList, getRelationships, allPatternNames, } from './pattern-helpers.js'; -const VALID_SESSION_TYPES = ['planning', 'design', 'implement']; -const VALID_STATUSES = VALID_PROCESS_STATUS_SET; -export function isValidSessionType(value) { - return VALID_SESSION_TYPES.includes(value); -} -// --------------------------------------------------------------------------- -// Internal Helpers -// --------------------------------------------------------------------------- -/** - * Find a pattern by name or throw QueryApiError with a fuzzy suggestion. - */ -function requirePattern(dataset, name) { - const pattern = findPatternByNameFromList(dataset.patterns, name); - if (pattern !== undefined) - return pattern; - const allNames = allPatternNames(dataset); - const best = findBestMatch(name, [...allNames]); - const suggestion = best !== undefined ? `\nDid you mean: ${best.patternName}?` : ''; - throw new QueryApiError('PATTERN_NOT_FOUND', `Pattern not found: "${name}"${suggestion}`); -} -function resolveDepEntry(dataset, depName, kind) { - const pattern = findPatternByNameFromList(dataset.patterns, depName); - return { - name: depName, - status: pattern?.status, - file: pattern?.source.file ?? '', - kind, - }; -} -function buildMetadata(pattern) { - return { - name: getPatternName(pattern), - status: pattern.status, - phase: pattern.phase, - category: pattern.category, - file: pattern.source.file, - summary: extractDescription(pattern.directive.description), - }; -} -function resolveStubRefs(dataset, patternName) { - const rels = getRelationships(dataset, patternName); - if (rels === undefined) - return []; - return rels.implementedBy - .filter((ref) => ref.file.includes('/stubs/')) - .map((ref) => ({ - stubFile: ref.file, - targetPath: findPatternByNameFromList(dataset.patterns, ref.name)?.targetPath ?? '', - name: ref.name, - })); -} -function resolveArchNeighbors(dataset, pattern, focalNames) { - const ctx = pattern.archContext; - if (ctx === undefined || dataset.archIndex === undefined) - return []; - const contextPatterns = dataset.archIndex.byContext[ctx]; - if (contextPatterns === undefined) - return []; - return contextPatterns - .filter((p) => !focalNames.has(getPatternName(p))) - .map((p) => ({ - name: getPatternName(p), - status: p.status, - archRole: p.archRole, - archContext: p.archContext, - file: p.source.file, - })); -} -function resolveDeliverables(api, patternName) { - const deliverables = api.getPatternDeliverables(patternName); - return deliverables.map((d) => ({ - name: d.name, - status: d.status, - location: d.location, - })); -} -function resolveFsm(api, status) { - if (status === undefined) - return undefined; - if (!VALID_STATUSES.has(status)) - return undefined; - const validStatus = status; - const transitions = api.getValidTransitionsFrom(validStatus); - const protection = api.getProtectionInfo(validStatus); - return { - currentStatus: status, - validTransitions: transitions, - protectionLevel: protection.level, - }; -} -function resolveTestFiles(pattern) { - return pattern.behaviorFile !== undefined ? [pattern.behaviorFile] : []; -} -// --------------------------------------------------------------------------- -// assembleContext -// --------------------------------------------------------------------------- -export function assembleContext(dataset, api, options) { - const { patterns: patternNames, sessionType } = options; - if (patternNames.length === 0) { - return emptyBundle([], sessionType); - } - // Resolve all focal patterns - const focalPatterns = []; - for (const name of patternNames) { - focalPatterns.push(requirePattern(dataset, name)); - } - const focalNameSet = new Set(focalPatterns.map(getPatternName)); - // Collect per-pattern data - const allMetadata = []; - const allSpecFiles = []; - const allStubs = []; - const perPatternDeps = new Map(); - const allConsumers = []; - const allNeighbors = []; - const allDeliverables = []; - const allTestFiles = []; - let fsm; - for (const pattern of focalPatterns) { - const name = getPatternName(pattern); - const rels = getRelationships(dataset, name); - // Metadata (all session types) - allMetadata.push(buildMetadata(pattern)); - // Spec files (design, implement) - if (sessionType === 'design' || sessionType === 'implement') { - if (pattern.source.file.endsWith('.feature')) { - allSpecFiles.push(pattern.source.file); - } - } - // Stubs (design only) - if (sessionType === 'design') { - allStubs.push(...resolveStubRefs(dataset, name)); - } - // Dependencies (all session types) - const deps = []; - if (rels !== undefined) { - for (const dep of rels.dependsOn) { - deps.push(resolveDepEntry(dataset, dep, 'planning')); - } - if (sessionType === 'design') { - for (const dep of rels.uses) { - if (!deps.some((d) => d.name === dep)) { - deps.push(resolveDepEntry(dataset, dep, 'implementation')); - } - } - } - } - perPatternDeps.set(name, deps); - // Consumers (design only) - if (sessionType === 'design' && rels !== undefined) { - for (const consumer of rels.usedBy) { - if (!allConsumers.some((c) => c.name === consumer)) { - allConsumers.push(resolveDepEntry(dataset, consumer, 'implementation')); - } - } - for (const consumer of rels.enables) { - if (!allConsumers.some((c) => c.name === consumer)) { - allConsumers.push(resolveDepEntry(dataset, consumer, 'planning')); - } - } - } - // Architecture neighbors (design only) - if (sessionType === 'design') { - const neighbors = resolveArchNeighbors(dataset, pattern, focalNameSet); - for (const n of neighbors) { - if (!allNeighbors.some((existing) => existing.name === n.name)) { - allNeighbors.push(n); - } - } - } - // Deliverables (design + implement) - if (sessionType === 'design' || sessionType === 'implement') { - allDeliverables.push(...resolveDeliverables(api, name)); - } - // FSM and test files (implement only) - if (sessionType === 'implement') { - fsm = resolveFsm(api, pattern.status); - allTestFiles.push(...resolveTestFiles(pattern)); - } - } - // Compute shared dependencies for multi-pattern context - const sharedDependencies = []; - if (patternNames.length > 1) { - const depCounts = new Map(); - for (const deps of perPatternDeps.values()) { - for (const dep of deps) { - depCounts.set(dep.name, (depCounts.get(dep.name) ?? 0) + 1); - } - } - for (const [depName, count] of depCounts) { - if (count > 1) { - sharedDependencies.push(depName); - } - } - } - // Flatten all deps (dedup by name) - const allDeps = []; - const seenDeps = new Set(); - for (const deps of perPatternDeps.values()) { - for (const dep of deps) { - if (!seenDeps.has(dep.name)) { - seenDeps.add(dep.name); - allDeps.push(dep); - } - } - } - return { - patterns: [...patternNames], - sessionType, - metadata: allMetadata, - specFiles: allSpecFiles, - stubs: allStubs, - dependencies: allDeps, - sharedDependencies, - consumers: allConsumers, - architectureNeighbors: allNeighbors, - deliverables: allDeliverables, - fsm, - testFiles: allTestFiles, - }; -} -// --------------------------------------------------------------------------- -// buildDepTree -// --------------------------------------------------------------------------- -export function buildDepTree(dataset, options) { - const { pattern: focalName, maxDepth, includeImplementationDeps } = options; - requirePattern(dataset, focalName); - // Find the root of the dependency chain by walking up - const rootName = findDepTreeRoot(dataset, focalName, includeImplementationDeps); - const visited = new Set(); - return buildTreeNode(dataset, rootName, focalName, 0, maxDepth, includeImplementationDeps, visited); -} -function findDepTreeRoot(dataset, focalName, includeImplementationDeps) { - // Walk up dependsOn/enables chains to find the root ancestor - const visited = new Set(); - let current = focalName; - for (;;) { - visited.add(current); - const rels = getRelationships(dataset, current); - if (rels === undefined) - break; - const parents = rels.dependsOn; - const implParents = includeImplementationDeps ? rels.uses : []; - const allParents = [...parents, ...implParents]; - const unvisitedParent = allParents.find((p) => !visited.has(p) && findPatternByNameFromList(dataset.patterns, p) !== undefined); - if (unvisitedParent === undefined) - break; - current = unvisitedParent; - } - return current; -} -function buildTreeNode(dataset, name, focalName, depth, maxDepth, includeImplementationDeps, visited) { - const pattern = findPatternByNameFromList(dataset.patterns, name); - const isFocal = name.toLowerCase() === focalName.toLowerCase(); - if (visited.has(name)) { - return { - name, - status: pattern?.status, - phase: pattern?.phase, - isFocal, - truncated: false, - children: [], // cycle detected — don't recurse - }; - } - visited.add(name); - if (depth >= maxDepth) { - // Check if there would be children - const rels = getRelationships(dataset, name); - const hasChildren = rels !== undefined && - (rels.enables.length > 0 || (includeImplementationDeps && rels.usedBy.length > 0)); - return { - name, - status: pattern?.status, - phase: pattern?.phase, - isFocal, - truncated: hasChildren, - children: [], - }; - } - // Get children: patterns that depend on this one (enables) or use this (usedBy) - const rels = getRelationships(dataset, name); - const childNames = []; - if (rels !== undefined) { - childNames.push(...rels.enables); - if (includeImplementationDeps) { - for (const used of rels.usedBy) { - if (!childNames.includes(used)) { - childNames.push(used); - } - } - } - } - // Filter to children that actually exist in the dataset - const children = childNames - .filter((childName) => findPatternByNameFromList(dataset.patterns, childName) !== undefined) - .map((childName) => buildTreeNode(dataset, childName, focalName, depth + 1, maxDepth, includeImplementationDeps, visited)); - return { - name, - status: pattern?.status, - phase: pattern?.phase, - isFocal, - truncated: false, - children, - }; -} -// --------------------------------------------------------------------------- -// buildFileReadingList -// --------------------------------------------------------------------------- -export function buildFileReadingList(dataset, patternName, includeRelated) { - const pattern = requirePattern(dataset, patternName); - const name = getPatternName(pattern); - // Primary: spec file + stub files - const primary = [pattern.source.file]; - const stubRefs = resolveStubRefs(dataset, name); - for (const stub of stubRefs) { - primary.push(stub.stubFile); - } - if (!includeRelated) { - return { - pattern: name, - primary, - completedDeps: [], - roadmapDeps: [], - architectureNeighbors: [], - }; - } - // Related: completed deps, roadmap deps, arch neighbors - const completedDeps = []; - const roadmapDeps = []; - const architectureNeighbors = []; - const rels = getRelationships(dataset, name); - if (rels !== undefined) { - for (const depName of rels.dependsOn) { - const depPattern = findPatternByNameFromList(dataset.patterns, depName); - if (depPattern === undefined) - continue; - if (isPatternComplete(depPattern.status)) { - completedDeps.push(depPattern.source.file); - // Include implementation files for completed dependencies - const depRels = getRelationships(dataset, depName); - if (depRels !== undefined) { - for (const implRef of depRels.implementedBy) { - if (!completedDeps.includes(implRef.file)) { - completedDeps.push(implRef.file); - } - } - } - } - else { - roadmapDeps.push(depPattern.source.file); - } - } - } - // Architecture neighbors - const ctx = pattern.archContext; - if (ctx !== undefined && dataset.archIndex !== undefined) { - const contextPatterns = dataset.archIndex.byContext[ctx]; - if (contextPatterns !== undefined) { - for (const p of contextPatterns) { - if (getPatternName(p) !== name) { - architectureNeighbors.push(p.source.file); - } - } - } - } - return { - pattern: name, - primary, - completedDeps, - roadmapDeps, - architectureNeighbors, - }; -} -// --------------------------------------------------------------------------- -// buildOverview -// --------------------------------------------------------------------------- -export function buildOverview(dataset) { - const { counts } = dataset; - const total = counts.total; - const percentage = total > 0 ? Math.round((counts.completed / total) * 100) : 0; - const progress = { - total, - completed: counts.completed, - active: counts.active, - planned: counts.planned, - percentage, - }; - // Active phases: phases with active patterns - const activePhases = []; - for (const group of dataset.byPhase) { - if (group.counts.active > 0) { - activePhases.push({ - phase: group.phaseNumber, - name: group.phaseName, - patternCount: group.patterns.length, - activeCount: group.counts.active, - }); - } - } - // Blocking: patterns with incomplete dependencies - const blocking = []; - for (const pattern of dataset.patterns) { - if (isPatternComplete(pattern.status)) - continue; - const name = getPatternName(pattern); - const rels = getRelationships(dataset, name); - if (rels === undefined) - continue; - const incompleteDeps = rels.dependsOn.filter((depName) => { - const depPattern = findPatternByNameFromList(dataset.patterns, depName); - return depPattern !== undefined && !isPatternComplete(depPattern.status); - }); - if (incompleteDeps.length > 0) { - blocking.push({ - pattern: name, - status: pattern.status, - blockedBy: incompleteDeps, - }); - } - } - return { progress, activePhases, blocking }; -} -// --------------------------------------------------------------------------- -// Error Type -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// Helpers -// --------------------------------------------------------------------------- -function emptyBundle(patterns, sessionType) { - return { - patterns, - sessionType, - metadata: [], - specFiles: [], - stubs: [], - dependencies: [], - sharedDependencies: [], - consumers: [], - architectureNeighbors: [], - deliverables: [], - fsm: undefined, - testFiles: [], - }; -} -//# sourceMappingURL=context-assembler.js.map \ No newline at end of file diff --git a/dist/api/context-assembler.js.map b/dist/api/context-assembler.js.map deleted file mode 100644 index 87cd9ed1..00000000 --- a/dist/api/context-assembler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"context-assembler.js","sourceRoot":"","sources":["../../src/api/context-assembler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAKH,OAAO,EACL,wBAAwB,GAGzB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAErE,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EACL,cAAc,EACd,iBAAiB,IAAI,yBAAyB,EAC9C,gBAAgB,EAChB,eAAe,GAChB,MAAM,sBAAsB,CAAC;AAQ9B,MA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,IAAI,IAAI,KAAK,SAAS;YAAE,SAAS;QAEjC,MAAM,cAAc,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE;YACvD,MAAM,UAAU,GAAG,yBAAyB,CAAC,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;YACxE,OAAO,UAAU,KAAK,SAAS,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAC3E,CAAC,CAAC,CAAC;QAEH,IAAI,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC9B,QAAQ,CAAC,IAAI,CAAC;gBACZ,OAAO,EAAE,IAAI;gBACb,MAAM,EAAE,OAAO,CAAC,MAAM;gBACtB,SAAS,EAAE,cAAc;aAC1B,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,CAAC;AAC9C,CAAC;AAED,8EAA8E;AAC9E,aAAa;AACb,8EAA8E;AAE9E,8EAA8E;AAC9E,UAAU;AACV,8EAA8E;AAE9E,SAAS,WAAW,CAAC,QAA2B,EAAE,WAAwB;IACxE,OAAO;QACL,QAAQ;QACR,WAAW;QACX,QAAQ,EAAE,EAAE;QACZ,SAAS,EAAE,EAAE;QACb,KAAK,EAAE,EAAE;QACT,YAAY,EAAE,EAAE;QAChB,kBAAkB,EAAE,EAAE;QACtB,SAAS,EAAE,EAAE;QACb,qBAAqB,EAAE,EAAE;QACzB,YAAY,EAAE,EAAE;QAChB,GAAG,EAAE,SAAS;QACd,SAAS,EAAE,EAAE;KACd,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/dist/api/context-formatter.d.ts b/dist/api/context-formatter.d.ts deleted file mode 100644 index 285df596..00000000 --- a/dist/api/context-formatter.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @libar-docs - * @libar-docs-pattern ContextFormatterImpl - * @libar-docs-status active - * @libar-docs-implements DataAPIContextAssembly - * @libar-docs-uses ContextAssemblerImpl - * @libar-docs-used-by ProcessAPICLIImpl - * @libar-docs-arch-role service - * @libar-docs-arch-context api - * @libar-docs-arch-layer application - * - * ## ContextFormatter — Plain Text Renderer for Context Bundles - * - * First plain-text formatter in the codebase. All other rendering goes - * through the Codec/RenderableDocument/UniversalRenderer markdown pipeline. - * Context bundles are rendered as compact structured text with === section - * markers for easy AI parsing (see ADR-008). - */ -import type { ContextBundle, DepTreeNode, FileReadingList, OverviewSummary } from './context-assembler.js'; -export declare function formatContextBundle(bundle: ContextBundle): string; -export declare function formatDepTree(tree: DepTreeNode): string; -export declare function formatFileReadingList(list: FileReadingList): string; -export declare function formatOverview(overview: OverviewSummary): string; -//# sourceMappingURL=context-formatter.d.ts.map \ No newline at end of file diff --git a/dist/api/context-formatter.d.ts.map b/dist/api/context-formatter.d.ts.map deleted file mode 100644 index 34dbd99a..00000000 --- a/dist/api/context-formatter.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"context-formatter.d.ts","sourceRoot":"","sources":["../../src/api/context-formatter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EACV,aAAa,EACb,WAAW,EACX,eAAe,EACf,eAAe,EAChB,MAAM,wBAAwB,CAAC;AAOhC,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,CA0FjE;AAMD,wBAAgB,aAAa,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,CAIvD;AAyBD,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,eAAe,GAAG,MAAM,CAoBnE;AAMD,wBAAgB,cAAc,CAAC,QAAQ,EAAE,eAAe,GAAG,MAAM,CA0BhE"} \ No newline at end of file diff --git a/dist/api/context-formatter.js b/dist/api/context-formatter.js deleted file mode 100644 index d20f7983..00000000 --- a/dist/api/context-formatter.js +++ /dev/null @@ -1,167 +0,0 @@ -/** - * @libar-docs - * @libar-docs-pattern ContextFormatterImpl - * @libar-docs-status active - * @libar-docs-implements DataAPIContextAssembly - * @libar-docs-uses ContextAssemblerImpl - * @libar-docs-used-by ProcessAPICLIImpl - * @libar-docs-arch-role service - * @libar-docs-arch-context api - * @libar-docs-arch-layer application - * - * ## ContextFormatter — Plain Text Renderer for Context Bundles - * - * First plain-text formatter in the codebase. All other rendering goes - * through the Codec/RenderableDocument/UniversalRenderer markdown pipeline. - * Context bundles are rendered as compact structured text with === section - * markers for easy AI parsing (see ADR-008). - */ -import { isDeliverableStatusComplete } from '../taxonomy/deliverable-status.js'; -// --------------------------------------------------------------------------- -// Bundle Formatter -// --------------------------------------------------------------------------- -export function formatContextBundle(bundle) { - const sections = []; - // Metadata (always present) - for (const meta of bundle.metadata) { - const parts = []; - if (meta.status !== undefined) - parts.push(`Status: ${meta.status}`); - if (meta.phase !== undefined) - parts.push(`Phase: ${String(meta.phase)}`); - parts.push(`Category: ${meta.category}`); - sections.push(`=== PATTERN: ${meta.name} ===\n` + - `${parts.join(' | ')}\n` + - (meta.summary !== '' ? `${meta.summary}\n` : '') + - `File: ${meta.file}`); - } - // Spec files - if (bundle.specFiles.length > 0) { - sections.push('=== SPEC ===\n' + bundle.specFiles.join('\n')); - } - // Stubs - if (bundle.stubs.length > 0) { - const lines = bundle.stubs.map((s) => s.targetPath !== '' ? `${s.stubFile} -> ${s.targetPath}` : s.stubFile); - sections.push('=== STUBS ===\n' + lines.join('\n')); - } - // Dependencies - if (bundle.dependencies.length > 0) { - const lines = bundle.dependencies.map((d) => { - const status = d.status !== undefined ? `[${d.status}]` : '[unknown]'; - const filePart = d.file !== '' ? ` ${d.file}` : ''; - return `${status} ${d.name} (${d.kind})${filePart}`; - }); - let header = '=== DEPENDENCIES ==='; - if (bundle.sharedDependencies.length > 0) { - header += `\nShared: ${bundle.sharedDependencies.join(', ')}`; - } - sections.push(header + '\n' + lines.join('\n')); - } - // Consumers - if (bundle.consumers.length > 0) { - const lines = bundle.consumers.map((c) => { - const status = c.status ?? 'unknown'; - return `${c.name} (${status})`; - }); - sections.push('=== CONSUMERS ===\n' + lines.join('\n')); - } - // Architecture neighbors - if (bundle.architectureNeighbors.length > 0) { - const ctx = bundle.architectureNeighbors[0]?.archContext ?? 'unknown'; - const lines = bundle.architectureNeighbors.map((n) => { - const status = n.status ?? 'unknown'; - const role = n.archRole !== undefined ? `, ${n.archRole}` : ''; - return `${n.name} (${status}${role})`; - }); - sections.push(`=== ARCHITECTURE (context: ${ctx}) ===\n` + lines.join('\n')); - } - // Deliverables - if (bundle.deliverables.length > 0) { - const lines = bundle.deliverables.map((d) => { - const checkbox = isDeliverableStatusComplete(d.status) ? '[x]' : '[ ]'; - return `${checkbox} ${d.name} (${d.location})`; - }); - sections.push('=== DELIVERABLES ===\n' + lines.join('\n')); - } - // FSM - if (bundle.fsm !== undefined) { - const transitions = bundle.fsm.validTransitions.length > 0 ? bundle.fsm.validTransitions.join(', ') : 'none'; - sections.push('=== FSM ===\n' + - `Status: ${bundle.fsm.currentStatus} | Transitions: ${transitions} | Protection: ${bundle.fsm.protectionLevel}`); - } - // Test files - if (bundle.testFiles.length > 0) { - sections.push('=== TEST FILES ===\n' + bundle.testFiles.join('\n')); - } - return sections.join('\n\n') + '\n'; -} -// --------------------------------------------------------------------------- -// Dep-Tree Formatter -// --------------------------------------------------------------------------- -export function formatDepTree(tree) { - const lines = []; - renderTreeNode(tree, 0, lines); - return lines.join('\n') + '\n'; -} -function renderTreeNode(node, depth, lines) { - const indent = depth > 0 ? ' '.repeat(depth) + '-> ' : ''; - const phase = node.phase !== undefined ? `${String(node.phase)}, ` : ''; - const status = node.status ?? 'unknown'; - const focal = node.isFocal ? ' <- YOU ARE HERE' : ''; - lines.push(`${indent}${node.name} (${phase}${status})${focal}`); - if (node.truncated) { - const truncIndent = ' '.repeat(depth + 1) + '-> '; - lines.push(`${truncIndent}... (depth limit reached)`); - return; - } - for (const child of node.children) { - renderTreeNode(child, depth + 1, lines); - } -} -// --------------------------------------------------------------------------- -// File Reading List Formatter -// --------------------------------------------------------------------------- -export function formatFileReadingList(list) { - const sections = []; - if (list.primary.length > 0) { - sections.push('=== PRIMARY ===\n' + list.primary.join('\n')); - } - if (list.completedDeps.length > 0) { - sections.push('=== COMPLETED DEPENDENCIES ===\n' + list.completedDeps.join('\n')); - } - if (list.roadmapDeps.length > 0) { - sections.push('=== ROADMAP DEPENDENCIES ===\n' + list.roadmapDeps.join('\n')); - } - if (list.architectureNeighbors.length > 0) { - sections.push('=== ARCHITECTURE NEIGHBORS ===\n' + list.architectureNeighbors.join('\n')); - } - return sections.join('\n\n') + '\n'; -} -// --------------------------------------------------------------------------- -// Overview Formatter -// --------------------------------------------------------------------------- -export function formatOverview(overview) { - const sections = []; - const { progress } = overview; - sections.push('=== PROGRESS ===\n' + - `${String(progress.total)} patterns (${String(progress.completed)} completed, ${String(progress.active)} active, ${String(progress.planned)} planned) = ${String(progress.percentage)}%`); - if (overview.activePhases.length > 0) { - const lines = overview.activePhases.map((p) => { - const name = p.name !== undefined ? `: ${p.name}` : ''; - return `Phase ${String(p.phase)}${name} (${String(p.activeCount)} active)`; - }); - sections.push('=== ACTIVE PHASES ===\n' + lines.join('\n')); - } - if (overview.blocking.length > 0) { - const lines = overview.blocking.map((b) => { - const blockers = b.blockedBy.join(', '); - return `${b.pattern} blocked by: ${blockers}`; - }); - sections.push('=== BLOCKING ===\n' + lines.join('\n')); - } - return sections.join('\n\n') + '\n'; -} -// --------------------------------------------------------------------------- -// Helpers -// --------------------------------------------------------------------------- -//# sourceMappingURL=context-formatter.js.map \ No newline at end of file diff --git a/dist/api/context-formatter.js.map b/dist/api/context-formatter.js.map deleted file mode 100644 index e57a7157..00000000 --- a/dist/api/context-formatter.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"context-formatter.js","sourceRoot":"","sources":["../../src/api/context-formatter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAQH,OAAO,EAAE,2BAA2B,EAAE,MAAM,mC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,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;YAC5C,MAAM,IAAI,GAAG,CAAC,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACvD,OAAO,SAAS,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC;QAC7E,CAAC,CAAC,CAAC;QACH,QAAQ,CAAC,IAAI,CAAC,yBAAyB,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC9D,CAAC;IAED,IAAI,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACjC,MAAM,KAAK,GAAG,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;YACxC,MAAM,QAAQ,GAAG,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACxC,OAAO,GAAG,CAAC,CAAC,OAAO,gBAAgB,QAAQ,EAAE,CAAC;QAChD,CAAC,CAAC,CAAC;QACH,QAAQ,CAAC,IAAI,CAAC,oBAAoB,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACzD,CAAC;IAED,OAAO,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;AACtC,CAAC;AAED,8EAA8E;AAC9E,UAAU;AACV,8EAA8E"} \ No newline at end of file diff --git a/dist/api/coverage-analyzer.d.ts b/dist/api/coverage-analyzer.d.ts deleted file mode 100644 index 48172fca..00000000 --- a/dist/api/coverage-analyzer.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -/** - * @libar-docs - * @libar-docs-pattern CoverageAnalyzerImpl - * @libar-docs-status active - * @libar-docs-implements DataAPIArchitectureQueries - * @libar-docs-uses Pattern Scanner, MasterDataset - * @libar-docs-used-by ProcessAPICLIImpl - * @libar-docs-arch-role service - * @libar-docs-arch-context api - * @libar-docs-arch-layer application - * - * ## CoverageAnalyzer — Annotation Coverage and Taxonomy Gap Detection - * - * Reports annotation completeness by comparing scannable files (from glob) - * against annotated patterns in MasterDataset. Uses independent glob via - * findFilesToScan() — cheap (~1ms) and avoids changing buildPipeline(). - */ -import type { MasterDataset } from '../validation-schemas/master-dataset.js'; -import type { TagRegistry } from '../validation-schemas/tag-registry.js'; -export interface UnusedTaxonomyReport { - readonly unusedCategories: readonly string[]; - readonly unusedRoles: readonly string[]; - readonly unusedLayers: readonly string[]; - readonly unusedStatuses: readonly string[]; -} -export interface CoverageReport { - readonly annotatedFileCount: number; - readonly totalScannableFiles: number; - readonly coveragePercentage: number; - readonly unannotatedFiles: readonly string[]; - readonly unusedTaxonomy: UnusedTaxonomyReport; -} -export declare function findUnusedTaxonomy(dataset: MasterDataset, registry: TagRegistry): UnusedTaxonomyReport; -export declare function findUnannotatedFiles(inputGlobs: readonly string[], baseDir: string, registry: TagRegistry, pathFilter?: string): Promise; -export declare function analyzeCoverage(dataset: MasterDataset, inputGlobs: readonly string[], baseDir: string, registry: TagRegistry): Promise; -//# sourceMappingURL=coverage-analyzer.d.ts.map \ No newline at end of file diff --git a/dist/api/coverage-analyzer.d.ts.map b/dist/api/coverage-analyzer.d.ts.map deleted file mode 100644 index 797bcae8..00000000 --- a/dist/api/coverage-analyzer.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"coverage-analyzer.d.ts","sourceRoot":"","sources":["../../src/api/coverage-analyzer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAKH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAMzE,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7C,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IACxC,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC,QAAQ,CAAC,cAAc,EAAE,SAAS,MAAM,EAAE,CAAC;CAC5C;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;IACrC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7C,QAAQ,CAAC,cAAc,EAAE,oBAAoB,CAAC;CAC/C;AAMD,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,aAAa,EACtB,QAAQ,EAAE,WAAW,GACpB,oBAAoB,CAsCtB;AAMD,wBAAsB,oBAAoB,CACxC,UAAU,EAAE,SAAS,MAAM,EAAE,EAC7B,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,WAAW,EACrB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC,CAgB5B;AAMD,wBAAsB,eAAe,CACnC,OAAO,EAAE,aAAa,EACtB,UAAU,EAAE,SAAS,MAAM,EAAE,EAC7B,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,WAAW,GACpB,OAAO,CAAC,cAAc,CAAC,CAoCzB"} \ No newline at end of file diff --git a/dist/api/coverage-analyzer.js b/dist/api/coverage-analyzer.js deleted file mode 100644 index 21c38658..00000000 --- a/dist/api/coverage-analyzer.js +++ /dev/null @@ -1,115 +0,0 @@ -/** - * @libar-docs - * @libar-docs-pattern CoverageAnalyzerImpl - * @libar-docs-status active - * @libar-docs-implements DataAPIArchitectureQueries - * @libar-docs-uses Pattern Scanner, MasterDataset - * @libar-docs-used-by ProcessAPICLIImpl - * @libar-docs-arch-role service - * @libar-docs-arch-context api - * @libar-docs-arch-layer application - * - * ## CoverageAnalyzer — Annotation Coverage and Taxonomy Gap Detection - * - * Reports annotation completeness by comparing scannable files (from glob) - * against annotated patterns in MasterDataset. Uses independent glob via - * findFilesToScan() — cheap (~1ms) and avoids changing buildPipeline(). - */ -import * as fs from 'node:fs/promises'; -import * as path from 'node:path'; -import { findFilesToScan, hasFileOptIn } from '../scanner/pattern-scanner.js'; -// --------------------------------------------------------------------------- -// findUnusedTaxonomy -// --------------------------------------------------------------------------- -export function findUnusedTaxonomy(dataset, registry) { - // Collect used values from patterns - const usedCategories = new Set(); - const usedRoles = new Set(); - const usedLayers = new Set(); - const usedStatuses = new Set(); - for (const p of dataset.patterns) { - usedCategories.add(String(p.category)); - if (p.archRole !== undefined) - usedRoles.add(p.archRole); - if (p.archLayer !== undefined) - usedLayers.add(p.archLayer); - if (p.status !== undefined) - usedStatuses.add(p.status); - } - // Get defined values from registry - const definedCategories = registry.categories.map((c) => c.tag); - // Find arch-role and arch-layer enum values from metadataTags - let definedRoles = []; - let definedLayers = []; - let definedStatuses = []; - for (const tag of registry.metadataTags) { - if (tag.tag === 'arch-role' && tag.values !== undefined) { - definedRoles = tag.values; - } - else if (tag.tag === 'arch-layer' && tag.values !== undefined) { - definedLayers = tag.values; - } - else if (tag.tag === 'status' && tag.values !== undefined) { - definedStatuses = tag.values; - } - } - return { - unusedCategories: definedCategories.filter((c) => !usedCategories.has(c)), - unusedRoles: definedRoles.filter((r) => !usedRoles.has(r)), - unusedLayers: definedLayers.filter((l) => !usedLayers.has(l)), - unusedStatuses: definedStatuses.filter((s) => !usedStatuses.has(s)), - }; -} -// --------------------------------------------------------------------------- -// findUnannotatedFiles -// --------------------------------------------------------------------------- -export async function findUnannotatedFiles(inputGlobs, baseDir, registry, pathFilter) { - const patterns = pathFilter !== undefined ? [pathFilter] : [...inputGlobs]; - const allFiles = await findFilesToScan({ patterns, baseDir }); - const resolvedBaseDir = path.resolve(baseDir); - const unannotated = []; - for (const filePath of allFiles) { - const content = await fs.readFile(filePath, 'utf-8'); - if (!hasFileOptIn(content, registry)) { - // Return relative paths - const relative = path.relative(resolvedBaseDir, filePath); - unannotated.push(relative); - } - } - return unannotated.sort(); -} -// --------------------------------------------------------------------------- -// analyzeCoverage -// --------------------------------------------------------------------------- -export async function analyzeCoverage(dataset, inputGlobs, baseDir, registry) { - const allFiles = await findFilesToScan({ patterns: [...inputGlobs], baseDir }); - const resolvedBaseDir = path.resolve(baseDir); - // Collect annotated file paths (normalized to absolute) - const annotatedFiles = new Set(); - for (const p of dataset.patterns) { - const filePath = p.source.file; - // Normalize: resolve relative paths against baseDir - const absolute = path.isAbsolute(filePath) ? filePath : path.resolve(resolvedBaseDir, filePath); - annotatedFiles.add(absolute); - } - // Find unannotated files - const unannotatedFiles = []; - for (const filePath of allFiles) { - if (!annotatedFiles.has(filePath)) { - unannotatedFiles.push(path.relative(resolvedBaseDir, filePath)); - } - } - unannotatedFiles.sort(); - const totalScannableFiles = allFiles.length; - const annotatedFileCount = totalScannableFiles - unannotatedFiles.length; - const coveragePercentage = totalScannableFiles > 0 ? Math.round((annotatedFileCount / totalScannableFiles) * 100) : 0; - const unusedTaxonomy = findUnusedTaxonomy(dataset, registry); - return { - annotatedFileCount, - totalScannableFiles, - coveragePercentage, - unannotatedFiles, - unusedTaxonomy, - }; -} -//# sourceMappingURL=coverage-analyzer.js.map \ No newline at end of file diff --git a/dist/api/coverage-analyzer.js.map b/dist/api/coverage-analyzer.js.map deleted file mode 100644 index b8aa037b..00000000 --- a/dist/api/coverage-analyzer.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"coverage-analyzer.js","sourceRoot":"","sources":["../../src/api/coverage-analyzer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,+BAA+B,C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C/B,CAAC;IAED,yBAAyB;IACzB,MAAM,gBAAgB,GAAa,EAAE,CAAC;IACtC,KAAK,MAAM,QAAQ,IAAI,QAAQ,EAAE,CAAC;QAChC,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;YAClC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC,CAAC;QAClE,CAAC;IACH,CAAC;IACD,gBAAgB,CAAC,IAAI,EAAE,CAAC;IAExB,MAAM,mBAAmB,GAAG,QAAQ,CAAC,MAAM,CAAC;IAC5C,MAAM,kBAAkB,GAAG,mBAAmB,GAAG,gBAAgB,CAAC,MAAM,CAAC;IACzE,MAAM,kBAAkB,GACtB,mBAAmB,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,kBAAkB,GAAG,mBAAmB,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAE7F,MAAM,cAAc,GAAG,kBAAkB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAE7D,OAAO;QACL,kBAAkB;QAClB,mBAAmB;QACnB,kBAAkB;QAClB,gBAAgB;QAChB,cAAc;KACf,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/dist/api/fuzzy-match.d.ts b/dist/api/fuzzy-match.d.ts deleted file mode 100644 index 8e9de33e..00000000 --- a/dist/api/fuzzy-match.d.ts +++ /dev/null @@ -1,73 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern FuzzyMatcherImpl - * @libar-docs-status active - * @libar-docs-implements DataAPIOutputShaping - * @libar-docs-used-by ProcessAPICLIImpl - * @libar-docs-arch-role service - * @libar-docs-arch-context api - * @libar-docs-arch-layer application - * - * ## FuzzyMatcher — Pattern Name Fuzzy Search - * - * Provides fuzzy matching for pattern names with tiered scoring: - * exact (1.0) > prefix (0.9) > substring (0.7) > Levenshtein (distance-based). - * - * No external dependencies — Levenshtein implementation is ~20 lines. - * - * Used by: - * - `search` subcommand: ranked results via fuzzyMatchPatterns() - * - `pattern` subcommand: "Did you mean...?" fallback via findBestMatch() - */ -/** - * Result of a fuzzy match against a pattern name. - */ -export interface FuzzyMatch { - /** The matched pattern name */ - readonly patternName: string; - /** Match quality score (0-1, higher is better) */ - readonly score: number; - /** How the match was achieved */ - readonly matchType: 'exact' | 'prefix' | 'substring' | 'fuzzy'; -} -/** - * Compute Levenshtein edit distance between two strings. - * - * Pure implementation with no external dependencies. - * Uses dynamic programming O(m*n) approach. - * - * @param a - First string - * @param b - Second string - * @returns Edit distance (0 = identical) - */ -export declare function levenshteinDistance(a: string, b: string): number; -/** - * Find patterns matching a query with fuzzy matching. - * - * Scoring tiers (all case-insensitive): - * 1. Exact match: score = 1.0 - * 2. Prefix match: score = 0.9 - * 3. Substring match: score = 0.7 - * 4. Levenshtein distance <= 3: score = 1 - (distance / max(len1, len2)) - * - * Results are sorted by score descending, limited to maxResults. - * - * @param query - Search query string - * @param patternNames - All available pattern names to search - * @param maxResults - Maximum number of results to return (default: 10) - * @returns Sorted array of FuzzyMatch results - */ -export declare function fuzzyMatchPatterns(query: string, patternNames: readonly string[], maxResults?: number): readonly FuzzyMatch[]; -/** - * Find the single best match for a query. - * - * Used for "Did you mean...?" suggestions when an exact pattern lookup fails. - * Returns undefined if no match scores above the minimum threshold (0.3). - * - * @param query - Pattern name that wasn't found - * @param patternNames - All available pattern names - * @returns Best matching FuzzyMatch, or undefined if no good match - */ -export declare function findBestMatch(query: string, patternNames: readonly string[]): FuzzyMatch | undefined; -//# sourceMappingURL=fuzzy-match.d.ts.map \ No newline at end of file diff --git a/dist/api/fuzzy-match.d.ts.map b/dist/api/fuzzy-match.d.ts.map deleted file mode 100644 index b51a3e58..00000000 --- a/dist/api/fuzzy-match.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"fuzzy-match.d.ts","sourceRoot":"","sources":["../../src/api/fuzzy-match.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAMH;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,+BAA+B;IAC/B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,kDAAkD;IAClD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,iCAAiC;IACjC,QAAQ,CAAC,SAAS,EAAE,OAAO,GAAG,QAAQ,GAAG,WAAW,GAAG,OAAO,CAAC;CAChE;AAYD;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAyBhE;AAwCD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,MAAM,EACb,YAAY,EAAE,SAAS,MAAM,EAAE,EAC/B,UAAU,SAAK,GACd,SAAS,UAAU,EAAE,CAgBvB;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,MAAM,EACb,YAAY,EAAE,SAAS,MAAM,EAAE,GAC9B,UAAU,GAAG,SAAS,CAGxB"} \ No newline at end of file diff --git a/dist/api/fuzzy-match.js b/dist/api/fuzzy-match.js deleted file mode 100644 index ce54ddc7..00000000 --- a/dist/api/fuzzy-match.js +++ /dev/null @@ -1,138 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern FuzzyMatcherImpl - * @libar-docs-status active - * @libar-docs-implements DataAPIOutputShaping - * @libar-docs-used-by ProcessAPICLIImpl - * @libar-docs-arch-role service - * @libar-docs-arch-context api - * @libar-docs-arch-layer application - * - * ## FuzzyMatcher — Pattern Name Fuzzy Search - * - * Provides fuzzy matching for pattern names with tiered scoring: - * exact (1.0) > prefix (0.9) > substring (0.7) > Levenshtein (distance-based). - * - * No external dependencies — Levenshtein implementation is ~20 lines. - * - * Used by: - * - `search` subcommand: ranked results via fuzzyMatchPatterns() - * - `pattern` subcommand: "Did you mean...?" fallback via findBestMatch() - */ -/** Minimum score threshold for inclusion in results */ -const MIN_SCORE_THRESHOLD = 0.3; -/** Maximum Levenshtein distance to consider */ -const MAX_LEVENSHTEIN_DISTANCE = 3; -// --------------------------------------------------------------------------- -// Functions -// --------------------------------------------------------------------------- -/** - * Compute Levenshtein edit distance between two strings. - * - * Pure implementation with no external dependencies. - * Uses dynamic programming O(m*n) approach. - * - * @param a - First string - * @param b - Second string - * @returns Edit distance (0 = identical) - */ -export function levenshteinDistance(a, b) { - const m = a.length; - const n = b.length; - if (m === 0) - return n; - if (n === 0) - return m; - // Two-row DP: previous row and current row - let prevRow = Array.from({ length: n + 1 }, (_, i) => i); - let currRow = new Array(n + 1); - for (let i = 1; i <= m; i++) { - currRow[0] = i; - for (let j = 1; j <= n; j++) { - const cost = a[i - 1] === b[j - 1] ? 0 : 1; - const deletion = (prevRow[j] ?? 0) + 1; - const insertion = (currRow[j - 1] ?? 0) + 1; - const substitution = (prevRow[j - 1] ?? 0) + cost; - currRow[j] = Math.min(deletion, insertion, substitution); - } - // Swap rows - [prevRow, currRow] = [currRow, prevRow]; - } - return prevRow[n] ?? 0; -} -/** - * Score a single pattern name against a query using tiered matching. - */ -function scoreMatch(query, patternName) { - const queryLower = query.toLowerCase(); - const nameLower = patternName.toLowerCase(); - // Tier 1: Exact match (case-insensitive) - if (queryLower === nameLower) { - return { score: 1.0, matchType: 'exact' }; - } - // Tier 2: Prefix match - if (nameLower.startsWith(queryLower)) { - return { score: 0.9, matchType: 'prefix' }; - } - // Tier 3: Substring match - if (nameLower.includes(queryLower)) { - return { score: 0.7, matchType: 'substring' }; - } - // Tier 4: Levenshtein distance - const distance = levenshteinDistance(queryLower, nameLower); - if (distance <= MAX_LEVENSHTEIN_DISTANCE) { - const maxLen = Math.max(queryLower.length, nameLower.length); - const score = maxLen > 0 ? 1 - distance / maxLen : 0; - if (score >= MIN_SCORE_THRESHOLD) { - return { score, matchType: 'fuzzy' }; - } - } - return undefined; -} -/** - * Find patterns matching a query with fuzzy matching. - * - * Scoring tiers (all case-insensitive): - * 1. Exact match: score = 1.0 - * 2. Prefix match: score = 0.9 - * 3. Substring match: score = 0.7 - * 4. Levenshtein distance <= 3: score = 1 - (distance / max(len1, len2)) - * - * Results are sorted by score descending, limited to maxResults. - * - * @param query - Search query string - * @param patternNames - All available pattern names to search - * @param maxResults - Maximum number of results to return (default: 10) - * @returns Sorted array of FuzzyMatch results - */ -export function fuzzyMatchPatterns(query, patternNames, maxResults = 10) { - const matches = []; - for (const patternName of patternNames) { - const result = scoreMatch(query, patternName); - if (result !== undefined) { - matches.push({ - patternName, - score: result.score, - matchType: result.matchType, - }); - } - } - matches.sort((a, b) => b.score - a.score); - return matches.slice(0, maxResults); -} -/** - * Find the single best match for a query. - * - * Used for "Did you mean...?" suggestions when an exact pattern lookup fails. - * Returns undefined if no match scores above the minimum threshold (0.3). - * - * @param query - Pattern name that wasn't found - * @param patternNames - All available pattern names - * @returns Best matching FuzzyMatch, or undefined if no good match - */ -export function findBestMatch(query, patternNames) { - const results = fuzzyMatchPatterns(query, patternNames, 1); - return results.length > 0 ? results[0] : undefined; -} -//# sourceMappingURL=fuzzy-match.js.map \ No newline at end of file diff --git a/dist/api/fuzzy-match.js.map b/dist/api/fuzzy-match.js.map deleted file mode 100644 index 60de03a9..00000000 --- a/dist/api/fuzzy-match.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"fuzzy-match.js","sourceRoot":"","sources":["../../src/api/fuzzy-match.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAkBH,uDAAuD;AACvD,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAEhC,+CAA+C;AAC/C,MAAM,wBAAwB,GAAG,CAAC,CAAC;AAEnC,8EAA8E;AAC9E,YAAY;AACZ,8EAA8E;AAE9E;;;;;;;;;GASG;AACH,MAAM,UAAU,mBAAmB,CAAC,CAAS,EAAE,CAAS;IACtD,MAAM,CAAC,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S,EAAE,OAAO,EAAE,CAAC;QACvC,CAAC;IACH,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,kBAAkB,CAChC,KAAa,EACb,YAA+B,EAC/B,UAAU,GAAG,EAAE;IAEf,MAAM,OAAO,GAAiB,EAAE,CAAC;IAEjC,KAAK,MAAM,WAAW,IAAI,YAAY,EAAE,CAAC;QACvC,MAAM,MAAM,GAAG,UAAU,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;QAC9C,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YACzB,OAAO,CAAC,IAAI,CAAC;gBACX,WAAW;gBACX,KAAK,EAAE,MAAM,CAAC,KAAK;gBACnB,SAAS,EAAE,MAAM,CAAC,SAAS;aAC5B,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC;IAC1C,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;AACtC,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,aAAa,CAC3B,KAAa,EACb,YAA+B;IAE/B,MAAM,OAAO,GAAG,kBAAkB,CAAC,KAAK,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC;IAC3D,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACrD,CAAC"} \ No newline at end of file diff --git a/dist/api/handoff-generator.d.ts b/dist/api/handoff-generator.d.ts deleted file mode 100644 index b9fe8789..00000000 --- a/dist/api/handoff-generator.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * @libar-docs - * @libar-docs-pattern HandoffGeneratorImpl - * @libar-docs-status completed - * @libar-docs-implements DataAPIDesignSessionSupport - * @libar-docs-uses ProcessStateAPI, MasterDataset, ContextFormatterImpl - * @libar-docs-used-by ProcessAPICLIImpl - * @libar-docs-target src/api/handoff-generator.ts - * @libar-docs-arch-role service - * @libar-docs-arch-context api - * @libar-docs-arch-layer application - * - * ## HandoffGenerator — Session-End State Summary - * - * Pure function that assembles a handoff document from ProcessStateAPI - * and MasterDataset. Captures everything the next session needs to - * continue work without context loss. - */ -import type { SessionType } from './context-assembler.js'; -import type { ProcessStateAPI } from './process-state.js'; -import type { MasterDataset } from '../validation-schemas/master-dataset.js'; -/** Handoff supports 'review' in addition to standard session types (DD-3). */ -export type HandoffSessionType = SessionType | 'review'; -export interface HandoffOptions { - readonly patternName: string; - readonly sessionType?: HandoffSessionType; - readonly modifiedFiles?: readonly string[]; -} -export interface HandoffSection { - readonly title: string; - readonly items: readonly string[]; -} -export interface HandoffDocument { - readonly pattern: string; - readonly sessionType: HandoffSessionType; - readonly date: string; - readonly status: string | undefined; - readonly sections: readonly HandoffSection[]; -} -export declare function generateHandoff(api: ProcessStateAPI, _dataset: MasterDataset, // _dataset reserved for future use per design stub -options: HandoffOptions): HandoffDocument; -export declare function formatHandoff(doc: HandoffDocument): string; -//# sourceMappingURL=handoff-generator.d.ts.map \ No newline at end of file diff --git a/dist/api/handoff-generator.d.ts.map b/dist/api/handoff-generator.d.ts.map deleted file mode 100644 index bdff32b4..00000000 --- a/dist/api/handoff-generator.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"handoff-generator.d.ts","sourceRoot":"","sources":["../../src/api/handoff-generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAc7E,8EAA8E;AAC9E,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG,QAAQ,CAAC;AAExD,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,WAAW,CAAC,EAAE,kBAAkB,CAAC;IAC1C,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC5C;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CACnC;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,WAAW,EAAE,kBAAkB,CAAC;IACzC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,QAAQ,CAAC,QAAQ,EAAE,SAAS,cAAc,EAAE,CAAC;CAC9C;AAsBD,wBAAgB,eAAe,CAC7B,GAAG,EAAE,eAAe,EACpB,QAAQ,EAAE,aAAa,EAAE,mDAAmD;AAC5E,OAAO,EAAE,cAAc,GACtB,eAAe,CA8FjB;AAMD,wBAAgB,aAAa,CAAC,GAAG,EAAE,eAAe,GAAG,MAAM,CAa1D"} \ No newline at end of file diff --git a/dist/api/handoff-generator.js b/dist/api/handoff-generator.js deleted file mode 100644 index a60bc79c..00000000 --- a/dist/api/handoff-generator.js +++ /dev/null @@ -1,137 +0,0 @@ -/** - * @libar-docs - * @libar-docs-pattern HandoffGeneratorImpl - * @libar-docs-status completed - * @libar-docs-implements DataAPIDesignSessionSupport - * @libar-docs-uses ProcessStateAPI, MasterDataset, ContextFormatterImpl - * @libar-docs-used-by ProcessAPICLIImpl - * @libar-docs-target src/api/handoff-generator.ts - * @libar-docs-arch-role service - * @libar-docs-arch-context api - * @libar-docs-arch-layer application - * - * ## HandoffGenerator — Session-End State Summary - * - * Pure function that assembles a handoff document from ProcessStateAPI - * and MasterDataset. Captures everything the next session needs to - * continue work without context loss. - */ -import { QueryApiError } from './types.js'; -import { getPatternName } from './pattern-helpers.js'; -import { isDeliverableStatusComplete, isDeliverableStatusPending, } from '../taxonomy/deliverable-status.js'; -import { normalizeStatus, isPatternComplete } from '../taxonomy/normalized-status.js'; -import { DEFAULT_STATUS } from '../taxonomy/status-values.js'; -// --------------------------------------------------------------------------- -// Session Type Inference (DD-3) -// --------------------------------------------------------------------------- -function inferSessionType(status) { - const normalized = normalizeStatus(status ?? DEFAULT_STATUS); - switch (normalized) { - case 'active': - return 'implement'; - case 'completed': - return 'review'; - default: - return 'design'; - } -} -// --------------------------------------------------------------------------- -// Main Entry Point -// --------------------------------------------------------------------------- -export function generateHandoff(api, _dataset, // _dataset reserved for future use per design stub -options) { - const { patternName, modifiedFiles } = options; - const pattern = api.getPattern(patternName); - if (pattern === undefined) { - throw new QueryApiError('PATTERN_NOT_FOUND', `Pattern not found: "${patternName}"`); - } - const resolvedName = getPatternName(pattern); - const sessionType = options.sessionType ?? inferSessionType(pattern.status); - const date = new Date().toISOString().slice(0, 10); - const sections = []; - // Deliverables split - const deliverables = api.getPatternDeliverables(patternName); - const completed = deliverables.filter((d) => isDeliverableStatusComplete(d.status)); - const inProgress = deliverables.filter((d) => !isDeliverableStatusComplete(d.status) && !isDeliverableStatusPending(d.status)); - const remaining = deliverables.filter((d) => !isDeliverableStatusComplete(d.status)); - // Completed deliverables - if (completed.length > 0) { - sections.push({ - title: 'COMPLETED', - items: completed.map((d) => `[x] ${d.name} (${d.location})`), - }); - } - // In-progress deliverables - if (inProgress.length > 0) { - sections.push({ - title: 'IN PROGRESS', - items: inProgress.map((d) => `[ ] ${d.name} (${d.location})`), - }); - } - // Files modified (DD-2: only when modifiedFiles provided) - if (modifiedFiles !== undefined && modifiedFiles.length > 0) { - sections.push({ - title: 'FILES MODIFIED', - items: modifiedFiles, - }); - } - // Discovered items - const gaps = pattern.discoveredGaps ?? []; - const improvements = pattern.discoveredImprovements ?? []; - const learnings = pattern.discoveredLearnings ?? []; - if (gaps.length > 0 || improvements.length > 0 || learnings.length > 0) { - const items = []; - if (gaps.length > 0) { - items.push(`Gaps: ${gaps.join(', ')}`); - } - if (improvements.length > 0) { - items.push(`Improvements: ${improvements.join(', ')}`); - } - if (learnings.length > 0) { - items.push(`Learnings: ${learnings.join(', ')}`); - } - sections.push({ title: 'DISCOVERED', items }); - } - // Blockers (incomplete dependencies) - const deps = api.getPatternDependencies(patternName); - const incompleteDeps = []; - if (deps !== undefined) { - for (const depName of deps.dependsOn) { - const depPattern = api.getPattern(depName); - if (depPattern !== undefined && !isPatternComplete(depPattern.status)) { - incompleteDeps.push(`${depName} (${depPattern.status ?? 'unknown'})`); - } - } - } - sections.push({ - title: 'BLOCKERS', - items: incompleteDeps.length > 0 ? incompleteDeps : ['None'], - }); - // Next session priorities (remaining deliverables in order) - if (remaining.length > 0) { - sections.push({ - title: 'NEXT SESSION', - items: remaining.map((d, i) => `${i + 1}. ${d.name} (${d.location})`), - }); - } - return { - pattern: resolvedName, - sessionType, - date, - status: pattern.status, - sections, - }; -} -// --------------------------------------------------------------------------- -// Text Formatter (co-located per PDR-002 DD-7) -// --------------------------------------------------------------------------- -export function formatHandoff(doc) { - const sections = []; - sections.push(`=== HANDOFF: ${doc.pattern} (${doc.sessionType}) ===\n` + - `Date: ${doc.date} | Status: ${doc.status ?? 'unknown'}`); - for (const section of doc.sections) { - sections.push(`=== ${section.title} ===\n` + section.items.join('\n')); - } - return sections.join('\n\n') + '\n'; -} -//# sourceMappingURL=handoff-generator.js.map \ No newline at end of file diff --git a/dist/api/handoff-generator.js.map b/dist/api/handoff-generator.js.map deleted file mode 100644 index c54b3a19..00000000 --- a/dist/api/handoff-generator.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"handoff-generator.js","sourceRoot":"","sources":["../../src/api/handoff-generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;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Ac,GAAG,CAAC,MAAM,IAAI,SAAS,EAAE,CAC3D,CAAC;IAEF,KAAK,MAAM,OAAO,IAAI,GAAG,CAAC,QAAQ,EAAE,CAAC;QACnC,QAAQ,CAAC,IAAI,CAAC,OAAO,OAAO,CAAC,KAAK,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACzE,CAAC;IAED,OAAO,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;AACtC,CAAC"} \ No newline at end of file diff --git a/dist/api/index.d.ts b/dist/api/index.d.ts deleted file mode 100644 index e983c604..00000000 --- a/dist/api/index.d.ts +++ /dev/null @@ -1,61 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern APIModule - * @libar-docs-status active - * - * ## API Module - Programmatic Process State Interface - * - * Central export for the Process State API, providing a TypeScript - * interface for querying delivery process state. - * - * ### When to Use - * - * - When building tools that need programmatic access to delivery process state - * - When integrating with Claude Code for real-time process queries - * - When building CI/CD pipelines that validate delivery workflow - * - * ### Usage - * - * ```typescript - * import { - * createProcessStateAPI, - * type ProcessStateAPI, - * type QueryResult, - * } from "@libar-dev/delivery-process/api"; - * - * const api = createProcessStateAPI(masterDataset); - * - * // Query current work - * const activeWork = api.getCurrentWork(); - * - * // Check FSM transition - * const check = api.checkTransition("roadmap", "active"); - * if (check.valid) { - * console.log("Transition is valid"); - * } - * ``` - */ -export type { QuerySuccess, QueryError, QueryErrorCode, QueryResult, StatusCounts, StatusDistribution, PhaseProgress, PhaseGroup, PatternDependencies, PatternRelationships, PatternDeliverable, QuarterGroup, TransitionCheck, ProtectionInfo, } from './types.js'; -export { createSuccess, createError, QueryApiError } from './types.js'; -export type { NeighborEntry } from './types.js'; -export type { ProcessStateAPI } from './process-state.js'; -export { createProcessStateAPI } from './process-state.js'; -export type { PatternSummary } from './summarize.js'; -export { PatternSummarySchema, SUMMARY_FIELDS, summarizePattern, summarizePatterns, } from './summarize.js'; -export type { FuzzyMatch } from './fuzzy-match.js'; -export { fuzzyMatchPatterns, findBestMatch } from './fuzzy-match.js'; -export { getPatternName, findPatternByName, getRelationships, allPatternNames, suggestPattern, firstImplements, } from './pattern-helpers.js'; -export type { StubResolution, StubSummary, DecisionItem, PdrReference } from './stub-resolver.js'; -export { findStubPatterns, resolveStubs, groupStubsByPattern, extractDecisionItems, findPdrReferences, } from './stub-resolver.js'; -export type { SessionType, ContextOptions, DepTreeOptions, PatternContextMeta, StubRef, DepEntry, DeliverableEntry, FsmContext, ContextBundle, DepTreeNode, FileReadingList, ProgressSummary, ActivePhaseSummary, BlockingEntry, OverviewSummary, } from './context-assembler.js'; -export { isValidSessionType, assembleContext, buildDepTree, buildFileReadingList, buildOverview, } from './context-assembler.js'; -export { formatContextBundle, formatDepTree, formatFileReadingList, formatOverview, } from './context-formatter.js'; -export type { NeighborhoodResult, ContextComparison, TagUsageReport, SourceInventory, } from './arch-queries.js'; -export { computeNeighborhood, compareContexts, aggregateTagUsage, buildSourceInventory, } from './arch-queries.js'; -export type { CoverageReport } from './coverage-analyzer.js'; -export { analyzeCoverage, findUnannotatedFiles, findUnusedTaxonomy } from './coverage-analyzer.js'; -export type { RulesFilters, RuleOutput, RulesQueryResult } from './rules-query.js'; -export { queryBusinessRules } from './rules-query.js'; -export { deriveSource } from './summarize.js'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/dist/api/index.d.ts.map b/dist/api/index.d.ts.map deleted file mode 100644 index 3b198ab2..00000000 --- a/dist/api/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAGH,YAAY,EACV,YAAY,EACZ,UAAU,EACV,cAAc,EACd,WAAW,EACX,YAAY,EACZ,kBAAkB,EAClB,aAAa,EACb,UAAU,EACV,mBAAmB,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,EACb,qBAAqB,EACrB,cAAc,GACf,MAAM,wBAAwB,CAAC;AAGhC,YAAY,EACV,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,EACd,eAAe,GAChB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,mBAAmB,CAAC;AAG3B,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAGnG,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACnF,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAGtD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"} \ No newline at end of file diff --git a/dist/api/index.js b/dist/api/index.js deleted file mode 100644 index add386ec..00000000 --- a/dist/api/index.js +++ /dev/null @@ -1,54 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern APIModule - * @libar-docs-status active - * - * ## API Module - Programmatic Process State Interface - * - * Central export for the Process State API, providing a TypeScript - * interface for querying delivery process state. - * - * ### When to Use - * - * - When building tools that need programmatic access to delivery process state - * - When integrating with Claude Code for real-time process queries - * - When building CI/CD pipelines that validate delivery workflow - * - * ### Usage - * - * ```typescript - * import { - * createProcessStateAPI, - * type ProcessStateAPI, - * type QueryResult, - * } from "@libar-dev/delivery-process/api"; - * - * const api = createProcessStateAPI(masterDataset); - * - * // Query current work - * const activeWork = api.getCurrentWork(); - * - * // Check FSM transition - * const check = api.checkTransition("roadmap", "active"); - * if (check.valid) { - * console.log("Transition is valid"); - * } - * ``` - */ -export { createSuccess, createError, QueryApiError } from './types.js'; -export { createProcessStateAPI } from './process-state.js'; -export { PatternSummarySchema, SUMMARY_FIELDS, summarizePattern, summarizePatterns, } from './summarize.js'; -export { fuzzyMatchPatterns, findBestMatch } from './fuzzy-match.js'; -// Pattern Helpers -export { getPatternName, findPatternByName, getRelationships, allPatternNames, suggestPattern, firstImplements, } from './pattern-helpers.js'; -export { findStubPatterns, resolveStubs, groupStubsByPattern, extractDecisionItems, findPdrReferences, } from './stub-resolver.js'; -export { isValidSessionType, assembleContext, buildDepTree, buildFileReadingList, buildOverview, } from './context-assembler.js'; -// Context Formatting -export { formatContextBundle, formatDepTree, formatFileReadingList, formatOverview, } from './context-formatter.js'; -export { computeNeighborhood, compareContexts, aggregateTagUsage, buildSourceInventory, } from './arch-queries.js'; -export { analyzeCoverage, findUnannotatedFiles, findUnusedTaxonomy } from './coverage-analyzer.js'; -export { queryBusinessRules } from './rules-query.js'; -// Pattern Summarization (extended) -export { deriveSource } from './summarize.js'; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/api/index.js.map b/dist/api/index.js.map deleted file mode 100644 index 5cc494f5..00000000 --- a/dist/api/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAoBH,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAKvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAI3D,OAAO,EACL,oBAAoB,EACpB,cAAc,EACd,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,gBAAgB,CAAC;AAIxB,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAErE,kBAAkB;AAClB,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,eAAe,GAChB,MAAM,sBAAsB,CAAC;AAI9B,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAoB5B,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,YAAY,EACZ,oBAAoB,EACpB,aAAa,GACd,MAAM,wBAAwB,CAAC;AAEhC,qBAAqB;AACrB,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,qBAAqB,EACrB,cAAc,GACf,MAAM,wBAAwB,CAAC;AAShC,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,mBAAmB,CAAC;AAI3B,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAInG,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,mCAAmC;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"} \ No newline at end of file diff --git a/dist/api/pattern-helpers.d.ts b/dist/api/pattern-helpers.d.ts deleted file mode 100644 index 3063f766..00000000 --- a/dist/api/pattern-helpers.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -/** - * @libar-docs - * @libar-docs-pattern PatternHelpers - * @libar-docs-status active - * @libar-docs-implements DataAPIOutputShaping - * @libar-docs-arch-context api - * @libar-docs-arch-layer domain - * - * ## Pattern Helpers — Shared Lookup Utilities - * - * Common helper functions used by context-assembler, arch-queries, and other - * API modules that need pattern name resolution and relationship lookups. - */ -import type { ExtractedPattern } from '../validation-schemas/extracted-pattern.js'; -import type { MasterDataset, RelationshipEntry } from '../validation-schemas/master-dataset.js'; -/** - * Get the display name for a pattern: prefers explicit `patternName` tag, - * falls back to the extracted `name`. - */ -export declare function getPatternName(p: ExtractedPattern): string; -/** - * Find a pattern by name using case-insensitive matching. - */ -export declare function findPatternByName(patterns: readonly ExtractedPattern[], name: string): ExtractedPattern | undefined; -/** - * Look up relationship entry by pattern name with case-insensitive fallback. - * - * Tries exact key match first for performance, then falls back to - * case-insensitive scan if the exact key is not found. - */ -export declare function getRelationships(dataset: MasterDataset, name: string): RelationshipEntry | undefined; -/** - * Get all pattern display names from the dataset. - */ -export declare function allPatternNames(dataset: MasterDataset): readonly string[]; -/** - * Build a "Did you mean: X?" suggestion string using fuzzy matching. - * Returns empty string if no good match is found. - */ -export declare function suggestPattern(query: string, candidates: readonly string[]): string; -/** - * Get the first implements-pattern name from a pattern, if any. - */ -export declare function firstImplements(pattern: ExtractedPattern): string | undefined; -//# sourceMappingURL=pattern-helpers.d.ts.map \ No newline at end of file diff --git a/dist/api/pattern-helpers.d.ts.map b/dist/api/pattern-helpers.d.ts.map deleted file mode 100644 index 8a5212b8..00000000 --- a/dist/api/pattern-helpers.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pattern-helpers.d.ts","sourceRoot":"","sources":["../../src/api/pattern-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AACnF,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAGhG;;;GAGG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,gBAAgB,GAAG,MAAM,CAE1D;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,SAAS,gBAAgB,EAAE,EACrC,IAAI,EAAE,MAAM,GACX,gBAAgB,GAAG,SAAS,CAG9B;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,aAAa,EACtB,IAAI,EAAE,MAAM,GACX,iBAAiB,GAAG,SAAS,CAS/B;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,aAAa,GAAG,SAAS,MAAM,EAAE,CAEzE;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAGnF;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,gBAAgB,GAAG,MAAM,GAAG,SAAS,CAE7E"} \ No newline at end of file diff --git a/dist/api/pattern-helpers.js b/dist/api/pattern-helpers.js deleted file mode 100644 index c3ca2a81..00000000 --- a/dist/api/pattern-helpers.js +++ /dev/null @@ -1,68 +0,0 @@ -/** - * @libar-docs - * @libar-docs-pattern PatternHelpers - * @libar-docs-status active - * @libar-docs-implements DataAPIOutputShaping - * @libar-docs-arch-context api - * @libar-docs-arch-layer domain - * - * ## Pattern Helpers — Shared Lookup Utilities - * - * Common helper functions used by context-assembler, arch-queries, and other - * API modules that need pattern name resolution and relationship lookups. - */ -import { findBestMatch } from './fuzzy-match.js'; -/** - * Get the display name for a pattern: prefers explicit `patternName` tag, - * falls back to the extracted `name`. - */ -export function getPatternName(p) { - return p.patternName ?? p.name; -} -/** - * Find a pattern by name using case-insensitive matching. - */ -export function findPatternByName(patterns, name) { - const lower = name.toLowerCase(); - return patterns.find((p) => getPatternName(p).toLowerCase() === lower); -} -/** - * Look up relationship entry by pattern name with case-insensitive fallback. - * - * Tries exact key match first for performance, then falls back to - * case-insensitive scan if the exact key is not found. - */ -export function getRelationships(dataset, name) { - if (dataset.relationshipIndex === undefined) - return undefined; - const entry = dataset.relationshipIndex[name]; - if (entry !== undefined) - return entry; - const lower = name.toLowerCase(); - for (const [key, value] of Object.entries(dataset.relationshipIndex)) { - if (key.toLowerCase() === lower) - return value; - } - return undefined; -} -/** - * Get all pattern display names from the dataset. - */ -export function allPatternNames(dataset) { - return dataset.patterns.map((p) => getPatternName(p)); -} -/** - * Build a "Did you mean: X?" suggestion string using fuzzy matching. - * Returns empty string if no good match is found. - */ -export function suggestPattern(query, candidates) { - const best = findBestMatch(query, candidates); - return best !== undefined ? ` Did you mean: ${best.patternName}?` : ''; -} -/** - * Get the first implements-pattern name from a pattern, if any. - */ -export function firstImplements(pattern) { - return pattern.implementsPatterns?.[0]; -} -//# sourceMappingURL=pattern-helpers.js.map \ No newline at end of file diff --git a/dist/api/pattern-helpers.js.map b/dist/api/pattern-helpers.js.map deleted file mode 100644 index 0919155f..00000000 --- a/dist/api/pattern-helpers.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pattern-helpers.js","sourceRoot":"","sources":["../../src/api/pattern-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,CAAmB;IAChD,OAAO,CAAC,CAAC,WAAW,IAAI,CAAC,CAAC,IAAI,CAAC;AACjC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAC/B,QAAqC,EACrC,IAAY;IAEZ,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;IACjC,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,KAAK,KAAK,CAAC,CAAC;AACzE,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAC9B,OAAsB,EACtB,IAAY;IAEZ,IAAI,OAAO,CAAC,iBAAiB,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC9D,MAAM,KAAK,GAAG,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAC9C,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IACtC,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;IACjC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,EAAE,CAAC;QACrE,IAAI,GAAG,CAAC,WAAW,EAAE,KAAK,KAAK;YAAE,OAAO,KAAK,CAAC;IAChD,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,OAAsB;IACpD,OAAO,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;AACxD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,KAAa,EAAE,UAA6B;IACzE,MAAM,IAAI,GAAG,aAAa,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;IAC9C,OAAO,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,kBAAkB,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;AACzE,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,OAAyB;IACvD,OAAO,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC,CAAC,CAAC;AACzC,CAAC"} \ No newline at end of file diff --git a/dist/api/process-state.d.ts b/dist/api/process-state.d.ts deleted file mode 100644 index 84024407..00000000 --- a/dist/api/process-state.d.ts +++ /dev/null @@ -1,224 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern ProcessStateAPI - * @libar-docs-status active - * @libar-docs-implements PhaseStateMachineValidation - * @libar-docs-arch-role service - * @libar-docs-arch-context api - * @libar-docs-arch-layer application - * @libar-docs-uses MasterDataset, FSMValidator - * - * ## Process State API - Programmatic Query Interface - * - * TypeScript interface for querying delivery process state. - * Designed for Claude Code integration and programmatic access. - * - * ### When to Use - * - * - When querying patterns by status, phase, or relationships - * - When validating FSM transitions before making changes - * - When building dashboards or reports on delivery progress - * - When Claude Code needs real-time delivery state (prefer over reading Markdown) - * - * ### Key Features - * - * - **Status Queries**: Get patterns by status, counts, distributions - * - **Phase Queries**: Get phase progress, active phases, patterns - * - **FSM Queries**: Validate transitions, check protection levels - * - **Pattern Queries**: Find patterns, get dependencies, deliverables - * - **Timeline Queries**: Group by quarter, get current work, roadmap - * - * ### Usage - * - * ```typescript - * import { createProcessStateAPI } from "@libar-dev/delivery-process"; - * - * const api = createProcessStateAPI(masterDataset); - * - * // Get current work - * const active = api.getCurrentWork(); - * - * // Check transition - * if (api.isValidTransition("roadmap", "active")) { - * console.log("Can start work"); - * } - * ``` - */ -import type { MasterDataset, ExtractedPattern } from '../validation-schemas/index.js'; -import type { ProcessStatusValue } from '../taxonomy/index.js'; -import type { StatusCounts, StatusDistribution, PhaseProgress, PhaseGroup, PatternDependencies, PatternRelationships, PatternDeliverable, QuarterGroup, TransitionCheck, ProtectionInfo } from './types.js'; -/** - * Programmatic API for querying delivery process state - */ -export interface ProcessStateAPI { - /** - * Get all patterns with a specific normalized status - * - * @param status - "completed" | "active" | "planned" - * @returns Array of patterns with that status - */ - getPatternsByNormalizedStatus(status: 'completed' | 'active' | 'planned'): ExtractedPattern[]; - /** - * Get all patterns with a specific FSM status value - * - * @param status - ProcessStatusValue (roadmap, active, completed, deferred) - * @returns Array of patterns with that exact status - */ - getPatternsByStatus(status: ProcessStatusValue): ExtractedPattern[]; - /** - * Get status counts (completed, active, planned, total) - */ - getStatusCounts(): StatusCounts; - /** - * Get status distribution with percentages - */ - getStatusDistribution(): StatusDistribution; - /** - * Get overall completion percentage - */ - getCompletionPercentage(): number; - /** - * Get all patterns in a specific phase - * - * @param phase - Phase number - * @returns Array of patterns in that phase - */ - getPatternsByPhase(phase: number): ExtractedPattern[]; - /** - * Get progress for a specific phase - * - * @param phase - Phase number - * @returns Phase progress with counts and completion percentage - */ - getPhaseProgress(phase: number): PhaseProgress | undefined; - /** - * Get all phases with active work - */ - getActivePhases(): PhaseGroup[]; - /** - * Get all phase groups sorted by phase number - */ - getAllPhases(): PhaseGroup[]; - /** - * Check if a status transition is valid - * - * @param from - Current status - * @param to - Target status - */ - isValidTransition(from: ProcessStatusValue, to: ProcessStatusValue): boolean; - /** - * Get detailed transition validation result - * - * @param from - Current status - * @param to - Target status - */ - checkTransition(from: string, to: string): TransitionCheck; - /** - * Get valid transition targets from a status - * - * @param status - Current status - */ - getValidTransitionsFrom(status: ProcessStatusValue): readonly ProcessStatusValue[]; - /** - * Get protection level for a status - * - * @param status - Status to check - */ - getProtectionInfo(status: ProcessStatusValue): ProtectionInfo; - /** - * Find a pattern by name - * - * @param name - Pattern name (case-insensitive) - */ - getPattern(name: string): ExtractedPattern | undefined; - /** - * Get pattern dependencies - * - * @param name - Pattern name - */ - getPatternDependencies(name: string): PatternDependencies | undefined; - /** - * Get complete pattern relationships (all relationship types) - * - * Returns the full relationship data from the MasterDataset's relationshipIndex, - * including UML-inspired relationships (implements, extends) and cross-references - * (see-also, api-ref). - * - * @param name - Pattern name - */ - getPatternRelationships(name: string): PatternRelationships | undefined; - /** - * Get related patterns (from @libar-docs-see-also tag) - * - * Returns patterns that are related for cross-reference without implying - * dependency. Used for planning session scoping. - * - * @param name - Pattern name - */ - getRelatedPatterns(name: string): readonly string[]; - /** - * Get API references (from @libar-docs-api-ref tag) - * - * Returns file paths to implementation APIs. Used for code navigation - * from spec to implementation. - * - * @param name - Pattern name - */ - getApiReferences(name: string): readonly string[]; - /** - * Get pattern deliverables (from feature files) - * - * @param name - Pattern name - */ - getPatternDeliverables(name: string): PatternDeliverable[]; - /** - * Get patterns by category - * - * @param category - Category name - */ - getPatternsByCategory(category: string): ExtractedPattern[]; - /** - * Get all categories with pattern counts - */ - getCategories(): Array<{ - category: string; - count: number; - }>; - /** - * Get patterns grouped by quarter - * - * @param quarter - Quarter string (e.g., "Q1-2026") - */ - getPatternsByQuarter(quarter: string): ExtractedPattern[]; - /** - * Get all quarters with patterns - */ - getQuarters(): QuarterGroup[]; - /** - * Get current work (active patterns) - */ - getCurrentWork(): ExtractedPattern[]; - /** - * Get roadmap items (roadmap + deferred patterns) - */ - getRoadmapItems(): ExtractedPattern[]; - /** - * Get recently completed patterns - * - * @param limit - Maximum number to return (default: 10) - */ - getRecentlyCompleted(limit?: number): ExtractedPattern[]; - /** - * Get the underlying MasterDataset - */ - getMasterDataset(): MasterDataset; -} -/** - * Create a ProcessStateAPI instance from a MasterDataset - * - * @param dataset - The MasterDataset to wrap - * @returns ProcessStateAPI instance - */ -export declare function createProcessStateAPI(dataset: MasterDataset): ProcessStateAPI; -//# sourceMappingURL=process-state.d.ts.map \ No newline at end of file diff --git a/dist/api/process-state.d.ts.map b/dist/api/process-state.d.ts.map deleted file mode 100644 index c743d490..00000000 --- a/dist/api/process-state.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"process-state.d.ts","sourceRoot":"","sources":["../../src/api/process-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAEH,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAEjB,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAa/D,OAAO,KAAK,EACV,YAAY,EACZ,kBAAkB,EAClB,aAAa,EACb,UAAU,EACV,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,YAAY,EACZ,eAAe,EACf,cAAc,EACf,MAAM,YAAY,CAAC;AAMpB;;GAEG;AACH,MAAM,WAAW,eAAe;IAK9B;;;;;OAKG;IACH,6BAA6B,CAAC,MAAM,EAAE,WAAW,GAAG,QAAQ,GAAG,SAAS,GAAG,gBAAgB,EAAE,CAAC;IAE9F;;;;;OAKG;IACH,mBAAmB,CAAC,MAAM,EAAE,kBAAkB,GAAG,gBAAgB,EAAE,CAAC;IAEpE;;OAEG;IACH,eAAe,IAAI,YAAY,CAAC;IAEhC;;OAEG;IACH,qBAAqB,IAAI,kBAAkB,CAAC;IAE5C;;OAEG;IACH,uBAAuB,IAAI,MAAM,CAAC;IAMlC;;;;;OAKG;IACH,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAAC;IAEtD;;;;;OAKG;IACH,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAAC;I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,GAAG,gBAAgB,EAAE,CAAC;IAE1D;;OAEG;IACH,WAAW,IAAI,YAAY,EAAE,CAAC;IAE9B;;OAEG;IACH,cAAc,IAAI,gBAAgB,EAAE,CAAC;IAErC;;OAEG;IACH,eAAe,IAAI,gBAAgB,EAAE,CAAC;IAEtC;;;;OAIG;IACH,oBAAoB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAAC;IAMzD;;OAEG;IACH,gBAAgB,IAAI,aAAa,CAAC;CACnC;AAMD;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,aAAa,GAAG,eAAe,CA4R7E"} \ No newline at end of file diff --git a/dist/api/process-state.js b/dist/api/process-state.js deleted file mode 100644 index 0c43a46f..00000000 --- a/dist/api/process-state.js +++ /dev/null @@ -1,308 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern ProcessStateAPI - * @libar-docs-status active - * @libar-docs-implements PhaseStateMachineValidation - * @libar-docs-arch-role service - * @libar-docs-arch-context api - * @libar-docs-arch-layer application - * @libar-docs-uses MasterDataset, FSMValidator - * - * ## Process State API - Programmatic Query Interface - * - * TypeScript interface for querying delivery process state. - * Designed for Claude Code integration and programmatic access. - * - * ### When to Use - * - * - When querying patterns by status, phase, or relationships - * - When validating FSM transitions before making changes - * - When building dashboards or reports on delivery progress - * - When Claude Code needs real-time delivery state (prefer over reading Markdown) - * - * ### Key Features - * - * - **Status Queries**: Get patterns by status, counts, distributions - * - **Phase Queries**: Get phase progress, active phases, patterns - * - **FSM Queries**: Validate transitions, check protection levels - * - **Pattern Queries**: Find patterns, get dependencies, deliverables - * - **Timeline Queries**: Group by quarter, get current work, roadmap - * - * ### Usage - * - * ```typescript - * import { createProcessStateAPI } from "@libar-dev/delivery-process"; - * - * const api = createProcessStateAPI(masterDataset); - * - * // Get current work - * const active = api.getCurrentWork(); - * - * // Check transition - * if (api.isValidTransition("roadmap", "active")) { - * console.log("Can start work"); - * } - * ``` - */ -import { isPatternComplete, isPatternActive, isPatternPlanned, } from '../taxonomy/normalized-status.js'; -import { validateTransition, getProtectionSummary, isValidTransition, getValidTransitionsFrom, } from '../validation/fsm/index.js'; -import { findPatternByName } from './pattern-helpers.js'; -// ============================================================================= -// Process State API Implementation -// ============================================================================= -/** - * Create a ProcessStateAPI instance from a MasterDataset - * - * @param dataset - The MasterDataset to wrap - * @returns ProcessStateAPI instance - */ -export function createProcessStateAPI(dataset) { - // Helper to find patterns by exact FSM status - function filterByExactStatus(status) { - return dataset.patterns.filter((p) => p.status === status); - } - // Helper to convert MasterPhaseGroup to PhaseGroup - function convertPhaseGroup(mpg) { - return { - phaseNumber: mpg.phaseNumber, - phaseName: mpg.phaseName, - patterns: mpg.patterns, - counts: mpg.counts, - }; - } - // Build relationship index if not present - const relationshipIndex = dataset.relationshipIndex ?? {}; - return { - // ───────────────────────────────────────────────────────────────────── - // Status Queries - // ───────────────────────────────────────────────────────────────────── - getPatternsByNormalizedStatus(status) { - return dataset.byStatus[status]; - }, - getPatternsByStatus(status) { - return filterByExactStatus(status); - }, - getStatusCounts() { - return { ...dataset.counts }; - }, - getStatusDistribution() { - const total = dataset.counts.total === 0 ? 1 : dataset.counts.total; - return { - counts: { ...dataset.counts }, - percentages: { - completed: Math.round((dataset.counts.completed / total) * 100), - active: Math.round((dataset.counts.active / total) * 100), - planned: Math.round((dataset.counts.planned / total) * 100), - }, - }; - }, - getCompletionPercentage() { - const total = dataset.counts.total === 0 ? 1 : dataset.counts.total; - return Math.round((dataset.counts.completed / total) * 100); - }, - // ───────────────────────────────────────────────────────────────────── - // Phase Queries - // ───────────────────────────────────────────────────────────────────── - getPatternsByPhase(phase) { - const phaseGroup = dataset.byPhase.find((p) => p.phaseNumber === phase); - return phaseGroup?.patterns ?? []; - }, - getPhaseProgress(phase) { - const phaseGroup = dataset.byPhase.find((p) => p.phaseNumber === phase); - if (!phaseGroup) - return undefined; - const total = phaseGroup.counts.total === 0 ? 1 : phaseGroup.counts.total; - return { - phaseNumber: phaseGroup.phaseNumber, - phaseName: phaseGroup.phaseName, - completed: phaseGroup.counts.completed, - active: phaseGroup.counts.active, - planned: phaseGroup.counts.planned, - total: phaseGroup.counts.total, - completionPercentage: Math.round((phaseGroup.counts.completed / total) * 100), - }; - }, - getActivePhases() { - return dataset.byPhase.filter((p) => p.counts.active > 0).map(convertPhaseGroup); - }, - getAllPhases() { - return dataset.byPhase.map(convertPhaseGroup); - }, - // ───────────────────────────────────────────────────────────────────── - // FSM Queries - // ───────────────────────────────────────────────────────────────────── - isValidTransition(from, to) { - return isValidTransition(from, to); - }, - checkTransition(from, to) { - const result = validateTransition(from, to); - return { - from: result.from, - to: result.to, - valid: result.valid, - error: result.error, - validAlternatives: result.validAlternatives, - }; - }, - getValidTransitionsFrom(status) { - return getValidTransitionsFrom(status); - }, - getProtectionInfo(status) { - const summary = getProtectionSummary(status); - return { - status, - level: summary.level, - description: summary.description, - canAddDeliverables: summary.canAddDeliverables, - requiresUnlock: summary.requiresUnlock, - }; - }, - // ───────────────────────────────────────────────────────────────────── - // Pattern Queries - // ───────────────────────────────────────────────────────────────────── - getPattern(name) { - return findPatternByName(dataset.patterns, name); - }, - getPatternDependencies(name) { - const entry = relationshipIndex[name]; - if (!entry) { - // Try to find by scanning patterns - const pattern = this.getPattern(name); - if (!pattern) - return undefined; - return { - dependsOn: pattern.dependsOn ?? [], - enables: pattern.enables ?? [], - uses: pattern.uses ?? [], - usedBy: pattern.usedBy ?? [], - }; - } - return { - dependsOn: entry.dependsOn, - enables: entry.enables, - uses: entry.uses, - usedBy: entry.usedBy, - }; - }, - getPatternRelationships(name) { - const entry = relationshipIndex[name]; - if (!entry) { - // Try to find by scanning patterns - const pattern = this.getPattern(name); - if (!pattern) - return undefined; - return { - dependsOn: pattern.dependsOn ?? [], - enables: pattern.enables ?? [], - uses: pattern.uses ?? [], - usedBy: pattern.usedBy ?? [], - implementsPatterns: pattern.implementsPatterns ?? [], - implementedBy: [], - extendsPattern: pattern.extendsPattern, - extendedBy: [], - seeAlso: pattern.seeAlso ?? [], - apiRef: pattern.apiRef ?? [], - }; - } - return { - dependsOn: entry.dependsOn, - enables: entry.enables, - uses: entry.uses, - usedBy: entry.usedBy, - implementsPatterns: entry.implementsPatterns, - implementedBy: entry.implementedBy, - extendsPattern: entry.extendsPattern, - extendedBy: entry.extendedBy, - seeAlso: entry.seeAlso, - apiRef: entry.apiRef, - }; - }, - getRelatedPatterns(name) { - const entry = relationshipIndex[name]; - if (!entry) { - const pattern = this.getPattern(name); - return pattern?.seeAlso ?? []; - } - return entry.seeAlso; - }, - getApiReferences(name) { - const entry = relationshipIndex[name]; - if (!entry) { - const pattern = this.getPattern(name); - return pattern?.apiRef ?? []; - } - return entry.apiRef; - }, - getPatternDeliverables(name) { - const pattern = this.getPattern(name); - if (!pattern?.deliverables) - return []; - return pattern.deliverables.map((d) => ({ - name: d.name, - status: d.status, - tests: d.tests, - location: d.location, - finding: d.finding, - release: d.release, - })); - }, - getPatternsByCategory(category) { - return dataset.byCategory[category] ?? []; - }, - getCategories() { - return Object.entries(dataset.byCategory) - .map(([category, patterns]) => ({ - category, - count: patterns.length, - })) - .sort((a, b) => b.count - a.count); - }, - // ───────────────────────────────────────────────────────────────────── - // Timeline Queries - // ───────────────────────────────────────────────────────────────────── - getPatternsByQuarter(quarter) { - return dataset.byQuarter[quarter] ?? []; - }, - getQuarters() { - return Object.entries(dataset.byQuarter) - .map(([quarter, patterns]) => { - const counts = { - completed: patterns.filter((p) => isPatternComplete(p.status)).length, - active: patterns.filter((p) => isPatternActive(p.status)).length, - planned: patterns.filter((p) => isPatternPlanned(p.status)).length, - total: patterns.length, - }; - return { quarter, patterns, counts }; - }) - .sort((a, b) => a.quarter.localeCompare(b.quarter)); - }, - getCurrentWork() { - return filterByExactStatus('active'); - }, - getRoadmapItems() { - const roadmap = filterByExactStatus('roadmap'); - const deferred = filterByExactStatus('deferred'); - return [...roadmap, ...deferred]; - }, - getRecentlyCompleted(limit = 10) { - const completed = filterByExactStatus('completed'); - // Sort by completion date if available - return completed - .filter((p) => p.completed) - .sort((a, b) => { - const dateA = a.completed ?? ''; - const dateB = b.completed ?? ''; - return dateB.localeCompare(dateA); // Descending - }) - .slice(0, limit); - }, - // ───────────────────────────────────────────────────────────────────── - // Raw Access - // ───────────────────────────────────────────────────────────────────── - getMasterDataset() { - return dataset; - }, - }; -} -//# sourceMappingURL=process-state.js.map \ No newline at end of file diff --git a/dist/api/process-state.js.map b/dist/api/process-state.js.map deleted file mode 100644 index 1cd2c795..00000000 --- a/dist/api/process-state.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"process-state.js","sourceRoot":"","sources":["../../src/api/process-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAQH,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,gBAAgB,GACjB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAwOzD,gFAAgF;AAChF,mCAAmC;AACnC,gFAAgF;AAEhF;;;;;GAKG;AACH,MAAM,UAAU,qBAAqB,CAAC,OAAsB;IAC1D,8CAA8C;IAC9C,SAAS,mBAAmB,CAAC,MAA0B;QACrD,OAAO,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC;IAC7D,CAAC;IAED,mDAAmD;IACnD,SAAS,iBAAiB,CAAC,GAAqB;QAC9C,OAAO;YACL,WAAW,EAAE,GAAG,CAAC,WAAW;YAC5B,SAAS,EAAE,GAAG,CAAC,SAAS;YACxB,QAAQ,EAAE,GAAG,CAAC,QAAQ;YACtB,MAAM,EAAE,GAAG,CAAC,MAAM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AAO,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,aAAa;YAClD,CAAC,CAAC;iBACD,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;QACrB,CAAC;QAED,wEAAwE;QACxE,aAAa;QACb,wEAAwE;QAExE,gBAAgB;YACd,OAAO,OAAO,CAAC;QACjB,CAAC;KACF,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/dist/api/rules-query.d.ts b/dist/api/rules-query.d.ts deleted file mode 100644 index cb2c99f2..00000000 --- a/dist/api/rules-query.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern RulesQueryModule - * @libar-docs-status completed - * @libar-docs-implements ProcessAPILayeredExtraction - * @libar-docs-product-area DataAPI - * @libar-docs-uses BusinessRulesCodec, CodecHelpers - * - * ## RulesQueryModule - Business Rules Domain Query - * - * Pure query function for business rules extracted from Gherkin Rule: blocks. - * Groups rules by product area, phase, and feature pattern. - * - * Target: src/api/rules-query.ts - * See: DD-4 (ProcessAPILayeredExtraction) - */ -import type { RuntimeMasterDataset } from '../generators/pipeline/index.js'; -export interface RulesFilters { - productArea: string | null; - patternName: string | null; - onlyInvariants: boolean; -} -export interface RuleOutput { - readonly name: string; - readonly invariant: string | undefined; - readonly rationale: string | undefined; - readonly verifiedBy: readonly string[]; - readonly scenarioCount: number; -} -export interface RulesQueryResult { - readonly productAreas: ReadonlyArray<{ - readonly productArea: string; - readonly ruleCount: number; - readonly invariantCount: number; - readonly phases: ReadonlyArray<{ - readonly phase: string; - readonly features: ReadonlyArray<{ - readonly pattern: string; - readonly source: string; - readonly rules: readonly RuleOutput[]; - }>; - }>; - }>; - readonly totalRules: number; - readonly totalInvariants: number; - readonly allRuleNames: readonly string[]; - readonly hint?: string; -} -/** - * Query business rules from the MasterDataset, grouped by product area, - * phase, and feature pattern. - * - * DD-4: Pure function taking RuntimeMasterDataset and RulesFilters. - * All Map/Set construction lives here, not in the CLI handler. - */ -export declare function queryBusinessRules(dataset: RuntimeMasterDataset, filters: RulesFilters): RulesQueryResult; -//# sourceMappingURL=rules-query.d.ts.map \ No newline at end of file diff --git a/dist/api/rules-query.d.ts.map b/dist/api/rules-query.d.ts.map deleted file mode 100644 index 294dd02d..00000000 --- a/dist/api/rules-query.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"rules-query.d.ts","sourceRoot":"","sources":["../../src/api/rules-query.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAMH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAM5E,MAAM,WAAW,YAAY;IAC3B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,cAAc,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAChC;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,YAAY,EAAE,aAAa,CAAC;QACnC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;QAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;QAC3B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;QAChC,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;YAC7B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;YACvB,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC;gBAC/B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;gBACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;gBACxB,QAAQ,CAAC,KAAK,EAAE,SAAS,UAAU,EAAE,CAAC;aACvC,CAAC,CAAC;SACJ,CAAC,CAAC;KACJ,CAAC,CAAC;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAMD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,YAAY,GACpB,gBAAgB,CAoKlB"} \ No newline at end of file diff --git a/dist/api/rules-query.js b/dist/api/rules-query.js deleted file mode 100644 index 5782bfef..00000000 --- a/dist/api/rules-query.js +++ /dev/null @@ -1,152 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern RulesQueryModule - * @libar-docs-status completed - * @libar-docs-implements ProcessAPILayeredExtraction - * @libar-docs-product-area DataAPI - * @libar-docs-uses BusinessRulesCodec, CodecHelpers - * - * ## RulesQueryModule - Business Rules Domain Query - * - * Pure query function for business rules extracted from Gherkin Rule: blocks. - * Groups rules by product area, phase, and feature pattern. - * - * Target: src/api/rules-query.ts - * See: DD-4 (ProcessAPILayeredExtraction) - */ -import { parseBusinessRuleAnnotations } from '../renderable/codecs/helpers.js'; -import { deduplicateScenarioNames } from '../renderable/codecs/business-rules.js'; -import { QueryApiError } from './types.js'; -// ═══════════════════════════════════════════════════════════════════════════ -// Query Function -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Query business rules from the MasterDataset, grouped by product area, - * phase, and feature pattern. - * - * DD-4: Pure function taking RuntimeMasterDataset and RulesFilters. - * All Map/Set construction lives here, not in the CLI handler. - */ -export function queryBusinessRules(dataset, filters) { - // Collect patterns with rules, applying filters - let patternsWithRules = dataset.patterns.filter((p) => p.rules !== undefined && p.rules.length > 0); - if (filters.productArea !== null) { - const area = filters.productArea.toLowerCase(); - patternsWithRules = patternsWithRules.filter((p) => p.productArea?.toLowerCase() === area); - } - if (filters.patternName !== null) { - const name = filters.patternName.toLowerCase(); - patternsWithRules = patternsWithRules.filter((p) => p.name.toLowerCase() === name); - } - // Build structured output grouped by product area → phase → feature - const areaMap = new Map(); - let totalRules = 0; - let totalInvariants = 0; - const allRuleNames = []; - for (const pattern of patternsWithRules) { - const area = pattern.productArea ?? 'Platform'; - const phase = pattern.phase !== undefined - ? `Phase ${String(pattern.phase)}` - : (pattern.release ?? 'Uncategorized'); - if (!areaMap.has(area)) { - areaMap.set(area, { features: new Map() }); - } - const areaGroup = areaMap.get(area); - if (areaGroup === undefined) { - throw new Error(`Invariant violation: areaMap missing key "${area}" after set`); - } - const featureKey = `${phase}::${pattern.name}`; - if (!areaGroup.features.has(featureKey)) { - areaGroup.features.set(featureKey, { - pattern: pattern.name, - source: pattern.source.file, - phase, - rules: [], - }); - } - const feature = areaGroup.features.get(featureKey); - if (feature === undefined) { - throw new Error(`Invariant violation: features map missing key "${featureKey}" after set`); - } - // rules guaranteed non-empty by patternsWithRules filter above - if (pattern.rules === undefined) { - throw new Error(`Invariant violation: pattern "${pattern.name}" passed rules filter but has no rules`); - } - for (const rule of pattern.rules) { - let annotations; - try { - annotations = parseBusinessRuleAnnotations(rule.description); - } - catch (err) { - throw new QueryApiError('INVALID_ARGUMENT', `Failed to parse rule "${rule.name}" in "${pattern.name}": ${err instanceof Error ? err.message : String(err)}`); - } - if (filters.onlyInvariants && annotations.invariant === undefined) { - continue; - } - feature.rules.push({ - name: rule.name, - invariant: annotations.invariant, - rationale: annotations.rationale, - verifiedBy: deduplicateScenarioNames(rule.scenarioNames, annotations.verifiedBy), - scenarioCount: rule.scenarioCount, - }); - totalRules++; - if (annotations.invariant !== undefined) { - totalInvariants++; - } - allRuleNames.push(rule.name); - } - } - // Build hint when filters match nothing - let hint; - if (totalRules === 0 && (filters.productArea !== null || filters.patternName !== null)) { - const availableAreas = [ - ...new Set(dataset.patterns - .filter((p) => p.rules !== undefined && p.rules.length > 0) - .map((p) => p.productArea ?? 'Platform')), - ]; - hint = - filters.productArea !== null - ? `No rules found for product area "${filters.productArea}". Areas with rules: ${availableAreas.join(', ')}` - : `No rules found for pattern "${String(filters.patternName)}".`; - } - // Build final grouped output - const productAreas = [...areaMap.entries()].map(([areaName, areaGroup]) => { - const phaseMap = new Map(); - let areaRuleCount = 0; - let areaInvariantCount = 0; - for (const feature of areaGroup.features.values()) { - if (feature.rules.length === 0) - continue; - if (!phaseMap.has(feature.phase)) { - phaseMap.set(feature.phase, []); - } - phaseMap.get(feature.phase)?.push({ - pattern: feature.pattern, - source: feature.source, - rules: feature.rules, - }); - areaRuleCount += feature.rules.length; - areaInvariantCount += feature.rules.filter((r) => r.invariant !== undefined).length; - } - const phases = [...phaseMap.entries()].map(([phaseName, features]) => ({ - phase: phaseName, - features, - })); - return { - productArea: areaName, - ruleCount: areaRuleCount, - invariantCount: areaInvariantCount, - phases, - }; - }); - return { - productAreas: productAreas.filter((a) => a.ruleCount > 0), - totalRules, - totalInvariants, - allRuleNames, - ...(hint !== undefined ? { hint } : {}), - }; -} -//# sourceMappingURL=rules-query.js.map \ No newline at end of file diff --git a/dist/api/rules-query.js.map b/dist/api/rules-query.js.map deleted file mode 100644 index e2c29648..00000000 --- a/dist/api/rules-query.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"rules-query.js","sourceRoot":"","sources":["../../src/api/rules-query.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,4BAA4B,EAAE,MAAM,iCAAiC,CAAC;AAE/E,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAClF,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAyC3C,8EAA8E;AAC9E,iBAAiB;AACjB,8EAA8E;AAE9E;;;;;;GAMG;AACH,MAAM,UAAU,k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AAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,MAAM,CAAC;QACtF,CAAC;QAED,MAAM,MAAM,GAAG,CAAC,GAAG,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,EAAE,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAC;YACrE,KAAK,EAAE,SAAS;YAChB,QAAQ;SACT,CAAC,CAAC,CAAC;QAEJ,OAAO;YACL,WAAW,EAAE,QAAQ;YACrB,SAAS,EAAE,aAAa;YACxB,cAAc,EAAE,kBAAkB;YAClC,MAAM;SACP,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,OAAO;QACL,YAAY,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC;QACzD,UAAU;QACV,eAAe;QACf,YAAY;QACZ,GAAG,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACxC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/dist/api/scope-validator.d.ts b/dist/api/scope-validator.d.ts deleted file mode 100644 index 0d8c1df0..00000000 --- a/dist/api/scope-validator.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -/** - * @libar-docs - * @libar-docs-pattern ScopeValidatorImpl - * @libar-docs-status completed - * @libar-docs-implements DataAPIDesignSessionSupport - * @libar-docs-uses ProcessStateAPI, MasterDataset, StubResolverImpl - * @libar-docs-used-by ProcessAPICLIImpl - * @libar-docs-target src/api/scope-validator.ts - * @libar-docs-arch-role service - * @libar-docs-arch-context api - * @libar-docs-arch-layer application - * - * ## ScopeValidator — Pre-flight Session Readiness Checker - * - * Pure function composition over ProcessStateAPI and MasterDataset. - * Runs a checklist of prerequisite validations before starting a - * design or implementation session. - */ -import type { ProcessStateAPI } from './process-state.js'; -import type { MasterDataset } from '../validation-schemas/master-dataset.js'; -export type CheckSeverity = 'PASS' | 'BLOCKED' | 'WARN'; -export type ScopeCheckId = 'dependencies-completed' | 'stubs-from-deps-exist' | 'deliverables-defined' | 'fsm-allows-transition' | 'design-decisions-recorded' | 'executable-specs-set'; -export interface ValidationCheck { - readonly id: ScopeCheckId; - readonly label: string; - readonly severity: CheckSeverity; - readonly detail: string; - readonly blockerNames?: readonly string[]; -} -export type ScopeType = 'implement' | 'design'; -export interface ScopeValidationOptions { - readonly patternName: string; - readonly scopeType: ScopeType; - readonly baseDir: string; - /** When true, WARN checks are promoted to BLOCKED (DD-4, matches lint-process --strict). */ - readonly strict?: boolean; -} -export interface ScopeValidationResult { - readonly pattern: string; - readonly scopeType: ScopeType; - readonly checks: readonly ValidationCheck[]; - readonly verdict: 'ready' | 'blocked' | 'warnings'; - readonly blockerCount: number; - readonly warnCount: number; -} -export declare function validateScope(api: ProcessStateAPI, dataset: MasterDataset, options: ScopeValidationOptions): ScopeValidationResult; -export declare function formatScopeValidation(result: ScopeValidationResult): string; -export declare function checkDependenciesCompleted(api: ProcessStateAPI, patternName: string): ValidationCheck; -export declare function checkDeliverablesDefined(api: ProcessStateAPI, patternName: string): ValidationCheck; -export declare function checkFsmAllowsTransition(api: ProcessStateAPI, patternName: string): ValidationCheck; -export declare function checkDesignDecisionsRecorded(dataset: MasterDataset, patternName: string): ValidationCheck; -export declare function checkExecutableSpecsSet(api: ProcessStateAPI, patternName: string): ValidationCheck; -export declare function checkStubsFromDepsExist(dataset: MasterDataset, patternName: string, baseDir: string): ValidationCheck; -//# sourceMappingURL=scope-validator.d.ts.map \ No newline at end of file diff --git a/dist/api/scope-validator.d.ts.map b/dist/api/scope-validator.d.ts.map deleted file mode 100644 index 2e9c7f04..00000000 --- a/dist/api/scope-validator.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scope-validator.d.ts","sourceRoot":"","sources":["../../src/api/scope-validator.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AC5B;AAYD,wBAAgB,aAAa,CAC3B,GAAG,EAAE,eAAe,EACpB,OAAO,EAAE,aAAa,EACtB,OAAO,EAAE,sBAAsB,GAC9B,qBAAqB,CA8CvB;AAMD,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,qBAAqB,GAAG,MAAM,CA+B3E;AAMD,wBAAgB,0BAA0B,CACxC,GAAG,EAAE,eAAe,EACpB,WAAW,EAAE,MAAM,GAClB,eAAe,CAsCjB;AAED,wBAAgB,wBAAwB,CACtC,GAAG,EAAE,eAAe,EACpB,WAAW,EAAE,MAAM,GAClB,eAAe,CAkBjB;AAED,wBAAgB,wBAAwB,CACtC,GAAG,EAAE,eAAe,EACpB,WAAW,EAAE,MAAM,GAClB,eAAe,CAkCjB;AAED,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,aAAa,EACtB,WAAW,EAAE,MAAM,GAClB,eAAe,CA8BjB;AAED,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,eAAe,EACpB,WAAW,EAAE,MAAM,GAClB,eAAe,CAkBjB;AAMD,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,aAAa,EACtB,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,GACd,eAAe,CAmDjB"} \ No newline at end of file diff --git a/dist/api/scope-validator.js b/dist/api/scope-validator.js deleted file mode 100644 index 44c0f574..00000000 --- a/dist/api/scope-validator.js +++ /dev/null @@ -1,282 +0,0 @@ -/** - * @libar-docs - * @libar-docs-pattern ScopeValidatorImpl - * @libar-docs-status completed - * @libar-docs-implements DataAPIDesignSessionSupport - * @libar-docs-uses ProcessStateAPI, MasterDataset, StubResolverImpl - * @libar-docs-used-by ProcessAPICLIImpl - * @libar-docs-target src/api/scope-validator.ts - * @libar-docs-arch-role service - * @libar-docs-arch-context api - * @libar-docs-arch-layer application - * - * ## ScopeValidator — Pre-flight Session Readiness Checker - * - * Pure function composition over ProcessStateAPI and MasterDataset. - * Runs a checklist of prerequisite validations before starting a - * design or implementation session. - */ -import { QueryApiError } from './types.js'; -import { getPatternName, findPatternByName, firstImplements } from './pattern-helpers.js'; -import { findStubPatterns, resolveStubs, extractDecisionItems } from './stub-resolver.js'; -import { VALID_PROCESS_STATUS_SET } from '../taxonomy/index.js'; -import { isPatternComplete } from '../taxonomy/normalized-status.js'; -// --------------------------------------------------------------------------- -// Valid statuses for FSM transition checks -// --------------------------------------------------------------------------- -const VALID_STATUSES = VALID_PROCESS_STATUS_SET; -// --------------------------------------------------------------------------- -// Main Entry Point -// --------------------------------------------------------------------------- -export function validateScope(api, dataset, options) { - const { patternName, scopeType, baseDir, strict } = options; - const pattern = api.getPattern(patternName); - if (pattern === undefined) { - throw new QueryApiError('PATTERN_NOT_FOUND', `Pattern not found: "${patternName}"`); - } - const rawChecks = []; - if (scopeType === 'implement') { - rawChecks.push(checkDependenciesCompleted(api, patternName)); - rawChecks.push(checkDeliverablesDefined(api, patternName)); - rawChecks.push(checkFsmAllowsTransition(api, patternName)); - rawChecks.push(checkDesignDecisionsRecorded(dataset, patternName)); - rawChecks.push(checkExecutableSpecsSet(api, patternName)); - } - else { - rawChecks.push(checkStubsFromDepsExist(dataset, patternName, baseDir)); - } - // DD-4: --strict promotes WARN → BLOCKED - const checks = strict === true - ? rawChecks.map((c) => (c.severity === 'WARN' ? { ...c, severity: 'BLOCKED' } : c)) - : rawChecks; - const blockerCount = checks.filter((c) => c.severity === 'BLOCKED').length; - const warnCount = checks.filter((c) => c.severity === 'WARN').length; - let verdict; - if (blockerCount > 0) { - verdict = 'blocked'; - } - else if (warnCount > 0) { - verdict = 'warnings'; - } - else { - verdict = 'ready'; - } - return { - pattern: getPatternName(pattern), - scopeType, - checks, - verdict, - blockerCount, - warnCount, - }; -} -// --------------------------------------------------------------------------- -// Text Formatter (co-located per PDR-002 DD-7) -// --------------------------------------------------------------------------- -export function formatScopeValidation(result) { - const sections = []; - sections.push(`=== SCOPE VALIDATION: ${result.pattern} (${result.scopeType}) ===`); - const checkLines = result.checks.map((c) => { - const blockers = c.blockerNames !== undefined && c.blockerNames.length > 0 - ? `\n Blockers: ${c.blockerNames.join(', ')}` - : ''; - return `[${c.severity}] ${c.label}: ${c.detail}${blockers}`; - }); - sections.push('=== CHECKLIST ===\n' + checkLines.join('\n')); - let verdictText; - if (result.verdict === 'blocked') { - const blockerDetails = result.checks - .filter((c) => c.severity === 'BLOCKED') - .map((c) => `- ${c.label}: ${c.detail}`); - verdictText = - `BLOCKED: ${result.blockerCount} blocker(s) prevent ${result.scopeType} session` + - '\n' + - blockerDetails.join('\n'); - } - else if (result.verdict === 'warnings') { - verdictText = `READY (with ${result.warnCount} warning(s)): ${result.scopeType} session can proceed`; - } - else { - verdictText = `READY: All checks passed for ${result.scopeType} session`; - } - sections.push('=== VERDICT ===\n' + verdictText); - return sections.join('\n\n') + '\n'; -} -// --------------------------------------------------------------------------- -// Composable Check Functions — Implementation Session -// --------------------------------------------------------------------------- -export function checkDependenciesCompleted(api, patternName) { - const deps = api.getPatternDependencies(patternName); - const dependsOn = deps?.dependsOn ?? []; - if (dependsOn.length === 0) { - return { - id: 'dependencies-completed', - label: 'Dependencies completed', - severity: 'PASS', - detail: 'No dependencies', - }; - } - const blockers = []; - for (const depName of dependsOn) { - const depPattern = api.getPattern(depName); - const status = depPattern?.status ?? 'unknown'; - if (!isPatternComplete(depPattern?.status)) { - blockers.push(`${depName} (${status})`); - } - } - if (blockers.length === 0) { - return { - id: 'dependencies-completed', - label: 'Dependencies completed', - severity: 'PASS', - detail: `${dependsOn.length}/${dependsOn.length} completed`, - }; - } - return { - id: 'dependencies-completed', - label: 'Dependencies completed', - severity: 'BLOCKED', - detail: `${dependsOn.length - blockers.length}/${dependsOn.length} completed`, - blockerNames: blockers, - }; -} -export function checkDeliverablesDefined(api, patternName) { - const deliverables = api.getPatternDeliverables(patternName); - if (deliverables.length > 0) { - return { - id: 'deliverables-defined', - label: 'Deliverables defined', - severity: 'PASS', - detail: `${deliverables.length} deliverable(s) found`, - }; - } - return { - id: 'deliverables-defined', - label: 'Deliverables defined', - severity: 'BLOCKED', - detail: 'No deliverables found in Background table', - }; -} -export function checkFsmAllowsTransition(api, patternName) { - const pattern = api.getPattern(patternName); - const status = pattern?.status; - if (status === undefined || !VALID_STATUSES.has(status)) { - return { - id: 'fsm-allows-transition', - label: 'FSM allows transition', - severity: 'BLOCKED', - detail: `Unknown status: ${status ?? 'undefined'}`, - }; - } - const isValid = api.isValidTransition(status, 'active'); - if (isValid) { - return { - id: 'fsm-allows-transition', - label: 'FSM allows transition', - severity: 'PASS', - detail: `${status} → active is valid`, - }; - } - const check = api.checkTransition(status, 'active'); - const alternatives = check.validAlternatives ?? []; - const altText = alternatives.length > 0 ? ` Valid from: ${alternatives.join(', ')}` : ''; - return { - id: 'fsm-allows-transition', - label: 'FSM allows transition', - severity: 'BLOCKED', - detail: `${status} → active is not valid.${altText}`, - }; -} -export function checkDesignDecisionsRecorded(dataset, patternName) { - const stubs = findStubPatterns(dataset); - const lowerName = patternName.toLowerCase(); - const patternStubs = stubs.filter((s) => { - const implName = firstImplements(s); - return implName?.toLowerCase() === lowerName; - }); - let totalDecisions = 0; - for (const stub of patternStubs) { - const decisions = extractDecisionItems(stub.directive.description); - totalDecisions += decisions.length; - } - if (totalDecisions > 0) { - return { - id: 'design-decisions-recorded', - label: 'Design decisions recorded', - severity: 'PASS', - detail: `${totalDecisions} decision(s) found in ${patternStubs.length} stub(s)`, - }; - } - return { - id: 'design-decisions-recorded', - label: 'Design decisions recorded', - severity: 'WARN', - detail: 'No PDR/AD references found in stubs', - }; -} -export function checkExecutableSpecsSet(api, patternName) { - const pattern = api.getPattern(patternName); - if (pattern?.behaviorFile !== undefined) { - return { - id: 'executable-specs-set', - label: 'Executable specs location set', - severity: 'PASS', - detail: pattern.behaviorFile, - }; - } - return { - id: 'executable-specs-set', - label: 'Executable specs location set', - severity: 'WARN', - detail: 'No @executable-specs tag found', - }; -} -// --------------------------------------------------------------------------- -// Composable Check Functions — Design Session -// --------------------------------------------------------------------------- -export function checkStubsFromDepsExist(dataset, patternName, baseDir) { - const pattern = findPatternByName(dataset.patterns, patternName); - const dependsOn = pattern?.dependsOn ?? []; - if (dependsOn.length === 0) { - return { - id: 'stubs-from-deps-exist', - label: 'Stubs from dependencies exist', - severity: 'PASS', - detail: 'No dependencies to check', - }; - } - const allStubs = findStubPatterns(dataset); - const depsWithoutStubs = []; - for (const depName of dependsOn) { - const lowerDep = depName.toLowerCase(); - const depStubs = allStubs.filter((s) => { - const implName = firstImplements(s); - return implName?.toLowerCase() === lowerDep; - }); - if (depStubs.length === 0) { - depsWithoutStubs.push(depName); - continue; - } - const resolved = resolveStubs(depStubs, baseDir); - const anyExists = resolved.some((r) => r.targetExists); - if (!anyExists) { - depsWithoutStubs.push(depName); - } - } - if (depsWithoutStubs.length === 0) { - return { - id: 'stubs-from-deps-exist', - label: 'Stubs from dependencies exist', - severity: 'PASS', - detail: `All ${dependsOn.length} dependencies have stubs`, - }; - } - return { - id: 'stubs-from-deps-exist', - label: 'Stubs from dependencies exist', - severity: 'WARN', - detail: `${depsWithoutStubs.length}/${dependsOn.length} dependencies lack stubs`, - blockerNames: depsWithoutStubs, - }; -} -//# sourceMappingURL=scope-validator.js.map \ No newline at end of file diff --git a/dist/api/scope-validator.js.map b/dist/api/scope-validator.js.map deleted file mode 100644 index 49d1b7d9..00000000 --- a/dist/api/scope-validator.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scope-validator.js","sourceRoot":"","sources":["../../src/api/scope-validator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC1F,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1F,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC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/stub-resolver.d.ts +++ /dev/null @@ -1,115 +0,0 @@ -/** - * @libar-docs - * @libar-docs-pattern StubResolverImpl - * @libar-docs-status active - * @libar-docs-implements DataAPIStubIntegration - * @libar-docs-uses ProcessStateAPI - * @libar-docs-used-by ProcessAPICLIImpl - * - * ## StubResolver — Design Stub Discovery and Resolution - * - * Identifies design session stubs in the MasterDataset and resolves them - * against the filesystem to determine implementation status. - * - * Stub identification heuristic: - * - Source file path contains `/stubs/` (lives in stubs directory), OR - * - Pattern has a `targetPath` field (from @libar-docs-target tag) - * - * Resolution uses a `fileExists` callback (defaulting to `fs.existsSync()`) on - * targetPath — not pipeline data — because target files may not have `@libar-docs` - * annotations. The callback enables testing without filesystem side effects. - */ -import type { ExtractedPattern } from '../validation-schemas/extracted-pattern.js'; -import type { MasterDataset } from '../validation-schemas/master-dataset.js'; -/** - * Result of resolving a single stub against the filesystem. - */ -export interface StubResolution { - /** The stub's pattern name */ - readonly stubName: string; - /** Source file path of the stub */ - readonly stubFile: string; - /** Target implementation path (from @libar-docs-target) */ - readonly targetPath: string; - /** Design session that created this stub (from @libar-docs-since) */ - readonly since: string | undefined; - /** Parent pattern this stub implements (from @libar-docs-implements) */ - readonly implementsPattern: string | undefined; - /** Whether the target file exists on disk */ - readonly targetExists: boolean; -} -/** - * Summary of all stubs grouped by the pattern they implement. - */ -export interface StubSummary { - /** Pattern name that stubs implement */ - readonly pattern: string; - /** All stubs for this pattern */ - readonly stubs: readonly StubResolution[]; - /** Count of resolved (target exists) stubs */ - readonly resolvedCount: number; - /** Count of unresolved (target missing) stubs */ - readonly unresolvedCount: number; -} -/** - * A single extracted decision item from stub description text. - */ -export interface DecisionItem { - /** Decision ID (e.g., "AD-1") */ - readonly id: string; - /** Description text */ - readonly description: string; - /** Referenced PDR number, if any */ - readonly pdr: string | undefined; -} -/** - * A pattern reference to a PDR. - */ -export interface PdrReference { - /** Pattern name referencing the PDR */ - readonly pattern: string; - /** Where the reference was found */ - readonly source: 'description' | 'seeAlso'; - /** Source file path */ - readonly filePath: string; -} -/** - * Identify stub patterns from the MasterDataset. - * - * A pattern is a stub if: - * 1. Its source file path contains '/stubs/' (lives in stubs directory), OR - * 2. It has a `targetPath` field (from @libar-docs-target tag) - */ -export declare function findStubPatterns(dataset: MasterDataset): readonly ExtractedPattern[]; -/** - * Resolve stubs against the filesystem to determine implementation status. - * - * For each stub pattern with a `targetPath`: - * - Resolves the path relative to baseDir - * - Checks if the target file exists via `fileExists` callback - * - Extracts stub metadata (since, implementsPattern) - */ -export declare function resolveStubs(stubs: readonly ExtractedPattern[], baseDir: string, fileExists?: (path: string) => boolean): readonly StubResolution[]; -/** - * Group stub resolutions by the pattern they implement. - * - * Stubs that share the same `implementsPattern` value are grouped together. - * Stubs without an `implementsPattern` are grouped under their own stubName. - */ -export declare function groupStubsByPattern(resolutions: readonly StubResolution[]): readonly StubSummary[]; -/** - * Extract AD-N decision items from a pattern's description text. - * - * Parses JSDoc description for references like: - * - `AD-1: Unified action model (PDR-011)` - * - `AD-5: Router maps command types to orchestrator` - */ -export declare function extractDecisionItems(description: string): readonly DecisionItem[]; -/** - * Cross-reference all patterns that mention a specific PDR number. - * - * Scans pattern descriptions and seeAlso references - * for `PDR-{number}` occurrences. - */ -export declare function findPdrReferences(patterns: readonly ExtractedPattern[], pdrNumber: string): readonly PdrReference[]; -//# sourceMappingURL=stub-resolver.d.ts.map \ No newline at end of file diff --git a/dist/api/stub-resolver.d.ts.map b/dist/api/stub-resolver.d.ts.map deleted file mode 100644 index 9a63ae44..00000000 --- a/dist/api/stub-resolver.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"stub-resolver.d.ts","sourceRoot":"","sources":["../../src/api/stub-resolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AACnF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;A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,aAAa,GAAG,SAAS,gBAAgB,EAAE,CAIpF;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,SAAS,gBAAgB,EAAE,EAClC,OAAO,EAAE,MAAM,EACf,UAAU,GAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAoB,GACjD,SAAS,cAAc,EAAE,CAe3B;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,SAAS,cAAc,EAAE,GACrC,SAAS,WAAW,EAAE,CAyBxB;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,YAAY,EAAE,CAoBjF;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,SAAS,gBAAgB,EAAE,EACrC,SAAS,EAAE,MAAM,GAChB,SAAS,YAAY,EAAE,CAgCzB"} \ No newline at end of file diff --git a/dist/api/stub-resolver.js b/dist/api/stub-resolver.js deleted file mode 100644 index b1412902..00000000 --- a/dist/api/stub-resolver.js +++ /dev/null @@ -1,152 +0,0 @@ -/** - * @libar-docs - * @libar-docs-pattern StubResolverImpl - * @libar-docs-status active - * @libar-docs-implements DataAPIStubIntegration - * @libar-docs-uses ProcessStateAPI - * @libar-docs-used-by ProcessAPICLIImpl - * - * ## StubResolver — Design Stub Discovery and Resolution - * - * Identifies design session stubs in the MasterDataset and resolves them - * against the filesystem to determine implementation status. - * - * Stub identification heuristic: - * - Source file path contains `/stubs/` (lives in stubs directory), OR - * - Pattern has a `targetPath` field (from @libar-docs-target tag) - * - * Resolution uses a `fileExists` callback (defaulting to `fs.existsSync()`) on - * targetPath — not pipeline data — because target files may not have `@libar-docs` - * annotations. The callback enables testing without filesystem side effects. - */ -import { existsSync } from 'node:fs'; -import { resolve } from 'node:path'; -import { getPatternName, firstImplements } from './pattern-helpers.js'; -// --------------------------------------------------------------------------- -// Functions -// --------------------------------------------------------------------------- -/** - * Identify stub patterns from the MasterDataset. - * - * A pattern is a stub if: - * 1. Its source file path contains '/stubs/' (lives in stubs directory), OR - * 2. It has a `targetPath` field (from @libar-docs-target tag) - */ -export function findStubPatterns(dataset) { - return dataset.patterns.filter((p) => p.source.file.includes('/stubs/') || p.targetPath !== undefined); -} -/** - * Resolve stubs against the filesystem to determine implementation status. - * - * For each stub pattern with a `targetPath`: - * - Resolves the path relative to baseDir - * - Checks if the target file exists via `fileExists` callback - * - Extracts stub metadata (since, implementsPattern) - */ -export function resolveStubs(stubs, baseDir, fileExists = existsSync) { - return stubs.map((stub) => { - const targetPath = stub.targetPath ?? ''; - const absoluteTarget = targetPath !== '' ? resolve(baseDir, targetPath) : ''; - const targetExists = targetPath !== '' && fileExists(absoluteTarget); - return { - stubName: getPatternName(stub), - stubFile: stub.source.file, - targetPath, - since: stub.since, - implementsPattern: firstImplements(stub), - targetExists, - }; - }); -} -/** - * Group stub resolutions by the pattern they implement. - * - * Stubs that share the same `implementsPattern` value are grouped together. - * Stubs without an `implementsPattern` are grouped under their own stubName. - */ -export function groupStubsByPattern(resolutions) { - const groups = new Map(); - for (const resolution of resolutions) { - const key = resolution.implementsPattern ?? resolution.stubName; - const existing = groups.get(key); - if (existing !== undefined) { - existing.push(resolution); - } - else { - groups.set(key, [resolution]); - } - } - const summaries = []; - for (const [pattern, stubs] of groups) { - const resolvedCount = stubs.filter((s) => s.targetExists).length; - summaries.push({ - pattern, - stubs, - resolvedCount, - unresolvedCount: stubs.length - resolvedCount, - }); - } - return summaries.sort((a, b) => a.pattern.localeCompare(b.pattern)); -} -/** - * Extract AD-N decision items from a pattern's description text. - * - * Parses JSDoc description for references like: - * - `AD-1: Unified action model (PDR-011)` - * - `AD-5: Router maps command types to orchestrator` - */ -export function extractDecisionItems(description) { - const items = []; - const regex = /AD-(\d+):\s*(.+?)(?:\s*\(PDR-(\d+)\))?$/gm; - let match = regex.exec(description); - while (match !== null) { - const adNum = match[1]; - const desc = match[2]; - const pdrNum = match[3]; - if (adNum !== undefined && desc !== undefined) { - items.push({ - id: `AD-${adNum}`, - description: desc.trim(), - pdr: pdrNum !== undefined ? `PDR-${pdrNum}` : undefined, - }); - } - match = regex.exec(description); - } - return items; -} -/** - * Cross-reference all patterns that mention a specific PDR number. - * - * Scans pattern descriptions and seeAlso references - * for `PDR-{number}` occurrences. - */ -export function findPdrReferences(patterns, pdrNumber) { - const references = []; - const pdrTag = `PDR-${pdrNumber}`; - for (const pattern of patterns) { - const displayName = getPatternName(pattern); - // Check description text (lives on the directive) - if (pattern.directive.description.includes(pdrTag)) { - references.push({ - pattern: displayName, - source: 'description', - filePath: pattern.source.file, - }); - } - // Check seeAlso references (top-level on ExtractedPattern) - if (pattern.seeAlso !== undefined) { - for (const ref of pattern.seeAlso) { - if (ref.includes(pdrTag)) { - references.push({ - pattern: displayName, - source: 'seeAlso', - filePath: pattern.source.file, - }); - break; // One reference per pattern per source - } - } - } - } - return references; -} -//# sourceMappingURL=stub-resolver.js.map \ No newline at end of file diff --git a/dist/api/stub-resolver.js.map b/dist/api/stub-resolver.js.map deleted file mode 100644 index d0f5b903..00000000 --- a/dist/api/stub-resolver.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"stub-resolver.js","sourceRoot":"","sources":["../../src/api/stub-resolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AA8DvE,8EAA8E;AAC9E,YAAY;AACZ,8EAA8E;AAE9E;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAAsB;IACrD,OAAO,OAAO,CAAC,QAAQ,CAAC,MAAM,CAC5B,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS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CAAC;QACL,CAAC;QACD,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAClC,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAC/B,QAAqC,EACrC,SAAiB;IAEjB,MAAM,UAAU,GAAmB,EAAE,CAAC;IACtC,MAAM,MAAM,GAAG,OAAO,SAAS,EAAE,CAAC;IAElC,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,MAAM,WAAW,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;QAE5C,kDAAkD;QAClD,IAAI,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;YACnD,UAAU,CAAC,IAAI,CAAC;gBACd,OAAO,EAAE,WAAW;gBACpB,MAAM,EAAE,aAAa;gBACrB,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,IAAI;aAC9B,CAAC,CAAC;QACL,CAAC;QAED,2DAA2D;QAC3D,IAAI,OAAO,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;YAClC,KAAK,MAAM,GAAG,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;gBAClC,IAAI,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;oBACzB,UAAU,CAAC,IAAI,CAAC;wBACd,OAAO,EAAE,WAAW;wBACpB,MAAM,EAAE,SAAS;wBACjB,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,IAAI;qBAC9B,CAAC,CAAC;oBACH,MAAM,CAAC,uCAAuC;gBAChD,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,UAAU,CAAC;AACpB,CAAC"} \ No newline at end of file diff --git a/dist/api/summarize.d.ts b/dist/api/summarize.d.ts deleted file mode 100644 index 5f78e7ee..00000000 --- a/dist/api/summarize.d.ts +++ /dev/null @@ -1,73 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern PatternSummarizerImpl - * @libar-docs-status active - * @libar-docs-implements DataAPIOutputShaping - * @libar-docs-uses ProcessStateAPI - * @libar-docs-used-by OutputPipeline, ProcessAPICLIImpl - * @libar-docs-arch-role service - * @libar-docs-arch-context api - * @libar-docs-arch-layer application - * - * ## PatternSummarizer — Compact Pattern Projection - * - * Projects the full ExtractedPattern (~3.5KB per pattern) down to a - * PatternSummary (~100 bytes) for list queries. Reduces CLI output - * from ~594KB to ~4KB for typical codebases. - * - * Uses Zod schema-first pattern: PatternSummarySchema defines the type, - * and PatternSummary is inferred from it. - */ -import { z } from 'zod'; -import type { ExtractedPattern } from '../validation-schemas/extracted-pattern.js'; -/** - * Compact projection of ExtractedPattern for list queries. - * - * Fields selected for maximum information density at minimum size: - * - patternName: identifies the pattern - * - status: FSM state (roadmap/active/completed/deferred) - * - category: domain classification - * - phase: roadmap phase number (for sequencing) - * - file: source file path (for navigation) - * - source: typescript or gherkin (for filtering) - */ -export declare const PatternSummarySchema: z.ZodObject<{ - patternName: z.ZodString; - status: z.ZodOptional; - category: z.ZodString; - phase: z.ZodOptional; - file: z.ZodString; - source: z.ZodEnum<{ - typescript: "typescript"; - gherkin: "gherkin"; - }>; -}, z.core.$strip>; -export type PatternSummary = z.infer; -/** - * Valid field names for PatternSummary, used by --fields validation. - */ -export declare const SUMMARY_FIELDS: ReadonlySet; -/** - * Derive source type from file extension. - */ -export declare function deriveSource(filePath: string): 'typescript' | 'gherkin'; -/** - * Project an ExtractedPattern to a compact PatternSummary. - * - * - `patternName` prefers explicit @libar-docs-pattern tag, falls back to `name` - * - `source` is derived from file extension (.feature -> gherkin, else typescript) - * - Optional fields (status, phase) are included when present, omitted when undefined - * - * @param pattern - Full ExtractedPattern from the pipeline - * @returns Compact PatternSummary (~100 bytes JSON) - */ -export declare function summarizePattern(pattern: ExtractedPattern): PatternSummary; -/** - * Project an array of ExtractedPatterns to compact summaries. - * - * @param patterns - Array of ExtractedPatterns - * @returns Array of PatternSummary objects - */ -export declare function summarizePatterns(patterns: readonly ExtractedPattern[]): readonly PatternSummary[]; -//# sourceMappingURL=summarize.d.ts.map \ No newline at end of file diff --git a/dist/api/summarize.d.ts.map b/dist/api/summarize.d.ts.map deleted file mode 100644 index a96e0da9..00000000 --- a/dist/api/summarize.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"summarize.d.ts","sourceRoot":"","sources":["../../src/api/summarize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAOnF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;iBAO/B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,WAAW,CAAC,MAAM,CAO7C,CAAC;AAMH;;GAEG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAEvE;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,gBAAgB,GAAG,cAAc,CAS1E;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,SAAS,gBAAgB,EAAE,GACpC,SAAS,cAAc,EAAE,CAE3B"} \ No newline at end of file diff --git a/dist/api/summarize.js b/dist/api/summarize.js deleted file mode 100644 index f6917724..00000000 --- a/dist/api/summarize.js +++ /dev/null @@ -1,95 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern PatternSummarizerImpl - * @libar-docs-status active - * @libar-docs-implements DataAPIOutputShaping - * @libar-docs-uses ProcessStateAPI - * @libar-docs-used-by OutputPipeline, ProcessAPICLIImpl - * @libar-docs-arch-role service - * @libar-docs-arch-context api - * @libar-docs-arch-layer application - * - * ## PatternSummarizer — Compact Pattern Projection - * - * Projects the full ExtractedPattern (~3.5KB per pattern) down to a - * PatternSummary (~100 bytes) for list queries. Reduces CLI output - * from ~594KB to ~4KB for typical codebases. - * - * Uses Zod schema-first pattern: PatternSummarySchema defines the type, - * and PatternSummary is inferred from it. - */ -import { z } from 'zod'; -import { getPatternName } from './pattern-helpers.js'; -// --------------------------------------------------------------------------- -// Schema -// --------------------------------------------------------------------------- -/** - * Compact projection of ExtractedPattern for list queries. - * - * Fields selected for maximum information density at minimum size: - * - patternName: identifies the pattern - * - status: FSM state (roadmap/active/completed/deferred) - * - category: domain classification - * - phase: roadmap phase number (for sequencing) - * - file: source file path (for navigation) - * - source: typescript or gherkin (for filtering) - */ -export const PatternSummarySchema = z.object({ - patternName: z.string(), - status: z.string().optional(), - category: z.string(), - phase: z.number().int().optional(), - file: z.string(), - source: z.enum(['typescript', 'gherkin']), -}); -/** - * Valid field names for PatternSummary, used by --fields validation. - */ -export const SUMMARY_FIELDS = new Set([ - 'patternName', - 'status', - 'category', - 'phase', - 'file', - 'source', -]); -// --------------------------------------------------------------------------- -// Functions -// --------------------------------------------------------------------------- -/** - * Derive source type from file extension. - */ -export function deriveSource(filePath) { - return filePath.endsWith('.feature') ? 'gherkin' : 'typescript'; -} -/** - * Project an ExtractedPattern to a compact PatternSummary. - * - * - `patternName` prefers explicit @libar-docs-pattern tag, falls back to `name` - * - `source` is derived from file extension (.feature -> gherkin, else typescript) - * - Optional fields (status, phase) are included when present, omitted when undefined - * - * @param pattern - Full ExtractedPattern from the pipeline - * @returns Compact PatternSummary (~100 bytes JSON) - */ -export function summarizePattern(pattern) { - return { - patternName: getPatternName(pattern), - category: pattern.category, - file: pattern.source.file, - source: deriveSource(pattern.source.file), - ...(pattern.status !== undefined && { status: pattern.status }), - ...(pattern.phase !== undefined && { phase: pattern.phase }), - }; -} -/** - * Project an array of ExtractedPatterns to compact summaries. - * - * @param patterns - Array of ExtractedPatterns - * @returns Array of PatternSummary objects - */ -export function summarizePatterns(patterns) { - return patterns.map(summarizePattern); -} -//# sourceMappingURL=summarize.js.map \ No newline at end of file diff --git a/dist/api/summarize.js.map b/dist/api/summarize.js.map deleted file mode 100644 index 7a589e0b..00000000 --- a/dist/api/summarize.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"summarize.js","sourceRoot":"","sources":["../../src/api/summarize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,8EAA8E;AAC9E,SAAS;AACT,8EAA8E;AAE9E;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IAClC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;CAC1C,CAAC,CAAC;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAwB,IAAI,GAAG,CAAC;IACzD,aAAa;IACb,QAAQ;IACR,UAAU;IACV,OAAO;IACP,MAAM;IACN,QAAQ;CACT,CAAC,CAAC;AAEH,8EAA8E;AAC9E,YAAY;AACZ,8EAA8E;AAE9E;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,QAAgB;IAC3C,OAAO,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC;AAClE,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAAyB;IACxD,OAAO;QACL,WAAW,EAAE,cAAc,CAAC,OAAO,CAAC;QACpC,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,IAAI;QACzB,MAAM,EAAE,YAAY,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC;QACzC,GAAG,CAAC,OAAO,CAAC,MAAM,KAAK,SAAS,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC;QAC/D,GAAG,CAAC,OAAO,CAAC,KAAK,KAAK,SAAS,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC;KAC7D,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAC/B,QAAqC;IAErC,OAAO,QAAQ,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;AACxC,CAAC"} \ No newline at end of file diff --git a/dist/api/types.d.ts b/dist/api/types.d.ts deleted file mode 100644 index 049c3025..00000000 --- a/dist/api/types.d.ts +++ /dev/null @@ -1,204 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern ProcessStateTypes - * @libar-docs-status active - * @libar-docs-depends-on:MasterDataset - * - * ## Process State API Types - * - * Type definitions for the ProcessStateAPI query interface. - * Designed for programmatic access by Claude Code and other tools. - * - * ### When to Use - * - * - Import types when working with ProcessStateAPI responses - * - Use QueryResult for typed response handling - */ -import type { DeliverableStatus, ProcessStatusValue } from '../taxonomy/index.js'; -import type { ExtractedPattern } from '../validation-schemas/extracted-pattern.js'; -import type { ImplementationRef } from '../validation-schemas/master-dataset.js'; -/** - * Successful query response - */ -export interface QuerySuccess { - success: true; - data: T; - metadata: { - timestamp: string; - patternCount: number; - }; -} -/** - * Error codes for query failures - */ -export type QueryErrorCode = 'INVALID_ARGUMENT' | 'INVALID_STATUS' | 'INVALID_TRANSITION' | 'PATTERN_NOT_FOUND' | 'PHASE_NOT_FOUND' | 'QUARTER_NOT_FOUND' | 'CATEGORY_NOT_FOUND' | 'CONTEXT_NOT_FOUND' | 'STUB_NOT_FOUND' | 'PDR_NOT_FOUND' | 'CONTEXT_ASSEMBLY_ERROR' | 'UNKNOWN_METHOD'; -/** - * Failed query response - */ -export interface QueryError { - success: false; - error: string; - code: QueryErrorCode; -} -/** - * Query result union type - */ -export type QueryResult = QuerySuccess | QueryError; -/** - * Status counts response - */ -export interface StatusCounts { - completed: number; - active: number; - planned: number; - total: number; -} -/** - * Status distribution with percentages - */ -export interface StatusDistribution { - counts: StatusCounts; - percentages: { - completed: number; - active: number; - planned: number; - }; -} -/** - * Phase progress summary - */ -export interface PhaseProgress { - phaseNumber: number; - phaseName: string | undefined; - completed: number; - active: number; - planned: number; - total: number; - completionPercentage: number; -} -/** - * Phase group with patterns - */ -export interface PhaseGroup { - phaseNumber: number; - phaseName: string | undefined; - patterns: ExtractedPattern[]; - counts: StatusCounts; -} -/** - * Pattern dependencies - */ -export interface PatternDependencies { - /** Patterns this pattern depends on */ - dependsOn: readonly string[]; - /** Patterns this pattern enables */ - enables: readonly string[]; - /** Patterns this pattern uses */ - uses: readonly string[]; - /** Patterns that use this pattern */ - usedBy: readonly string[]; -} -/** - * Complete pattern relationships (includes all relationship types) - * - * Used by ProcessStateAPI.getPatternRelationships() to expose the full - * relationship graph from the MasterDataset's relationshipIndex. - */ -export interface PatternRelationships { - /** Patterns this pattern depends on (from @libar-docs-depends-on) */ - dependsOn: readonly string[]; - /** Patterns this pattern enables (from @libar-docs-enables) */ - enables: readonly string[]; - /** Patterns this pattern uses (from @libar-docs-uses) */ - uses: readonly string[]; - /** Patterns that use this pattern (from @libar-docs-used-by) */ - usedBy: readonly string[]; - /** Patterns this code implements (from @libar-docs-implements) */ - implementsPatterns: readonly string[]; - /** Files that implement this pattern with metadata (computed inverse) */ - implementedBy: readonly ImplementationRef[]; - /** Pattern this extends (from @libar-docs-extends) */ - extendsPattern: string | undefined; - /** Patterns that extend this pattern (computed inverse) */ - extendedBy: readonly string[]; - /** Related patterns for cross-reference without dependency (from @libar-docs-see-also) */ - seeAlso: readonly string[]; - /** File paths to implementation APIs (from @libar-docs-api-ref) */ - apiRef: readonly string[]; -} -/** - * Pattern deliverables from feature files - * - * Matches the DeliverableSchema structure from dual-source.ts - */ -export interface PatternDeliverable { - /** Deliverable name/description */ - name: string; - /** Canonical deliverable status */ - status: DeliverableStatus; - /** Number of tests */ - tests: number; - /** Implementation location */ - location: string; - /** Optional finding ID for review traceability */ - finding: string | undefined; - /** Optional release version for changelog grouping */ - release: string | undefined; -} -/** - * Quarter grouping - */ -export interface QuarterGroup { - quarter: string; - patterns: ExtractedPattern[]; - counts: StatusCounts; -} -/** - * Transition validation result - */ -export interface TransitionCheck { - from: ProcessStatusValue; - to: ProcessStatusValue; - valid: boolean; - error: string | undefined; - validAlternatives: readonly ProcessStatusValue[] | undefined; -} -/** - * Protection level info - */ -export interface ProtectionInfo { - status: ProcessStatusValue; - level: 'none' | 'scope' | 'hard'; - description: string; - canAddDeliverables: boolean; - requiresUnlock: boolean; -} -/** - * Entry for a neighboring pattern with architecture metadata. - * Shared between ContextAssembler and ArchQueries. - */ -export interface NeighborEntry { - readonly name: string; - readonly status: string | undefined; - readonly archRole: string | undefined; - readonly archContext: string | undefined; - readonly file: string | undefined; -} -/** - * Create a success response - */ -export declare function createSuccess(data: T, patternCount: number): QuerySuccess; -/** - * Create an error response - */ -export declare function createError(code: QueryErrorCode, message: string): QueryError; -/** - * Structured error for API and CLI domain errors. - * Caught at the CLI boundary and converted to QueryError envelope. - */ -export declare class QueryApiError extends Error { - readonly code: QueryErrorCode; - constructor(code: QueryErrorCode, message: string); -} -//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/dist/api/types.d.ts.map b/dist/api/types.d.ts.map deleted file mode 100644 index 5eb0a62b..00000000 --- a/dist/api/types.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/api/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAClF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AACnF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAMjF;;GAEG;AACH,MAAM,WAAW,YAAY,CAAC,CAAC;IAC7B,OAAO,EAAE,IAAI,CAAC;IACd,IAAI,EAAE,CAAC,CAAC;IACR,QAAQ,EAAE;QACR,SAAS,EAAE,MAAM,CAAC;QAClB,YAAY,EAAE,MAAM,CAAC;KACtB,CAAC;CACH;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GACtB,kBAAkB,GAClB,gBAAgB,GAChB,oBAAoB,GACpB,mBAAmB,GACnB,iBAAiB,GACjB,mBAAmB,GACnB,oBAAoB,GACpB,mBAAmB,GACnB,gBAAgB,GAChB,eAAe,GACf,wBAAwB,GACxB,gBAAgB,CAAC;AAErB;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,KAAK,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,cAAc,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI,YAAY,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC;AAM1D;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,YAAY,CAAC;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AAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IACzC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;CACnC;AAMD;;GAEG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,YAAY,EAAE,MAAM,GAAG,YAAY,CAAC,CAAC,CAAC,CAS/E;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,GAAG,UAAU,CAM7E;AAED;;;GAGG;AACH,qBAAa,aAAc,SAAQ,KAAK;IACtC,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;gBAElB,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM;CAKlD"} \ No newline at end of file diff --git a/dist/api/types.js b/dist/api/types.js deleted file mode 100644 index 6f7e0dc5..00000000 --- a/dist/api/types.js +++ /dev/null @@ -1,56 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern ProcessStateTypes - * @libar-docs-status active - * @libar-docs-depends-on:MasterDataset - * - * ## Process State API Types - * - * Type definitions for the ProcessStateAPI query interface. - * Designed for programmatic access by Claude Code and other tools. - * - * ### When to Use - * - * - Import types when working with ProcessStateAPI responses - * - Use QueryResult for typed response handling - */ -// ============================================================================= -// Helper Type for Creating Responses -// ============================================================================= -/** - * Create a success response - */ -export function createSuccess(data, patternCount) { - return { - success: true, - data, - metadata: { - timestamp: new Date().toISOString(), - patternCount, - }, - }; -} -/** - * Create an error response - */ -export function createError(code, message) { - return { - success: false, - error: message, - code, - }; -} -/** - * Structured error for API and CLI domain errors. - * Caught at the CLI boundary and converted to QueryError envelope. - */ -export class QueryApiError extends Error { - code; - constructor(code, message) { - super(message); - this.name = 'QueryApiError'; - this.code = code; - } -} -//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/dist/api/types.js.map b/dist/api/types.js.map deleted file mode 100644 index c51c3765..00000000 --- a/dist/api/types.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/api/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAoOH,gFAAgF;AAChF,qCAAqC;AACrC,gFAAgF;AAEhF;;GAEG;AACH,MAAM,UAAU,aAAa,CAAI,IAAO,EAAE,YAAoB;IAC5D,OAAO;QACL,OAAO,EAAE,IAAI;QACb,IAAI;QACJ,QAAQ,EAAE;YACR,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACnC,YAAY;SACb;KACF,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,IAAoB,EAAE,OAAe;IAC/D,OAAO;QACL,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,OAAO;QACd,IAAI;KACL,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,OAAO,aAAc,SAAQ,KAAK;IAC7B,IAAI,CAAiB;IAE9B,YAAY,IAAoB,EAAE,OAAe;QAC/C,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;QAC5B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF"} \ No newline at end of file diff --git a/dist/cache/file-cache.d.ts b/dist/cache/file-cache.d.ts deleted file mode 100644 index ee2e26cf..00000000 --- a/dist/cache/file-cache.d.ts +++ /dev/null @@ -1,70 +0,0 @@ -/** - * @libar-docs - * @libar-docs-pattern FileCache - * @libar-docs-status active - * @libar-docs-arch-role infrastructure - * @libar-docs-arch-context generator - * @libar-docs-arch-layer infrastructure - * - * ## File Cache - Request-Scoped Content Caching - * - * Simple Map-based cache for file contents during a single generation run. - * Avoids repeated disk reads for files accessed multiple times during - * extraction and deduplication phases. - * - * ### Design Rationale - * - * - **Request-scoped**: Created fresh per orchestrator run, naturally cleared when done - * - **No eviction needed**: Generation runs are bounded in duration and file count - * - **Thread-safe**: Single-threaded Node.js, no locking required - * - **Stats tracking**: Optional hit/miss tracking for performance analysis - */ -/** - * File content cache interface - */ -export interface FileCache { - /** Get cached content by absolute path */ - get(path: string): string | undefined; - /** Store content in cache */ - set(path: string, content: string): void; - /** Check if path is cached */ - has(path: string): boolean; - /** Clear all cached content */ - clear(): void; - /** Get cache statistics */ - getStats(): FileCacheStats; -} -/** - * Cache statistics for performance analysis - */ -export interface FileCacheStats { - /** Number of cache hits */ - hits: number; - /** Number of cache misses */ - misses: number; - /** Number of entries currently in cache */ - size: number; - /** Hit rate as percentage (0-100) */ - hitRate: number; -} -/** - * Create a new file content cache - * - * @returns Fresh FileCache instance - * - * @example - * ```typescript - * const cache = createFileCache(); - * - * // First access reads from disk - * const content = await readFile(path); - * cache.set(path, content); - * - * // Subsequent access uses cache - * if (cache.has(path)) { - * return cache.get(path); - * } - * ``` - */ -export declare function createFileCache(): FileCache; -//# sourceMappingURL=file-cache.d.ts.map \ No newline at end of file diff --git a/dist/cache/file-cache.d.ts.map b/dist/cache/file-cache.d.ts.map deleted file mode 100644 index 5ba8fecc..00000000 --- a/dist/cache/file-cache.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"file-cache.d.ts","sourceRoot":"","sources":["../../src/cache/file-cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,0CAA0C;IAC1C,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAEtC,6BAA6B;IAC7B,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzC,8BAA8B;IAC9B,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IAE3B,+BAA+B;IAC/B,KAAK,IAAI,IAAI,CAAC;IAEd,2BAA2B;IAC3B,QAAQ,IAAI,cAAc,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,2BAA2B;IAC3B,IAAI,EAAE,MAAM,CAAC;IAEb,6BAA6B;IAC7B,MAAM,EAAE,MAAM,CAAC;IAEf,2CAA2C;IAC3C,IAAI,EAAE,MAAM,CAAC;IAEb,qCAAqC;IACrC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,eAAe,IAAI,SAAS,CAwC3C"} \ No newline at end of file diff --git a/dist/cache/file-cache.js b/dist/cache/file-cache.js deleted file mode 100644 index 8be97538..00000000 --- a/dist/cache/file-cache.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * @libar-docs - * @libar-docs-pattern FileCache - * @libar-docs-status active - * @libar-docs-arch-role infrastructure - * @libar-docs-arch-context generator - * @libar-docs-arch-layer infrastructure - * - * ## File Cache - Request-Scoped Content Caching - * - * Simple Map-based cache for file contents during a single generation run. - * Avoids repeated disk reads for files accessed multiple times during - * extraction and deduplication phases. - * - * ### Design Rationale - * - * - **Request-scoped**: Created fresh per orchestrator run, naturally cleared when done - * - **No eviction needed**: Generation runs are bounded in duration and file count - * - **Thread-safe**: Single-threaded Node.js, no locking required - * - **Stats tracking**: Optional hit/miss tracking for performance analysis - */ -/** - * Create a new file content cache - * - * @returns Fresh FileCache instance - * - * @example - * ```typescript - * const cache = createFileCache(); - * - * // First access reads from disk - * const content = await readFile(path); - * cache.set(path, content); - * - * // Subsequent access uses cache - * if (cache.has(path)) { - * return cache.get(path); - * } - * ``` - */ -export function createFileCache() { - const store = new Map(); - let hits = 0; - let misses = 0; - return { - get(path) { - const content = store.get(path); - if (content !== undefined) { - hits++; - } - else { - misses++; - } - return content; - }, - set(path, content) { - store.set(path, content); - }, - has(path) { - return store.has(path); - }, - clear() { - store.clear(); - hits = 0; - misses = 0; - }, - getStats() { - const total = hits + misses; - return { - hits, - misses, - size: store.size, - hitRate: total > 0 ? (hits / total) * 100 : 0, - }; - }, - }; -} -//# sourceMappingURL=file-cache.js.map \ No newline at end of file diff --git a/dist/cache/file-cache.js.map b/dist/cache/file-cache.js.map deleted file mode 100644 index e62cff2c..00000000 --- a/dist/cache/file-cache.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"file-cache.js","sourceRoot":"","sources":["../../src/cache/file-cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAuCH;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,eAAe;IAC7B,MAAM,KAAK,GAAG,IAAI,GAAG,EAAkB,CAAC;IACxC,IAAI,IAAI,GAAG,CAAC,CAAC;IACb,IAAI,MAAM,GAAG,CAAC,CAAC;IAEf,OAAO;QACL,GAAG,CAAC,IAAY;YACd,MAAM,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YAChC,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;gBAC1B,IAAI,EAAE,CAAC;YACT,CAAC;iBAAM,CAAC;gBACN,MAAM,EAAE,CAAC;YACX,CAAC;YACD,OAAO,OAAO,CAAC;QACjB,CAAC;QAED,GAAG,CAAC,IAAY,EAAE,OAAe;YAC/B,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC3B,CAAC;QAED,GAAG,CAAC,IAAY;YACd,OAAO,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACzB,CAAC;QAED,KAAK;YACH,KAAK,CAAC,KAAK,EAAE,CAAC;YACd,IAAI,GAAG,CAAC,CAAC;YACT,MAAM,GAAG,CAAC,CAAC;QACb,CAAC;QAED,QAAQ;YACN,MAAM,KAAK,GAAG,IAAI,GAAG,MAAM,CAAC;YAC5B,OAAO;gBACL,IAAI;gBACJ,MAAM;gBACN,IAAI,EAAE,KAAK,CAAC,IAAI;gBAChB,OAAO,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;aAC9C,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/dist/cache/index.d.ts b/dist/cache/index.d.ts deleted file mode 100644 index 603c27e9..00000000 --- a/dist/cache/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -/** - * Cache module exports - */ -export { createFileCache, type FileCache, type FileCacheStats } from './file-cache.js'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/dist/cache/index.d.ts.map b/dist/cache/index.d.ts.map deleted file mode 100644 index 123dc569..00000000 --- a/dist/cache/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cache/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,eAAe,EAAE,KAAK,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC"} \ No newline at end of file diff --git a/dist/cache/index.js b/dist/cache/index.js deleted file mode 100644 index 491f8281..00000000 --- a/dist/cache/index.js +++ /dev/null @@ -1,5 +0,0 @@ -/** - * Cache module exports - */ -export { createFileCache } from './file-cache.js'; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/cache/index.js.map b/dist/cache/index.js.map deleted file mode 100644 index 918fe816..00000000 --- a/dist/cache/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cache/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,eAAe,EAAuC,MAAM,iBAAiB,CAAC"} \ No newline at end of file diff --git a/dist/cli/error-handler.d.ts b/dist/cli/error-handler.d.ts deleted file mode 100644 index 6dfabfb5..00000000 --- a/dist/cli/error-handler.d.ts +++ /dev/null @@ -1,84 +0,0 @@ -#!/usr/bin/env node -/** - * @libar-docs - * @libar-docs-cli - * @libar-docs-pattern CLIErrorHandler - * @libar-docs-status completed - * @libar-docs-uses DocError - * @libar-docs-used-by LintPatternsCLI, ValidatePatternsCLI, DocumentationGeneratorCLI - * - * ## CLIErrorHandler - Unified CLI Error Handling Utilities - * - * Provides type-safe error handling for all CLI commands using the - * DocError discriminated union pattern. Ensures structured error - * context is preserved and formatted consistently. - * - * ### When to Use - * - * - In catch blocks of CLI main functions - * - When formatting DocError for console output - * - When checking if an unknown error is a DocError - */ -import type { DocError } from '../types/errors.js'; -/** - * Type guard to check if an unknown value is a DocError - * - * Uses the discriminated union `type` property to identify DocError instances. - * All DocError variants have a `type` string property that uniquely identifies them. - * - * @param error - Unknown error value to check - * @returns True if the error is a DocError with recognized type - * - * @example - * ```typescript - * try { - * await scanPatterns(config); - * } catch (error) { - * if (isDocError(error)) { - * // TypeScript knows error is DocError here - * console.log(error.type, error.message); - * } - * } - * ``` - */ -export declare function isDocError(error: unknown): error is DocError; -/** - * Format a DocError for console output with structured context - * - * Extracts file paths, line numbers, and validation errors from the - * DocError structure and formats them for human-readable output. - * - * @param error - DocError to format - * @returns Formatted error string with context - * - * @example - * ```typescript - * const error = createFileParseError('/path/to/file.ts', 'Syntax error', { line: 42 }); - * console.error(formatDocError(error)); - * // Output: "FILE_PARSE_ERROR: Failed to parse /path/to/file.ts at line 42: Syntax error" - * ``` - */ -export declare function formatDocError(error: DocError): string; -/** - * Unified CLI error handler that formats and exits - * - * Handles both DocError instances and generic Error/unknown values. - * Outputs structured error information and exits with specified code. - * - * @param error - Error to handle (DocError, Error, or unknown) - * @param exitCode - Process exit code (default: 1) - * @returns Never - always calls process.exit - * - * @example - * ```typescript - * async function main(): Promise { - * try { - * await doWork(); - * } catch (error) { - * handleCliError(error, 1); - * } - * } - * ``` - */ -export declare function handleCliError(error: unknown, exitCode?: number): never; -//# sourceMappingURL=error-handler.d.ts.map \ No newline at end of file diff --git a/dist/cli/error-handler.d.ts.map b/dist/cli/error-handler.d.ts.map deleted file mode 100644 index bcbe4902..00000000 --- a/dist/cli/error-handler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"error-handler.d.ts","sourceRoot":"","sources":["../../src/cli/error-handler.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,QAAQ,CA6B5D;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,QAAQ,GAAG,MAAM,CAqFtD;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,SAAI,GAAG,KAAK,CAgBlE"} \ No newline at end of file diff --git a/dist/cli/error-handler.js b/dist/cli/error-handler.js deleted file mode 100644 index 9906fa46..00000000 --- a/dist/cli/error-handler.js +++ /dev/null @@ -1,197 +0,0 @@ -#!/usr/bin/env node -/** - * @libar-docs - * @libar-docs-cli - * @libar-docs-pattern CLIErrorHandler - * @libar-docs-status completed - * @libar-docs-uses DocError - * @libar-docs-used-by LintPatternsCLI, ValidatePatternsCLI, DocumentationGeneratorCLI - * - * ## CLIErrorHandler - Unified CLI Error Handling Utilities - * - * Provides type-safe error handling for all CLI commands using the - * DocError discriminated union pattern. Ensures structured error - * context is preserved and formatted consistently. - * - * ### When to Use - * - * - In catch blocks of CLI main functions - * - When formatting DocError for console output - * - When checking if an unknown error is a DocError - */ -/** - * Type guard to check if an unknown value is a DocError - * - * Uses the discriminated union `type` property to identify DocError instances. - * All DocError variants have a `type` string property that uniquely identifies them. - * - * @param error - Unknown error value to check - * @returns True if the error is a DocError with recognized type - * - * @example - * ```typescript - * try { - * await scanPatterns(config); - * } catch (error) { - * if (isDocError(error)) { - * // TypeScript knows error is DocError here - * console.log(error.type, error.message); - * } - * } - * ``` - */ -export function isDocError(error) { - if (error === null || typeof error !== 'object') { - return false; - } - const maybeError = error; - // Check for required DocError properties - if (typeof maybeError.type !== 'string' || typeof maybeError.message !== 'string') { - return false; - } - // Verify type is one of the known DocError discriminators - const knownTypes = [ - 'FILE_SYSTEM_ERROR', - 'FILE_PARSE_ERROR', - 'DIRECTIVE_VALIDATION_ERROR', - 'PATTERN_VALIDATION_ERROR', - 'REGISTRY_VALIDATION_ERROR', - 'MARKDOWN_GENERATION_ERROR', - 'FILE_WRITE_ERROR', - 'FEATURE_PARSE_ERROR', - 'CONFIG_ERROR', - 'PROCESS_METADATA_VALIDATION_ERROR', - 'DELIVERABLE_VALIDATION_ERROR', - 'GHERKIN_PATTERN_VALIDATION_ERROR', - ]; - return knownTypes.includes(maybeError.type); -} -/** - * Format a DocError for console output with structured context - * - * Extracts file paths, line numbers, and validation errors from the - * DocError structure and formats them for human-readable output. - * - * @param error - DocError to format - * @returns Formatted error string with context - * - * @example - * ```typescript - * const error = createFileParseError('/path/to/file.ts', 'Syntax error', { line: 42 }); - * console.error(formatDocError(error)); - * // Output: "FILE_PARSE_ERROR: Failed to parse /path/to/file.ts at line 42: Syntax error" - * ``` - */ -export function formatDocError(error) { - const lines = []; - // Main error message with type prefix - lines.push(`[${error.type}] ${error.message}`); - // Add structured context based on error type - switch (error.type) { - case 'FILE_SYSTEM_ERROR': - case 'FILE_PARSE_ERROR': - case 'FILE_WRITE_ERROR': - case 'FEATURE_PARSE_ERROR': - if ('file' in error) { - lines.push(` File: ${error.file}`); - } - if ('line' in error && typeof error.line === 'number') { - lines.push(` Line: ${error.line}`); - } - break; - case 'DIRECTIVE_VALIDATION_ERROR': - lines.push(` File: ${error.file}`); - lines.push(` Line: ${error.line}`); - if (error.directive) { - lines.push(` Directive: ${error.directive}`); - } - break; - case 'PATTERN_VALIDATION_ERROR': - case 'GHERKIN_PATTERN_VALIDATION_ERROR': - lines.push(` File: ${error.file}`); - lines.push(` Pattern: ${error.patternName}`); - if ('validationErrors' in error && - Array.isArray(error.validationErrors) && - error.validationErrors.length > 0) { - lines.push(' Validation errors:'); - for (const ve of error.validationErrors) { - lines.push(` - ${ve}`); - } - } - break; - case 'REGISTRY_VALIDATION_ERROR': - lines.push(` Registry: ${error.registryPath}`); - if (error.validationErrors !== undefined && error.validationErrors.length > 0) { - lines.push(' Validation errors:'); - for (const ve of error.validationErrors) { - lines.push(` - ${ve}`); - } - } - break; - case 'PROCESS_METADATA_VALIDATION_ERROR': - case 'DELIVERABLE_VALIDATION_ERROR': - lines.push(` File: ${error.file}`); - if ('deliverableName' in error && error.deliverableName) { - lines.push(` Deliverable: ${error.deliverableName}`); - } - if ('validationErrors' in error && - Array.isArray(error.validationErrors) && - error.validationErrors.length > 0) { - lines.push(' Validation errors:'); - for (const ve of error.validationErrors) { - lines.push(` - ${ve}`); - } - } - break; - case 'CONFIG_ERROR': - lines.push(` Field: ${error.field}`); - if (error.value !== undefined) { - lines.push(` Value: ${JSON.stringify(error.value)}`); - } - break; - case 'MARKDOWN_GENERATION_ERROR': - lines.push(` Pattern ID: ${error.patternId}`); - break; - } - return lines.join('\n'); -} -/** - * Unified CLI error handler that formats and exits - * - * Handles both DocError instances and generic Error/unknown values. - * Outputs structured error information and exits with specified code. - * - * @param error - Error to handle (DocError, Error, or unknown) - * @param exitCode - Process exit code (default: 1) - * @returns Never - always calls process.exit - * - * @example - * ```typescript - * async function main(): Promise { - * try { - * await doWork(); - * } catch (error) { - * handleCliError(error, 1); - * } - * } - * ``` - */ -export function handleCliError(error, exitCode = 1) { - if (isDocError(error)) { - // Structured DocError - format with full context - console.error(formatDocError(error)); - } - else if (error instanceof Error) { - // Standard Error - use message and optionally stack - console.error('Error:', error.message); - if (process.env['DEBUG']) { - console.error('Stack trace:', error.stack); - } - } - else { - // Unknown error type - stringify - console.error('Error:', String(error)); - } - process.exit(exitCode); -} -//# sourceMappingURL=error-handler.js.map \ No newline at end of file diff --git a/dist/cli/error-handler.js.map b/dist/cli/error-handler.js.map deleted file mode 100644 index b18c9c7c..00000000 --- a/dist/cli/error-handler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"error-handler.js","sourceRoot":"","sources":["../../src/cli/error-handler.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;GAmBG;AAIH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,UAAU,CAAC,KAAc;IACvC,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAChD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,UAAU,GAAG,KAA8C,CAAC;IAElE,yCAAyC;IACzC,IAAI,OAAO,UAAU,CAAC,IAAI,KAAK,QAAQ,IAAI,OAAO,UAAU,CAAC,OAAO,KAAK,QAAQ,EAAE,CAAC;QAClF,OAAO,KAAK,CAAC;IACf,CAAC;IAED,0DAA0D;IAC1D,MAAM,UAAU,GAAG;QACjB,mBAAmB;QACnB,kBAAkB;QAClB,4BAA4B;QAC5B,0BAA0B;QAC1B,2BAA2B;QAC3B,2BAA2B;QAC3B,kBAAkB;QAClB,qBAAqB;QACrB,cAAc;QACd,mCAAmC;QACnC,8BAA8B;QAC9B,kCAAkC;KACnC,CAAC;IAEF,OAAO,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;AAC9C,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,cAAc,CAAC,KAAe;IAC5C,MAAM,KAAK,GAAa,EAAE,CAAC;IAE3B,sCAAsC;IACtC,KAAK,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;IAE/C,6CAA6C;IAC7C,QAAQ,KAAK,CAAC,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K,SAAS,EAAE,CAAC;gBAC9B,KAAK,CAAC,IAAI,CAAC,YAAY,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YACxD,CAAC;YACD,MAAM;QAER,KAAK,2BAA2B;YAC9B,KAAK,CAAC,IAAI,CAAC,iBAAiB,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC;YAC/C,MAAM;IACV,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,cAAc,CAAC,KAAc,EAAE,QAAQ,GAAG,CAAC;IACzD,IAAI,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;QACtB,iDAAiD;QACjD,OAAO,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC;IACvC,CAAC;SAAM,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;QAClC,oDAAoD;QACpD,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;QACvC,IAAI,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;YACzB,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;QAC7C,CAAC;IACH,CAAC;SAAM,CAAC;QACN,iCAAiC;QACjC,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IACzC,CAAC;IAED,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AACzB,CAAC"} \ No newline at end of file diff --git a/dist/cli/generate-docs.d.ts b/dist/cli/generate-docs.d.ts deleted file mode 100644 index 7b837e39..00000000 --- a/dist/cli/generate-docs.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env node -/** - * @libar-docs - * @libar-docs-core @libar-docs-cli - * @libar-docs-pattern Documentation Generator CLI - * @libar-docs-status completed - * @libar-docs-uses Orchestrator, Generator Registry - * @libar-docs-used-by npm scripts, CI pipelines - * @libar-docs-usecase "When generating documentation from command line" - * @libar-docs-usecase "When integrating doc generation into npm scripts" - * @libar-docs-extract-shapes CLIConfig - * - * ## generate-docs - Single Entry Point for All Documentation Generation - * - * Replaces multiple specialized CLIs with one unified interface that supports - * multiple generators in a single run. - * - * ### When to Use - * - * - Generating any documentation from annotated TypeScript source - * - Running multiple generators in one command - * - Using delivery-process.config.ts for reproducible builds - * - * ### Key Concepts - * - * - **Multi-Generator**: Run patterns, adrs, overview, custom generators together - * - **Explicit Registration**: Generators must be registered before use - */ -import '../generators/built-in/index.js'; -//# sourceMappingURL=generate-docs.d.ts.map \ No newline at end of file diff --git a/dist/cli/generate-docs.d.ts.map b/dist/cli/generate-docs.d.ts.map deleted file mode 100644 index 4874ef03..00000000 --- a/dist/cli/generate-docs.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"generate-docs.d.ts","sourceRoot":"","sources":["../../src/cli/generate-docs.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AASH,OAAO,iCAAiC,CAAC"} \ No newline at end of file diff --git a/dist/cli/generate-docs.js b/dist/cli/generate-docs.js deleted file mode 100644 index 04a8ed94..00000000 --- a/dist/cli/generate-docs.js +++ /dev/null @@ -1,354 +0,0 @@ -#!/usr/bin/env node -/** - * @libar-docs - * @libar-docs-core @libar-docs-cli - * @libar-docs-pattern Documentation Generator CLI - * @libar-docs-status completed - * @libar-docs-uses Orchestrator, Generator Registry - * @libar-docs-used-by npm scripts, CI pipelines - * @libar-docs-usecase "When generating documentation from command line" - * @libar-docs-usecase "When integrating doc generation into npm scripts" - * @libar-docs-extract-shapes CLIConfig - * - * ## generate-docs - Single Entry Point for All Documentation Generation - * - * Replaces multiple specialized CLIs with one unified interface that supports - * multiple generators in a single run. - * - * ### When to Use - * - * - Generating any documentation from annotated TypeScript source - * - Running multiple generators in one command - * - Using delivery-process.config.ts for reproducible builds - * - * ### Key Concepts - * - * - **Multi-Generator**: Run patterns, adrs, overview, custom generators together - * - **Explicit Registration**: Generators must be registered before use - */ -import * as path from 'path'; -import { generatorRegistry } from '../generators/registry.js'; -import { generateDocumentation, generateFromConfig } from '../generators/orchestrator.js'; -import { loadProjectConfig } from '../config/config-loader.js'; -import { printVersionAndExit } from './version.js'; -// Import built-in generators (registers patterns, adrs, overview) -import '../generators/built-in/index.js'; -function parseArgs(argv = process.argv.slice(2)) { - const config = { - input: [], - exclude: [], - output: 'docs/architecture', - baseDir: process.cwd(), - generators: ['patterns'], - overwrite: false, - features: [], - workflowPath: null, - listGenerators: false, - help: false, - version: false, - // PR Changes options - gitDiffBase: null, - changedFiles: [], - releaseFilter: null, - generatorsExplicit: false, - }; - for (let i = 0; i < argv.length; i++) { - const arg = argv[i]; - const nextArg = argv[i + 1]; - switch (arg) { - case '-i': - case '--input': - if (!nextArg || nextArg.startsWith('-')) { - throw new Error(`${arg} requires a value`); - } - config.input.push(nextArg); - i++; - break; - case '-e': - case '--exclude': - if (!nextArg || nextArg.startsWith('-')) { - throw new Error(`${arg} requires a value`); - } - config.exclude.push(nextArg); - i++; - break; - case '-o': - case '--output': - if (!nextArg || nextArg.startsWith('-')) { - throw new Error(`${arg} requires a value`); - } - config.output = nextArg; - i++; - break; - case '-b': - case '--base-dir': - if (!nextArg || nextArg.startsWith('-')) { - throw new Error(`${arg} requires a value`); - } - config.baseDir = nextArg; - i++; - break; - case '-g': - case '--generators': - if (!nextArg || nextArg.startsWith('-')) { - throw new Error(`${arg} requires a value`); - } - // Replace default if generators are specified - if (config.generators.length === 1 && config.generators[0] === 'patterns') { - config.generators = []; - } - config.generators.push(nextArg); - config.generatorsExplicit = true; - i++; - break; - case '-f': - case '--overwrite': - config.overwrite = true; - break; - case '--features': - if (!nextArg || nextArg.startsWith('-')) { - throw new Error(`${arg} requires a value`); - } - config.features.push(nextArg); - i++; - break; - case '-w': - case '--workflow': - if (!nextArg || nextArg.startsWith('-')) { - throw new Error(`${arg} requires a value`); - } - config.workflowPath = nextArg; - i++; - break; - case '--list-generators': - config.listGenerators = true; - break; - case '-h': - case '--help': - config.help = true; - break; - case '-v': - case '--version': - config.version = true; - break; - // PR Changes options - case '--git-diff-base': - if (!nextArg || nextArg.startsWith('-')) { - throw new Error(`${arg} requires a value (e.g., main, develop)`); - } - config.gitDiffBase = nextArg; - i++; - break; - case '--changed-files': - if (!nextArg || nextArg.startsWith('-')) { - throw new Error(`${arg} requires a value`); - } - config.changedFiles.push(nextArg); - i++; - break; - case '--release-filter': - if (!nextArg || nextArg.startsWith('-')) { - throw new Error(`${arg} requires a value (e.g., v0.2.0)`); - } - config.releaseFilter = nextArg; - i++; - break; - default: - throw new Error(`Unknown option: ${arg ?? ''}`); - } - } - return config; -} -function showHelp() { - console.log(` -Usage: generate-docs [options] - -Generate documentation from annotated TypeScript source code. - -Options: - -i, --input Glob patterns for TypeScript files (repeatable) - -e, --exclude Glob patterns to exclude (repeatable) - -o, --output Output directory (default: docs/architecture) - -b, --base-dir Base directory for relative paths (default: cwd) - -g, --generators Generators to run (repeatable, default: patterns) - -w, --workflow Workflow config JSON file (default: 6-phase-standard) - -f, --overwrite Overwrite existing files - --features Glob pattern for .feature files - --list-generators List available generators and exit - -h, --help Show this help message - -v, --version Show version number - -PR Changes Options (for -g pr-changes): - --git-diff-base Base branch for git diff (e.g., main) - --changed-files Explicit file list (repeatable, overrides git) - --release-filter Filter by release version (e.g., v0.2.0) - - When delivery-process.config.ts provides sources, --input is optional. - CLI flags override config when both are provided. - -Examples: - generate-docs -i "src/**/*.ts" -o docs - generate-docs -i "src/**/*.ts" -g patterns -g adrs -f - generate-docs --list-generators - -PR Changes Examples: - generate-docs -g pr-changes --git-diff-base main -o docs-living -f - generate-docs -g pr-changes --release-filter v0.2.0 -o docs-living -f - generate-docs -g pr-changes --changed-files src/foo.ts --changed-files src/bar.ts -o docs -`); -} -async function main() { - const opts = parseArgs(); - // Show version - if (opts.version) { - printVersionAndExit('generate-docs'); - } - // Show help - if (opts.help) { - showHelp(); - return; - } - // List generators - if (opts.listGenerators) { - console.log('Available generators:'); - const available = generatorRegistry.available(); - if (available.length === 0) { - console.log(' (none registered)'); - console.log(''); - console.log('Tip: Ensure built-in generators are imported in your code.'); - } - else { - for (const name of available) { - const gen = generatorRegistry.get(name); - console.log(` - ${name}: ${gen?.description ?? '(no description)'}`); - } - } - return; - } - const baseDir = path.resolve(opts.baseDir); - // Load project config - const configResult = await loadProjectConfig(baseDir); - if (!configResult.ok) { - console.error(`Error loading config: ${configResult.error.message}`); - process.exit(1); - } - const resolvedConfig = configResult.value; - if (resolvedConfig.isDefault) { - console.log(' (No delivery-process.config.ts found; using defaults)'); - } - // Determine generators to run (CLI -g overrides config) - const effectiveGenerators = (opts.generatorsExplicit ? opts.generators : [...resolvedConfig.project.generators]).flatMap((g) => g.split(',')); - const input = opts.input; - const exclude = opts.exclude.length > 0 ? opts.exclude : undefined; - const features = opts.features.length > 0 ? opts.features : undefined; - let result; - if (input.length > 0) { - // CLI flags provided — use legacy path (explicit overrides) - console.log('Scanning source files...'); - result = await generateDocumentation({ - input, - ...(exclude ? { exclude } : {}), - baseDir, - outputDir: opts.output, - generators: effectiveGenerators, - overwrite: opts.overwrite, - ...(features ? { features } : {}), - ...(opts.workflowPath ? { workflowPath: opts.workflowPath } : {}), - ...(opts.gitDiffBase ? { gitDiffBase: opts.gitDiffBase } : {}), - ...(opts.changedFiles.length > 0 ? { changedFiles: opts.changedFiles } : {}), - ...(opts.releaseFilter ? { releaseFilter: opts.releaseFilter } : {}), - }); - } - else if (resolvedConfig.project.sources.typescript.length > 0) { - // No CLI input — use config-based sources - console.log('Using sources from delivery-process.config.ts...'); - console.log('Scanning source files...'); - result = await generateFromConfig(resolvedConfig, { - generators: effectiveGenerators, - ...(opts.gitDiffBase ? { gitDiffBase: opts.gitDiffBase } : {}), - ...(opts.changedFiles.length > 0 ? { changedFiles: opts.changedFiles } : {}), - ...(opts.releaseFilter ? { releaseFilter: opts.releaseFilter } : {}), - }); - } - else { - console.error('Error: No source files specified.'); - console.error(''); - console.error('Either provide --input flags or configure sources in delivery-process.config.ts:'); - console.error(''); - console.error(' // delivery-process.config.ts'); - console.error(' import { defineConfig } from "@libar-dev/delivery-process/config";'); - console.error(' export default defineConfig({'); - console.error(' sources: { typescript: ["src/**/*.ts"] }'); - console.error(' });'); - process.exit(1); - } - if (!result.ok) { - console.error(`Error: ${result.error}`); - process.exit(1); - } - const { patterns, files, warnings, errors } = result.value; - // Report scan/extraction warnings - for (const warning of warnings) { - if (warning.type === 'scan') { - console.warn(` ⚠ ${warning.message}`); - // Display detailed error information if available - if (warning.details && warning.details.length > 0) { - for (const detail of warning.details) { - const location = detail.line !== undefined - ? `:${detail.line}${detail.column !== undefined ? `:${detail.column}` : ''}` - : ''; - console.warn(` - ${detail.file}${location}`); - console.warn(` ${detail.message}`); - } - } - } - } - console.log(` Found ${patterns.length} patterns`); - // Report extraction warnings - for (const warning of warnings) { - if (warning.type === 'extraction') { - console.warn(` ⚠ ${warning.message}`); - } - } - console.log('Extracting patterns...'); - console.log(` Extracted ${patterns.length} patterns`); - // Run generators and report results - const generatorNames = [...new Set(effectiveGenerators)]; - for (const generatorName of generatorNames) { - const trimmedName = generatorName.trim(); - console.log(`\nRunning generator: ${trimmedName}`); - // Check for generator errors - const generatorErrors = errors.filter((e) => e.generator === trimmedName); - if (generatorErrors.length > 0) { - for (const error of generatorErrors) { - console.error(` ✗ ${error.message}`); - } - continue; - } - // Report files written by this generator - const generatorFiles = files.filter((f) => f.generator === trimmedName); - const writtenFiles = generatorFiles.filter((f) => f.written); - const skippedFiles = generatorFiles.filter((f) => !f.written); - for (const file of writtenFiles) { - console.log(` ✓ ${file.path}`); - } - for (const file of skippedFiles) { - console.warn(` ⚠ Skipping ${file.path} (exists, use -f to overwrite)`); - } - } - // Report any file write errors - const fileWriteErrors = errors.filter((e) => e.type === 'file-write'); - if (fileWriteErrors.length > 0) { - console.error('\nFile write errors:'); - for (const error of fileWriteErrors) { - console.error(` ✗ ${error.message}`); - } - } - // Summary - const successCount = files.filter((f) => f.written).length; - const skippedCount = files.filter((f) => !f.written).length; - console.log('\n✅ Documentation generation complete!'); - console.log(` ${successCount} files written${skippedCount > 0 ? `, ${skippedCount} skipped` : ''}`); -} -void main(); -//# sourceMappingURL=generate-docs.js.map \ No newline at end of file diff --git a/dist/cli/generate-docs.js.map b/dist/cli/generate-docs.js.map deleted file mode 100644 index 90babbd0..00000000 --- a/dist/cli/generate-docs.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"generate-docs.js","sourceRoot":"","sources":["../../src/cli/generate-docs.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAC1F,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAEnD,kEAAkE;AAClE,OAAO,iCAAiC,CAAC;AAmCzC,SAAS,SAAS,CAAC,OAAiB,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IACvD,MAAM,MAAM,GAAc;QACxB,KAAK,EAAE,EAAE;QACT,OAAO,EAAE,EAAE;QACX,MAAM,EAAE,mBAAmB;QAC3B,OAAO,EAAE,OAAO,CAAC,GAAG,EAAE;QACtB,UAAU,EAAE,CAAC,UAAU,CAAC;QACxB,SAAS,EAAE,KAAK;QAChB,QAAQ,EAAE,EAAE;QACZ,YAAY,EAAE,IAAI;QAClB,cAAc,EAAE,KAAK;QACrB,IAAI,EAAE,KAAK;QACX,OAAO,EAAE,KAAK;QACd,qB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;IAED,+BAA+B;IAC/B,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,YAAY,CAAC,CAAC;IACtE,IAAI,eAAe,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC/B,OAAO,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC;QACtC,KAAK,MAAM,KAAK,IAAI,eAAe,EAAE,CAAC;YACpC,OAAO,CAAC,KAAK,CAAC,OAAO,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;QACxC,CAAC;IACH,CAAC;IAED,UAAU;IACV,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC;IAC3D,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC;IAE5D,OAAO,CAAC,GAAG,CAAC,wCAAwC,CAAC,CAAC;IACtD,OAAO,CAAC,GAAG,CACT,MAAM,YAAY,iBAAiB,YAAY,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,YAAY,UAAU,CAAC,CAAC,CAAC,EAAE,EAAE,CACzF,CAAC;AACJ,CAAC;AAED,KAAK,IAAI,EAAE,CAAC"} \ No newline at end of file diff --git a/dist/cli/generate-tag-taxonomy.d.ts b/dist/cli/generate-tag-taxonomy.d.ts deleted file mode 100644 index 62564217..00000000 --- a/dist/cli/generate-tag-taxonomy.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env node -/** - * @libar-docs - * @libar-docs-cli - * @libar-docs-pattern TagTaxonomyCLI - * @libar-docs-status deferred - * @libar-docs-uses ConfigLoader, TagTaxonomyGenerator - * @libar-docs-extract-shapes CLIConfig - * - * ## TagTaxonomyCLI - Tag Registry Documentation Generator - * - * @deprecated Use `pnpm docs:taxonomy` instead. This standalone CLI is replaced - * by the codec-based TaxonomyCodec which: - * - Fits the MasterDataset pipeline architecture - * - Provides progressive disclosure with detail files - * - Groups tags by domain (Core, Relationship, Timeline, ADR, Architecture) - * - Includes presets comparison and architecture diagrams - * - * Generates TAG_TAXONOMY.md from the TypeScript taxonomy module. - * Use to auto-generate comprehensive tag reference documentation. - * - * ### When to Use - * - * - Use after modifying src/taxonomy/ to update documentation - * - Use to generate human-readable tag reference from TypeScript config - * - Use in documentation regeneration workflows - */ -export {}; -//# sourceMappingURL=generate-tag-taxonomy.d.ts.map \ No newline at end of file diff --git a/dist/cli/generate-tag-taxonomy.d.ts.map b/dist/cli/generate-tag-taxonomy.d.ts.map deleted file mode 100644 index fd05a1a0..00000000 --- a/dist/cli/generate-tag-taxonomy.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"generate-tag-taxonomy.d.ts","sourceRoot":"","sources":["../../src/cli/generate-tag-taxonomy.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG"} \ No newline at end of file diff --git a/dist/cli/generate-tag-taxonomy.js b/dist/cli/generate-tag-taxonomy.js deleted file mode 100644 index d199d063..00000000 --- a/dist/cli/generate-tag-taxonomy.js +++ /dev/null @@ -1,185 +0,0 @@ -#!/usr/bin/env node -/** - * @libar-docs - * @libar-docs-cli - * @libar-docs-pattern TagTaxonomyCLI - * @libar-docs-status deferred - * @libar-docs-uses ConfigLoader, TagTaxonomyGenerator - * @libar-docs-extract-shapes CLIConfig - * - * ## TagTaxonomyCLI - Tag Registry Documentation Generator - * - * @deprecated Use `pnpm docs:taxonomy` instead. This standalone CLI is replaced - * by the codec-based TaxonomyCodec which: - * - Fits the MasterDataset pipeline architecture - * - Provides progressive disclosure with detail files - * - Groups tags by domain (Core, Relationship, Timeline, ADR, Architecture) - * - Includes presets comparison and architecture diagrams - * - * Generates TAG_TAXONOMY.md from the TypeScript taxonomy module. - * Use to auto-generate comprehensive tag reference documentation. - * - * ### When to Use - * - * - Use after modifying src/taxonomy/ to update documentation - * - Use to generate human-readable tag reference from TypeScript config - * - Use in documentation regeneration workflows - */ -import * as fs from 'fs/promises'; -import * as path from 'path'; -import { loadConfig, formatConfigError } from '../config/config-loader.js'; -import { generateTagTaxonomy } from '../config/tag-taxonomy-generator.js'; -import { printVersionAndExit } from './version.js'; -/** - * Parse command line arguments - * - * @param argv - Command line arguments (defaults to process.argv.slice(2)) - * @returns Parsed CLI configuration - */ -function parseArgs(argv = process.argv.slice(2)) { - const config = { - output: 'docs/architecture/TAG_TAXONOMY.md', - baseDir: process.cwd(), - overwrite: false, - help: false, - version: false, - }; - for (let i = 0; i < argv.length; i++) { - const arg = argv[i]; - if (arg === '--help' || arg === '-h') { - config.help = true; - } - else if (arg === '--output' || arg === '-o') { - const nextArg = argv[++i]; - if (!nextArg) { - throw new Error(`Missing value for ${arg} flag`); - } - config.output = nextArg; - } - else if (arg === '--base-dir' || arg === '-b') { - const nextArg = argv[++i]; - if (!nextArg) { - throw new Error(`Missing value for ${arg} flag`); - } - config.baseDir = nextArg; - } - else if (arg === '--overwrite' || arg === '-f') { - config.overwrite = true; - } - else if (arg === '--version' || arg === '-v') { - config.version = true; - } - else if (arg?.startsWith('-') === true) { - console.warn(`Warning: Unknown flag '${arg}' ignored`); - } - } - return config; -} -/** - * Print usage information - */ -function printHelp() { - console.log(` -generate-tag-taxonomy - Generate TAG_TAXONOMY.md from configuration - -Usage: - generate-tag-taxonomy [options] - -Options: - -o, --output Output path for TAG_TAXONOMY.md (default: docs/architecture/TAG_TAXONOMY.md) - -b, --base-dir Base directory for path resolution (default: cwd) - -f, --overwrite Overwrite existing file - -h, --help Show this help message - -v, --version Show version number - -Configuration: - Uses delivery-process.config.ts for taxonomy configuration. - Falls back to libar-generic preset (3 categories) if no config file found. - -Examples: - # Generate using discovered config or default - generate-tag-taxonomy - - # Custom output path - generate-tag-taxonomy -o docs/TAG_TAXONOMY.md - - # Overwrite existing file - generate-tag-taxonomy -f - `); -} -/** - * Main CLI function - */ -async function main() { - const config = parseArgs(); - if (config.version) { - printVersionAndExit('generate-tag-taxonomy'); - } - if (config.help) { - printHelp(); - process.exit(0); - } - // Deprecation warning - console.warn('\n⚠️ DEPRECATED: generate-tag-taxonomy is deprecated.'); - console.warn(' Use `pnpm docs:taxonomy` instead for codec-based generation.'); - console.warn(' The new approach provides progressive disclosure, domain grouping,'); - console.warn(' and fits the MasterDataset pipeline architecture.\n'); - try { - console.log('Loading configuration...'); - // Load configuration (discovers delivery-process.config.ts) - const configResult = await loadConfig(config.baseDir); - if (!configResult.ok) { - console.error(formatConfigError(configResult.error)); - process.exit(1); - } - const { instance: dpInstance, isDefault, path: configPath } = configResult.value; - const tagRegistry = dpInstance.registry; - const sourcePath = !isDefault && configPath - ? path.relative(config.baseDir, configPath) - : '(default libar-generic preset)'; - console.log(` Loaded: ${sourcePath}`); - // Check if output file exists - const outputPath = path.isAbsolute(config.output) - ? config.output - : path.join(config.baseDir, config.output); - if (!config.overwrite) { - try { - await fs.access(outputPath); - console.error(`Error: Output file already exists: ${outputPath}`); - console.error('Use --overwrite (-f) to replace it'); - process.exit(1); - } - catch { - // File doesn't exist, proceed - } - } - // Generate taxonomy markdown - console.log('Generating TAG_TAXONOMY.md...'); - const markdown = generateTagTaxonomy(tagRegistry, { - sourcePath: sourcePath, - }); - // Ensure output directory exists - await fs.mkdir(path.dirname(outputPath), { recursive: true }); - // Write file - await fs.writeFile(outputPath, markdown, 'utf-8'); - console.log(`\n✓ Generated: ${path.relative(config.baseDir, outputPath)}`); - console.log(` Categories: ${tagRegistry.categories.length}`); - console.log(` Metadata tags: ${tagRegistry.metadataTags.length}`); - console.log(` Aggregation tags: ${tagRegistry.aggregationTags.length}`); - } - catch (error) { - if (error instanceof Error) { - console.error('Error:', error.message); - if (process.env['DEBUG']) { - console.error('Stack trace:', error.stack); - } - } - else { - console.error('Error:', String(error)); - } - process.exit(1); - } -} -// Entry point -void main(); -//# sourceMappingURL=generate-tag-taxonomy.js.map \ No newline at end of file diff --git a/dist/cli/generate-tag-taxonomy.js.map b/dist/cli/generate-tag-taxonomy.js.map deleted file mode 100644 index 321848c8..00000000 --- a/dist/cli/generate-tag-taxonomy.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"generate-tag-taxonomy.js","sourceRoot":"","sources":["../../src/cli/generate-tag-taxonomy.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAkBnD;;;;;GAKG;AACH,SAAS,SAAS,CAAC,OAAiB,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IACvD,MAAM,MAAM,GAAc;QACxB,MAAM,EAAE,mCAAmC;QAC3C,OAAO,EAAE,OAAO,CAAC,GAAG,EAAE;QACtB,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,KAAK;QACX,OAAO,EAAE,KAAK;KACf,CAAC;IAEF,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAEpB,IAAI,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,EAAE,CAAC;YACrC,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC;QACrB,CAAC;aAAM,IAAI,GAAG,KAAK,UAAU,IAAI,GAAG,KAAK,IAAI,EAAE,CAAC;YAC9C,MAAM,OAAO,GAAG,IAAI,CAAC,EAAE,CA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C3B,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;YACvC,IAAI,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;gBACzB,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;YAC7C,CAAC;QACH,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QACzC,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED,cAAc;AACd,KAAK,IAAI,EAAE,CAAC"} \ No newline at end of file diff --git a/dist/cli/lint-patterns.d.ts b/dist/cli/lint-patterns.d.ts deleted file mode 100644 index f9c65ffc..00000000 --- a/dist/cli/lint-patterns.d.ts +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env node -/** - * @libar-docs - * @libar-docs-cli - * @libar-docs-pattern LintPatternsCLI - * @libar-docs-status completed - * @libar-docs-uses LintEngine, LintRules, PatternScanner - * @libar-docs-extract-shapes LintCLIConfig - * - * ## LintPatternsCLI - Pattern Annotation Quality Checker - * - * Validates pattern annotations for quality and completeness. - * Use in CI to enforce documentation standards. - * - * ### When to Use - * - * - Use in CI pipelines to enforce annotation quality - * - Use locally to check annotations before committing - * - Use with `--strict` flag to treat warnings as errors - */ -import { type LintSeverity } from '../lint/index.js'; -/** - * CLI configuration - */ -export interface LintCLIConfig { - /** Glob patterns for input files */ - input: string[]; - /** Glob patterns to exclude */ - exclude: string[]; - /** Base directory for path resolution */ - baseDir: string; - /** Treat warnings as errors */ - strict: boolean; - /** Output format */ - format: 'pretty' | 'json'; - /** Only show errors (suppress warnings/info) */ - quiet: boolean; - /** Minimum severity to report */ - minSeverity: LintSeverity; - /** Show help */ - help: boolean; - /** Show version */ - version: boolean; -} -/** - * Parse command line arguments - * - * @param argv - Command line arguments (defaults to process.argv.slice(2)) - * @returns Parsed CLI configuration - * @throws Error if required flags are missing values - */ -export declare function parseArgs(argv?: string[]): LintCLIConfig; -/** - * Print usage information - */ -export declare function printHelp(): void; -//# sourceMappingURL=lint-patterns.d.ts.map \ No newline at end of file diff --git a/dist/cli/lint-patterns.d.ts.map b/dist/cli/lint-patterns.d.ts.map deleted file mode 100644 index 94d632d1..00000000 --- a/dist/cli/lint-patterns.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"lint-patterns.d.ts","sourceRoot":"","sources":["../../src/cli/lint-patterns.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;GAkBG;AAOH,OAAO,EAQL,KAAK,YAAY,EAClB,MAAM,kBAAkB,CAAC;AAE1B;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,oCAAoC;IACpC,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,+BAA+B;IAC/B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,yCAAyC;IACzC,OAAO,EAAE,MAAM,CAAC;IAChB,+BAA+B;IAC/B,MAAM,EAAE,OAAO,CAAC;IAChB,oBAAoB;IACpB,MAAM,EAAE,QAAQ,GAAG,MAAM,CAAC;IAC1B,gDAAgD;IAChD,KAAK,EAAE,OAAO,CAAC;IACf,iCAAiC;IACjC,WAAW,EAAE,YAAY,CAAC;IAC1B,gBAAgB;IAChB,IAAI,EAAE,OAAO,CAAC;IACd,mBAAmB;IACnB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,IAAI,GAAE,MAAM,EAA0B,GAAG,aAAa,CAkE/E;AAED;;GAEG;AACH,wBAAgB,SAAS,IAAI,IAAI,CA0ChC"} \ No newline at end of file diff --git a/dist/cli/lint-patterns.js b/dist/cli/lint-patterns.js deleted file mode 100644 index 1390c1c4..00000000 --- a/dist/cli/lint-patterns.js +++ /dev/null @@ -1,253 +0,0 @@ -#!/usr/bin/env node -/** - * @libar-docs - * @libar-docs-cli - * @libar-docs-pattern LintPatternsCLI - * @libar-docs-status completed - * @libar-docs-uses LintEngine, LintRules, PatternScanner - * @libar-docs-extract-shapes LintCLIConfig - * - * ## LintPatternsCLI - Pattern Annotation Quality Checker - * - * Validates pattern annotations for quality and completeness. - * Use in CI to enforce documentation standards. - * - * ### When to Use - * - * - Use in CI pipelines to enforce annotation quality - * - Use locally to check annotations before committing - * - Use with `--strict` flag to treat warnings as errors - */ -import { printVersionAndExit } from './version.js'; -import { handleCliError } from './error-handler.js'; -import { scanPatterns } from '../scanner/index.js'; -import { ScannerConfigSchema } from '../validation-schemas/index.js'; -import { loadConfig, formatConfigError } from '../config/config-loader.js'; -import { defaultRules, filterRulesBySeverity, lintFiles, hasFailures, formatPretty, formatJson, } from '../lint/index.js'; -/** - * Parse command line arguments - * - * @param argv - Command line arguments (defaults to process.argv.slice(2)) - * @returns Parsed CLI configuration - * @throws Error if required flags are missing values - */ -export function parseArgs(argv = process.argv.slice(2)) { - const config = { - input: [], - exclude: [], - baseDir: process.cwd(), - strict: false, - format: 'pretty', - quiet: false, - minSeverity: 'info', - help: false, - version: false, - }; - for (let i = 0; i < argv.length; i++) { - const arg = argv[i]; - if (arg === '--help' || arg === '-h') { - config.help = true; - } - else if (arg === '--input' || arg === '-i') { - const nextArg = argv[++i]; - if (!nextArg) { - throw new Error(`Missing value for ${arg} flag`); - } - config.input.push(nextArg); - } - else if (arg === '--exclude' || arg === '-e') { - const nextArg = argv[++i]; - if (!nextArg) { - throw new Error(`Missing value for ${arg} flag`); - } - config.exclude.push(nextArg); - } - else if (arg === '--base-dir' || arg === '-b') { - const nextArg = argv[++i]; - if (!nextArg) { - throw new Error(`Missing value for ${arg} flag`); - } - config.baseDir = nextArg; - } - else if (arg === '--strict') { - config.strict = true; - } - else if (arg === '--format' || arg === '-f') { - const nextArg = argv[++i]; - if (!nextArg) { - throw new Error(`Missing value for ${arg} flag`); - } - if (nextArg !== 'pretty' && nextArg !== 'json') { - throw new Error(`Invalid format: ${nextArg}. Use "pretty" or "json"`); - } - config.format = nextArg; - } - else if (arg === '--quiet' || arg === '-q') { - config.quiet = true; - } - else if (arg === '--min-severity') { - const nextArg = argv[++i]; - if (!nextArg) { - throw new Error(`Missing value for ${arg} flag`); - } - if (nextArg !== 'error' && nextArg !== 'warning' && nextArg !== 'info') { - throw new Error(`Invalid severity: ${nextArg}. Use "error", "warning", or "info"`); - } - config.minSeverity = nextArg; - } - else if (arg === '--version' || arg === '-v') { - config.version = true; - } - else if (arg?.startsWith('-') === true) { - console.warn(`Warning: Unknown flag '${arg}' ignored`); - } - } - return config; -} -/** - * Print usage information - */ -export function printHelp() { - console.log(` -lint-patterns - Validate pattern annotation quality - -Usage: - lint-patterns [options] - -Options: - -i, --input Glob pattern for TypeScript files (required, repeatable) - -e, --exclude Glob pattern to exclude (repeatable) - -b, --base-dir Base directory for paths (default: cwd) - --strict Treat warnings as errors (exit 1 on warnings) - -f, --format Output format: "pretty" (default) or "json" - -q, --quiet Only show errors (suppress warnings/info) - --min-severity Minimum severity to report: error|warning|info (default: info) - -h, --help Show this help message - -v, --version Show version number - -Exit Codes: - 0 No errors (warnings allowed unless --strict) - 1 Errors found (or warnings with --strict) - -Lint Rules: - error missing-pattern-name Pattern must have @libar-docs-pattern name - error tautological-description Description should not repeat pattern name - warning missing-status Pattern should have @libar-docs-status - warning missing-when-to-use Pattern should have "When to Use" section - info missing-relationships Consider adding @libar-docs-uses/used-by - -Examples: - # Lint all @libar-dev/platform-* patterns - lint-patterns -i "packages/@libar-dev/platform-*/src/**/*.ts" - - # Strict mode for CI (fail on warnings) - lint-patterns -i "packages/@libar-dev/platform-*/src/**/*.ts" --strict - - # JSON output for tooling - lint-patterns -i "src/**/*.ts" --format json - - # Only show errors - lint-patterns -i "src/**/*.ts" --quiet - `); -} -/** - * Main CLI function - */ -async function main() { - const config = parseArgs(); - if (config.version) { - printVersionAndExit('lint-patterns'); - } - if (config.help) { - printHelp(); - process.exit(0); - } - if (config.input.length === 0) { - console.error('Error: No input patterns specified. Use --input '); - printHelp(); - process.exit(1); - } - try { - // Load configuration (discovers delivery-process.config.ts) - const configResult = await loadConfig(config.baseDir); - if (!configResult.ok) { - console.error(formatConfigError(configResult.error)); - process.exit(1); - } - const { instance: dpInstance, isDefault, path: configPath } = configResult.value; - // Log configuration source (for transparency) - if (!isDefault && configPath) { - console.log(` Config: ${configPath}`); - } - else { - console.log(' Config: (default libar-generic preset)'); - } - // Scan files for directives - const scannerConfig = ScannerConfigSchema.parse({ - patterns: config.input, - exclude: config.exclude.length > 0 ? config.exclude : undefined, - baseDir: config.baseDir, - }); - const scanResult = await scanPatterns(scannerConfig, dpInstance.registry); - // scanPatterns returns Result - it always succeeds - // with errors collected in scanResult.value.errors. - // The `ok` check narrows the type to access `.value` - if (!scanResult.ok) { - // This branch is unreachable (never type), but satisfies TypeScript - throw new Error('Unexpected scan failure'); - } - const { files: scanned, errors: scanErrors, skippedDirectives } = scanResult.value; - // Report scan errors - if (scanErrors.length > 0 && config.format === 'pretty') { - console.log(`Warning: ${scanErrors.length} files failed to scan:`); - for (const { file, error } of scanErrors) { - console.log(` - ${file}: ${error.reason}`); - } - console.log(''); - } - // Report skipped directives (these are already validation failures) - if (skippedDirectives.length > 0 && config.format === 'pretty') { - console.log(`Warning: ${skippedDirectives.length} directives skipped due to validation:`); - for (const { file, error } of skippedDirectives) { - console.log(` - ${file}:${error.line}: ${error.reason}`); - } - console.log(''); - } - // Build map of files to directives - const fileDirectives = new Map(); - for (const file of scanned) { - const directives = file.directives.map((d) => ({ - directive: d.directive, - line: d.directive.position.startLine, - })); - if (directives.length > 0) { - fileDirectives.set(file.filePath, directives); - } - } - // Get rules filtered by minimum severity - const rules = filterRulesBySeverity(defaultRules, config.minSeverity); - // Run lint - const summary = lintFiles(fileDirectives, rules); - // Format and output results - if (config.format === 'json') { - const jsonResult = formatJson(summary); - if (!jsonResult.ok) { - handleCliError(jsonResult.error, 1); - return; // Ensure we don't access .value on error - } - console.log(jsonResult.value); - } - else { - const output = formatPretty(summary, { quiet: config.quiet }); - console.log(output); - } - // Determine exit code - process.exit(hasFailures(summary, config.strict) ? 1 : 0); - } - catch (error) { - handleCliError(error, 1); - } -} -// Entry point -void main(); -//# sourceMappingURL=lint-patterns.js.map \ No newline at end of file diff --git a/dist/cli/lint-patterns.js.map b/dist/cli/lint-patterns.js.map deleted file mode 100644 index 12dd7749..00000000 --- a/dist/cli/lint-patterns.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"lint-patterns.js","sourceRoot":"","sources":["../../src/cli/lint-patterns.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC3E,OAAO,EACL,YAAY,EACZ,qBAAqB,EACrB,SAAS,EACT,WAAW,EACX,YAAY,EACZ,UAAU,GAGX,MAAM,kBAAkB,CAAC;AA0B1B;;;;;;GAMG;AACH,MAAM,UAAU,SAAS,CAAC,OAAiB,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAC9D,MAAM,MAAM,GAAkB;QAC5B,KAAK,EAAE,EAAE;QACT,OAAO,EAAE,EAAE;QACX,OAAO,EAAE,OAAO,CAAC,GAAG,EAAE;QACtB,MAAM,EAAE,KAAK;QACb,MAAM,EAAE,QAAQ;QAChB,KAAK,EAAE,KAAK;QACZ,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,KAAK;QACX,OAAO,EAAE,KAAK;KACf,CAAC;IAEF,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,I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,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;gBACpC,OAAO,CAAC,yCAAyC;YACnD,CAAC;YACD,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QAChC,CAAC;aAAM,CAAC;YACN,MAAM,MAAM,GAAG,YAAY,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;YAC9D,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACtB,CAAC;QAED,sBAAsB;QACtB,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5D,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,cAAc,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IAC3B,CAAC;AACH,CAAC;AAED,cAAc;AACd,KAAK,IAAI,EAAE,CAAC"} \ No newline at end of file diff --git a/dist/cli/lint-process.d.ts b/dist/cli/lint-process.d.ts deleted file mode 100644 index fa728754..00000000 --- a/dist/cli/lint-process.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/env node -/** - * @libar-docs - * @libar-docs-cli - * @libar-docs-lint - * @libar-docs-pattern LintProcessCLI - * @libar-docs-status active - * @libar-docs-uses ProcessGuardModule - * @libar-docs-extract-shapes ProcessGuardCLIConfig - * - * ## LintProcessCLI - Process Guard Linter CLI - * - * Validates git changes against delivery process rules. - * Enforces protection levels, status transitions, and session scope. - * - * ### When to Use - * - * - Pre-commit hook to validate staged changes - * - CI/CD to validate all changes against main branch - * - Development to check specific files - */ -import { type ValidationMode } from '../lint/process-guard/index.js'; -/** - * CLI configuration - */ -export interface ProcessGuardCLIConfig { - /** Validation mode */ - mode: ValidationMode; - /** Specific files to validate (when mode is 'files') */ - files: string[]; - /** Treat warnings as errors */ - strict: boolean; - /** Ignore session scope rules */ - ignoreSession: boolean; - /** Show derived process state (debugging) */ - showState: boolean; - /** Base directory for relative paths */ - baseDir: string; - /** Output format */ - format: 'pretty' | 'json'; - /** Show help */ - help: boolean; - /** Show version */ - version: boolean; -} -/** - * Parse command line arguments - */ -export declare function parseArgs(argv?: string[]): ProcessGuardCLIConfig; -/** - * Print usage information - */ -export declare function printHelp(): void; -//# sourceMappingURL=lint-process.d.ts.map \ No newline at end of file diff --git a/dist/cli/lint-process.d.ts.map b/dist/cli/lint-process.d.ts.map deleted file mode 100644 index 6363cac4..00000000 --- a/dist/cli/lint-process.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"lint-process.d.ts","sourceRoot":"","sources":["../../src/cli/lint-process.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;GAmBG;AAIH,OAAO,EAUL,KAAK,cAAc,EACpB,MAAM,gCAAgC,CAAC;AAExC;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,sBAAsB;IACtB,IAAI,EAAE,cAAc,CAAC;IACrB,wDAAwD;IACxD,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,+BAA+B;IAC/B,MAAM,EAAE,OAAO,CAAC;IAChB,iCAAiC;IACjC,aAAa,EAAE,OAAO,CAAC;IACvB,6CAA6C;IAC7C,SAAS,EAAE,OAAO,CAAC;IACnB,wCAAwC;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,oBAAoB;IACpB,MAAM,EAAE,QAAQ,GAAG,MAAM,CAAC;IAC1B,gBAAgB;IAChB,IAAI,EAAE,OAAO,CAAC;IACd,mBAAmB;IACnB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,GAAE,MAAM,EAA0B,GAAG,qBAAqB,CAgEvF;AAED;;GAEG;AACH,wBAAgB,SAAS,IAAI,IAAI,CA+ChC"} \ No newline at end of file diff --git a/dist/cli/lint-process.js b/dist/cli/lint-process.js deleted file mode 100644 index 6277fa14..00000000 --- a/dist/cli/lint-process.js +++ /dev/null @@ -1,294 +0,0 @@ -#!/usr/bin/env node -/** - * @libar-docs - * @libar-docs-cli - * @libar-docs-lint - * @libar-docs-pattern LintProcessCLI - * @libar-docs-status active - * @libar-docs-uses ProcessGuardModule - * @libar-docs-extract-shapes ProcessGuardCLIConfig - * - * ## LintProcessCLI - Process Guard Linter CLI - * - * Validates git changes against delivery process rules. - * Enforces protection levels, status transitions, and session scope. - * - * ### When to Use - * - * - Pre-commit hook to validate staged changes - * - CI/CD to validate all changes against main branch - * - Development to check specific files - */ -import { printVersionAndExit } from './version.js'; -import { handleCliError } from './error-handler.js'; -import { deriveProcessState, detectStagedChanges, detectBranchChanges, detectFileChanges, validateChanges, hasChanges, hasErrors, hasWarnings, summarizeResult, } from '../lint/process-guard/index.js'; -/** - * Parse command line arguments - */ -export function parseArgs(argv = process.argv.slice(2)) { - const config = { - mode: 'staged', - files: [], - strict: false, - ignoreSession: false, - showState: false, - baseDir: process.cwd(), - format: 'pretty', - help: false, - version: false, - }; - for (let i = 0; i < argv.length; i++) { - const arg = argv[i]; - if (arg === '--help' || arg === '-h') { - config.help = true; - } - else if (arg === '--staged') { - config.mode = 'staged'; - } - else if (arg === '--all') { - config.mode = 'all'; - } - else if (arg === '--files') { - config.mode = 'files'; - } - else if (arg === '--file' || arg === '-f') { - const nextArg = argv[++i]; - if (nextArg === undefined) { - throw new Error(`Missing value for ${arg} flag`); - } - config.files.push(nextArg); - config.mode = 'files'; - } - else if (arg === '--strict') { - config.strict = true; - } - else if (arg === '--ignore-session') { - config.ignoreSession = true; - } - else if (arg === '--show-state') { - config.showState = true; - } - else if (arg === '--base-dir' || arg === '-b') { - const nextArg = argv[++i]; - if (nextArg === undefined) { - throw new Error(`Missing value for ${arg} flag`); - } - config.baseDir = nextArg; - } - else if (arg === '--format') { - const nextArg = argv[++i]; - if (nextArg === undefined) { - throw new Error(`Missing value for ${arg} flag`); - } - if (nextArg !== 'pretty' && nextArg !== 'json') { - throw new Error(`Invalid format: ${nextArg}. Use "pretty" or "json"`); - } - config.format = nextArg; - } - else if (arg === '--version' || arg === '-v') { - config.version = true; - } - else if (arg?.startsWith('-') === true) { - console.warn(`Warning: Unknown flag '${arg}' ignored`); - } - else if (arg !== undefined) { - // Positional argument treated as file - config.files.push(arg); - config.mode = 'files'; - } - } - return config; -} -/** - * Print usage information - */ -export function printHelp() { - console.log(` -lint-process - Validate changes against delivery process rules - -Usage: - lint-process [options] [files...] - -Modes: - --staged Validate staged changes (default, for pre-commit) - --all Validate all changes compared to main branch - --files Validate specific files (use with --file or positional args) - -Options: - -f, --file File to validate (repeatable, implies --files mode) - -b, --base-dir Base directory for paths (default: cwd) - --strict Treat warnings as errors (exit 1 on warnings) - --ignore-session Ignore session scope rules - --show-state Show derived process state (debugging) - --format Output format: "pretty" (default) or "json" - -h, --help Show this help message - -v, --version Show version number - -Exit Codes: - 0 No errors (warnings allowed unless --strict) - 1 Errors found (or warnings with --strict) - -Rules Checked: - error completed-protection Cannot modify completed specs without unlock-reason - error invalid-status-transition Status transition must follow PDR-005 FSM - error scope-creep Cannot add deliverables to active specs - error session-excluded Cannot modify files excluded from session - warning session-scope File not in active session scope - warning deliverable-removed Deliverable was removed (informational) - -Examples: - # Pre-commit hook (default) - lint-process --staged - - # CI/CD pipeline - lint-process --all --strict - - # Check specific files - lint-process --file path/to/spec.feature - - # Debugging - show derived state - lint-process --staged --show-state - `); -} -/** - * Format validation result for pretty output - */ -function formatPretty(output) { - const { result } = output; - const lines = []; - lines.push(summarizeResult(result)); - lines.push(''); - if (result.violations.length > 0) { - lines.push('Errors:'); - for (const v of result.violations) { - lines.push(` [${v.rule}] ${v.file}`); - lines.push(` ${v.message}`); - if (v.suggestion !== undefined) { - lines.push(` Fix: ${v.suggestion}`); - } - } - lines.push(''); - } - if (result.warnings.length > 0) { - lines.push('Warnings:'); - for (const w of result.warnings) { - lines.push(` [${w.rule}] ${w.file}`); - lines.push(` ${w.message}`); - if (w.suggestion !== undefined) { - lines.push(` Fix: ${w.suggestion}`); - } - } - lines.push(''); - } - return lines.join('\n'); -} -/** - * Format validation result for JSON output - */ -function formatJson(output) { - const { result, events } = output; - return JSON.stringify({ - valid: result.valid, - violations: result.violations, - warnings: result.warnings, - events, - }, null, 2); -} -/** - * Main CLI function - */ -async function main() { - const config = parseArgs(); - if (config.version) { - printVersionAndExit('lint-process'); - } - if (config.help) { - printHelp(); - process.exit(0); - } - try { - console.log(`Process Guard: validating ${config.mode} changes...`); - console.log(` Base directory: ${config.baseDir}`); - // Derive process state - const stateResult = await deriveProcessState({ baseDir: config.baseDir }); - if (!stateResult.ok) { - throw stateResult.error; - } - const state = stateResult.value; - if (config.showState) { - console.log('\nDerived Process State:'); - console.log(` Files: ${state.files.size}`); - console.log(` Active Session: ${state.activeSession?.id ?? 'none'}`); - console.log(''); - // Show file states - for (const [path, fileState] of state.files) { - console.log(` ${path}`); - console.log(` Status: ${fileState.status} (${fileState.protection} protection)`); - if (fileState.deliverables.length > 0) { - console.log(` Deliverables: ${fileState.deliverables.length}`); - } - } - console.log(''); - } - // Detect changes based on mode - let changesResult; - switch (config.mode) { - case 'staged': - changesResult = detectStagedChanges(config.baseDir); - break; - case 'all': - changesResult = detectBranchChanges(config.baseDir); - break; - case 'files': - if (config.files.length === 0) { - console.error('Error: No files specified with --files mode'); - printHelp(); - process.exit(1); - } - changesResult = detectFileChanges(config.baseDir, config.files); - break; - } - if (!changesResult.ok) { - throw changesResult.error; - } - const changes = changesResult.value; - // Check if there are any changes - if (!hasChanges(changes)) { - console.log('No changes detected.'); - process.exit(0); - } - console.log(` Modified files: ${changes.modifiedFiles.length}`); - console.log(` Added files: ${changes.addedFiles.length}`); - console.log(` Deleted files: ${changes.deletedFiles.length}`); - console.log(` Status transitions: ${changes.statusTransitions.size}`); - console.log(` Deliverable changes: ${changes.deliverableChanges.size}`); - console.log(''); - // Validate changes - const output = validateChanges({ - state, - changes, - options: { - strict: config.strict, - ignoreSession: config.ignoreSession, - }, - }); - // Format and output results - if (config.format === 'json') { - console.log(formatJson(output)); - } - else { - console.log(formatPretty(output)); - } - // Determine exit code - const failed = config.strict - ? hasErrors(output.result) || hasWarnings(output.result) - : hasErrors(output.result); - process.exit(failed ? 1 : 0); - } - catch (error) { - handleCliError(error, 1); - } -} -// Entry point -void main(); -//# sourceMappingURL=lint-process.js.map \ No newline at end of file diff --git a/dist/cli/lint-process.js.map b/dist/cli/lint-process.js.map deleted file mode 100644 index 4e6045b1..00000000 --- a/dist/cli/lint-process.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"lint-process.js","sourceRoot":"","sources":["../../src/cli/lint-process.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EACf,UAAU,EACV,SAAS,EACT,WAAW,EACX,eAAe,GAEhB,MAAM,gCAAgC,CAAC;AA0BxC;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,OAAiB,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAC9D,MAAM,MAAM,GAA0B;QACpC,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,EAAE;QACT,MAAM,EAAE,KAAK;QACb,aAAa,EAAE,KAAK;QACpB,SAAS,EAAE,KAAK;QAChB,OAAO,EAAE,OAAO,CAAC,GAAG,EAAE;QACtB,MAAM,EAAE,QAAQ;QAChB,IAAI,EAAE,KAAK;QACX,OAAO,EAAE,KAAK;KACf,CAAC;IAEF,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CA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AC7B,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;QAClC,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC;QACpC,CAAC;QAED,sBAAsB;QACtB,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM;YAC1B,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC;YACxD,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAE7B,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,cAAc,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IAC3B,CAAC;AACH,CAAC;AAED,cAAc;AACd,KAAK,IAAI,EAAE,CAAC"} \ No newline at end of file diff --git a/dist/cli/lint-steps.d.ts b/dist/cli/lint-steps.d.ts deleted file mode 100644 index 87637b63..00000000 --- a/dist/cli/lint-steps.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env node -/** - * CLI for vitest-cucumber step/feature compatibility linting. - * - * Detects common vitest-cucumber traps statically — before tests run. - * Catches mismatches between .feature files and .steps.ts files that - * cause cryptic runtime failures. - */ -/** - * CLI configuration - */ -export interface LintStepsCLIConfig { - /** Treat warnings as errors */ - strict: boolean; - /** Base directory for relative paths */ - baseDir: string; - /** Output format */ - format: 'pretty' | 'json'; - /** Show help */ - help: boolean; - /** Show version */ - version: boolean; -} -/** - * Parse command line arguments - */ -export declare function parseArgs(argv?: string[]): LintStepsCLIConfig; -/** - * Print usage information - */ -export declare function printHelp(): void; -//# sourceMappingURL=lint-steps.d.ts.map \ No newline at end of file diff --git a/dist/cli/lint-steps.d.ts.map b/dist/cli/lint-steps.d.ts.map deleted file mode 100644 index f288eec2..00000000 --- a/dist/cli/lint-steps.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"lint-steps.d.ts","sourceRoot":"","sources":["../../src/cli/lint-steps.ts"],"names":[],"mappings":";AAEA;;;;;;GAMG;AAOH;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,+BAA+B;IAC/B,MAAM,EAAE,OAAO,CAAC;IAChB,wCAAwC;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,oBAAoB;IACpB,MAAM,EAAE,QAAQ,GAAG,MAAM,CAAC;IAC1B,gBAAgB;IAChB,IAAI,EAAE,OAAO,CAAC;IACd,mBAAmB;IACnB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,GAAE,MAAM,EAA0B,GAAG,kBAAkB,CAmDpF;AAED;;GAEG;AACH,wBAAgB,SAAS,IAAI,IAAI,CAsDhC"} \ No newline at end of file diff --git a/dist/cli/lint-steps.js b/dist/cli/lint-steps.js deleted file mode 100644 index 5172cecd..00000000 --- a/dist/cli/lint-steps.js +++ /dev/null @@ -1,164 +0,0 @@ -#!/usr/bin/env node -/** - * CLI for vitest-cucumber step/feature compatibility linting. - * - * Detects common vitest-cucumber traps statically — before tests run. - * Catches mismatches between .feature files and .steps.ts files that - * cause cryptic runtime failures. - */ -import { printVersionAndExit } from './version.js'; -import { handleCliError } from './error-handler.js'; -import { runStepLint } from '../lint/steps/index.js'; -import { formatPretty, formatJson, hasFailures } from '../lint/engine.js'; -/** - * Parse command line arguments - */ -export function parseArgs(argv = process.argv.slice(2)) { - const config = { - strict: false, - baseDir: process.cwd(), - format: 'pretty', - help: false, - version: false, - }; - let parsingFlags = true; - for (let i = 0; i < argv.length; i++) { - const arg = argv[i]; - // Handle -- separator from pnpm - if (arg === '--') { - parsingFlags = false; - continue; - } - if (!parsingFlags) { - continue; - } - if (arg === '--help' || arg === '-h') { - config.help = true; - } - else if (arg === '--version' || arg === '-v') { - config.version = true; - } - else if (arg === '--strict') { - config.strict = true; - } - else if (arg === '--base-dir' || arg === '-b') { - const nextArg = argv[++i]; - if (nextArg === undefined) { - throw new Error(`Missing value for ${arg} flag`); - } - config.baseDir = nextArg; - } - else if (arg === '--format') { - const nextArg = argv[++i]; - if (nextArg === undefined) { - throw new Error(`Missing value for ${arg} flag`); - } - if (nextArg !== 'pretty' && nextArg !== 'json') { - throw new Error(`Invalid format: ${nextArg}. Use "pretty" or "json"`); - } - config.format = nextArg; - } - else if (arg?.startsWith('-') === true) { - console.warn(`Warning: Unknown flag '${arg}' ignored`); - } - } - return config; -} -/** - * Print usage information - */ -export function printHelp() { - console.log(` -lint-steps - Validate vitest-cucumber feature/step compatibility - -Detects common traps statically before tests run: - - {string} function params inside ScenarioOutline (should use variables) - - Missing And destructuring (causes StepAbleUnknowStepError) - - Missing Rule() wrapper (causes step matching failures) - - # in descriptions (terminates Gherkin parser context) - - Regex step patterns (not supported) - - {phrase} usage (not supported) - - Duplicate And step text (causes matching failures) - - $ in step text (causes matching issues) - -Usage: - lint-steps [options] - -Options: - --strict Treat warnings as errors (exit 1 on warnings) - --format Output format: "pretty" (default) or "json" - -b, --base-dir Base directory for paths (default: cwd) - -h, --help Show this help message - -v, --version Show version number - -Exit Codes: - 0 No errors (warnings allowed unless --strict) - 1 Errors found (or warnings with --strict) - -Scan Scope: - Feature files: tests/features/**/*.feature - delivery-process/specs/**/*.feature - delivery-process/decisions/**/*.feature - Step files: tests/steps/**/*.steps.ts - -Rules: - error hash-in-description # at line start in description context - error duplicate-and-step Multiple And with same text in scenario - warning dollar-in-step-text $ character in step text - error regex-step-pattern Regex pattern in step definition - error unsupported-phrase-type {phrase} in step string - error scenario-outline-function-params Function params in ScenarioOutline - error missing-and-destructuring And steps but no And destructured - error missing-rule-wrapper Rule: blocks but no Rule() wrapper - -Examples: - # Standard check - lint-steps - - # Strict mode (warnings are errors) - lint-steps --strict - - # JSON output for CI - lint-steps --format json - `); -} -/** - * Main CLI function - */ -function main() { - const config = parseArgs(); - if (config.version) { - printVersionAndExit('lint-steps'); - } - if (config.help) { - printHelp(); - process.exit(0); - } - try { - console.log('Step Lint: checking vitest-cucumber compatibility...'); - const summary = runStepLint({ baseDir: config.baseDir }); - // Format and output results - if (config.format === 'json') { - const result = formatJson(summary); - if (result.ok) { - console.log(result.value); - } - else { - console.error(`Output formatting error: ${result.error.message}`); - process.exit(1); - } - } - else { - console.log(formatPretty(summary)); - } - // Determine exit code - const failed = hasFailures(summary, config.strict); - process.exit(failed ? 1 : 0); - } - catch (error) { - handleCliError(error, 1); - } -} -// Entry point -main(); -//# sourceMappingURL=lint-steps.js.map \ No newline at end of file diff --git a/dist/cli/lint-steps.js.map b/dist/cli/lint-steps.js.map deleted file mode 100644 index c49d8006..00000000 --- a/dist/cli/lint-steps.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"lint-steps.js","sourceRoot":"","sources":["../../src/cli/lint-steps.ts"],"names":[],"mappings":";AAEA;;;;;;GAMG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAkB1E;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,OAAiB,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAC9D,MAAM,MAAM,GAAuB;QACjC,MAAM,EAAE,KAAK;QACb,OAAO,EAAE,OAAO,CAAC,GAAG,EAAE;QACtB,MAAM,EAAE,QAAQ;QAChB,IAAI,EAAE,KAAK;QACX,OAAO,EAAE,KAAK;KACf,CAAC;IAEF,IAAI,YAAY,GAAG,IAAI,CAAC;IAExB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,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;gBAClE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAClB,CAAC;QACH,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC;QACrC,CAAC;QAED,sBAAsB;QACtB,MAAM,MAAM,GAAG,WAAW,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;QACnD,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,cAAc,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IAC3B,CAAC;AACH,CAAC;AAED,cAAc;AACd,IAAI,EAAE,CAAC"} \ No newline at end of file diff --git a/dist/cli/output-pipeline.d.ts b/dist/cli/output-pipeline.d.ts deleted file mode 100644 index 05b53800..00000000 --- a/dist/cli/output-pipeline.d.ts +++ /dev/null @@ -1,128 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern OutputPipelineImpl - * @libar-docs-status active - * @libar-docs-implements DataAPIOutputShaping - * @libar-docs-uses PatternSummarizerImpl - * @libar-docs-used-by ProcessAPICLIImpl - * @libar-docs-arch-role service - * @libar-docs-arch-context cli - * @libar-docs-arch-layer application - * - * ## OutputPipeline — CLI Output Shaping and Formatting - * - * Post-processing pipeline that transforms raw API results into shaped CLI output. - * Applies output modifiers (--names-only, --count, --fields, --full) and wraps - * results in QueryResult envelopes. - * - * Architecture decision: This is a single post-processing function, NOT a - * middleware chain. The 4 modifiers are mutually exclusive with clear precedence: - * count > namesOnly > fields > default summarize. - */ -import type { ExtractedPattern } from '../validation-schemas/extracted-pattern.js'; -import type { MasterDataset } from '../validation-schemas/master-dataset.js'; -import type { QueryResult } from '../api/types.js'; -/** - * Output modifier flags parsed from CLI arguments. - * - * Precedence: count > namesOnly > fields > default summarize. - * When --full is set, summarization is bypassed. - */ -export interface OutputModifiers { - /** --names-only: return array of pattern name strings */ - readonly namesOnly: boolean; - /** --count: return single integer count */ - readonly count: boolean; - /** --fields name,status: return only selected fields per pattern */ - readonly fields: readonly string[] | null; - /** --full: bypass summarization, return raw ExtractedPattern[] */ - readonly full: boolean; -} -export declare const DEFAULT_OUTPUT_MODIFIERS: OutputModifiers; -/** - * Composable list filters for the `list` subcommand. - * - * Filters combine via AND logic. Each filter narrows the result set. - */ -export interface ListFilters { - /** Filter by FSM status (roadmap, active, completed, deferred) */ - readonly status: string | null; - /** Filter by roadmap phase number */ - readonly phase: number | null; - /** Filter by category name */ - readonly category: string | null; - /** Filter by source type */ - readonly source: 'typescript' | 'gherkin' | null; - /** Filter by architecture context (@libar-docs-arch-context) */ - readonly archContext: string | null; - /** Filter by product area (@libar-docs-product-area) */ - readonly productArea: string | null; - /** Maximum number of results */ - readonly limit: number | null; - /** Number of results to skip */ - readonly offset: number | null; -} -export declare const DEFAULT_LIST_FILTERS: ListFilters; -/** - * Discriminated union for pipeline input. - * - * The router determines `kind` based on which API method was called. - * Pattern arrays get summarization + modifiers; scalars pass through. - */ -export type PipelineInput = { - readonly kind: 'patterns'; - readonly data: readonly ExtractedPattern[]; -} | { - readonly kind: 'scalar'; - readonly data: unknown; -}; -/** - * Set of ProcessStateAPI method names that return ExtractedPattern[]. - * - * Used by the router to tag results with `kind: 'patterns'` for the pipeline. - */ -export declare const PATTERN_ARRAY_METHODS: ReadonlySet; -/** - * Validate output modifier combinations. - * Throws on conflicts: --full + --names-only, --full + --count, --full + --fields. - */ -export declare function validateModifiers(modifiers: OutputModifiers): void; -/** - * Apply output modifiers to pipeline input. - * - * For pattern arrays: - * - Default: summarize each pattern to ~100 bytes - * - --full: bypass summarization - * - --names-only: extract pattern names as string[] - * - --count: return array length as number - * - --fields: pick specific fields from each summary - * - * For scalars: pass through unchanged (modifiers do not apply). - */ -export declare function applyOutputPipeline(input: PipelineInput, modifiers: OutputModifiers): unknown; -/** - * Apply composable filters to the pattern list. - * - * Sequential filter composition: status → phase → category → source. - * Pagination (offset/limit) applies after all filters. - */ -export declare function applyListFilters(dataset: MasterDataset, filters: ListFilters): readonly ExtractedPattern[]; -/** - * Strip null, undefined, and empty values from an object for compact output. - * - * Recursively removes: - * - null and undefined values - * - empty strings - * - empty arrays - * - empty objects - */ -export declare function stripEmpty(obj: unknown): unknown; -/** - * Format a QueryResult envelope for CLI output. - * - * - json mode: pretty-printed with 2-space indent - * - compact mode: minified with empty values stripped - */ -export declare function formatOutput(envelope: QueryResult, format: 'json' | 'compact'): string; -//# sourceMappingURL=output-pipeline.d.ts.map \ No newline at end of file diff --git a/dist/cli/output-pipeline.d.ts.map b/dist/cli/output-pipeline.d.ts.map deleted file mode 100644 index 763ef856..00000000 --- a/dist/cli/output-pipeline.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"output-pipeline.d.ts","sourceRoot":"","sources":["../../src/cli/output-pipeline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AACnF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAE7E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAQnD;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B,yDAAyD;IACzD,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,2CAA2C;IAC3C,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,oEAAoE;IACpE,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAAC;IAC1C,kEAAkE;IAClE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;CACxB;AAED,eAAO,MAAM,wBAAwB,EAAE,eAKtC,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,kEAAkE;IAClE,QA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S,gBAAgB,EAAE,CAmD7B;AAMD;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CA0BhD;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,WAAW,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAM/F"} \ No newline at end of file diff --git a/dist/cli/output-pipeline.js b/dist/cli/output-pipeline.js deleted file mode 100644 index f08a52b3..00000000 --- a/dist/cli/output-pipeline.js +++ /dev/null @@ -1,232 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern OutputPipelineImpl - * @libar-docs-status active - * @libar-docs-implements DataAPIOutputShaping - * @libar-docs-uses PatternSummarizerImpl - * @libar-docs-used-by ProcessAPICLIImpl - * @libar-docs-arch-role service - * @libar-docs-arch-context cli - * @libar-docs-arch-layer application - * - * ## OutputPipeline — CLI Output Shaping and Formatting - * - * Post-processing pipeline that transforms raw API results into shaped CLI output. - * Applies output modifiers (--names-only, --count, --fields, --full) and wraps - * results in QueryResult envelopes. - * - * Architecture decision: This is a single post-processing function, NOT a - * middleware chain. The 4 modifiers are mutually exclusive with clear precedence: - * count > namesOnly > fields > default summarize. - */ -import { QueryApiError } from '../api/types.js'; -import { summarizePatterns, SUMMARY_FIELDS, deriveSource } from '../api/summarize.js'; -import { getPatternName } from '../api/pattern-helpers.js'; -export const DEFAULT_OUTPUT_MODIFIERS = { - namesOnly: false, - count: false, - fields: null, - full: false, -}; -export const DEFAULT_LIST_FILTERS = { - status: null, - phase: null, - category: null, - source: null, - archContext: null, - productArea: null, - limit: null, - offset: null, -}; -/** - * Set of ProcessStateAPI method names that return ExtractedPattern[]. - * - * Used by the router to tag results with `kind: 'patterns'` for the pipeline. - */ -export const PATTERN_ARRAY_METHODS = new Set([ - 'getPatternsByNormalizedStatus', - 'getPatternsByStatus', - 'getPatternsByPhase', - 'getPatternsByCategory', - 'getPatternsByQuarter', - 'getCurrentWork', - 'getRoadmapItems', - 'getRecentlyCompleted', -]); -// --------------------------------------------------------------------------- -// Validation -// --------------------------------------------------------------------------- -/** - * Validate output modifier combinations. - * Throws on conflicts: --full + --names-only, --full + --count, --full + --fields. - */ -export function validateModifiers(modifiers) { - if (modifiers.full && modifiers.namesOnly) { - throw new QueryApiError('INVALID_ARGUMENT', 'Conflicting modifiers: --full and --names-only cannot be used together'); - } - if (modifiers.full && modifiers.count) { - throw new QueryApiError('INVALID_ARGUMENT', 'Conflicting modifiers: --full and --count cannot be used together'); - } - if (modifiers.full && modifiers.fields !== null) { - throw new QueryApiError('INVALID_ARGUMENT', 'Conflicting modifiers: --full and --fields cannot be used together'); - } - if (modifiers.fields !== null) { - const validFields = SUMMARY_FIELDS; - const invalidFields = modifiers.fields.filter((f) => !validFields.has(f)); - if (invalidFields.length > 0) { - throw new QueryApiError('INVALID_ARGUMENT', `Invalid field names: ${invalidFields.join(', ')}. Valid fields: ${[...validFields].join(', ')}`); - } - } -} -// --------------------------------------------------------------------------- -// Pipeline -// --------------------------------------------------------------------------- -/** - * Apply output modifiers to pipeline input. - * - * For pattern arrays: - * - Default: summarize each pattern to ~100 bytes - * - --full: bypass summarization - * - --names-only: extract pattern names as string[] - * - --count: return array length as number - * - --fields: pick specific fields from each summary - * - * For scalars: pass through unchanged (modifiers do not apply). - */ -export function applyOutputPipeline(input, modifiers) { - if (input.kind === 'scalar') { - return input.data; - } - const patterns = input.data; - // Precedence: count > namesOnly > fields > default summarize - if (modifiers.count) { - return patterns.length; - } - if (modifiers.namesOnly) { - return patterns.map((p) => getPatternName(p)); - } - if (modifiers.full) { - return patterns; - } - const summaries = summarizePatterns(patterns); - if (modifiers.fields !== null) { - const fieldSet = new Set(modifiers.fields); - return summaries.map((s) => { - const picked = {}; - for (const field of fieldSet) { - if (field in s) { - picked[field] = s[field]; - } - } - return picked; - }); - } - return summaries; -} -// --------------------------------------------------------------------------- -// Filtering -// --------------------------------------------------------------------------- -/** - * Apply composable filters to the pattern list. - * - * Sequential filter composition: status → phase → category → source. - * Pagination (offset/limit) applies after all filters. - */ -export function applyListFilters(dataset, filters) { - let candidates = dataset.patterns; - // Filter by status - if (filters.status !== null) { - // For exact status matching (roadmap, active, completed, deferred), - // filter directly rather than using normalized views - candidates = candidates.filter((p) => p.status === filters.status); - } - // Filter by phase - if (filters.phase !== null) { - const phase = filters.phase; - candidates = candidates.filter((p) => p.phase === phase); - } - // Filter by category - if (filters.category !== null) { - const category = filters.category.toLowerCase(); - candidates = candidates.filter((p) => p.category.toLowerCase() === category); - } - // Filter by source - if (filters.source !== null) { - const source = filters.source; - candidates = candidates.filter((p) => { - return deriveSource(p.source.file) === source; - }); - } - // Filter by architecture context - if (filters.archContext !== null) { - const ctx = filters.archContext.toLowerCase(); - candidates = candidates.filter((p) => p.archContext?.toLowerCase() === ctx); - } - // Filter by product area - if (filters.productArea !== null) { - const area = filters.productArea.toLowerCase(); - candidates = candidates.filter((p) => p.productArea?.toLowerCase() === area); - } - // Apply pagination - if (filters.offset !== null) { - candidates = candidates.slice(filters.offset); - } - if (filters.limit !== null) { - candidates = candidates.slice(0, filters.limit); - } - return candidates; -} -// --------------------------------------------------------------------------- -// Output formatting -// --------------------------------------------------------------------------- -/** - * Strip null, undefined, and empty values from an object for compact output. - * - * Recursively removes: - * - null and undefined values - * - empty strings - * - empty arrays - * - empty objects - */ -export function stripEmpty(obj) { - if (obj === null || obj === undefined) { - return undefined; - } - if (Array.isArray(obj)) { - if (obj.length === 0) - return undefined; - return obj.map(stripEmpty).filter((v) => v !== undefined); - } - if (typeof obj === 'object') { - const result = {}; - let hasKeys = false; - for (const [key, value] of Object.entries(obj)) { - if (value === null || value === undefined) - continue; - if (typeof value === 'string' && value === '') - continue; - const stripped = stripEmpty(value); - if (stripped !== undefined) { - result[key] = stripped; - hasKeys = true; - } - } - return hasKeys ? result : undefined; - } - return obj; -} -/** - * Format a QueryResult envelope for CLI output. - * - * - json mode: pretty-printed with 2-space indent - * - compact mode: minified with empty values stripped - */ -export function formatOutput(envelope, format) { - if (format === 'compact') { - const stripped = stripEmpty(envelope); - return JSON.stringify(stripped); - } - return JSON.stringify(envelope, null, 2); -} -//# sourceMappingURL=output-pipeline.js.map \ No newline at end of file diff --git a/dist/cli/output-pipeline.js.map b/dist/cli/output-pipeline.js.map deleted file mode 100644 index b5b0f4d7..00000000 --- a/dist/cli/output-pipeline.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"output-pipeline.js","sourceRoot":"","sources":["../../src/cli/output-pipeline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAIH,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACtF,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAuB3D,MAAM,CAAC,MAAM,wBAAwB,GAAoB;IACvD,SAAS,EAAE,KAAK;IAChB,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,KAAK;CACZ,CAAC;AA0BF,MAAM,CAAC,MAAM,oBAAoB,GAAgB;IAC/C,MAAM,EAAE,IAAI;IACZ,KAAK,EAAE,IAAI;IACX,QAAQ,EAAE,IAAI;IACd,MAAM,EAAE,IAAI;IACZ,WAAW,EAAE,IAAI;IACjB,WAAW,EAAE,IAAI;IACjB,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,IAAI;CACb,CAAC;AAYF;;;;GAIG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAwB,IAAI,GAAG,CAAC;IAChE,+BAA+B;IAC/B,qBAAqB;IACrB,oBAAoB;IACpB,uBAAuB;IACvB,sBAAsB;IACtB,gBAAgB;IAChB,iBAAiB;IACjB,sBAAsB;CACvB,CAAC,CAAC;AAEH,8EAA8E;AAC9E,aAAa;AACb,8EAA8E;AAE9E;;;G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AI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;YAC/C,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS;gBAAE,SAAS;YACpD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,EAAE;gBAAE,SAAS;YACxD,MAAM,QAAQ,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;YACnC,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;gBAC3B,MAAM,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC;gBACvB,OAAO,GAAG,IAAI,CAAC;YACjB,CAAC;QACH,CAAC;QACD,OAAO,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;IACtC,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,QAA8B,EAAE,MAA0B;IACrF,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,MAAM,QAAQ,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC;QACtC,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;IAClC,CAAC;IACD,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AAC3C,CAAC"} \ No newline at end of file diff --git a/dist/cli/process-api.d.ts b/dist/cli/process-api.d.ts deleted file mode 100644 index 6ca537c6..00000000 --- a/dist/cli/process-api.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env node -/** - * @libar-docs - * @libar-docs-core @libar-docs-cli - * @libar-docs-pattern ProcessAPICLIImpl - * @libar-docs-status active - * @libar-docs-implements ProcessStateAPICLI - * @libar-docs-arch-role service - * @libar-docs-arch-context cli - * @libar-docs-arch-layer application - * @libar-docs-uses ProcessStateAPI, MasterDataset, PipelineFactory, RulesQueryModule, PatternSummarizerImpl, FuzzyMatcherImpl, OutputPipelineImpl - * @libar-docs-used-by npm scripts, Claude Code sessions - * @libar-docs-usecase "When querying delivery process state from CLI" - * @libar-docs-usecase "When Claude Code needs real-time delivery state queries" - * - * ## process-api - CLI Query Interface to ProcessStateAPI - * - * Exposes ProcessStateAPI methods as CLI subcommands with JSON output. - * Runs pipeline steps 1-8 (config -> scan -> extract -> transform), - * then routes subcommands to API methods. - * - * ### When to Use - * - * - When Claude Code needs real-time delivery state queries - * - When AI agents need structured JSON instead of regenerating markdown - * - When scripting delivery process queries in CI/CD - * - * ### Key Concepts - * - * - **Subcommand Routing**: CLI subcommands map to ProcessStateAPI methods - * - **JSON Output**: All output is JSON to stdout, errors to stderr - * - **Pipeline Reuse**: Steps 1-8 match generate-docs exactly - * - **QueryResult Envelope**: All output wrapped in success/error discriminated union - * - **Output Shaping**: 594KB -> 4KB via summarization and modifiers - */ -export {}; -//# sourceMappingURL=process-api.d.ts.map \ No newline at end of file diff --git a/dist/cli/process-api.d.ts.map b/dist/cli/process-api.d.ts.map deleted file mode 100644 index 257ccbb6..00000000 --- a/dist/cli/process-api.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"process-api.d.ts","sourceRoot":"","sources":["../../src/cli/process-api.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG"} \ No newline at end of file diff --git a/dist/cli/process-api.js b/dist/cli/process-api.js deleted file mode 100644 index 98c0a7c0..00000000 --- a/dist/cli/process-api.js +++ /dev/null @@ -1,1148 +0,0 @@ -#!/usr/bin/env node -/** - * @libar-docs - * @libar-docs-core @libar-docs-cli - * @libar-docs-pattern ProcessAPICLIImpl - * @libar-docs-status active - * @libar-docs-implements ProcessStateAPICLI - * @libar-docs-arch-role service - * @libar-docs-arch-context cli - * @libar-docs-arch-layer application - * @libar-docs-uses ProcessStateAPI, MasterDataset, PipelineFactory, RulesQueryModule, PatternSummarizerImpl, FuzzyMatcherImpl, OutputPipelineImpl - * @libar-docs-used-by npm scripts, Claude Code sessions - * @libar-docs-usecase "When querying delivery process state from CLI" - * @libar-docs-usecase "When Claude Code needs real-time delivery state queries" - * - * ## process-api - CLI Query Interface to ProcessStateAPI - * - * Exposes ProcessStateAPI methods as CLI subcommands with JSON output. - * Runs pipeline steps 1-8 (config -> scan -> extract -> transform), - * then routes subcommands to API methods. - * - * ### When to Use - * - * - When Claude Code needs real-time delivery state queries - * - When AI agents need structured JSON instead of regenerating markdown - * - When scripting delivery process queries in CI/CD - * - * ### Key Concepts - * - * - **Subcommand Routing**: CLI subcommands map to ProcessStateAPI methods - * - **JSON Output**: All output is JSON to stdout, errors to stderr - * - **Pipeline Reuse**: Steps 1-8 match generate-docs exactly - * - **QueryResult Envelope**: All output wrapped in success/error discriminated union - * - **Output Shaping**: 594KB -> 4KB via summarization and modifiers - */ -import * as path from 'path'; -import * as fs from 'fs'; -import { applyProjectSourceDefaults } from '../config/config-loader.js'; -import { buildMasterDataset, } from '../generators/pipeline/index.js'; -import { createProcessStateAPI } from '../api/process-state.js'; -import { createSuccess, createError, QueryApiError } from '../api/types.js'; -import { handleCliError } from './error-handler.js'; -import { printVersionAndExit } from './version.js'; -import { fuzzyMatchPatterns } from '../api/fuzzy-match.js'; -import { allPatternNames, suggestPattern, firstImplements, getPatternName, } from '../api/pattern-helpers.js'; -import { findStubPatterns, resolveStubs, groupStubsByPattern, extractDecisionItems, findPdrReferences, } from '../api/stub-resolver.js'; -import { applyOutputPipeline, applyListFilters, validateModifiers, formatOutput, PATTERN_ARRAY_METHODS, DEFAULT_OUTPUT_MODIFIERS, } from './output-pipeline.js'; -import { assembleContext, buildDepTree, buildFileReadingList, buildOverview, isValidSessionType, } from '../api/context-assembler.js'; -import { formatContextBundle, formatDepTree, formatFileReadingList, formatOverview, } from '../api/context-formatter.js'; -import { computeNeighborhood, compareContexts, aggregateTagUsage, buildSourceInventory, findOrphanPatterns, } from '../api/arch-queries.js'; -import { analyzeCoverage, findUnannotatedFiles } from '../api/coverage-analyzer.js'; -import { validateScope, formatScopeValidation } from '../api/scope-validator.js'; -import { generateHandoff, formatHandoff, } from '../api/handoff-generator.js'; -import { execSync } from 'child_process'; -import { queryBusinessRules } from '../api/rules-query.js'; -// ============================================================================= -// Argument Parsing -// ============================================================================= -function parseArgs(argv = process.argv.slice(2)) { - const config = { - input: [], - features: [], - baseDir: process.cwd(), - workflowPath: null, - subcommand: null, - subArgs: [], - help: false, - version: false, - modifiers: { ...DEFAULT_OUTPUT_MODIFIERS }, - format: 'json', - sessionType: null, - }; - // Mutable modifiers for parsing - let namesOnly = false; - let count = false; - let fields = null; - let full = false; - let parsingFlags = true; - for (let i = 0; i < argv.length; i++) { - const arg = argv[i]; - const nextArg = argv[i + 1]; - // pnpm passes '--' as a literal arg separator — skip it - if (arg === '--') { - parsingFlags = false; - continue; - } - // Handle --help and --version regardless of position - if (arg === '-h' || arg === '--help') { - config.help = true; - continue; - } - if (arg === '-v' || arg === '--version') { - config.version = true; - continue; - } - // Handle output modifiers regardless of position (before or after subcommand) - if (arg === '--names-only') { - namesOnly = true; - continue; - } - if (arg === '--count') { - count = true; - continue; - } - if (arg === '--fields') { - if (!nextArg || nextArg.startsWith('-')) { - throw new Error(`${arg} requires a value (comma-separated field names)`); - } - fields = nextArg.split(',').map((f) => f.trim()); - i++; - continue; - } - if (arg === '--full') { - full = true; - continue; - } - if (arg === '--format') { - if (nextArg !== 'json' && nextArg !== 'compact') { - throw new Error(`${arg} must be "json" or "compact"`); - } - config.format = nextArg; - i++; - continue; - } - if (parsingFlags && arg?.startsWith('-') === true) { - switch (arg) { - case '-i': - case '--input': - if (!nextArg || nextArg.startsWith('-')) { - throw new Error(`${arg} requires a value`); - } - config.input.push(nextArg); - i++; - break; - case '-f': - case '--features': - if (!nextArg || nextArg.startsWith('-')) { - throw new Error(`${arg} requires a value`); - } - config.features.push(nextArg); - i++; - break; - case '-b': - case '--base-dir': - if (!nextArg || nextArg.startsWith('-')) { - throw new Error(`${arg} requires a value`); - } - config.baseDir = nextArg; - i++; - break; - case '-w': - case '--workflow': - if (!nextArg || nextArg.startsWith('-')) { - throw new Error(`${arg} requires a value`); - } - config.workflowPath = nextArg; - i++; - break; - case '--session': - if (!nextArg || !isValidSessionType(nextArg)) { - throw new Error(`${arg} must be "planning", "design", or "implement"`); - } - config.sessionType = nextArg; - i++; - break; - default: - throw new Error(`Unknown option: ${arg}`); - } - } - else if (arg !== undefined) { - if (config.subcommand === null) { - config.subcommand = arg; - parsingFlags = false; - } - else { - config.subArgs.push(arg); - } - } - } - config.modifiers = { namesOnly, count, fields, full }; - return config; -} -// ============================================================================= -// Help -// ============================================================================= -function showHelp() { - console.log(` -process-api - Query delivery process state from annotated sources - - Use this instead of reading generated markdown or launching explore agents. - Targeted queries use 5-10x less context than file reads. - -Usage: process-api [options] [args...] - -Quick Start — Session Recipe: - - 1. overview Project health (progress, blockers) - 2. scope-validate implement Pre-flight check (FSM, deps, prereqs) - 3. context --session design Curated context bundle for the session - -Session Workflow Commands (text output — use these first): - - overview Executive summary: progress, active phases, blockers - scope-validate Pre-flight readiness check (PASS/BLOCKED/WARN verdict) - Catches FSM violations and missing deps BEFORE you start. - Types: implement, design - context --session Curated context bundle tailored to session type - planning — minimal: pattern metadata and spec file - design — full: metadata, stubs, deps, deliverables - implement — focused: deliverables, FSM state, test files - dep-tree [--depth N] Dependency chain with status - files [--related] File reading list with implementation paths - handoff --pattern Session-end state: deliverables, blockers, date - Options: --git (include recent commits), --session - -Pattern Discovery (JSON output): - - status Status counts and completion percentage - list [filters] Filtered pattern listing (composable with modifiers below) - search Fuzzy name search with match scores - pattern Full detail for one pattern - Warning: ~66KB for completed patterns — prefer 'context --session' - stubs [pattern] Design stubs with target paths and resolution status - stubs --unresolved Only stubs with missing target files - decisions AD-N design decisions from stub descriptions - pdr Cross-reference patterns mentioning a PDR number - rules [filters] Business rules and invariants from feature specs - --product-area Filter by product area - --pattern Filter by pattern name - --only-invariants Only rules with explicit invariants - -Architecture Queries (JSON output): - - arch neighborhood What does this pattern touch? (uses/usedBy/sameContext) - arch blocking What's stuck? Patterns blocked by incomplete deps - arch dangling Broken references (pattern names that don't exist) - arch orphans Isolated patterns with no relationships - arch coverage Annotation completeness across input files - arch roles All arch-roles with pattern counts - arch context [name] Patterns in bounded context (list all if no name) - arch layer [name] Patterns in architecture layer (list all if no name) - arch compare Cross-context shared deps and integration points - -Metadata & Inventory: - - tags Tag usage report (counts per tag and value) - sources File inventory by type (TS, Gherkin, Stubs) - unannotated [--path dir] TypeScript files missing @libar-docs annotations - query [args...] Execute any query API method directly - -Options: - - -i, --input Glob patterns for TypeScript files (repeatable) - -f, --features Glob patterns for .feature files (repeatable) - -b, --base-dir Base directory (default: cwd) - -w, --workflow Workflow config JSON file - -h, --help Show this help message - -v, --version Show version number - -Output Modifiers (composable with any list/query): - - --names-only Return array of pattern name strings - --count Return integer count - --fields Return only specified fields per pattern - Valid: patternName, status, category, phase, file, source - --full Bypass summarization, return raw patterns - --format Output format (default: pretty-printed json) - -List Filters (for 'list' subcommand): - - --status Filter by FSM status (roadmap, active, completed, deferred) - --phase Filter by roadmap phase number - --category Filter by category - --source Filter by source type - --arch-context Filter by architecture context (@libar-docs-arch-context) - --product-area Filter by product area (@libar-docs-product-area) - --limit Maximum results - --offset Skip first n results - -Common Recipes: - - Starting a session: - process-api overview - process-api scope-validate MyPattern implement - process-api context MyPattern --session implement - - Finding what to work on: - process-api list --status roadmap --names-only - process-api arch blocking - process-api query getRoadmapItems --names-only - - Investigating a pattern: - process-api search EventStore - process-api dep-tree EventStoreDurability --depth 2 - process-api arch neighborhood EventStoreDurability - process-api stubs EventStoreDurability - - Design session prep: - process-api context MyPattern --session design - process-api decisions MyPattern - process-api stubs --unresolved - - Ending a session: - process-api handoff --pattern MyPattern - -Session Types (for --session flag): - - planning Minimal: pattern metadata and spec file only - design Full: metadata, description, stubs, deps, deliverables - implement Focused: deliverables, FSM state, test files - - Which session? Start coding -> implement. Complex decisions -> design. - New pattern -> planning. Not sure -> run 'overview' first. - -Available API Methods (for 'query'): - - Status: getPatternsByNormalizedStatus, getPatternsByStatus, getStatusCounts, - getStatusDistribution, getCompletionPercentage - Phase: getPatternsByPhase, getPhaseProgress, getActivePhases, getAllPhases - FSM: isValidTransition, checkTransition, getValidTransitionsFrom, - getProtectionInfo - Pattern: getPattern, getPatternDependencies, getPatternRelationships, - getRelatedPatterns, getApiReferences, getPatternDeliverables, - getPatternsByCategory, getCategories - Timeline: getPatternsByQuarter, getQuarters, getCurrentWork, getRoadmapItems, - getRecentlyCompleted - Raw: getMasterDataset -`); -} -// ============================================================================= -// Config File Default Resolution -// ============================================================================= -/** - * If --input and --features are not provided, try to load defaults from config. - * Prefers loadProjectConfig() for repos with delivery-process.config.ts, - * falls back to filesystem auto-detection for repos without one. - */ -async function applyConfigDefaults(config) { - const applied = await applyProjectSourceDefaults(config); - if (applied) { - return; - } - // Fall back to existing filesystem auto-detection for repos without config - applyConfigDefaultsFallback(config); -} -/** - * Filesystem-based auto-detection fallback for repos without a config file. - * Checks for conventional directory structures and applies defaults. - */ -function applyConfigDefaultsFallback(config) { - const baseDir = path.resolve(config.baseDir); - if (config.input.length === 0) { - // Check for config file existence as signal to use defaults - const configPath = path.join(baseDir, 'delivery-process.config.ts'); - if (fs.existsSync(configPath)) { - config.input.push('src/**/*.ts'); - // Also check for stubs directory - const stubsDir = path.join(baseDir, 'delivery-process', 'stubs'); - if (fs.existsSync(stubsDir)) { - config.input.push('delivery-process/stubs/**/*.ts'); - } - } - } - if (config.features.length === 0) { - const specsDir = path.join(baseDir, 'delivery-process', 'specs'); - if (fs.existsSync(specsDir)) { - config.features.push('delivery-process/specs/*.feature'); - } - const releasesDir = path.join(baseDir, 'delivery-process', 'releases'); - if (fs.existsSync(releasesDir)) { - config.features.push('delivery-process/releases/*.feature'); - } - } -} -// ============================================================================= -// Pipeline -// ============================================================================= -async function buildPipeline(config) { - const result = await buildMasterDataset({ - input: config.input, - features: config.features, - baseDir: config.baseDir, - mergeConflictStrategy: 'fatal', - ...(config.workflowPath !== null ? { workflowPath: config.workflowPath } : {}), - }); - if (!result.ok) { - console.error(`Pipeline error [${result.error.step}]: ${result.error.message}`); - process.exit(1); - } - for (const w of result.value.warnings) { - console.warn(`⚠️ ${w.message}`); - } - return result.value; -} -// ============================================================================= -// Subcommand Handlers -// ============================================================================= -function handleStatus(api) { - return { - counts: api.getStatusCounts(), - completionPercentage: api.getCompletionPercentage(), - distribution: api.getStatusDistribution(), - }; -} -function coerceArg(arg) { - const asInt = parseInt(arg, 10); - if (!isNaN(asInt) && String(asInt) === arg) { - return asInt; - } - return arg; -} -const API_METHODS = [ - 'getPatternsByNormalizedStatus', - 'getPatternsByStatus', - 'getStatusCounts', - 'getStatusDistribution', - 'getCompletionPercentage', - 'getPatternsByPhase', - 'getPhaseProgress', - 'getActivePhases', - 'getAllPhases', - 'isValidTransition', - 'checkTransition', - 'getValidTransitionsFrom', - 'getProtectionInfo', - 'getPattern', - 'getPatternDependencies', - 'getPatternRelationships', - 'getRelatedPatterns', - 'getApiReferences', - 'getPatternDeliverables', - 'getPatternsByCategory', - 'getCategories', - 'getPatternsByQuarter', - 'getQuarters', - 'getCurrentWork', - 'getRoadmapItems', - 'getRecentlyCompleted', - 'getMasterDataset', -]; -function handleQuery(api, args) { - const methodName = args[0]; - if (!methodName) { - throw new QueryApiError('INVALID_ARGUMENT', 'Usage: process-api query [args...]\nMethods: ' + API_METHODS.join(', ')); - } - if (!API_METHODS.includes(methodName)) { - throw new QueryApiError('UNKNOWN_METHOD', `Unknown API method: ${methodName}\nAvailable: ${API_METHODS.join(', ')}`); - } - // Safe to cast: we validated methodName is in API_METHODS above - const apiRecord = api; - const method = apiRecord[methodName]; - if (method === undefined) { - throw new QueryApiError('UNKNOWN_METHOD', `Method not found on API: ${methodName}`); - } - const coercedArgs = args.slice(1).map(coerceArg); - return { methodName, result: method.apply(api, coercedArgs) }; -} -function handlePattern(api, args) { - const name = args[0]; - if (!name) { - throw new QueryApiError('INVALID_ARGUMENT', 'Usage: process-api pattern '); - } - const pattern = api.getPattern(name); - if (!pattern) { - const hint = suggestPattern(name, allPatternNames(api.getMasterDataset())); - throw new QueryApiError('PATTERN_NOT_FOUND', `Pattern not found: "${name}".${hint}`); - } - return { - ...pattern, - deliverables: api.getPatternDeliverables(name), - dependencies: api.getPatternDependencies(name), - relationships: api.getPatternRelationships(name), - }; -} -/** - * Parse list-specific filter flags from subArgs. - */ -function parseListFilters(subArgs) { - let status = null; - let phase = null; - let category = null; - let source = null; - let archContext = null; - let productArea = null; - let limit = null; - let offset = null; - for (let i = 0; i < subArgs.length; i++) { - const arg = subArgs[i]; - const next = subArgs[i + 1]; - switch (arg) { - case '--status': - status = next ?? null; - i++; - break; - case '--phase': { - const parsed = next !== undefined ? parseInt(next, 10) : NaN; - if (isNaN(parsed)) { - throw new QueryApiError('INVALID_ARGUMENT', `Invalid --phase value: "${next ?? ''}". Expected an integer.`); - } - phase = parsed; - i++; - break; - } - case '--category': - category = next ?? null; - i++; - break; - case '--source': - if (next === 'typescript' || next === 'ts') { - source = 'typescript'; - } - else if (next === 'gherkin' || next === 'feature') { - source = 'gherkin'; - } - i++; - break; - case '--limit': { - const parsed = next !== undefined ? parseInt(next, 10) : NaN; - if (isNaN(parsed) || parsed < 1) { - throw new QueryApiError('INVALID_ARGUMENT', `Invalid --limit value: "${next ?? ''}". Expected a positive integer.`); - } - limit = parsed; - i++; - break; - } - case '--offset': { - const parsed = next !== undefined ? parseInt(next, 10) : NaN; - if (isNaN(parsed) || parsed < 0) { - throw new QueryApiError('INVALID_ARGUMENT', `Invalid --offset value: "${next ?? ''}". Expected a non-negative integer.`); - } - offset = parsed; - i++; - break; - } - case '--arch-context': - archContext = next ?? null; - i++; - break; - case '--product-area': - productArea = next ?? null; - i++; - break; - default: - if (arg?.startsWith('-') === true) { - console.warn(`Warning: Unknown flag '${arg}' ignored`); - } - break; - } - } - return { status, phase, category, source, archContext, productArea, limit, offset }; -} -/** - * Generate contextual hint for empty list results. - */ -function generateEmptyHint(dataset, filters) { - if (filters.status !== null) { - const counts = dataset.counts; - const alternatives = []; - if (counts.active > 0 && filters.status !== 'active') { - alternatives.push(`${counts.active} active`); - } - if (counts.planned > 0 && filters.status !== 'roadmap') { - alternatives.push(`${counts.planned} roadmap`); - } - if (counts.completed > 0 && filters.status !== 'completed') { - alternatives.push(`${counts.completed} completed`); - } - if (alternatives.length > 0) { - // Pick the first available alternative for the suggestion command - const statusPriority = [ - { status: 'active', count: counts.active }, - { status: 'roadmap', count: counts.planned }, - { status: 'completed', count: counts.completed }, - ]; - const altStatus = statusPriority.find((s) => s.count > 0 && s.status !== filters.status)?.status ?? 'active'; - return `No ${filters.status} patterns. ${alternatives.join(', ')} exist. Try: list --status ${altStatus}`; - } - } - return undefined; -} -function handleList(dataset, subArgs, modifiers) { - const filters = parseListFilters(subArgs); - const filtered = applyListFilters(dataset, filters); - if (filtered.length === 0) { - const hint = generateEmptyHint(dataset, filters); - return { patterns: [], hint }; - } - const input = { kind: 'patterns', data: filtered }; - return applyOutputPipeline(input, modifiers); -} -function handleSearch(api, subArgs) { - const query = subArgs[0]; - if (!query) { - throw new QueryApiError('INVALID_ARGUMENT', 'Usage: process-api search '); - } - const names = allPatternNames(api.getMasterDataset()); - const matches = fuzzyMatchPatterns(query, names); - if (matches.length === 0) { - const hint = `No patterns matched "${query}".${suggestPattern(query, names)}`; - return { matches: [], hint }; - } - return { matches }; -} -async function handleArch(ctx) { - const args = ctx.subArgs; - const subCmd = args[0]; - // Graph health commands work on relationshipIndex/validation, not archIndex - if (subCmd === 'dangling') - return ctx.validation.danglingReferences; - if (subCmd === 'orphans') - return findOrphanPatterns(ctx.dataset); - if (subCmd === 'blocking') - return buildOverview(ctx.dataset).blocking; - const archIndex = ctx.dataset.archIndex; - if (!archIndex || archIndex.all.length === 0) { - throw new QueryApiError('PATTERN_NOT_FOUND', 'No architecture data available. Ensure patterns have @libar-docs-arch-role annotations.'); - } - switch (subCmd) { - case 'roles': - return Object.entries(archIndex.byRole).map(([role, patterns]) => ({ - role, - count: patterns.length, - patterns: patterns.map((p) => p.name), - })); - case 'context': { - const contextName = args[1]; - if (!contextName) { - return Object.entries(archIndex.byContext).map(([ctxName, patterns]) => ({ - context: ctxName, - count: patterns.length, - patterns: patterns.map((p) => p.name), - })); - } - const contextPatterns = archIndex.byContext[contextName]; - if (!contextPatterns) { - throw new QueryApiError('CATEGORY_NOT_FOUND', `Context not found: "${contextName}"\nAvailable: ${Object.keys(archIndex.byContext).join(', ')}`); - } - const ctxInput = { kind: 'patterns', data: contextPatterns }; - return applyOutputPipeline(ctxInput, ctx.modifiers); - } - case 'layer': { - const layerName = args[1]; - if (!layerName) { - return Object.entries(archIndex.byLayer).map(([layer, patterns]) => ({ - layer, - count: patterns.length, - patterns: patterns.map((p) => p.name), - })); - } - const layerPatterns = archIndex.byLayer[layerName]; - if (!layerPatterns) { - throw new QueryApiError('CATEGORY_NOT_FOUND', `Layer not found: "${layerName}"\nAvailable: ${Object.keys(archIndex.byLayer).join(', ')}`); - } - const layerInput = { kind: 'patterns', data: layerPatterns }; - return applyOutputPipeline(layerInput, ctx.modifiers); - } - case 'neighborhood': { - const patternName = args[1]; - if (!patternName) { - throw new QueryApiError('INVALID_ARGUMENT', 'Usage: process-api arch neighborhood '); - } - const neighborhood = computeNeighborhood(patternName, ctx.dataset); - if (neighborhood === undefined) { - const hint = suggestPattern(patternName, allPatternNames(ctx.dataset)); - throw new QueryApiError('PATTERN_NOT_FOUND', `Pattern not found: "${patternName}".${hint}`); - } - return neighborhood; - } - case 'compare': { - const ctx1Name = args[1]; - const ctx2Name = args[2]; - if (!ctx1Name || !ctx2Name) { - throw new QueryApiError('INVALID_ARGUMENT', 'Usage: process-api arch compare '); - } - const comparison = compareContexts(ctx1Name, ctx2Name, ctx.dataset); - if (comparison === undefined) { - const available = Object.keys(archIndex.byContext).join(', '); - throw new QueryApiError('CONTEXT_NOT_FOUND', `Context not found. Available: ${available}`); - } - return comparison; - } - case 'coverage': - try { - return await analyzeCoverage(ctx.dataset, ctx.cliConfig.input, ctx.cliConfig.baseDir, ctx.registry); - } - catch (err) { - throw new QueryApiError('INVALID_ARGUMENT', `Coverage analysis failed: ${err instanceof Error ? err.message : String(err)}`); - } - default: - throw new QueryApiError('UNKNOWN_METHOD', `Unknown arch subcommand: ${subCmd ?? '(none)'}\nAvailable: roles, context [name], layer [name], neighborhood , compare , coverage, dangling, orphans, blocking`); - } -} -// ============================================================================= -// Stub Integration Handlers -// ============================================================================= -function handleStubs(dataset, subArgs, baseDir) { - const stubs = findStubPatterns(dataset); - const resolutions = resolveStubs(stubs, baseDir); - // Parse optional pattern name and --unresolved flag - let patternFilter; - let unresolvedOnly = false; - for (const arg of subArgs) { - if (arg === '--unresolved') { - unresolvedOnly = true; - } - else { - patternFilter = arg; - } - } - let filtered = resolutions; - // Filter by pattern name if provided - if (patternFilter !== undefined) { - const lowerFilter = patternFilter.toLowerCase(); - filtered = filtered.filter((r) => r.implementsPattern?.toLowerCase() === lowerFilter || - r.stubName.toLowerCase() === lowerFilter); - if (filtered.length === 0) { - const stubNames = [...new Set(resolutions.map((r) => r.implementsPattern ?? r.stubName))]; - const hint = suggestPattern(patternFilter, stubNames); - throw new QueryApiError('STUB_NOT_FOUND', `No stubs found for pattern: "${patternFilter}".${hint}`); - } - } - // Filter unresolved only - if (unresolvedOnly) { - filtered = filtered.filter((r) => !r.targetExists); - } - return groupStubsByPattern(filtered); -} -function handleDecisions(dataset, subArgs) { - const patternName = subArgs[0]; - if (patternName === undefined) { - throw new QueryApiError('INVALID_ARGUMENT', 'Usage: decisions '); - } - // Find stubs implementing this pattern - const stubs = findStubPatterns(dataset); - const patternStubs = stubs.filter((s) => { - const implName = firstImplements(s); - return (implName?.toLowerCase() === patternName.toLowerCase() || - getPatternName(s).toLowerCase() === patternName.toLowerCase()); - }); - if (patternStubs.length === 0) { - const stubNames = [...new Set(stubs.map((s) => firstImplements(s) ?? getPatternName(s)))]; - const hint = suggestPattern(patternName, stubNames); - throw new QueryApiError('STUB_NOT_FOUND', `No decisions found for pattern: "${patternName}".${hint}`); - } - // Extract decisions from each stub's description - const decisions = patternStubs.map((stub) => ({ - stub: getPatternName(stub), - file: stub.source.file, - since: stub.since, - decisions: extractDecisionItems(stub.directive.description), - })); - return { - pattern: patternName, - stubs: decisions, - totalDecisions: decisions.reduce((sum, d) => sum + d.decisions.length, 0), - }; -} -function handlePdr(dataset, subArgs) { - const pdrNumber = subArgs[0]; - if (pdrNumber === undefined) { - throw new QueryApiError('INVALID_ARGUMENT', 'Usage: pdr (e.g., pdr 012)'); - } - // Normalize: strip leading "PDR-" if user passed it - const normalizedNumber = pdrNumber.replace(/^PDR-/i, '').padStart(3, '0'); - const references = findPdrReferences(dataset.patterns, normalizedNumber); - if (references.length === 0) { - throw new QueryApiError('PDR_NOT_FOUND', `No patterns reference PDR-${normalizedNumber}`); - } - return { - pdr: `PDR-${normalizedNumber}`, - referenceCount: references.length, - references, - }; -} -// ============================================================================= -// Business Rules Handler -// ============================================================================= -function parseRulesFilters(subArgs) { - let productArea = null; - let patternName = null; - let onlyInvariants = false; - for (let i = 0; i < subArgs.length; i++) { - const arg = subArgs[i]; - if (arg === '--product-area') { - if (i + 1 >= subArgs.length || subArgs[i + 1]?.startsWith('-') === true) { - throw new QueryApiError('INVALID_ARGUMENT', '--product-area requires a value'); - } - productArea = subArgs[++i] ?? null; - } - else if (arg === '--pattern') { - if (i + 1 >= subArgs.length || subArgs[i + 1]?.startsWith('-') === true) { - throw new QueryApiError('INVALID_ARGUMENT', '--pattern requires a value'); - } - patternName = subArgs[++i] ?? null; - } - else if (arg === '--only-invariants') { - onlyInvariants = true; - } - else if (typeof arg === 'string' && arg.startsWith('-')) { - console.warn(`Warning: Unknown flag '${arg}' ignored`); - } - } - return { productArea, patternName, onlyInvariants }; -} -function handleRules(ctx) { - const filters = parseRulesFilters(ctx.subArgs); - const result = queryBusinessRules(ctx.dataset, filters); - // Empty-result hint (delegated from query, applied per output modifier) - if (result.totalRules === 0 && (filters.productArea !== null || filters.patternName !== null)) { - if (ctx.modifiers.count) { - return { totalRules: 0, totalInvariants: 0, hint: result.hint }; - } - if (ctx.modifiers.namesOnly) { - return { names: [], hint: result.hint }; - } - return { productAreas: [], totalRules: 0, totalInvariants: 0, hint: result.hint }; - } - // Handle output modifiers - if (ctx.modifiers.count) { - return { totalRules: result.totalRules, totalInvariants: result.totalInvariants }; - } - if (ctx.modifiers.namesOnly) { - return result.allRuleNames; - } - return { - productAreas: result.productAreas, - totalRules: result.totalRules, - totalInvariants: result.totalInvariants, - }; -} -// ============================================================================= -// Context Assembly Handlers (text output — ADR-008) -// ============================================================================= -function parseSessionFromSubArgs(subArgs) { - const idx = subArgs.indexOf('--session'); - if (idx === -1) - return null; - const val = subArgs[idx + 1]; - if (val !== undefined && isValidSessionType(val)) - return val; - return null; -} -function handleContext(ctx) { - const patternNames = []; - for (let i = 0; i < ctx.subArgs.length; i++) { - const arg = ctx.subArgs[i]; - if (arg === '--session') { - i++; // skip the value - continue; - } - if (arg !== undefined && !arg.startsWith('-')) { - patternNames.push(arg); - } - } - if (patternNames.length === 0) { - throw new QueryApiError('CONTEXT_ASSEMBLY_ERROR', 'Usage: process-api context [pattern2...] [--session planning|design|implement]'); - } - const sessionType = ctx.sessionType ?? parseSessionFromSubArgs(ctx.subArgs) ?? 'design'; - const bundle = assembleContext(ctx.dataset, ctx.api, { - patterns: patternNames, - sessionType, - baseDir: ctx.baseDir, - }); - return formatContextBundle(bundle); -} -function handleFiles(ctx) { - const patternName = ctx.subArgs.find((a) => !a.startsWith('-')); - if (patternName === undefined) { - throw new QueryApiError('CONTEXT_ASSEMBLY_ERROR', 'Usage: process-api files [--related]'); - } - const includeRelated = ctx.subArgs.includes('--related'); - const list = buildFileReadingList(ctx.dataset, patternName, includeRelated); - return formatFileReadingList(list); -} -function handleDepTreeCmd(ctx) { - const patternName = ctx.subArgs.find((a) => !a.startsWith('-')); - if (patternName === undefined) { - throw new QueryApiError('CONTEXT_ASSEMBLY_ERROR', 'Usage: process-api dep-tree [--depth N]'); - } - // Parse --depth N - let maxDepth = 3; - const depthIdx = ctx.subArgs.indexOf('--depth'); - if (depthIdx !== -1) { - const depthVal = ctx.subArgs[depthIdx + 1]; - if (depthVal !== undefined) { - const parsed = parseInt(depthVal, 10); - if (!isNaN(parsed) && parsed > 0) { - maxDepth = Math.min(parsed, 10); - } - } - } - const tree = buildDepTree(ctx.dataset, { - pattern: patternName, - maxDepth, - includeImplementationDeps: true, - }); - return formatDepTree(tree); -} -function handleOverviewCmd(ctx) { - const overview = buildOverview(ctx.dataset); - return formatOverview(overview); -} -// ============================================================================= -// Session Workflow Handlers (text output — ADR-008) -// ============================================================================= -const VALID_SCOPE_TYPES = new Set(['implement', 'design']); -function handleScopeValidate(ctx) { - // Parse pattern name (positional, first non-flag arg) - let patternName; - let scopeType = 'implement'; - let strict = false; - for (let i = 0; i < ctx.subArgs.length; i++) { - const arg = ctx.subArgs[i]; - if (arg === '--type') { - const val = ctx.subArgs[i + 1]; - if (val !== undefined && VALID_SCOPE_TYPES.has(val)) { - scopeType = val; - } - else { - throw new QueryApiError('INVALID_ARGUMENT', `--type must be "implement" or "design", got: "${val ?? ''}"`); - } - i++; - } - else if (arg === '--strict') { - // DD-4: promotes WARN → BLOCKED (consistent with lint-process --strict) - strict = true; - } - else if (arg !== undefined && !arg.startsWith('-')) { - if (patternName === undefined) { - patternName = arg; - } - else if (VALID_SCOPE_TYPES.has(arg)) { - // DD-6: positional scope type also accepted - scopeType = arg; - } - } - } - if (patternName === undefined) { - throw new QueryApiError('INVALID_ARGUMENT', 'Usage: process-api scope-validate [implement|design] [--type implement|design] [--strict]'); - } - const result = validateScope(ctx.api, ctx.dataset, { - patternName, - scopeType, - baseDir: ctx.baseDir, - strict, - }); - return formatScopeValidation(result); -} -// 'review' is handoff-specific — not a global session type (parsed locally, not by top-level --session) -const VALID_HANDOFF_SESSION_TYPES = new Set([ - 'planning', - 'design', - 'implement', - 'review', -]); -function handleHandoff(ctx) { - let patternName; - let sessionType; - let useGit = false; - for (let i = 0; i < ctx.subArgs.length; i++) { - const arg = ctx.subArgs[i]; - if (arg === '--pattern') { - patternName = ctx.subArgs[i + 1]; - if (patternName === undefined) { - throw new QueryApiError('INVALID_ARGUMENT', '--pattern requires a value'); - } - i++; - } - else if (arg === '--session') { - const val = ctx.subArgs[i + 1]; - if (val !== undefined && VALID_HANDOFF_SESSION_TYPES.has(val)) { - sessionType = val; - } - else { - throw new QueryApiError('INVALID_ARGUMENT', `--session must be "planning", "design", "implement", or "review", got: "${val ?? ''}"`); - } - i++; - } - else if (arg === '--git') { - useGit = true; - } - } - // Also accept from top-level parsed --session - if (sessionType === undefined && ctx.sessionType !== null) { - sessionType = ctx.sessionType; - } - // Pattern name uses --pattern flag (not positional) to avoid ambiguity with --git and --session - if (patternName === undefined) { - throw new QueryApiError('INVALID_ARGUMENT', 'Usage: process-api handoff --pattern [--git] [--session planning|design|implement|review]'); - } - // DD-2: git integration is opt-in — CLI handler owns the shell call - let modifiedFiles; - if (useGit) { - try { - const output = execSync('git diff --name-only HEAD', { encoding: 'utf-8' }); - modifiedFiles = output - .trim() - .split('\n') - .filter((line) => line.length > 0); - } - catch (err) { - console.error(`Warning: git diff failed: ${err instanceof Error ? err.message : String(err)}. Handoff will not include modified files.`); - modifiedFiles = undefined; - } - } - const options = { patternName }; - if (sessionType !== undefined) { - options.sessionType = sessionType; - } - if (modifiedFiles !== undefined) { - options.modifiedFiles = modifiedFiles; - } - const doc = generateHandoff(ctx.api, ctx.dataset, options); - return formatHandoff(doc); -} -// ============================================================================= -// Subcommand Router -// ============================================================================= -async function routeSubcommand(ctx) { - switch (ctx.subcommand) { - case 'context': - return handleContext(ctx); - case 'files': - return handleFiles(ctx); - case 'dep-tree': - return handleDepTreeCmd(ctx); - case 'overview': - return handleOverviewCmd(ctx); - case 'scope-validate': - return handleScopeValidate(ctx); - case 'handoff': - return handleHandoff(ctx); - case 'status': - return handleStatus(ctx.api); - case 'query': { - const { methodName, result } = handleQuery(ctx.api, ctx.subArgs); - // Apply output pipeline for pattern-array methods - if (PATTERN_ARRAY_METHODS.has(methodName)) { - const input = { - kind: 'patterns', - data: result, - }; - return applyOutputPipeline(input, ctx.modifiers); - } - return result; - } - case 'pattern': - return handlePattern(ctx.api, ctx.subArgs); - case 'list': - return handleList(ctx.dataset, ctx.subArgs, ctx.modifiers); - case 'search': - return handleSearch(ctx.api, ctx.subArgs); - case 'arch': - return handleArch(ctx); - case 'stubs': - return handleStubs(ctx.dataset, ctx.subArgs, ctx.cliConfig.baseDir); - case 'decisions': - return handleDecisions(ctx.dataset, ctx.subArgs); - case 'pdr': - return handlePdr(ctx.dataset, ctx.subArgs); - case 'rules': - return handleRules(ctx); - case 'tags': - return aggregateTagUsage(ctx.dataset); - case 'sources': - return buildSourceInventory(ctx.dataset); - case 'unannotated': { - let pathFilter; - for (let i = 0; i < ctx.subArgs.length; i++) { - if (ctx.subArgs[i] === '--path') { - pathFilter = ctx.subArgs[i + 1]; - break; - } - } - try { - return await findUnannotatedFiles(ctx.cliConfig.input, ctx.cliConfig.baseDir, ctx.registry, pathFilter); - } - catch (err) { - throw new QueryApiError('INVALID_ARGUMENT', `Unannotated file scan failed: ${err instanceof Error ? err.message : String(err)}`); - } - } - default: - throw new QueryApiError('UNKNOWN_METHOD', `Unknown subcommand: ${ctx.subcommand}\nAvailable: context, files, dep-tree, overview, scope-validate, handoff, status, query, pattern, list, search, arch, stubs, decisions, pdr, rules, tags, sources, unannotated`); - } -} -// ============================================================================= -// Main -// ============================================================================= -async function main() { - const opts = parseArgs(); - if (opts.version) { - printVersionAndExit('process-api'); - } - if (opts.help || !opts.subcommand) { - showHelp(); - process.exit(opts.help ? 0 : 1); - } - // Validate output modifiers before any expensive work - validateModifiers(opts.modifiers); - // Resolve config file defaults if --input and --features not provided - await applyConfigDefaults(opts); - if (opts.input.length === 0) { - console.error('Error: --input is required (or place delivery-process.config.ts in cwd for auto-detection)'); - console.error(''); - console.error('Example:'); - console.error(' process-api -i "src/**/*.ts" status'); - process.exit(1); - } - // Build pipeline (steps 1-8) - const { dataset: masterDataset, validation } = await buildPipeline(opts); - // Create ProcessStateAPI - const api = createProcessStateAPI(masterDataset); - // Route and execute subcommand - const result = await routeSubcommand({ - api, - dataset: masterDataset, - validation, - subcommand: opts.subcommand, - subArgs: opts.subArgs, - modifiers: opts.modifiers, - sessionType: opts.sessionType, - baseDir: path.resolve(opts.baseDir), - cliConfig: { input: opts.input, features: opts.features, baseDir: opts.baseDir }, - registry: masterDataset.tagRegistry, - }); - // Dual output path (ADR-008): - // Text commands (context, files, dep-tree, overview) return string → output directly. - // JSON commands return objects → wrap in QueryResult envelope. - if (typeof result === 'string') { - console.log(result); - } - else { - const envelope = createSuccess(result, masterDataset.counts.total); - const output = formatOutput(envelope, opts.format); - console.log(output); - } -} -void main().catch((error) => { - // QueryApiError -> structured error envelope - if (error instanceof QueryApiError) { - const envelope = createError(error.code, error.message); - console.log(JSON.stringify(envelope, null, 2)); - process.exit(1); - return; - } - handleCliError(error, 1); -}); -//# sourceMappingURL=process-api.js.map \ No newline at end of file diff --git a/dist/cli/process-api.js.map b/dist/cli/process-api.js.map deleted file mode 100644 index db6cb39d..00000000 --- a/dist/cli/process-api.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"process-api.js","sourceRoot":"","sources":["../../src/cli/process-api.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,EACL,kBAAkB,GAInB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAIhE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC5E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,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC;QACnC,SAAS,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE;QAChF,QAAQ,EAAE,aAAa,CAAC,WAAW;KACpC,CAAC,CAAC;IAEH,8BAA8B;IAC9B,sFAAsF;IACtF,+DAA+D;IAC/D,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;QAC/B,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;SAAM,CAAC;QACN,MAAM,QAAQ,GAAG,aAAa,CAAC,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACnE,MAAM,MAAM,GAAG,YAAY,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QACnD,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;AACH,CAAC;AAED,KAAK,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;IACnC,6CAA6C;IAC7C,IAAI,KAAK,YAAY,aAAa,EAAE,CAAC;QACnC,MAAM,QAAQ,GAAG,WAAW,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;QACxD,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QAC/C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAChB,OAAO;IACT,CAAC;IACD,cAAc,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;AAC3B,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/cli/validate-patterns.d.ts b/dist/cli/validate-patterns.d.ts deleted file mode 100644 index 8074c925..00000000 --- a/dist/cli/validate-patterns.d.ts +++ /dev/null @@ -1,115 +0,0 @@ -#!/usr/bin/env node -/** - * @libar-docs - * @libar-docs-cli - * @libar-docs-pattern ValidatePatternsCLI - * @libar-docs-status completed - * @libar-docs-uses PatternScanner, GherkinScanner, DocExtractor, GherkinExtractor, MasterDataset, CodecUtils - * @libar-docs-extract-shapes ValidateCLIConfig, ValidationIssue, ValidationSummary - * - * ## ValidatePatternsCLI - Cross-Source Pattern Validator - * - * Cross-validates TypeScript patterns vs Gherkin feature files. - * Ensures consistency between code annotations and feature specifications. - * - * ### Exit Codes - * - * - `0` - No errors - * - `1` - Errors found - * - `2` - Warnings found (with --strict) - * - * ### When to Use - * - * - Pre-commit validation to ensure code and feature files stay in sync - * - CI pipeline to catch documentation drift early - * - Strict mode (`--strict`) for production readiness checks - */ -import type { RuntimeMasterDataset } from '../generators/pipeline/index.js'; -/** - * Validation issue severity - */ -export type IssueSeverity = 'error' | 'warning' | 'info'; -/** - * Validation issue - */ -export interface ValidationIssue { - severity: IssueSeverity; - message: string; - source: 'typescript' | 'gherkin' | 'cross-source'; - pattern?: string; - file?: string; -} -/** - * Validation summary - */ -export interface ValidationSummary { - issues: ValidationIssue[]; - stats: { - typescriptPatterns: number; - gherkinPatterns: number; - matched: number; - missingInGherkin: number; - missingInTypeScript: number; - }; -} -/** - * CLI configuration - */ -export interface ValidateCLIConfig { - /** Glob patterns for TypeScript input files */ - input: string[]; - /** Glob patterns for Gherkin feature files */ - features: string[]; - /** Glob patterns to exclude */ - exclude: string[]; - /** Base directory for path resolution */ - baseDir: string; - /** Treat warnings as errors */ - strict: boolean; - /** Output format */ - format: 'pretty' | 'json'; - /** Show help */ - help: boolean; - /** Enable DoD validation mode */ - dod: boolean; - /** Specific phases to validate (empty = all completed phases) */ - phases: number[]; - /** Enable anti-pattern detection */ - antiPatterns: boolean; - /** Override scenario bloat threshold */ - scenarioBloatThreshold: number; - /** Override mega-feature line threshold */ - megaFeatureLineThreshold: number; - /** Override magic comment threshold */ - magicCommentThreshold: number; - /** Show version */ - version: boolean; - /** Show info-level messages in pretty output */ - verbose: boolean; -} -/** - * Parse command line arguments - */ -export declare function parseArgs(argv?: string[]): ValidateCLIConfig; -/** - * Print usage information - */ -export declare function printHelp(): void; -/** - * Validate cross-source consistency using the MasterDataset read model. - * - * Compares TypeScript patterns against Gherkin patterns to find: - * - Missing patterns in either source (with implements-aware resolution) - * - Phase number mismatches - * - Status mismatches (after normalization) - * - Missing deliverables for completed phases - * - Invalid dependencies - * - * DD-2: Consumes RuntimeMasterDataset instead of raw scanner/extractor output. - * DD-3: Two-phase matching — name-based first, then relationshipIndex fallback. - * - * @param dataset - The pre-computed MasterDataset read model - * @returns Validation summary with issues and statistics - */ -export declare function validatePatterns(dataset: RuntimeMasterDataset): ValidationSummary; -//# sourceMappingURL=validate-patterns.d.ts.map \ No newline at end of file diff --git a/dist/cli/validate-patterns.d.ts.map b/dist/cli/validate-patterns.d.ts.map deleted file mode 100644 index 5edb633e..00000000 --- a/dist/cli/validate-patterns.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"validate-patterns.d.ts","sourceRoot":"","sources":["../../src/cli/validate-patterns.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAoBH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAe5E;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,aAAa,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,YAAY,GAAG,SAAS,GAAG,cAAc,CAAC;IAClD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,eAAe,EAAE,CAAC;IAC1B,KAAK,EAAE;QACL,kBAAkB,EAAE,MAAM,CAAC;QAC3B,eAAe,EAAE,MAAM,CAAC;QACxB,OAAO,EAAE,MAAM,CAAC;QAChB,gBAAgB,EAAE,MAAM,CAAC;QACzB,mBAAmB,EAAE,MAAM,CAAC;KAC7B,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,+CAA+C;IAC/C,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,8CAA8C;IAC9C,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,+BAA+B;IAC/B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,yCAAyC;IACzC,OAAO,EAAE,MAAM,CAAC;IAChB,+BAA+B;IAC/B,MAAM,EAAE,OAAO,CAAC;IAChB,oBAAoB;IACpB,MAAM,EAAE,QAAQ,GAAG,MAAM,CAAC;IAC1B,gBAAgB;IAChB,IAAI,EAAE,OAAO,CAAC;IACd,iCAAiC;IACjC,GAAG,EAAE,OAAO,CAAC;IACb,iEAAiE;IACjE,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,oCAAoC;IACpC,YAAY,EAAE,OAAO,CAAC;IACtB,wCAAwC;IACxC,sBAAsB,EAAE,MAAM,CAAC;IAC/B,2CAA2C;IAC3C,wBAAwB,EAAE,MAAM,CAAC;IACjC,uCAAuC;IACvC,qBAAqB,EAAE,MAAM,CAAC;IAC9B,mBAAmB;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,gDAAgD;IAChD,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,GAAE,MAAM,EAA0B,GAAG,iBAAiB,CAiHnF;AAED;;GAEG;AACH,wBAAgB,SAAS,IAAI,IAAI,CAwEhC;AAiED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,oBAAoB,GAAG,iBAAiB,CAkLjF"} \ No newline at end of file diff --git a/dist/cli/validate-patterns.js b/dist/cli/validate-patterns.js deleted file mode 100644 index 8bded130..00000000 --- a/dist/cli/validate-patterns.js +++ /dev/null @@ -1,701 +0,0 @@ -#!/usr/bin/env node -/** - * @libar-docs - * @libar-docs-cli - * @libar-docs-pattern ValidatePatternsCLI - * @libar-docs-status completed - * @libar-docs-uses PatternScanner, GherkinScanner, DocExtractor, GherkinExtractor, MasterDataset, CodecUtils - * @libar-docs-extract-shapes ValidateCLIConfig, ValidationIssue, ValidationSummary - * - * ## ValidatePatternsCLI - Cross-Source Pattern Validator - * - * Cross-validates TypeScript patterns vs Gherkin feature files. - * Ensures consistency between code annotations and feature specifications. - * - * ### Exit Codes - * - * - `0` - No errors - * - `1` - Errors found - * - `2` - Warnings found (with --strict) - * - * ### When to Use - * - * - Pre-commit validation to ensure code and feature files stay in sync - * - CI pipeline to catch documentation drift early - * - Strict mode (`--strict`) for production readiness checks - */ -import { printVersionAndExit } from './version.js'; -import { handleCliError } from './error-handler.js'; -import { getPatternName } from '../api/pattern-helpers.js'; -import { scanPatterns } from '../scanner/index.js'; -import { scanGherkinFiles } from '../scanner/gherkin-scanner.js'; -import { loadConfig, applyProjectSourceDefaults, formatConfigError, } from '../config/config-loader.js'; -import { buildMasterDataset } from '../generators/pipeline/index.js'; -import { ScannerConfigSchema, createJsonOutputCodec, ValidationSummaryOutputSchema, } from '../validation-schemas/index.js'; -import { normalizeStatus, isPatternComplete } from '../taxonomy/index.js'; -import { validateDoD, formatDoDSummary, detectAntiPatterns, formatAntiPatternReport, toValidationIssues, DEFAULT_THRESHOLDS, } from '../validation/index.js'; -/** - * Codec for serializing validation summary to JSON - */ -const ValidationSummaryCodec = createJsonOutputCodec(ValidationSummaryOutputSchema); -/** - * Parse command line arguments - */ -export function parseArgs(argv = process.argv.slice(2)) { - const config = { - input: [], - features: [], - exclude: [], - baseDir: process.cwd(), - strict: false, - format: 'pretty', - help: false, - dod: false, - phases: [], - antiPatterns: false, - scenarioBloatThreshold: DEFAULT_THRESHOLDS.scenarioBloatThreshold, - megaFeatureLineThreshold: DEFAULT_THRESHOLDS.megaFeatureLineThreshold, - magicCommentThreshold: DEFAULT_THRESHOLDS.magicCommentThreshold, - version: false, - verbose: false, - }; - for (let i = 0; i < argv.length; i++) { - const arg = argv[i]; - if (arg === '--help' || arg === '-h') { - config.help = true; - } - else if (arg === '--input' || arg === '-i') { - const nextArg = argv[++i]; - if (!nextArg) { - throw new Error(`Missing value for ${arg} flag`); - } - config.input.push(nextArg); - } - else if (arg === '--features' || arg === '-F') { - const nextArg = argv[++i]; - if (!nextArg) { - throw new Error(`Missing value for ${arg} flag`); - } - config.features.push(nextArg); - } - else if (arg === '--exclude' || arg === '-e') { - const nextArg = argv[++i]; - if (!nextArg) { - throw new Error(`Missing value for ${arg} flag`); - } - config.exclude.push(nextArg); - } - else if (arg === '--base-dir' || arg === '-b') { - const nextArg = argv[++i]; - if (!nextArg) { - throw new Error(`Missing value for ${arg} flag`); - } - config.baseDir = nextArg; - } - else if (arg === '--strict') { - config.strict = true; - } - else if (arg === '--format' || arg === '-f') { - const nextArg = argv[++i]; - if (!nextArg) { - throw new Error(`Missing value for ${arg} flag`); - } - if (nextArg !== 'pretty' && nextArg !== 'json') { - throw new Error(`Invalid format: ${nextArg}. Use "pretty" or "json"`); - } - config.format = nextArg; - } - else if (arg === '--dod') { - config.dod = true; - } - else if (arg === '--phase') { - const nextArg = argv[++i]; - if (!nextArg) { - throw new Error(`Missing value for ${arg} flag`); - } - const phaseNum = parseInt(nextArg, 10); - if (isNaN(phaseNum) || phaseNum < 1) { - throw new Error(`Invalid phase number: ${nextArg}. Must be a positive integer.`); - } - config.phases.push(phaseNum); - } - else if (arg === '--anti-patterns') { - config.antiPatterns = true; - } - else if (arg === '--scenario-threshold') { - const nextArg = argv[++i]; - if (!nextArg) { - throw new Error(`Missing value for ${arg} flag`); - } - const threshold = parseInt(nextArg, 10); - if (isNaN(threshold) || threshold < 1) { - throw new Error(`Invalid threshold: ${nextArg}. Must be a positive integer.`); - } - config.scenarioBloatThreshold = threshold; - } - else if (arg === '--mega-feature-threshold') { - const nextArg = argv[++i]; - if (!nextArg) { - throw new Error(`Missing value for ${arg} flag`); - } - const threshold = parseInt(nextArg, 10); - if (isNaN(threshold) || threshold < 1) { - throw new Error(`Invalid threshold: ${nextArg}. Must be a positive integer.`); - } - config.megaFeatureLineThreshold = threshold; - } - else if (arg === '--magic-comment-threshold') { - const nextArg = argv[++i]; - if (!nextArg) { - throw new Error(`Missing value for ${arg} flag`); - } - const threshold = parseInt(nextArg, 10); - if (isNaN(threshold) || threshold < 1) { - throw new Error(`Invalid threshold: ${nextArg}. Must be a positive integer.`); - } - config.magicCommentThreshold = threshold; - } - else if (arg === '--version' || arg === '-v') { - config.version = true; - } - else if (arg === '--verbose') { - config.verbose = true; - } - else if (arg?.startsWith('-') === true) { - console.warn(`Warning: Unknown flag '${arg}' ignored`); - } - } - return config; -} -/** - * Print usage information - */ -export function printHelp() { - console.log(` -validate-patterns - Cross-validate TypeScript patterns vs Gherkin features - -Usage: - validate-patterns [options] - -Options: - -i, --input Glob pattern for TypeScript files (repeatable; falls back to config) - -F, --features Glob pattern for Gherkin feature files (repeatable; falls back to config) - -e, --exclude Glob pattern to exclude (repeatable) - -b, --base-dir Base directory for paths (default: cwd) - --strict Treat warnings as errors (exit 2 on warnings) - --verbose Show info-level messages (hidden by default) - -f, --format Output format: "pretty" (default) or "json" - -h, --help Show this help message - -v, --version Show version number - -DoD Validation: - --dod Enable Definition of Done validation - --phase Validate specific phase (repeatable, default: all completed) - -Anti-Pattern Detection: - --anti-patterns Enable anti-pattern detection - --scenario-threshold Max scenarios per feature (default: 20) - --mega-feature-threshold Max lines per feature (default: 500) - --magic-comment-threshold Max magic comments (default: 5) - -Exit Codes: - 0 No issues found - 1 Errors found - 2 Warnings found (with --strict) - -Cross-Source Validation Checks: - error phase-mismatch Phase number differs between sources - error status-mismatch Status differs between sources - warning missing-pattern-in-gherkin Pattern in TypeScript has no matching feature - warning missing-deliverables Completed phase has no deliverables defined - warning deliverable-missing-fields Deliverable missing required fields - info missing-pattern-in-ts Pattern in Gherkin has no matching TypeScript - info unmatched-dependency Dependency references non-existent pattern - -DoD Validation Checks (--dod): - error incomplete-deliverables Completed phase has incomplete deliverables - error missing-acceptance-criteria Completed phase has no @acceptance-criteria scenarios - -Anti-Pattern Detection (--anti-patterns): - error tag-duplication Dependencies in features (should be code-only) - error process-in-code Process metadata in code (should be features-only) - warning magic-comments Too many generator hints in features - warning scenario-bloat Too many scenarios per feature - warning mega-feature Feature file too large - -Examples: - # Cross-source validation - validate-patterns -i "src/**/*.ts" -F "tests/features/**/*.feature" - - # DoD validation for all completed phases - validate-patterns -i "src/**/*.ts" -F "features/**/*.feature" --dod - - # DoD validation for specific phase - validate-patterns -i "src/**/*.ts" -F "features/**/*.feature" --dod --phase 14 - - # Anti-pattern detection - validate-patterns -i "src/**/*.ts" -F "features/**/*.feature" --anti-patterns - - # Full validation (cross-source + DoD + anti-patterns) - validate-patterns -i "src/**/*.ts" -F "features/**/*.feature" --dod --anti-patterns --strict - - # JSON output for tooling - validate-patterns -i "src/**/*.ts" -F "features/**/*.feature" --format json - `); -} -/** - * Check if a TS pattern has a cross-source match via implements relationships. - * - * DD-3 Phase 2: For TS patterns not matched by name, check: - * 1. If any Gherkin pattern implements this TS pattern (implementedBy) - * 2. If this TS pattern implements a Gherkin pattern (implementsPatterns) - */ -function hasImplementsMatch(tsPattern, tsName, gherkinByName, dataset) { - // Check if a Gherkin pattern implements this TS pattern - if ((dataset.relationshipIndex?.[tsName]?.implementedBy.length ?? 0) > 0) { - return true; - } - // Check if this TS pattern implements a Gherkin pattern - const implements_ = tsPattern.implementsPatterns ?? []; - for (const implName of implements_) { - if (gherkinByName.has(implName.toLowerCase())) { - return true; - } - } - return false; -} -/** - * Check if a Gherkin pattern has a cross-source match via implements relationships. - * - * Symmetric counterpart to hasImplementsMatch for the Gherkin→TS direction: - * 1. If a TS pattern implements this Gherkin pattern (implementedBy) - * 2. If this Gherkin pattern implements a TS pattern (implementsPatterns) - */ -function hasGherkinImplementsMatch(gherkinPattern, tsByName, dataset) { - const name = getPatternName(gherkinPattern); - // Check reverse: a TS pattern implements this Gherkin pattern - if (dataset.relationshipIndex?.[name]?.implementedBy.some((ref) => tsByName.has(ref.name.toLowerCase())) === true) { - return true; - } - // Check forward: this Gherkin pattern implements a TS pattern - const implements_ = gherkinPattern.implementsPatterns ?? []; - for (const implName of implements_) { - if (tsByName.has(implName.toLowerCase())) { - return true; - } - } - return false; -} -/** - * Validate cross-source consistency using the MasterDataset read model. - * - * Compares TypeScript patterns against Gherkin patterns to find: - * - Missing patterns in either source (with implements-aware resolution) - * - Phase number mismatches - * - Status mismatches (after normalization) - * - Missing deliverables for completed phases - * - Invalid dependencies - * - * DD-2: Consumes RuntimeMasterDataset instead of raw scanner/extractor output. - * DD-3: Two-phase matching — name-based first, then relationshipIndex fallback. - * - * @param dataset - The pre-computed MasterDataset read model - * @returns Validation summary with issues and statistics - */ -export function validatePatterns(dataset) { - const issues = []; - const tsPatterns = dataset.bySource.typescript; - const gherkinPatterns = dataset.bySource.gherkin; - // Phase 1: Build name-based maps for efficient lookups - const tsByName = new Map(); - const gherkinByName = new Map(); - for (const p of tsPatterns) { - tsByName.set(getPatternName(p).toLowerCase(), p); - } - for (const p of gherkinPatterns) { - gherkinByName.set(getPatternName(p).toLowerCase(), p); - } - let matched = 0; - let missingInGherkinCount = 0; - // Check TypeScript patterns against Gherkin - for (const tsPattern of tsPatterns) { - const tsName = getPatternName(tsPattern).toLowerCase(); - let gherkinMatch = gherkinByName.get(tsName); - // If the Gherkin pattern explicitly implements a DIFFERENT pattern, it's not - // a true name match — it's a naming collision. The Gherkin pattern belongs to - // whichever pattern it declares in @libar-docs-implements. - if (gherkinMatch !== undefined) { - const gherkinImpl = gherkinMatch.implementsPatterns ?? []; - if (gherkinImpl.length > 0 && !gherkinImpl.some((n) => n.toLowerCase() === tsName)) { - gherkinMatch = undefined; - } - } - if (!gherkinMatch) { - // Phase 2: Check implements relationships before reporting - if (hasImplementsMatch(tsPattern, getPatternName(tsPattern), gherkinByName, dataset)) { - matched++; - } - else if (tsPattern.phase !== undefined) { - // Only report for roadmap patterns (those with phase numbers) - const name = getPatternName(tsPattern); - missingInGherkinCount++; - issues.push({ - severity: 'warning', - message: `Pattern "${name}" in TypeScript has no matching Gherkin feature`, - source: 'cross-source', - pattern: name, - file: tsPattern.source.file, - }); - } - } - else { - matched++; - // Check phase consistency - if (tsPattern.phase !== undefined && gherkinMatch.phase !== undefined) { - if (tsPattern.phase !== gherkinMatch.phase) { - const name = getPatternName(tsPattern); - issues.push({ - severity: 'error', - message: `Phase mismatch for "${name}": TypeScript=${tsPattern.phase}, Gherkin=${gherkinMatch.phase}`, - source: 'cross-source', - pattern: name, - }); - } - } - // Check status consistency - if (tsPattern.status && gherkinMatch.status) { - const tsStatus = normalizeStatus(tsPattern.status); - const gherkinStatus = normalizeStatus(gherkinMatch.status); - if (tsStatus !== gherkinStatus) { - const name = getPatternName(tsPattern); - // Include both raw and normalized values for clarity when they differ textually - const rawDiffers = tsPattern.status.toLowerCase() !== gherkinMatch.status.toLowerCase(); - const message = rawDiffers - ? `Status mismatch for "${name}": TypeScript="${tsPattern.status}" (→${tsStatus}), Gherkin="${gherkinMatch.status}" (→${gherkinStatus})` - : `Status mismatch for "${name}": TypeScript=${tsStatus}, Gherkin=${gherkinStatus}`; - issues.push({ - severity: 'error', - message, - source: 'cross-source', - pattern: name, - }); - } - } - } - } - // Check Gherkin patterns against TypeScript - let missingInTsCount = 0; - for (const gherkinPattern of gherkinPatterns) { - const gherkinName = getPatternName(gherkinPattern).toLowerCase(); - let tsMatch = tsByName.get(gherkinName); - // Symmetric collision guard: if the TS pattern implements a DIFFERENT Gherkin - // pattern, it's a naming collision, not a true match. - if (tsMatch !== undefined) { - const tsImpl = tsMatch.implementsPatterns ?? []; - if (tsImpl.length > 0 && !tsImpl.some((n) => n.toLowerCase() === gherkinName)) { - tsMatch = undefined; - } - } - if (!tsMatch) { - // Two-phase implements resolution (symmetric with TS→Gherkin direction) - if (!hasGherkinImplementsMatch(gherkinPattern, tsByName, dataset)) { - const name = getPatternName(gherkinPattern); - missingInTsCount++; - issues.push({ - severity: 'info', - message: `Pattern "${name}" in Gherkin has no matching TypeScript pattern`, - source: 'cross-source', - pattern: name, - file: gherkinPattern.source.file, - }); - } - } - } - // Check deliverables for completed roadmap patterns (those with phase numbers). - // Test features and ADRs are completed but don't participate in the deliverables workflow. - for (const gherkinPattern of gherkinPatterns) { - if (isPatternComplete(gherkinPattern.status) && gherkinPattern.phase !== undefined) { - const deliverables = gherkinPattern.deliverables ?? []; - const name = getPatternName(gherkinPattern); - if (deliverables.length === 0) { - issues.push({ - severity: 'warning', - message: `Completed pattern "${name}" has no deliverables defined`, - source: 'gherkin', - pattern: name, - file: gherkinPattern.source.file, - }); - } - else { - // Validate deliverable fields - for (const d of deliverables) { - if (!d.name || d.name.trim() === '') { - issues.push({ - severity: 'warning', - message: `Deliverable in "${name}" missing name`, - source: 'gherkin', - pattern: name, - }); - } - } - } - } - } - // Check dependencies exist - const allPatternNames = new Set([...tsByName.keys(), ...gherkinByName.keys()]); - for (const pattern of tsPatterns) { - const deps = pattern.dependsOn ?? []; - for (const dep of deps) { - if (!allPatternNames.has(dep.toLowerCase())) { - const name = getPatternName(pattern); - issues.push({ - severity: 'info', - message: `Pattern "${name}" depends on "${dep}" which does not exist`, - source: 'typescript', - pattern: name, - }); - } - } - } - return { - issues, - stats: { - typescriptPatterns: tsPatterns.length, - gherkinPatterns: gherkinPatterns.length, - matched, - missingInGherkin: missingInGherkinCount, - missingInTypeScript: missingInTsCount, - }, - }; -} -/** - * Format summary for pretty output - */ -function formatPretty(summary, verbose = false) { - const lines = []; - lines.push('Pattern Validation Summary'); - lines.push('=========================='); - lines.push(''); - // Stats - lines.push(`TypeScript patterns: ${summary.stats.typescriptPatterns}`); - lines.push(`Gherkin patterns: ${summary.stats.gherkinPatterns}`); - lines.push(`Matched: ${summary.stats.matched}`); - lines.push(''); - // Group issues by severity - const errors = summary.issues.filter((i) => i.severity === 'error'); - const warnings = summary.issues.filter((i) => i.severity === 'warning'); - const infos = summary.issues.filter((i) => i.severity === 'info'); - if (errors.length > 0) { - lines.push(`Errors (${errors.length}):`); - for (const issue of errors) { - lines.push(` [ERROR] ${issue.message}`); - if (issue.file) { - lines.push(` at ${issue.file}`); - } - } - lines.push(''); - } - if (warnings.length > 0) { - lines.push(`Warnings (${warnings.length}):`); - for (const issue of warnings) { - lines.push(` [WARN] ${issue.message}`); - if (issue.file) { - lines.push(` at ${issue.file}`); - } - } - lines.push(''); - } - if (infos.length > 0 && verbose) { - lines.push(`Info (${infos.length}):`); - for (const issue of infos) { - lines.push(` [INFO] ${issue.message}`); - if (issue.file) { - lines.push(` at ${issue.file}`); - } - } - lines.push(''); - } - // Summary line - if (errors.length === 0 && warnings.length === 0) { - lines.push('All validations passed.'); - } - else { - lines.push(`Found ${errors.length} error(s), ${warnings.length} warning(s), ${infos.length} info message(s).`); - } - return lines.join('\n'); -} -/** - * Format summary as JSON - * - * Uses ValidationSummaryCodec for type-safe serialization. - * - * @throws Error if serialization fails (should never happen with valid data) - */ -function formatJson(summary) { - const result = ValidationSummaryCodec.serialize(summary); - if (!result.ok) { - throw new Error(`Validation summary serialization failed: ${result.error.message}`); - } - return result.value; -} -/** - * Main CLI function - */ -async function main() { - const config = parseArgs(); - if (config.version) { - printVersionAndExit('validate-patterns'); - } - if (config.help) { - printHelp(); - process.exit(0); - } - // Apply config-based defaults if CLI flags not provided - const configApplied = await applyProjectSourceDefaults(config); - if (!configApplied && config.input.length === 0) { - console.error(' (No delivery-process.config.ts found; provide -i/--input flags)'); - } - // Validate that we have sources (from CLI or config) - if (config.input.length === 0) { - console.error('Error: No TypeScript sources specified.'); - console.error('Provide -i/--input flags or configure sources in delivery-process.config.ts'); - process.exit(1); - } - if (config.features.length === 0) { - console.error('Error: No feature files specified.'); - console.error('Provide -F/--features flags or configure sources in delivery-process.config.ts'); - process.exit(1); - } - try { - // Load configuration (discovers delivery-process.config.ts) - const configResult = await loadConfig(config.baseDir); - if (!configResult.ok) { - console.error(formatConfigError(configResult.error)); - process.exit(1); - } - const { instance: dpInstance, isDefault, path: configPath } = configResult.value; - const registry = dpInstance.registry; - const configSource = !isDefault && configPath ? configPath : '(default libar-generic preset)'; - if (config.format === 'pretty') { - console.log('Validating patterns...'); - console.log(` Config: ${configSource}`); - console.log(` Base directory: ${config.baseDir}`); - console.log(` TypeScript patterns: ${config.input.join(', ')}`); - console.log(` Gherkin patterns: ${config.features.join(', ')}`); - console.log(''); - } - // Build MasterDataset via shared pipeline factory (DD-7) - const pipelineResult = await buildMasterDataset({ - input: config.input, - features: config.features, - baseDir: config.baseDir, - mergeConflictStrategy: 'concatenate', - ...(config.exclude.length > 0 ? { exclude: config.exclude } : {}), - }); - if (!pipelineResult.ok) { - throw new Error(`Pipeline error [${pipelineResult.error.step}]: ${pipelineResult.error.message}`); - } - const { dataset, warnings: pipelineWarnings } = pipelineResult.value; - if (config.format === 'pretty') { - for (const w of pipelineWarnings) { - console.warn(`⚠️ ${w.message}`); - } - } - // Raw scans for stage-1 consumers (DoD validation, anti-pattern detection) - // These correctly use scanned file data, not the MasterDataset — see DD-7 - const scannerConfig = ScannerConfigSchema.parse({ - patterns: config.input, - exclude: config.exclude.length > 0 ? config.exclude : undefined, - baseDir: config.baseDir, - }); - const scanResult = await scanPatterns(scannerConfig, registry); - if (!scanResult.ok) { - throw new Error('Unexpected scan failure'); - } - const gherkinScanResult = await scanGherkinFiles({ - patterns: config.features, - baseDir: config.baseDir, - }); - if (!gherkinScanResult.ok) { - throw new Error('Unexpected Gherkin scan failure'); - } - // Warn if no patterns found (common misconfiguration) - if (dataset.bySource.typescript.length === 0) { - console.warn('⚠️ Warning: No TypeScript patterns found. Check your --input patterns.'); - } - if (dataset.bySource.gherkin.length === 0) { - console.warn('⚠️ Warning: No Gherkin patterns found. Check your --features patterns.'); - } - // Run cross-source validation against the read model (DD-2) - const summary = validatePatterns(dataset); - // Output cross-source results - if (config.format === 'pretty') { - console.log(formatPretty(summary, config.verbose)); - } - // Run DoD validation if enabled - let dodHasErrors = false; - if (config.dod) { - const dodSummary = validateDoD(gherkinScanResult.value.files, config.phases); - if (config.format === 'pretty') { - console.log(formatDoDSummary(dodSummary)); - } - // Add DoD failures to issues - for (const result of dodSummary.results) { - if (!result.isDoDMet) { - dodHasErrors = true; - for (const msg of result.messages) { - if (!msg.startsWith('DoD met')) { - summary.issues.push({ - severity: 'error', - message: `[DoD] Phase ${result.phase} (${result.patternName}): ${msg}`, - source: 'gherkin', - pattern: result.patternName, - }); - } - } - } - } - } - // Run anti-pattern detection if enabled - let antiPatternHasErrors = false; - if (config.antiPatterns) { - const thresholds = { - scenarioBloatThreshold: config.scenarioBloatThreshold, - megaFeatureLineThreshold: config.megaFeatureLineThreshold, - magicCommentThreshold: config.magicCommentThreshold, - }; - const violations = detectAntiPatterns(scanResult.value.files, gherkinScanResult.value.files, { - thresholds, - }); - if (config.format === 'pretty') { - console.log(formatAntiPatternReport(violations)); - } - // Add anti-pattern violations to issues - const antiPatternIssues = toValidationIssues(violations); - summary.issues.push(...antiPatternIssues); - antiPatternHasErrors = violations.some((v) => v.severity === 'error'); - } - // Output JSON if requested (all results combined) - if (config.format === 'json') { - console.log(formatJson(summary)); - } - // Determine exit code based on all validation results - const hasErrors = summary.issues.some((i) => i.severity === 'error') || dodHasErrors || antiPatternHasErrors; - const hasWarnings = summary.issues.some((i) => i.severity === 'warning'); - if (hasErrors) { - process.exit(1); - } - else if (hasWarnings && config.strict) { - process.exit(2); - } - else { - process.exit(0); - } - } - catch (error) { - handleCliError(error, 1); - } -} -// Entry point -void main(); -//# sourceMappingURL=validate-patterns.js.map \ No newline at end of file diff --git a/dist/cli/validate-patterns.js.map b/dist/cli/validate-patterns.js.map deleted file mode 100644 index f0d5e371..00000000 --- a/dist/cli/validate-patterns.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"validate-patterns.js","sourceRoot":"","sources":["../../src/cli/validate-patter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/cli/version.d.ts b/dist/cli/version.d.ts deleted file mode 100644 index 43659e19..00000000 --- a/dist/cli/version.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * @libar-docs - * @libar-docs-cli - * @libar-docs-pattern CLIVersionHelper - * @libar-docs-status completed - * @libar-docs-used-by DocumentationGeneratorCLI, LintPatternsCLI, TagTaxonomyCLI, ValidatePatternsCLI - * - * ## CLIVersionHelper - Package Version Reader - * - * Reads package version from package.json for CLI --version flag. - * - * ### When to Use - * - * - Use in CLI entry points to display package version - * - Call early in argument parsing before other operations - */ -/** - * Get the package version from package.json - * - * @returns Package version string (e.g., "0.1.0") - */ -export declare function getPackageVersion(): string; -/** - * Get the package name from package.json - * - * @returns Package name (e.g., "@libar-dev/delivery-process") - */ -export declare function getPackageName(): string; -/** - * Print version information and exit - * - * @param cliName - Name of the CLI command (e.g., "generate-docs") - */ -export declare function printVersionAndExit(cliName: string): never; -//# sourceMappingURL=version.d.ts.map \ No newline at end of file diff --git a/dist/cli/version.d.ts.map b/dist/cli/version.d.ts.map deleted file mode 100644 index 357a9595..00000000 --- a/dist/cli/version.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/cli/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAMH;;;;GAIG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAe1C;AAED;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAavC;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,CAG1D"} \ No newline at end of file diff --git a/dist/cli/version.js b/dist/cli/version.js deleted file mode 100644 index 5a721e87..00000000 --- a/dist/cli/version.js +++ /dev/null @@ -1,64 +0,0 @@ -/** - * @libar-docs - * @libar-docs-cli - * @libar-docs-pattern CLIVersionHelper - * @libar-docs-status completed - * @libar-docs-used-by DocumentationGeneratorCLI, LintPatternsCLI, TagTaxonomyCLI, ValidatePatternsCLI - * - * ## CLIVersionHelper - Package Version Reader - * - * Reads package version from package.json for CLI --version flag. - * - * ### When to Use - * - * - Use in CLI entry points to display package version - * - Call early in argument parsing before other operations - */ -import { readFileSync } from 'fs'; -import { dirname, join } from 'path'; -import { fileURLToPath } from 'url'; -/** - * Get the package version from package.json - * - * @returns Package version string (e.g., "0.1.0") - */ -export function getPackageVersion() { - try { - // Resolve path relative to this file: src/cli/version.ts -> package.json - const __filename = fileURLToPath(import.meta.url); - const __dirname = dirname(__filename); - const packagePath = join(__dirname, '..', '..', 'package.json'); - const packageJson = JSON.parse(readFileSync(packagePath, 'utf-8')); - return packageJson.version ?? 'unknown'; - } - catch { - return 'unknown'; - } -} -/** - * Get the package name from package.json - * - * @returns Package name (e.g., "@libar-dev/delivery-process") - */ -export function getPackageName() { - try { - const __filename = fileURLToPath(import.meta.url); - const __dirname = dirname(__filename); - const packagePath = join(__dirname, '..', '..', 'package.json'); - const packageJson = JSON.parse(readFileSync(packagePath, 'utf-8')); - return packageJson.name ?? 'delivery-process'; - } - catch { - return 'delivery-process'; - } -} -/** - * Print version information and exit - * - * @param cliName - Name of the CLI command (e.g., "generate-docs") - */ -export function printVersionAndExit(cliName) { - console.log(`${cliName} (${getPackageName()}) v${getPackageVersion()}`); - process.exit(0); -} -//# sourceMappingURL=version.js.map \ No newline at end of file diff --git a/dist/cli/version.js.map b/dist/cli/version.js.map deleted file mode 100644 index 3aa05536..00000000 --- a/dist/cli/version.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/cli/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAEpC;;;;GAIG;AACH,MAAM,UAA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loader.d.ts b/dist/config/config-loader.d.ts deleted file mode 100644 index 1b4010ab..00000000 --- a/dist/config/config-loader.d.ts +++ /dev/null @@ -1,168 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core @libar-docs-config - * @libar-docs-pattern ConfigLoader - * @libar-docs-status completed - * @libar-docs-arch-role infrastructure - * @libar-docs-arch-context config - * @libar-docs-arch-layer infrastructure - * @libar-docs-uses DeliveryProcessFactory, ConfigurationTypes - * @libar-docs-used-by CLI - * @libar-docs-extract-shapes ConfigDiscoveryResult, ConfigLoadError, ConfigLoadResult, findConfigFile, loadConfig, formatConfigError - * - * ## Config Loader - TypeScript Configuration File Discovery - * - * Discovers and loads `delivery-process.config.ts` files for hierarchical configuration. - * Supports package-level and repo-level configuration inheritance. - * - * ### When to Use - * - * - When CLI tools need to load project configuration automatically - * - When implementing custom tooling that respects project config - * - When testing configuration loading in different directory structures - * - * ### Discovery Strategy - * - * 1. Look for `delivery-process.config.ts` in current directory - * 2. Walk up parent directories until repo root (contains .git) - * 3. Stop at first config found or fall back to default - * - * ### Config File Format - * - * Config files should export a `DeliveryProcessInstance`: - * - * ```typescript - * import { createDeliveryProcess } from '@libar-dev/delivery-process'; - * - * export default createDeliveryProcess({ preset: "libar-generic" }); - * ``` - */ -import type { ResolvedConfig } from './project-config.js'; -import type { DeliveryProcessInstance } from './types.js'; -/** - * Result of config file discovery - */ -export interface ConfigDiscoveryResult { - /** Whether a config file was found */ - found: boolean; - /** Absolute path to the config file (if found) */ - path?: string; - /** The loaded configuration instance */ - instance: DeliveryProcessInstance; - /** Whether the default configuration was used */ - isDefault: boolean; -} -/** - * Error during config loading - */ -export interface ConfigLoadError { - /** Discriminant for error type identification */ - type: 'config-load-error'; - /** Absolute path to the config file that failed to load */ - path: string; - /** Human-readable error description */ - message: string; - /** The underlying error that caused the failure (if any) */ - cause?: Error | undefined; -} -/** - * Result type for config loading (discriminated union) - */ -export type ConfigLoadResult = { - /** Indicates successful config resolution */ - ok: true; - /** The discovery result containing configuration instance */ - value: ConfigDiscoveryResult; -} | { - /** Indicates config loading failure */ - ok: false; - /** Error details for the failed load */ - error: ConfigLoadError; -}; -/** - * Find config file by walking up from startDir - * - * @param startDir - Directory to start searching from - * @returns Path to config file or null if not found - */ -export declare function findConfigFile(startDir: string): Promise; -/** - * Load configuration from file or use defaults. - * - * Delegates to {@link loadProjectConfig} for file discovery and parsing, - * then maps the result to the legacy {@link ConfigDiscoveryResult} shape. - * - * @param baseDir - Directory to start searching from (usually cwd or project root) - * @returns Result with loaded configuration or error - * - * @example - * ```typescript - * // In CLI tool - * const result = await loadConfig(process.cwd()); - * if (!result.ok) { - * console.error(result.error.message); - * process.exit(1); - * } - * - * const { instance, isDefault, path } = result.value; - * if (!isDefault) { - * console.log(`Using config from: ${path}`); - * } - * - * // Use instance.registry for scanning/extracting - * ``` - */ -export declare function loadConfig(baseDir: string): Promise; -/** - * Format config load error for console display - * - * @param error - Config load error - * @returns Formatted error message - */ -export declare function formatConfigError(error: ConfigLoadError): string; -/** - * Result type for project config loading (discriminated union). - * - * Returns a `ResolvedConfig` on success (with all defaults applied), - * or a `ConfigLoadError` on failure. - */ -export type ProjectConfigLoadResult = { - /** Indicates successful config resolution */ - readonly ok: true; - /** The fully resolved configuration */ - readonly value: ResolvedConfig; -} | { - /** Indicates config loading failure */ - readonly ok: false; - /** Error details for the failed load */ - readonly error: ConfigLoadError; -}; -/** - * Load unified project configuration from file or use defaults. - * - * Supports both new-style `DeliveryProcessProjectConfig` (via `defineConfig()`) - * and legacy `DeliveryProcessInstance` (via `createDeliveryProcess()`) config files. - * - * Discovery strategy: - * 1. Search for `delivery-process.config.ts` starting from baseDir - * 2. Walk up parent directories until repo root - * 3. If found, import and resolve the configuration - * 4. If not found, return default resolved config - * - * @param baseDir - Directory to start searching from (usually cwd or project root) - * @returns Result with fully resolved configuration or error - */ -/** - * Apply project config sources as defaults to a mutable CLI config. - * Only fills in sources not already provided by CLI flags. - * - * @param config - Mutable config object with baseDir, input, and features arrays - * @returns true if a non-default project config was found and applied - */ -export declare function applyProjectSourceDefaults(config: { - readonly baseDir: string; - input: string[]; - features: string[]; -}): Promise; -export declare function loadProjectConfig(baseDir: string): Promise; -//# sourceMappingURL=config-loader.d.ts.map \ No newline at end of file diff --git a/dist/config/config-loader.d.ts.map b/dist/config/config-loader.d.ts.map deleted file mode 100644 index 5188317d..00000000 --- a/dist/config/config-loader.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"config-loader.d.ts","sourceRoot":"","sources":["../../src/config/config-loader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAKH,OAAO,KAAK,EAAgC,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAOxF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAY1D;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,sCAAsC;IACtC,KAAK,EAAE,OAAO,CAAC;IACf,kDAAkD;IAClD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wCAAwC;IACxC,QAAQ,EAAE,uBAAuB,CAAC;IAClC,iDAAiD;IACjD,SAAS,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,iDAAiD;IACjD,IAAI,EAAE,mBAAmB,CAAC;IAC1B,2DAA2D;IAC3D,IAAI,EAAE,MAAM,CAAC;IACb,uCAAuC;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,4DAA4D;IAC5D,KAAK,CAAC,EAAE,KAAK,GAAG,SAAS,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,MAAM,gBAAgB,GACxB;IACE,6CAA6C;IAC7C,EAAE,EAAE,IAAI,CAAC;IACT,6DAA6D;IAC7D,KAAK,EAAE,qBAAqB,CAAC;CAC9B,GACD;IACE,uCAAuC;IACvC,EAAE,EAAE,KAAK,CAAC;IACV,wCAAwC;IACxC,KAAK,EAAE,eAAe,CAAC;CACxB,CAAC;AA2BN;;;;;GAKG;AACH,wBAAsB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CA+B7E;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAsB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAgB3E;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM,CAQhE;AAED;;;;;GAKG;AACH,MAAM,MAAM,uBAAuB,GAC/B;IACE,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAClB,uCAAuC;IACvC,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC;CAChC,GACD;IACE,uCAAuC;IACvC,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IACnB,wCAAwC;IACxC,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC;CACjC,CAAC;AAEN;;;;;;;;;;;;;;GAcG;AACH;;;;;;GAMG;AACH,wBAAsB,0BAA0B,CAAC,MAAM,EAAE;IACvD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,GAAG,OAAO,CAAC,OAAO,CAAC,CAkBnB;AAED,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,CAAC,CA0GzF"} \ No newline at end of file diff --git a/dist/config/config-loader.js b/dist/config/config-loader.js deleted file mode 100644 index 02fe0410..00000000 --- a/dist/config/config-loader.js +++ /dev/null @@ -1,306 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core @libar-docs-config - * @libar-docs-pattern ConfigLoader - * @libar-docs-status completed - * @libar-docs-arch-role infrastructure - * @libar-docs-arch-context config - * @libar-docs-arch-layer infrastructure - * @libar-docs-uses DeliveryProcessFactory, ConfigurationTypes - * @libar-docs-used-by CLI - * @libar-docs-extract-shapes ConfigDiscoveryResult, ConfigLoadError, ConfigLoadResult, findConfigFile, loadConfig, formatConfigError - * - * ## Config Loader - TypeScript Configuration File Discovery - * - * Discovers and loads `delivery-process.config.ts` files for hierarchical configuration. - * Supports package-level and repo-level configuration inheritance. - * - * ### When to Use - * - * - When CLI tools need to load project configuration automatically - * - When implementing custom tooling that respects project config - * - When testing configuration loading in different directory structures - * - * ### Discovery Strategy - * - * 1. Look for `delivery-process.config.ts` in current directory - * 2. Walk up parent directories until repo root (contains .git) - * 3. Stop at first config found or fall back to default - * - * ### Config File Format - * - * Config files should export a `DeliveryProcessInstance`: - * - * ```typescript - * import { createDeliveryProcess } from '@libar-dev/delivery-process'; - * - * export default createDeliveryProcess({ preset: "libar-generic" }); - * ``` - */ -import * as fs from 'fs/promises'; -import * as path from 'path'; -import { pathToFileURL } from 'url'; -import { isProjectConfig, isLegacyInstance, DeliveryProcessProjectConfigSchema, } from './project-config-schema.js'; -import { resolveProjectConfig, createDefaultResolvedConfig } from './resolve-config.js'; -/** - * Config file name to search for - */ -const CONFIG_FILE_NAME = 'delivery-process.config.ts'; -/** - * Compiled JavaScript variant (for projects that pre-compile configs) - */ -const CONFIG_FILE_NAME_JS = 'delivery-process.config.js'; -/** - * Check if a directory contains a .git folder (repo root marker) - */ -async function isRepoRoot(dir) { - try { - const gitPath = path.join(dir, '.git'); - const stat = await fs.stat(gitPath); - return stat.isDirectory() || stat.isFile(); // .git can be a file (worktree) - } - catch { - return false; - } -} -/** - * Check if a file exists - */ -async function fileExists(filePath) { - try { - await fs.access(filePath); - return true; - } - catch { - return false; - } -} -/** - * Find config file by walking up from startDir - * - * @param startDir - Directory to start searching from - * @returns Path to config file or null if not found - */ -export async function findConfigFile(startDir) { - let currentDir = path.resolve(startDir); - const root = path.parse(currentDir).root; - while (currentDir !== root) { - // Check for TypeScript config first - const tsConfigPath = path.join(currentDir, CONFIG_FILE_NAME); - if (await fileExists(tsConfigPath)) { - return tsConfigPath; - } - // Check for JavaScript config (pre-compiled) - const jsConfigPath = path.join(currentDir, CONFIG_FILE_NAME_JS); - if (await fileExists(jsConfigPath)) { - return jsConfigPath; - } - // Stop at repo root to avoid walking too far - if (await isRepoRoot(currentDir)) { - break; - } - // Move to parent directory - const parentDir = path.dirname(currentDir); - if (parentDir === currentDir) { - break; // Reached filesystem root - } - currentDir = parentDir; - } - return null; -} -/** - * Load configuration from file or use defaults. - * - * Delegates to {@link loadProjectConfig} for file discovery and parsing, - * then maps the result to the legacy {@link ConfigDiscoveryResult} shape. - * - * @param baseDir - Directory to start searching from (usually cwd or project root) - * @returns Result with loaded configuration or error - * - * @example - * ```typescript - * // In CLI tool - * const result = await loadConfig(process.cwd()); - * if (!result.ok) { - * console.error(result.error.message); - * process.exit(1); - * } - * - * const { instance, isDefault, path } = result.value; - * if (!isDefault) { - * console.log(`Using config from: ${path}`); - * } - * - * // Use instance.registry for scanning/extracting - * ``` - */ -export async function loadConfig(baseDir) { - const result = await loadProjectConfig(baseDir); - if (!result.ok) { - return result; - } - return { - ok: true, - value: { - found: !result.value.isDefault, - ...(result.value.configPath !== undefined ? { path: result.value.configPath } : {}), - instance: result.value.instance, - isDefault: result.value.isDefault, - }, - }; -} -/** - * Format config load error for console display - * - * @param error - Config load error - * @returns Formatted error message - */ -export function formatConfigError(error) { - const lines = [`Config error: ${error.message}`, ` Path: ${error.path}`]; - if (error.cause) { - lines.push(` Cause: ${error.cause.message}`); - } - return lines.join('\n'); -} -/** - * Load unified project configuration from file or use defaults. - * - * Supports both new-style `DeliveryProcessProjectConfig` (via `defineConfig()`) - * and legacy `DeliveryProcessInstance` (via `createDeliveryProcess()`) config files. - * - * Discovery strategy: - * 1. Search for `delivery-process.config.ts` starting from baseDir - * 2. Walk up parent directories until repo root - * 3. If found, import and resolve the configuration - * 4. If not found, return default resolved config - * - * @param baseDir - Directory to start searching from (usually cwd or project root) - * @returns Result with fully resolved configuration or error - */ -/** - * Apply project config sources as defaults to a mutable CLI config. - * Only fills in sources not already provided by CLI flags. - * - * @param config - Mutable config object with baseDir, input, and features arrays - * @returns true if a non-default project config was found and applied - */ -export async function applyProjectSourceDefaults(config) { - if (config.input.length > 0 && config.features.length > 0) { - return false; - } - const result = await loadProjectConfig(config.baseDir); - if (!result.ok || result.value.isDefault) { - return false; - } - const resolved = result.value; - if (config.input.length === 0 && resolved.project.sources.typescript.length > 0) { - config.input.push(...resolved.project.sources.typescript); - } - if (config.features.length === 0 && resolved.project.sources.features.length > 0) { - config.features.push(...resolved.project.sources.features); - } - return true; -} -export async function loadProjectConfig(baseDir) { - const configPath = await findConfigFile(baseDir); - // No config found — return defaults - if (configPath === null) { - return { - ok: true, - value: createDefaultResolvedConfig(), - }; - } - // Try to import the config file - let module; - try { - const fileUrl = pathToFileURL(configPath).href; - module = (await import(fileUrl)); - } - catch (error) { - const message = error instanceof Error ? error.message : String(error); - return { - ok: false, - error: { - type: 'config-load-error', - path: configPath, - message: `Failed to import config: ${message}`, - cause: error instanceof Error ? error : undefined, - }, - }; - } - const exported = module.default; - // No default export - if (exported === undefined || exported === null) { - return { - ok: false, - error: { - type: 'config-load-error', - path: configPath, - message: `Config file must have a default export: ${configPath}`, - }, - }; - } - // Legacy DeliveryProcessInstance (createDeliveryProcess) — check first because - // isProjectConfig is a loose check that could match legacy instances with extra fields - if (isLegacyInstance(exported)) { - const defaultResolved = createDefaultResolvedConfig(); - return { - ok: true, - value: { - instance: exported, - project: defaultResolved.project, - isDefault: false, - configPath, - }, - }; - } - // New-style project config (defineConfig) - if (isProjectConfig(exported)) { - const parseResult = DeliveryProcessProjectConfigSchema.safeParse(exported); - if (!parseResult.success) { - const zodMessage = parseResult.error.issues - .map((issue) => `${issue.path.join('.')}: ${issue.message}`) - .join('; '); - return { - ok: false, - error: { - type: 'config-load-error', - path: configPath, - message: `Invalid project config: ${zodMessage}`, - }, - }; - } - let resolved; - try { - resolved = resolveProjectConfig(parseResult.data, { - configPath, - }); - } - catch (error) { - const message = error instanceof Error ? error.message : String(error); - return { - ok: false, - error: { - type: 'config-load-error', - path: configPath, - message: `Failed to resolve project config: ${message}`, - cause: error instanceof Error ? error : undefined, - }, - }; - } - return { - ok: true, - value: resolved, - }; - } - // Unknown export shape - return { - ok: false, - error: { - type: 'config-load-error', - path: configPath, - message: `Config file must export a DeliveryProcessProjectConfig (use defineConfig()) or DeliveryProcessInstance (use createDeliveryProcess()): ${configPath}`, - }, - }; -} -//# sourceMappingURL=config-loader.js.map \ No newline at end of file diff --git a/dist/config/config-loader.js.map b/dist/config/config-loader.js.map deleted file mode 100644 index 151231c8..00000000 --- a/dist/config/config-loader.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"config-loader.js","sourceRoot":"","sources":["../../src/config/config-loader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,OAAO,KAAK,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAEpC,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,kCAAkC,GACnC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAC;AAGxF;;GAEG;AACH,MAAM,gBAAgB,GAAG,4BAA4B,CAAC;AAEtD;;GAEG;AACH,MAAM,mBAAmB,GAAG,4BAA4B,CAAC;AA+CzD;;GAEG;AACH,KAAK,UAAU,UAAU,CAAC,GAAW;IACnC,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;QACvC,MAAM,IAAI,GAAG,MAAM,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACpC,OAAO,IAAI,CAAC,WAAW,EAAE,IAAI,IAAI,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;YAChB,OAAO,EAAE,yIAAyI,UAAU,EAAE;SAC/J;KACF,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/dist/config/defaults.d.ts b/dist/config/defaults.d.ts deleted file mode 100644 index c242c0d6..00000000 --- a/dist/config/defaults.d.ts +++ /dev/null @@ -1,96 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core @libar-docs-config - * @libar-docs-pattern ConfigurationDefaults - * @libar-docs-status completed - * @libar-docs-arch-layer domain - * @libar-docs-arch-context config - * @libar-docs-used-by DeliveryProcessFactory, PatternScanner, LintRules, DetectChanges, AntiPatternDetector - * - * ## Configuration Defaults - * - * Centralized default constants for the delivery-process package. - * These defaults are used when no custom configuration or registry is provided. - * - * ### Why Centralize? - * - * Previously, the default tag prefix string `"@libar-docs-"` appeared in 6+ files. - * Centralizing eliminates duplication and provides a single source of truth. - * - * ### When to Use - * - * - Import these defaults when implementing functions that need fallback values - * - Use `DEFAULT_REGEX_BUILDERS` for opt-in detection when no registry is provided - * - Use `DEFAULT_TAG_PREFIX` in error messages when no registry context exists - * - Use `DEFAULT_CONTEXT_INFERENCE_RULES` to auto-infer bounded contexts from paths - */ -import { type RegexBuilders } from './regex-builders.js'; -import type { ContextInferenceRule } from '../generators/pipeline/transform-dataset.js'; -/** - * Default tag prefix for @libar-docs-* annotations. - * - * This is the prefix used when: - * - No `TagRegistry` is provided to a function - * - Error messages need to reference the tag format - * - Backward compatibility with existing annotations is needed - * - * @example - * ```typescript - * const tagPrefix = registry?.tagPrefix ?? DEFAULT_TAG_PREFIX; - * ``` - */ -export declare const DEFAULT_TAG_PREFIX = "@libar-docs-"; -/** - * Default file opt-in tag (without suffix). - * - * Files must contain this exact tag (in a JSDoc comment) to be included - * in documentation generation. This is distinct from directive tags - * which have suffixes like `@libar-docs-pattern`. - * - * @example - * ```typescript - * // File with opt-in: - * /** @libar-docs This file is documented *\/ - * ``` - */ -export declare const DEFAULT_FILE_OPT_IN_TAG = "@libar-docs"; -/** - * Pre-built regex builders using default prefix and opt-in tag. - * - * Use this for backward compatibility in functions that previously - * hardcoded the default prefix. The builders are created once at - * module load time for efficiency. - * - * @example - * ```typescript - * const builders = registry - * ? createRegexBuilders(registry.tagPrefix, registry.fileOptInTag) - * : DEFAULT_REGEX_BUILDERS; - * return builders.hasFileOptIn(content); - * ``` - */ -export declare const DEFAULT_REGEX_BUILDERS: RegexBuilders; -/** - * Default context inference rules for auto-inferring bounded context from file paths. - * - * These rules map directory paths to bounded context names. When a pattern has - * an `@libar-docs-arch-layer` but no explicit `@libar-docs-arch-context`, the - * context is inferred from the file path using these rules. - * - * **Why This Exists:** - * In most codebases, directory structure already implies bounded context: - * - `src/validation/` → validation context - * - `src/lint/` → lint context - * - `src/generators/` → generator context - * - * Auto-inference eliminates redundant annotations while preserving the ability - * to override with explicit `@libar-docs-arch-context` when needed. - * - * @example - * ```typescript - * // Pattern at src/validation/rules.ts with @libar-docs-arch-layer:application - * // will automatically get archContext='validation' without explicit annotation - * ``` - */ -export declare const DEFAULT_CONTEXT_INFERENCE_RULES: readonly ContextInferenceRule[]; -//# sourceMappingURL=defaults.d.ts.map \ No newline at end of file diff --git a/dist/config/defaults.d.ts.map b/dist/config/defaults.d.ts.map deleted file mode 100644 index 9e14208d..00000000 --- a/dist/config/defaults.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../src/config/defaults.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAuB,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AAExF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,kBAAkB,iBAAiB,CAAC;AAEjD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,uBAAuB,gBAAgB,CAAC;AAErD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,sBAAsB,EAAE,aAGpC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,+BAA+B,EAAE,SAAS,oBAAoB,EAYjE,CAAC"} \ No newline at end of file diff --git a/dist/config/defaults.js b/dist/config/defaults.js deleted file mode 100644 index 841b1b6a..00000000 --- a/dist/config/defaults.js +++ /dev/null @@ -1,107 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core @libar-docs-config - * @libar-docs-pattern ConfigurationDefaults - * @libar-docs-status completed - * @libar-docs-arch-layer domain - * @libar-docs-arch-context config - * @libar-docs-used-by DeliveryProcessFactory, PatternScanner, LintRules, DetectChanges, AntiPatternDetector - * - * ## Configuration Defaults - * - * Centralized default constants for the delivery-process package. - * These defaults are used when no custom configuration or registry is provided. - * - * ### Why Centralize? - * - * Previously, the default tag prefix string `"@libar-docs-"` appeared in 6+ files. - * Centralizing eliminates duplication and provides a single source of truth. - * - * ### When to Use - * - * - Import these defaults when implementing functions that need fallback values - * - Use `DEFAULT_REGEX_BUILDERS` for opt-in detection when no registry is provided - * - Use `DEFAULT_TAG_PREFIX` in error messages when no registry context exists - * - Use `DEFAULT_CONTEXT_INFERENCE_RULES` to auto-infer bounded contexts from paths - */ -import { createRegexBuilders } from './regex-builders.js'; -/** - * Default tag prefix for @libar-docs-* annotations. - * - * This is the prefix used when: - * - No `TagRegistry` is provided to a function - * - Error messages need to reference the tag format - * - Backward compatibility with existing annotations is needed - * - * @example - * ```typescript - * const tagPrefix = registry?.tagPrefix ?? DEFAULT_TAG_PREFIX; - * ``` - */ -export const DEFAULT_TAG_PREFIX = '@libar-docs-'; -/** - * Default file opt-in tag (without suffix). - * - * Files must contain this exact tag (in a JSDoc comment) to be included - * in documentation generation. This is distinct from directive tags - * which have suffixes like `@libar-docs-pattern`. - * - * @example - * ```typescript - * // File with opt-in: - * /** @libar-docs This file is documented *\/ - * ``` - */ -export const DEFAULT_FILE_OPT_IN_TAG = '@libar-docs'; -/** - * Pre-built regex builders using default prefix and opt-in tag. - * - * Use this for backward compatibility in functions that previously - * hardcoded the default prefix. The builders are created once at - * module load time for efficiency. - * - * @example - * ```typescript - * const builders = registry - * ? createRegexBuilders(registry.tagPrefix, registry.fileOptInTag) - * : DEFAULT_REGEX_BUILDERS; - * return builders.hasFileOptIn(content); - * ``` - */ -export const DEFAULT_REGEX_BUILDERS = createRegexBuilders(DEFAULT_TAG_PREFIX, DEFAULT_FILE_OPT_IN_TAG); -/** - * Default context inference rules for auto-inferring bounded context from file paths. - * - * These rules map directory paths to bounded context names. When a pattern has - * an `@libar-docs-arch-layer` but no explicit `@libar-docs-arch-context`, the - * context is inferred from the file path using these rules. - * - * **Why This Exists:** - * In most codebases, directory structure already implies bounded context: - * - `src/validation/` → validation context - * - `src/lint/` → lint context - * - `src/generators/` → generator context - * - * Auto-inference eliminates redundant annotations while preserving the ability - * to override with explicit `@libar-docs-arch-context` when needed. - * - * @example - * ```typescript - * // Pattern at src/validation/rules.ts with @libar-docs-arch-layer:application - * // will automatically get archContext='validation' without explicit annotation - * ``` - */ -export const DEFAULT_CONTEXT_INFERENCE_RULES = [ - { pattern: 'src/validation/**', context: 'validation' }, - { pattern: 'src/scanner/**', context: 'scanner' }, - { pattern: 'src/lint/**', context: 'lint' }, - { pattern: 'src/config/**', context: 'config' }, - { pattern: 'src/taxonomy/**', context: 'taxonomy' }, - { pattern: 'src/generators/**', context: 'generator' }, - { pattern: 'src/renderable/**', context: 'renderer' }, - { pattern: 'src/extractor/**', context: 'extractor' }, - { pattern: 'src/api/**', context: 'api' }, - { pattern: 'src/cli/**', context: 'cli' }, - { pattern: 'src/types/**', context: 'types' }, -]; -//# sourceMappingURL=defaults.js.map \ No newline at end of file diff --git a/dist/config/defaults.js.map b/dist/config/defaults.js.map deleted file mode 100644 index 63c263b3..00000000 --- a/dist/config/defaults.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../src/config/defaults.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,mBAAmB,EAAsB,MAAM,qBAAqB,CAAC;AAG9E;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,cAAc,CAAC;AAEjD;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,aAAa,CAAC;AAErD;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAkB,mBAAmB,CACtE,kBAAkB,EAClB,uBAAuB,CACxB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAoC;IAC9E,EAAE,OAAO,EAAE,mBAAmB,EAAE,OAAO,EAAE,YAAY,EAAE;IACvD,EAAE,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,SAAS,EAAE;IACjD,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,EAAE;IAC3C,EAAE,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,QAAQ,EAAE;IAC/C,EAAE,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,UAAU,EAAE;IACnD,EAAE,OAAO,EAAE,mBAAmB,EAAE,OAAO,EAAE,WAAW,EAAE;IACtD,EAAE,OAAO,EAAE,mBAAmB,EAAE,OAAO,EAAE,UAAU,EAAE;IACrD,EAAE,OAAO,EAAE,kBAAkB,EAAE,OAAO,EAAE,WAAW,EAAE;IACrD,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,KAAK,EAAE;IACzC,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,KAAK,EAAE;IACzC,EAAE,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,OAAO,EAAE;CACrC,CAAC"} \ No newline at end of file diff --git a/dist/config/define-config.d.ts b/dist/config/define-config.d.ts deleted file mode 100644 index 2758595b..00000000 --- a/dist/config/define-config.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core @libar-docs-config - * @libar-docs-pattern DefineConfig - * @libar-docs-status active - * @libar-docs-arch-layer infrastructure - * @libar-docs-arch-context config - * @libar-docs-arch-role infrastructure - * @libar-docs-include reference-sample - * @libar-docs-uses ProjectConfigTypes - * @libar-docs-used-by ConfigLoader - * - * ## Define Config - * - * Identity function for type-safe project configuration. - * Follows the Vite/Vitest `defineConfig()` convention: - * returns the input unchanged, providing only TypeScript type checking. - * - * Validation happens later at load time via Zod schema in `loadProjectConfig()`. - * - * ### When to Use - * - * In `delivery-process.config.ts` at project root: - * - * ```typescript - * import { defineConfig } from '@libar-dev/delivery-process/config'; - * - * export default defineConfig({ - * preset: 'ddd-es-cqrs', - * sources: { typescript: ['src/** /*.ts'] }, - * }); - * ``` - */ -import type { DeliveryProcessProjectConfig } from './project-config.js'; -/** - * Type-safe identity function for delivery-process project configuration. - * - * Returns the config object unchanged. Provides TypeScript autocompletion - * and type checking without runtime overhead. Validation happens at - * config load time via `loadProjectConfig()`. - * - * @param config - The project configuration object - * @returns The same config object (identity) - */ -export declare function defineConfig(config: DeliveryProcessProjectConfig): DeliveryProcessProjectConfig; -//# sourceMappingURL=define-config.d.ts.map \ No newline at end of file diff --git a/dist/config/define-config.d.ts.map b/dist/config/define-config.d.ts.map deleted file mode 100644 index 26d52eac..00000000 --- a/dist/config/define-config.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"define-config.d.ts","sourceRoot":"","sources":["../../src/config/define-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AAExE;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,4BAA4B,GAAG,4BAA4B,CAE/F"} \ No newline at end of file diff --git a/dist/config/define-config.js b/dist/config/define-config.js deleted file mode 100644 index e9a0fc85..00000000 --- a/dist/config/define-config.js +++ /dev/null @@ -1,47 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core @libar-docs-config - * @libar-docs-pattern DefineConfig - * @libar-docs-status active - * @libar-docs-arch-layer infrastructure - * @libar-docs-arch-context config - * @libar-docs-arch-role infrastructure - * @libar-docs-include reference-sample - * @libar-docs-uses ProjectConfigTypes - * @libar-docs-used-by ConfigLoader - * - * ## Define Config - * - * Identity function for type-safe project configuration. - * Follows the Vite/Vitest `defineConfig()` convention: - * returns the input unchanged, providing only TypeScript type checking. - * - * Validation happens later at load time via Zod schema in `loadProjectConfig()`. - * - * ### When to Use - * - * In `delivery-process.config.ts` at project root: - * - * ```typescript - * import { defineConfig } from '@libar-dev/delivery-process/config'; - * - * export default defineConfig({ - * preset: 'ddd-es-cqrs', - * sources: { typescript: ['src/** /*.ts'] }, - * }); - * ``` - */ -/** - * Type-safe identity function for delivery-process project configuration. - * - * Returns the config object unchanged. Provides TypeScript autocompletion - * and type checking without runtime overhead. Validation happens at - * config load time via `loadProjectConfig()`. - * - * @param config - The project configuration object - * @returns The same config object (identity) - */ -export function defineConfig(config) { - return config; -} -//# sourceMappingURL=define-config.js.map \ No newline at end of file diff --git a/dist/config/define-config.js.map b/dist/config/define-config.js.map deleted file mode 100644 index f3a40411..00000000 --- a/dist/config/define-config.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"define-config.js","sourceRoot":"","sources":["../../src/config/define-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAIH;;;;;;;;;GASG;AACH,MAAM,UAAU,YAAY,CAAC,MAAoC;IAC/D,OAAO,MAAM,CAAC;AAChB,CAAC"} \ No newline at end of file diff --git a/dist/config/factory.d.ts b/dist/config/factory.d.ts deleted file mode 100644 index 69a5e7d6..00000000 --- a/dist/config/factory.d.ts +++ /dev/null @@ -1,79 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core @libar-docs-config - * @libar-docs-pattern DeliveryProcessFactory - * @libar-docs-status completed - * @libar-docs-arch-role service - * @libar-docs-arch-context config - * @libar-docs-arch-layer application - * @libar-docs-include reference-sample - * @libar-docs-uses ConfigurationTypes, ConfigurationPresets, RegexBuilders, TagRegistry - * @libar-docs-used-by PublicAPI - * @libar-docs-extract-shapes CreateDeliveryProcessOptions, createDeliveryProcess - * - * ## Delivery Process Factory - * - * Main factory function for creating configured delivery process instances. - * Supports presets, custom configuration, and configuration overrides. - * - * ### When to Use - * - * - At application startup to create a configured instance - * - When switching between different tag prefixes - * - When customizing the taxonomy for a specific project - */ -import type { DeliveryProcessConfig, DeliveryProcessInstance } from './types.js'; -import { type PresetName } from './presets.js'; -/** - * Options for creating a delivery process instance - */ -export interface CreateDeliveryProcessOptions { - /** Use a preset configuration */ - preset?: PresetName; - /** Custom tag prefix (overrides preset) */ - tagPrefix?: string; - /** Custom file opt-in tag (overrides preset) */ - fileOptInTag?: string; - /** Custom categories (replaces preset categories entirely) */ - categories?: DeliveryProcessConfig['categories']; -} -/** - * Creates a configured delivery process instance. - * - * Configuration resolution order: - * 1. Start with preset (or libar-generic default) - * 2. Preset categories REPLACE base taxonomy categories (not merged) - * 3. Apply explicit overrides (tagPrefix, fileOptInTag, categories) - * 4. Create regex builders from final configuration - * - * Note: Presets define complete category sets. The libar-generic preset - * has 3 categories (core, api, infra), while ddd-es-cqrs has 21. - * Categories from the preset replace base categories entirely. - * - * @param options - Configuration options - * @returns Configured delivery process instance - * - * @example - * ```typescript - * // Use generic preset - * const dp = createDeliveryProcess({ preset: "generic" }); - * ``` - * - * @example - * ```typescript - * // Custom prefix with DDD taxonomy - * const dp = createDeliveryProcess({ - * preset: "ddd-es-cqrs", - * tagPrefix: "@my-project-", - * fileOptInTag: "@my-project" - * }); - * ``` - * - * @example - * ```typescript - * // Default (libar-generic preset with 3 categories) - * const dp = createDeliveryProcess(); - * ``` - */ -export declare function createDeliveryProcess(options?: CreateDeliveryProcessOptions): DeliveryProcessInstance; -//# sourceMappingURL=factory.d.ts.map \ No newline at end of file diff --git a/dist/config/factory.d.ts.map b/dist/config/factory.d.ts.map deleted file mode 100644 index 08a488b4..00000000 --- a/dist/config/factory.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../src/config/factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAIjF,OAAO,EAAiC,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAE9E;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C,iCAAiC;IACjC,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,2CAA2C;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gDAAgD;IAChD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,8DAA8D;IAC9D,UAAU,CAAC,EAAE,qBAAqB,CAAC,YAAY,CAAC,CAAC;CAClD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,GAAE,4BAAiC,GACzC,uBAAuB,CAwDzB"} \ No newline at end of file diff --git a/dist/config/factory.js b/dist/config/factory.js deleted file mode 100644 index 8cbecae7..00000000 --- a/dist/config/factory.js +++ /dev/null @@ -1,116 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core @libar-docs-config - * @libar-docs-pattern DeliveryProcessFactory - * @libar-docs-status completed - * @libar-docs-arch-role service - * @libar-docs-arch-context config - * @libar-docs-arch-layer application - * @libar-docs-include reference-sample - * @libar-docs-uses ConfigurationTypes, ConfigurationPresets, RegexBuilders, TagRegistry - * @libar-docs-used-by PublicAPI - * @libar-docs-extract-shapes CreateDeliveryProcessOptions, createDeliveryProcess - * - * ## Delivery Process Factory - * - * Main factory function for creating configured delivery process instances. - * Supports presets, custom configuration, and configuration overrides. - * - * ### When to Use - * - * - At application startup to create a configured instance - * - When switching between different tag prefixes - * - When customizing the taxonomy for a specific project - */ -import { buildRegistry } from '../taxonomy/registry-builder.js'; -import { createRegexBuilders } from './regex-builders.js'; -import { LIBAR_GENERIC_PRESET, PRESETS } from './presets.js'; -/** - * Creates a configured delivery process instance. - * - * Configuration resolution order: - * 1. Start with preset (or libar-generic default) - * 2. Preset categories REPLACE base taxonomy categories (not merged) - * 3. Apply explicit overrides (tagPrefix, fileOptInTag, categories) - * 4. Create regex builders from final configuration - * - * Note: Presets define complete category sets. The libar-generic preset - * has 3 categories (core, api, infra), while ddd-es-cqrs has 21. - * Categories from the preset replace base categories entirely. - * - * @param options - Configuration options - * @returns Configured delivery process instance - * - * @example - * ```typescript - * // Use generic preset - * const dp = createDeliveryProcess({ preset: "generic" }); - * ``` - * - * @example - * ```typescript - * // Custom prefix with DDD taxonomy - * const dp = createDeliveryProcess({ - * preset: "ddd-es-cqrs", - * tagPrefix: "@my-project-", - * fileOptInTag: "@my-project" - * }); - * ``` - * - * @example - * ```typescript - * // Default (libar-generic preset with 3 categories) - * const dp = createDeliveryProcess(); - * ``` - */ -export function createDeliveryProcess(options = {}) { - // Start with preset or default to libar-generic - const baseConfig = options.preset ? PRESETS[options.preset] : LIBAR_GENERIC_PRESET; - // Apply overrides - const tagPrefix = options.tagPrefix ?? baseConfig.tagPrefix; - const fileOptInTag = options.fileOptInTag ?? baseConfig.fileOptInTag; - const categories = options.categories ?? baseConfig.categories; - // Build the base registry from taxonomy constants (readonly) - const baseRegistry = buildRegistry(); - // Convert readonly arrays to mutable (buildRegistry returns readonly `as const` arrays) - const mutableBaseRegistry = { - version: baseRegistry.version, - categories: [...baseRegistry.categories].map((c) => ({ - ...c, - aliases: [...c.aliases], - })), - metadataTags: [...baseRegistry.metadataTags].map((t) => ({ - ...t, - values: t.values ? [...t.values] : undefined, - required: t.required ?? false, - repeatable: t.repeatable ?? false, - })), - aggregationTags: [...baseRegistry.aggregationTags], - formatOptions: [...baseRegistry.formatOptions], - tagPrefix: baseRegistry.tagPrefix, - fileOptInTag: baseRegistry.fileOptInTag, - }; - // Create mutable categories from preset - const mutableCategories = [...categories].map((c) => ({ - tag: c.tag, - domain: c.domain, - priority: c.priority, - description: c.description, - aliases: [...c.aliases], - })); - // Create registry with preset categories REPLACING base categories (not merging). - // This ensures libar-generic preset gets only 3 categories, not all 21 DDD categories. - const registry = { - ...mutableBaseRegistry, - tagPrefix, - fileOptInTag, - categories: mutableCategories, - }; - // Create regex builders - const regexBuilders = createRegexBuilders(tagPrefix, fileOptInTag); - return { - registry, - regexBuilders, - }; -} -//# sourceMappingURL=factory.js.map \ No newline at end of file diff --git a/dist/config/factory.js.map b/dist/config/factory.js.map deleted file mode 100644 index 85b64d3c..00000000 --- a/dist/config/factory.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"factory.js","sourceRoot":"","sources":["../../src/config/factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAIH,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,OAAO,EAAmB,MAAM,cAAc,CAAC;AAgB9E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,MAAM,UAAU,qBAAqB,CACnC,UAAwC,EAAE;IAE1C,gDAAgD;IAChD,MAAM,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC;IAEnF,kBAAkB;IAClB,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,UAAU,CAAC,SAAS,CAAC;IAC5D,MAAM,YAAY,GAAG,OAAO,CAAC,YAAY,IAAI,UAAU,CAAC,YAAY,CAAC;IACrE,MAAM,UAAU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,GAAG,CAAC,CAAC,OAAO,CAAC;KACxB,CAAC,CAAC,CAAC;IAEJ,kFAAkF;IAClF,uFAAuF;IACvF,MAAM,QAAQ,GAAgB;QAC5B,GAAG,mBAAmB;QACtB,SAAS;QACT,YAAY;QACZ,UAAU,EAAE,iBAAiB;KAC9B,CAAC;IAEF,wBAAwB;IACxB,MAAM,aAAa,GAAG,mBAAmB,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;IAEnE,OAAO;QACL,QAAQ;QACR,aAAa;KACd,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/dist/config/index.d.ts b/dist/config/index.d.ts deleted file mode 100644 index dbe69272..00000000 --- a/dist/config/index.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Configuration Module - * - * Unified project configuration for delivery-process. Use `defineConfig()` in - * `delivery-process.config.ts` to centralize taxonomy, sources, output, and - * generator overrides. - * - * @example - * ```typescript - * import { defineConfig } from '@libar-dev/delivery-process/config'; - * - * // Unified config file - * export default defineConfig({ - * preset: 'ddd-es-cqrs', - * sources: { typescript: ['src/** /*.ts'] }, - * output: { directory: 'docs-generated', overwrite: true }, - * }); - * ``` - * - * @example - * ```typescript - * import { loadProjectConfig } from '@libar-dev/delivery-process/config'; - * - * // Programmatic loading - * const result = await loadProjectConfig(process.cwd()); - * if (result.ok) { - * const { instance, project } = result.value; - * } - * ``` - */ -export { createDeliveryProcess, type CreateDeliveryProcessOptions } from './factory.js'; -export type { DeliveryProcessConfig, DeliveryProcessInstance, RegexBuilders } from './types.js'; -export { createRegexBuilders } from './regex-builders.js'; -export { DEFAULT_TAG_PREFIX, DEFAULT_FILE_OPT_IN_TAG, DEFAULT_REGEX_BUILDERS } from './defaults.js'; -export { GENERIC_PRESET, LIBAR_GENERIC_PRESET, DDD_ES_CQRS_PRESET, PRESETS, type PresetName, } from './presets.js'; -export { loadConfig, loadProjectConfig, applyProjectSourceDefaults, findConfigFile, formatConfigError, type ConfigDiscoveryResult, type ConfigLoadError, type ConfigLoadResult, type ProjectConfigLoadResult, } from './config-loader.js'; -export { loadWorkflowFromPath, loadDefaultWorkflow, formatWorkflowLoadError, type WorkflowLoadError, type LoadedWorkflow, type WorkflowConfig, } from './workflow-loader.js'; -export { defineConfig } from './define-config.js'; -export type { DeliveryProcessProjectConfig, SourcesConfig, OutputConfig, GeneratorSourceOverride, ResolvedConfig, ResolvedProjectConfig, ResolvedSourcesConfig, } from './project-config.js'; -export { DeliveryProcessProjectConfigSchema, SourcesConfigSchema, OutputConfigSchema, GeneratorSourceOverrideSchema, isProjectConfig, isLegacyInstance, } from './project-config-schema.js'; -export { resolveProjectConfig, createDefaultResolvedConfig } from './resolve-config.js'; -export { mergeSourcesForGenerator } from './merge-sources.js'; -export type { ReferenceDocConfig, DiagramScope } from '../renderable/codecs/reference.js'; -export type { ShapeSelector } from '../renderable/codecs/shape-matcher.js'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/dist/config/index.d.ts.map b/dist/config/index.d.ts.map deleted file mode 100644 index 5cdd6e06..00000000 --- a/dist/config/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAGH,OAAO,EAAE,qBAAqB,EAAE,KAAK,4BAA4B,EAAE,MAAM,cAAc,CAAC;AAGxF,YAAY,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAGhG,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAG1D,OAAO,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAGpG,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,kBAAkB,EAClB,OAAO,EACP,KAAK,UAAU,GAChB,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,UAAU,EACV,iBAAiB,EACjB,0BAA0B,EAC1B,cAAc,EACd,iBAAiB,EACjB,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,GAC7B,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,uBAAuB,EACvB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,cAAc,GACpB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,YAAY,EACV,4BAA4B,EAC5B,aAAa,EACb,YAAY,EACZ,uBAAuB,EACvB,cAAc,EACd,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,kCAAkC,EAClC,mBAAmB,EACnB,kBAAkB,EAClB,6BAA6B,EAC7B,eAAe,EACf,gBAAgB,GACjB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EAAE,oBAAoB,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAC;AACxF,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAG9D,YAAY,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAC1F,YAAY,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC"} \ No newline at end of file diff --git a/dist/config/index.js b/dist/config/index.js deleted file mode 100644 index c4938f7b..00000000 --- a/dist/config/index.js +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Configuration Module - * - * Unified project configuration for delivery-process. Use `defineConfig()` in - * `delivery-process.config.ts` to centralize taxonomy, sources, output, and - * generator overrides. - * - * @example - * ```typescript - * import { defineConfig } from '@libar-dev/delivery-process/config'; - * - * // Unified config file - * export default defineConfig({ - * preset: 'ddd-es-cqrs', - * sources: { typescript: ['src/** /*.ts'] }, - * output: { directory: 'docs-generated', overwrite: true }, - * }); - * ``` - * - * @example - * ```typescript - * import { loadProjectConfig } from '@libar-dev/delivery-process/config'; - * - * // Programmatic loading - * const result = await loadProjectConfig(process.cwd()); - * if (result.ok) { - * const { instance, project } = result.value; - * } - * ``` - */ -// Factory function -export { createDeliveryProcess } from './factory.js'; -// Regex builders (for advanced use cases) -export { createRegexBuilders } from './regex-builders.js'; -// Default constants (for internal use and backward compatibility) -export { DEFAULT_TAG_PREFIX, DEFAULT_FILE_OPT_IN_TAG, DEFAULT_REGEX_BUILDERS } from './defaults.js'; -// Presets -export { GENERIC_PRESET, LIBAR_GENERIC_PRESET, DDD_ES_CQRS_PRESET, PRESETS, } from './presets.js'; -// Config file discovery and loading -export { loadConfig, loadProjectConfig, applyProjectSourceDefaults, findConfigFile, formatConfigError, } from './config-loader.js'; -export { loadWorkflowFromPath, loadDefaultWorkflow, formatWorkflowLoadError, } from './workflow-loader.js'; -// Unified project configuration -export { defineConfig } from './define-config.js'; -export { DeliveryProcessProjectConfigSchema, SourcesConfigSchema, OutputConfigSchema, GeneratorSourceOverrideSchema, isProjectConfig, isLegacyInstance, } from './project-config-schema.js'; -// Config resolution and source merging -export { resolveProjectConfig, createDefaultResolvedConfig } from './resolve-config.js'; -export { mergeSourcesForGenerator } from './merge-sources.js'; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/config/index.js.map b/dist/config/index.js.map deleted file mode 100644 index 0103cc55..00000000 --- a/dist/config/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,mBAAmB;AACnB,OAAO,EAAE,qBAAqB,EAAqC,MAAM,cAAc,CAAC;AAKxF,0CAA0C;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE1D,kEAAkE;AAClE,OAAO,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAEpG,UAAU;AACV,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,kBAAkB,EAClB,OAAO,GAER,MAAM,cAAc,CAAC;AAEtB,oCAAoC;AACpC,OAAO,EACL,UAAU,EACV,iBAAiB,EACjB,0BAA0B,EAC1B,cAAc,EACd,iBAAiB,GAKlB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,uBAAuB,GAIxB,MAAM,sBAAsB,CAAC;AAE9B,gCAAgC;AAChC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAUlD,OAAO,EACL,kCAAkC,EAClC,mBAAmB,EACnB,kBAAkB,EAClB,6BAA6B,EAC7B,eAAe,EACf,gBAAgB,GACjB,MAAM,4BAA4B,CAAC;AAEpC,uCAAuC;AACvC,OAAO,EAAE,oBAAoB,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAC;AACxF,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC"} \ No newline at end of file diff --git a/dist/config/merge-sources.d.ts b/dist/config/merge-sources.d.ts deleted file mode 100644 index a9acd515..00000000 --- a/dist/config/merge-sources.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core @libar-docs-config - * @libar-docs-pattern SourceMerger - * @libar-docs-status active - * @libar-docs-arch-layer application - * @libar-docs-arch-context config - * @libar-docs-arch-role service - * @libar-docs-uses ProjectConfigTypes - * @libar-docs-used-by ConfigResolver - * - * ## Source Merging - * - * Computes effective sources for a specific generator by applying - * per-generator overrides to the base resolved sources. - * - * ### Override Semantics - * - * - `replaceFeatures` (non-empty): Used INSTEAD of base features - * - `additionalFeatures`: Appended to base features (ignored if `replaceFeatures` is set) - * - `additionalInput`: Appended to base TypeScript sources - * - `exclude`: Always inherited from base (no override mechanism) - * - * ### When to Use - * - * Called by the orchestrator before invoking each generator, so that - * generators like `changelog` can pull from different feature sets - * than the base config specifies. - */ -import type { GeneratorSourceOverride, ResolvedSourcesConfig } from './project-config.js'; -/** - * Computes effective sources for a specific generator by merging - * base sources with any per-generator overrides. - * - * If no override exists for the given generator, the base sources - * are returned unchanged. When an override is found: - * - * - `replaceFeatures` (non-empty array) replaces base features entirely - * - Otherwise, `additionalFeatures` are appended to base features - * - `additionalInput` is always appended to base TypeScript sources - * - `exclude` is always inherited from base (never overridden) - * - * @param base - The resolved base sources from project config - * @param generatorName - The name of the generator to resolve sources for - * @param overrides - Per-generator source override map - * @returns The effective sources for the specified generator - */ -export declare function mergeSourcesForGenerator(base: ResolvedSourcesConfig, generatorName: string, overrides: Readonly>): ResolvedSourcesConfig; -//# sourceMappingURL=merge-sources.d.ts.map \ No newline at end of file diff --git a/dist/config/merge-sources.d.ts.map b/dist/config/merge-sources.d.ts.map deleted file mode 100644 index 73da15aa..00000000 --- a/dist/config/merge-sources.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"merge-sources.d.ts","sourceRoot":"","sources":["../../src/config/merge-sources.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAE1F;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,qBAAqB,EAC3B,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAC,GAC3D,qBAAqB,CAoBvB"} \ No newline at end of file diff --git a/dist/config/merge-sources.js b/dist/config/merge-sources.js deleted file mode 100644 index 0a9937d2..00000000 --- a/dist/config/merge-sources.js +++ /dev/null @@ -1,63 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core @libar-docs-config - * @libar-docs-pattern SourceMerger - * @libar-docs-status active - * @libar-docs-arch-layer application - * @libar-docs-arch-context config - * @libar-docs-arch-role service - * @libar-docs-uses ProjectConfigTypes - * @libar-docs-used-by ConfigResolver - * - * ## Source Merging - * - * Computes effective sources for a specific generator by applying - * per-generator overrides to the base resolved sources. - * - * ### Override Semantics - * - * - `replaceFeatures` (non-empty): Used INSTEAD of base features - * - `additionalFeatures`: Appended to base features (ignored if `replaceFeatures` is set) - * - `additionalInput`: Appended to base TypeScript sources - * - `exclude`: Always inherited from base (no override mechanism) - * - * ### When to Use - * - * Called by the orchestrator before invoking each generator, so that - * generators like `changelog` can pull from different feature sets - * than the base config specifies. - */ -/** - * Computes effective sources for a specific generator by merging - * base sources with any per-generator overrides. - * - * If no override exists for the given generator, the base sources - * are returned unchanged. When an override is found: - * - * - `replaceFeatures` (non-empty array) replaces base features entirely - * - Otherwise, `additionalFeatures` are appended to base features - * - `additionalInput` is always appended to base TypeScript sources - * - `exclude` is always inherited from base (never overridden) - * - * @param base - The resolved base sources from project config - * @param generatorName - The name of the generator to resolve sources for - * @param overrides - Per-generator source override map - * @returns The effective sources for the specified generator - */ -export function mergeSourcesForGenerator(base, generatorName, overrides) { - const override = overrides[generatorName]; - if (override === undefined) { - return base; - } - // Resolve typescript: additionalInput is appended - const typescript = override.additionalInput !== undefined && override.additionalInput.length > 0 - ? [...base.typescript, ...override.additionalInput] - : base.typescript; - // replaceFeatures takes full precedence over base + additionalFeatures - if (override.replaceFeatures !== undefined && override.replaceFeatures.length > 0) { - return { typescript, features: override.replaceFeatures, exclude: base.exclude }; - } - const features = [...base.features, ...(override.additionalFeatures ?? [])]; - return { typescript, features, exclude: base.exclude }; -} -//# sourceMappingURL=merge-sources.js.map \ No newline at end of file diff --git a/dist/config/merge-sources.js.map b/dist/config/merge-sources.js.map deleted file mode 100644 index eedf3970..00000000 --- a/dist/config/merge-sources.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"merge-sources.js","sourceRoot":"","sources":["../../src/config/merge-sources.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAIH;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,wBAAwB,CACtC,IAA2B,EAC3B,aAAqB,EACrB,SAA4D;IAE5D,MAAM,QAAQ,GAAG,SAAS,CAAC,aAAa,CAAC,CAAC;IAE1C,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC3B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,kDAAkD;IAClD,MAAM,UAAU,GACd,QAAQ,CAAC,eAAe,KAAK,SAAS,IAAI,QAAQ,CAAC,eAAe,CAAC,MAAM,GAAG,CAAC;QAC3E,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,UAAU,EAAE,GAAG,QAAQ,CAAC,eAAe,CAAC;QACnD,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC;IAEtB,uEAAuE;IACvE,IAAI,QAAQ,CAAC,eAAe,KAAK,SAAS,IAAI,QAAQ,CAAC,eAAe,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAClF,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,CAAC,eAAe,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC;IACnF,CAAC;IAED,MAAM,QAAQ,GAAsB,CAAC,GAAG,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,QAAQ,CAAC,kBAAkB,IAAI,EAAE,CAAC,CAAC,CAAC;IAC/F,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC;AACzD,CAAC"} \ No newline at end of file diff --git a/dist/config/presets.d.ts b/dist/config/presets.d.ts deleted file mode 100644 index 3a22027a..00000000 --- a/dist/config/presets.d.ts +++ /dev/null @@ -1,157 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core @libar-docs-config - * @libar-docs-pattern ConfigurationPresets - * @libar-docs-status completed - * @libar-docs-arch-layer domain - * @libar-docs-arch-context config - * @libar-docs-uses ConfigurationTypes, Categories, RegistryBuilder - * @libar-docs-used-by DeliveryProcessFactory - * @libar-docs-extract-shapes GENERIC_PRESET, LIBAR_GENERIC_PRESET, DDD_ES_CQRS_PRESET, PresetName, PRESETS - * - * ## Configuration Presets - * - * Predefined configuration presets for common use cases. - * Uses `as const satisfies` for full type inference while ensuring - * configuration shape compliance. - * - * ### Available Presets - * - * - **GENERIC_PRESET**: Minimal categories with @docs- prefix for non-DDD projects - * - **LIBAR_GENERIC_PRESET**: Minimal categories with @libar-docs- prefix (for package-level config) - * - **DDD_ES_CQRS_PRESET**: Full 21-category taxonomy with @libar-docs- prefix - * - * ### When to Use - * - * - Use GENERIC_PRESET for simple documentation needs with @docs- prefix - * - Use LIBAR_GENERIC_PRESET for simple documentation needs with @libar-docs- prefix (default) - * - Use DDD_ES_CQRS_PRESET for full DDD/ES/CQRS taxonomy - * - Use as base for custom configurations - */ -import type { DeliveryProcessConfig } from './types.js'; -import { type CategoryDefinition } from '../taxonomy/categories.js'; -/** - * Generic preset for non-DDD projects. - * - * Minimal categories with @docs- prefix. Suitable for: - * - Simple documentation needs - * - Non-DDD architectures - * - Projects that want basic pattern tracking - * - * @example - * ```typescript - * import { createDeliveryProcess, GENERIC_PRESET } from '@libar-dev/delivery-process'; - * - * const dp = createDeliveryProcess({ preset: "generic" }); - * // Uses @docs-, @docs-pattern, @docs-status, etc. - * ``` - */ -export declare const GENERIC_PRESET: { - readonly tagPrefix: "@docs-"; - readonly fileOptInTag: "@docs"; - readonly categories: readonly [{ - readonly tag: "core"; - readonly domain: "Core"; - readonly priority: 1; - readonly description: "Core patterns"; - readonly aliases: readonly []; - }, { - readonly tag: "api"; - readonly domain: "API"; - readonly priority: 2; - readonly description: "Public APIs"; - readonly aliases: readonly []; - }, { - readonly tag: "infra"; - readonly domain: "Infrastructure"; - readonly priority: 3; - readonly description: "Infrastructure"; - readonly aliases: readonly ["infrastructure"]; - }]; -}; -/** - * Generic preset with @libar-docs- prefix. - * - * Same minimal categories as GENERIC_PRESET but with @libar-docs- prefix. - * This is the universal default preset for both `createDeliveryProcess()` and - * `loadConfig()` fallback. - * - * Suitable for: - * - Most projects (default choice) - * - Projects already using @libar-docs- tags - * - Package-level configuration (simplified categories, same prefix) - * - Gradual adoption without tag migration - * - * @example - * ```typescript - * import { createDeliveryProcess } from '@libar-dev/delivery-process'; - * - * // Default preset (libar-generic): - * const dp = createDeliveryProcess(); - * // Uses @libar-docs-, @libar-docs-pattern, @libar-docs-status, etc. - * // With 3 category tags: @libar-docs-core, @libar-docs-api, @libar-docs-infra - * ``` - */ -export declare const LIBAR_GENERIC_PRESET: { - readonly tagPrefix: "@libar-docs-"; - readonly fileOptInTag: "@libar-docs"; - readonly categories: readonly [{ - readonly tag: "core"; - readonly domain: "Core"; - readonly priority: 1; - readonly description: "Core patterns"; - readonly aliases: readonly []; - }, { - readonly tag: "api"; - readonly domain: "API"; - readonly priority: 2; - readonly description: "Public APIs"; - readonly aliases: readonly []; - }, { - readonly tag: "infra"; - readonly domain: "Infrastructure"; - readonly priority: 3; - readonly description: "Infrastructure"; - readonly aliases: readonly ["infrastructure"]; - }]; -}; -/** - * Full DDD/ES/CQRS preset (current @libar-dev taxonomy). - * - * Complete 21-category taxonomy with @libar-docs- prefix. Suitable for: - * - DDD architectures - * - Event sourcing projects - * - CQRS implementations - * - Full roadmap/phase tracking - * - * @example - * ```typescript - * import { createDeliveryProcess, DDD_ES_CQRS_PRESET } from '@libar-dev/delivery-process'; - * - * const dp = createDeliveryProcess({ preset: "ddd-es-cqrs" }); - * ``` - */ -export declare const DDD_ES_CQRS_PRESET: { - readonly tagPrefix: "@libar-docs-"; - readonly fileOptInTag: "@libar-docs"; - readonly categories: readonly CategoryDefinition[]; - readonly metadataTags: readonly import("../taxonomy/registry-builder.js").MetadataTagDefinitionForRegistry[]; -}; -/** - * Available preset names - */ -export type PresetName = 'generic' | 'libar-generic' | 'ddd-es-cqrs'; -/** - * Preset lookup map - * - * @example - * ```typescript - * import { PRESETS, type PresetName } from '@libar-dev/delivery-process'; - * - * function getPreset(name: PresetName) { - * return PRESETS[name]; - * } - * ``` - */ -export declare const PRESETS: Record; -//# sourceMappingURL=presets.d.ts.map \ No newline at end of file diff --git a/dist/config/presets.d.ts.map b/dist/config/presets.d.ts.map deleted file mode 100644 index 4e324675..00000000 --- a/dist/config/presets.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"presets.d.ts","sourceRoot":"","sources":["../../src/config/presets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EAAc,KAAK,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAIhF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;CA0Be,CAAC;AAE3C;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;CA0BS,CAAC;AAE3C;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,kBAAkB;;;;;CAKW,CAAC;AAE3C;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,eAAe,GAAG,aAAa,CAAC;AAErE;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,UAAU,EAAE,qBAAqB,CAI7D,CAAC"} \ No newline at end of file diff --git a/dist/config/presets.js b/dist/config/presets.js deleted file mode 100644 index ef329497..00000000 --- a/dist/config/presets.js +++ /dev/null @@ -1,166 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core @libar-docs-config - * @libar-docs-pattern ConfigurationPresets - * @libar-docs-status completed - * @libar-docs-arch-layer domain - * @libar-docs-arch-context config - * @libar-docs-uses ConfigurationTypes, Categories, RegistryBuilder - * @libar-docs-used-by DeliveryProcessFactory - * @libar-docs-extract-shapes GENERIC_PRESET, LIBAR_GENERIC_PRESET, DDD_ES_CQRS_PRESET, PresetName, PRESETS - * - * ## Configuration Presets - * - * Predefined configuration presets for common use cases. - * Uses `as const satisfies` for full type inference while ensuring - * configuration shape compliance. - * - * ### Available Presets - * - * - **GENERIC_PRESET**: Minimal categories with @docs- prefix for non-DDD projects - * - **LIBAR_GENERIC_PRESET**: Minimal categories with @libar-docs- prefix (for package-level config) - * - **DDD_ES_CQRS_PRESET**: Full 21-category taxonomy with @libar-docs- prefix - * - * ### When to Use - * - * - Use GENERIC_PRESET for simple documentation needs with @docs- prefix - * - Use LIBAR_GENERIC_PRESET for simple documentation needs with @libar-docs- prefix (default) - * - Use DDD_ES_CQRS_PRESET for full DDD/ES/CQRS taxonomy - * - Use as base for custom configurations - */ -import { CATEGORIES } from '../taxonomy/categories.js'; -import { buildRegistry } from '../taxonomy/registry-builder.js'; -import { DEFAULT_TAG_PREFIX, DEFAULT_FILE_OPT_IN_TAG } from './defaults.js'; -/** - * Generic preset for non-DDD projects. - * - * Minimal categories with @docs- prefix. Suitable for: - * - Simple documentation needs - * - Non-DDD architectures - * - Projects that want basic pattern tracking - * - * @example - * ```typescript - * import { createDeliveryProcess, GENERIC_PRESET } from '@libar-dev/delivery-process'; - * - * const dp = createDeliveryProcess({ preset: "generic" }); - * // Uses @docs-, @docs-pattern, @docs-status, etc. - * ``` - */ -export const GENERIC_PRESET = { - tagPrefix: '@docs-', - fileOptInTag: '@docs', - categories: [ - { - tag: 'core', - domain: 'Core', - priority: 1, - description: 'Core patterns', - aliases: [], - }, - { - tag: 'api', - domain: 'API', - priority: 2, - description: 'Public APIs', - aliases: [], - }, - { - tag: 'infra', - domain: 'Infrastructure', - priority: 3, - description: 'Infrastructure', - aliases: ['infrastructure'], - }, - ], -}; -/** - * Generic preset with @libar-docs- prefix. - * - * Same minimal categories as GENERIC_PRESET but with @libar-docs- prefix. - * This is the universal default preset for both `createDeliveryProcess()` and - * `loadConfig()` fallback. - * - * Suitable for: - * - Most projects (default choice) - * - Projects already using @libar-docs- tags - * - Package-level configuration (simplified categories, same prefix) - * - Gradual adoption without tag migration - * - * @example - * ```typescript - * import { createDeliveryProcess } from '@libar-dev/delivery-process'; - * - * // Default preset (libar-generic): - * const dp = createDeliveryProcess(); - * // Uses @libar-docs-, @libar-docs-pattern, @libar-docs-status, etc. - * // With 3 category tags: @libar-docs-core, @libar-docs-api, @libar-docs-infra - * ``` - */ -export const LIBAR_GENERIC_PRESET = { - tagPrefix: DEFAULT_TAG_PREFIX, - fileOptInTag: DEFAULT_FILE_OPT_IN_TAG, - categories: [ - { - tag: 'core', - domain: 'Core', - priority: 1, - description: 'Core patterns', - aliases: [], - }, - { - tag: 'api', - domain: 'API', - priority: 2, - description: 'Public APIs', - aliases: [], - }, - { - tag: 'infra', - domain: 'Infrastructure', - priority: 3, - description: 'Infrastructure', - aliases: ['infrastructure'], - }, - ], -}; -/** - * Full DDD/ES/CQRS preset (current @libar-dev taxonomy). - * - * Complete 21-category taxonomy with @libar-docs- prefix. Suitable for: - * - DDD architectures - * - Event sourcing projects - * - CQRS implementations - * - Full roadmap/phase tracking - * - * @example - * ```typescript - * import { createDeliveryProcess, DDD_ES_CQRS_PRESET } from '@libar-dev/delivery-process'; - * - * const dp = createDeliveryProcess({ preset: "ddd-es-cqrs" }); - * ``` - */ -export const DDD_ES_CQRS_PRESET = { - tagPrefix: DEFAULT_TAG_PREFIX, - fileOptInTag: DEFAULT_FILE_OPT_IN_TAG, - categories: CATEGORIES, - metadataTags: buildRegistry().metadataTags, -}; -/** - * Preset lookup map - * - * @example - * ```typescript - * import { PRESETS, type PresetName } from '@libar-dev/delivery-process'; - * - * function getPreset(name: PresetName) { - * return PRESETS[name]; - * } - * ``` - */ -export const PRESETS = { - generic: GENERIC_PRESET, - 'libar-generic': LIBAR_GENERIC_PRESET, - 'ddd-es-cqrs': DDD_ES_CQRS_PRESET, -}; -//# sourceMappingURL=presets.js.map \ No newline at end of file diff --git a/dist/config/presets.js.map b/dist/config/presets.js.map deleted file mode 100644 index 9b0298d3..00000000 --- a/dist/config/presets.js.map +++ /dev/null @@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1B,OAAO,EAAE,EAAE;SACZ;QACD;YACE,GAAG,EAAE,OAAO;YACZ,MAAM,EAAE,gBAAgB;YACxB,QAAQ,EAAE,CAAC;YACX,WAAW,EAAE,gBAAgB;YAC7B,OAAO,EAAE,CAAC,gBAAgB,CAAC;SAC5B;KAC+C;CACV,CAAC;AAE3C;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,SAAS,EAAE,kBAAkB;IAC7B,YAAY,EAAE,uBAAuB;IACrC,UAAU,EAAE,UAAU;IACtB,YAAY,EAAE,aAAa,EAAE,CAAC,YAAY;CACF,CAAC;AAO3C;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,OAAO,GAA8C;IAChE,OAAO,EAAE,cAAc;IACvB,eAAe,EAAE,oBAAoB;IACrC,aAAa,EAAE,kBAAkB;CAClC,CAAC"} \ No newline at end of file diff --git a/dist/config/project-config-schema.d.ts b/dist/config/project-config-schema.d.ts deleted file mode 100644 index 6eae81bc..00000000 --- a/dist/config/project-config-schema.d.ts +++ /dev/null @@ -1,176 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core @libar-docs-config - * @libar-docs-pattern ProjectConfigSchema - * @libar-docs-status active - * @libar-docs-arch-layer infrastructure - * @libar-docs-arch-context config - * @libar-docs-arch-role infrastructure - * @libar-docs-uses ProjectConfigTypes - * @libar-docs-used-by ConfigLoader - * - * ## Project Configuration Schema - * - * Zod validation schema for `DeliveryProcessProjectConfig`. - * Validates at load time (not at `defineConfig()` call time) - * following the Vite/Vitest identity-function convention. - * - * ### Validation Rules - * - * - At least one TypeScript source glob when `sources` is provided - * - No parent directory traversal in glob patterns (security) - * - Preset name must be one of the known presets - * - `replaceFeatures` and `additionalFeatures` are mutually exclusive - */ -import { z } from 'zod'; -import type { DeliveryProcessProjectConfig } from './project-config.js'; -import type { DeliveryProcessInstance } from './types.js'; -/** - * Schema for source file configuration. - */ -export declare const SourcesConfigSchema: z.ZodObject<{ - typescript: z.ZodReadonly>; - features: z.ZodOptional>>; - stubs: z.ZodOptional>>; - exclude: z.ZodOptional>>; -}, z.core.$strict>; -/** - * Schema for output configuration. - */ -export declare const OutputConfigSchema: z.ZodObject<{ - directory: z.ZodOptional; - overwrite: z.ZodOptional; -}, z.core.$strict>; -/** - * Schema for per-generator source overrides. - */ -export declare const GeneratorSourceOverrideSchema: z.ZodObject<{ - additionalFeatures: z.ZodOptional>>; - additionalInput: z.ZodOptional>>; - replaceFeatures: z.ZodOptional>>; - outputDirectory: z.ZodOptional; -}, z.core.$strict>; -/** - * Full project configuration schema. - * - * Validated at config load time by `loadProjectConfig()`. - * The `defineConfig()` identity function does NOT validate — - * it only provides TypeScript type checking. - */ -export declare const DeliveryProcessProjectConfigSchema: z.ZodObject<{ - preset: z.ZodOptional>; - tagPrefix: z.ZodOptional; - fileOptInTag: z.ZodOptional; - categories: z.ZodOptional>; - }, z.core.$strict>>>>; - sources: z.ZodOptional>; - features: z.ZodOptional>>; - stubs: z.ZodOptional>>; - exclude: z.ZodOptional>>; - }, z.core.$strict>>; - output: z.ZodOptional; - overwrite: z.ZodOptional; - }, z.core.$strict>>; - generators: z.ZodOptional>>; - generatorOverrides: z.ZodOptional>>; - additionalInput: z.ZodOptional>>; - replaceFeatures: z.ZodOptional>>; - outputDirectory: z.ZodOptional; - }, z.core.$strict>>>; - codecOptions: z.ZodOptional>>; - contextInferenceRules: z.ZodOptional>>>; - workflowPath: z.ZodOptional; - referenceDocConfigs: z.ZodOptional>; - shapeSources: z.ZodReadonly>; - behaviorCategories: z.ZodReadonly>; - diagramScope: z.ZodOptional>>; - patterns: z.ZodOptional>>; - include: z.ZodOptional>>; - archLayer: z.ZodOptional>>; - direction: z.ZodOptional>; - title: z.ZodOptional; - diagramType: z.ZodOptional>; - showEdgeLabels: z.ZodOptional; - source: z.ZodOptional>; - }, z.core.$strict>>; - diagramScopes: z.ZodOptional>>; - patterns: z.ZodOptional>>; - include: z.ZodOptional>>; - archLayer: z.ZodOptional>>; - direction: z.ZodOptional>; - title: z.ZodOptional; - diagramType: z.ZodOptional>; - showEdgeLabels: z.ZodOptional; - source: z.ZodOptional>; - }, z.core.$strict>>>>; - claudeMdSection: z.ZodString; - docsFilename: z.ZodString; - claudeMdFilename: z.ZodString; - shapeSelectors: z.ZodOptional, z.ZodObject<{ - source: z.ZodString; - names: z.ZodReadonly>; - }, z.core.$strict>, z.ZodObject<{ - source: z.ZodString; - }, z.core.$strict>]>>>>; - includeTags: z.ZodOptional>>; - productArea: z.ZodOptional; - }, z.core.$strict>>>>; -}, z.core.$strict>; -/** - * Type guard for raw project config objects. - * - * Used by `loadProjectConfig()` to distinguish between: - * - New-style `DeliveryProcessProjectConfig` (has `sources`, `preset`, `output`, etc.) - * - Legacy `DeliveryProcessInstance` (has `registry` + `regexBuilders`) - */ -export declare function isProjectConfig(value: unknown): value is DeliveryProcessProjectConfig; -/** - * Type guard for legacy DeliveryProcessInstance objects. - */ -export declare function isLegacyInstance(value: unknown): value is DeliveryProcessInstance; -//# sourceMappingURL=project-config-schema.d.ts.map \ No newline at end of file diff --git a/dist/config/project-config-schema.d.ts.map b/dist/config/project-config-schema.d.ts.map deleted file mode 100644 index 117dd50b..00000000 --- a/dist/config/project-config-schema.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"project-config-schema.d.ts","sourceRoot":"","sources":["../../src/config/project-config-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAkB1D;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;kBAUrB,CAAC;AAEZ;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;kBAKpB,CAAC;AAEZ;;GAEG;AACH,eAAO,MAAM,6BAA6B;;;;;kBAyBvC,CAAC;AA2EJ;;;;;;GAMG;AACH,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAyCpC,CAAC;AAEZ;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,4BAA4B,CAarF;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,uBAAuB,CAMjF"} \ No newline at end of file diff --git a/dist/config/project-config-schema.js b/dist/config/project-config-schema.js deleted file mode 100644 index c613636b..00000000 --- a/dist/config/project-config-schema.js +++ /dev/null @@ -1,225 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core @libar-docs-config - * @libar-docs-pattern ProjectConfigSchema - * @libar-docs-status active - * @libar-docs-arch-layer infrastructure - * @libar-docs-arch-context config - * @libar-docs-arch-role infrastructure - * @libar-docs-uses ProjectConfigTypes - * @libar-docs-used-by ConfigLoader - * - * ## Project Configuration Schema - * - * Zod validation schema for `DeliveryProcessProjectConfig`. - * Validates at load time (not at `defineConfig()` call time) - * following the Vite/Vitest identity-function convention. - * - * ### Validation Rules - * - * - At least one TypeScript source glob when `sources` is provided - * - No parent directory traversal in glob patterns (security) - * - Preset name must be one of the known presets - * - `replaceFeatures` and `additionalFeatures` are mutually exclusive - */ -import { z } from 'zod'; -import { DIAGRAM_SOURCE_VALUES } from '../renderable/codecs/reference.js'; -/** - * Glob pattern validation — replicates the security rules from - * `src/validation-schemas/config.ts` without importing to avoid - * circular dependencies (that module imports from types that - * depend on config). - */ -const GlobPatternSchema = z - .string() - .min(1, 'Glob pattern cannot be empty') - .refine((pattern) => !pattern.includes('..'), { - message: 'Glob patterns cannot contain parent directory traversal (..)', -}); -const GlobArraySchema = z.array(GlobPatternSchema).readonly(); -/** - * Schema for source file configuration. - */ -export const SourcesConfigSchema = z - .object({ - typescript: z - .array(GlobPatternSchema) - .min(1, 'At least one TypeScript source glob is required') - .readonly(), - features: GlobArraySchema.optional(), - stubs: GlobArraySchema.optional(), - exclude: GlobArraySchema.optional(), -}) - .strict(); -/** - * Schema for output configuration. - */ -export const OutputConfigSchema = z - .object({ - directory: z.string().min(1, 'Output directory cannot be empty').optional(), - overwrite: z.boolean().optional(), -}) - .strict(); -/** - * Schema for per-generator source overrides. - */ -export const GeneratorSourceOverrideSchema = z - .object({ - additionalFeatures: GlobArraySchema.optional(), - additionalInput: GlobArraySchema.optional(), - replaceFeatures: z - .array(GlobPatternSchema) - .min(1, 'replaceFeatures must have at least one pattern; omit the field to use base features') - .readonly() - .optional(), - outputDirectory: z.string().min(1).optional(), -}) - .strict() - .refine((override) => { - // replaceFeatures and additionalFeatures are mutually exclusive - const hasReplace = override.replaceFeatures !== undefined && override.replaceFeatures.length > 0; - const hasAdditional = override.additionalFeatures !== undefined && override.additionalFeatures.length > 0; - return !(hasReplace && hasAdditional); -}, { - message: 'replaceFeatures and additionalFeatures are mutually exclusive — use one or the other', -}); -/** - * Schema for context inference rules. - */ -const ContextInferenceRuleSchema = z - .object({ - pattern: z.string().min(1), - context: z.string().min(1), -}) - .strict(); -/** - * Known preset names. - */ -const PresetNameSchema = z.enum(['generic', 'libar-generic', 'ddd-es-cqrs']); -/** - * Schema for scoped diagram filter configuration. - * Patterns matching the filter become diagram nodes; neighbors appear with distinct style. - */ -const DiagramScopeSchema = z - .object({ - archContext: z.array(z.string().min(1)).readonly().optional(), - patterns: z.array(z.string().min(1)).readonly().optional(), - include: z.array(z.string().min(1)).readonly().optional(), - archLayer: z.array(z.string().min(1)).readonly().optional(), - direction: z.enum(['TB', 'LR']).optional(), - title: z.string().min(1).optional(), - diagramType: z - .enum(['graph', 'sequenceDiagram', 'stateDiagram-v2', 'C4Context', 'classDiagram']) - .optional(), - showEdgeLabels: z.boolean().optional(), - source: z.enum(DIAGRAM_SOURCE_VALUES).optional(), -}) - .strict(); -/** - * Schema for reference document configuration. - * Each config defines one reference document's content composition. - */ -const ReferenceDocConfigSchema = z - .object({ - title: z.string().min(1), - conventionTags: z.array(z.string().min(1)).readonly(), - shapeSources: z.array(GlobPatternSchema).readonly(), - behaviorCategories: z.array(z.string().min(1)).readonly(), - diagramScope: DiagramScopeSchema.optional(), - diagramScopes: z.array(DiagramScopeSchema).readonly().optional(), - claudeMdSection: z.string().min(1), - docsFilename: z.string().min(1), - claudeMdFilename: z.string().min(1), - // DD-6: Fine-grained shape selectors (structural discriminated union) - shapeSelectors: z - .array(z.union([ - z.object({ group: z.string().min(1) }).strict(), - z - .object({ - source: GlobPatternSchema, - names: z.array(z.string().min(1)).readonly(), - }) - .strict(), - z.object({ source: GlobPatternSchema }).strict(), - ])) - .readonly() - .optional(), - // DD-1 (CrossCuttingDocumentInclusion): Include-tag values for cross-cutting content routing - includeTags: z.array(z.string().min(1)).readonly().optional(), - // Product area filter (ADR-001): pre-filters all content sources by product area - productArea: z.string().min(1).optional(), -}) - .strict(); -/** - * Full project configuration schema. - * - * Validated at config load time by `loadProjectConfig()`. - * The `defineConfig()` identity function does NOT validate — - * it only provides TypeScript type checking. - */ -export const DeliveryProcessProjectConfigSchema = z - .object({ - // Taxonomy - preset: PresetNameSchema.optional(), - tagPrefix: z.string().min(1).optional(), - fileOptInTag: z.string().min(1).optional(), - categories: z - .array(z - .object({ - tag: z.string().min(1), - domain: z.string().min(1), - priority: z.number().int().positive(), - description: z.string(), - aliases: z.array(z.string()).readonly(), - }) - .strict()) - .readonly() - .optional(), - // Sources - sources: SourcesConfigSchema.optional(), - // Output - output: OutputConfigSchema.optional(), - // Generators - generators: z.array(z.string().min(1)).readonly().optional(), - generatorOverrides: z.record(z.string(), GeneratorSourceOverrideSchema).optional(), - // Codec Options - codecOptions: z.record(z.string(), z.record(z.string(), z.unknown())).optional(), - // Advanced - contextInferenceRules: z.array(ContextInferenceRuleSchema).readonly().optional(), - workflowPath: z.string().min(1).optional(), - // Reference Documents - referenceDocConfigs: z.array(ReferenceDocConfigSchema).readonly().optional(), -}) - .strict(); -/** - * Type guard for raw project config objects. - * - * Used by `loadProjectConfig()` to distinguish between: - * - New-style `DeliveryProcessProjectConfig` (has `sources`, `preset`, `output`, etc.) - * - Legacy `DeliveryProcessInstance` (has `registry` + `regexBuilders`) - */ -export function isProjectConfig(value) { - if (value === null || typeof value !== 'object') { - return false; - } - const obj = value; - // New-style config has at least one of these top-level fields - return ('sources' in obj || - 'preset' in obj || - 'output' in obj || - 'generators' in obj || - 'generatorOverrides' in obj); -} -/** - * Type guard for legacy DeliveryProcessInstance objects. - */ -export function isLegacyInstance(value) { - if (value === null || typeof value !== 'object') { - return false; - } - const obj = value; - return 'registry' in obj && 'regexBuilders' in obj; -} -const _schemaKeyCheck = true; -const _scalarCheck = true; -//# sourceMappingURL=project-config-schema.js.map \ No newline at end of file diff --git a/dist/config/project-config-schema.js.map b/dist/config/project-config-schema.js.map deleted file mode 100644 index f6b8a5d9..00000000 --- a/dist/config/project-config-schema.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"project-config-schema.js","sourceRoot":"","sources":["../../src/config/project-config-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAE1E;;;;;GAKG;AACH,MAAM,iBAAiB,GAAG,CAAC;KACxB,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,EAAE,8BAA8B,CAAC;KACtC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;IAC5C,OAAO,EAAE,8DAA8D;CACxE,CAAC,CAAC;AAEL,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAA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AAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAE1C,sBAAsB;IACtB,mBAAmB,EAAE,CAAC,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CAC7E,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAAC,KAAc;IAC5C,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAChD,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,GAAG,GAAG,KAAgC,CAAC;IAC7C,8DAA8D;IAC9D,OAAO,CACL,SAAS,IAAI,GAAG;QAChB,QAAQ,IAAI,GAAG;QACf,QAAQ,IAAI,GAAG;QACf,YAAY,IAAI,GAAG;QACnB,oBAAoB,IAAI,GAAG,CAC5B,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAc;IAC7C,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAChD,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,GAAG,GAAG,KAAgC,CAAC;IAC7C,OAAO,UAAU,IAAI,GAAG,IAAI,eAAe,IAAI,GAAG,CAAC;AACrD,CAAC;AAuBD,MAAM,eAAe,GAAoB,IAAI,CAAC;AAgB9C,MAAM,YAAY,GAAwB,IAAI,CAAC"} \ No newline at end of file diff --git a/dist/config/project-config.d.ts b/dist/config/project-config.d.ts deleted file mode 100644 index 3aee8667..00000000 --- a/dist/config/project-config.d.ts +++ /dev/null @@ -1,229 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core @libar-docs-config - * @libar-docs-pattern ProjectConfigTypes - * @libar-docs-status active - * @libar-docs-arch-layer domain - * @libar-docs-arch-context config - * @libar-docs-uses ConfigurationTypes, ConfigurationPresets - * @libar-docs-used-by DefineConfig, ConfigLoader - * @libar-docs-extract-shapes DeliveryProcessProjectConfig, SourcesConfig, OutputConfig, GeneratorSourceOverride, ResolvedConfig, ResolvedProjectConfig, ResolvedSourcesConfig - * - * ## Project Configuration Types - * - * Unified project configuration for the delivery-process package. - * Replaces the fragmented system where taxonomy, source discovery, - * and output config lived in three disconnected layers. - * - * ### Architecture - * - * ``` - * defineConfig() → raw DeliveryProcessProjectConfig - * ↓ - * loadProjectConfig() → validates (Zod) → resolveProjectConfig() - * ↓ - * ResolvedConfig { instance, project } - * ↓ - * mergeSourcesForGenerator() → per-generator effective sources - * ``` - * - * ### When to Use - * - * - Define project config in `delivery-process.config.ts` - * - Internal resolution via `resolveProjectConfig()` - * - CLI override merging - */ -import type { PresetName } from './presets.js'; -import type { DeliveryProcessConfig, DeliveryProcessInstance } from './types.js'; -import type { ContextInferenceRule } from '../generators/pipeline/transform-dataset.js'; -import type { ReferenceDocConfig } from '../renderable/codecs/reference.js'; -import type { CodecOptions } from '../renderable/generate.js'; -/** - * Source glob configuration for the project. - * Centralizes what previously lived in CLI --input/--features flags. - */ -export interface SourcesConfig { - /** Glob patterns for TypeScript source files (replaces --input) */ - readonly typescript: readonly string[]; - /** - * Glob patterns for Gherkin feature files (replaces --features). - * Includes both `.feature` and `.feature.md` files. - */ - readonly features?: readonly string[]; - /** - * Glob patterns for design stub files. - * Stubs are TypeScript files that live outside `src/` (e.g., `delivery-process/stubs/`). - * Merged into TypeScript sources at resolution time. - */ - readonly stubs?: readonly string[]; - /** Glob patterns to exclude from all scanning */ - readonly exclude?: readonly string[]; -} -/** - * Resolved sources config where all optional fields have been applied with defaults. - */ -export interface ResolvedSourcesConfig { - /** TypeScript source globs (includes merged stubs) */ - readonly typescript: readonly string[]; - /** Gherkin feature file globs */ - readonly features: readonly string[]; - /** Glob patterns to exclude from scanning */ - readonly exclude: readonly string[]; -} -/** - * Output configuration for generated documentation. - */ -export interface OutputConfig { - /** Output directory for generated docs (default: 'docs/architecture') */ - readonly directory?: string; - /** Overwrite existing files (default: false) */ - readonly overwrite?: boolean; -} -/** - * Generator-specific source overrides. - * - * Some generators need different sources than the base config. - * For example, `changelog` needs `decisions/*.feature` and `releases/*.feature` - * in addition to the base feature set. - * - * ### Override Semantics - * - * - `additionalFeatures` / `additionalInput`: Appended to base sources - * - `replaceFeatures`: Used INSTEAD of base features (for generators needing a different set) - * - `outputDirectory`: Override the base output directory for this generator - * - * ### Mutual Exclusivity - * - * `replaceFeatures` and `additionalFeatures` are mutually exclusive when both are - * non-empty. This constraint is enforced at runtime by the Zod `.refine()` in - * {@link GeneratorSourceOverrideSchema} (in `project-config-schema.ts`). - * - * The TypeScript type intentionally permits both fields to coexist because - * `mergeSourcesForGenerator()` treats an empty `replaceFeatures: []` as "no replace", - * falling through to `additionalFeatures`. Encoding this length-dependent semantics - * via `never` would reject valid runtime states. - */ -export interface GeneratorSourceOverride { - /** Additional feature file globs appended to base features */ - readonly additionalFeatures?: readonly string[]; - /** Additional TypeScript globs appended to base TypeScript sources */ - readonly additionalInput?: readonly string[]; - /** - * Feature globs used INSTEAD of base features. - * Mutually exclusive with non-empty `additionalFeatures`. - * @see GeneratorSourceOverrideSchema for runtime validation - */ - readonly replaceFeatures?: readonly string[]; - /** Override output directory for this generator */ - readonly outputDirectory?: string; -} -/** - * Unified project configuration for delivery-process. - * - * This is the shape users provide in `delivery-process.config.ts`. - * `defineConfig()` is an identity function providing type safety. - * - * @example - * ```typescript - * import { defineConfig } from '@libar-dev/delivery-process/config'; - * - * export default defineConfig({ - * preset: 'ddd-es-cqrs', - * sources: { - * typescript: ['packages/* /src/** /*.ts'], - * features: ['delivery-process/specs/** /*.feature'], - * stubs: ['delivery-process/stubs/** /*.ts'], - * }, - * output: { directory: 'docs-living', overwrite: true }, - * }); - * ``` - */ -export interface DeliveryProcessProjectConfig { - /** Use a preset taxonomy configuration */ - readonly preset?: PresetName; - /** Custom tag prefix (overrides preset, e.g., '@docs-') */ - readonly tagPrefix?: string; - /** Custom file opt-in tag (overrides preset, e.g., '@docs') */ - readonly fileOptInTag?: string; - /** Custom categories (replaces preset categories entirely) */ - readonly categories?: DeliveryProcessConfig['categories']; - /** Source file glob configuration */ - readonly sources?: SourcesConfig; - /** Output configuration for generated docs */ - readonly output?: OutputConfig; - /** Default generator names to run when CLI doesn't specify --generators */ - readonly generators?: readonly string[]; - /** Per-generator source and output overrides */ - readonly generatorOverrides?: Readonly>; - /** Rules for auto-inferring bounded context from file paths */ - readonly contextInferenceRules?: readonly ContextInferenceRule[]; - /** Path to custom workflow config JSON (relative to config file) */ - readonly workflowPath?: string; - /** - * Per-codec options for fine-tuning document generation. - * Keys match codec names (e.g., 'business-rules', 'patterns'). - * Passed through to codec factories at generation time. - */ - readonly codecOptions?: CodecOptions; - /** - * Reference document configurations for convention-based doc generation. - * Each config defines one reference document's content composition via - * convention tags, shape sources, behavior categories, and diagram scopes. - * - * When not specified, no reference generators are registered. - * Import `LIBAR_REFERENCE_CONFIGS` from the generators module - * to use the built-in set. - */ - readonly referenceDocConfigs?: readonly ReferenceDocConfig[]; -} -/** - * Fully resolved project configuration with all defaults applied. - */ -export interface ResolvedProjectConfig { - /** Resolved source globs (stubs merged, defaults applied) */ - readonly sources: ResolvedSourcesConfig; - /** Resolved output config with all defaults */ - readonly output: Readonly>; - /** Default generator names */ - readonly generators: readonly string[]; - /** Per-generator source overrides */ - readonly generatorOverrides: Readonly>; - /** Context inference rules (user rules prepended to defaults) */ - readonly contextInferenceRules: readonly ContextInferenceRule[]; - /** Workflow config path (null if not specified) */ - readonly workflowPath: string | null; - /** Per-codec options for document generation (empty if none) */ - readonly codecOptions?: CodecOptions; - /** Reference document configurations (empty array if none) */ - readonly referenceDocConfigs: readonly ReferenceDocConfig[]; -} -/** - * Fully resolved configuration combining the taxonomy instance - * and the project-level config. - * - * This is the primary type consumed by the orchestrator and CLIs. - * - * Discriminated union on `isDefault`: - * - `isDefault: true` means no config file was found; `configPath` is `undefined`. - * - `isDefault: false` means a config file was loaded; `configPath` is a `string`. - */ -export type ResolvedConfig = { - /** The taxonomy instance (registry + regexBuilders) */ - readonly instance: DeliveryProcessInstance; - /** The resolved project config with defaults applied */ - readonly project: ResolvedProjectConfig; - /** Config was generated from defaults (no config file found) */ - readonly isDefault: true; - /** No config file path when using defaults */ - readonly configPath?: undefined; -} | { - /** The taxonomy instance (registry + regexBuilders) */ - readonly instance: DeliveryProcessInstance; - /** The resolved project config with defaults applied */ - readonly project: ResolvedProjectConfig; - /** Config was loaded from a file */ - readonly isDefault: false; - /** Path to the config file that was loaded */ - readonly configPath: string; -}; -//# sourceMappingURL=project-config.d.ts.map \ No newline at end of file diff --git a/dist/config/project-config.d.ts.map b/dist/config/project-config.d.ts.map deleted file mode 100644 index e2ee8712..00000000 --- a/dist/config/project-config.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"project-config.d.ts","sourceRoot":"","sources":["../../src/config/project-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AACjF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AACxF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAE9D;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,mEAAmE;IACnE,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IAEvC;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAEtC;;;;OAIG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAEnC,iDAAiD;IACjD,QAAQ,CAAC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S,kBAAkB,EAAE,CAAC;CAC7D;AAED;;;;;;;;;GASG;AACH,MAAM,MAAM,cAAc,GACtB;IACE,uDAAuD;IACvD,QAAQ,CAAC,QAAQ,EAAE,uBAAuB,CAAC;IAC3C,wDAAwD;IACxD,QAAQ,CAAC,OAAO,EAAE,qBAAqB,CAAC;IACxC,gEAAgE;IAChE,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC;IACzB,8CAA8C;IAC9C,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,CAAC;CACjC,GACD;IACE,uDAAuD;IACvD,QAAQ,CAAC,QAAQ,EAAE,uBAAuB,CAAC;IAC3C,wDAAwD;IACxD,QAAQ,CAAC,OAAO,EAAE,qBAAqB,CAAC;IACxC,oCAAoC;IACpC,QAAQ,CAAC,SAAS,EAAE,KAAK,CAAC;IAC1B,8CAA8C;IAC9C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B,CAAC"} \ No newline at end of file diff --git a/dist/config/project-config.js b/dist/config/project-config.js deleted file mode 100644 index 60131006..00000000 --- a/dist/config/project-config.js +++ /dev/null @@ -1,37 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core @libar-docs-config - * @libar-docs-pattern ProjectConfigTypes - * @libar-docs-status active - * @libar-docs-arch-layer domain - * @libar-docs-arch-context config - * @libar-docs-uses ConfigurationTypes, ConfigurationPresets - * @libar-docs-used-by DefineConfig, ConfigLoader - * @libar-docs-extract-shapes DeliveryProcessProjectConfig, SourcesConfig, OutputConfig, GeneratorSourceOverride, ResolvedConfig, ResolvedProjectConfig, ResolvedSourcesConfig - * - * ## Project Configuration Types - * - * Unified project configuration for the delivery-process package. - * Replaces the fragmented system where taxonomy, source discovery, - * and output config lived in three disconnected layers. - * - * ### Architecture - * - * ``` - * defineConfig() → raw DeliveryProcessProjectConfig - * ↓ - * loadProjectConfig() → validates (Zod) → resolveProjectConfig() - * ↓ - * ResolvedConfig { instance, project } - * ↓ - * mergeSourcesForGenerator() → per-generator effective sources - * ``` - * - * ### When to Use - * - * - Define project config in `delivery-process.config.ts` - * - Internal resolution via `resolveProjectConfig()` - * - CLI override merging - */ -export {}; -//# sourceMappingURL=project-config.js.map \ No newline at end of file diff --git a/dist/config/project-config.js.map b/dist/config/project-config.js.map deleted file mode 100644 index 7fc280bf..00000000 --- a/dist/config/project-config.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"project-config.js","sourceRoot":"","sources":["../../src/config/project-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG"} \ No newline at end of file diff --git a/dist/config/regex-builders.d.ts b/dist/config/regex-builders.d.ts deleted file mode 100644 index d39bc869..00000000 --- a/dist/config/regex-builders.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core @libar-docs-config - * @libar-docs-pattern RegexBuilders - * @libar-docs-status completed - * @libar-docs-arch-layer infrastructure - * @libar-docs-arch-context config - * @libar-docs-arch-role infrastructure - * @libar-docs-uses ConfigurationTypes - * @libar-docs-used-by DeliveryProcessFactory - * @libar-docs-extract-shapes createRegexBuilders - * - * ## Regex Builders - * - * Type-safe regex factory functions for tag detection and normalization. - * Creates regex patterns based on configured tag prefix. - * - * ### When to Use - * - * - When creating a new delivery process instance - * - When detecting doc directives in source code - * - When normalizing tags for comparison - */ -import type { RegexBuilders } from './types.js'; -export type { RegexBuilders } from './types.js'; -/** - * Creates type-safe regex builders for a given tag prefix configuration. - * These are used throughout the scanner and validation pipeline. - * - * @param tagPrefix - The tag prefix (e.g., "@docs-" or "@libar-docs-") - * @param fileOptInTag - The file opt-in tag (e.g., "@docs" or "@libar-docs") - * @returns RegexBuilders instance with pattern matching methods - * - * @example - * ```typescript - * const builders = createRegexBuilders("@docs-", "@docs"); - * - * // Check for file opt-in - * if (builders.hasFileOptIn(sourceCode)) { - * console.log("File has @docs marker"); - * } - * - * // Normalize a tag - * const normalized = builders.normalizeTag("@docs-pattern"); - * // Returns: "pattern" - * ``` - */ -export declare function createRegexBuilders(tagPrefix: string, fileOptInTag: string): RegexBuilders; -//# sourceMappingURL=regex-builders.d.ts.map \ No newline at end of file diff --git a/dist/config/regex-builders.d.ts.map b/dist/config/regex-builders.d.ts.map deleted file mode 100644 index d1094d22..00000000 --- a/dist/config/regex-builders.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"regex-builders.d.ts","sourceRoot":"","sources":["../../src/config/regex-builders.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAGhD,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAYhD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,aAAa,CAoC1F"} \ No newline at end of file diff --git a/dist/config/regex-builders.js b/dist/config/regex-builders.js deleted file mode 100644 index aae57306..00000000 --- a/dist/config/regex-builders.js +++ /dev/null @@ -1,85 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core @libar-docs-config - * @libar-docs-pattern RegexBuilders - * @libar-docs-status completed - * @libar-docs-arch-layer infrastructure - * @libar-docs-arch-context config - * @libar-docs-arch-role infrastructure - * @libar-docs-uses ConfigurationTypes - * @libar-docs-used-by DeliveryProcessFactory - * @libar-docs-extract-shapes createRegexBuilders - * - * ## Regex Builders - * - * Type-safe regex factory functions for tag detection and normalization. - * Creates regex patterns based on configured tag prefix. - * - * ### When to Use - * - * - When creating a new delivery process instance - * - When detecting doc directives in source code - * - When normalizing tags for comparison - */ -/** - * Escapes special regex characters in a string - * - * @param str - String to escape - * @returns Escaped string safe for regex - */ -function escapeRegex(str) { - return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); -} -/** - * Creates type-safe regex builders for a given tag prefix configuration. - * These are used throughout the scanner and validation pipeline. - * - * @param tagPrefix - The tag prefix (e.g., "@docs-" or "@libar-docs-") - * @param fileOptInTag - The file opt-in tag (e.g., "@docs" or "@libar-docs") - * @returns RegexBuilders instance with pattern matching methods - * - * @example - * ```typescript - * const builders = createRegexBuilders("@docs-", "@docs"); - * - * // Check for file opt-in - * if (builders.hasFileOptIn(sourceCode)) { - * console.log("File has @docs marker"); - * } - * - * // Normalize a tag - * const normalized = builders.normalizeTag("@docs-pattern"); - * // Returns: "pattern" - * ``` - */ -export function createRegexBuilders(tagPrefix, fileOptInTag) { - const escapedPrefix = escapeRegex(tagPrefix); - const escapedOptIn = escapeRegex(fileOptInTag); - // Match file-level opt-in: /** @docs */ (not followed by -) - // This ensures @docs is not confused with @docs-pattern - const fileOptInPattern = new RegExp(`\\/\\*\\*[\\s\\S]*?${escapedOptIn}(?!-)[\\s\\S]*?\\*\\/`); - // Match directives: @docs-pattern, @docs-status, etc. - const directivePattern = new RegExp(`${escapedPrefix}[\\w-]+`, 'g'); - // For normalizing tags - remove @ and prefix - const prefixWithoutAt = tagPrefix.startsWith('@') ? tagPrefix.substring(1) : tagPrefix; - return { - fileOptInPattern, - directivePattern, - hasFileOptIn(content) { - return fileOptInPattern.test(content); - }, - hasDocDirectives(content) { - // Reset lastIndex to handle global regex state - directivePattern.lastIndex = 0; - return directivePattern.test(content); - }, - normalizeTag(tag) { - let normalized = tag.startsWith('@') ? tag.substring(1) : tag; - if (normalized.startsWith(prefixWithoutAt)) { - normalized = normalized.substring(prefixWithoutAt.length); - } - return normalized; - }, - }; -} -//# sourceMappingURL=regex-builders.js.map \ No newline at end of file diff --git a/dist/config/regex-builders.js.map b/dist/config/regex-builders.js.map deleted file mode 100644 index c124bf4c..00000000 --- a/dist/config/regex-builders.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"regex-builders.js","sourceRoot":"","sources":["../../src/config/regex-builders.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAOH;;;;;GAKG;AACH,S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AS,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;YAC5D,CAAC;YACD,OAAO,UAAU,CAAC;QACpB,CAAC;KACF,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/dist/config/resolve-config.d.ts b/dist/config/resolve-config.d.ts deleted file mode 100644 index 6e3bc7c9..00000000 --- a/dist/config/resolve-config.d.ts +++ /dev/null @@ -1,65 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core @libar-docs-config - * @libar-docs-pattern ConfigResolver - * @libar-docs-status active - * @libar-docs-arch-layer application - * @libar-docs-arch-context config - * @libar-docs-arch-role service - * @libar-docs-uses ProjectConfigTypes, DeliveryProcessFactory, ConfigurationDefaults - * @libar-docs-used-by ConfigLoader - * - * ## Config Resolution - * - * Resolves a raw `DeliveryProcessProjectConfig` into a fully-resolved `ResolvedConfig` - * with all defaults applied, stubs merged into TypeScript sources, and context inference - * rules prepended to defaults. - * - * ### Architecture - * - * ``` - * DeliveryProcessProjectConfig (user-authored) - * | - * v - * resolveProjectConfig() -- creates instance, merges sources, applies defaults - * | - * v - * ResolvedConfig { instance, project, isDefault, configPath } - * ``` - * - * ### When to Use - * - * - Called by `loadProjectConfig()` after Zod validation succeeds - * - Called directly in tests to resolve a config without file I/O - * - `createDefaultResolvedConfig()` provides a fallback when no config file exists - */ -import type { DeliveryProcessProjectConfig, ResolvedConfig } from './project-config.js'; -/** - * Resolves a raw project config into a fully-resolved config with all defaults applied. - * - * Resolution steps: - * 1. Create taxonomy instance from preset/override fields - * 2. Merge stub globs into TypeScript sources - * 3. Apply output defaults (directory, overwrite) - * 4. Default generators to `['patterns']` - * 5. Prepend user context inference rules before defaults - * 6. Carry forward remaining fields with defaults - * - * @param raw - The raw project configuration (post-Zod validation) - * @param options - Optional resolution options - * @returns Fully resolved configuration ready for use by orchestrator and CLIs - */ -export declare function resolveProjectConfig(raw: DeliveryProcessProjectConfig, options: { - readonly configPath: string; -}): ResolvedConfig; -/** - * Creates a default resolved config for when no config file is found. - * - * Uses the libar-generic preset with empty sources and standard defaults. - * The `isDefault` flag is set to `true` so consumers can detect that - * no user config was loaded. - * - * @returns A default ResolvedConfig with empty sources and standard defaults - */ -export declare function createDefaultResolvedConfig(): ResolvedConfig; -//# sourceMappingURL=resolve-config.d.ts.map \ No newline at end of file diff --git a/dist/config/resolve-config.d.ts.map b/dist/config/resolve-config.d.ts.map deleted file mode 100644 index 08b2e9e6..00000000 --- a/dist/config/resolve-config.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"resolve-config.d.ts","sourceRoot":"","sources":["../../src/config/resolve-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAGH,OAAO,KAAK,EACV,4BAA4B,EAE5B,cAAc,EAGf,MAAM,qBAAqB,CAAC;AAM7B;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,4BAA4B,EACjC,OAAO,EAAE;IAAE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GACvC,cAAc,CAuEhB;AAED;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,IAAI,cAAc,CA4B5D"} \ No newline at end of file diff --git a/dist/config/resolve-config.js b/dist/config/resolve-config.js deleted file mode 100644 index e911cb83..00000000 --- a/dist/config/resolve-config.js +++ /dev/null @@ -1,150 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core @libar-docs-config - * @libar-docs-pattern ConfigResolver - * @libar-docs-status active - * @libar-docs-arch-layer application - * @libar-docs-arch-context config - * @libar-docs-arch-role service - * @libar-docs-uses ProjectConfigTypes, DeliveryProcessFactory, ConfigurationDefaults - * @libar-docs-used-by ConfigLoader - * - * ## Config Resolution - * - * Resolves a raw `DeliveryProcessProjectConfig` into a fully-resolved `ResolvedConfig` - * with all defaults applied, stubs merged into TypeScript sources, and context inference - * rules prepended to defaults. - * - * ### Architecture - * - * ``` - * DeliveryProcessProjectConfig (user-authored) - * | - * v - * resolveProjectConfig() -- creates instance, merges sources, applies defaults - * | - * v - * ResolvedConfig { instance, project, isDefault, configPath } - * ``` - * - * ### When to Use - * - * - Called by `loadProjectConfig()` after Zod validation succeeds - * - Called directly in tests to resolve a config without file I/O - * - `createDefaultResolvedConfig()` provides a fallback when no config file exists - */ -import { DEFAULT_CONTEXT_INFERENCE_RULES } from './defaults.js'; -import { createDeliveryProcess } from './factory.js'; -/** - * Resolves a raw project config into a fully-resolved config with all defaults applied. - * - * Resolution steps: - * 1. Create taxonomy instance from preset/override fields - * 2. Merge stub globs into TypeScript sources - * 3. Apply output defaults (directory, overwrite) - * 4. Default generators to `['patterns']` - * 5. Prepend user context inference rules before defaults - * 6. Carry forward remaining fields with defaults - * - * @param raw - The raw project configuration (post-Zod validation) - * @param options - Optional resolution options - * @returns Fully resolved configuration ready for use by orchestrator and CLIs - */ -export function resolveProjectConfig(raw, options) { - // 1. Create taxonomy instance from preset/override fields - const instanceOptions = {}; - if (raw.preset !== undefined) { - instanceOptions.preset = raw.preset; - } - if (raw.tagPrefix !== undefined) { - instanceOptions.tagPrefix = raw.tagPrefix; - } - if (raw.fileOptInTag !== undefined) { - instanceOptions.fileOptInTag = raw.fileOptInTag; - } - if (raw.categories !== undefined) { - instanceOptions.categories = raw.categories; - } - const instance = createDeliveryProcess(instanceOptions); - // 2. Resolve sources — merge stubs into typescript - const typescript = [ - ...(raw.sources?.typescript ?? []), - ...(raw.sources?.stubs ?? []), - ]; - const features = raw.sources?.features ?? []; - const exclude = raw.sources?.exclude ?? []; - const sources = { - typescript, - features, - exclude, - }; - // 3. Resolve output — apply defaults - const output = { - directory: raw.output?.directory ?? 'docs/architecture', - overwrite: raw.output?.overwrite ?? false, - }; - // 4. Resolve generators — default to ['patterns'] - const generators = raw.generators ?? ['patterns']; - // 5. Resolve context inference rules — prepend user rules to defaults - const contextInferenceRules = [ - ...(raw.contextInferenceRules ?? []), - ...DEFAULT_CONTEXT_INFERENCE_RULES, - ]; - // 6. Copy remaining fields with defaults - const generatorOverrides = raw.generatorOverrides ?? {}; - const workflowPath = raw.workflowPath ?? null; - // 7. Reference document configs (explicit opt-in, empty by default) - const referenceDocConfigs = raw.referenceDocConfigs ?? []; - const project = { - sources, - output, - generators, - generatorOverrides, - contextInferenceRules, - workflowPath, - ...(raw.codecOptions !== undefined && { codecOptions: raw.codecOptions }), - referenceDocConfigs, - }; - return { - instance, - project, - isDefault: false, - configPath: options.configPath, - }; -} -/** - * Creates a default resolved config for when no config file is found. - * - * Uses the libar-generic preset with empty sources and standard defaults. - * The `isDefault` flag is set to `true` so consumers can detect that - * no user config was loaded. - * - * @returns A default ResolvedConfig with empty sources and standard defaults - */ -export function createDefaultResolvedConfig() { - const instance = createDeliveryProcess(); - const sources = { - typescript: [], - features: [], - exclude: [], - }; - const project = { - sources, - output: { - directory: 'docs/architecture', - overwrite: false, - }, - generators: ['patterns'], - generatorOverrides: {}, - contextInferenceRules: [...DEFAULT_CONTEXT_INFERENCE_RULES], - workflowPath: null, - referenceDocConfigs: [], - }; - return { - instance, - project, - isDefault: true, - configPath: undefined, - }; -} -//# sourceMappingURL=resolve-config.js.map \ No newline at end of file diff --git a/dist/config/resolve-config.js.map b/dist/config/resolve-config.js.map deleted file mode 100644 index d0ac239c..00000000 --- a/dist/config/resolve-config.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"resolve-config.js","sourceRoot":"","sources":["../../src/config/resolve-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAYH,OAAO,EAAE,+BAA+B,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAqC,MAAM,cAAc,CAAC;AAExF;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,oBAAoB,CAClC,GAAiC,EACjC,OAAwC;IAExC,0DAA0D;IAC1D,MAAM,eAAe,GAAiC,EAAE,CAAC;IACzD,IAAI,GAAG,CAAC,MAAM,KAAK,SAAS,EAAE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of file diff --git a/dist/config/tag-taxonomy-generator.d.ts b/dist/config/tag-taxonomy-generator.d.ts deleted file mode 100644 index 8e706ac5..00000000 --- a/dist/config/tag-taxonomy-generator.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Tag Taxonomy Generator - * - * Generates TAG_TAXONOMY.md from tag registry configuration. - * Produces comprehensive markdown documentation showing: - * - File opt-in tag - * - Category tags (sorted by priority) - * - Metadata tags (with format, purpose, examples) - * - Aggregation tags (with target documents) - * - Format options for templates - */ -import type { TagRegistry } from '../validation-schemas/index.js'; -/** - * Configuration for tag taxonomy generation - */ -export interface TagTaxonomyConfig { - /** Optional title override (default: "Tag Taxonomy Reference") */ - readonly title?: string; - /** Optional source path to reference in header */ - readonly sourcePath?: string; -} -/** - * Generate TAG_TAXONOMY.md content from tag registry - * - * @param registry - The tag registry containing all tag definitions - * @param config - Optional configuration for title and source path - * @returns Markdown content for TAG_TAXONOMY.md - */ -export declare function generateTagTaxonomy(registry: TagRegistry, config?: TagTaxonomyConfig): string; -//# sourceMappingURL=tag-taxonomy-generator.d.ts.map \ No newline at end of file diff --git a/dist/config/tag-taxonomy-generator.d.ts.map b/dist/config/tag-taxonomy-generator.d.ts.map deleted file mode 100644 index c2ede4d7..00000000 --- a/dist/config/tag-taxonomy-generator.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"tag-taxonomy-generator.d.ts","sourceRoot":"","sources":["../../src/config/tag-taxonomy-generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAElE;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,kEAAkE;IAClE,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,kDAAkD;IAClD,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,WAAW,EAAE,MAAM,CAAC,EAAE,iBAAiB,GAAG,MAAM,CAqF7F"} \ No newline at end of file diff --git a/dist/config/tag-taxonomy-generator.js b/dist/config/tag-taxonomy-generator.js deleted file mode 100644 index 948b7d8f..00000000 --- a/dist/config/tag-taxonomy-generator.js +++ /dev/null @@ -1,87 +0,0 @@ -/** - * Tag Taxonomy Generator - * - * Generates TAG_TAXONOMY.md from tag registry configuration. - * Produces comprehensive markdown documentation showing: - * - File opt-in tag - * - Category tags (sorted by priority) - * - Metadata tags (with format, purpose, examples) - * - Aggregation tags (with target documents) - * - Format options for templates - */ -/** - * Generate TAG_TAXONOMY.md content from tag registry - * - * @param registry - The tag registry containing all tag definitions - * @param config - Optional configuration for title and source path - * @returns Markdown content for TAG_TAXONOMY.md - */ -export function generateTagTaxonomy(registry, config) { - const title = config?.title ?? 'Tag Taxonomy Reference'; - const sourceRef = config?.sourcePath ? `\`${config.sourcePath}\`` : 'tag registry'; - const sections = []; - // Header - sections.push(`# ${title}`); - sections.push(''); - sections.push(`> ⚠️ **Auto-generated from ${sourceRef}** - Do not edit manually.`); - sections.push(''); - // File Opt-In - sections.push('## File Opt-In'); - sections.push(''); - sections.push('All files must have this tag at the top to be included in documentation extraction:'); - sections.push(''); - sections.push('| Tag | Purpose |'); - sections.push('|-----|---------|'); - sections.push(`| \`${registry.fileOptInTag}\` | Gates extraction - file must have this tag |`); - sections.push(''); - // Category Tags - sections.push('## Category Tags'); - sections.push(''); - sections.push('Sorted by priority (lower number = higher priority):'); - sections.push(''); - sections.push('| Priority | Tag | Domain | Description |'); - sections.push('|----------|-----|--------|-------------|'); - const sortedCategories = [...registry.categories].sort((a, b) => a.priority - b.priority); - for (const cat of sortedCategories) { - const tag = `${registry.tagPrefix}${cat.tag}`; - const aliases = cat.aliases.length > 0 - ? ` (aliases: ${cat.aliases.map((a) => `\`${registry.tagPrefix}${a}\``).join(', ')})` - : ''; - sections.push(`| ${cat.priority} | \`${tag}\`${aliases} | ${cat.domain} | ${cat.description} |`); - } - sections.push(''); - // Metadata Tags - sections.push('## Metadata Tags'); - sections.push(''); - sections.push('| Tag | Format | Purpose | Required | Example |'); - sections.push('|-----|--------|---------|----------|---------|'); - for (const meta of registry.metadataTags) { - const tag = `${registry.tagPrefix}${meta.tag}`; - const required = meta.required ? 'Yes' : 'No'; - const example = meta.example ?? `${tag} `; - sections.push(`| \`${tag}\` | ${meta.format} | ${meta.purpose} | ${required} | \`${example}\` |`); - } - sections.push(''); - // Aggregation Tags - sections.push('## Aggregation Tags'); - sections.push(''); - sections.push('| Tag | Target Document | Purpose |'); - sections.push('|-----|-----------------|---------|'); - for (const agg of registry.aggregationTags) { - const tag = `${registry.tagPrefix}${agg.tag}`; - const targetDoc = agg.targetDoc ?? '(template placeholder only)'; - sections.push(`| \`${tag}\` | ${targetDoc} | ${agg.purpose} |`); - } - sections.push(''); - // Format Options - sections.push('## Format Options'); - sections.push(''); - sections.push('Used in template placeholders: `{{@libar-docs-core format=X}}`'); - sections.push(''); - for (const fmt of registry.formatOptions) { - sections.push(`- \`${fmt}\``); - } - sections.push(''); - return sections.join('\n'); -} -//# sourceMappingURL=tag-taxonomy-generator.js.map \ No newline at end of file diff --git a/dist/config/tag-taxonomy-generator.js.map b/dist/config/tag-taxonomy-generator.js.map deleted file mode 100644 index e7fd4229..00000000 --- a/dist/config/tag-taxonomy-generator.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"tag-taxonomy-generator.js","sourceRoot":"","sources":["../../src/config/tag-taxonomy-generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAcH;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CAAC,QAAqB,EAAE,MAA0B;IACnF,MAAM,KAAK,GAAG,MAAM,EAAE,KAAK,IAAI,wBAAwB,CAAC;IACxD,MAAM,SAAS,GAAG,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,UAAU,IAAI,CAAC,CAAC,CAAC,cAAc,CA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 708c3c9b..00000000 --- a/dist/config/types.d.ts +++ /dev/null @@ -1,81 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core @libar-docs-config - * @libar-docs-pattern ConfigurationTypes - * @libar-docs-status completed - * @libar-docs-arch-layer domain - * @libar-docs-arch-context config - * @libar-docs-extract-shapes DeliveryProcessConfig, DeliveryProcessInstance, RegexBuilders - * - * ## Configuration Types - * - * Type definitions for the delivery process configuration system. - * Provides fully type-safe configuration with generics to preserve literal types from presets. - * - * ### When to Use - * - * - When defining custom presets or configurations - * - When creating type-safe factory functions - * - When extending the configuration system - */ -import type { TagRegistry } from '../validation-schemas/tag-registry.js'; -import type { CategoryDefinition } from '../taxonomy/categories.js'; -import type { MetadataTagDefinitionForRegistry } from '../taxonomy/registry-builder.js'; -import type { ContextInferenceRule } from '../generators/pipeline/transform-dataset.js'; -/** - * Configuration for creating a delivery process instance. - * Uses generics to preserve literal types from presets. - */ -export interface DeliveryProcessConfig { - /** Tag prefix for directives (e.g., "@docs-" or "@libar-docs-") */ - readonly tagPrefix: string; - /** File-level opt-in tag (e.g., "@docs" or "@libar-docs") */ - readonly fileOptInTag: string; - /** Category definitions for pattern classification */ - readonly categories: readonly CategoryDefinition[]; - /** Optional metadata tag definitions */ - readonly metadataTags?: readonly MetadataTagDefinitionForRegistry[]; - /** - * Optional context inference rules for auto-inferring bounded context from file paths. - * - * When provided, these rules are merged with the default rules. User-provided rules - * take precedence over defaults (applied first in the rule list). - * - * @example - * ```typescript - * contextInferenceRules: [ - * { pattern: 'packages/orders/**', context: 'orders' }, - * { pattern: 'packages/inventory/**', context: 'inventory' }, - * ] - * ``` - */ - readonly contextInferenceRules?: readonly ContextInferenceRule[]; -} -/** - * Instance returned by createDeliveryProcess with configured registry - */ -export interface DeliveryProcessInstance { - /** The fully configured tag registry */ - readonly registry: TagRegistry; - /** Regex builders for tag detection */ - readonly regexBuilders: RegexBuilders; -} -/** - * Regex builders for tag detection - * - * Provides type-safe regex operations for detecting and normalizing tags - * based on the configured tag prefix. - */ -export interface RegexBuilders { - /** Pattern to match file-level opt-in (e.g., /** @docs *\/) */ - readonly fileOptInPattern: RegExp; - /** Pattern to match directives (e.g., @docs-pattern, @docs-status) */ - readonly directivePattern: RegExp; - /** Check if content has the file-level opt-in marker */ - hasFileOptIn(content: string): boolean; - /** Check if content has any doc directives */ - hasDocDirectives(content: string): boolean; - /** Normalize a tag by removing @ and prefix (e.g., "@docs-pattern" -> "pattern") */ - normalizeTag(tag: string): string; -} -//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/dist/config/types.d.ts.map b/dist/config/types.d.ts.map deleted file mode 100644 index 405af9b0..00000000 --- a/dist/config/types.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/config/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AACzE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,iCAAiC,CAAC;AACxF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AAExF;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,mEAAmE;IACnE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,6DAA6D;IAC7D,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,sDAAsD;IACtD,QAAQ,CAAC,UAAU,EAAE,SAAS,kBAAkB,EAAE,CAAC;IACnD,wCAAwC;IACxC,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,gCAAgC,EAAE,CAAC;IACpE;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,qBAAqB,CAAC,EAAE,SAAS,oBAAoB,EAAE,CAAC;CAClE;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,wCAAwC;IACxC,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC;IAC/B,uCAAuC;IACvC,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;CACvC;AAED;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B,+DAA+D;IAC/D,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,sEAAsE;IACtE,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,wDAAwD;IACxD,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;IACvC,8CAA8C;IAC9C,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3C,oFAAoF;IACpF,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACnC"} \ No newline at end of file diff --git a/dist/config/types.js b/dist/config/types.js deleted file mode 100644 index 3a062ec2..00000000 --- a/dist/config/types.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core @libar-docs-config - * @libar-docs-pattern ConfigurationTypes - * @libar-docs-status completed - * @libar-docs-arch-layer domain - * @libar-docs-arch-context config - * @libar-docs-extract-shapes DeliveryProcessConfig, DeliveryProcessInstance, RegexBuilders - * - * ## Configuration Types - * - * Type definitions for the delivery process configuration system. - * Provides fully type-safe configuration with generics to preserve literal types from presets. - * - * ### When to Use - * - * - When defining custom presets or configurations - * - When creating type-safe factory functions - * - When extending the configuration system - */ -export {}; -//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/dist/config/types.js.map b/dist/config/types.js.map deleted file mode 100644 index 9dd92605..00000000 --- a/dist/config/types.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/config/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG"} \ No newline at end of file diff --git a/dist/config/workflow-loader.d.ts b/dist/config/workflow-loader.d.ts deleted file mode 100644 index 37713051..00000000 --- a/dist/config/workflow-loader.d.ts +++ /dev/null @@ -1,90 +0,0 @@ -/** - * @libar-docs - * @libar-docs-config - * @libar-docs-pattern WorkflowLoader - * @libar-docs-status completed - * @libar-docs-arch-layer infrastructure - * @libar-docs-arch-context config - * @libar-docs-arch-role infrastructure - * @libar-docs-uses WorkflowConfigSchema, CodecUtils - * @libar-docs-used-by GeneratorOrchestrator, SectionHelpers - * - * ## WorkflowLoader - Workflow Configuration Loading - * - * Provides the default 6-phase workflow as an inline constant and loads - * custom workflow overrides from JSON files via `--workflow `. - * - * ### When to Use - * - * - Use `loadDefaultWorkflow()` at pipeline startup (synchronous, infallible) - * - Use `loadWorkflowFromPath()` for custom `--workflow ` overrides - */ -import { Result } from '../types/result.js'; -import { type LoadedWorkflow, type WorkflowConfig } from '../validation-schemas/workflow-config.js'; -/** - * Workflow load error - * - * Describes why workflow loading failed, with detailed validation errors - * if the failure was due to invalid schema. - */ -export interface WorkflowLoadError { - /** Error type identifier */ - type: 'workflow-load-error'; - /** Path or name of the workflow that failed to load */ - source: string; - /** Human-readable error message */ - message: string; - /** Detailed Zod validation errors if schema validation failed */ - validationErrors?: string[]; -} -/** - * Load workflow configuration from a specific file path - * - * @param configPath - Absolute or relative path to workflow JSON file - * @param source - Source identifier for error messages (defaults to path) - * @returns Result with LoadedWorkflow or error details - * - * @example - * ```typescript - * const result = await loadWorkflowFromPath("/path/to/custom-workflow.json"); - * if (result.ok) { - * const workflow = result.value; - * } - * ``` - */ -export declare function loadWorkflowFromPath(configPath: string, source?: string): Promise>; -/** - * Load the default workflow (6-phase-standard) - * - * Returns the standard USDP 6-phase workflow from an inline constant. - * Synchronous and infallible — no file I/O, no error handling needed. - * - * DD-4: Returns LoadedWorkflow synchronously (not Promise). - * - * @returns LoadedWorkflow for 6-phase-standard - * - * @example - * ```typescript - * const workflow = loadDefaultWorkflow(); - * const emoji = workflow.statusMap.get("completed")?.emoji; // "\u2705" - * ``` - */ -export declare function loadDefaultWorkflow(): LoadedWorkflow; -/** - * Format workflow load error for console display - * - * @param error - Workflow load error - * @returns Formatted error message for console output - * - * @example - * ```typescript - * const result = await loadWorkflowFromPath("/path/to/custom.json"); - * if (!result.ok) { - * console.error(formatWorkflowLoadError(result.error)); - * process.exit(1); - * } - * ``` - */ -export declare function formatWorkflowLoadError(error: WorkflowLoadError): string; -export type { LoadedWorkflow, WorkflowConfig }; -//# sourceMappingURL=workflow-loader.d.ts.map \ No newline at end of file diff --git a/dist/config/workflow-loader.d.ts.map b/dist/config/workflow-loader.d.ts.map deleted file mode 100644 index 5ec2a70b..00000000 --- a/dist/config/workflow-loader.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"workflow-loader.d.ts","sourceRoot":"","sources":["../../src/config/workflow-loader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,cAAc,EACpB,MAAM,0CAA0C,CAAC;AAQlD;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC,4BAA4B;IAC5B,IAAI,EAAE,qBAAqB,CAAC;IAC5B,uDAAuD;IACvD,MAAM,EAAE,MAAM,CAAC;IACf,mCAAmC;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,iEAAiE;IACjE,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC7B;AAkCD;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,oBAAoB,CACxC,UAAU,EAAE,MAAM,EAClB,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,CAAC,CAqDpD;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,mBAAmB,IAAI,cAAc,CAEpD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,CASxE;AAGD,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,CAAC"} \ No newline at end of file diff --git a/dist/config/workflow-loader.js b/dist/config/workflow-loader.js deleted file mode 100644 index ad6f449c..00000000 --- a/dist/config/workflow-loader.js +++ /dev/null @@ -1,167 +0,0 @@ -/** - * @libar-docs - * @libar-docs-config - * @libar-docs-pattern WorkflowLoader - * @libar-docs-status completed - * @libar-docs-arch-layer infrastructure - * @libar-docs-arch-context config - * @libar-docs-arch-role infrastructure - * @libar-docs-uses WorkflowConfigSchema, CodecUtils - * @libar-docs-used-by GeneratorOrchestrator, SectionHelpers - * - * ## WorkflowLoader - Workflow Configuration Loading - * - * Provides the default 6-phase workflow as an inline constant and loads - * custom workflow overrides from JSON files via `--workflow `. - * - * ### When to Use - * - * - Use `loadDefaultWorkflow()` at pipeline startup (synchronous, infallible) - * - Use `loadWorkflowFromPath()` for custom `--workflow ` overrides - */ -import * as fs from 'fs/promises'; -import { Result } from '../types/result.js'; -import { WorkflowConfigSchema, createLoadedWorkflow, } from '../validation-schemas/workflow-config.js'; -import { createJsonInputCodec } from '../validation-schemas/codec-utils.js'; -/** - * Codec for parsing and validating workflow configuration JSON - */ -const WorkflowConfigCodec = createJsonInputCodec(WorkflowConfigSchema); -/** - * Default workflow configuration (6-phase USDP standard) - * - * Inline constant using the 4 canonical statuses from ADR-001. - * Replaces the deleted catalogue/workflows/6-phase-standard.json. - * - * DD-1: Inline constant in workflow-loader.ts, not preset integration. - * DD-2: Satisfies existing WorkflowConfig type — no new types needed. - */ -const DEFAULT_WORKFLOW_CONFIG = Object.freeze({ - name: '6-phase-standard', - version: '1.0.0', - statuses: [ - { name: 'roadmap', emoji: '\u{1F4CB}' }, - { name: 'active', emoji: '\u{1F6A7}' }, - { name: 'completed', emoji: '\u2705' }, - { name: 'deferred', emoji: '\u23F8\uFE0F' }, - ], - phases: [ - { name: 'Inception', order: 1 }, - { name: 'Elaboration', order: 2 }, - { name: 'Session', order: 3 }, - { name: 'Construction', order: 4 }, - { name: 'Validation', order: 5 }, - { name: 'Retrospective', order: 6 }, - ], - defaultStatus: 'roadmap', -}); -/** Pre-computed LoadedWorkflow singleton — avoids rebuilding Maps on every call */ -const DEFAULT_LOADED_WORKFLOW = createLoadedWorkflow(DEFAULT_WORKFLOW_CONFIG); -/** - * Load workflow configuration from a specific file path - * - * @param configPath - Absolute or relative path to workflow JSON file - * @param source - Source identifier for error messages (defaults to path) - * @returns Result with LoadedWorkflow or error details - * - * @example - * ```typescript - * const result = await loadWorkflowFromPath("/path/to/custom-workflow.json"); - * if (result.ok) { - * const workflow = result.value; - * } - * ``` - */ -export async function loadWorkflowFromPath(configPath, source) { - const errorSource = source ?? configPath; - // Read file - let content; - try { - content = await fs.readFile(configPath, 'utf-8'); - } - catch (error) { - // Handle file read errors - if (error instanceof Error && 'code' in error) { - const nodeError = error; - if (nodeError.code === 'ENOENT') { - return Result.err({ - type: 'workflow-load-error', - source: errorSource, - message: `Workflow file not found: ${configPath}`, - }); - } - if (nodeError.code === 'EACCES') { - return Result.err({ - type: 'workflow-load-error', - source: errorSource, - message: `Permission denied reading workflow: ${configPath}`, - }); - } - } - const message = error instanceof Error ? error.message : String(error); - return Result.err({ - type: 'workflow-load-error', - source: errorSource, - message: `Failed to load workflow: ${message}`, - }); - } - // Parse and validate using codec (handles $schema stripping automatically) - const parseResult = WorkflowConfigCodec.parse(content, errorSource); - if (!parseResult.ok) { - const error = { - type: 'workflow-load-error', - source: errorSource, - message: parseResult.error.message, - }; - if (parseResult.error.validationErrors) { - error.validationErrors = parseResult.error.validationErrors; - } - return Result.err(error); - } - // Create LoadedWorkflow with lookup maps - const workflow = createLoadedWorkflow(parseResult.value); - return Result.ok(workflow); -} -/** - * Load the default workflow (6-phase-standard) - * - * Returns the standard USDP 6-phase workflow from an inline constant. - * Synchronous and infallible — no file I/O, no error handling needed. - * - * DD-4: Returns LoadedWorkflow synchronously (not Promise). - * - * @returns LoadedWorkflow for 6-phase-standard - * - * @example - * ```typescript - * const workflow = loadDefaultWorkflow(); - * const emoji = workflow.statusMap.get("completed")?.emoji; // "\u2705" - * ``` - */ -export function loadDefaultWorkflow() { - return DEFAULT_LOADED_WORKFLOW; -} -/** - * Format workflow load error for console display - * - * @param error - Workflow load error - * @returns Formatted error message for console output - * - * @example - * ```typescript - * const result = await loadWorkflowFromPath("/path/to/custom.json"); - * if (!result.ok) { - * console.error(formatWorkflowLoadError(result.error)); - * process.exit(1); - * } - * ``` - */ -export function formatWorkflowLoadError(error) { - const lines = [`Workflow error: ${error.message}`, ` Source: ${error.source}`]; - if (error.validationErrors && error.validationErrors.length > 0) { - lines.push(' Validation errors:'); - lines.push(...error.validationErrors); - } - return lines.join('\n'); -} -//# sourceMappingURL=workflow-loader.js.map \ No newline at end of file diff --git a/dist/config/workflow-loader.js.map b/dist/config/workflow-loader.js.map deleted file mode 100644 index 09725a70..00000000 --- a/dist/config/workflow-loader.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"workflow-loader.js","sourceRoot":"","sources":["../../src/config/workflow-loader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EACL,oBAAoB,EACpB,oBAAoB,GAGrB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAE5E;;GAEG;AACH,MAAM,mBAAmB,GAAG,oBAAoB,CAAC,oBAAoB,CAAC,CAAC;AAmBvE;;;;;;;;GAQG;AACH,MAAM,uBAAuB,GAAmB,MAAM,CAAC,MAAM,CAAC;IAC5D,IAAI,EAAE,kBAAkB;IACxB,OAAO,EAAE,OAAO;IAChB,QAAQ,EAAE;QACR,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,WAAW,EAAE;QACvC,EAAE,IAAI,EAAE,QAAQ,EAAE,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;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,mBAAmB;IACjC,OAAO,uBAAuB,CAAC;AACjC,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,uBAAuB,CAAC,KAAwB;IAC9D,MAAM,KAAK,GAAG,CAAC,mBAAmB,KAAK,CAAC,OAAO,EAAE,EAAE,aAAa,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;IAEhF,IAAI,KAAK,CAAC,gBAAgB,IAAI,KAAK,CAAC,gBAAgB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAChE,KAAK,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;QACnC,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,gBAAgB,CAAC,CAAC;IACxC,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"} \ No newline at end of file diff --git a/dist/extractor/doc-extractor.d.ts b/dist/extractor/doc-extractor.d.ts deleted file mode 100644 index 6b42f47f..00000000 --- a/dist/extractor/doc-extractor.d.ts +++ /dev/null @@ -1,233 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core @libar-docs-extractor - * @libar-docs-pattern Document Extractor - * @libar-docs-status completed - * @libar-docs-arch-role service - * @libar-docs-arch-context extractor - * @libar-docs-arch-layer application - * @libar-docs-include pipeline-stages - * @libar-docs-uses Pattern Scanner, Tag Registry, Zod - * @libar-docs-used-by Orchestrator, Generators - * @libar-docs-usecase "When converting scanned files to ExtractedPattern objects" - * @libar-docs-usecase "When inferring pattern names and categories from exports" - * - * ## Document Extractor - Pattern Extraction and Metadata Generation - * - * Converts scanned file data into complete ExtractedPattern objects with - * unique IDs, inferred names, categories, and timestamps. Second stage of - * the pipeline: Scanner → **Extractor** → Generator. - * - * ### When to Use - * - * - Transforming directives to structured patterns - * - Inferring metadata from tags and exports - * - Validating pattern structure against schemas - * - * ### Key Concepts - * - * - **Category Inference**: Uses tag registry priorities to determine primary category - * - **Name Inference**: Extracts from exports or JSDoc title when not explicit - * - **Deterministic IDs**: MD5 hash of file path + line number ensures stable identifiers - */ -import type { ScannedFile } from '../scanner/index.js'; -import type { ExtractedPattern, DocDirective, ExportInfo, PatternValidationError } from '../types/index.js'; -import { Result } from '../types/index.js'; -import { type TagRegistry } from '../validation-schemas/index.js'; -/** - * Results of pattern extraction with error collection - */ -export interface ExtractionResults { - /** Successfully extracted patterns */ - readonly patterns: readonly ExtractedPattern[]; - /** Patterns that failed validation */ - readonly errors: readonly PatternValidationError[]; -} -/** - * Convert scanned files to extracted patterns - * - * **Result Pattern**: Collects both successful extractions AND validation errors, - * enabling partial success scenarios. - * - * @param scannedFiles - Files scanned for directives - * @param baseDir - Base directory for relative path calculation - * @param registry - Tag registry for category inference and aggregation tags (optional, defaults to generic registry) - * @returns Extraction results with patterns and errors - * - * @example - * ```typescript - * import { scanPatterns } from '@libar-dev/code-first-docs/scanner'; - * import { extractPatterns } from '@libar-dev/code-first-docs/extractor'; - * - * const scanResult = await scanPatterns(config); - * if (scanResult.ok) { - * const extraction = extractPatterns(scanResult.value.files, '/path/to/project'); - * console.log(`Extracted ${extraction.patterns.length} patterns`); - * console.log(`Failed ${extraction.errors.length} validations`); - * } - * ``` - */ -export declare function extractPatterns(scannedFiles: readonly ScannedFile[], baseDir: string, registry?: TagRegistry): ExtractionResults; -/** - * Build a complete ExtractedPattern from components - * - * **Schema-First Enforcement**: Validates constructed pattern against schema - * to ensure data integrity at the boundary. - * - * @param directive - Parsed JSDoc directive - * @param code - Extracted code snippet - * @param exports - Exported symbols from code block - * @param filePath - Absolute file path - * @param baseDir - Base directory for relative path calculation - * @param registry - Tag registry for category inference - * @returns Result containing validated pattern or validation error - * - * @example - * ```typescript - * const result = buildPattern( - * directive, - * codeSnippet, - * exports, - * '/project/src/utils.ts', - * '/project', - * tagRegistry - * ); - * - * if (result.ok) { - * console.log(result.value.id); // 'pattern-a1b2c3d4' - * console.log(result.value.source.file); // 'src/utils.ts' - * } - * ``` - */ -export declare function buildPattern(directive: DocDirective, code: string, exports: readonly ExportInfo[], filePath: string, baseDir: string, registry: TagRegistry): Result; -/** - * Infer pattern name from directive or exports - * - * Uses fallback chain: - * 1. Explicit pattern tag value (highest priority) - * 2. First line of description (if not a tag) - * 3. First export name - * 4. Generated from primary tag - * - * @param directive - Parsed JSDoc directive - * @param exports - Exported symbols from code block - * @param registry - Tag registry for prefix-aware tag stripping - * @returns Inferred pattern name - * - * @example - * ```typescript - * // From explicit pattern tag (highest priority) - * const name0 = inferPatternName( - * { patternName: 'Decider Pattern', description: 'Some description', tags: [...] }, - * [], - * registry - * ); - * console.log(name0); // 'Decider Pattern' - * - * // From description - * const name1 = inferPatternName( - * { description: 'User Authentication\n...', tags: [...] }, - * [], - * registry - * ); - * console.log(name1); // 'User Authentication' - * - * // From export - * const name2 = inferPatternName( - * { description: '@docs-core', tags: [...] }, - * [{ name: 'createUser', type: 'function' }], - * registry - * ); - * console.log(name2); // 'createUser' - * - * // From tag - * const name3 = inferPatternName( - * { description: '', tags: ['@docs-domain-auth'] }, - * [], - * registry - * ); - * console.log(name3); // 'domain-pattern' - * ``` - */ -export declare function inferPatternName(directive: DocDirective, exports: readonly ExportInfo[], registry: TagRegistry): string; -/** - * Infer category from @libar-docs-* tags using priority system - * - * Categories are selected based on priority order: - * domain > arch > infra > validation > testing > performance > security > core - * - * @param tags - Array of @libar-docs-* tags - * @returns Inferred category string - * - * @example - * ```typescript - * // Priority-based selection - * const cat1 = inferCategory([ - * '@libar-docs-core', - * '@libar-docs-domain-auth' - * ]); - * console.log(cat1); // 'domain' (higher priority than 'core') - * - * // From first tag - * const cat2 = inferCategory(['@libar-docs-validation-zod']); - * console.log(cat2); // 'validation' - * - * // No tags - * const cat3 = inferCategory([]); - * console.log(cat3); // 'uncategorized' - * ``` - */ -export declare function inferCategory(tags: readonly string[], registry: TagRegistry): string; -/** - * Check if directive has specific aggregation tag - * - * Generic helper for checking any aggregation tag. Replaces individual - * hasOverviewTag/hasDecisionTag/hasIntroTag helpers with a unified approach. - * - * @param tags - Directive tags to check - * @param aggregationTagName - Name of aggregation tag (e.g., "overview", "decision", "intro") - * @param registry - Tag registry - * @returns True if directive has the specified aggregation tag - * - * @example - * ```typescript - * hasAggregationTag(['@libar-docs-core', '@libar-docs-overview'], "overview", registry); // true - * hasAggregationTag(['@libar-docs-core'], "overview", registry); // false - * hasAggregationTag(['@libar-docs-arch', '@libar-docs-decision'], "decision", registry); // true - * ``` - */ -export declare function hasAggregationTag(tags: readonly string[], aggregationTagName: string, registry: TagRegistry): boolean; -/** - * Result of extracting aggregation tags from pattern tags - */ -export interface AggregationTags { - /** True if pattern should appear in OVERVIEW.md */ - readonly overview: boolean; - /** True if pattern should appear in DECISIONS.md */ - readonly decision: boolean; - /** True if pattern is a package introduction */ - readonly intro: boolean; -} -/** - * Extract aggregation tags from pattern tags - * - * Identifies which aggregated documents a pattern should appear in. - * Patterns can appear in multiple documents if they have multiple aggregation tags. - * - * @param tags - Array of @libar-docs-* tags - * @param registry - Tag registry for aggregation tag lookup - * @returns Object indicating which aggregated docs to include pattern in - * - * @example - * ```typescript - * // Pattern with both overview and decision tags - * getAggregationTags(['@libar-docs-overview', '@libar-docs-decision'], registry); - * // { overview: true, decision: true, intro: false } - * - * // Pattern with only core tag (no aggregation) - * getAggregationTags(['@libar-docs-core'], registry); - * // { overview: false, decision: false, intro: false } - * ``` - */ -export declare function getAggregationTags(tags: readonly string[], registry: TagRegistry): AggregationTags; -//# sourceMappingURL=doc-extractor.d.ts.map \ No newline at end of file diff --git a/dist/extractor/doc-extractor.d.ts.map b/dist/extractor/doc-extractor.d.ts.map deleted file mode 100644 index 07504f20..00000000 --- a/dist/extractor/doc-extractor.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"doc-extractor.d.ts","sourceRoot":"","sources":["../../src/extractor/doc-extractor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAIH,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M,CAqFpF;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,kBAAkB,EAAE,MAAM,EAC1B,QAAQ,EAAE,WAAW,GACpB,OAAO,CAKT;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,mDAAmD;IACnD,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,oDAAoD;IACpD,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,gDAAgD;IAChD,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,QAAQ,EAAE,WAAW,GACpB,eAAe,CAMjB"} \ No newline at end of file diff --git a/dist/extractor/doc-extractor.js b/dist/extractor/doc-extractor.js deleted file mode 100644 index bd989c7f..00000000 --- a/dist/extractor/doc-extractor.js +++ /dev/null @@ -1,477 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core @libar-docs-extractor - * @libar-docs-pattern Document Extractor - * @libar-docs-status completed - * @libar-docs-arch-role service - * @libar-docs-arch-context extractor - * @libar-docs-arch-layer application - * @libar-docs-include pipeline-stages - * @libar-docs-uses Pattern Scanner, Tag Registry, Zod - * @libar-docs-used-by Orchestrator, Generators - * @libar-docs-usecase "When converting scanned files to ExtractedPattern objects" - * @libar-docs-usecase "When inferring pattern names and categories from exports" - * - * ## Document Extractor - Pattern Extraction and Metadata Generation - * - * Converts scanned file data into complete ExtractedPattern objects with - * unique IDs, inferred names, categories, and timestamps. Second stage of - * the pipeline: Scanner → **Extractor** → Generator. - * - * ### When to Use - * - * - Transforming directives to structured patterns - * - Inferring metadata from tags and exports - * - Validating pattern structure against schemas - * - * ### Key Concepts - * - * - **Category Inference**: Uses tag registry priorities to determine primary category - * - **Name Inference**: Extracts from exports or JSDoc title when not explicit - * - **Deterministic IDs**: MD5 hash of file path + line number ensures stable identifiers - */ -import * as fs from 'fs'; -import * as path from 'path'; -import { processExtractShapesTag, discoverTaggedShapes } from './shape-extractor.js'; -import { Result } from '../types/index.js'; -import { asPatternId, asCategoryName, asSourceFilePath, createPatternValidationError, } from '../types/index.js'; -import { ExtractedPatternSchema, createDefaultTagRegistry, } from '../validation-schemas/index.js'; -import { generatePatternId } from '../utils/index.js'; -/** - * Convert scanned files to extracted patterns - * - * **Result Pattern**: Collects both successful extractions AND validation errors, - * enabling partial success scenarios. - * - * @param scannedFiles - Files scanned for directives - * @param baseDir - Base directory for relative path calculation - * @param registry - Tag registry for category inference and aggregation tags (optional, defaults to generic registry) - * @returns Extraction results with patterns and errors - * - * @example - * ```typescript - * import { scanPatterns } from '@libar-dev/code-first-docs/scanner'; - * import { extractPatterns } from '@libar-dev/code-first-docs/extractor'; - * - * const scanResult = await scanPatterns(config); - * if (scanResult.ok) { - * const extraction = extractPatterns(scanResult.value.files, '/path/to/project'); - * console.log(`Extracted ${extraction.patterns.length} patterns`); - * console.log(`Failed ${extraction.errors.length} validations`); - * } - * ``` - */ -export function extractPatterns(scannedFiles, baseDir, registry) { - const patterns = []; - const errors = []; - const effectiveRegistry = registry ?? createDefaultTagRegistry(); - for (const scannedFile of scannedFiles) { - for (const item of scannedFile.directives) { - const result = buildPattern(item.directive, item.code, item.exports, scannedFile.filePath, baseDir, effectiveRegistry); - if (Result.isOk(result)) { - patterns.push(result.value); - } - else { - errors.push(result.error); - } - } - } - return { patterns, errors }; -} -/** - * Build a complete ExtractedPattern from components - * - * **Schema-First Enforcement**: Validates constructed pattern against schema - * to ensure data integrity at the boundary. - * - * @param directive - Parsed JSDoc directive - * @param code - Extracted code snippet - * @param exports - Exported symbols from code block - * @param filePath - Absolute file path - * @param baseDir - Base directory for relative path calculation - * @param registry - Tag registry for category inference - * @returns Result containing validated pattern or validation error - * - * @example - * ```typescript - * const result = buildPattern( - * directive, - * codeSnippet, - * exports, - * '/project/src/utils.ts', - * '/project', - * tagRegistry - * ); - * - * if (result.ok) { - * console.log(result.value.id); // 'pattern-a1b2c3d4' - * console.log(result.value.source.file); // 'src/utils.ts' - * } - * ``` - */ -export function buildPattern(directive, code, exports, filePath, baseDir, registry) { - const relativePath = path.relative(baseDir, filePath); - const id = asPatternId(generatePatternId(relativePath, directive.position.startLine)); - const name = inferPatternName(directive, exports, registry); - const category = asCategoryName(inferCategory(directive.tags, registry)); - // Shape extraction: both @libar-docs-extract-shapes (pattern-level) and - // @libar-docs-shape (declaration-level) contribute to extractedShapes. - // Read file once for both paths. - let extractedShapes; - const extractionWarnings = []; - // Only TypeScript files can have shapes - if (filePath.endsWith('.ts') || filePath.endsWith('.tsx')) { - const jsx = filePath.endsWith('.tsx'); - let sourceContent; - try { - sourceContent = fs.readFileSync(filePath, 'utf-8'); - } - catch (error) { - extractionWarnings.push(`[shape-extraction] Failed to read file: ${filePath} - ${error instanceof Error ? error.message : String(error)}`); - } - // Path 1: Existing @libar-docs-extract-shapes tag processing - if (sourceContent !== undefined && - directive.extractShapes !== undefined && - directive.extractShapes.length > 0) { - const shapeResult = processExtractShapesTag(sourceContent, directive.extractShapes.join(', '), { jsx }); - extractedShapes = shapeResult.shapes; - extractionWarnings.push(...shapeResult.warnings); - } - // Path 2: Declaration-level @libar-docs-shape discovery - // Performance note: when both paths fire, sourceCode is parsed by typescript-estree - // twice (once in processExtractShapesTag, once in discoverTaggedShapes). Acceptable - // for v1 — future optimization could accept a pre-parsed AST. - if (sourceContent?.includes('libar-docs-shape') === true) { - const taggedResult = discoverTaggedShapes(sourceContent, { jsx }); - if (taggedResult.ok && taggedResult.value.shapes.length > 0) { - const existingByName = new Map((extractedShapes ?? []).map((s) => [s.name, s])); - const newShapes = taggedResult.value.shapes.filter((s) => !existingByName.has(s.name)); - // Merge group and includes from tagged shapes onto existing Path 1 shapes - for (const tagged of taggedResult.value.shapes) { - const existing = existingByName.get(tagged.name); - if (existing !== undefined) { - if (tagged.group !== undefined) { - existing.group = tagged.group; - } - if (tagged.includes !== undefined) { - existing.includes = tagged.includes; - } - } - } - extractedShapes = [...(extractedShapes ?? []), ...newShapes]; - extractionWarnings.push(...taggedResult.value.warnings); - } - else if (!taggedResult.ok) { - extractionWarnings.push(`[shape-discovery] ${taggedResult.error.message}`); - } - } - } - else if (directive.extractShapes !== undefined && directive.extractShapes.length > 0) { - // Non-TS file with extract-shapes tag — legacy path - try { - const sourceContent = fs.readFileSync(filePath, 'utf-8'); - const shapeResult = processExtractShapesTag(sourceContent, directive.extractShapes.join(', ')); - extractedShapes = shapeResult.shapes; - extractionWarnings.push(...shapeResult.warnings); - } - catch (error) { - extractionWarnings.push(`[shape-extraction] Failed to read file: ${filePath} - ${error instanceof Error ? error.message : String(error)}`); - } - } - // Note: extractionWarnings are collected but currently not surfaced - // Future enhancement: add warnings field to ExtractedPattern schema - // Build pattern object - const pattern = { - id, - name, - category, - directive, - code, - source: { - file: asSourceFilePath(relativePath), - lines: [directive.position.startLine, directive.position.endLine], - }, - exports: [...exports], - extractedAt: new Date().toISOString(), - // Include optional fields only if present in directive - ...(directive.patternName !== undefined && { patternName: directive.patternName }), - ...(directive.status !== undefined && { status: directive.status }), - ...(directive.isCore === true && { isCore: directive.isCore }), - ...(directive.useCases !== undefined && - directive.useCases.length > 0 && { useCases: directive.useCases }), - ...(directive.whenToUse !== undefined && { whenToUse: directive.whenToUse }), - ...(directive.uses !== undefined && directive.uses.length > 0 && { uses: directive.uses }), - ...(directive.usedBy !== undefined && - directive.usedBy.length > 0 && { usedBy: directive.usedBy }), - // Roadmap integration fields - ...(directive.phase !== undefined && { phase: directive.phase }), - ...(directive.brief !== undefined && { brief: directive.brief }), - ...(directive.dependsOn !== undefined && - directive.dependsOn.length > 0 && { dependsOn: directive.dependsOn }), - ...(directive.enables !== undefined && - directive.enables.length > 0 && { enables: directive.enables }), - // UML-inspired relationship fields (PatternRelationshipModel) - ...(directive.implements !== undefined && - directive.implements.length > 0 && { implementsPatterns: directive.implements }), - ...(directive.extends !== undefined && { extendsPattern: directive.extends }), - // Cross-reference and API navigation fields (PatternRelationshipModel enhancement) - ...(directive.seeAlso !== undefined && - directive.seeAlso.length > 0 && { seeAlso: directive.seeAlso }), - ...(directive.apiRef !== undefined && - directive.apiRef.length > 0 && { apiRef: directive.apiRef }), - // Design session stub metadata fields - ...(directive.target !== undefined && { targetPath: directive.target }), - ...(directive.since !== undefined && { since: directive.since }), - // Architecture diagram generation fields - ...(directive.archRole !== undefined && { archRole: directive.archRole }), - ...(directive.archContext !== undefined && { archContext: directive.archContext }), - ...(directive.archLayer !== undefined && { archLayer: directive.archLayer }), - ...(directive.include !== undefined && - directive.include.length > 0 && { include: directive.include }), - // PRD metadata fields - ...(directive.productArea !== undefined && { productArea: directive.productArea }), - // Shape extraction fields (extracted from source file when @libar-docs-extract-shapes present) - ...(extractedShapes && extractedShapes.length > 0 && { extractedShapes }), - // Convention tags for reference document generation - ...(directive.convention !== undefined && - directive.convention.length > 0 && { convention: directive.convention }), - }; - // Validate against schema (schema-first enforcement) - const validation = ExtractedPatternSchema.safeParse(pattern); - if (!validation.success) { - const errorMessages = validation.error.issues.map((issue) => `${issue.path.join('.')}: ${issue.message}`); - const error = createPatternValidationError(asSourceFilePath(relativePath), name, 'Pattern validation failed', errorMessages); - return Result.err(error); - } - return Result.ok(validation.data); -} -/** - * Infer pattern name from directive or exports - * - * Uses fallback chain: - * 1. Explicit pattern tag value (highest priority) - * 2. First line of description (if not a tag) - * 3. First export name - * 4. Generated from primary tag - * - * @param directive - Parsed JSDoc directive - * @param exports - Exported symbols from code block - * @param registry - Tag registry for prefix-aware tag stripping - * @returns Inferred pattern name - * - * @example - * ```typescript - * // From explicit pattern tag (highest priority) - * const name0 = inferPatternName( - * { patternName: 'Decider Pattern', description: 'Some description', tags: [...] }, - * [], - * registry - * ); - * console.log(name0); // 'Decider Pattern' - * - * // From description - * const name1 = inferPatternName( - * { description: 'User Authentication\n...', tags: [...] }, - * [], - * registry - * ); - * console.log(name1); // 'User Authentication' - * - * // From export - * const name2 = inferPatternName( - * { description: '@docs-core', tags: [...] }, - * [{ name: 'createUser', type: 'function' }], - * registry - * ); - * console.log(name2); // 'createUser' - * - * // From tag - * const name3 = inferPatternName( - * { description: '', tags: ['@docs-domain-auth'] }, - * [], - * registry - * ); - * console.log(name3); // 'domain-pattern' - * ``` - */ -export function inferPatternName(directive, exports, registry) { - // Priority 1: Explicit pattern tag value - if (directive.patternName) { - return directive.patternName; - } - // Priority 2: Try to extract name from first line of description - const lines = directive.description.split('\n'); - const firstLine = lines[0]; - if (firstLine?.trim() && !firstLine.trim().startsWith('@')) { - // Strip markdown header prefixes (##, ###, etc.) - const cleanedName = firstLine.trim().replace(/^#+\s*/, ''); - if (cleanedName) { - return cleanedName; - } - } - // Fall back to first export name - const firstExport = exports[0]; - if (firstExport) { - return firstExport.name; - } - // Last resort: generate from tags using registry prefix - const tagPrefix = registry.tagPrefix; - const firstTag = directive.tags[0]; - const primaryTag = firstTag?.replace(tagPrefix, '') ?? 'unknown'; - return `${primaryTag}-pattern`; -} -/** - * Infer category from @libar-docs-* tags using priority system - * - * Categories are selected based on priority order: - * domain > arch > infra > validation > testing > performance > security > core - * - * @param tags - Array of @libar-docs-* tags - * @returns Inferred category string - * - * @example - * ```typescript - * // Priority-based selection - * const cat1 = inferCategory([ - * '@libar-docs-core', - * '@libar-docs-domain-auth' - * ]); - * console.log(cat1); // 'domain' (higher priority than 'core') - * - * // From first tag - * const cat2 = inferCategory(['@libar-docs-validation-zod']); - * console.log(cat2); // 'validation' - * - * // No tags - * const cat3 = inferCategory([]); - * console.log(cat3); // 'uncategorized' - * ``` - */ -export function inferCategory(tags, registry) { - // Build priority map from registry (includes aliases) - // Also track canonical tag for each alias - const priorityMap = new Map(); - const canonicalMap = new Map(); // Maps alias → canonical tag - for (const cat of registry.categories) { - priorityMap.set(cat.tag, cat.priority); - canonicalMap.set(cat.tag, cat.tag); // Canonical tags map to themselves - // Include aliases with same priority, mapping to canonical tag - for (const alias of cat.aliases) { - priorityMap.set(alias, cat.priority); - canonicalMap.set(alias, cat.tag); // Alias maps to canonical tag - } - } - // Extract category names from tags (remove prefix) - const prefix = registry.tagPrefix; - const categoryTags = []; - for (const tag of tags) { - if (!tag.startsWith(prefix)) - continue; - // Remove prefix to get tag content - const withoutPrefix = tag.substring(prefix.length); - // Find ALL matching categories in this tag - // This handles cases like "@libar-docs-utils-validation" which contains both "utils" and "validation" - const matches = []; - // Check for exact match first - if (priorityMap.has(withoutPrefix)) { - matches.push(withoutPrefix); - } - else { - // Check all possible contiguous subsequences for category matches - // e.g., for "utils-validation" check: "utils-validation", "utils", "validation" - const parts = withoutPrefix.split('-'); - // Try all contiguous subsequences from longest to shortest - for (let len = parts.length; len > 0; len--) { - for (let start = 0; start <= parts.length - len; start++) { - const candidate = parts.slice(start, start + len).join('-'); - if (priorityMap.has(candidate)) { - matches.push(candidate); - } - } - } - } - // Add all matches to categoryTags - categoryTags.push(...matches); - } - // Find tag with highest priority (lowest number) - // Use canonical tags (normalize aliases) - let selectedCategory = null; - let highestPriority = Infinity; - for (const categoryTag of categoryTags) { - const priority = priorityMap.get(categoryTag); - if (priority !== undefined && priority < highestPriority) { - highestPriority = priority; - // Use canonical tag (normalizes aliases like "infrastructure" → "infra") - selectedCategory = canonicalMap.get(categoryTag) ?? categoryTag; - } - } - // If found by priority, return it - if (selectedCategory !== null) { - return selectedCategory; - } - // Fallback: Extract category from first tag - const firstTag = tags[0]; - if (firstTag?.startsWith(prefix) === true) { - const withoutPrefix = firstTag.substring(prefix.length); - const parts = withoutPrefix.split('-'); - const firstPart = parts[0]; - if (firstPart) { - return firstPart; - } - } - return 'uncategorized'; -} -/** - * Check if directive has specific aggregation tag - * - * Generic helper for checking any aggregation tag. Replaces individual - * hasOverviewTag/hasDecisionTag/hasIntroTag helpers with a unified approach. - * - * @param tags - Directive tags to check - * @param aggregationTagName - Name of aggregation tag (e.g., "overview", "decision", "intro") - * @param registry - Tag registry - * @returns True if directive has the specified aggregation tag - * - * @example - * ```typescript - * hasAggregationTag(['@libar-docs-core', '@libar-docs-overview'], "overview", registry); // true - * hasAggregationTag(['@libar-docs-core'], "overview", registry); // false - * hasAggregationTag(['@libar-docs-arch', '@libar-docs-decision'], "decision", registry); // true - * ``` - */ -export function hasAggregationTag(tags, aggregationTagName, registry) { - const aggregationTag = registry.aggregationTags.find((t) => t.tag === aggregationTagName); - if (!aggregationTag) - return false; - const fullTag = `${registry.tagPrefix}${aggregationTag.tag}`; - return tags.some((t) => t === fullTag); -} -/** - * Extract aggregation tags from pattern tags - * - * Identifies which aggregated documents a pattern should appear in. - * Patterns can appear in multiple documents if they have multiple aggregation tags. - * - * @param tags - Array of @libar-docs-* tags - * @param registry - Tag registry for aggregation tag lookup - * @returns Object indicating which aggregated docs to include pattern in - * - * @example - * ```typescript - * // Pattern with both overview and decision tags - * getAggregationTags(['@libar-docs-overview', '@libar-docs-decision'], registry); - * // { overview: true, decision: true, intro: false } - * - * // Pattern with only core tag (no aggregation) - * getAggregationTags(['@libar-docs-core'], registry); - * // { overview: false, decision: false, intro: false } - * ``` - */ -export function getAggregationTags(tags, registry) { - return { - overview: hasAggregationTag(tags, 'overview', registry), - decision: hasAggregationTag(tags, 'decision', registry), - intro: hasAggregationTag(tags, 'intro', registry), - }; -} -//# sourceMappingURL=doc-extractor.js.map \ No newline at end of file diff --git a/dist/extractor/doc-extractor.js.map b/dist/extractor/doc-extractor.js.map deleted file mode 100644 index d744bc17..00000000 --- a/dist/extractor/doc-extractor.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"doc-extractor.js","sourceRoot":"","sources":["../../src/extractor/doc-extractor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAA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OAAO;QACL,QAAQ,EAAE,iBAAiB,CAAC,IAAI,EAAE,UAAU,EAAE,QAAQ,CAAC;QACvD,QAAQ,EAAE,iBAAiB,CAAC,IAAI,EAAE,UAAU,EAAE,QAAQ,CAAC;QACvD,KAAK,EAAE,iBAAiB,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,CAAC;KAClD,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/dist/extractor/dual-source-extractor.d.ts b/dist/extractor/dual-source-extractor.d.ts deleted file mode 100644 index 60d23383..00000000 --- a/dist/extractor/dual-source-extractor.d.ts +++ /dev/null @@ -1,161 +0,0 @@ -/** - * @libar-docs - * @libar-docs-extractor - * @libar-docs-pattern DualSourceExtractor - * @libar-docs-status completed - * @libar-docs-uses DocExtractor, GherkinExtractor, GherkinScanner - * @libar-docs-used-by Orchestrator - * @libar-docs-arch-role service - * @libar-docs-arch-context extractor - * @libar-docs-arch-layer application - * - * ## DualSourceExtractor - Compose Pattern Data from Code + Features - * - * Extracts pattern metadata from both TypeScript code stubs (@libar-docs-*) - * and Gherkin feature files (@libar-docs-*), validates consistency, - * and composes unified pattern data for documentation generation. - * - * ### When to Use - * - * - When implementing USDP Pattern 2 (Standard) or higher - * - When you have both code stubs AND timeline features - * - When generating artifacts that need both timeless and temporal data - * - When validating cross-source consistency (pattern name, phase alignment) - * - * ### Key Concepts - * - * - **Code Source**: @libar-docs-* tags define timeless pattern graph - * - **Feature Source**: @libar-docs-* tags add temporal process metadata - * - **Cross-Validation**: Pattern name + phase must match across sources - * - **Deliverables**: Parsed from Gherkin Background tables in features - */ -import type { ExtractedPattern } from '../types/index.js'; -import { type ScannedGherkinFile, type ProcessMetadata, type Deliverable, type CrossValidationError, type ValidationSummary } from '../validation-schemas/index.js'; -export type { ProcessMetadata, Deliverable, CrossValidationError, ValidationSummary }; -/** - * Results from dual-source extraction - * - * Contains patterns successfully matched across sources, orphaned - * code/feature patterns, and cross-validation errors. - */ -export interface DualSourceResults { - /** Patterns with both code + process data */ - readonly patterns: readonly DualSourcePattern[]; - /** Patterns from code only (no matching feature) */ - readonly codeOnly: readonly ExtractedPattern[]; - /** Features without matching code stubs */ - readonly featureOnly: readonly ProcessMetadata[]; - /** Cross-validation errors */ - readonly validationErrors: readonly CrossValidationError[]; - /** Non-fatal warnings (e.g., pattern name collisions) */ - readonly warnings: readonly string[]; -} -/** - * Combined pattern data from code + features - * - * When multiple code files define the same pattern (e.g., ServiceIndependence - * with ECST and Reservation sub-patterns), they are merged into a single - * dual-source pattern with the `sources` array containing all variants. - */ -export interface DualSourcePattern extends ExtractedPattern { - /** Process metadata from feature file (optional) */ - readonly process?: ProcessMetadata; - /** Deliverables from feature Background table (optional) */ - readonly deliverables?: readonly Deliverable[]; - /** - * Multiple source patterns when there's a name collision (optional) - * Present when multiple code files use the same @libar-docs-pattern name - */ - readonly sources?: readonly ExtractedPattern[]; -} -/** - * Extract process metadata from Gherkin feature tags - * - * Uses schema validation instead of type assertions to ensure data integrity. - * Returns null if required tags are missing OR if validation fails. - * - * @param feature - Scanned Gherkin feature - * @returns Process metadata or null if missing required tags or validation fails - */ -export declare function extractProcessMetadata(feature: ScannedGherkinFile): ProcessMetadata | null; -/** - * Extract deliverables from Gherkin Background table - * - * Parses Background section looking for DataTables with a "Deliverable" column. - * Expected table format: - * | Deliverable | Status | Tests | Location | - * - * Optional columns for extended tracking: - * | Deliverable | Status | Tests | Location | Finding | Release | - * - * - **Finding**: Review traceability ID (e.g., "CODE-001") - * - **Release**: Semver version for changelog grouping (e.g., "v0.2.0") - * - * @param feature - Scanned Gherkin feature with optional background - * @returns Array of deliverables or empty array if no table found - * - * @example - * ```gherkin - * Background: Deliverables - * Given the following deliverables: - * | Deliverable | Status | Tests | Location | Finding | Release | - * | Fix parseArgs() call | Done | Yes | src/cli/generate-docs.ts | CODE-001 | v0.2.0 | - * | Update README.md | Done | No | README.md | DOC-001 | v0.2.0 | - * ``` - */ -export declare function extractDeliverables(feature: ScannedGherkinFile): readonly Deliverable[]; -/** - * Combine patterns from code and features into dual-source patterns - * - * Validates that pattern names and phases match across sources. - * Creates unified pattern objects with both code and process metadata. - * - * **Pattern Name Collisions:** - * When multiple code files use the same `@libar-docs-pattern` name (e.g., - * ServiceIndependence with ECST and Reservation sub-patterns), they are - * automatically merged: - * - Categories, dependencies, and enables are unioned across all sources - * - Primary pattern (first in array) provides base metadata - * - All source patterns are preserved in the `sources` array - * - Console warning is emitted for visibility - * - * @param codePatterns - Patterns extracted from TypeScript code - * @param featureFiles - Scanned Gherkin feature files - * @returns Dual-source extraction results - * - * @example - * ```typescript - * // Extract from both sources - * const codeScan = await scanPatterns({ patterns: 'packages/**\/*.ts' }); - * const featureScan = await scanGherkinFiles({ patterns: 'tests/features/**\/*.feature' }); - * - * if (codeScan.ok && featureScan.ok) { - * const codeExtraction = extractPatterns(codeScan.value.files, '/project'); - * const dualSource = combineSources(codeExtraction.patterns, featureScan.value.files); - * - * console.log(`Combined: ${dualSource.patterns.length}`); - * console.log(`Code-only: ${dualSource.codeOnly.length}`); - * console.log(`Feature-only: ${dualSource.featureOnly.length}`); - * console.log(`Validation errors: ${dualSource.validationErrors.length}`); - * - * // Check for collisions - * for (const pattern of dualSource.patterns) { - * if (pattern.sources) { - * console.log(`${pattern.patternName} has ${pattern.sources.length} implementations`); - * } - * } - * } - * ``` - */ -export declare function combineSources(codePatterns: readonly ExtractedPattern[], featureFiles: readonly ScannedGherkinFile[]): DualSourceResults; -/** - * Validate dual-source consistency - * - * Checks that patterns are properly aligned across sources. - * Reports code stubs without features and features without code. - * - * @param results - Dual-source extraction results - * @returns Validation summary - */ -export declare function validateDualSource(results: DualSourceResults): ValidationSummary; -//# sourceMappingURL=dual-source-extractor.d.ts.map \ No newline at end of file diff --git a/dist/extractor/dual-source-extractor.d.ts.map b/dist/extractor/dual-source-extractor.d.ts.map deleted file mode 100644 index 81789c87..00000000 --- a/dist/extractor/dual-source-extractor.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"d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G;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,kBAAkB,GAAG,SAAS,WAAW,EAAE,CA8EvF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,wBAAgB,cAAc,CAC5B,YAAY,EAAE,SAAS,gBAAgB,EAAE,EACzC,YAAY,EAAE,SAAS,kBAAkB,EAAE,GAC1C,iBAAiB,CAuHnB;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,iBAAiB,GAAG,iBAAiB,CA6BhF"} \ No newline at end of file diff --git a/dist/extractor/dual-source-extractor.js b/dist/extractor/dual-source-extractor.js deleted file mode 100644 index 580fb67f..00000000 --- a/dist/extractor/dual-source-extractor.js +++ /dev/null @@ -1,407 +0,0 @@ -/** - * @libar-docs - * @libar-docs-extractor - * @libar-docs-pattern DualSourceExtractor - * @libar-docs-status completed - * @libar-docs-uses DocExtractor, GherkinExtractor, GherkinScanner - * @libar-docs-used-by Orchestrator - * @libar-docs-arch-role service - * @libar-docs-arch-context extractor - * @libar-docs-arch-layer application - * - * ## DualSourceExtractor - Compose Pattern Data from Code + Features - * - * Extracts pattern metadata from both TypeScript code stubs (@libar-docs-*) - * and Gherkin feature files (@libar-docs-*), validates consistency, - * and composes unified pattern data for documentation generation. - * - * ### When to Use - * - * - When implementing USDP Pattern 2 (Standard) or higher - * - When you have both code stubs AND timeline features - * - When generating artifacts that need both timeless and temporal data - * - When validating cross-source consistency (pattern name, phase alignment) - * - * ### Key Concepts - * - * - **Code Source**: @libar-docs-* tags define timeless pattern graph - * - **Feature Source**: @libar-docs-* tags add temporal process metadata - * - **Cross-Validation**: Pattern name + phase must match across sources - * - **Deliverables**: Parsed from Gherkin Background tables in features - */ -import { getPatternName } from '../api/pattern-helpers.js'; -// Import Zod schemas and inferred types (schema-first pattern) -import { ProcessMetadataSchema, DeliverableSchema, } from '../validation-schemas/index.js'; -import { DEFAULT_STATUS } from '../taxonomy/status-values.js'; -/** - * Extract process metadata from Gherkin feature tags - * - * Uses schema validation instead of type assertions to ensure data integrity. - * Returns null if required tags are missing OR if validation fails. - * - * @param feature - Scanned Gherkin feature - * @returns Process metadata or null if missing required tags or validation fails - */ -export function extractProcessMetadata(feature) { - const tags = feature.feature.tags; - // Extract normalized tags (scanner strips @ and configured prefix like @libar-docs-) - const patternTag = tags.find((t) => t.startsWith('pattern:')); - const phaseTag = tags.find((t) => t.startsWith('phase:')); - const statusTag = tags.find((t) => t.startsWith('status:')); - if (!patternTag || !phaseTag) { - // Missing required tags - return null; - } - const pattern = patternTag.replace('pattern:', ''); - const phaseStr = phaseTag.replace('phase:', ''); - const phase = parseInt(phaseStr, 10); - const status = statusTag?.replace('status:', '') ?? DEFAULT_STATUS; - // Extract optional tags - const quarterTag = tags.find((t) => t.startsWith('quarter:')); - const effortTag = tags.find((t) => t.startsWith('effort:')); - const teamTag = tags.find((t) => t.startsWith('team:')); - const workflowTag = tags.find((t) => t.startsWith('workflow:')); - const completedTag = tags.find((t) => t.startsWith('completed:')); - const effortActualTag = tags.find((t) => t.startsWith('effort-actual:')); - const riskTag = tags.find((t) => t.startsWith('risk:')); - const briefTag = tags.find((t) => t.startsWith('brief:')); - const productAreaTag = tags.find((t) => t.startsWith('product-area:')); - const userRoleTag = tags.find((t) => t.startsWith('user-role:')); - const businessValueTag = tags.find((t) => t.startsWith('business-value:')); - const quarter = quarterTag?.replace('quarter:', ''); - const effort = effortTag?.replace('effort:', ''); - const team = teamTag?.replace('team:', ''); - const workflow = workflowTag?.replace('workflow:', ''); - const completed = completedTag?.replace('completed:', ''); - const effortActual = effortActualTag?.replace('effort-actual:', ''); - const risk = riskTag?.replace('risk:', ''); - const brief = briefTag?.replace('brief:', ''); - const productArea = productAreaTag?.replace('product-area:', ''); - const userRole = userRoleTag?.replace('user-role:', ''); - // Business value may have surrounding quotes - strip them - const businessValueRaw = businessValueTag?.replace('business-value:', ''); - const businessValue = businessValueRaw?.replace(/^["']|["']$/g, ''); - // Build raw metadata object (no type assertions) - const rawMetadata = { - pattern, - phase, - status, - ...(quarter && { quarter }), - ...(effort && { effort }), - ...(team && { team }), - ...(workflow && { workflow }), - ...(completed && { completed }), - ...(effortActual && { effortActual }), - ...(risk && { risk }), - ...(brief && { brief }), - ...(productArea && { productArea }), - ...(userRole && { userRole }), - ...(businessValue && { businessValue }), - }; - // Validate against schema (schema-first enforcement) - const validation = ProcessMetadataSchema.safeParse(rawMetadata); - if (!validation.success) { - // Log validation failure for debugging (but don't fail silently) - console.warn(`Process metadata validation failed in ${feature.filePath}: ` + - validation.error.issues.map((i) => `${i.path.join('.')}: ${i.message}`).join(', ')); - return null; - } - return validation.data; -} -/** - * Parse a Tests cell value to a number - * - * Handles various formats: - * - "Yes" / "No" → 1 / 0 - * - Numbers as strings → parsed int - * - Empty → 0 - * - * @param value - Tests cell value - * @returns Number of tests - */ -function parseTestsValue(value) { - const trimmed = value.trim().toLowerCase(); - // Handle Yes/No/True/False - if (trimmed === 'yes' || trimmed === 'true' || trimmed === '✓' || trimmed === '✅') { - return 1; - } - if (trimmed === 'no' || - trimmed === 'false' || - trimmed === '✗' || - trimmed === '' || - trimmed === '-') { - return 0; - } - // Try to parse as number - const parsed = parseInt(trimmed, 10); - return isNaN(parsed) ? 0 : parsed; -} -/** - * Extract deliverables from Gherkin Background table - * - * Parses Background section looking for DataTables with a "Deliverable" column. - * Expected table format: - * | Deliverable | Status | Tests | Location | - * - * Optional columns for extended tracking: - * | Deliverable | Status | Tests | Location | Finding | Release | - * - * - **Finding**: Review traceability ID (e.g., "CODE-001") - * - **Release**: Semver version for changelog grouping (e.g., "v0.2.0") - * - * @param feature - Scanned Gherkin feature with optional background - * @returns Array of deliverables or empty array if no table found - * - * @example - * ```gherkin - * Background: Deliverables - * Given the following deliverables: - * | Deliverable | Status | Tests | Location | Finding | Release | - * | Fix parseArgs() call | Done | Yes | src/cli/generate-docs.ts | CODE-001 | v0.2.0 | - * | Update README.md | Done | No | README.md | DOC-001 | v0.2.0 | - * ``` - */ -export function extractDeliverables(feature) { - // Check if feature has a background section - if (!feature.background) { - return []; - } - const deliverables = []; - // Search for DataTables in background steps - for (const step of feature.background.steps) { - if (!step.dataTable) { - continue; - } - const { headers, rows } = step.dataTable; - // Check if this table has a "Deliverable" column (case-insensitive) - const deliverableIdx = headers.findIndex((h) => h.toLowerCase() === 'deliverable'); - if (deliverableIdx === -1) { - continue; - } - // Find other columns (case-insensitive) - const statusIdx = headers.findIndex((h) => h.toLowerCase() === 'status'); - const testsIdx = headers.findIndex((h) => h.toLowerCase() === 'tests'); - const locationIdx = headers.findIndex((h) => h.toLowerCase() === 'location'); - const findingIdx = headers.findIndex((h) => h.toLowerCase() === 'finding'); - const releaseIdx = headers.findIndex((h) => h.toLowerCase() === 'release'); - // Store header names for reliable lookup (avoid empty-string key match) - const deliverableHeader = headers[deliverableIdx]; - const statusHeader = statusIdx >= 0 ? headers[statusIdx] : undefined; - const testsHeader = testsIdx >= 0 ? headers[testsIdx] : undefined; - const locationHeader = locationIdx >= 0 ? headers[locationIdx] : undefined; - const findingHeader = findingIdx >= 0 ? headers[findingIdx] : undefined; - const releaseHeader = releaseIdx >= 0 ? headers[releaseIdx] : undefined; - if (!deliverableHeader) - continue; - // Parse each row with schema validation - for (const row of rows) { - const name = row[deliverableHeader]?.trim() ?? ''; - const rawStatus = statusHeader ? (row[statusHeader]?.trim() ?? '') : ''; - const status = rawStatus.toLowerCase(); - const testsValue = testsHeader ? (row[testsHeader]?.trim() ?? '0') : '0'; - const location = locationHeader ? (row[locationHeader]?.trim() ?? '') : ''; - const findingRaw = findingHeader ? row[findingHeader]?.trim() : undefined; - const finding = findingRaw !== '' ? findingRaw : undefined; - const releaseRaw = releaseHeader ? row[releaseHeader]?.trim() : undefined; - const release = releaseRaw !== '' ? releaseRaw : undefined; - // Build raw deliverable object (no type assertions) - const rawDeliverable = { - name, - status, - tests: parseTestsValue(testsValue), - location, - ...(finding && { finding }), - ...(release && { release }), - }; - // Validate against schema (schema-first enforcement) - const validation = DeliverableSchema.safeParse(rawDeliverable); - if (!validation.success) { - // Skip invalid deliverables with warning (name might be empty or tests negative) - console.warn(`Deliverable validation failed in ${feature.filePath}: ` + - validation.error.issues.map((i) => `${i.path.join('.')}: ${i.message}`).join(', ')); - continue; - } - deliverables.push(validation.data); - } - } - return deliverables; -} -/** - * Combine patterns from code and features into dual-source patterns - * - * Validates that pattern names and phases match across sources. - * Creates unified pattern objects with both code and process metadata. - * - * **Pattern Name Collisions:** - * When multiple code files use the same `@libar-docs-pattern` name (e.g., - * ServiceIndependence with ECST and Reservation sub-patterns), they are - * automatically merged: - * - Categories, dependencies, and enables are unioned across all sources - * - Primary pattern (first in array) provides base metadata - * - All source patterns are preserved in the `sources` array - * - Console warning is emitted for visibility - * - * @param codePatterns - Patterns extracted from TypeScript code - * @param featureFiles - Scanned Gherkin feature files - * @returns Dual-source extraction results - * - * @example - * ```typescript - * // Extract from both sources - * const codeScan = await scanPatterns({ patterns: 'packages/**\/*.ts' }); - * const featureScan = await scanGherkinFiles({ patterns: 'tests/features/**\/*.feature' }); - * - * if (codeScan.ok && featureScan.ok) { - * const codeExtraction = extractPatterns(codeScan.value.files, '/project'); - * const dualSource = combineSources(codeExtraction.patterns, featureScan.value.files); - * - * console.log(`Combined: ${dualSource.patterns.length}`); - * console.log(`Code-only: ${dualSource.codeOnly.length}`); - * console.log(`Feature-only: ${dualSource.featureOnly.length}`); - * console.log(`Validation errors: ${dualSource.validationErrors.length}`); - * - * // Check for collisions - * for (const pattern of dualSource.patterns) { - * if (pattern.sources) { - * console.log(`${pattern.patternName} has ${pattern.sources.length} implementations`); - * } - * } - * } - * ``` - */ -export function combineSources(codePatterns, featureFiles) { - const combined = []; - const codeOnly = []; - const featureOnly = []; - const validationErrors = []; - const warnings = []; - // Build index of code patterns by patternName (supports collisions) - // When multiple code files use same pattern name, they're stored as an array - const codeIndex = new Map(); - for (const pattern of codePatterns) { - if (pattern.patternName) { - const existing = codeIndex.get(pattern.patternName) ?? []; - codeIndex.set(pattern.patternName, [...existing, pattern]); - } - } - // Build index of features by pattern name - const featureIndex = new Map(); - for (const feature of featureFiles) { - const metadata = extractProcessMetadata(feature); - if (metadata) { - featureIndex.set(metadata.pattern, { metadata, file: feature }); - } - } - // Combine matching patterns - for (const [patternName, codePatternArray] of codeIndex.entries()) { - const featureData = featureIndex.get(patternName); - if (!featureData) { - // Code-only patterns (no matching feature) - codeOnly.push(...codePatternArray); - continue; - } - const { metadata: processMetadata, file: featureFile } = featureData; - // Handle pattern collision (multiple code sources for same pattern name) - const hasCollision = codePatternArray.length > 1; - const primaryPattern = codePatternArray[0]; - if (!primaryPattern) { - // Should never happen but TypeScript needs the check - console.warn(`Pattern "${patternName}" has no code patterns in array`); - continue; - } - // Cross-validate: Phase must match (if both present) - if (primaryPattern.phase !== undefined && processMetadata.phase !== primaryPattern.phase) { - validationErrors.push({ - codeName: patternName, - featureName: processMetadata.pattern, - codePhase: primaryPattern.phase, - featurePhase: processMetadata.phase, - sources: { - code: primaryPattern.source.file, - feature: featureFile.filePath, - }, - message: `Phase mismatch: code has ${primaryPattern.phase}, feature has ${processMetadata.phase}`, - }); - // Still combine but note the error - } - // Extract deliverables from feature - const deliverables = extractDeliverables(featureFile); - // Note: ExtractedPattern has 'category' (singular), not 'categories' (plural) - // For collision handling, we use the primary pattern's category - // Future enhancement: could merge categories if schema changes - // Merge dependencies (union) - const mergedDependsOn = hasCollision - ? Array.from(new Set(codePatternArray.flatMap((p) => p.dependsOn ?? []))) - : primaryPattern.dependsOn; - // Merge enables (union) - const mergedEnables = hasCollision - ? Array.from(new Set(codePatternArray.flatMap((p) => p.enables ?? []))) - : primaryPattern.enables; - // Combine into dual-source pattern - // Destructure to exclude existing deliverables (exactOptionalPropertyTypes requires this) - const { deliverables: _existingDeliverables, ...patternWithoutDeliverables } = primaryPattern; - const dualSourcePattern = { - ...patternWithoutDeliverables, - ...(mergedDependsOn && mergedDependsOn.length > 0 && { dependsOn: mergedDependsOn }), - ...(mergedEnables && mergedEnables.length > 0 && { enables: mergedEnables }), - process: processMetadata, - ...(deliverables.length > 0 && { deliverables }), - ...(hasCollision && { sources: codePatternArray }), - }; - combined.push(dualSourcePattern); - // Collect warning about collision (structured, not console.warn) - if (hasCollision) { - warnings.push(`Pattern name collision: "${patternName}" defined in ${codePatternArray.length} files: ` + - codePatternArray.map((p) => p.source.file).join(', ')); - } - // Remove from feature index (mark as matched) - featureIndex.delete(patternName); - } - // Remaining features are feature-only (no matching code) - for (const [_, { metadata }] of featureIndex.entries()) { - featureOnly.push(metadata); - } - return { - patterns: combined, - codeOnly, - featureOnly, - validationErrors, - warnings, - }; -} -/** - * Validate dual-source consistency - * - * Checks that patterns are properly aligned across sources. - * Reports code stubs without features and features without code. - * - * @param results - Dual-source extraction results - * @returns Validation summary - */ -export function validateDualSource(results) { - const errors = []; - const warnings = []; - // Errors: Cross-validation failures - for (const error of results.validationErrors) { - errors.push(`${error.codeName}: ${error.message}`); - } - // Warnings: Orphaned stubs (code without feature) - for (const pattern of results.codeOnly) { - if (pattern.status === DEFAULT_STATUS) { - const name = getPatternName(pattern); - warnings.push(`Roadmap pattern "${name}" has code stub but no feature file`); - } - } - // Warnings: Features without code stubs - for (const metadata of results.featureOnly) { - if (metadata.status === DEFAULT_STATUS) { - warnings.push(`Feature "${metadata.pattern}" (phase ${metadata.phase}) has no code stub`); - } - } - return { - isValid: errors.length === 0, - errors, - warnings, - }; -} -//# sourceMappingURL=dual-source-extractor.js.map \ No newline at end of file diff --git a/dist/extractor/dual-source-extractor.js.map b/dist/extractor/dual-source-extractor.js.map deleted file mode 100644 index 6b90d4f0..00000000 --- a/dist/extractor/dual-source-extractor.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"dual-source-extractor.js","sourceRoot":"","sources":["../../src/extractor/dual-source-extractor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAGH,OAAO,EAAE,cAAc,EAAE,MAA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AK,CAAC,QAAQ,KAAK,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;IACrD,CAAC;IAED,kDAAkD;IAClD,KAAK,MAAM,OAAO,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;QACvC,IAAI,OAAO,CAAC,MAAM,KAAK,cAAc,EAAE,CAAC;YACtC,MAAM,IAAI,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;YACrC,QAAQ,CAAC,IAAI,CAAC,oBAAoB,IAAI,qCAAqC,CAAC,CAAC;QAC/E,CAAC;IACH,CAAC;IAED,wCAAwC;IACxC,KAAK,MAAM,QAAQ,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;QAC3C,IAAI,QAAQ,CAAC,MAAM,KAAK,cAAc,EAAE,CAAC;YACvC,QAAQ,CAAC,IAAI,CAAC,YAAY,QAAQ,CAAC,OAAO,YAAY,QAAQ,CAAC,KAAK,oBAAoB,CAAC,CAAC;QAC5F,CAAC;IACH,CAAC;IAED,OAAO;QACL,OAAO,EAAE,MAAM,CAAC,MAAM,KAAK,CAAC;QAC5B,MAAM;QACN,QAAQ;KACT,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/dist/extractor/gherkin-extractor.d.ts b/dist/extractor/gherkin-extractor.d.ts deleted file mode 100644 index fe5b3a0b..00000000 --- a/dist/extractor/gherkin-extractor.d.ts +++ /dev/null @@ -1,170 +0,0 @@ -/** - * @libar-docs - * @libar-docs-extractor - * @libar-docs-pattern GherkinExtractor - * @libar-docs-status completed - * @libar-docs-implements GherkinRulesSupport - * @libar-docs-uses GherkinTypes, GherkinASTParser - * @libar-docs-used-by DualSourceExtractor, Orchestrator - * @libar-docs-arch-role service - * @libar-docs-arch-context extractor - * @libar-docs-arch-layer application - * - * ## GherkinExtractor - Convert Feature Files to Pattern Documentation - * - * Transforms scanned Gherkin feature files into ExtractedPattern objects - * for inclusion in generated documentation. Maps feature tags, descriptions, - * and scenarios to pattern metadata. - * - * ### When to Use - * - * - When building multi-source documentation (TypeScript + Gherkin) - * - When converting acceptance criteria to pattern documentation - * - When defining roadmap patterns in .feature files before implementation - * - * ### Key Concepts - * - * - **Feature → Pattern**: Feature name becomes pattern name - * - **Tags → Metadata**: @pattern:Name, @phase:N map to pattern fields - * - **Scenarios → Use Cases**: Acceptance criteria become "When to Use" examples - */ -import type { ScannedGherkinFile } from '../validation-schemas/feature.js'; -import { type ExtractedPattern } from '../validation-schemas/extracted-pattern.js'; -import type { TagRegistry } from '../validation-schemas/tag-registry.js'; -import { type GherkinPatternValidationError } from '../types/errors.js'; -/** - * Semantic tags for scenario categorization. - * - * These tags identify the nature of a scenario (e.g., happy-path, validation) - * and are extracted from scenario tags during pattern extraction. - */ -export declare const SEMANTIC_SCENARIO_TAGS: readonly ["happy-path", "validation", "business-failure", "business-rule", "compensation", "idempotency", "expiration", "workflow-state"]; -/** - * Configuration for Gherkin extractor - */ -export interface GherkinExtractorConfig { - /** Base directory for computing relative paths */ - readonly baseDir: string; - /** Tag registry for category inference */ - readonly tagRegistry?: TagRegistry; - /** Convert scenarios to "When to Use" examples (default: true) */ - readonly scenariosAsUseCases?: boolean; -} -/** - * Result of Gherkin pattern extraction - * - * Contains both successfully extracted patterns and any validation errors - * encountered during extraction. This enables partial success scenarios - * where some patterns extract successfully while others fail validation. - */ -export interface GherkinExtractionResult { - /** Successfully extracted patterns */ - readonly patterns: readonly ExtractedPattern[]; - /** Validation errors for patterns that failed extraction */ - readonly errors: readonly GherkinPatternValidationError[]; -} -/** - * Extract patterns from scanned Gherkin feature files - * - * Converts feature file metadata into ExtractedPattern objects that can be - * merged with TypeScript-sourced patterns for unified documentation generation. - * - * Returns both successfully extracted patterns and validation errors for - * patterns that failed extraction. This enables partial success scenarios. - * - * @param scannedFiles - Array of scanned Gherkin files - * @param config - Extractor configuration (requires baseDir for relative paths) - * @returns Object containing extracted patterns and any validation errors - * - * @example - * ```typescript - * const scanResult = await scanGherkinFiles({ - * patterns: 'tests/features/roadmap/**\/*.feature' - * }); - * - * if (scanResult.ok) { - * const { patterns, errors } = extractPatternsFromGherkin(scanResult.value.files, { - * baseDir: process.cwd() - * }); - * console.log(`${patterns.length} patterns extracted, ${errors.length} errors`); - * } - * ``` - */ -export declare function extractPatternsFromGherkin(scannedFiles: readonly ScannedGherkinFile[], config: GherkinExtractorConfig): GherkinExtractionResult; -/** - * Infer behavior file path from timeline feature file path using convention - * - * Convention: `timeline/phase-N[suffix]-name.feature` → `behavior/name.feature` - * - * Handles edge cases: - * - `phase-37-remaining-work-enhancement.feature` → `remaining-work-enhancement.feature` - * - `phase-02b-enhanced-dogfooding.feature` → `enhanced-dogfooding.feature` - * - `phase-03-watch-mode.feature` → `watch-mode.feature` - * - * @param timelineFilePath - Relative path to timeline feature file - * @returns Inferred behavior file path, or undefined if not a timeline file - */ -export declare function inferBehaviorFilePath(timelineFilePath: string): string | undefined; -/** - * Extract patterns from scanned Gherkin feature files (async variant) - * - * This is the async version of `extractPatternsFromGherkin` that performs - * file existence checks asynchronously in parallel, avoiding event loop blocking. - * - * Use this variant when processing many feature files or when running on - * systems with slow disk I/O. - * - * @param scannedFiles - Array of scanned Gherkin files - * @param config - Extractor configuration (requires baseDir for relative paths) - * @returns Promise resolving to extracted patterns and validation errors - * - * @example - * ```typescript - * const scanResult = await scanGherkinFiles({ - * patterns: 'tests/features/roadmap/**\/*.feature' - * }); - * - * if (scanResult.ok) { - * const { patterns, errors } = await extractPatternsFromGherkinAsync( - * scanResult.value.files, - * { baseDir: process.cwd() } - * ); - * } - * ``` - */ -export declare function extractPatternsFromGherkinAsync(scannedFiles: readonly ScannedGherkinFile[], config: GherkinExtractorConfig): Promise; -/** - * Compute children arrays from parent references - * - * Post-processing step that populates the `children` field on each pattern - * by finding all patterns that reference it via their `parent` field. - * - * This enables bidirectional hierarchy navigation: - * - Child → Parent: via `parent` field (explicit in feature file) - * - Parent → Children: via `children` field (computed here) - * - * **Performance Note:** This function does NOT re-validate patterns through - * the schema because: - * 1. Input patterns have already been validated by extractPatternsFromGherkin() - * 2. We're only adding a `children: string[]` field which matches the schema - * 3. Re-validation of the complex ExtractedPatternSchema is expensive (~320 lines) - * - * This invariant is safe because: - * - The children array is derived from validated pattern names - * - ExtractedPatternSchema.children is defined as `z.array(z.string()).readonly().optional()` - * - * @param patterns - Array of validated ExtractedPattern objects - * @returns New array with `children` populated (does not mutate input) - * - * @example - * ```typescript - * const rawPatterns = extractPatternsFromGherkin(files, config); - * const patternsWithHierarchy = computeHierarchyChildren(rawPatterns); - * - * // Now epic patterns have children arrays - * const epic = patternsWithHierarchy.find(p => p.level === 'epic'); - * console.log(epic.children); // ["PhaseA", "PhaseB"] - * ``` - */ -export declare function computeHierarchyChildren(patterns: readonly ExtractedPattern[]): ExtractedPattern[]; -//# sourceMappingURL=gherkin-extractor.d.ts.map \ No newline at end of file diff --git a/dist/extractor/gherkin-extractor.d.ts.map b/dist/extractor/gherkin-extractor.d.ts.map deleted file mode 100644 index 768af9a3..00000000 --- a/dist/extractor/gherkin-extractor.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"gherkin-extractor.d.ts","sourceRoot":"","sources":["../../src/extractor/gherkin-extractor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAOH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,4CAA4C,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAMzE,OAAO,EAEL,KAAK,6BAA6B,EACnC,MAAM,oBAAoB,CAAC;AAQ5B;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,2IASzB,CAAC;AAgCX;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,kDAAkD;IAClD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,0CAA0C;IAC1C,QAAQ,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC;IACnC,kEAAkE;IAClE,QAAQ,CAAC,mBAAmB,CAAC,EAAE,OAAO,CAAC;CACxC;AAED;;;;;;GAMG;AACH,MAAM,WAAW,uBAAuB;IACtC,sCAAsC;IACtC,QAAQ,CAAC,QAAQ,EAAE,SAAS,gBAAgB,EAAE,CAAC;IAC/C,4DAA4D;IAC5D,QAAQ,CAAC,MAAM,EAAE,SAAS,6BAA6B,EAAE,CAAC;CAC3D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,0BAA0B,CACxC,YAAY,EAAE,SAAS,kBAAkB,EAAE,EAC3C,MAAM,EAAE,sBAAsB,GAC7B,uBAAuB,CAwPzB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,qBAAqB,CAAC,gBAAgB,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAOlF;AA+BD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAsB,+BAA+B,CACnD,YAAY,EAAE,SAAS,kBAAkB,EAAE,EAC3C,MAAM,EAAE,sBAAsB,GAC7B,OAAO,CAAC,uBAAuB,CAAC,CAgNlC;AAQD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,SAAS,gBAAgB,EAAE,GACpC,gBAAgB,EAAE,CA4BpB"} \ No newline at end of file diff --git a/dist/extractor/gherkin-extractor.js b/dist/extractor/gherkin-extractor.js deleted file mode 100644 index aebc8abe..00000000 --- a/dist/extractor/gherkin-extractor.js +++ /dev/null @@ -1,641 +0,0 @@ -/** - * @libar-docs - * @libar-docs-extractor - * @libar-docs-pattern GherkinExtractor - * @libar-docs-status completed - * @libar-docs-implements GherkinRulesSupport - * @libar-docs-uses GherkinTypes, GherkinASTParser - * @libar-docs-used-by DualSourceExtractor, Orchestrator - * @libar-docs-arch-role service - * @libar-docs-arch-context extractor - * @libar-docs-arch-layer application - * - * ## GherkinExtractor - Convert Feature Files to Pattern Documentation - * - * Transforms scanned Gherkin feature files into ExtractedPattern objects - * for inclusion in generated documentation. Maps feature tags, descriptions, - * and scenarios to pattern metadata. - * - * ### When to Use - * - * - When building multi-source documentation (TypeScript + Gherkin) - * - When converting acceptance criteria to pattern documentation - * - When defining roadmap patterns in .feature files before implementation - * - * ### Key Concepts - * - * - **Feature → Pattern**: Feature name becomes pattern name - * - **Tags → Metadata**: @pattern:Name, @phase:N map to pattern fields - * - **Scenarios → Use Cases**: Acceptance criteria become "When to Use" examples - */ -// TODO: Abstract filesystem operations for future Convex migration. -// Direct fs/path usage should be moved to injected interface (via GherkinExtractorConfig) -// or deferred to CLI-layer orchestration. See PR-79 comment #042. -import * as fs from 'node:fs'; -import * as path from 'node:path'; -import { ExtractedPatternSchema, } from '../validation-schemas/extracted-pattern.js'; -import { extractPatternTags } from '../scanner/gherkin-ast-parser.js'; -import { asPatternId, asCategoryName, asSourceFilePath, asDirectiveTag } from '../types/branded.js'; -import { inferFeatureLayer } from './layer-inference.js'; -import { extractDeliverables } from './dual-source-extractor.js'; -import { createGherkinPatternValidationError, } from '../types/errors.js'; -import { generatePatternId } from '../utils/index.js'; -import { getPatternName } from '../api/pattern-helpers.js'; -// ============================================================================= -// Constants -// ============================================================================= -/** - * Semantic tags for scenario categorization. - * - * These tags identify the nature of a scenario (e.g., happy-path, validation) - * and are extracted from scenario tags during pattern extraction. - */ -export const SEMANTIC_SCENARIO_TAGS = [ - 'happy-path', - 'validation', - 'business-failure', - 'business-rule', - 'compensation', - 'idempotency', - 'expiration', - 'workflow-state', -]; -/** - * Assign a property to an object only if the value is defined (not undefined/null). - * - * Performance optimization: Avoids creating intermediate objects from conditional spreads. - * Instead of `...(x && { field: x })` which creates a temporary object, - * this directly assigns to the target object. - * - * @internal - */ -function assignIfDefined(obj, key, value) { - if (value !== undefined && value !== null) { - obj[key] = value; - } -} -/** - * Assign a property to an object only if the array is non-empty. - * - * @internal - */ -function assignIfNonEmpty(obj, key, arr) { - if (arr && arr.length > 0) { - obj[key] = arr; - } -} -/** - * Extract patterns from scanned Gherkin feature files - * - * Converts feature file metadata into ExtractedPattern objects that can be - * merged with TypeScript-sourced patterns for unified documentation generation. - * - * Returns both successfully extracted patterns and validation errors for - * patterns that failed extraction. This enables partial success scenarios. - * - * @param scannedFiles - Array of scanned Gherkin files - * @param config - Extractor configuration (requires baseDir for relative paths) - * @returns Object containing extracted patterns and any validation errors - * - * @example - * ```typescript - * const scanResult = await scanGherkinFiles({ - * patterns: 'tests/features/roadmap/**\/*.feature' - * }); - * - * if (scanResult.ok) { - * const { patterns, errors } = extractPatternsFromGherkin(scanResult.value.files, { - * baseDir: process.cwd() - * }); - * console.log(`${patterns.length} patterns extracted, ${errors.length} errors`); - * } - * ``` - */ -export function extractPatternsFromGherkin(scannedFiles, config) { - const patterns = []; - const errors = []; - const { baseDir } = config; - const scenariosAsUseCases = config.scenariosAsUseCases ?? true; - for (const file of scannedFiles) { - const { feature, scenarios, rules, filePath } = file; - // Convert absolute path to relative path from baseDir - const relativePath = path.relative(baseDir, filePath); - // Extract pattern metadata from feature tags - const metadata = extractPatternTags(feature.tags); - // Skip if no @libar-docs opt-in marker (consistent with TypeScript requirement) - // The marker normalizes to 'libar-docs' after stripping the @ prefix - const hasOptIn = feature.tags.some((tag) => tag === 'libar-docs' || tag === '@libar-docs'); - if (!hasOptIn) { - continue; - } - // Skip if no pattern tag (not a pattern definition) - if (!metadata.pattern) { - continue; - } - // Skip if no status tag (pattern reference for scenario mapping, not a pattern definition) - // Roadmap patterns MUST have @status:roadmap, @status:active, or @status:completed - if (!metadata.status) { - continue; - } - // Determine pattern name (from @pattern:Name tag or feature name) - const patternName = metadata.pattern || feature.name; - // Determine category (from category tags or default to first one) - const categories = metadata.categories ?? []; - const primaryCategory = categories[0] ?? 'ddd'; - // Extract "When to Use" from scenarios if enabled - const whenToUse = []; - if (scenariosAsUseCases) { - for (const scenario of scenarios) { - // Only include scenarios tagged with @acceptance-criteria - if (scenario.tags.includes('acceptance-criteria')) { - whenToUse.push(`When ${scenario.name.toLowerCase()}`); - } - } - } - // Create pattern ID from file path and line number (deterministic) - const patternId = asPatternId(generatePatternId(relativePath, feature.line)); - // Extract deliverables from Background table - const deliverables = extractDeliverables(file); - // Infer and verify behavior file for traceability - let behaviorFile = metadata.behaviorFile; - let behaviorFileVerified; - if (!behaviorFile) { - // Infer from convention: timeline/phase-N-name.feature → behavior/name.feature - const inferred = inferBehaviorFilePath(relativePath); - if (inferred) { - behaviorFile = inferred; - // Verify file exists on disk - const absolutePath = path.join(baseDir, inferred); - behaviorFileVerified = fileExistsSync(absolutePath); - } - } - else { - // Verify explicit tag path exists - const absolutePath = path.join(baseDir, behaviorFile); - behaviorFileVerified = fileExistsSync(absolutePath); - } - // Build raw pattern object using explicit property assignment for performance - // This avoids ~50 intermediate objects created by conditional spreads - const directive = { - // Preserve ALL tags (including value tags like claude-md-section:validation) - // Tags are stored as @libar-docs-{tag} to match TypeScript directive format - tags: feature.tags.map((tag) => asDirectiveTag(`@libar-docs-${tag}`)), - description: feature.description, - examples: [], - position: { - startLine: feature.line, - endLine: feature.line, - }, - status: metadata.status, - phase: metadata.phase, - }; - // Directive optional fields - assignIfDefined(directive, 'patternName', metadata.pattern); - assignIfDefined(directive, 'brief', metadata.brief); - assignIfNonEmpty(directive, 'dependsOn', metadata.dependsOn); - assignIfNonEmpty(directive, 'enables', metadata.enables); - assignIfDefined(directive, 'quarter', metadata.quarter); - assignIfDefined(directive, 'completed', metadata.completed); - assignIfDefined(directive, 'effort', metadata.effort); - assignIfDefined(directive, 'team', metadata.team); - assignIfDefined(directive, 'workflow', metadata.workflow); - assignIfDefined(directive, 'risk', metadata.risk); - assignIfDefined(directive, 'priority', metadata.priority); - const rawPattern = { - id: patternId, - name: patternName, - category: asCategoryName(primaryCategory), - directive, - code: '', // No code for Gherkin-sourced patterns - source: { - file: asSourceFilePath(relativePath), - lines: [feature.line, feature.line], - }, - exports: [], - extractedAt: new Date().toISOString(), - patternName, - status: metadata.status, - }; - // Pattern-level optional fields (explicit assignment avoids intermediate objects) - if (metadata.phase !== undefined) - rawPattern['phase'] = metadata.phase; - assignIfDefined(rawPattern, 'release', metadata.release); - assignIfDefined(rawPattern, 'brief', metadata.brief); - assignIfNonEmpty(rawPattern, 'dependsOn', metadata.dependsOn); - assignIfNonEmpty(rawPattern, 'enables', metadata.enables); - // UML-inspired relationship fields (PatternRelationshipModel) - assignIfNonEmpty(rawPattern, 'implementsPatterns', metadata.implementsPatterns); - assignIfDefined(rawPattern, 'extendsPattern', metadata.extendsPattern); - // Design session stub metadata - assignIfDefined(rawPattern, 'targetPath', metadata.target); - assignIfDefined(rawPattern, 'since', metadata.since); - assignIfDefined(rawPattern, 'quarter', metadata.quarter); - assignIfDefined(rawPattern, 'completed', metadata.completed); - assignIfDefined(rawPattern, 'effort', metadata.effort); - assignIfDefined(rawPattern, 'effortActual', metadata.effortActual); - assignIfDefined(rawPattern, 'team', metadata.team); - assignIfDefined(rawPattern, 'workflow', metadata.workflow); - assignIfDefined(rawPattern, 'risk', metadata.risk); - assignIfDefined(rawPattern, 'priority', metadata.priority); - assignIfDefined(rawPattern, 'productArea', metadata.productArea); - assignIfDefined(rawPattern, 'userRole', metadata.userRole); - assignIfDefined(rawPattern, 'businessValue', metadata.businessValue); - // Hierarchy support (epic/phase/task) - assignIfDefined(rawPattern, 'level', metadata.level); - assignIfDefined(rawPattern, 'parent', metadata.parent); - // Discovery findings from retrospective tags - assignIfNonEmpty(rawPattern, 'discoveredGaps', metadata.discoveredGaps); - assignIfNonEmpty(rawPattern, 'discoveredImprovements', metadata.discoveredImprovements); - assignIfNonEmpty(rawPattern, 'discoveredRisks', metadata.discoveredRisks); - assignIfNonEmpty(rawPattern, 'discoveredLearnings', metadata.discoveredLearnings); - // Technical constraints from @libar-docs-constraint tags - assignIfNonEmpty(rawPattern, 'constraints', metadata.constraints); - // ADR (Architecture Decision Record) fields - assignIfDefined(rawPattern, 'adr', metadata.adr); - assignIfDefined(rawPattern, 'adrStatus', metadata.adrStatus); - assignIfDefined(rawPattern, 'adrCategory', metadata.adrCategory); - assignIfDefined(rawPattern, 'adrSupersedes', metadata.adrSupersedes); - assignIfDefined(rawPattern, 'adrSupersededBy', metadata.adrSupersededBy); - assignIfDefined(rawPattern, 'adrTheme', metadata.adrTheme); - assignIfDefined(rawPattern, 'adrLayer', metadata.adrLayer); - // Convention tags for reference document generation - assignIfNonEmpty(rawPattern, 'convention', metadata.convention); - // Cross-cutting document inclusion tags - assignIfNonEmpty(rawPattern, 'include', metadata.include); - // NOTE: ADR content is now derived from Gherkin Rule: keywords - // (Context, Decision, Consequences) instead of parsed markdown. - // The rules array is populated below and rendered by the ADR codec. - // When to use - assignIfNonEmpty(rawPattern, 'whenToUse', whenToUse); - // Map scenarios to scenario refs with full structure including steps - if (scenarios.length > 0) { - rawPattern['scenarios'] = scenarios.map((scenario) => { - const scenarioRef = { - featureFile: relativePath, - featureName: feature.name, - featureDescription: feature.description, - scenarioName: scenario.name, - semanticTags: scenario.tags.filter((tag) => SEMANTIC_SCENARIO_TAGS.includes(tag)), - tags: scenario.tags, - layer: inferFeatureLayer(filePath), - line: scenario.line, - }; - // Include full step data for enhanced acceptance criteria rendering - if (scenario.steps.length > 0) { - scenarioRef['steps'] = scenario.steps.map((step) => { - const stepObj = { - keyword: step.keyword, - text: step.text, - }; - assignIfDefined(stepObj, 'dataTable', step.dataTable); - assignIfDefined(stepObj, 'docString', step.docString); - return stepObj; - }); - } - return scenarioRef; - }); - } - // Add deliverables if present (from Background table) - assignIfNonEmpty(rawPattern, 'deliverables', deliverables); - // Add behavior file traceability fields - assignIfDefined(rawPattern, 'behaviorFile', behaviorFile); - if (behaviorFileVerified !== undefined) { - rawPattern['behaviorFileVerified'] = behaviorFileVerified; - } - // Add rules if present (Gherkin v6+ business rule groupings) - if (rules && rules.length > 0) { - rawPattern['rules'] = rules.map((rule) => ({ - name: rule.name, - description: rule.description, - scenarioCount: rule.scenarios.length, - scenarioNames: rule.scenarios.map((s) => s.name), - })); - } - // Validate against schema (schema-first enforcement) - const validation = ExtractedPatternSchema.safeParse(rawPattern); - if (!validation.success) { - // Collect validation error instead of console.warn - errors.push(createGherkinPatternValidationError(relativePath, patternName, 'Schema validation failed', validation.error.issues.map((i) => `${i.path.join('.')}: ${i.message}`))); - continue; - } - patterns.push(validation.data); - } - return { patterns, errors }; -} -/** - * Infer behavior file path from timeline feature file path using convention - * - * Convention: `timeline/phase-N[suffix]-name.feature` → `behavior/name.feature` - * - * Handles edge cases: - * - `phase-37-remaining-work-enhancement.feature` → `remaining-work-enhancement.feature` - * - `phase-02b-enhanced-dogfooding.feature` → `enhanced-dogfooding.feature` - * - `phase-03-watch-mode.feature` → `watch-mode.feature` - * - * @param timelineFilePath - Relative path to timeline feature file - * @returns Inferred behavior file path, or undefined if not a timeline file - */ -export function inferBehaviorFilePath(timelineFilePath) { - // Match: phase-NN[a-z]?-name.feature (supports phase-02b, phase-37, etc.) - const match = /phase-\d+[a-z]?-(.+)\.feature$/.exec(timelineFilePath); - if (match?.[1]) { - return `tests/features/behavior/${match[1]}.feature`; - } - return undefined; -} -/** - * Check if a file exists at the given path (sync) - * - * @param filePath - Absolute path to check - * @returns true if file exists, false otherwise - */ -function fileExistsSync(filePath) { - try { - return fs.existsSync(filePath); - } - catch { - return false; - } -} -/** - * Check if a file exists at the given path (async) - * - * @param filePath - Absolute path to check - * @returns Promise resolving to true if file exists, false otherwise - */ -async function fileExistsAsync(filePath) { - try { - await fs.promises.access(filePath); - return true; - } - catch { - return false; - } -} -/** - * Extract patterns from scanned Gherkin feature files (async variant) - * - * This is the async version of `extractPatternsFromGherkin` that performs - * file existence checks asynchronously in parallel, avoiding event loop blocking. - * - * Use this variant when processing many feature files or when running on - * systems with slow disk I/O. - * - * @param scannedFiles - Array of scanned Gherkin files - * @param config - Extractor configuration (requires baseDir for relative paths) - * @returns Promise resolving to extracted patterns and validation errors - * - * @example - * ```typescript - * const scanResult = await scanGherkinFiles({ - * patterns: 'tests/features/roadmap/**\/*.feature' - * }); - * - * if (scanResult.ok) { - * const { patterns, errors } = await extractPatternsFromGherkinAsync( - * scanResult.value.files, - * { baseDir: process.cwd() } - * ); - * } - * ``` - */ -export async function extractPatternsFromGherkinAsync(scannedFiles, config) { - const { baseDir } = config; - const scenariosAsUseCases = config.scenariosAsUseCases ?? true; - const patternsToVerify = []; - const errors = []; - for (const file of scannedFiles) { - const { feature, scenarios, rules, filePath } = file; - const relativePath = path.relative(baseDir, filePath); - const metadata = extractPatternTags(feature.tags); - // Skip if no @libar-docs opt-in marker (consistent with TypeScript requirement) - const hasOptIn = feature.tags.some((tag) => tag === 'libar-docs' || tag === '@libar-docs'); - if (!hasOptIn) - continue; - // Skip if no pattern or status tag - if (!metadata.pattern || !metadata.status) - continue; - const patternName = metadata.pattern || feature.name; - const categories = metadata.categories ?? []; - const primaryCategory = categories[0] ?? 'ddd'; - const whenToUse = []; - if (scenariosAsUseCases) { - for (const scenario of scenarios) { - if (scenario.tags.includes('acceptance-criteria')) { - whenToUse.push(`When ${scenario.name.toLowerCase()}`); - } - } - } - const patternId = asPatternId(generatePatternId(relativePath, feature.line)); - const deliverables = extractDeliverables(file); - // Infer behavior file path but DON'T verify yet - let behaviorFile = metadata.behaviorFile; - let behaviorPathToVerify; - if (!behaviorFile) { - const inferred = inferBehaviorFilePath(relativePath); - if (inferred) { - behaviorFile = inferred; - behaviorPathToVerify = path.join(baseDir, inferred); - } - } - else { - behaviorPathToVerify = path.join(baseDir, behaviorFile); - } - // Build pattern object (same as sync version but without behaviorFileVerified) - const directive = { - // Preserve ALL tags (including value tags like claude-md-section:validation) - tags: feature.tags.map((tag) => asDirectiveTag(`@libar-docs-${tag}`)), - description: feature.description, - examples: [], - position: { startLine: feature.line, endLine: feature.line }, - status: metadata.status, - phase: metadata.phase, - }; - assignIfDefined(directive, 'patternName', metadata.pattern); - assignIfDefined(directive, 'brief', metadata.brief); - assignIfNonEmpty(directive, 'dependsOn', metadata.dependsOn); - assignIfNonEmpty(directive, 'enables', metadata.enables); - assignIfDefined(directive, 'quarter', metadata.quarter); - assignIfDefined(directive, 'completed', metadata.completed); - assignIfDefined(directive, 'effort', metadata.effort); - assignIfDefined(directive, 'team', metadata.team); - assignIfDefined(directive, 'workflow', metadata.workflow); - assignIfDefined(directive, 'risk', metadata.risk); - assignIfDefined(directive, 'priority', metadata.priority); - const rawPattern = { - id: patternId, - name: patternName, - category: asCategoryName(primaryCategory), - directive, - code: '', - source: { - file: asSourceFilePath(relativePath), - lines: [feature.line, feature.line], - }, - exports: [], - extractedAt: new Date().toISOString(), - patternName, - status: metadata.status, - }; - if (metadata.phase !== undefined) - rawPattern['phase'] = metadata.phase; - assignIfDefined(rawPattern, 'release', metadata.release); - assignIfDefined(rawPattern, 'brief', metadata.brief); - assignIfNonEmpty(rawPattern, 'dependsOn', metadata.dependsOn); - assignIfNonEmpty(rawPattern, 'enables', metadata.enables); - // UML-inspired relationship fields (PatternRelationshipModel) - assignIfNonEmpty(rawPattern, 'implementsPatterns', metadata.implementsPatterns); - assignIfDefined(rawPattern, 'extendsPattern', metadata.extendsPattern); - // Design session stub metadata - assignIfDefined(rawPattern, 'targetPath', metadata.target); - assignIfDefined(rawPattern, 'since', metadata.since); - assignIfDefined(rawPattern, 'quarter', metadata.quarter); - assignIfDefined(rawPattern, 'completed', metadata.completed); - assignIfDefined(rawPattern, 'effort', metadata.effort); - assignIfDefined(rawPattern, 'team', metadata.team); - assignIfDefined(rawPattern, 'workflow', metadata.workflow); - assignIfDefined(rawPattern, 'risk', metadata.risk); - assignIfDefined(rawPattern, 'priority', metadata.priority); - assignIfDefined(rawPattern, 'productArea', metadata.productArea); - assignIfDefined(rawPattern, 'userRole', metadata.userRole); - assignIfDefined(rawPattern, 'businessValue', metadata.businessValue); - assignIfDefined(rawPattern, 'level', metadata.level); - assignIfDefined(rawPattern, 'parent', metadata.parent); - assignIfNonEmpty(rawPattern, 'discoveredGaps', metadata.discoveredGaps); - assignIfNonEmpty(rawPattern, 'discoveredImprovements', metadata.discoveredImprovements); - assignIfNonEmpty(rawPattern, 'discoveredRisks', metadata.discoveredRisks); - assignIfNonEmpty(rawPattern, 'discoveredLearnings', metadata.discoveredLearnings); - assignIfNonEmpty(rawPattern, 'constraints', metadata.constraints); - assignIfDefined(rawPattern, 'adr', metadata.adr); - assignIfDefined(rawPattern, 'adrStatus', metadata.adrStatus); - assignIfDefined(rawPattern, 'adrCategory', metadata.adrCategory); - assignIfDefined(rawPattern, 'adrSupersedes', metadata.adrSupersedes); - assignIfDefined(rawPattern, 'adrSupersededBy', metadata.adrSupersededBy); - assignIfNonEmpty(rawPattern, 'convention', metadata.convention); - // Cross-cutting document inclusion tags - assignIfNonEmpty(rawPattern, 'include', metadata.include); - // NOTE: ADR content derived from Gherkin Rule: keywords, not parsed markdown - assignIfNonEmpty(rawPattern, 'whenToUse', whenToUse); - if (scenarios.length > 0) { - rawPattern['scenarios'] = scenarios.map((scenario) => { - const scenarioRef = { - featureFile: relativePath, - featureName: feature.name, - featureDescription: feature.description, - scenarioName: scenario.name, - semanticTags: scenario.tags.filter((tag) => SEMANTIC_SCENARIO_TAGS.includes(tag)), - tags: scenario.tags, - layer: inferFeatureLayer(filePath), - line: scenario.line, - }; - if (scenario.steps.length > 0) { - scenarioRef['steps'] = scenario.steps.map((step) => { - const stepObj = { keyword: step.keyword, text: step.text }; - assignIfDefined(stepObj, 'dataTable', step.dataTable); - assignIfDefined(stepObj, 'docString', step.docString); - return stepObj; - }); - } - return scenarioRef; - }); - } - assignIfNonEmpty(rawPattern, 'deliverables', deliverables); - assignIfDefined(rawPattern, 'behaviorFile', behaviorFile); - if (rules && rules.length > 0) { - rawPattern['rules'] = rules.map((rule) => ({ - name: rule.name, - description: rule.description, - scenarioCount: rule.scenarios.length, - scenarioNames: rule.scenarios.map((s) => s.name), - })); - } - const validation = ExtractedPatternSchema.safeParse(rawPattern); - if (!validation.success) { - errors.push(createGherkinPatternValidationError(relativePath, patternName, 'Schema validation failed', validation.error.issues.map((i) => `${i.path.join('.')}: ${i.message}`))); - continue; - } - // Use explicit conditional to satisfy exactOptionalPropertyTypes - // (undefined is not the same as "property not present") - if (behaviorPathToVerify !== undefined) { - patternsToVerify.push({ pattern: validation.data, behaviorPathToVerify }); - } - else { - patternsToVerify.push({ pattern: validation.data }); - } - } - // Second pass: Batch async verification of all behavior file paths - const verificationPromises = patternsToVerify.map(async ({ pattern, behaviorPathToVerify }) => { - if (behaviorPathToVerify) { - const exists = await fileExistsAsync(behaviorPathToVerify); - // Return pattern with behaviorFileVerified set - return { ...pattern, behaviorFileVerified: exists }; - } - return pattern; - }); - const patterns = await Promise.all(verificationPromises); - return { patterns, errors }; -} -// NOTE: extractAdrContent() was removed as part of Issue #99. -// ADR content (context, decision, consequences) is now derived from -// Gherkin Rule: keywords instead of parsed markdown in feature descriptions. -// Rules prefixed with "Context -", "Decision -", "Consequences -" are -// semantically detected and rendered by the ADR codec. -/** - * Compute children arrays from parent references - * - * Post-processing step that populates the `children` field on each pattern - * by finding all patterns that reference it via their `parent` field. - * - * This enables bidirectional hierarchy navigation: - * - Child → Parent: via `parent` field (explicit in feature file) - * - Parent → Children: via `children` field (computed here) - * - * **Performance Note:** This function does NOT re-validate patterns through - * the schema because: - * 1. Input patterns have already been validated by extractPatternsFromGherkin() - * 2. We're only adding a `children: string[]` field which matches the schema - * 3. Re-validation of the complex ExtractedPatternSchema is expensive (~320 lines) - * - * This invariant is safe because: - * - The children array is derived from validated pattern names - * - ExtractedPatternSchema.children is defined as `z.array(z.string()).readonly().optional()` - * - * @param patterns - Array of validated ExtractedPattern objects - * @returns New array with `children` populated (does not mutate input) - * - * @example - * ```typescript - * const rawPatterns = extractPatternsFromGherkin(files, config); - * const patternsWithHierarchy = computeHierarchyChildren(rawPatterns); - * - * // Now epic patterns have children arrays - * const epic = patternsWithHierarchy.find(p => p.level === 'epic'); - * console.log(epic.children); // ["PhaseA", "PhaseB"] - * ``` - */ -export function computeHierarchyChildren(patterns) { - // Build a map: parent name → child names - const parentToChildren = new Map(); - for (const pattern of patterns) { - if (pattern.parent) { - const children = parentToChildren.get(pattern.parent) ?? []; - // Use patternName if available, otherwise fall back to name - const childName = getPatternName(pattern); - children.push(childName); - parentToChildren.set(pattern.parent, children); - } - } - // Apply children arrays to patterns - // No re-validation needed - input is already validated and we're only adding children: string[] - return patterns.map((pattern) => { - const patternName = getPatternName(pattern); - const children = parentToChildren.get(patternName); - if (children && children.length > 0) { - // Type-safe spread: pattern is validated ExtractedPattern, children is string[] - // This matches ExtractedPatternSchema.children: z.array(z.string()).readonly().optional() - return { ...pattern, children }; - } - return pattern; - }); -} -//# sourceMappingURL=gherkin-extractor.js.map \ No newline at end of file diff --git a/dist/extractor/gherkin-extractor.js.map b/dist/extractor/gherkin-extractor.js.map deleted file mode 100644 index a5f3ac76..00000000 --- a/dist/extractor/gherkin-extractor.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"gherkin-extractor.js","sourceRoot":"","sources":["../../src/extractor/gherkin-extractor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,oEAAoE;AACpE,0FAA0F;AAC1F,kEAAkE;AAClE,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EACL,sBAAsB,GAEvB,MAAM,4CAA4C,CAAC;AAGpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACpG,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EACL,mCAAmC,GAEpC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EA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B,MAAM,WAAW,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;QAC5C,MAAM,QAAQ,GAAG,gBAAgB,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QAEnD,IAAI,QAAQ,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACpC,gFAAgF;YAChF,0FAA0F;YAC1F,OAAO,EAAE,GAAG,OAAO,EAAE,QAAQ,EAAsB,CAAC;QACtD,CAAC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/dist/extractor/index.d.ts b/dist/extractor/index.d.ts deleted file mode 100644 index a98c1bb7..00000000 --- a/dist/extractor/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export { extractPatterns, buildPattern, inferPatternName, inferCategory, hasAggregationTag, getAggregationTags, type ExtractionResults, type AggregationTags, } from './doc-extractor.js'; -export { extractProcessMetadata, extractDeliverables, combineSources, validateDualSource, type ProcessMetadata, type Deliverable, type DualSourcePattern, type CrossValidationError, type DualSourceResults, type ValidationSummary, } from './dual-source-extractor.js'; -export { inferFeatureLayer, FEATURE_LAYERS, type FeatureLayer } from './layer-inference.js'; -export { extractPatternsFromGherkin, extractPatternsFromGherkinAsync, computeHierarchyChildren, type GherkinExtractorConfig, type GherkinExtractionResult, } from './gherkin-extractor.js'; -export { extractShapes, processExtractShapesTag, renderShapesAsMarkdown, type ProcessExtractShapesResult, } from './shape-extractor.js'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/dist/extractor/index.d.ts.map b/dist/extractor/index.d.ts.map deleted file mode 100644 index 7be5dce6..00000000 --- a/dist/extractor/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/extractor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,KAAK,iBAAiB,EACtB,KAAK,eAAe,GACrB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,cAAc,EACd,kBAAkB,EAClB,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,GACvB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAG5F,OAAO,EACL,0BAA0B,EAC1B,+BAA+B,EAC/B,wBAAwB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,GAC7B,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EACL,aAAa,EACb,uBAAuB,EACvB,sBAAsB,EACtB,KAAK,0BAA0B,GAChC,MAAM,sBAAsB,CAAC"} \ No newline at end of file diff --git a/dist/extractor/index.js b/dist/extractor/index.js deleted file mode 100644 index 479cffbe..00000000 --- a/dist/extractor/index.js +++ /dev/null @@ -1,10 +0,0 @@ -export { extractPatterns, buildPattern, inferPatternName, inferCategory, hasAggregationTag, getAggregationTags, } from './doc-extractor.js'; -// Dual-Source Extraction (USDP) -export { extractProcessMetadata, extractDeliverables, combineSources, validateDualSource, } from './dual-source-extractor.js'; -// Layer Inference -export { inferFeatureLayer, FEATURE_LAYERS } from './layer-inference.js'; -// Gherkin Extraction (Feature File → Pattern) -export { extractPatternsFromGherkin, extractPatternsFromGherkinAsync, computeHierarchyChildren, } from './gherkin-extractor.js'; -// Shape Extraction (ADR-021: Documentation Generation) -export { extractShapes, processExtractShapesTag, renderShapesAsMarkdown, } from './shape-extractor.js'; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/extractor/index.js.map b/dist/extractor/index.js.map deleted file mode 100644 index 7caa1015..00000000 --- a/dist/extractor/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/extractor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,kBAAkB,GAGnB,MAAM,oBAAoB,CAAC;AAE5B,gCAAgC;AAChC,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,cAAc,EACd,kBAAkB,GAOnB,MAAM,4BAA4B,CAAC;AAEpC,kBAAkB;AAClB,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAqB,MAAM,sBAAsB,CAAC;AAE5F,8CAA8C;AAC9C,OAAO,EACL,0BAA0B,EAC1B,+BAA+B,EAC/B,wBAAwB,GAGzB,MAAM,wBAAwB,CAAC;AAEhC,uDAAuD;AACvD,OAAO,EACL,aAAa,EACb,uBAAuB,EACvB,sBAAsB,GAEvB,MAAM,sBAAsB,CAAC"} \ No newline at end of file diff --git a/dist/extractor/layer-inference.d.ts b/dist/extractor/layer-inference.d.ts deleted file mode 100644 index d6c04ac4..00000000 --- a/dist/extractor/layer-inference.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -/** - * @libar-docs - * @libar-docs-extractor - * @libar-docs-pattern LayerInference - * @libar-docs-status completed - * @libar-docs-used-by GherkinExtractor - * - * ## LayerInference - Directory-Based Feature Classification - * - * Infers feature file layer (timeline, domain, integration, e2e, component) - * from directory path patterns. Enables filtering without explicit annotations. - * - * ### When to Use - * - * - When filtering scenarios by testing layer - * - When generating layer-specific documentation - * - When calculating test coverage by layer - */ -/** - * Feature layer classification based on directory structure - * - * @remarks - * Layers represent different testing contexts and documentation purposes: - * - `timeline`: Process documentation features (roadmap, milestones) - * - `domain`: Pure domain logic tests (deciders, command handlers) - * - `integration`: Full-stack integration tests with real backend - * - `e2e`: Browser-based end-to-end user journey tests - * - `component`: Tooling/infrastructure component tests - * - `unknown`: Unclassified features (fallback) - */ -export type FeatureLayer = 'timeline' | 'domain' | 'integration' | 'e2e' | 'component' | 'unknown'; -/** - * All valid feature layers as a readonly array - * - * @remarks - * Useful for validation and schema definitions - */ -export declare const FEATURE_LAYERS: readonly FeatureLayer[]; -/** - * Infer feature layer from file path - * - * Uses directory structure patterns to classify feature files: - * - `/timeline/` → timeline (process documentation) - * - `/deciders/` → domain (pure domain logic) - * - `/orders/`, `/inventory/` (not integration) → domain - * - `/integration-features/`, `/integration/` → integration - * - `/e2e/` → e2e (browser-based tests) - * - `/scanner/`, `/lint/` → component (tooling tests) - * - * @param filePath - Absolute or relative path to feature file - * @returns Inferred layer based on directory patterns - * - * @example - * ```typescript - * inferFeatureLayer('tests/features/timeline/phase-01.feature'); - * // Returns: 'timeline' - * - * inferFeatureLayer('tests/features/deciders/order.decider.feature'); - * // Returns: 'domain' - * - * inferFeatureLayer('tests/integration-features/orders/flow.feature'); - * // Returns: 'integration' - * ``` - */ -export declare function inferFeatureLayer(filePath: string): FeatureLayer; -//# sourceMappingURL=layer-inference.d.ts.map \ No newline at end of file diff --git a/dist/extractor/layer-inference.d.ts.map b/dist/extractor/layer-inference.d.ts.map deleted file mode 100644 index 4e988c96..00000000 --- a/dist/extractor/layer-inference.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"layer-inference.d.ts","sourceRoot":"","sources":["../../src/extractor/layer-inference.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,QAAQ,GAAG,aAAa,GAAG,KAAK,GAAG,WAAW,GAAG,SAAS,CAAC;AAEnG;;;;;GAKG;AACH,eAAO,MAAM,cAAc,EAAE,SAAS,YAAY,EAOxC,CAAC;AAEX;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,YAAY,CA0ChE"} \ No newline at end of file diff --git a/dist/extractor/layer-inference.js b/dist/extractor/layer-inference.js deleted file mode 100644 index 6ab2b8c5..00000000 --- a/dist/extractor/layer-inference.js +++ /dev/null @@ -1,93 +0,0 @@ -/** - * @libar-docs - * @libar-docs-extractor - * @libar-docs-pattern LayerInference - * @libar-docs-status completed - * @libar-docs-used-by GherkinExtractor - * - * ## LayerInference - Directory-Based Feature Classification - * - * Infers feature file layer (timeline, domain, integration, e2e, component) - * from directory path patterns. Enables filtering without explicit annotations. - * - * ### When to Use - * - * - When filtering scenarios by testing layer - * - When generating layer-specific documentation - * - When calculating test coverage by layer - */ -/** - * All valid feature layers as a readonly array - * - * @remarks - * Useful for validation and schema definitions - */ -export const FEATURE_LAYERS = [ - 'timeline', - 'domain', - 'integration', - 'e2e', - 'component', - 'unknown', -]; -/** - * Infer feature layer from file path - * - * Uses directory structure patterns to classify feature files: - * - `/timeline/` → timeline (process documentation) - * - `/deciders/` → domain (pure domain logic) - * - `/orders/`, `/inventory/` (not integration) → domain - * - `/integration-features/`, `/integration/` → integration - * - `/e2e/` → e2e (browser-based tests) - * - `/scanner/`, `/lint/` → component (tooling tests) - * - * @param filePath - Absolute or relative path to feature file - * @returns Inferred layer based on directory patterns - * - * @example - * ```typescript - * inferFeatureLayer('tests/features/timeline/phase-01.feature'); - * // Returns: 'timeline' - * - * inferFeatureLayer('tests/features/deciders/order.decider.feature'); - * // Returns: 'domain' - * - * inferFeatureLayer('tests/integration-features/orders/flow.feature'); - * // Returns: 'integration' - * ``` - */ -export function inferFeatureLayer(filePath) { - // Normalize path for cross-platform consistency - const normalizedPath = filePath.toLowerCase().replace(/\\/g, '/'); - // Timeline features (process documentation) - if (normalizedPath.includes('/timeline/')) { - return 'timeline'; - } - // Decider features (pure domain logic) - if (normalizedPath.includes('/deciders/')) { - return 'domain'; - } - // Domain features (command handlers, but not integration tests) - // Check for integration FIRST to avoid false positives - const isIntegration = normalizedPath.includes('/integration-features/') || normalizedPath.includes('/integration/'); - if (!isIntegration) { - if (normalizedPath.includes('/orders/') || normalizedPath.includes('/inventory/')) { - return 'domain'; - } - } - // Integration features - if (isIntegration) { - return 'integration'; - } - // E2E features (browser-based tests) - if (normalizedPath.includes('/e2e/')) { - return 'e2e'; - } - // Component features (tooling tests) - if (normalizedPath.includes('/scanner/') || normalizedPath.includes('/lint/')) { - return 'component'; - } - // Unknown - fallback for unclassified features - return 'unknown'; -} -//# sourceMappingURL=layer-inference.js.map \ No newline at end of file diff --git a/dist/extractor/layer-inference.js.map b/dist/extractor/layer-inference.js.map deleted file mode 100644 index befc75cf..00000000 --- a/dist/extractor/layer-inference.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"layer-inference.js","sourceRoot":"","sources":["../../src/extractor/layer-inference.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAgBH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,cAAc,GAA4B;IACrD,UAAU;IACV,QAAQ;IACR,aAAa;IACb,KAAK;IACL,WAAW;IACX,SAAS;CACD,CAAC;AAEX;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,UAAU,iBAAiB,CAAC,QAAgB;IAChD,gDAAgD;IAChD,MAAM,cAAc,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAElE,4CAA4C;IAC5C,IAAI,cAAc,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC;QAC1C,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,uCAAuC;IACvC,IAAI,cAAc,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC;QAC1C,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,gEAAgE;IAChE,uDAAuD;IACvD,MAAM,aAAa,GACjB,cAAc,CAAC,QAAQ,CAAC,wBAAwB,CAAC,IAAI,cAAc,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;IAEhG,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,IAAI,cAAc,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,cAAc,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;YAClF,OAAO,QAAQ,CAAC;QAClB,CAAC;IACH,CAAC;IAED,uBAAuB;IACvB,IAAI,aAAa,EAAE,CAAC;QAClB,OAAO,aAAa,CAAC;IACvB,CAAC;IAED,qCAAqC;IACrC,IAAI,cAAc,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;QACrC,OAAO,KAAK,CAAC;IACf,CAAC;IAED,qCAAqC;IACrC,IAAI,cAAc,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,cAAc,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC9E,OAAO,WAAW,CAAC;IACrB,CAAC;IAED,+CAA+C;IAC/C,OAAO,SAAS,CAAC;AACnB,CAAC"} \ No newline at end of file diff --git a/dist/extractor/shape-extractor.d.ts b/dist/extractor/shape-extractor.d.ts deleted file mode 100644 index 79bfa4ad..00000000 --- a/dist/extractor/shape-extractor.d.ts +++ /dev/null @@ -1,80 +0,0 @@ -/** - * @libar-docs - * @libar-docs-pattern ShapeExtractor - * @libar-docs-status completed - * @libar-docs-phase 26 - * @libar-docs-implements ShapeExtraction - * @libar-docs-uses typescript-estree - * - * ## Shape Extractor - TypeScript Type Extraction - * - * Extracts TypeScript type definitions (interfaces, type aliases, enums, - * function signatures) from source files for documentation generation. - * - * ### When to Use - * - * - When processing @libar-docs-extract-shapes tags during extraction - * - When generating documentation that needs actual type definitions - * - When eliminating duplication between JSDoc examples and code - * - * ### Key Concepts - * - * - **AST-based extraction**: Uses typescript-estree for accurate parsing - * - **Preserves formatting**: Extracts exact source text, not regenerated - * - **Includes JSDoc**: Type-level JSDoc comments are preserved - * - **Order from tag**: Shapes appear in tag-specified order, not source order - */ -import { Result } from '../types/result.js'; -import type { ExtractedShape, ShapeExtractionOptionsInput, ShapeExtractionResult } from '../validation-schemas/extracted-shape.js'; -/** - * Extract named shapes from TypeScript source code. - * - * @param sourceCode - The TypeScript source code to parse - * @param shapeNames - Names of shapes to extract (in desired output order) - * @param options - Extraction options - * @returns Result containing extraction result with shapes, warnings, and not-found list - */ -export declare function extractShapes(sourceCode: string, shapeNames: string[], options?: ShapeExtractionOptionsInput): Result; -/** - * Result of processing extract-shapes tag. - */ -export interface ProcessExtractShapesResult { - /** Successfully extracted shapes in tag order */ - shapes: ExtractedShape[]; - /** Warnings generated during extraction */ - warnings: string[]; -} -/** - * Process extract-shapes tag and return shapes for ExtractedPattern. - * - * Called by the document extractor when processing TypeScript files - * with @libar-docs-extract-shapes tags. - * - * DD-4: Supports wildcard `*` for auto-discovery mode. - * - * @param sourceCode - File content - * @param extractShapesTag - Comma-separated shape names from tag, or `*` for auto-discovery - * @returns Result with extracted shapes and any warnings - */ -export declare function processExtractShapesTag(sourceCode: string, extractShapesTag: string, options?: { - readonly jsx?: boolean; -}): ProcessExtractShapesResult; -/** - * Discover declarations tagged with @libar-docs-shape in source code. - * - * Scans all top-level declarations (exported and non-exported per DD-7) - * for @libar-docs-shape tags in their preceding JSDoc. Tagged declarations - * are extracted as shapes with an optional group from the tag value (DD-5). - * - * Reuses existing infrastructure: findDeclarations(), extractPrecedingJsDoc(), - * and extractShape() — no parser changes needed (DD-2). - * - * @param sourceCode - TypeScript source code to scan - * @param options - Parse options (jsx should match file extension) - * @returns Result containing discovered shapes and warnings - */ -export declare function discoverTaggedShapes(sourceCode: string, options?: { - readonly jsx?: boolean; -}): Result; -export { renderShapesAsMarkdown } from '../renderable/codecs/helpers.js'; -//# sourceMappingURL=shape-extractor.d.ts.map \ No newline at end of file diff --git a/dist/extractor/shape-extractor.d.ts.map b/dist/extractor/shape-extractor.d.ts.map deleted file mode 100644 index 631efce0..00000000 --- a/dist/extractor/shape-extractor.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"shape-extractor.d.ts","sourceRoot":"","sources":["../../src/extractor/shape-extractor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAIH,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,KAAK,EACV,cAAc,EAKd,2BAA2B,EAC3B,qBAAqB,EAGtB,MAAM,0CAA0C,CAAC;AA8DlD;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAC3B,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAAE,EACpB,OAAO,GAAE,2BAAgC,GACxC,MAAM,CAAC,qBAAqB,CAAC,CAkE/B;AA6uBD;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,iDAAiD;IACjD,MAAM,EAAE,cAAc,EAAE,CAAC;IACzB,2CAA2C;IAC3C,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAyDD;;;;;;;;;;;GAWG;AACH,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,MAAM,EAClB,gBAAgB,EAAE,MAAM,EACxB,OAAO,CAAC,EAAE;IAAE,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,CAAA;CAAE,GACnC,0BAA0B,CAqE5B;AA8CD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE;IAAE,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,CAAA;CAAE,GACnC,MAAM,CAAC,0BAA0B,CAAC,CAsDpC;AAQD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC"} \ No newline at end of file diff --git a/dist/extractor/shape-extractor.js b/dist/extractor/shape-extractor.js deleted file mode 100644 index aa9dc580..00000000 --- a/dist/extractor/shape-extractor.js +++ /dev/null @@ -1,964 +0,0 @@ -/** - * @libar-docs - * @libar-docs-pattern ShapeExtractor - * @libar-docs-status completed - * @libar-docs-phase 26 - * @libar-docs-implements ShapeExtraction - * @libar-docs-uses typescript-estree - * - * ## Shape Extractor - TypeScript Type Extraction - * - * Extracts TypeScript type definitions (interfaces, type aliases, enums, - * function signatures) from source files for documentation generation. - * - * ### When to Use - * - * - When processing @libar-docs-extract-shapes tags during extraction - * - When generating documentation that needs actual type definitions - * - When eliminating duplication between JSDoc examples and code - * - * ### Key Concepts - * - * - **AST-based extraction**: Uses typescript-estree for accurate parsing - * - **Preserves formatting**: Extracts exact source text, not regenerated - * - **Includes JSDoc**: Type-level JSDoc comments are preserved - * - **Order from tag**: Shapes appear in tag-specified order, not source order - */ -import { parse } from '@typescript-eslint/typescript-estree'; -import { Result } from '../types/result.js'; -// ============================================================================= -// Constants -// ============================================================================= -/** - * Maximum line gap between JSDoc comment end and declaration start. - * Allows 1 blank line between JSDoc and declaration (comment end line + 1 blank + decl line = 3 gap) - */ -const MAX_JSDOC_LINE_DISTANCE = 3; -/** - * Strict adjacency required for property-level JSDoc. - * Property JSDoc must end on the line immediately before the property (no gap allowed). - * This prevents interface-level JSDoc from being misattributed to the first property. - */ -const PROPERTY_JSDOC_MAX_GAP = 1; -/** - * Maximum source code size in bytes (5MB). - * Prevents memory exhaustion from oversized input during AST parsing. - */ -const MAX_SOURCE_SIZE_BYTES = 5 * 1024 * 1024; -// ============================================================================= -// Parse Helper -// ============================================================================= -/** - * Parse TypeScript source with the correct JSX mode. - * JSX must only be enabled for .tsx files — enabling it for .ts files causes - * generic arrow functions like `(v: T)` to be mis-parsed as JSX elements. - */ -function parseSource(sourceCode, jsx) { - return parse(sourceCode, { loc: true, range: true, comment: true, jsx }); -} -// ============================================================================= -// Main Extraction Function -// ============================================================================= -/** - * Extract named shapes from TypeScript source code. - * - * @param sourceCode - The TypeScript source code to parse - * @param shapeNames - Names of shapes to extract (in desired output order) - * @param options - Extraction options - * @returns Result containing extraction result with shapes, warnings, and not-found list - */ -export function extractShapes(sourceCode, shapeNames, options = {}) { - // Validate input size to prevent memory exhaustion - if (sourceCode.length > MAX_SOURCE_SIZE_BYTES) { - return Result.err(new Error(`Source code size (${sourceCode.length} bytes) exceeds maximum allowed (${MAX_SOURCE_SIZE_BYTES} bytes)`)); - } - const { includeJsDoc = true, preserveFormatting = true } = options; - const shapes = []; - const notFound = []; - const imported = []; - const reExported = []; - const warnings = []; - // Parse the source code - let ast; - try { - ast = parseSource(sourceCode, options.jsx ?? false); - } - catch (error) { - return Result.err(error instanceof Error ? error : new Error(`Failed to parse source code: ${String(error)}`)); - } - // Build maps of declarations and imports/re-exports - const declarations = findDeclarations(ast); - const importsAndReExports = findImportsAndReExports(ast); - // Process each requested shape name - for (const shapeName of shapeNames) { - // Check if it's a local declaration - const declarationList = declarations.get(shapeName); - if (declarationList !== undefined) { - const declaration = pickBestDeclaration(declarationList); - const shape = extractShape(sourceCode, declaration, ast.comments ?? [], { - includeJsDoc, - preserveFormatting, - }); - shapes.push(shape); - continue; - } - // Check if it's an import or re-export - const importInfo = importsAndReExports.get(shapeName); - if (importInfo) { - if (importInfo.isReExport) { - reExported.push({ - name: shapeName, - sourceModule: importInfo.sourceModule, - typeOnly: importInfo.typeOnly, - }); - } - else { - imported.push(shapeName); - } - continue; - } - // Not found at all - notFound.push(shapeName); - } - return Result.ok({ shapes, notFound, imported, reExported, warnings }); -} -// ============================================================================= -// AST Traversal Functions -// ============================================================================= -/** - * Find all declarations that could be extracted as shapes. - */ -function findDeclarations(ast) { - const declarations = new Map(); - function pushDeclaration(decl) { - const existing = declarations.get(decl.name); - if (existing !== undefined) { - existing.push(decl); - } - else { - declarations.set(decl.name, [decl]); - } - } - for (const node of ast.body) { - // Handle export declarations - if (node.type === 'ExportNamedDeclaration') { - if (node.declaration) { - const found = processDeclaration(node.declaration, true); - for (const decl of found) { - pushDeclaration(decl); - } - } - // Handle export { Foo } without a source (local re-export) - if (!node.source) { - for (const spec of node.specifiers) { - const localName = spec.local.name; - // This might reference a local declaration - mark all as exported - const existing = declarations.get(localName); - if (existing !== undefined) { - for (const decl of existing) { - decl.exported = true; - } - } - } - } - } - // Handle non-exported declarations - else { - const found = processDeclaration(node, false); - for (const decl of found) { - const existing = declarations.get(decl.name); - // Only add if no exported version of same kind already exists - if (existing !== undefined) { - const hasExportedSameKind = existing.some((e) => e.exported && e.kind === decl.kind); - if (!hasExportedSameKind) { - existing.push(decl); - } - } - else { - declarations.set(decl.name, [decl]); - } - } - } - } - return declarations; -} -/** Priority ranking for declaration kinds — type-level preferred for documentation */ -const KIND_PRIORITY = { - interface: 0, - type: 1, - enum: 2, - function: 3, - const: 4, -}; -/** - * Pick the best declaration from an array of same-name declarations. - * Prefers type-level constructs (interface, type, enum) over value-level (function, const). - */ -function pickBestDeclaration(declarations) { - if (declarations.length === 1) - return declarations[0]; - return [...declarations].sort((a, b) => KIND_PRIORITY[a.kind] - KIND_PRIORITY[b.kind])[0]; -} -/** - * Process a declaration node and extract shape info. - */ -function processDeclaration(node, exported) { - const results = []; - switch (node.type) { - case 'TSInterfaceDeclaration': - results.push({ - node, - kind: 'interface', - name: node.id.name, - exported, - }); - break; - case 'TSTypeAliasDeclaration': - results.push({ - node, - kind: 'type', - name: node.id.name, - exported, - }); - break; - case 'TSEnumDeclaration': - results.push({ - node, - kind: 'enum', - name: node.id.name, - exported, - }); - break; - case 'FunctionDeclaration': - if (node.id) { - results.push({ - node, - kind: 'function', - name: node.id.name, - exported, - }); - } - break; - case 'VariableDeclaration': - // Handle const declarations - if (node.kind === 'const') { - for (const declarator of node.declarations) { - if (declarator.id.type === 'Identifier') { - results.push({ - node: declarator, - kind: 'const', - name: declarator.id.name, - exported, - }); - } - } - } - break; - } - return results; -} -/** - * Find all imports and re-exports. - */ -function findImportsAndReExports(ast) { - const result = new Map(); - for (const node of ast.body) { - // Import declarations - if (node.type === 'ImportDeclaration') { - const sourceModule = node.source.value; - const typeOnly = node.importKind === 'type'; - for (const spec of node.specifiers) { - if (spec.type === 'ImportSpecifier') { - result.set(spec.local.name, { - name: spec.local.name, - sourceModule, - isReExport: false, - typeOnly: typeOnly || spec.importKind === 'type', - }); - } - else if (spec.type === 'ImportDefaultSpecifier') { - result.set(spec.local.name, { - name: spec.local.name, - sourceModule, - isReExport: false, - typeOnly, - }); - } - } - } - // Export declarations with source (re-exports) - if (node.type === 'ExportNamedDeclaration' && node.source) { - const sourceModule = node.source.value; - const typeOnly = node.exportKind === 'type'; - for (const spec of node.specifiers) { - const exportedName = spec.exported.type === 'Identifier' ? spec.exported.name : spec.exported.value; - result.set(exportedName, { - name: exportedName, - sourceModule, - isReExport: true, - typeOnly, - }); - } - } - // Export all (export * from './module') - if (node.type === 'ExportAllDeclaration') { - // We can't know specific names from export *, just note it - // This is handled by the "not found" case - } - } - return result; -} -// ============================================================================= -// Shape Extraction -// ============================================================================= -/** - * Extract a single shape from its declaration. - */ -function extractShape(sourceCode, declaration, comments, options) { - const { node, kind, name, exported } = declaration; - // Get the node's range for source extraction (guaranteed by parse options: range: true) - let sourceText = sourceCode.slice(node.range[0], node.range[1]); - // For functions, convert to signature only (remove body) - // Uses AST body range for precise location — avoids brace-matching that - // fails on object parameter types like { timeout: number } - if (kind === 'function' && node.type === 'FunctionDeclaration') { - const funcNode = node; - const bodyStart = funcNode.body.range[0]; - const declStart = node.range[0]; - sourceText = sourceCode.slice(declStart, bodyStart).trim(); - if (sourceText.startsWith('export ')) { - sourceText = sourceText.slice('export '.length); - } - sourceText = sourceText.trim() + ';'; - } - // For const, extract just the type annotation if present - if (kind === 'const' && node.type === 'VariableDeclarator') { - const declNode = node; - if (declNode.id.typeAnnotation) { - // Extract const with type annotation (ranges guaranteed by parse options) - const idRange = declNode.id.range; - const typeRange = declNode.id.typeAnnotation.range; - sourceText = `const ${sourceCode.slice(idRange[0], typeRange[1])};`; - } - } - // Get JSDoc if requested, stripping @libar-docs-* annotation lines - let jsDoc; - if (options.includeJsDoc) { - const rawJsDoc = extractPrecedingJsDoc(sourceCode, node, comments); - jsDoc = rawJsDoc !== undefined ? stripLibarDocsTags(rawJsDoc) : undefined; - } - // DD-3: Parse @param/@returns/@throws from JSDoc for function shapes - let parsedTags; - if (options.includeJsDoc && kind === 'function' && jsDoc) { - parsedTags = parseJsDocTags(jsDoc); - } - // Get line number (guaranteed by parse options: loc: true) - const lineNumber = node.loc.start.line; - // Extract type parameters for interfaces and types - let typeParameters; - if (node.type === 'TSInterfaceDeclaration' || node.type === 'TSTypeAliasDeclaration') { - const params = node.typeParameters; - if (params?.params) { - typeParameters = params.params.map((p) => sourceCode.slice(p.range[0], p.range[1])); - } - } - // Extract extends for interfaces - let extendsArr; - if (node.type === 'TSInterfaceDeclaration' && node.extends.length > 0) { - extendsArr = node.extends.map((ext) => sourceCode.slice(ext.range[0], ext.range[1])); - } - // Extract property-level JSDoc for interfaces - // Uses strict adjacency to prevent interface-level JSDoc from being misattributed to first property - // Performance optimization: pre-sort comments once O(c log c), then O(log c) per property lookup - let propertyDocs; - if (options.includeJsDoc && node.type === 'TSInterfaceDeclaration') { - const docs = []; - // Get the line where the interface body starts (the `{` line) - // loc is guaranteed by parse options: { range: true, loc: true } - const interfaceBodyStartLine = node.body.loc.start.line; - // Pre-process comments once for O(log c) binary search per property - // This converts O(m × c) to O(c log c + m log c) where m=properties, c=comments - const sortedComments = prepareJsDocComments(comments); - for (const member of node.body.body) { - if (member.type === 'TSPropertySignature' && member.key.type === 'Identifier') { - const propName = member.key.name; - // Use strict adjacency - comment must be inside interface body and immediately before property - const propJsDoc = findStrictlyAdjacentPropertyJsDoc(sourceCode, member, sortedComments, interfaceBodyStartLine); - if (propJsDoc) { - // Extract just the text content from JSDoc, removing delimiters - const cleanedJsDoc = extractJsDocText(propJsDoc); - if (cleanedJsDoc) { - docs.push({ name: propName, jsDoc: cleanedJsDoc }); - } - } - } - } - if (docs.length > 0) { - propertyDocs = docs; - } - } - return { - name, - kind, - sourceText, - jsDoc, - lineNumber, - typeParameters, - extends: extendsArr, - exported, - propertyDocs, - // DD-3: Include parsed JSDoc tags for function shapes - params: parsedTags !== undefined && parsedTags.params.length > 0 ? parsedTags.params : undefined, - returns: parsedTags?.returns, - throws: parsedTags !== undefined && parsedTags.throws.length > 0 ? parsedTags.throws : undefined, - }; -} -/** - * Strip @libar-docs-* annotation lines from a JSDoc comment. - * - * Preserves standard JSDoc tags (@param, @returns, @example, etc.) and - * all non-annotation content. Returns undefined if all content lines were - * annotation tags (empty JSDoc after stripping). - */ -function extractJsDocLineContent(line) { - return line - .trim() - .replace(/^\/\*\*\s*/, '') // strip leading /** - .replace(/\*\/\s*$/, '') // strip trailing */ - .replace(/^\*\s?/, '') // strip leading * (JSDoc continuation) - .trim(); -} -function stripLibarDocsTags(jsDoc) { - const lines = jsDoc.split('\n'); - const filtered = lines.filter((line) => !extractJsDocLineContent(line).startsWith('@libar-docs')); - // Check if anything meaningful remains (not just /** and */) - const hasContent = filtered.some((line) => extractJsDocLineContent(line).length > 0); - if (!hasContent) - return undefined; - // Clean up consecutive empty JSDoc lines left by tag removal - const result = []; - let prevWasEmptyJsDocLine = false; - for (const line of filtered) { - const trimmed = line.trim(); - const isEmptyJsDocLine = trimmed === '*' || trimmed === ''; - if (isEmptyJsDocLine && prevWasEmptyJsDocLine) - continue; - result.push(line); - prevWasEmptyJsDocLine = isEmptyJsDocLine; - } - return result.join('\n'); -} -/** - * Extract JSDoc comment preceding a node. - */ -function extractPrecedingJsDoc(sourceCode, node, comments) { - // Range and loc are guaranteed by parse options: { range: true, loc: true } - const nodeStart = node.range[0]; - const nodeLine = node.loc.start.line; - // Find the closest block comment that ends before this node - // and is a JSDoc comment (starts with /**) - let closestJsDoc; - for (const comment of comments) { - if (comment.type !== 'Block') - continue; - if (!comment.value.startsWith('*')) - continue; // JSDoc starts with /** - const commentEnd = comment.range[1]; - const commentEndLine = comment.loc.end.line; - // Comment must end before node starts - if (commentEnd > nodeStart) - continue; - // Comment must be close to the node - if (nodeLine - commentEndLine > MAX_JSDOC_LINE_DISTANCE) - continue; - // This is a candidate - pick the one closest to the node - if (!closestJsDoc || comment.range[1] > closestJsDoc.range[1]) { - closestJsDoc = comment; - } - } - if (!closestJsDoc) - return undefined; - // Return the full JSDoc including delimiters - return sourceCode.slice(closestJsDoc.range[0], closestJsDoc.range[1]); -} -/** - * Pre-process comments for efficient property JSDoc lookup. - * - * Filters to only JSDoc block comments and sorts by end line for binary search. - * This is O(c log c) but done once per file, enabling O(log c) lookups per property. - * - * @param comments - All comments from the AST - * @returns Sorted array of JSDoc comments with pre-extracted line info - */ -function prepareJsDocComments(comments) { - const jsDocComments = []; - for (const comment of comments) { - // Filter: Must be a block comment with JSDoc format (starts with *) - if (comment.type !== 'Block' || !comment.value.startsWith('*')) { - continue; - } - // Pre-extract line info (loc guaranteed by parse options: { loc: true }) - jsDocComments.push({ - comment, - endLine: comment.loc.end.line, - startLine: comment.loc.start.line, - endPosition: comment.range[1], - }); - } - // Sort by end line for binary search - jsDocComments.sort((a, b) => a.endLine - b.endLine); - return jsDocComments; -} -/** - * Binary search to find a JSDoc comment that ends at or near a target line. - * - * Returns the index of the comment with the largest endLine <= targetLine, - * or -1 if no such comment exists. - * - * @param sortedComments - Comments sorted by endLine - * @param targetLine - The line to search for - * @returns Index of matching comment, or -1 if not found - */ -function findCommentEndingAtLine(sortedComments, targetLine) { - if (sortedComments.length === 0) - return -1; - let left = 0; - let right = sortedComments.length - 1; - let result = -1; - while (left <= right) { - const mid = Math.floor((left + right) / 2); - const comment = sortedComments[mid]; - if (!comment) - break; - const endLine = comment.endLine; - if (endLine === targetLine) { - // Exact match - could be multiple, find the rightmost one - result = mid; - left = mid + 1; - } - else if (endLine < targetLine) { - left = mid + 1; - } - else { - right = mid - 1; - } - } - return result; -} -/** - * Find JSDoc comment strictly adjacent to an interface property member. - * - * Unlike extractPrecedingJsDoc which allows a 3-line gap, this function requires: - * 1. Comment must be INSIDE the interface body (start line > minLine) - * 2. Comment must end exactly at member.startLine - 1 (strictly adjacent) - * - * This prevents interface-level JSDoc from being misattributed to the first property - * when the interface is tightly formatted. - * - * Performance: O(log c) per property when using pre-sorted comments, vs O(c) previously. - * - * @param sourceCode - Full source code text - * @param member - The property member node - * @param sortedComments - Pre-sorted JSDoc comments (call prepareJsDocComments once per file) - * @param interfaceBodyStartLine - Line where interface body starts (the `{` line) - * @returns JSDoc string if found, undefined otherwise - */ -function findStrictlyAdjacentPropertyJsDoc(sourceCode, member, sortedComments, interfaceBodyStartLine) { - // Range and loc are guaranteed by parse options: { range: true, loc: true } - const memberStartLine = member.loc.start.line; - const memberStart = member.range[0]; - // Property JSDoc must end exactly on the line before the property - const expectedCommentEndLine = memberStartLine - PROPERTY_JSDOC_MAX_GAP; - // Binary search for comment ending at expected line - const index = findCommentEndingAtLine(sortedComments, expectedCommentEndLine); - if (index === -1) - return undefined; - // Check all comments ending at that line (there could be multiple) - // Start from the found index and check backwards/forwards for exact matches - for (let i = index; i >= 0; i--) { - const entry = sortedComments[i]; - if (entry?.endLine !== expectedCommentEndLine) - break; - // Comment must end before the member starts (character position) - if (entry.endPosition > memberStart) - continue; - // Comment must be INSIDE the interface body (after the opening brace line) - if (entry.startLine <= interfaceBodyStartLine) - continue; - // Found a valid property-level JSDoc - return sourceCode.slice(entry.comment.range[0], entry.comment.range[1]); - } - return undefined; -} -/** - * Parse @param, @returns, and @throws tags from raw JSDoc text. - * - * DD-3: Handles both TypeScript-style (`@param name - desc`) and - * JSDoc-style (`@param {Type} name desc`) formats. Multi-line tag - * descriptions are supported — lines not starting with `@` are - * continuations of the previous tag. - * - * @param rawJsDoc - Raw JSDoc text with delimiters (/** ... *\/) - * @returns Structured param/returns/throws data - */ -function parseJsDocTags(rawJsDoc) { - // Strip JSDoc delimiters and leading asterisks - let text = rawJsDoc.trim(); - if (text.startsWith('/**')) { - text = text.slice(3); - } - if (text.endsWith('*/')) { - text = text.slice(0, -2); - } - const lines = text.split('\n').map((line) => { - let cleaned = line.trim(); - if (cleaned.startsWith('*')) { - cleaned = cleaned.slice(1).trim(); - } - return cleaned; - }); - const params = []; - let returns; - const throws = []; - // Regex for @param with optional {Type}: @param {Type} name - description - const paramRegex = /^@param\s+(?:\{([^}]+)\}\s+)?([\w.]+)\s*(?:-\s*)?(.*)$/; - // Regex for @returns/@return with optional {Type} - const returnsRegex = /^@returns?\s+(?:\{([^}]+)\}\s+)?(.*)$/; - // Regex for @throws/@throw with optional {Type} - const throwsRegex = /^@throws?\s+(?:\{([^}]+)\}\s+)?(.*)$/; - let currentTag; - for (const line of lines) { - if (line.length === 0) { - currentTag = undefined; - continue; - } - // Try @param - const paramMatch = paramRegex.exec(line); - if (paramMatch) { - const paramName = paramMatch[2] ?? ''; - const paramType = paramMatch[1]; - const paramDesc = paramMatch[3] ?? ''; - params.push({ - name: paramName, - type: paramType ?? undefined, - description: paramDesc.trim(), - }); - currentTag = { target: 'param', index: params.length - 1 }; - continue; - } - // Try @returns - const returnsMatch = returnsRegex.exec(line); - if (returnsMatch) { - const retType = returnsMatch[1]; - const retDesc = returnsMatch[2] ?? ''; - returns = { - type: retType ?? undefined, - description: retDesc.trim(), - }; - currentTag = { target: 'returns', index: 0 }; - continue; - } - // Try @throws - const throwsMatch = throwsRegex.exec(line); - if (throwsMatch) { - const throwType = throwsMatch[1]; - const throwDesc = throwsMatch[2] ?? ''; - throws.push({ - type: throwType ?? undefined, - description: throwDesc.trim(), - }); - currentTag = { target: 'throws', index: throws.length - 1 }; - continue; - } - // Any other @tag breaks the current continuation - if (line.startsWith('@')) { - currentTag = undefined; - continue; - } - // Continuation line for current tag - if (currentTag) { - const continuation = line.trim(); - if (continuation.length === 0) - continue; - const paramEntry = currentTag.target === 'param' ? params[currentTag.index] : undefined; - const throwEntry = currentTag.target === 'throws' ? throws[currentTag.index] : undefined; - if (currentTag.target === 'param' && paramEntry !== undefined) { - params[currentTag.index] = { - ...paramEntry, - description: paramEntry.description.length > 0 - ? `${paramEntry.description} ${continuation}` - : continuation, - }; - } - else if (currentTag.target === 'returns' && returns !== undefined) { - returns = { - ...returns, - description: returns.description.length > 0 - ? `${returns.description} ${continuation}` - : continuation, - }; - } - else if (currentTag.target === 'throws' && throwEntry !== undefined) { - throws[currentTag.index] = { - ...throwEntry, - description: throwEntry.description.length > 0 - ? `${throwEntry.description} ${continuation}` - : continuation, - }; - } - } - } - return { params, returns, throws }; -} -/** - * Extract clean text content from a JSDoc comment. - * - * Removes the JSDoc delimiters (/** and *\/) and leading asterisks from each line. - * Returns the first meaningful line as the description. - */ -function extractJsDocText(jsDoc) { - // Remove /** prefix and */ suffix - let text = jsDoc.trim(); - if (text.startsWith('/**')) { - text = text.slice(3); - } - if (text.endsWith('*/')) { - text = text.slice(0, -2); - } - // Split into lines and clean each line - const lines = text - .split('\n') - .map((line) => { - // Remove leading whitespace and asterisk - let cleaned = line.trim(); - if (cleaned.startsWith('*')) { - cleaned = cleaned.slice(1).trim(); - } - return cleaned; - }) - .filter((line) => line.length > 0 && !line.startsWith('@')); // Skip empty and tag lines - // DD-2: Return all non-empty, non-tag lines joined with space (not just first line) - // Space-join because property JSDoc renders in table cells where newlines break formatting - return lines.length > 0 ? lines.join(' ') : undefined; -} -/** - * DD-4: Extract all exported declarations from a file as shapes. - * - * Auto-discovery mode: when `@libar-docs-extract-shapes *` is used, - * all exported types/interfaces/enums/functions/consts are extracted - * without requiring explicit names. - * - * @param sourceCode - File content - * @returns Result with all exported shapes - */ -function extractAllExportedShapes(sourceCode, jsx = false) { - // Validate input size - if (sourceCode.length > MAX_SOURCE_SIZE_BYTES) { - return Result.err(new Error(`Source code size (${sourceCode.length} bytes) exceeds maximum allowed (${MAX_SOURCE_SIZE_BYTES} bytes)`)); - } - let ast; - try { - ast = parseSource(sourceCode, jsx); - } - catch (error) { - return Result.err(error instanceof Error ? error : new Error(`Failed to parse source code: ${String(error)}`)); - } - const declarations = findDeclarations(ast); - const shapes = []; - const warnings = []; - // Extract best exported declaration per name (one shape per name) - for (const [, declarationList] of declarations) { - const exportedDecls = declarationList.filter((d) => d.exported); - if (exportedDecls.length === 0) - continue; - const best = pickBestDeclaration(exportedDecls); - const shape = extractShape(sourceCode, best, ast.comments ?? [], { - includeJsDoc: true, - preserveFormatting: true, - }); - shapes.push(shape); - } - if (shapes.length > 50) { - warnings.push(`[extract-shapes] Auto-discovery extracted ${shapes.length} shapes. ` + - `This may indicate the file has too many exports for effective documentation.`); - } - return Result.ok({ shapes, notFound: [], imported: [], reExported: [], warnings }); -} -/** - * Process extract-shapes tag and return shapes for ExtractedPattern. - * - * Called by the document extractor when processing TypeScript files - * with @libar-docs-extract-shapes tags. - * - * DD-4: Supports wildcard `*` for auto-discovery mode. - * - * @param sourceCode - File content - * @param extractShapesTag - Comma-separated shape names from tag, or `*` for auto-discovery - * @returns Result with extracted shapes and any warnings - */ -export function processExtractShapesTag(sourceCode, extractShapesTag, options) { - const jsx = options?.jsx ?? false; - // DD-4: Auto-shape discovery via wildcard - const shapeNames = extractShapesTag - .split(',') - .map((s) => s.trim()) - .filter(Boolean); - const hasWildcard = shapeNames.includes('*'); - if (hasWildcard) { - // Wildcard must be sole value — reject mixed case - if (shapeNames.length > 1) { - const namedShapes = shapeNames.filter((n) => n !== '*'); - return { - shapes: [], - warnings: [ - `[extract-shapes] Wildcard '*' must be the sole extract-shapes value. ` + - `Ignoring named shapes: ${namedShapes.join(', ')}. Use '*' alone or list specific names.`, - ], - }; - } - const result = extractAllExportedShapes(sourceCode, jsx); - if (!result.ok) { - return { - shapes: [], - warnings: [`[extract-shapes] ${result.error.message}`], - }; - } - return { shapes: [...result.value.shapes], warnings: [...result.value.warnings] }; - } - const extractionResult = extractShapes(sourceCode, shapeNames, { jsx }); - // If extraction failed (parse error), return empty shapes with error as warning - if (!extractionResult.ok) { - return { - shapes: [], - warnings: [`[extract-shapes] ${extractionResult.error.message}`], - }; - } - const result = extractionResult.value; - const warnings = [...result.warnings]; - // Collect warnings for not-found shapes - for (const name of result.notFound) { - warnings.push(`[extract-shapes] Shape '${name}' not found in file`); - } - // Collect warnings for imported shapes - for (const name of result.imported) { - warnings.push(`[extract-shapes] Shape '${name}' is imported, not defined in this file. ` + - `Add @libar-docs-extract-shapes to the source file instead.`); - } - // Collect warnings for re-exported shapes with source module info - for (const reExport of result.reExported) { - const typeOnlyNote = reExport.typeOnly ? ' (type-only)' : ''; - warnings.push(`[extract-shapes] Shape '${reExport.name}' is re-exported${typeOnlyNote} from '${reExport.sourceModule}'. ` + - `Add @libar-docs-extract-shapes to ${reExport.sourceModule} instead.`); - } - return { shapes: [...result.shapes], warnings }; -} -// ============================================================================= -// Declaration-Level Shape Discovery (DD-1, DD-2, DD-4, DD-7) -// ============================================================================= -/** - * Extract the @libar-docs-shape tag from JSDoc text. - * - * Returns `{ tagged: true, group }` if the tag is present, - * where `group` is `undefined` for bare tags and a string for valued tags. - * - * @param jsDocText - Raw JSDoc text including delimiters - */ -function extractShapeTag(jsDocText) { - // Match tag with optional group name, excluding JSDoc delimiters (* and /). - // Negative lookahead (?!-) prevents matching hypothetical libar-docs-shape-* tags. - const match = /libar-docs-shape(?!-)(?:\s+([^\s*/]+))?/.exec(jsDocText); - if (!match) - return { tagged: false }; - const group = match[1]; - if (group !== undefined) { - return { tagged: true, group }; - } - return { tagged: true }; -} -/** - * Extract the @libar-docs-include tag from JSDoc text. - * - * Returns an array of include values if the tag is present (CSV format), - * or `undefined` if the tag is absent. Values are trimmed and filtered for empties. - * - * @param jsDocText - Raw JSDoc text including delimiters - */ -function extractIncludeTag(jsDocText) { - const match = /libar-docs-include(?!-)(?:\s+([^\n@*]+))?/.exec(jsDocText); - if (!match) - return undefined; - const raw = match[1]; - if (raw === undefined) - return undefined; - const values = raw - .split(',') - .map((v) => v.trim()) - .filter((v) => v.length > 0); - return values.length > 0 ? values : undefined; -} -/** - * Discover declarations tagged with @libar-docs-shape in source code. - * - * Scans all top-level declarations (exported and non-exported per DD-7) - * for @libar-docs-shape tags in their preceding JSDoc. Tagged declarations - * are extracted as shapes with an optional group from the tag value (DD-5). - * - * Reuses existing infrastructure: findDeclarations(), extractPrecedingJsDoc(), - * and extractShape() — no parser changes needed (DD-2). - * - * @param sourceCode - TypeScript source code to scan - * @param options - Parse options (jsx should match file extension) - * @returns Result containing discovered shapes and warnings - */ -export function discoverTaggedShapes(sourceCode, options) { - // Validate input size - if (sourceCode.length > MAX_SOURCE_SIZE_BYTES) { - return Result.err(new Error(`Source code size (${sourceCode.length} bytes) exceeds maximum allowed (${MAX_SOURCE_SIZE_BYTES} bytes)`)); - } - // Parse with correct JSX mode (DD-2: stay on estree parser) - let ast; - try { - ast = parseSource(sourceCode, options?.jsx ?? false); - } - catch (error) { - return Result.err(error instanceof Error ? error : new Error(`Failed to parse source code: ${String(error)}`)); - } - // DD-7: Get ALL declarations (exported + non-exported) - const declarations = findDeclarations(ast); - const comments = ast.comments ?? []; - const shapes = []; - const warnings = []; - for (const [, declarationList] of declarations) { - for (const declaration of declarationList) { - // Get JSDoc for this declaration (respects MAX_JSDOC_LINE_DISTANCE) - const jsDoc = extractPrecedingJsDoc(sourceCode, declaration.node, comments); - if (jsDoc === undefined) - continue; - // Check for @libar-docs-shape tag - const tagResult = extractShapeTag(jsDoc); - if (!tagResult.tagged) - continue; - // Extract the shape using existing infrastructure - const shape = extractShape(sourceCode, declaration, comments, { - includeJsDoc: true, - preserveFormatting: true, - }); - // DD-5: Add group field from tag value - // DD-3 (CrossCuttingDocumentInclusion): Add includes from @libar-docs-include - const includeValues = extractIncludeTag(jsDoc); - shapes.push({ - ...shape, - group: tagResult.group, - ...(includeValues !== undefined && { includes: includeValues }), - }); - } - } - return Result.ok({ shapes, warnings }); -} -// ============================================================================= -// Re-export Rendering Helper (moved to codec layer) -// ============================================================================= -// Re-export renderShapesAsMarkdown from the codec helpers where it belongs -// This maintains backwards compatibility for existing imports -export { renderShapesAsMarkdown } from '../renderable/codecs/helpers.js'; -//# sourceMappingURL=shape-extractor.js.map \ No newline at end of file diff --git a/dist/extractor/shape-extractor.js.map b/dist/extractor/shape-extractor.js.map deleted file mode 100644 index 94ab81bd..00000000 --- a/dist/extractor/shape-extractor.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"shape-extractor.js","sourceRoot":"","sources":["../../src/extractor/shape-extractor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,sCAAsC,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K,SAAS;gBAAE,SAAS;YAElC,kCAAkC;YAClC,MAAM,SAAS,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC;YACzC,IAAI,CAAC,SAAS,CAAC,MAAM;gBAAE,SAAS;YAEhC,kDAAkD;YAClD,MAAM,KAAK,GAAG,YAAY,CAAC,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE;gBAC5D,YAAY,EAAE,IAAI;gBAClB,kBAAkB,EAAE,IAAI;aACzB,CAAC,CAAC;YAEH,uCAAuC;YACvC,8EAA8E;YAC9E,MAAM,aAAa,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAC;YAC/C,MAAM,CAAC,IAAI,CAAC;gBACV,GAAG,KAAK;gBACR,KAAK,EAAE,SAAS,CAAC,KAAK;gBACtB,GAAG,CAAC,aAAa,KAAK,SAAS,IAAI,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC;aAChE,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC;AACzC,CAAC;AAED,gFAAgF;AAChF,oDAAoD;AACpD,gFAAgF;AAEhF,2EAA2E;AAC3E,8DAA8D;AAC9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC"} \ No newline at end of file diff --git a/dist/generators/built-in/codec-generators.d.ts b/dist/generators/built-in/codec-generators.d.ts deleted file mode 100644 index 31a8e2c4..00000000 --- a/dist/generators/built-in/codec-generators.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern CodecGeneratorRegistration - * @libar-docs-status completed - * - * ## Codec-Based Generator Registration - * - * Registers codec-based generators for the RenderableDocument Model (RDM) system. - * These generators use Zod 4 codecs to transform MasterDataset into RenderableDocuments, - * which are then rendered to markdown via the universal renderer. - * - * ### When to Use - * - * - When initializing the generator registry with built-in generators - * - When understanding which generators are available out-of-the-box - * - When extending with custom generators (use as reference for registration pattern) - * - * Available generators: - * - `patterns` - Pattern registry with category details - * - `roadmap` - Development roadmap by phase - * - `milestones` - Historical completed milestones - * - `requirements` - Product requirements by area/role - * - `session` - Current session context and focus - * - `remaining` - Aggregate view of incomplete work - */ -export {}; -//# sourceMappingURL=codec-generators.d.ts.map \ No newline at end of file diff --git a/dist/generators/built-in/codec-generators.d.ts.map b/dist/generators/built-in/codec-generators.d.ts.map deleted file mode 100644 index c84688b0..00000000 --- a/dist/generators/built-in/codec-generators.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"codec-generators.d.ts","sourceRoot":"","sources":["../../../src/generators/built-in/codec-generators.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG"} \ No newline at end of file diff --git a/dist/generators/built-in/codec-generators.js b/dist/generators/built-in/codec-generators.js deleted file mode 100644 index 53f409b6..00000000 --- a/dist/generators/built-in/codec-generators.js +++ /dev/null @@ -1,145 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern CodecGeneratorRegistration - * @libar-docs-status completed - * - * ## Codec-Based Generator Registration - * - * Registers codec-based generators for the RenderableDocument Model (RDM) system. - * These generators use Zod 4 codecs to transform MasterDataset into RenderableDocuments, - * which are then rendered to markdown via the universal renderer. - * - * ### When to Use - * - * - When initializing the generator registry with built-in generators - * - When understanding which generators are available out-of-the-box - * - When extending with custom generators (use as reference for registration pattern) - * - * Available generators: - * - `patterns` - Pattern registry with category details - * - `roadmap` - Development roadmap by phase - * - `milestones` - Historical completed milestones - * - `requirements` - Product requirements by area/role - * - `session` - Current session context and focus - * - `remaining` - Aggregate view of incomplete work - */ -import { generatorRegistry } from '../registry.js'; -import { createCodecGenerator } from '../codec-based.js'; -import { createDecisionDocGenerator } from './decision-doc-generator.js'; -// registerReferenceGenerators is now called from orchestrator.ts with config-provided configs -// ═══════════════════════════════════════════════════════════════════════════ -// Codec-Based Generators (RDM Architecture) -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Pattern Registry Generator - * Generates PATTERNS.md + patterns/*.md category files - */ -generatorRegistry.register(createCodecGenerator('patterns', 'patterns')); -/** - * Roadmap Generator - * Generates ROADMAP.md + phases/*.md detail files - */ -generatorRegistry.register(createCodecGenerator('roadmap', 'roadmap')); -/** - * Completed Milestones Generator - * Generates COMPLETED-MILESTONES.md + milestones/*.md quarterly files - */ -generatorRegistry.register(createCodecGenerator('milestones', 'milestones')); -/** - * Product Requirements Generator - * Generates PRODUCT-REQUIREMENTS.md + requirements/*.md - */ -generatorRegistry.register(createCodecGenerator('requirements', 'requirements')); -/** - * Session Context Generator - * Generates SESSION-CONTEXT.md + sessions/*.md phase files - */ -generatorRegistry.register(createCodecGenerator('session', 'session')); -/** - * Remaining Work Generator - * Generates REMAINING-WORK.md + remaining/*.md phase files - */ -generatorRegistry.register(createCodecGenerator('remaining', 'remaining')); -/** - * Current Work Generator - * Generates CURRENT-WORK.md + current/*.md phase files (active patterns only) - */ -generatorRegistry.register(createCodecGenerator('current', 'current')); -/** - * PR Changes Generator - * Generates working/PR-CHANGES.md (filtered by changed files or release tag) - */ -generatorRegistry.register(createCodecGenerator('pr-changes', 'pr-changes')); -/** - * ADR (Architecture Decision Records) Generator - * Generates DECISIONS.md + decisions/*.md category files - */ -generatorRegistry.register(createCodecGenerator('adrs', 'adrs')); -/** - * Planning Checklist Generator - * Generates PLANNING-CHECKLIST.md (pre-planning questions and DoD) - */ -generatorRegistry.register(createCodecGenerator('planning-checklist', 'planning-checklist')); -/** - * Session Plan Generator - * Generates SESSION-PLAN.md (implementation plans for phases) - */ -generatorRegistry.register(createCodecGenerator('session-plan', 'session-plan')); -/** - * Session Findings Generator - * Generates SESSION-FINDINGS.md (retrospective discoveries) - */ -generatorRegistry.register(createCodecGenerator('session-findings', 'session-findings')); -/** - * Changelog Generator - * Generates CHANGELOG-GENERATED.md (Keep a Changelog format) - */ -generatorRegistry.register(createCodecGenerator('changelog', 'changelog')); -/** - * Traceability Generator - * Generates TRACEABILITY.md (timeline to behavior file coverage) - */ -generatorRegistry.register(createCodecGenerator('traceability', 'traceability')); -/** - * Overview Generator (RDM) - * Generates OVERVIEW.md (project architecture overview) - */ -generatorRegistry.register(createCodecGenerator('overview-rdm', 'overview')); -/** - * Business Rules Generator - * Generates BUSINESS-RULES.md (domain constraints and invariants by domain) - */ -generatorRegistry.register(createCodecGenerator('business-rules', 'business-rules')); -/** - * Architecture Diagram Generator - * Generates ARCHITECTURE.md (component and layered architecture diagrams) - */ -generatorRegistry.register(createCodecGenerator('architecture', 'architecture')); -/** - * Taxonomy Reference Generator - * Generates TAXONOMY.md + taxonomy/*.md detail files - */ -generatorRegistry.register(createCodecGenerator('taxonomy', 'taxonomy')); -/** - * Validation Rules Generator - * Generates VALIDATION-RULES.md + validation/*.md detail files - */ -generatorRegistry.register(createCodecGenerator('validation-rules', 'validation-rules')); -// ═══════════════════════════════════════════════════════════════════════════ -// Decision Document Generator (Pattern-Based, not Codec-Based) -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Decision Document Generator - * Generates documentation from ADR/PDR decision documents with source mappings. - * Produces both compact (_claude-md/) and detailed (docs/) outputs. - */ -generatorRegistry.register(createDecisionDocGenerator()); -// ═══════════════════════════════════════════════════════════════════════════ -// Reference Document Generators (Convention-Based, Codec-Driven) -// ═══════════════════════════════════════════════════════════════════════════ -// -// Reference generators are registered at orchestration time from project config -// (referenceDocConfigs field), not at import time. See generateFromConfig() in -// orchestrator.ts for the registration call. -//# sourceMappingURL=codec-generators.js.map \ No newline at end of file diff --git a/dist/generators/built-in/codec-generators.js.map b/dist/generators/built-in/codec-generators.js.map deleted file mode 100644 index 1d4ddff1..00000000 --- a/dist/generators/built-in/codec-generators.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"codec-generators.js","sourceRoot":"","sources":["../../../src/generators/built-in/codec-generators.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAA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AAQ,CAAC,oBAAoB,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC,CAAC;AAEjF;;;GAGG;AACH,iBAAiB,CAAC,QAAQ,CAAC,oBAAoB,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,CAAC,CAAC;AAEzF;;;GAGG;AACH,iBAAiB,CAAC,QAAQ,CAAC,oBAAoB,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC;AAE3E;;;GAGG;AACH,iBAAiB,CAAC,QAAQ,CAAC,oBAAoB,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC,CAAC;AAEjF;;;GAGG;AACH,iBAAiB,CAAC,QAAQ,CAAC,oBAAoB,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC,CAAC;AAE7E;;;GAGG;AACH,iBAAiB,CAAC,QAAQ,CAAC,oBAAoB,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,CAAC,CAAC;AAErF;;;GAGG;AACH,iBAAiB,CAAC,QAAQ,CAAC,oBAAoB,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC,CAAC;AAEjF;;;GAGG;AACH,iBAAiB,CAAC,QAAQ,CAAC,oBAAoB,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC;AAEzE;;;GAGG;AACH,iBAAiB,CAAC,QAAQ,CAAC,oBAAoB,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,CAAC,CAAC;AAEzF,8EAA8E;AAC9E,+DAA+D;AAC/D,8EAA8E;AAE9E;;;;GAIG;AACH,iBAAiB,CAAC,QAAQ,CAAC,0BAA0B,EAAE,CAAC,CAAC;AAEzD,8EAA8E;AAC9E,iEAAiE;AACjE,8EAA8E;AAC9E,EAAE;AACF,gFAAgF;AAChF,+EAA+E;AAC/E,6CAA6C"} \ No newline at end of file diff --git a/dist/generators/built-in/decision-doc-generator.d.ts b/dist/generators/built-in/decision-doc-generator.d.ts deleted file mode 100644 index 9dd49712..00000000 --- a/dist/generators/built-in/decision-doc-generator.d.ts +++ /dev/null @@ -1,221 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern DecisionDocGenerator - * @libar-docs-status completed - * @libar-docs-phase 27 - * @libar-docs-arch-role service - * @libar-docs-arch-context generator - * @libar-docs-arch-layer application - * @libar-docs-depends-on DecisionDocCodec,SourceMapper - * - * ## Decision Doc Generator - Documentation from Decision Documents - * - * Orchestrates the full pipeline for generating documentation from decision - * documents (ADR/PDR in .feature format): - * - * 1. Decision parsing - Extract source mappings, rules, DocStrings - * 2. Source mapping - Aggregate content from TypeScript, Gherkin, decision sources - * 3. Content assembly - Build RenderableDocument from aggregated sections - * 4. Multi-level output - Generate compact (_claude-md/) and detailed (docs/) versions - * - * ### When to Use - * - * - When generating documentation from ADR/PDR decision documents - * - When decision documents contain source mapping tables - * - When building progressive disclosure docs at multiple detail levels - * - * ### Output Path Convention - * - * - Compact: `_claude-md/{section}/{module}.md` (~50 lines) - * - Detailed: `docs/{PATTERN-NAME}.md` (~300 lines) - */ -import type { DocumentGenerator, GeneratorContext, GeneratorOutput, OutputFile } from '../types.js'; -import type { ExtractedPattern } from '../../validation-schemas/index.js'; -import type { DetailLevel } from '../../renderable/codecs/types/base.js'; -import type { RenderableDocument } from '../../renderable/schema.js'; -import { type DecisionDocContent } from '../../renderable/codecs/decision-doc.js'; -import { type AggregatedContent } from '../source-mapper.js'; -/** - * Options for decision doc generation - */ -export interface DecisionDocGeneratorOptions { - /** Base directory for resolving relative paths */ - baseDir: string; - /** Detail level for output generation */ - detailLevel?: DetailLevel; - /** Claude MD section name (e.g., "validation" for _claude-md/validation/) */ - claudeMdSection?: string; - /** Enable pre-flight validation of source mappings (default: true) */ - enableValidation?: boolean; - /** Enable content deduplication after extraction (default: true) */ - enableDeduplication?: boolean; - /** Enable warning collection across pipeline stages (default: true) */ - enableWarningCollection?: boolean; -} -/** - * Output paths for generated documentation - */ -export interface GeneratedOutputPaths { - /** Path for compact output (e.g., _claude-md/validation/process-guard.md) */ - compact: string; - /** Path for detailed output (e.g., docs/PROCESS-GUARD.md) */ - detailed: string; -} -/** - * Result of decision doc generation - * - * **Error Handling:** When errors occur, `success` is set to `false` but the - * function still returns successfully (does not throw). This allows partial - * generation to proceed - files that could be generated will be in `files`, - * while error messages explain what failed. Callers should check the `success` - * field to determine if the generation was fully successful. - */ -export interface DecisionDocGeneratorResult { - /** Successfully generated output files */ - files: OutputFile[]; - /** Warnings produced during generation */ - warnings: string[]; - /** Errors that prevented generation */ - errors: string[]; - /** - * Whether generation completed without errors. - * - `true`: All requested outputs generated successfully - * - `false`: One or more errors occurred (check `errors` array) - * - * Note: Even when `success` is `false`, partial results may be available - * in `files`. Check both `success` and `files.length` to understand the outcome. - */ - success: boolean; -} -/** - * Extract claude-md-section from pattern tags - * - * Looks for `@libar-docs-claude-md-section:VALUE` tag and extracts the value. - * Returns undefined if tag not found. - * - * @param pattern - Extracted pattern with directive tags - * @returns Section value (e.g., "validation") or undefined - * - * @example - * ```typescript - * // Pattern with @libar-docs-claude-md-section:validation tag - * const section = extractClaudeMdSection(pattern); - * // Returns: "validation" - * ``` - */ -export declare function extractClaudeMdSection(pattern: ExtractedPattern): string | undefined; -/** - * Determine output paths from decision metadata - * - * Uses pattern name and optional section to compute paths: - * - Compact: _claude-md/{section}/{module}.md - * - Detailed: docs/{PATTERN-NAME}.md - * - * @param patternName - Pattern name from decision document - * @param options - Generator options including section override - * @returns Computed output paths - * - * @example - * ```typescript - * const paths = determineOutputPaths('ProcessGuard', { section: 'validation' }); - * // Returns: - * // { - * // compact: '_claude-md/validation/process-guard.md', - * // detailed: 'docs/PROCESS-GUARD.md' - * // } - * ``` - */ -export declare function determineOutputPaths(patternName: string, options?: { - section?: string; -}): GeneratedOutputPaths; -/** - * Generate compact/summary output (~50 lines) - * - * Includes only essential tables and type definitions. - * Suitable for Claude MD context files. - * - * @param decisionContent - Parsed decision document - * @param aggregatedContent - Content from source mapping execution - * @returns RenderableDocument for compact output - */ -export declare function generateCompactOutput(decisionContent: DecisionDocContent, aggregatedContent: AggregatedContent): RenderableDocument; -/** - * Generate detailed output (~300 lines) - * - * Includes everything: JSDoc, examples, full descriptions. - * Suitable for docs/ directory. - * - * @param decisionContent - Parsed decision document - * @param aggregatedContent - Content from source mapping execution - * @returns RenderableDocument for detailed output - */ -export declare function generateDetailedOutput(decisionContent: DecisionDocContent, aggregatedContent: AggregatedContent): RenderableDocument; -/** - * Generate standard output (~150 lines) - * - * Balance between compact and detailed: tables, types, key descriptions. - * Suitable for general documentation. - * - * @param decisionContent - Parsed decision document - * @param aggregatedContent - Content from source mapping execution - * @returns RenderableDocument for standard output - */ -export declare function generateStandardOutput(decisionContent: DecisionDocContent, aggregatedContent: AggregatedContent): RenderableDocument; -/** - * Generate documentation from a decision document - * - * Main entry point that orchestrates the full pipeline: - * 1. Create WarningCollector for unified warning handling - * 2. Parse decision document to extract content - * 3. Validate source mappings (if enabled) - fails fast on validation errors - * 4. Execute source mapping to aggregate content from referenced files - * 5. Deduplicate sections (if enabled) - * 6. Generate output at specified detail level(s) - * 7. Return output files with all warnings - * - * @param pattern - Extracted pattern with decision document content - * @param options - Generator options - * @returns Generation result with files and warnings - * - * @example - * ```typescript - * const result = await generateFromDecision(processGuardPattern, { - * baseDir: process.cwd(), - * detailLevel: 'detailed', - * claudeMdSection: 'validation', - * }); - * - * for (const file of result.files) { - * fs.writeFileSync(file.path, file.content); - * } - * ``` - */ -export declare function generateFromDecision(pattern: ExtractedPattern, options: DecisionDocGeneratorOptions): Promise; -/** - * Generate both compact and detailed outputs - * - * Runs the pipeline once and generates documentation at both detail levels. - * More efficient than calling generateFromDecision twice. - * - * @param pattern - Extracted pattern with decision document content - * @param options - Generator options - * @returns Generation result with both output files - */ -export declare function generateFromDecisionMultiLevel(pattern: ExtractedPattern, options: DecisionDocGeneratorOptions): Promise; -/** - * Decision Doc Generator for registry integration - * - * Implements DocumentGenerator interface for use with the generator registry. - * Filters patterns by type to find ADR/PDR decision documents with source mappings. - */ -export declare class DecisionDocGeneratorImpl implements DocumentGenerator { - readonly name = "doc-from-decision"; - readonly description = "Generate documentation from ADR/PDR decision documents"; - generate(patterns: readonly ExtractedPattern[], context: GeneratorContext): Promise; -} -/** - * Create decision doc generator instance - */ -export declare function createDecisionDocGenerator(): DocumentGenerator; -//# sourceMappingURL=decision-doc-generator.d.ts.map \ No newline at end of file diff --git a/dist/generators/built-in/decision-doc-generator.d.ts.map b/dist/generators/built-in/decision-doc-generator.d.ts.map deleted file mode 100644 index 0475ad54..00000000 --- a/dist/generators/built-in/decision-doc-generator.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decision-doc-generator.d.ts","sourceRoot":"","sources":["../../../src/generators/built-in/decision-doc-generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACpG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AACzE,OAAO,KAAK,EAAE,kBAAkB,EAAgB,MAAM,4BAA4B,CAAC;AAWnF,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,yCAAyC,CAAC;AAMjD,OAAO,EAGL,KAAK,iBAAiB,EACvB,MAAM,qBAAqB,CAAC;AAc7B;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,kDAAkD;IAClD,OAAO,EAAE,MAAM,CAAC;IAEhB,yCAAyC;IACzC,WAAW,CAAC,EAAE,WAAW,CAAC;IAE1B,6EAA6E;IAC7E,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,sEAAsE;IACtE,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B,oEAAoE;IACpE,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B,uEAAuE;IACvE,uBAAuB,CAAC,EAA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AACH,wBAAsB,8BAA8B,CAClD,OAAO,EAAE,gBAAgB,EACzB,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,0BAA0B,CAAC,CA+CrC;AAMD;;;;;GAKG;AACH,qBAAa,wBAAyB,YAAW,iBAAiB;IAChE,QAAQ,CAAC,IAAI,uBAAuB;IACpC,QAAQ,CAAC,WAAW,4DAA4D;IAE1E,QAAQ,CACZ,QAAQ,EAAE,SAAS,gBAAgB,EAAE,EACrC,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,eAAe,CAAC;CAkE5B;AAED;;GAEG;AACH,wBAAgB,0BAA0B,IAAI,iBAAiB,CAE9D"} \ No newline at end of file diff --git a/dist/generators/built-in/decision-doc-generator.js b/dist/generators/built-in/decision-doc-generator.js deleted file mode 100644 index d47831bb..00000000 --- a/dist/generators/built-in/decision-doc-generator.js +++ /dev/null @@ -1,684 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern DecisionDocGenerator - * @libar-docs-status completed - * @libar-docs-phase 27 - * @libar-docs-arch-role service - * @libar-docs-arch-context generator - * @libar-docs-arch-layer application - * @libar-docs-depends-on DecisionDocCodec,SourceMapper - * - * ## Decision Doc Generator - Documentation from Decision Documents - * - * Orchestrates the full pipeline for generating documentation from decision - * documents (ADR/PDR in .feature format): - * - * 1. Decision parsing - Extract source mappings, rules, DocStrings - * 2. Source mapping - Aggregate content from TypeScript, Gherkin, decision sources - * 3. Content assembly - Build RenderableDocument from aggregated sections - * 4. Multi-level output - Generate compact (_claude-md/) and detailed (docs/) versions - * - * ### When to Use - * - * - When generating documentation from ADR/PDR decision documents - * - When decision documents contain source mapping tables - * - When building progressive disclosure docs at multiple detail levels - * - * ### Output Path Convention - * - * - Compact: `_claude-md/{section}/{module}.md` (~50 lines) - * - Detailed: `docs/{PATTERN-NAME}.md` (~300 lines) - */ -import { heading, paragraph, code, list, separator, collapsible, document as createDocument, } from '../../renderable/schema.js'; -import { renderToMarkdown } from '../../renderable/render.js'; -import { parseDecisionDocument, } from '../../renderable/codecs/decision-doc.js'; -import { parseDescriptionWithDocStrings, renderRuleDescription, renderPropertyDocsTable, } from '../../renderable/codecs/helpers.js'; -import { executeSourceMapping, } from '../source-mapper.js'; -import { toKebabCase, toUpperKebabCase } from '../../utils/string-utils.js'; -import { createWarningCollector, } from '../warning-collector.js'; -import { validateSourceMappingTable } from '../source-mapping-validator.js'; -import { deduplicateSections } from '../content-deduplicator.js'; -// ============================================================================= -// Tag Helpers -// ============================================================================= -/** - * Extract claude-md-section from pattern tags - * - * Looks for `@libar-docs-claude-md-section:VALUE` tag and extracts the value. - * Returns undefined if tag not found. - * - * @param pattern - Extracted pattern with directive tags - * @returns Section value (e.g., "validation") or undefined - * - * @example - * ```typescript - * // Pattern with @libar-docs-claude-md-section:validation tag - * const section = extractClaudeMdSection(pattern); - * // Returns: "validation" - * ``` - */ -export function extractClaudeMdSection(pattern) { - const tags = pattern.directive.tags; - for (const tag of tags) { - // Match @libar-docs-claude-md-section:VALUE or @docs-claude-md-section:VALUE - const match = /^@(?:libar-)?docs-claude-md-section[:\s]+(.+)$/i.exec(tag); - if (match?.[1]) { - return match[1].trim(); - } - } - return undefined; -} -// ============================================================================= -// Output Path Resolution -// ============================================================================= -/** - * Determine output paths from decision metadata - * - * Uses pattern name and optional section to compute paths: - * - Compact: _claude-md/{section}/{module}.md - * - Detailed: docs/{PATTERN-NAME}.md - * - * @param patternName - Pattern name from decision document - * @param options - Generator options including section override - * @returns Computed output paths - * - * @example - * ```typescript - * const paths = determineOutputPaths('ProcessGuard', { section: 'validation' }); - * // Returns: - * // { - * // compact: '_claude-md/validation/process-guard.md', - * // detailed: 'docs/PROCESS-GUARD.md' - * // } - * ``` - */ -export function determineOutputPaths(patternName, options) { - // Convert PatternName to kebab-case for module name - const moduleName = toKebabCase(patternName); - // Use provided section or default to 'generated' - const section = options?.section ?? 'generated'; - // Convert PatternName to UPPER-KEBAB-CASE for detailed path - const upperKebab = toUpperKebabCase(patternName); - return { - compact: `_claude-md/${section}/${moduleName}.md`, - detailed: `docs/${upperKebab}.md`, - }; -} -// ============================================================================= -// Content Generation -// ============================================================================= -/** - * Generate compact/summary output (~50 lines) - * - * Includes only essential tables and type definitions. - * Suitable for Claude MD context files. - * - * @param decisionContent - Parsed decision document - * @param aggregatedContent - Content from source mapping execution - * @returns RenderableDocument for compact output - */ -export function generateCompactOutput(decisionContent, aggregatedContent) { - const sections = []; - // Title and brief - sections.push(heading(2, 'Overview')); - // Extract key tables and types from aggregated sections - for (const extracted of aggregatedContent.sections) { - // Only include sections with substantial content - if (!extracted.content || extracted.content.trim().length === 0) { - continue; - } - // For compact output, only include: - // 1. Type/interface definitions (shapes) - // 2. Key tables - if (extracted.shapes && extracted.shapes.length > 0) { - sections.push(heading(3, extracted.section)); - // Render shapes as compact type list - const typeList = extracted.shapes.map((shape) => `\`${shape.name}\` - ${shape.kind}`); - sections.push(list(typeList)); - } - else if (extracted.content.includes('|')) { - // Content contains a table - include it - sections.push(heading(3, extracted.section)); - sections.push(paragraph(extracted.content)); - } - } - // If no sections were added, add a placeholder - if (sections.length <= 1) { - sections.push(paragraph('*No structured content extracted.*')); - } - return createDocument(decisionContent.patternName, sections, { - purpose: 'Compact reference for Claude context', - detailLevel: 'summary', - }); -} -/** - * Generate detailed output (~300 lines) - * - * Includes everything: JSDoc, examples, full descriptions. - * Suitable for docs/ directory. - * - * @param decisionContent - Parsed decision document - * @param aggregatedContent - Content from source mapping execution - * @returns RenderableDocument for detailed output - */ -export function generateDetailedOutput(decisionContent, aggregatedContent) { - const sections = []; - // Track rendered DocString content to prevent duplicates - // Key is content hash (language + content) to identify unique DocStrings - const renderedDocStrings = new Set(); - // Feature description - if (decisionContent.description && decisionContent.description.trim().length > 0) { - sections.push(paragraph(decisionContent.description)); - sections.push(separator()); - } - // Context section from rules - if (decisionContent.rules.context.length > 0) { - sections.push(heading(2, 'Context')); - for (const rule of decisionContent.rules.context) { - sections.push(heading(3, rule.name.replace(/^Context\s*[-:]\s*/i, ''))); - if (rule.description) { - sections.push(...renderRuleDescription(rule.description)); - } - } - } - // Decision section from rules - if (decisionContent.rules.decision.length > 0) { - sections.push(heading(2, 'Decision')); - for (const rule of decisionContent.rules.decision) { - sections.push(heading(3, rule.name.replace(/^Decision\s*[-:]\s*/i, ''))); - if (rule.description) { - sections.push(...renderRuleDescription(rule.description)); - } - } - } - // Aggregated content sections - // Include all sections from Source Mapping - both external files AND self-references - // The Source Mapping table defines the canonical order of content - // Self-references to rules will be rendered here, and we filter them from "Other rules" below - const nonDuplicateSections = aggregatedContent.sections.filter((extracted) => { - // Skip empty content - if (!extracted.content || extracted.content.trim().length === 0) { - return false; - } - return true; - }); - if (nonDuplicateSections.length > 0) { - sections.push(heading(2, 'Implementation Details')); - for (const extracted of nonDuplicateSections) { - sections.push(heading(3, extracted.section)); - // Handle different content types - if (extracted.shapes && extracted.shapes.length > 0) { - // Render full shape definitions with JSDoc - for (const shape of extracted.shapes) { - // Include JSDoc as part of the code block (combined with source) - const fullSource = shape.jsDoc ? `${shape.jsDoc}\n${shape.sourceText}` : shape.sourceText; - sections.push(code(fullSource, 'typescript')); - // Add property description table for interfaces with documented properties - const propertyTable = renderPropertyDocsTable(shape.propertyDocs); - if (propertyTable) { - sections.push(paragraph(propertyTable)); - } - } - } - else if (extracted.docStrings && extracted.docStrings.length > 0) { - // Check if content has meaningful text beyond just DocStrings - // Rule block extractions include context text, tables, AND DocStrings - // We should render full content to preserve all text, not just DocStrings - const contentWithoutDocStrings = extracted.content - .replace(/"""[\w]*\n[\s\S]*?"""/g, '') // Remove Gherkin DocStrings - .replace(/```[\w]*\n[\s\S]*?```/g, '') // Remove markdown code blocks - .trim(); - if (contentWithoutDocStrings.length > 0) { - // Content has text beyond DocStrings - render full content with inline DocStrings - sections.push(...parseDescriptionWithDocStrings(extracted.content)); - } - else { - // Content is ONLY DocStrings - render them as code blocks, skipping duplicates - for (const ds of extracted.docStrings) { - const contentKey = `${ds.language}:${ds.content}`; - if (!renderedDocStrings.has(contentKey)) { - renderedDocStrings.add(contentKey); - sections.push(code(ds.content, ds.language)); - } - } - } - } - else { - // Plain content - convert DocStrings to code fences - sections.push(...parseDescriptionWithDocStrings(extracted.content)); - } - } - } - // Consequences section from rules - if (decisionContent.rules.consequences.length > 0) { - sections.push(heading(2, 'Consequences')); - for (const rule of decisionContent.rules.consequences) { - sections.push(heading(3, rule.name.replace(/^Consequence[s]?\s*[-:]\s*/i, ''))); - if (rule.description) { - sections.push(...renderRuleDescription(rule.description)); - } - } - } - // Other rules (custom sections) - // Skip if these rules are already covered by Source Mapping entries - // to prevent duplicate content in reference documentation - if (decisionContent.rules.other.length > 0) { - // Build set of section names from Source Mapping (both self-references and external files) - const sourceMappedSectionNames = new Set(); - for (const mapping of decisionContent.sourceMappings) { - // Normalize section name for matching (case-insensitive) - const normalizedSection = mapping.section.toLowerCase().trim(); - sourceMappedSectionNames.add(normalizedSection); - } - // Helper: extract significant words (3+ chars) for fuzzy matching - const getWords = (text) => new Set(text - .toLowerCase() - .split(/[^a-z]+/) - .filter((w) => w.length >= 3)); - // Only render rules that aren't covered by Source Mapping section names - for (const rule of decisionContent.rules.other) { - const ruleName = rule.name.toLowerCase().trim(); - const ruleWords = getWords(ruleName); - // Check if any Source Mapping section matches this rule name - // Match if: exact match, substring match, or 2+ words overlap - const isCovered = Array.from(sourceMappedSectionNames).some((sectionName) => { - // Exact or substring match - if (ruleName === sectionName || - ruleName.includes(sectionName) || - sectionName.includes(ruleName)) { - return true; - } - // Word overlap match (at least 2 significant words) - const sectionWords = getWords(sectionName); - let matches = 0; - for (const word of ruleWords) { - if (sectionWords.has(word)) - matches++; - } - return matches >= 2; - }); - if (!isCovered) { - sections.push(heading(2, rule.name)); - if (rule.description) { - sections.push(...renderRuleDescription(rule.description)); - } - } - } - } - // DocStrings if not already included - if (decisionContent.docStrings.length > 0 && aggregatedContent.sections.length === 0) { - sections.push(heading(2, 'Examples')); - for (const ds of decisionContent.docStrings) { - sections.push(code(ds.content, ds.language)); - } - } - // Add generation warnings if any - if (aggregatedContent.warnings.length > 0) { - sections.push(separator()); - sections.push(collapsible('Generation Warnings', aggregatedContent.warnings.map((w) => paragraph(`- ${w.severity}: ${w.message}`)))); - } - return createDocument(decisionContent.patternName, sections, { - purpose: 'Full documentation generated from decision document', - detailLevel: 'detailed', - }); -} -/** - * Generate standard output (~150 lines) - * - * Balance between compact and detailed: tables, types, key descriptions. - * Suitable for general documentation. - * - * @param decisionContent - Parsed decision document - * @param aggregatedContent - Content from source mapping execution - * @returns RenderableDocument for standard output - */ -export function generateStandardOutput(decisionContent, aggregatedContent) { - const sections = []; - // Brief description - if (decisionContent.description && decisionContent.description.trim().length > 0) { - const briefDesc = decisionContent.description.split('\n').slice(0, 3).join('\n'); - sections.push(paragraph(briefDesc)); - sections.push(separator()); - } - // Context summary - if (decisionContent.rules.context.length > 0) { - sections.push(heading(2, 'Context')); - const contextNames = decisionContent.rules.context.map((r) => r.name.replace(/^Context\s*[-:]\s*/i, '')); - sections.push(list(contextNames)); - } - // Decision summary - if (decisionContent.rules.decision.length > 0) { - sections.push(heading(2, 'Decision')); - for (const rule of decisionContent.rules.decision) { - sections.push(heading(3, rule.name.replace(/^Decision\s*[-:]\s*/i, ''))); - // First paragraph only - if (rule.description) { - const firstPara = rule.description.split('\n\n')[0] ?? ''; - sections.push(paragraph(firstPara)); - } - } - } - // Aggregated content with moderate detail - for (const extracted of aggregatedContent.sections) { - if (!extracted.content || extracted.content.trim().length === 0) { - continue; - } - sections.push(heading(3, extracted.section)); - if (extracted.shapes && extracted.shapes.length > 0) { - // Type definitions without full JSDoc - for (const shape of extracted.shapes) { - sections.push(code(shape.sourceText, 'typescript')); - } - } - else { - sections.push(paragraph(extracted.content)); - } - } - return createDocument(decisionContent.patternName, sections, { - purpose: 'Standard documentation from decision document', - detailLevel: 'standard', - }); -} -/** - * Execute the generation pipeline: validation, extraction, deduplication - * - * Internal function that performs the expensive work once. Both single-level - * and multi-level generators use this to avoid duplicate work. - * - * @param pattern - Extracted pattern with decision document content - * @param options - Generator options - * @returns Pipeline result or error - */ -async function executePipeline(pattern, options) { - // Default options - all robustness features enabled by default - const enableValidation = options.enableValidation ?? true; - const enableDeduplication = options.enableDeduplication ?? true; - const enableWarningCollection = options.enableWarningCollection ?? true; - // Step 1: Create WarningCollector for unified warning handling - const warningCollector = enableWarningCollection - ? createWarningCollector() - : undefined; - // Pattern name can come from directive.patternName or pattern.patternName or pattern.name - // directive.patternName and pattern.patternName are optional, pattern.name is required - // Use helper function to catch both null/undefined AND empty strings - const getPatternName = () => { - if (pattern.directive.patternName?.trim()) { - return pattern.directive.patternName; - } - if (pattern.patternName?.trim()) { - return pattern.patternName; - } - return pattern.name; - }; - const patternName = getPatternName(); - const description = pattern.directive.description; - const rules = pattern.rules ?? []; - // Step 2: Parse decision document - const decisionContent = parseDecisionDocument(patternName, description, rules); - // Step 3 & 4: Validate and execute source mapping (if mappings exist) - let aggregatedContent = { - sections: [], - warnings: [], - success: true, - }; - // Deduplication warnings when warningCollector is not used - const dedupWarnings = []; - if (decisionContent.sourceMappings.length > 0) { - // Step 3: PRE-FLIGHT VALIDATION (if enabled) - if (enableValidation) { - const validatorOptions = warningCollector - ? { baseDir: options.baseDir, warningCollector } - : { baseDir: options.baseDir }; - const validationResult = validateSourceMappingTable(decisionContent.sourceMappings, validatorOptions); - // Capture validation warnings after successful validation (Issue #4 fix) - if (validationResult.isValid && warningCollector && validationResult.warnings.length > 0) { - for (const warning of validationResult.warnings) { - warningCollector.capture(warning); - } - } - // If validation fails with errors, return early - if (!validationResult.isValid) { - const warnings = warningCollector - ? warningCollector.getAll().map((w) => `${w.category}: ${w.message}`) - : []; - return { - warnings, - errors: validationResult.errors.map((e) => { - // Include suggestions if available - if (e.suggestions && e.suggestions.length > 0) { - return `${e.message}. Did you mean: ${e.suggestions.join(', ')}?`; - } - return e.message; - }), - }; - } - } - // Step 4: EXECUTE SOURCE MAPPING (with warning collector) - const baseMapperOptions = { - baseDir: options.baseDir, - decisionDocPath: pattern.source.file, - decisionContent, - detailLevel: options.detailLevel ?? 'standard', - }; - const mapperOptions = warningCollector - ? { ...baseMapperOptions, warningCollector } - : baseMapperOptions; - aggregatedContent = await executeSourceMapping(decisionContent.sourceMappings, mapperOptions); - // Step 5: DEDUPLICATE SECTIONS (if enabled) - if (enableDeduplication && aggregatedContent.sections.length > 0) { - const dedupOptions = warningCollector ? { warningCollector } : undefined; - const dedupResult = deduplicateSections(aggregatedContent.sections, dedupOptions); - aggregatedContent.sections = dedupResult.sections; - // Capture deduplication warnings when not using collector - // (When collector is present, warnings are captured via side-effect) - if (!warningCollector && dedupResult.warnings.length > 0) { - dedupWarnings.push(...dedupResult.warnings); - } - } - } - return { decisionContent, aggregatedContent, warningCollector, patternName, dedupWarnings }; -} -/** - * Check if pipeline result is an error - */ -function isPipelineError(result) { - return 'errors' in result; -} -// ============================================================================= -// Main Generation Function -// ============================================================================= -/** - * Generate documentation from a decision document - * - * Main entry point that orchestrates the full pipeline: - * 1. Create WarningCollector for unified warning handling - * 2. Parse decision document to extract content - * 3. Validate source mappings (if enabled) - fails fast on validation errors - * 4. Execute source mapping to aggregate content from referenced files - * 5. Deduplicate sections (if enabled) - * 6. Generate output at specified detail level(s) - * 7. Return output files with all warnings - * - * @param pattern - Extracted pattern with decision document content - * @param options - Generator options - * @returns Generation result with files and warnings - * - * @example - * ```typescript - * const result = await generateFromDecision(processGuardPattern, { - * baseDir: process.cwd(), - * detailLevel: 'detailed', - * claudeMdSection: 'validation', - * }); - * - * for (const file of result.files) { - * fs.writeFileSync(file.path, file.content); - * } - * ``` - */ -export async function generateFromDecision(pattern, options) { - // Execute the pipeline - const pipelineResult = await executePipeline(pattern, options); - // If pipeline failed, return errors - if (isPipelineError(pipelineResult)) { - return { - files: [], - warnings: pipelineResult.warnings, - errors: pipelineResult.errors, - success: false, - }; - } - const { decisionContent, aggregatedContent, warningCollector, patternName, dedupWarnings } = pipelineResult; - // Generate output at requested detail level - const sectionOption = options.claudeMdSection; - const outputPaths = determineOutputPaths(patternName, sectionOption ? { section: sectionOption } : undefined); - const detailLevel = options.detailLevel ?? 'standard'; - // Generate based on detail level - let doc; - let outputPath; - switch (detailLevel) { - case 'summary': - doc = generateCompactOutput(decisionContent, aggregatedContent); - outputPath = outputPaths.compact; - break; - case 'detailed': - doc = generateDetailedOutput(decisionContent, aggregatedContent); - outputPath = outputPaths.detailed; - break; - case 'standard': - default: - doc = generateStandardOutput(decisionContent, aggregatedContent); - outputPath = outputPaths.detailed; - break; - } - // Render to markdown - const content = renderToMarkdown(doc); - const files = [{ path: outputPath, content }]; - // Collect all warnings and return - // When warningCollector is present, it captures all warnings via side-effects - // When not present, we need to merge extraction warnings with deduplication warnings - const warnings = warningCollector - ? warningCollector.getAll().map((w) => `${w.category}: ${w.message}`) - : [ - ...aggregatedContent.warnings.map((w) => `${w.severity}: ${w.message}`), - ...dedupWarnings.map((w) => `${w.category}: ${w.message}`), - ]; - return { files, warnings, errors: [], success: true }; -} -/** - * Generate both compact and detailed outputs - * - * Runs the pipeline once and generates documentation at both detail levels. - * More efficient than calling generateFromDecision twice. - * - * @param pattern - Extracted pattern with decision document content - * @param options - Generator options - * @returns Generation result with both output files - */ -export async function generateFromDecisionMultiLevel(pattern, options) { - // Execute the pipeline ONCE - const pipelineResult = await executePipeline(pattern, options); - // If pipeline failed, return errors - if (isPipelineError(pipelineResult)) { - return { - files: [], - warnings: pipelineResult.warnings, - errors: pipelineResult.errors, - success: false, - }; - } - const { decisionContent, aggregatedContent, warningCollector, patternName, dedupWarnings } = pipelineResult; - // Determine output paths - const sectionOption = options.claudeMdSection; - const outputPaths = determineOutputPaths(patternName, sectionOption ? { section: sectionOption } : undefined); - // Generate BOTH outputs from the same processed data - const compactDoc = generateCompactOutput(decisionContent, aggregatedContent); - const detailedDoc = generateDetailedOutput(decisionContent, aggregatedContent); - const compactContent = renderToMarkdown(compactDoc); - const detailedContent = renderToMarkdown(detailedDoc); - const files = [ - { path: outputPaths.compact, content: compactContent }, - { path: outputPaths.detailed, content: detailedContent }, - ]; - // Collect all warnings - // When warningCollector is present, it captures all warnings via side-effects - // When not present, we need to merge extraction warnings with deduplication warnings - const warnings = warningCollector - ? warningCollector.getAll().map((w) => `${w.category}: ${w.message}`) - : [ - ...aggregatedContent.warnings.map((w) => `${w.severity}: ${w.message}`), - ...dedupWarnings.map((w) => `${w.category}: ${w.message}`), - ]; - return { files, warnings, errors: [], success: true }; -} -// ============================================================================= -// DocumentGenerator Implementation -// ============================================================================= -/** - * Decision Doc Generator for registry integration - * - * Implements DocumentGenerator interface for use with the generator registry. - * Filters patterns by type to find ADR/PDR decision documents with source mappings. - */ -export class DecisionDocGeneratorImpl { - name = 'doc-from-decision'; - description = 'Generate documentation from ADR/PDR decision documents'; - async generate(patterns, context) { - const allFiles = []; - // Filter for decision documents (ADR/PDR patterns with source mappings) - const decisionPatterns = patterns.filter((p) => { - // Check if pattern has source mapping table in description or rules - const description = p.directive.description; - const hasSourceMappingInDesc = description.includes('| Section |') && - (description.includes('| Source File |') || description.includes('| Source |')); - // Check rules for source mapping tables - const hasSourceMappingInRules = (p.rules ?? []).some((rule) => rule.description.includes('| Section |') && - (rule.description.includes('| Source File |') || rule.description.includes('| Source |'))); - return hasSourceMappingInDesc || hasSourceMappingInRules; - }); - // Collect all warnings and errors for metadata instead of console output - const allWarnings = []; - const allErrors = []; - if (decisionPatterns.length === 0) { - allWarnings.push('No decision documents with source mappings found. Ensure patterns have source mapping tables.'); - return { - files: [], - metadata: { - warnings: allWarnings, - errors: allErrors, - patternsProcessed: 0, - }, - }; - } - // Generate documentation for each decision pattern - for (const pattern of decisionPatterns) { - // Extract section from pattern tags or default to 'generated' - const section = extractClaudeMdSection(pattern) ?? 'generated'; - const result = await generateFromDecisionMultiLevel(pattern, { - baseDir: context.baseDir, - detailLevel: 'detailed', // Generate both levels - claudeMdSection: section, - }); - allFiles.push(...result.files); - // Collect errors and warnings (but don't fail) - allErrors.push(...result.errors); - allWarnings.push(...result.warnings); - } - return { - files: allFiles, - metadata: { - warnings: allWarnings, - errors: allErrors, - patternsProcessed: decisionPatterns.length, - }, - }; - } -} -/** - * Create decision doc generator instance - */ -export function createDecisionDocGenerator() { - return new DecisionDocGeneratorImpl(); -} -//# sourceMappingURL=decision-doc-generator.js.map \ No newline at end of file diff --git a/dist/generators/built-in/decision-doc-generator.js.map b/dist/generators/built-in/decision-doc-generator.js.map deleted file mode 100644 index 87f59aeb..00000000 --- a/dist/generators/built-in/decision-doc-generator.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decision-doc-generator.js","sourceRoot":"","sources":["../../../src/generators/built-in/decision-doc-generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAMH,OAAO,EACL,OAAO,EACP,SAAS,EACT,IAAI,EACJ,IAAI,EACJ,SAAS,EACT,WAAW,EACX,QAAQ,IAAI,cAAc,GAC3B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EACL,qBAAqB,GAEtB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EACL,8BAA8B,EAC9B,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,oBAAoB,GAGrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EACL,sBAAsB,GAGvB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,0BAA0B,EAAyB,MAAM,gCAAgC,CAAC;AACnG,OAAO,EAAE,mBAAmB,EAA4B,MAAM,4BAA4B,CAAC;AAsE3F,gFAAgF;AAChF,cAAc;AACd,gFAAgF;AAEhF;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,sBAAsB,CAAC,OAAyB;IAC9D,MAAM,IAAI,GAAG,OAAO,CAAC,SAA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AAE,EAAE;gBACT,QAAQ,EAAE;oBACR,QAAQ,EAAE,WAAW;oBACrB,MAAM,EAAE,SAAS;oBACjB,iBAAiB,EAAE,CAAC;iBACrB;aACF,CAAC;QACJ,CAAC;QAED,mDAAmD;QACnD,KAAK,MAAM,OAAO,IAAI,gBAAgB,EAAE,CAAC;YACvC,8DAA8D;YAC9D,MAAM,OAAO,GAAG,sBAAsB,CAAC,OAAO,CAAC,IAAI,WAAW,CAAC;YAE/D,MAAM,MAAM,GAAG,MAAM,8BAA8B,CAAC,OAAO,EAAE;gBAC3D,OAAO,EAAE,OAAO,CAAC,OAAO;gBACxB,WAAW,EAAE,UAAU,EAAE,uBAAuB;gBAChD,eAAe,EAAE,OAAO;aACzB,CAAC,CAAC;YAEH,QAAQ,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;YAE/B,+CAA+C;YAC/C,SAAS,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;YACjC,WAAW,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;QACvC,CAAC;QAED,OAAO;YACL,KAAK,EAAE,QAAQ;YACf,QAAQ,EAAE;gBACR,QAAQ,EAAE,WAAW;gBACrB,MAAM,EAAE,SAAS;gBACjB,iBAAiB,EAAE,gBAAgB,CAAC,MAAM;aAC3C;SACF,CAAC;IACJ,CAAC;CACF;AAED;;GAEG;AACH,MAAM,UAAU,0BAA0B;IACxC,OAAO,IAAI,wBAAwB,EAAE,CAAC;AACxC,CAAC"} \ No newline at end of file diff --git a/dist/generators/built-in/index.d.ts b/dist/generators/built-in/index.d.ts deleted file mode 100644 index e68bd0d4..00000000 --- a/dist/generators/built-in/index.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * @libar-docs - * @libar-docs-generator - * @libar-docs-pattern BuiltInGenerators - * @libar-docs-status completed - * @libar-docs-uses GeneratorRegistry, CodecBasedGenerator - * - * ## BuiltInGenerators - Default Generator Bootstrap - * - * Registers all codec-based generators on import using the RDM - * (RenderableDocument Model) architecture. - * - * All generators use Zod 4 codecs to transform MasterDataset - * into RenderableDocuments, which are then rendered to markdown. - * - * ### When to Use - * - * - Use when setting up documentation generation for a project - * - Import this module to register all default generators - */ -import './codec-generators.js'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/dist/generators/built-in/index.d.ts.map b/dist/generators/built-in/index.d.ts.map deleted file mode 100644 index 3f1de7c0..00000000 --- a/dist/generators/built-in/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generators/built-in/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,uBAAuB,CAAC"} \ No newline at end of file diff --git a/dist/generators/built-in/index.js b/dist/generators/built-in/index.js deleted file mode 100644 index 7cb498a3..00000000 --- a/dist/generators/built-in/index.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * @libar-docs - * @libar-docs-generator - * @libar-docs-pattern BuiltInGenerators - * @libar-docs-status completed - * @libar-docs-uses GeneratorRegistry, CodecBasedGenerator - * - * ## BuiltInGenerators - Default Generator Bootstrap - * - * Registers all codec-based generators on import using the RDM - * (RenderableDocument Model) architecture. - * - * All generators use Zod 4 codecs to transform MasterDataset - * into RenderableDocuments, which are then rendered to markdown. - * - * ### When to Use - * - * - Use when setting up documentation generation for a project - * - Import this module to register all default generators - */ -// Import to register codec-based generators (RDM architecture) -import './codec-generators.js'; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/generators/built-in/index.js.map b/dist/generators/built-in/index.js.map deleted file mode 100644 index e42abb43..00000000 --- a/dist/generators/built-in/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/generators/built-in/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,+DAA+D;AAC/D,OAAO,uBAAuB,CAAC"} \ No newline at end of file diff --git a/dist/generators/built-in/reference-generators.d.ts b/dist/generators/built-in/reference-generators.d.ts deleted file mode 100644 index 6c928bb6..00000000 --- a/dist/generators/built-in/reference-generators.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -/** - * @libar-docs - * @libar-docs-pattern ReferenceGeneratorRegistration - * @libar-docs-status active - * @libar-docs-implements CodecDrivenReferenceGeneration - * - * ## Reference Generator Registrations - * - * Registers all reference document generators. Each config produces - * TWO generators: detailed (docs/) and summary (_claude-md/). - */ -import type { GeneratorRegistry } from '../registry.js'; -import { type ReferenceDocConfig } from '../../renderable/codecs/reference.js'; -/** - * Canonical product area values from ADR-001. - * Each generates a composite overview document scoped to that area. - */ -export declare const PRODUCT_AREA_VALUES: readonly ["Annotation", "Configuration", "Generation", "Validation", "DataAPI", "CoreTypes", "Process"]; -/** - * Options for customizing product area config generation. - */ -export interface ProductAreaConfigOptions { - /** Filename suffix for docs output (default: '.md') */ - readonly docsFilenameSuffix?: string; -} -/** - * Creates reference document configs for all canonical product areas. - * - * Each config uses `productArea` as the primary filter — the codec - * auto-derives all content sources from the filtered pattern set. - * Explicit `conventionTags`, `shapeSources`, and `behaviorCategories` - * are left empty because the product-area decode path ignores them. - * - * @param options - Optional customization for output filenames - */ -export declare function createProductAreaConfigs(options?: ProductAreaConfigOptions): ReferenceDocConfig[]; -/** - * Registers reference generators from the provided configs in the GeneratorRegistry. - * - * Partitions configs by `productArea` presence: - * - Configs WITH `productArea` -> "product-area-docs" meta-generator - * - Configs WITHOUT `productArea` -> "reference-docs" meta-generator - * - Individual generators registered for all configs - * - * @param registry - The generator registry to register into - * @param configs - Reference document configurations (from project config) - */ -export declare function registerReferenceGenerators(registry: GeneratorRegistry, configs: readonly ReferenceDocConfig[]): void; -//# sourceMappingURL=reference-generators.d.ts.map \ No newline at end of file diff --git a/dist/generators/built-in/reference-generators.d.ts.map b/dist/generators/built-in/reference-generators.d.ts.map deleted file mode 100644 index 2e1508cb..00000000 --- a/dist/generators/built-in/reference-generators.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"reference-generators.d.ts","sourceRoot":"","sources":["../../../src/generators/built-in/reference-generators.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAQH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD,OAAO,EAIL,KAAK,kBAAkB,EAExB,MAAM,sCAAsC,CAAC;AAY9C;;;GAGG;AACH,eAAO,MAAM,mBAAmB,yGAQtB,CAAC;AAEX;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,uDAAuD;IACvD,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;CACtC;AAED;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,CAAC,EAAE,wBAAwB,GAAG,kBAAkB,EAAE,CAgBjG;AA+TD;;;;;;;;;;GAUG;AACH,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,iBAAiB,EAC3B,OAAO,EAAE,SAAS,kBAAkB,EAAE,GACrC,IAAI,CAwCN"} \ No newline at end of file diff --git a/dist/generators/built-in/reference-generators.js b/dist/generators/built-in/reference-generators.js deleted file mode 100644 index 76d2ddd2..00000000 --- a/dist/generators/built-in/reference-generators.js +++ /dev/null @@ -1,364 +0,0 @@ -/** - * @libar-docs - * @libar-docs-pattern ReferenceGeneratorRegistration - * @libar-docs-status active - * @libar-docs-implements CodecDrivenReferenceGeneration - * - * ## Reference Generator Registrations - * - * Registers all reference document generators. Each config produces - * TWO generators: detailed (docs/) and summary (_claude-md/). - */ -import { heading, paragraph, separator, table, document } from '../../renderable/schema.js'; -import { renderToMarkdown, renderToClaudeContext } from '../../renderable/render.js'; -import { createReferenceCodec, PRODUCT_AREA_META, buildScopedDiagram, } from '../../renderable/codecs/reference.js'; -import { toKebabCase } from '../../utils/string-utils.js'; -import { normalizeStatus } from '../../taxonomy/normalized-status.js'; -// ============================================================================ -// Reference Document Configurations -// ============================================================================ -// ============================================================================ -// Product Area Configs (ADR-001) -// ============================================================================ -/** - * Canonical product area values from ADR-001. - * Each generates a composite overview document scoped to that area. - */ -export const PRODUCT_AREA_VALUES = [ - 'Annotation', - 'Configuration', - 'Generation', - 'Validation', - 'DataAPI', - 'CoreTypes', - 'Process', -]; -/** - * Creates reference document configs for all canonical product areas. - * - * Each config uses `productArea` as the primary filter — the codec - * auto-derives all content sources from the filtered pattern set. - * Explicit `conventionTags`, `shapeSources`, and `behaviorCategories` - * are left empty because the product-area decode path ignores them. - * - * @param options - Optional customization for output filenames - */ -export function createProductAreaConfigs(options) { - const suffix = options?.docsFilenameSuffix ?? '.md'; - return PRODUCT_AREA_VALUES.map((area) => { - const kebab = toKebabCase(area); - return { - title: `${area} Overview`, - productArea: area, - conventionTags: [], - shapeSources: [], - shapeSelectors: [], - behaviorCategories: [], - claudeMdSection: kebab, - docsFilename: `${kebab.toUpperCase()}${suffix}`, - claudeMdFilename: `${kebab}-overview.md`, - }; - }); -} -// ============================================================================ -// Reference Document Generator -// ============================================================================ -/** - * Generator that wraps a reference codec for a specific config + detail level. - * Implements DocumentGenerator directly (not via CodecBasedGenerator). - */ -class ReferenceDocGenerator { - name; - description; - config; - detailLevel; - outputPath; - constructor(name, description, config, detailLevel, outputPath) { - this.name = name; - this.description = description; - this.config = config; - this.detailLevel = detailLevel; - this.outputPath = outputPath; - } - generate(_patterns, context) { - if (!context.masterDataset) { - return Promise.resolve({ - files: [], - errors: [ - { - type: 'generator', - message: `Generator "${this.name}" requires MasterDataset but none was provided.`, - }, - ], - }); - } - const codec = createReferenceCodec(this.config, { - detailLevel: this.detailLevel, - generateDetailFiles: false, - }); - // Cast needed: Zod codec infers optional props as `T | undefined`, - // but RenderableDocument uses exactOptionalPropertyTypes - const doc = codec.decode(context.masterDataset); - // Summary-level output (for _claude-md/) uses token-efficient renderer - const render = this.detailLevel === 'summary' ? renderToClaudeContext : renderToMarkdown; - const content = render(doc); - return Promise.resolve({ - files: [{ path: this.outputPath, content }], - }); - } -} -// ============================================================================ -// Registration -// ============================================================================ -/** - * Derive a kebab-case name from a title like "Process Guard Reference". - */ -function toGeneratorName(title) { - return title - .replace(/ Reference$/, '') - .toLowerCase() - .replace(/\s+/g, '-'); -} -/** - * Meta-generator that produces all reference documents (detailed + summary per config) - * from a single `-g reference-docs` invocation. - * - * Only handles configs WITHOUT `productArea` set. Product-area configs - * are handled by `ProductAreaDocsGenerator` instead. - */ -class ReferenceDocsGenerator { - configs; - name = 'reference-docs'; - description; - constructor(configs) { - this.configs = configs; - this.description = `All reference documents (${configs.length} detailed + ${configs.length} summary)`; - } - generate(_patterns, context) { - if (!context.masterDataset) { - return Promise.resolve({ - files: [], - errors: [ - { - type: 'generator', - message: `Generator "${this.name}" requires MasterDataset but none was provided.`, - }, - ], - }); - } - const files = []; - for (const config of this.configs) { - // Detailed output -> docs/{docsFilename} - const detailedCodec = createReferenceCodec(config, { - detailLevel: 'detailed', - generateDetailFiles: false, - }); - const detailedDoc = detailedCodec.decode(context.masterDataset); - files.push({ path: `docs/${config.docsFilename}`, content: renderToMarkdown(detailedDoc) }); - // Summary output -> _claude-md/{section}/{filename} - const summaryCodec = createReferenceCodec(config, { - detailLevel: 'summary', - generateDetailFiles: false, - }); - const summaryDoc = summaryCodec.decode(context.masterDataset); - files.push({ - path: `_claude-md/${config.claudeMdSection}/${config.claudeMdFilename}`, - content: renderToClaudeContext(summaryDoc), - }); - } - return Promise.resolve({ files }); - } -} -/** - * Meta-generator for product area overview documents. - * - * Handles configs WITH `productArea` set. Outputs detailed docs to - * `product-areas/{docsFilename}` and also generates a progressive - * disclosure index at `PRODUCT-AREAS.md`. - */ -class ProductAreaDocsGenerator { - configs; - name = 'product-area-docs'; - description; - constructor(configs) { - this.configs = configs; - this.description = `Product area overview documents (${configs.length} areas)`; - } - generate(_patterns, context) { - if (!context.masterDataset) { - return Promise.resolve({ - files: [], - errors: [ - { - type: 'generator', - message: `Generator "${this.name}" requires MasterDataset but none was provided.`, - }, - ], - }); - } - const files = []; - for (const config of this.configs) { - // Detailed output -> product-areas/{docsFilename} - const detailedCodec = createReferenceCodec(config, { - detailLevel: 'detailed', - generateDetailFiles: false, - }); - const detailedDoc = detailedCodec.decode(context.masterDataset); - files.push({ - path: `product-areas/${config.docsFilename}`, - content: renderToMarkdown(detailedDoc), - }); - // Summary output -> _claude-md/{section}/{filename} - const summaryCodec = createReferenceCodec(config, { - detailLevel: 'summary', - generateDetailFiles: false, - }); - const summaryDoc = summaryCodec.decode(context.masterDataset); - files.push({ - path: `_claude-md/${config.claudeMdSection}/${config.claudeMdFilename}`, - content: renderToClaudeContext(summaryDoc), - }); - } - // Progressive disclosure index - files.push({ - path: 'PRODUCT-AREAS.md', - content: buildProductAreaIndex(this.configs, context.masterDataset), - }); - return Promise.resolve({ files }); - } -} -/** - * Builds a progressive disclosure index for product area documents. - * - * Data-driven: computes per-area statistics from MasterDataset patterns, - * renders cross-area progress table, and generates live Mermaid diagrams - * from annotation relationship data via buildScopedDiagram. - */ -function buildProductAreaIndex(configs, dataset) { - const sections = []; - // Per-area sections with intro prose and live statistics - for (const config of configs) { - const area = config.productArea; - if (area === undefined) - continue; - const meta = PRODUCT_AREA_META[area]; - if (meta === undefined) - continue; - sections.push(heading(2, `[${area}](product-areas/${config.docsFilename})`)); - sections.push(paragraph(`> **${meta.question}**`)); - sections.push(paragraph(meta.intro)); - // Live per-area statistics - const areaPatterns = dataset.patterns.filter((p) => p.productArea === area); - if (areaPatterns.length > 0) { - const completed = areaPatterns.filter((p) => normalizeStatus(p.status) === 'completed').length; - const active = areaPatterns.filter((p) => normalizeStatus(p.status) === 'active').length; - const planned = areaPatterns.filter((p) => normalizeStatus(p.status) === 'planned').length; - sections.push(paragraph(`**${areaPatterns.length} patterns** — ${completed} completed, ${active} active, ${planned} planned`)); - } - // Key patterns from curated list - if (meta.keyPatterns.length > 0) { - sections.push(paragraph(`**Key patterns:** ${meta.keyPatterns.join(', ')}`)); - } - } - sections.push(separator()); - // Cross-area progress summary table - const tableHeaders = ['Area', 'Patterns', 'Completed', 'Active', 'Planned']; - const tableRows = []; - let totalPatterns = 0; - let totalCompleted = 0; - let totalActive = 0; - let totalPlanned = 0; - for (const config of configs) { - const area = config.productArea; - if (area === undefined) - continue; - const areaPatterns = dataset.patterns.filter((p) => p.productArea === area); - const completed = areaPatterns.filter((p) => normalizeStatus(p.status) === 'completed').length; - const active = areaPatterns.filter((p) => normalizeStatus(p.status) === 'active').length; - const planned = areaPatterns.filter((p) => normalizeStatus(p.status) === 'planned').length; - tableRows.push([ - `[${area}](product-areas/${config.docsFilename})`, - String(areaPatterns.length), - String(completed), - String(active), - String(planned), - ]); - totalPatterns += areaPatterns.length; - totalCompleted += completed; - totalActive += active; - totalPlanned += planned; - } - tableRows.push([ - '**Total**', - `**${totalPatterns}**`, - `**${totalCompleted}**`, - `**${totalActive}**`, - `**${totalPlanned}**`, - ]); - sections.push(heading(2, 'Progress Overview')); - sections.push(table(tableHeaders, tableRows)); - sections.push(separator()); - // Live cross-area diagrams from annotation data - // Collect key patterns from all areas for a curated cross-area view - const allKeyPatterns = []; - for (const config of configs) { - const area = config.productArea; - if (area === undefined) - continue; - const meta = PRODUCT_AREA_META[area]; - if (meta !== undefined) { - allKeyPatterns.push(...meta.keyPatterns); - } - } - // Diagram 1: C4Context cross-area system overview - const c4Scope = { - title: 'System Architecture', - diagramType: 'C4Context', - patterns: allKeyPatterns, - }; - sections.push(...buildScopedDiagram(dataset, c4Scope)); - // Diagram 2: Flowchart showing cross-area relationships - const flowScope = { - title: 'Cross-Area Pattern Relationships', - direction: 'LR', - patterns: allKeyPatterns, - }; - sections.push(...buildScopedDiagram(dataset, flowScope)); - const doc = document('Product Areas', sections, { - purpose: 'Product area overview index', - detailLevel: 'Full reference', - }); - return renderToMarkdown(doc); -} -/** - * Registers reference generators from the provided configs in the GeneratorRegistry. - * - * Partitions configs by `productArea` presence: - * - Configs WITH `productArea` -> "product-area-docs" meta-generator - * - Configs WITHOUT `productArea` -> "reference-docs" meta-generator - * - Individual generators registered for all configs - * - * @param registry - The generator registry to register into - * @param configs - Reference document configurations (from project config) - */ -export function registerReferenceGenerators(registry, configs) { - // Partition configs by productArea presence - const productAreaConfigs = configs.filter((c) => c.productArea !== undefined); - const referenceConfigs = configs.filter((c) => c.productArea === undefined); - // Product area meta-generator - if (productAreaConfigs.length > 0) { - registry.register(new ProductAreaDocsGenerator(productAreaConfigs)); - } - // Standard reference-docs meta-generator - if (referenceConfigs.length > 0) { - registry.register(new ReferenceDocsGenerator(referenceConfigs)); - } - // Individual generators: selective invocation per document - for (const config of configs) { - const kebabName = toGeneratorName(config.title); - const docsPrefix = config.productArea !== undefined ? 'product-areas' : 'docs'; - registry.register(new ReferenceDocGenerator(`${kebabName}-reference`, `${config.title} (detailed)`, config, 'detailed', `${docsPrefix}/${config.docsFilename}`)); - registry.register(new ReferenceDocGenerator(`${kebabName}-reference-claude`, `${config.title} (summary)`, config, 'summary', `_claude-md/${config.claudeMdSection}/${config.claudeMdFilename}`)); - } -} -//# sourceMappingURL=reference-generators.js.map \ No newline at end of file diff --git a/dist/generators/built-in/reference-generators.js.map b/dist/generators/built-in/reference-generators.js.map deleted file mode 100644 index b94d4596..00000000 --- a/dist/generators/built-in/reference-generators.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"reference-generators.js","sourceRoot":"","sources":["../../../src/generators/built-in/reference-generators.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAOH,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAE5F,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACrF,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,GAGnB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EA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B,GAAG,SAAS,mBAAmB,EAC/B,GAAG,MAAM,CAAC,KAAK,YAAY,EAC3B,MAAM,EACN,SAAS,EACT,cAAc,MAAM,CAAC,eAAe,IAAI,MAAM,CAAC,gBAAgB,EAAE,CAClE,CACF,CAAC;IACJ,CAAC;AACH,CAAC"} \ No newline at end of file diff --git a/dist/generators/codec-based.d.ts b/dist/generators/codec-based.d.ts deleted file mode 100644 index 4c6bf67f..00000000 --- a/dist/generators/codec-based.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern CodecBasedGenerator - * @libar-docs-status completed - * @libar-docs-arch-role service - * @libar-docs-arch-context generator - * @libar-docs-arch-layer application - * - * ## Codec-Based Generator - * - * Adapts the new RenderableDocument Model (RDM) codec system to the - * existing DocumentGenerator interface. This allows codec-based document - * generation to work seamlessly with the existing orchestrator. - * - * ### When to Use - * - * - When creating a new document type generator using the RDM codec pattern - * - When adapting a Zod codec to the DocumentGenerator interface - * - When understanding how codec-based generation integrates with the orchestrator - * - * Architecture: - * ``` - * GeneratorContext.masterDataset → Codec.decode() → RenderableDocument → renderDocumentWithFiles() → OutputFile[] - * ``` - */ -import type { DocumentGenerator, GeneratorContext, GeneratorOutput } from './types.js'; -import type { ExtractedPattern } from '../validation-schemas/index.js'; -import { type DocumentType } from '../renderable/generate.js'; -/** - * Codec-based generator that wraps the new RDM system. - * - * Each instance handles a single document type and uses the corresponding - * codec to transform MasterDataset into RenderableDocument, then renders - * to markdown. - */ -export declare class CodecBasedGenerator implements DocumentGenerator { - readonly name: string; - private readonly documentType; - readonly description: string; - constructor(name: string, documentType: DocumentType); - generate(_patterns: readonly ExtractedPattern[], context: GeneratorContext): Promise; -} -/** - * Create a codec-based generator for a specific document type. - * - * @param name - Generator name for registry - * @param documentType - Document type key from DOCUMENT_TYPES - * @returns DocumentGenerator instance - * - * @example - * ```typescript - * const generator = createCodecGenerator("patterns-v2", "patterns"); - * generatorRegistry.register(generator); - * ``` - */ -export declare function createCodecGenerator(name: string, documentType: DocumentType): DocumentGenerator; -/** - * Available codec-based document types. - * Re-exported from generate.ts for convenience. - */ -export { DOCUMENT_TYPES, type DocumentType } from '../renderable/generate.js'; -//# sourceMappingURL=codec-based.d.ts.map \ No newline at end of file diff --git a/dist/generators/codec-based.d.ts.map b/dist/generators/codec-based.d.ts.map deleted file mode 100644 index 7a5514ef..00000000 --- a/dist/generators/codec-based.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"codec-based.d.ts","sourceRoot":"","sources":["../../src/generators/codec-based.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AACvF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,EAAoB,KAAK,YAAY,EAAkB,MAAM,2BAA2B,CAAC;AAEhG;;;;;;GAMG;AACH,qBAAa,mBAAoB,YAAW,iBAAiB;IAIzD,QAAQ,CAAC,IAAI,EAAE,MAAM;IACrB,OAAO,CAAC,QAAQ,CAAC,YAAY;IAJ/B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;gBAGlB,IAAI,EAAE,MAAM,EACJ,YAAY,EAAE,YAAY;IAK7C,QAAQ,CACN,SAAS,EAAE,SAAS,gBAAgB,EAAE,EACtC,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,eAAe,CAAC;CAyB5B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,GAAG,iBAAiB,CAEhG;AAED;;;GAGG;AACH,OAAO,EAAE,cAAc,EAAE,KAAK,YAAY,EAAE,MAAM,2BAA2B,CAAC"} \ No newline at end of file diff --git a/dist/generators/codec-based.js b/dist/generators/codec-based.js deleted file mode 100644 index 6b6ebbd3..00000000 --- a/dist/generators/codec-based.js +++ /dev/null @@ -1,88 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern CodecBasedGenerator - * @libar-docs-status completed - * @libar-docs-arch-role service - * @libar-docs-arch-context generator - * @libar-docs-arch-layer application - * - * ## Codec-Based Generator - * - * Adapts the new RenderableDocument Model (RDM) codec system to the - * existing DocumentGenerator interface. This allows codec-based document - * generation to work seamlessly with the existing orchestrator. - * - * ### When to Use - * - * - When creating a new document type generator using the RDM codec pattern - * - When adapting a Zod codec to the DocumentGenerator interface - * - When understanding how codec-based generation integrates with the orchestrator - * - * Architecture: - * ``` - * GeneratorContext.masterDataset → Codec.decode() → RenderableDocument → renderDocumentWithFiles() → OutputFile[] - * ``` - */ -import { generateDocument, DOCUMENT_TYPES } from '../renderable/generate.js'; -/** - * Codec-based generator that wraps the new RDM system. - * - * Each instance handles a single document type and uses the corresponding - * codec to transform MasterDataset into RenderableDocument, then renders - * to markdown. - */ -export class CodecBasedGenerator { - name; - documentType; - description; - constructor(name, documentType) { - this.name = name; - this.documentType = documentType; - this.description = DOCUMENT_TYPES[documentType].description; - } - generate(_patterns, context) { - // Codec-based generation requires MasterDataset - if (!context.masterDataset) { - return Promise.resolve({ - files: [], - errors: [ - { - type: 'generator', - message: `Generator "${this.name}" requires MasterDataset in context but none was provided. Ensure the orchestrator creates a MasterDataset before running codec-based generators.`, - }, - ], - }); - } - // Convert RuntimeMasterDataset to MasterDataset format - // The RDM codecs expect the Zod-inferred MasterDataset type - const dataset = context.masterDataset; - // Generate document using codec, passing through any codec-specific options - const outputFiles = generateDocument(this.documentType, dataset, context.codecOptions); - return Promise.resolve({ - files: outputFiles, - }); - } -} -/** - * Create a codec-based generator for a specific document type. - * - * @param name - Generator name for registry - * @param documentType - Document type key from DOCUMENT_TYPES - * @returns DocumentGenerator instance - * - * @example - * ```typescript - * const generator = createCodecGenerator("patterns-v2", "patterns"); - * generatorRegistry.register(generator); - * ``` - */ -export function createCodecGenerator(name, documentType) { - return new CodecBasedGenerator(name, documentType); -} -/** - * Available codec-based document types. - * Re-exported from generate.ts for convenience. - */ -export { DOCUMENT_TYPES } from '../renderable/generate.js'; -//# sourceMappingURL=codec-based.js.map \ No newline at end of file diff --git a/dist/generators/codec-based.js.map b/dist/generators/codec-based.js.map deleted file mode 100644 index c2c687b6..00000000 --- a/dist/generators/codec-based.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"codec-based.js","sourceRoot":"","sources":["../../src/generators/codec-based.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAIH,OAAO,EAAE,gBAAgB,EAAqB,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAEhG;;;;;;GAMG;AACH,MAAM,OAAO,mBAAmB;IAInB;IACQ;IAJV,WAAW,CAAS;IAE7B,YACW,IAAY,EACJ,YAA0B;QADlC,SAAI,GAAJ,IAAI,CAAQ;QACJ,iBAAY,GAAZ,YAAY,CAAc;QAE3C,IAAI,CAAC,WAAW,GAAG,cAAc,CAAC,YAAY,CAAC,CAAC,WAAW,CAAC;IAC9D,CAAC;IAED,QAAQ,CACN,SAAsC,EACtC,OAAyB;QAEzB,gDAAgD;QAChD,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,CAAC;YAC3B,OAAO,OAAO,CAAC,OAAO,CAAC;gBACrB,KAAK,EAAE,EAAE;gBACT,MAAM,EAAE;oBACN;wBACE,IAAI,EAAE,WAAoB;wBAC1B,OAAO,EAAE,cAAc,IAAI,CAAC,IAAI,mJAAmJ;qBACpL;iBACF;aACF,CAAC,CAAC;QACL,CAAC;QAED,uDAAuD;QACvD,4DAA4D;QAC5D,MAAM,OAAO,GAAG,OAAO,CAAC,aAAa,CAAC;QAEtC,4EAA4E;QAC5E,MAAM,WAAW,GAAG,gBAAgB,CAAC,IAAI,CAAC,YAAY,EAAE,OAAO,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;QAEvF,OAAO,OAAO,CAAC,OAAO,CAAC;YACrB,KAAK,EAAE,WAAW;SACnB,CAAC,CAAC;IACL,CAAC;CACF;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAY,EAAE,YAA0B;IAC3E,OAAO,IAAI,mBAAmB,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;AACrD,CAAC;AAED;;;GAGG;AACH,OAAO,EAAE,cAAc,EAAqB,MAAM,2BAA2B,CAAC"} \ No newline at end of file diff --git a/dist/generators/content-deduplicator.d.ts b/dist/generators/content-deduplicator.d.ts deleted file mode 100644 index 54fbcd26..00000000 --- a/dist/generators/content-deduplicator.d.ts +++ /dev/null @@ -1,114 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern ContentDeduplicator - * @libar-docs-status completed - * @libar-docs-arch-role infrastructure - * @libar-docs-arch-context generator - * @libar-docs-arch-layer infrastructure - * - * ## Content Deduplicator - Duplicate Content Detection and Merging - * - * Identifies and merges duplicate sections extracted from multiple sources. - * Uses content fingerprinting to detect duplicates and merges them based on - * configurable priority rules. - * - * ### When to Use - * - * - After source mapping extracts content from multiple files - * - When multiple sources may contain the same documentation - * - Before assembling the final RenderableDocument - * - * ### Key Concepts - * - * - **Content Fingerprint**: SHA-256 hash of normalized text for duplicate detection - * - **Source Priority**: TypeScript > Decision > Feature file - * - **Content Richness**: More lines wins when priorities are equal - * - **Header Disambiguation**: Adds source suffix when headers conflict - */ -import type { ExtractedSection } from './source-mapper.js'; -import type { Warning, WarningCollector } from './warning-collector.js'; -/** - * A content block with metadata for deduplication - */ -export interface ContentBlock { - /** Section header text */ - header: string; - /** Section body content */ - body: string; - /** Source file path */ - source: string; - /** Content fingerprint for duplicate detection */ - fingerprint?: string; - /** Number of lines in the body */ - lineCount: number; - /** Original index in the input array (for precise removal) */ - originalIndex?: number; -} -/** - * A pair of content blocks that were merged - */ -export interface MergedPair { - /** The content block that was kept */ - kept: ContentBlock; - /** The content block that was removed */ - removed: ContentBlock; -} -/** - * Result of deduplication processing. - * - * Warnings are captured via two parallel paths: - * 1. Through the optional `warningCollector` passed in options (side-effect, preferred) - * 2. In the returned `warnings` array (for callers without a collector) - * - * When a `warningCollector` is provided, warnings flow to both paths. Callers should - * use ONE path for consuming warnings - either the collector OR the returned array. - * The decision-doc-generator uses the collector when available, falling back to the - * returned array when warning collection is disabled. - */ -export interface DeduplicationResult { - /** Deduplicated sections in original order */ - sections: ExtractedSection[]; - /** Pairs of content that were merged */ - mergedPairs: MergedPair[]; - /** Warnings produced during deduplication (always populated regardless of collector) */ - warnings: Warning[]; -} -/** - * Options for deduplication - */ -export interface DeduplicatorOptions { - /** Optional warning collector for capturing warnings */ - warningCollector?: WarningCollector; -} -/** - * Compute a content fingerprint using SHA-256. - * Returns a 16-character hex string (64 bits). - * - * Note: 16 hex chars (64 bits) provides sufficient collision resistance for - * documentation deduplication. Birthday paradox collision probability is - * less than 0.001% for up to 10,000 sections, which exceeds expected usage. - */ -export declare function computeFingerprint(content: string): string; -/** - * Find duplicate content blocks by fingerprint. - * Returns a map from fingerprint to all blocks with that fingerprint. - */ -export declare function findDuplicates(blocks: ContentBlock[]): Map; -/** - * Deduplicate sections extracted from multiple sources. - * - * Algorithm: - * 1. Convert sections to content blocks with fingerprints - * 2. Find duplicate fingerprints - * 3. For each duplicate group, keep highest priority source (or richest content) - * 4. Handle header conflicts (same header, different content) - * 5. Remove empty sections - * 6. Preserve original order (first occurrence position) - * - * @param sections - Extracted sections to deduplicate - * @param options - Deduplication options - * @returns Deduplicated sections with merge info and warnings - */ -export declare function deduplicateSections(sections: readonly ExtractedSection[], options?: DeduplicatorOptions): DeduplicationResult; -//# sourceMappingURL=content-deduplicator.d.ts.map \ No newline at end of file diff --git a/dist/generators/content-deduplicator.d.ts.map b/dist/generators/content-deduplicator.d.ts.map deleted file mode 100644 index 856d1bfa..00000000 --- a/dist/generators/content-deduplicator.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"content-deduplicator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;;;GAcG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,SAAS,gBAAgB,EAAE,EACrC,OAAO,CAAC,EAAE,mBAAmB,GAC5B,mBAAmB,CA4IrB"} \ No newline at end of file diff --git a/dist/generators/content-deduplicator.js b/dist/generators/content-deduplicator.js deleted file mode 100644 index c9697638..00000000 --- a/dist/generators/content-deduplicator.js +++ /dev/null @@ -1,356 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern ContentDeduplicator - * @libar-docs-status completed - * @libar-docs-arch-role infrastructure - * @libar-docs-arch-context generator - * @libar-docs-arch-layer infrastructure - * - * ## Content Deduplicator - Duplicate Content Detection and Merging - * - * Identifies and merges duplicate sections extracted from multiple sources. - * Uses content fingerprinting to detect duplicates and merges them based on - * configurable priority rules. - * - * ### When to Use - * - * - After source mapping extracts content from multiple files - * - When multiple sources may contain the same documentation - * - Before assembling the final RenderableDocument - * - * ### Key Concepts - * - * - **Content Fingerprint**: SHA-256 hash of normalized text for duplicate detection - * - **Source Priority**: TypeScript > Decision > Feature file - * - **Content Richness**: More lines wins when priorities are equal - * - **Header Disambiguation**: Adds source suffix when headers conflict - */ -import * as crypto from 'node:crypto'; -// ============================================================================= -// Constants -// ============================================================================= -/** - * Source priority values (higher = more authoritative) - */ -const SOURCE_PRIORITY = { - typescript: 3, // .ts files - decision: 2, // THIS DECISION markers - feature: 1, // .feature files -}; -/** - * Length of fingerprint hex string to display. - * - * 16 hex characters = 64 bits provides sufficient collision resistance for - * documentation deduplication. Birthday paradox collision probability is - * less than 0.001% for up to 10,000 sections. - */ -const FINGERPRINT_DISPLAY_LENGTH = 16; -// ============================================================================= -// Helper Functions -// ============================================================================= -/** - * Normalize content for fingerprinting. - * Strips whitespace variations to detect semantically identical content. - */ -function normalizeForFingerprint(content) { - return content - .split('\n') - .map((line) => line.trim()) - .filter((line) => line.length > 0) - .join(' ') - .replace(/\s+/g, ' ') - .toLowerCase(); -} -/** - * Compute a content fingerprint using SHA-256. - * Returns a 16-character hex string (64 bits). - * - * Note: 16 hex chars (64 bits) provides sufficient collision resistance for - * documentation deduplication. Birthday paradox collision probability is - * less than 0.001% for up to 10,000 sections, which exceeds expected usage. - */ -export function computeFingerprint(content) { - const normalized = normalizeForFingerprint(content); - return crypto - .createHash('sha256') - .update(normalized) - .digest('hex') - .slice(0, FINGERPRINT_DISPLAY_LENGTH); -} -/** - * Determine source type from file path. - * Returns isUnknown=true for unrecognized file extensions. - */ -function getSourceType(sourceFile) { - if (sourceFile.endsWith('.ts')) { - return { type: 'typescript', isUnknown: false }; - } - if (sourceFile.toUpperCase().includes('THIS DECISION')) { - return { type: 'decision', isUnknown: false }; - } - if (sourceFile.endsWith('.feature')) { - return { type: 'feature', isUnknown: false }; - } - // Default to feature (lowest priority) for unknown types - return { type: 'feature', isUnknown: true }; -} -/** - * Get priority value for a source file - */ -function getSourcePriority(sourceFile) { - const { type } = getSourceType(sourceFile); - return SOURCE_PRIORITY[type] ?? 1; -} -/** - * Count non-empty lines in content - */ -function countLines(content) { - return content.split('\n').filter((line) => line.trim().length > 0).length; -} -/** - * Convert ExtractedSection to ContentBlock with original index tracking - * - * @param section - The extracted section to convert - * @param index - Original index in the sections array (for precise removal) - */ -function sectionToBlock(section, index) { - return { - header: section.section, - body: section.content, - source: section.sourceFile, - fingerprint: computeFingerprint(section.content), - lineCount: countLines(section.content), - originalIndex: index, - }; -} -/** - * Find duplicate content blocks by fingerprint. - * Returns a map from fingerprint to all blocks with that fingerprint. - */ -export function findDuplicates(blocks) { - const groups = new Map(); - for (const block of blocks) { - if (!block.fingerprint) { - continue; - } - const existing = groups.get(block.fingerprint); - if (existing) { - existing.push(block); - } - else { - groups.set(block.fingerprint, [block]); - } - } - // Filter to only groups with duplicates - const duplicates = new Map(); - for (const [fingerprint, group] of groups) { - if (group.length > 1) { - duplicates.set(fingerprint, group); - } - } - return duplicates; -} -/** - * Choose which block to keep from a set of duplicates. - * Higher priority source wins; if equal, richer content (more lines) wins. - * - * Uses non-empty tuple type to guarantee at compile time that at least - * one block exists. Callers must ensure the array is non-empty before calling. - * - * @param blocks - Non-empty array of content blocks (at least one element) - * @returns The winning block - */ -function chooseWinner(blocks) { - const [first, ...rest] = blocks; - let winner = first; - for (const block of rest) { - const winnerPriority = getSourcePriority(winner.source); - const blockPriority = getSourcePriority(block.source); - if (blockPriority > winnerPriority) { - winner = block; - } - else if (blockPriority === winnerPriority && block.lineCount > winner.lineCount) { - winner = block; - } - } - return winner; -} -/** - * Find sections with same header but different content (header conflicts) - */ -function findHeaderConflicts(sections) { - const byHeader = new Map(); - for (const section of sections) { - const existing = byHeader.get(section.section); - if (existing) { - existing.push(section); - } - else { - byHeader.set(section.section, [section]); - } - } - // Filter to only headers with multiple sections AND different fingerprints - const conflicts = new Map(); - for (const [header, group] of byHeader) { - if (group.length > 1) { - const fingerprints = new Set(group.map((s) => computeFingerprint(s.content))); - if (fingerprints.size > 1) { - conflicts.set(header, group); - } - } - } - return conflicts; -} -/** - * Disambiguate headers by adding source suffix - */ -function disambiguateHeader(section) { - // Extract a short source name from the file path - const sourceName = section.sourceFile - .replace(/^.*\//, '') // Remove path - .replace(/\.[^.]+$/, '') // Remove extension - .replace(/[_]/g, '-') // Normalize underscores to hyphens - .toLowerCase(); - return `${section.section} (from ${sourceName})`; -} -// ============================================================================= -// Main Function -// ============================================================================= -/** - * Deduplicate sections extracted from multiple sources. - * - * Algorithm: - * 1. Convert sections to content blocks with fingerprints - * 2. Find duplicate fingerprints - * 3. For each duplicate group, keep highest priority source (or richest content) - * 4. Handle header conflicts (same header, different content) - * 5. Remove empty sections - * 6. Preserve original order (first occurrence position) - * - * @param sections - Extracted sections to deduplicate - * @param options - Deduplication options - * @returns Deduplicated sections with merge info and warnings - */ -export function deduplicateSections(sections, options) { - const warnings = []; - const mergedPairs = []; - if (sections.length === 0) { - return { sections: [], mergedPairs: [], warnings: [] }; - } - // Check for unknown source types and warn (prevents silent data deprioritization) - const seenUnknownExtensions = new Set(); - for (const section of sections) { - const { isUnknown } = getSourceType(section.sourceFile); - if (isUnknown) { - const ext = section.sourceFile.slice(section.sourceFile.lastIndexOf('.')); - // Only warn once per extension type to avoid flooding - if (!seenUnknownExtensions.has(ext)) { - seenUnknownExtensions.add(ext); - const warning = { - source: section.sourceFile, - category: 'deduplication', - message: `Unknown file type "${ext}" treated as feature (lowest priority)`, - }; - warnings.push(warning); - if (options?.warningCollector) { - options.warningCollector.capture(warning); - } - } - } - } - // Convert to content blocks with original indices for precise removal - const blocks = sections.map((section, index) => sectionToBlock(section, index)); - // Find duplicates by fingerprint - const duplicates = findDuplicates(blocks); - // Track which sections to remove (by original index) - const removeIndices = new Set(); - // Process each duplicate group - for (const [_fingerprint, duplicateBlocks] of duplicates) { - // Defensive guard: findDuplicates() should only return groups with 2+ blocks - // (see filter at line 216), but we guard against invariant violations. - if (duplicateBlocks.length === 0) { - continue; - } - const winner = chooseWinner(duplicateBlocks); - // Mark losers for removal using their original indices - for (const block of duplicateBlocks) { - if (block !== winner) { - // Use the tracked original index for precise removal - // This avoids mismatch when same file has duplicate headers - const idx = block.originalIndex; - if (idx !== undefined) { - removeIndices.add(idx); - mergedPairs.push({ - kept: winner, - removed: block, - }); - // Capture warning if collector provided - if (options?.warningCollector) { - options.warningCollector.capture({ - source: block.source, - category: 'deduplication', - message: `Duplicate content merged; kept version from ${winner.source}`, - }); - } - warnings.push({ - source: block.source, - category: 'deduplication', - message: `Duplicate content merged; kept version from ${winner.source}`, - }); - } - } - } - } - // Build filtered section list (preserving order) - // Explicitly type to ensure ExtractedSection compatibility - let filteredSections = sections - .filter((_, idx) => !removeIndices.has(idx)) - .map((s) => ({ - section: s.section, - sourceFile: s.sourceFile, - extractionMethod: s.extractionMethod, - content: s.content, - ...(s.shapes !== undefined && { shapes: s.shapes }), - ...(s.docStrings !== undefined && { docStrings: s.docStrings }), - })); - // Handle header conflicts (same header, different content from different sources) - const headerConflicts = findHeaderConflicts(filteredSections); - for (const [header, conflictingSections] of headerConflicts) { - // Disambiguate headers - for (const section of conflictingSections) { - const idx = filteredSections.findIndex((s) => s.section === header && s.sourceFile === section.sourceFile); - const existing = idx !== -1 ? filteredSections[idx] : undefined; - if (idx !== -1 && existing) { - filteredSections[idx] = { - section: disambiguateHeader(section), - sourceFile: existing.sourceFile, - extractionMethod: existing.extractionMethod, - content: existing.content, - ...(existing.shapes !== undefined && { shapes: existing.shapes }), - ...(existing.docStrings !== undefined && { docStrings: existing.docStrings }), - }; - } - } - } - // Remove empty sections - const emptySections = filteredSections.filter((s) => !s.content || s.content.trim().length === 0); - for (const emptySection of emptySections) { - const warning = { - source: emptySection.sourceFile, - category: 'deduplication', - message: `Empty section "${emptySection.section}" removed`, - }; - warnings.push(warning); - if (options?.warningCollector) { - options.warningCollector.capture(warning); - } - } - filteredSections = filteredSections.filter((s) => s.content.trim().length > 0); - return { - sections: filteredSections, - mergedPairs, - warnings, - }; -} -//# sourceMappingURL=content-deduplicator.js.map \ No newline at end of file diff --git a/dist/generators/content-deduplicator.js.map b/dist/generators/content-deduplicator.js.map deleted file mode 100644 index 04e5ae73..00000000 --- a/dist/generators/content-deduplicator.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"content-deduplicator.js","sourceRoot":"","sources":["../../src/generators/content-deduplicator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAyEtC,gFAAgF;AAChF,YAAY;AACZ,gFAAgF;AAEhF;;GAEG;AACH,MAAM,eAAe,GAA2B;IAC9C,UAAU,EAAE,CAAC,EAAE,YAAY;IAC3B,QAAQ,EAAE,CAAC,EAAE,wBAAwB;IACrC,OAAO,EAAE,CAAC,EAAE,iBAAiB;CAC9B,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,0BAA0B,GAAG,EAAE,CAAC;AAEtC,gFAAgF;AAChF,mBAAmB;AACnB,gFAAgF;AAEhF;;;GAGG;AACH,SAAS,uBA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Q,CAAC,gBAAgB;oBAC3C,OAAO,EAAE,QAAQ,CAAC,OAAO;oBACzB,GAAG,CAAC,QAAQ,CAAC,MAAM,KAAK,SAAS,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC;oBACjE,GAAG,CAAC,QAAQ,CAAC,UAAU,KAAK,SAAS,IAAI,EAAE,UAAU,EAAE,QAAQ,CAAC,UAAU,EAAE,CAAC;iBAC9E,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;IAED,wBAAwB;IACxB,MAAM,aAAa,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC;IAClG,KAAK,MAAM,YAAY,IAAI,aAAa,EAAE,CAAC;QACzC,MAAM,OAAO,GAAY;YACvB,MAAM,EAAE,YAAY,CAAC,UAAU;YAC/B,QAAQ,EAAE,eAAe;YACzB,OAAO,EAAE,kBAAkB,YAAY,CAAC,OAAO,WAAW;SAC3D,CAAC;QACF,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAEvB,IAAI,OAAO,EAAE,gBAAgB,EAAE,CAAC;YAC9B,OAAO,CAAC,gBAAgB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAC5C,CAAC;IACH,CAAC;IAED,gBAAgB,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAE/E,OAAO;QACL,QAAQ,EAAE,gBAAgB;QAC1B,WAAW;QACX,QAAQ;KACT,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/dist/generators/index.d.ts b/dist/generators/index.d.ts deleted file mode 100644 index 1ae8766a..00000000 --- a/dist/generators/index.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Generators Module - * - * @libar-docs - * @libar-docs-core @libar-docs-infra - * @libar-docs-pattern Generators Module - * - * RDM (RenderableDocument Model) based document generation system. - * Uses Zod 4 codecs to transform MasterDataset into RenderableDocuments. - * - * ### When to Use - * - * - When importing generator types, registry, or orchestrator functions - * - When building custom generators or extending the generation pipeline - * - When programmatically generating documentation from code - * - * ## Usage - * - * ```typescript - * import { generatorRegistry } from '@libar-dev/delivery-process/generators'; - * import '@libar-dev/delivery-process/generators/built-in'; // Register built-in generators - * - * const generator = generatorRegistry.get('patterns'); - * const output = await generator.generate(patterns, context); - * ``` - * - * ### Key Concepts - * - * - **DocumentGenerator Protocol:** Minimal interface for pluggable generators - * - **Codec-Based Generators:** Use Zod 4 codecs for type-safe transformations - * - **Registry Pattern:** Explicit registration for transparency - */ -export type { DocumentGenerator, GeneratorContext, GeneratorOutput, OutputFile } from './types.js'; -export { GeneratorRegistry, generatorRegistry } from './registry.js'; -export { CodecBasedGenerator, createCodecGenerator, DOCUMENT_TYPES, type DocumentType, } from './codec-based.js'; -export { generateDocumentation, type GenerateOptions, type GenerateResult, type GeneratedFile, type GenerationError, type GenerationWarning, } from './orchestrator.js'; -export { mergePatterns, transformToMasterDataset, type RawDataset, type RuntimeMasterDataset, } from './pipeline/index.js'; -export { createProductAreaConfigs, PRODUCT_AREA_VALUES, type ProductAreaConfigOptions, } from './built-in/reference-generators.js'; -/** - * NOTE: Built-in generators are NOT auto-registered. - * Import './built-in/index.js' explicitly to register them: - * - * ```typescript - * import '@libar-dev/delivery-process/generators/built-in'; - * ``` - * - * This explicit registration makes side effects visible and prevents - * accidental registration in contexts where it's not needed. - */ -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/dist/generators/index.d.ts.map b/dist/generators/index.d.ts.map deleted file mode 100644 index e3531a9b..00000000 --- a/dist/generators/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/generators/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAGH,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAGnG,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAGrE,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,cAAc,EACd,KAAK,YAAY,GAClB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACL,qBAAqB,EACrB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,iBAAiB,GACvB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACL,aAAa,EACb,wBAAwB,EACxB,KAAK,UAAU,EACf,KAAK,oBAAoB,GAC1B,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACL,wBAAwB,EACxB,mBAAmB,EACnB,KAAK,wBAAwB,GAC9B,MAAM,oCAAoC,CAAC;AAE5C;;;;;;;;;;GAUG"} \ No newline at end of file diff --git a/dist/generators/index.js b/dist/generators/index.js deleted file mode 100644 index 6b0cb9d6..00000000 --- a/dist/generators/index.js +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Generators Module - * - * @libar-docs - * @libar-docs-core @libar-docs-infra - * @libar-docs-pattern Generators Module - * - * RDM (RenderableDocument Model) based document generation system. - * Uses Zod 4 codecs to transform MasterDataset into RenderableDocuments. - * - * ### When to Use - * - * - When importing generator types, registry, or orchestrator functions - * - When building custom generators or extending the generation pipeline - * - When programmatically generating documentation from code - * - * ## Usage - * - * ```typescript - * import { generatorRegistry } from '@libar-dev/delivery-process/generators'; - * import '@libar-dev/delivery-process/generators/built-in'; // Register built-in generators - * - * const generator = generatorRegistry.get('patterns'); - * const output = await generator.generate(patterns, context); - * ``` - * - * ### Key Concepts - * - * - **DocumentGenerator Protocol:** Minimal interface for pluggable generators - * - **Codec-Based Generators:** Use Zod 4 codecs for type-safe transformations - * - **Registry Pattern:** Explicit registration for transparency - */ -// Generator registry (singleton + class for custom instances) -export { GeneratorRegistry, generatorRegistry } from './registry.js'; -// Codec-based generators (RDM architecture) -export { CodecBasedGenerator, createCodecGenerator, DOCUMENT_TYPES, } from './codec-based.js'; -// Orchestrator - programmatic API for documentation generation -export { generateDocumentation, } from './orchestrator.js'; -// Pipeline - MasterDataset transformation for ProcessStateAPI usage -export { mergePatterns, transformToMasterDataset, } from './pipeline/index.js'; -// Product area and reference document config helpers (for downstream repo configs) -export { createProductAreaConfigs, PRODUCT_AREA_VALUES, } from './built-in/reference-generators.js'; -/** - * NOTE: Built-in generators are NOT auto-registered. - * Import './built-in/index.js' explicitly to register them: - * - * ```typescript - * import '@libar-dev/delivery-process/generators/built-in'; - * ``` - * - * This explicit registration makes side effects visible and prevents - * accidental registration in contexts where it's not needed. - */ -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/generators/index.js.map b/dist/generators/index.js.map deleted file mode 100644 index c1c0c9ad..00000000 --- a/dist/generators/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/generators/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAKH,8DAA8D;AAC9D,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAErE,4CAA4C;AAC5C,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,cAAc,GAEf,MAAM,kBAAkB,CAAC;AAE1B,+DAA+D;AAC/D,OAAO,EACL,qBAAqB,GAMtB,MAAM,mBAAmB,CAAC;AAE3B,oEAAoE;AACpE,OAAO,EACL,aAAa,EACb,wBAAwB,GAGzB,MAAM,qBAAqB,CAAC;AAE7B,mFAAmF;AACnF,OAAO,EACL,wBAAwB,EACxB,mBAAmB,GAEpB,MAAM,oCAAoC,CAAC;AAE5C;;;;;;;;;;GAUG"} \ No newline at end of file diff --git a/dist/generators/orchestrator.d.ts b/dist/generators/orchestrator.d.ts deleted file mode 100644 index 796d40b3..00000000 --- a/dist/generators/orchestrator.d.ts +++ /dev/null @@ -1,255 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core @libar-docs-infra - * @libar-docs-pattern Documentation Generation Orchestrator - * @libar-docs-status completed - * @libar-docs-arch-role service - * @libar-docs-arch-context generator - * @libar-docs-arch-layer application - * @libar-docs-uses Pattern Scanner, Doc Extractor, Gherkin Scanner, Gherkin Extractor, Generator Registry, JSON Output Codec - * @libar-docs-used-by CLI, Programmatic API - * @libar-docs-usecase "When running full documentation generation pipeline" - * @libar-docs-usecase "When merging TypeScript and Gherkin patterns" - * - * ## Documentation Generation Orchestrator - Full Pipeline Coordination - * - * Orchestrates the complete documentation generation pipeline: - * Scanner → Extractor → Generators → File Writer - * - * Extracts business logic from CLI for programmatic use and testing. - * - * ### When to Use - * - * - Running complete documentation generation programmatically - * - Integrating doc generation into build scripts - * - Testing the full pipeline without CLI overhead - * - * ### Key Concepts - * - * - **Dual-Source Merging**: Combines TypeScript and Gherkin patterns - * - **Generator Registry**: Looks up registered generators by name - * - **Result Monad**: Returns detailed errors for partial failures - */ -import type { TagRegistry, ExtractedPattern } from '../validation-schemas/index.js'; -import type { ResolvedConfig } from '../config/project-config.js'; -import type { Result } from '../types/index.js'; -import type { CodecOptions } from '../renderable/generate.js'; -/** - * Options for documentation generation - */ -export interface GenerateOptions { - /** Glob patterns for TypeScript source files */ - input: string[]; - /** Glob patterns to exclude */ - exclude?: string[]; - /** Base directory for resolving relative paths */ - baseDir: string; - /** Output directory for generated files */ - outputDir: string; - /** Generator names to run (e.g., ['patterns', 'adrs']) */ - generators: string[]; - /** Overwrite existing files (default: false) */ - overwrite?: boolean; - /** Glob patterns for .feature files (supports multiple patterns) */ - features?: string | string[] | null; - /** Path to custom workflow config (loads default if not specified) */ - workflowPath?: string | null; - /** - * Git diff base branch for PR-scoped generators. - * When provided, auto-detects changed files by comparing HEAD to this branch. - * @example "main", "develop" - */ - gitDiffBase?: string; - /** - * Explicit list of changed files. Overrides git detection when provided. - * Useful for programmatic use or when git detection is not desired. - */ - changedFiles?: string[]; - /** - * Release version filter for PR Changes generator. - * @example "v0.2.0" - */ - releaseFilter?: string; - /** - * Custom context inference rules for auto-inferring bounded context from file paths. - * - * When provided, these rules are prepended to the default rules (user rules take precedence). - * Use this to map your project's directory structure to bounded contexts for architecture diagrams. - * - * @example - * contextInferenceRules: [ - * { pattern: 'packages/orders/**', context: 'orders' }, - * { pattern: 'packages/inventory/**', context: 'inventory' }, - * ] - */ - contextInferenceRules?: ReadonlyArray<{ - pattern: string; - context: string; - }>; - /** - * Per-codec options passed through to codec factories. - * Merged with any options the orchestrator computes (e.g., PR changes). - * Computed options take precedence over user-provided options. - */ - codecOptions?: CodecOptions; -} -/** - * Result of documentation generation - */ -export interface GenerateResult { - /** Extracted patterns from source code */ - readonly patterns: readonly ExtractedPattern[]; - /** Generated files (path + content) */ - readonly files: readonly GeneratedFile[]; - /** Tag registry used for generation */ - readonly registry: TagRegistry; - /** Errors encountered during generation */ - readonly errors: readonly GenerationError[]; - /** Warnings (non-fatal issues) */ - readonly warnings: readonly GenerationWarning[]; -} -/** - * Generated file with metadata - */ -export interface GeneratedFile { - /** Relative path from outputDir */ - path: string; - /** Full absolute path */ - fullPath: string; - /** File content */ - content: string; - /** Generator that created this file */ - generator: string; - /** Whether file was written (false if skipped due to overwrite=false) */ - written: boolean; -} -/** - * Generation error - */ -export interface GenerationError { - type: 'scan' | 'extraction' | 'generator' | 'file-write'; - message: string; - generator?: string; - filePath?: string; -} -/** - * Detail for a single error within a warning - */ -export interface WarningDetail { - file: string; - line?: number; - column?: number; - message: string; -} -/** - * Generation warning - */ -export interface GenerationWarning { - type: 'scan' | 'extraction' | 'overwrite-skipped' | 'config' | 'cleanup'; - message: string; - count?: number; - filePath?: string; - /** Detailed error information for each affected file */ - details?: WarningDetail[]; -} -/** - * Generate documentation from TypeScript source code - * - * Orchestrates the complete pipeline: - * 1. Load tag registry - * 2. Scan source files for @libar-docs directives - * 3. Extract patterns from directives - * 4. Run specified generators - * 5. Write output files - * - * @param options - Generation options - * @returns Result with patterns, files, and any errors/warnings - * - * @example - * ```typescript - * import { generateDocumentation } from '@libar-dev/delivery-process/generators'; - * import '@libar-dev/delivery-process/generators/built-in'; - * - * const result = await generateDocumentation({ - * input: ['src/**\/*.ts'], - * baseDir: process.cwd(), - * outputDir: 'docs', - * generators: ['patterns'], - * overwrite: true - * }); - * - * console.log(`Generated ${result.files.length} files`); - * console.log(`Extracted ${result.patterns.length} patterns`); - * ``` - */ -export declare function generateDocumentation(options: GenerateOptions): Promise>; -/** - * Result from cleaning up orphaned session files. - */ -export interface CleanupResult { - /** Files that were successfully deleted */ - readonly deleted: readonly string[]; - /** Errors encountered during cleanup (non-fatal) */ - readonly errors: readonly string[]; -} -/** - * Clean up orphaned session files in a directory. - * - * Deletes session files (phase-*.md) that are not in the preserve list. - * This is used to clean up stale session files when phases complete. - * - * @param outputDir - Base output directory - * @param sessionsDir - Subdirectory containing session files (e.g., "sessions/") - * @param preserveFiles - Set of file basenames to preserve (e.g., "phase-39.md") - * @returns Result with deleted files and any errors - * - * @example - * ```typescript - * const result = await cleanupOrphanedSessionFiles( - * "/output", - * "sessions/", - * new Set(["phase-39.md"]) // Keep active phase - * ); - * console.log(`Deleted ${result.deleted.length} orphaned files`); - * ``` - */ -export declare function cleanupOrphanedSessionFiles(outputDir: string, sessionsDir: string, preserveFiles: Set): Promise; -/** - * Options for config-based generation - */ -export interface GenerateFromConfigOptions { - /** Override generator names (ignores config defaults) */ - readonly generators?: readonly string[]; - /** Git diff base branch for PR-scoped generators */ - readonly gitDiffBase?: string; - /** Explicit changed file list for PR-scoped generators */ - readonly changedFiles?: string[]; - /** Release version filter for PR Changes generator */ - readonly releaseFilter?: string; - /** Per-codec options (merged with config-level codecOptions, CLI takes precedence) */ - readonly codecOptions?: CodecOptions; -} -/** - * Generate documentation from a fully resolved config. - * - * Groups generators by their effective source config, then calls - * `generateDocumentation()` once per group. This reuses all existing - * pipeline logic while minimizing redundant file scans. - * - * @param config - Fully resolved configuration (from `loadProjectConfig()`) - * @param options - Optional overrides for generators, git diff, and release filter - * @returns Result with merged patterns, files, errors, and warnings from all groups - * - * @example - * ```typescript - * import { generateFromConfig } from '@libar-dev/delivery-process/generators'; - * import { loadProjectConfig } from '@libar-dev/delivery-process/config'; - * - * const config = await loadProjectConfig(process.cwd()); - * const result = await generateFromConfig(config, { - * generators: ['patterns', 'roadmap'], - * }); - * ``` - */ -export declare function generateFromConfig(config: ResolvedConfig, options?: GenerateFromConfigOptions): Promise>; -//# sourceMappingURL=orchestrator.d.ts.map \ No newline at end of file diff --git a/dist/generators/orchestrator.d.ts.map b/dist/generators/orchestrator.d.ts.map deleted file mode 100644 index 7289b462..00000000 --- a/dist/generators/orchestrator.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["../../src/generators/orchestrator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAKpF,OAAO,KAAK,EACV,cAAc,EAIf,MAAM,6BAA6B,CAAC;AAKrC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAIhD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAwB9D;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,gDAAgD;IAChD,KAAK,EAAE,MAAM,EAAE,CAAC;IAEhB,+BAA+B;IAC/B,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IAEnB,kDAAkD;IAClD,OAAO,EAAE,MAAM,CAAC;IAEhB,2CAA2C;IAC3C,SAAS,EAAE,MAAM,CAAC;IAElB,0DAA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GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,yDAAyD;IACzD,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACxC,oDAAoD;IACpD,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,0DAA0D;IAC1D,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACjC,sDAAsD;IACtD,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,sFAAsF;IACtF,QAAQ,CAAC,YAAY,CAAC,EAAE,YAAY,CAAC;CACtC;AA2ED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,cAAc,EACtB,OAAO,CAAC,EAAE,yBAAyB,GAClC,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC,CAyEzC"} \ No newline at end of file diff --git a/dist/generators/orchestrator.js b/dist/generators/orchestrator.js deleted file mode 100644 index 18744318..00000000 --- a/dist/generators/orchestrator.js +++ /dev/null @@ -1,560 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core @libar-docs-infra - * @libar-docs-pattern Documentation Generation Orchestrator - * @libar-docs-status completed - * @libar-docs-arch-role service - * @libar-docs-arch-context generator - * @libar-docs-arch-layer application - * @libar-docs-uses Pattern Scanner, Doc Extractor, Gherkin Scanner, Gherkin Extractor, Generator Registry, JSON Output Codec - * @libar-docs-used-by CLI, Programmatic API - * @libar-docs-usecase "When running full documentation generation pipeline" - * @libar-docs-usecase "When merging TypeScript and Gherkin patterns" - * - * ## Documentation Generation Orchestrator - Full Pipeline Coordination - * - * Orchestrates the complete documentation generation pipeline: - * Scanner → Extractor → Generators → File Writer - * - * Extracts business logic from CLI for programmatic use and testing. - * - * ### When to Use - * - * - Running complete documentation generation programmatically - * - Integrating doc generation into build scripts - * - Testing the full pipeline without CLI overhead - * - * ### Key Concepts - * - * - **Dual-Source Merging**: Combines TypeScript and Gherkin patterns - * - **Generator Registry**: Looks up registered generators by name - * - **Result Monad**: Returns detailed errors for partial failures - */ -import * as path from 'path'; -import * as fs from 'fs/promises'; -import { createJsonOutputCodec, RegistryMetadataOutputSchema, } from '../validation-schemas/index.js'; -import { mergeSourcesForGenerator } from '../config/merge-sources.js'; -import { DEFAULT_CONTEXT_INFERENCE_RULES } from '../config/defaults.js'; -import { generatorRegistry } from './registry.js'; -import { Result as R } from '../types/index.js'; -import { buildMasterDataset } from './pipeline/index.js'; -import { detectBranchChanges, getAllChangedFiles } from '../lint/process-guard/detect-changes.js'; -import { registerReferenceGenerators } from './built-in/reference-generators.js'; -/** - * Codec for serializing registry metadata to JSON - */ -const RegistryMetadataCodec = createJsonOutputCodec(RegistryMetadataOutputSchema); -/** - * Validate that a file path resolves within a base directory. - * - * Prevents path traversal attacks where a malicious file path like "../../../etc/passwd" - * could escape the intended output directory. - * - * @param filePath - Relative file path to validate - * @param baseDir - Base directory that the path must stay within - * @returns true if resolved path is within baseDir, false otherwise - */ -function isPathWithinDir(filePath, baseDir) { - const resolvedPath = path.resolve(baseDir, filePath); - const normalizedBase = path.resolve(baseDir) + path.sep; - return resolvedPath.startsWith(normalizedBase) || resolvedPath === path.resolve(baseDir); -} -/** - * Generate documentation from TypeScript source code - * - * Orchestrates the complete pipeline: - * 1. Load tag registry - * 2. Scan source files for @libar-docs directives - * 3. Extract patterns from directives - * 4. Run specified generators - * 5. Write output files - * - * @param options - Generation options - * @returns Result with patterns, files, and any errors/warnings - * - * @example - * ```typescript - * import { generateDocumentation } from '@libar-dev/delivery-process/generators'; - * import '@libar-dev/delivery-process/generators/built-in'; - * - * const result = await generateDocumentation({ - * input: ['src/**\/*.ts'], - * baseDir: process.cwd(), - * outputDir: 'docs', - * generators: ['patterns'], - * overwrite: true - * }); - * - * console.log(`Generated ${result.files.length} files`); - * console.log(`Extracted ${result.patterns.length} patterns`); - * ``` - */ -export async function generateDocumentation(options) { - const errors = []; - const warnings = []; - const generatedFiles = []; - // Resolve base directory - const baseDir = path.resolve(options.baseDir); - // DD-6: Normalize features (string | string[] | null → string[]) - const features = options.features === null || options.features === undefined - ? [] - : typeof options.features === 'string' - ? [options.features] - : options.features; - // Merge context inference rules: user rules take precedence (prepended to defaults) - const mergedContextRules = options.contextInferenceRules - ? [...options.contextInferenceRules, ...DEFAULT_CONTEXT_INFERENCE_RULES] - : undefined; // let factory use defaults - // DD-6: Delegate 8-step pipeline to shared factory - const pipelineResult = await buildMasterDataset({ - input: options.input, - features, - baseDir, - mergeConflictStrategy: 'fatal', - ...(options.exclude !== undefined ? { exclude: options.exclude } : {}), - ...(options.workflowPath !== null && options.workflowPath !== undefined - ? { workflowPath: options.workflowPath } - : {}), - ...(mergedContextRules !== undefined ? { contextInferenceRules: mergedContextRules } : {}), - includeValidation: false, // DD-3: orchestrator doesn't need validation - failOnScanErrors: false, // DD-5: orchestrator collects errors as warnings - }); - if (!pipelineResult.ok) { - return R.err(`Pipeline error [${pipelineResult.error.step}]: ${pipelineResult.error.message}`); - } - // DD-6: Extract values from pipeline result - const { dataset: masterDataset } = pipelineResult.value; - const allPatterns = masterDataset.patterns; - const registry = masterDataset.tagRegistry; - const workflow = masterDataset.workflow; - // DD-1: Map PipelineWarning[] → GenerationWarning[] - for (const pw of pipelineResult.value.warnings) { - warnings.push({ - type: pw.type === 'gherkin-parse' ? 'scan' : pw.type, - message: pw.message, - ...(pw.count !== undefined ? { count: pw.count } : {}), - ...(pw.details !== undefined ? { details: [...pw.details] } : {}), - }); - } - // Step 9: Build codec options - // Start with user-provided options, then overlay computed options - let codecOptions = options.codecOptions; - // Compute PR Changes options if that generator is requested - if (options.generators.some((g) => g.trim() === 'pr-changes')) { - // Use explicit changedFiles if provided, otherwise detect from git - let changedFiles = options.changedFiles; - if (!changedFiles && options.gitDiffBase) { - const detectionResult = detectBranchChanges(baseDir, options.gitDiffBase); - if (detectionResult.ok) { - // Filter for relevant file types (source, tests, specs, features) - changedFiles = getAllChangedFiles(detectionResult.value).filter((f) => f.endsWith('.ts') || - f.endsWith('.tsx') || - f.endsWith('.feature') || - f.endsWith('.feature.md')); - } - else { - warnings.push({ - type: 'config', - message: `Git diff detection failed: ${detectionResult.error.message}. PR Changes will show all patterns.`, - }); - } - } - codecOptions = { - ...codecOptions, - 'pr-changes': { - changedFiles: changedFiles ?? [], - releaseFilter: options.releaseFilter ?? '', - includeDeliverables: true, - includeReviewChecklist: true, - includeDependencies: true, - includeBusinessValue: true, - sortBy: 'phase', - }, - }; - } - // Step 10: Run generators - for (const generatorName of options.generators) { - const trimmedName = generatorName.trim(); - // Get generator from registry - const generator = generatorRegistry.get(trimmedName); - if (!generator) { - errors.push({ - type: 'generator', - message: `Unknown generator: "${trimmedName}". Available: ${generatorRegistry.available().join(', ')}`, - generator: trimmedName, - }); - continue; // Skip this generator, try others - } - // Build generator context with pre-computed masterDataset and codec options - const context = { - baseDir, - outputDir: options.outputDir, - registry, - masterDataset, - ...(workflow !== undefined ? { workflow } : {}), - ...(codecOptions !== undefined ? { codecOptions } : {}), - }; - // Generate files with merged patterns (TypeScript + Gherkin) - let output; - try { - output = await generator.generate(allPatterns, context); - } - catch (error) { - errors.push({ - type: 'generator', - message: `Generator "${trimmedName}" failed: ${error instanceof Error ? error.message : String(error)}`, - generator: trimmedName, - }); - continue; // Skip this generator - } - // Write files - for (const file of output.files) { - const fullPath = path.join(options.outputDir, file.path); - // Security: Validate path stays within output directory (prevent path traversal) - if (!isPathWithinDir(file.path, options.outputDir)) { - errors.push({ - type: 'file-write', - message: `Path traversal attempt blocked: ${file.path}`, - filePath: file.path, - generator: trimmedName, - }); - continue; - } - const dir = path.dirname(fullPath); - // Check if file exists and overwrite is disabled - let fileExists = false; - try { - await fs.access(fullPath); - fileExists = true; - } - catch { - // File doesn't exist - } - if (fileExists && options.overwrite !== true) { - // Skip writing, but record in result - generatedFiles.push({ - path: file.path, - fullPath, - content: file.content, - generator: trimmedName, - written: false, - }); - warnings.push({ - type: 'overwrite-skipped', - message: `Skipped ${file.path} (exists, use overwrite: true to replace)`, - filePath: file.path, - }); - continue; - } - // Write file - try { - await fs.mkdir(dir, { recursive: true }); - await fs.writeFile(fullPath, file.content, 'utf-8'); - generatedFiles.push({ - path: file.path, - fullPath, - content: file.content, - generator: trimmedName, - written: true, - }); - } - catch (error) { - errors.push({ - type: 'file-write', - message: `Failed to write ${file.path}: ${error instanceof Error ? error.message : String(error)}`, - filePath: file.path, - generator: trimmedName, - }); - } - } - // Write metadata (registry.json) if provided - if (output.metadata) { - const metadataPath = path.join(options.outputDir, 'registry.json'); - // Serialize using codec for type-safe validation - const serializeResult = RegistryMetadataCodec.serialize(output.metadata, 'registry.json'); - if (!serializeResult.ok) { - errors.push({ - type: 'file-write', - message: `Failed to serialize registry.json: ${serializeResult.error.message}`, - filePath: 'registry.json', - generator: trimmedName, - }); - } - else { - try { - await fs.writeFile(metadataPath, serializeResult.value, 'utf-8'); - generatedFiles.push({ - path: 'registry.json', - fullPath: metadataPath, - content: serializeResult.value, - generator: trimmedName, - written: true, - }); - } - catch (error) { - errors.push({ - type: 'file-write', - message: `Failed to write registry.json: ${error instanceof Error ? error.message : String(error)}`, - filePath: 'registry.json', - generator: trimmedName, - }); - } - } - } - // Handle file cleanup (for session file lifecycle management) - if (output.filesToDelete && output.filesToDelete.length > 0) { - for (const fileToDelete of output.filesToDelete) { - // Security: Validate path stays within output directory (prevent path traversal) - if (!isPathWithinDir(fileToDelete, options.outputDir)) { - warnings.push({ - type: 'cleanup', - message: `Path traversal blocked in cleanup: ${fileToDelete}`, - filePath: fileToDelete, - }); - continue; - } - const fullPath = path.join(options.outputDir, fileToDelete); - try { - await fs.unlink(fullPath); - // Track deletion as a warning for visibility - warnings.push({ - type: 'cleanup', - message: `Cleaned up orphaned file: ${fileToDelete}`, - filePath: fileToDelete, - }); - } - catch (unlinkError) { - // ENOENT is not an error - file was already deleted - if (unlinkError.code !== 'ENOENT') { - warnings.push({ - type: 'cleanup', - message: `Failed to clean up ${fileToDelete}: ${unlinkError instanceof Error ? unlinkError.message : String(unlinkError)}`, - filePath: fileToDelete, - }); - } - } - } - } - } - // Clean up orphaned session files after generation - // Identify session files that were written (to preserve them) - const sessionFileRegex = /^sessions\/phase-\d+[a-z]?\.md$/; - const writtenSessionFiles = new Set(generatedFiles - .filter((f) => f.written && sessionFileRegex.test(f.path)) - .map((f) => path.basename(f.path))); - // If any session files were written, clean up orphaned ones - if (writtenSessionFiles.size > 0 || options.generators.some((g) => g.includes('session'))) { - const cleanupResult = await cleanupOrphanedSessionFiles(options.outputDir, 'sessions/', writtenSessionFiles); - // Add cleanup results to warnings for visibility - for (const deletedFile of cleanupResult.deleted) { - warnings.push({ - type: 'scan', - message: `Cleaned up orphaned session file: ${deletedFile}`, - filePath: deletedFile, - }); - } - for (const cleanupError of cleanupResult.errors) { - warnings.push({ - type: 'scan', - message: `Session cleanup warning: ${cleanupError}`, - }); - } - } - // Return result with merged patterns - return R.ok({ - patterns: allPatterns, - files: generatedFiles, - registry, - errors, - warnings, - }); -} -/** - * Clean up orphaned session files in a directory. - * - * Deletes session files (phase-*.md) that are not in the preserve list. - * This is used to clean up stale session files when phases complete. - * - * @param outputDir - Base output directory - * @param sessionsDir - Subdirectory containing session files (e.g., "sessions/") - * @param preserveFiles - Set of file basenames to preserve (e.g., "phase-39.md") - * @returns Result with deleted files and any errors - * - * @example - * ```typescript - * const result = await cleanupOrphanedSessionFiles( - * "/output", - * "sessions/", - * new Set(["phase-39.md"]) // Keep active phase - * ); - * console.log(`Deleted ${result.deleted.length} orphaned files`); - * ``` - */ -export async function cleanupOrphanedSessionFiles(outputDir, sessionsDir, preserveFiles) { - const dirPath = path.join(outputDir, sessionsDir); - const deleted = []; - const errors = []; - try { - const existingFiles = await fs.readdir(dirPath); - for (const file of existingFiles) { - // Only process session files matching phase-*.md pattern - if (!/^phase-\d+[a-z]?\.md$/.test(file)) { - continue; - } - // Skip files in preserve list - if (preserveFiles.has(file)) { - continue; - } - // Delete orphaned file - const fullPath = path.join(dirPath, file); - try { - await fs.unlink(fullPath); - deleted.push(path.join(sessionsDir, file)); - } - catch (unlinkError) { - errors.push(`Failed to delete ${file}: ${unlinkError instanceof Error ? unlinkError.message : String(unlinkError)}`); - } - } - } - catch (readdirError) { - // Directory doesn't exist - nothing to clean (not an error) - if (readdirError.code !== 'ENOENT') { - errors.push(`Failed to read ${sessionsDir}: ${readdirError instanceof Error ? readdirError.message : String(readdirError)}`); - } - } - return { deleted, errors }; -} -/** - * Groups generators by their effective source config and output directory. - * - * Generators that share the same resolved sources (after applying per-generator - * overrides) AND the same output directory are batched together to minimize - * redundant pipeline scans. - * - * @param generatorNames - Names of generators to group - * @param baseSources - Base resolved sources from project config - * @param baseOutput - Base resolved output config - * @param overrides - Per-generator source and output overrides - * @returns Array of generator groups, each runnable as a single pipeline call - */ -function groupGenerators(generatorNames, baseSources, baseOutput, overrides) { - const groupMap = new Map(); - for (const name of generatorNames) { - const effective = mergeSourcesForGenerator(baseSources, name, overrides); - const outputDir = overrides[name]?.outputDirectory ?? baseOutput.directory; - const key = JSON.stringify({ sources: effective, outputDir }); - const existing = groupMap.get(key); - if (existing !== undefined) { - existing.generators.push(name); - } - else { - groupMap.set(key, { generators: [name], sources: effective, outputDirectory: outputDir }); - } - } - return [...groupMap.values()]; -} -/** - * Merges results from multiple pipeline runs into a single GenerateResult. - * - * Patterns and files are concatenated from all runs. The registry from - * the first run is used (all runs share the same config, so registries - * are identical). Errors and warnings are aggregated. - * - * @param results - Array of GenerateResult from individual pipeline runs - * @returns A single merged GenerateResult - */ -function mergeGenerateResults(results) { - // Caller guarantees results.length >= 2, so first element always exists - const firstResult = results[0]; - if (firstResult === undefined) { - // Unreachable: only called with 2+ results, but satisfies strictNullChecks - throw new Error('mergeGenerateResults called with empty results array'); - } - return { - patterns: results.flatMap((r) => r.patterns), - files: results.flatMap((r) => r.files), - registry: firstResult.registry, - errors: results.flatMap((r) => r.errors), - warnings: results.flatMap((r) => r.warnings), - }; -} -/** - * Generate documentation from a fully resolved config. - * - * Groups generators by their effective source config, then calls - * `generateDocumentation()` once per group. This reuses all existing - * pipeline logic while minimizing redundant file scans. - * - * @param config - Fully resolved configuration (from `loadProjectConfig()`) - * @param options - Optional overrides for generators, git diff, and release filter - * @returns Result with merged patterns, files, errors, and warnings from all groups - * - * @example - * ```typescript - * import { generateFromConfig } from '@libar-dev/delivery-process/generators'; - * import { loadProjectConfig } from '@libar-dev/delivery-process/config'; - * - * const config = await loadProjectConfig(process.cwd()); - * const result = await generateFromConfig(config, { - * generators: ['patterns', 'roadmap'], - * }); - * ``` - */ -export async function generateFromConfig(config, options) { - const generatorNames = options?.generators ?? config.project.generators; - if (generatorNames.length === 0) { - return R.err('No generators specified'); - } - // Register reference generators from config (explicit opt-in). - // Done here (not at import time) because configs are user-provided. - // Check both meta-generators: configs are partitioned by productArea presence. - if (config.project.referenceDocConfigs.length > 0 && - !generatorRegistry.has('reference-docs') && - !generatorRegistry.has('product-area-docs')) { - registerReferenceGenerators(generatorRegistry, config.project.referenceDocConfigs); - } - // Group generators by effective source config to minimize scans. - // Generators sharing the same sources and output directory are batched - // into one generateDocumentation() call. - const groups = groupGenerators(generatorNames, config.project.sources, config.project.output, config.project.generatorOverrides); - // Run each group through the existing pipeline - const allResults = []; - for (const group of groups) { - // Merge codec options: config-level → runtime options (runtime takes precedence) - const mergedCodecOptions = config.project.codecOptions !== undefined || options?.codecOptions !== undefined - ? { ...config.project.codecOptions, ...options?.codecOptions } - : undefined; - const generateOptions = { - input: [...group.sources.typescript], - baseDir: process.cwd(), - outputDir: group.outputDirectory, - generators: [...group.generators], - overwrite: config.project.output.overwrite, - ...(group.sources.features.length > 0 && { features: [...group.sources.features] }), - ...(group.sources.exclude.length > 0 && { exclude: [...group.sources.exclude] }), - ...(config.project.workflowPath !== null && { workflowPath: config.project.workflowPath }), - contextInferenceRules: [...config.project.contextInferenceRules], - ...(options?.gitDiffBase !== undefined && { gitDiffBase: options.gitDiffBase }), - ...(options?.changedFiles !== undefined && { changedFiles: [...options.changedFiles] }), - ...(options?.releaseFilter !== undefined && { releaseFilter: options.releaseFilter }), - ...(mergedCodecOptions !== undefined && { codecOptions: mergedCodecOptions }), - }; - const result = await generateDocumentation(generateOptions); - if (!result.ok) { - return result; - } - allResults.push(result.value); - } - // Merge results from all groups - // allResults is guaranteed non-empty because generatorNames.length > 0 - // and each group produces exactly one result (or we return early on error) - if (allResults.length === 1) { - const singleResult = allResults[0]; - if (singleResult === undefined) { - return R.err('Unexpected empty results after successful generation'); - } - return R.ok(singleResult); - } - return R.ok(mergeGenerateResults(allResults)); -} -//# sourceMappingURL=orchestrator.js.map \ No newline at end of file diff --git a/dist/generators/orchestrator.js.map b/dist/generators/orchestrator.js.map deleted file mode 100644 index 6ea9cae1..00000000 --- a/dist/generators/orchestrator.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"orchestrator.js","sourceRoot":"","sources":["../../src/generators/orchestrator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,EAAE,MAAM,aAAa,CAAC;AAElC,OAAO,EACL,qBAAqB,EACrB,4BAA4B,GAC7B,MAAM,gCAAgC,CAAC;AAOxC,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,+BAA+B,EAAE,MAAM,uBAAuB,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAGlD,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAElG,OAAO,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAC;AAEjF;;GAEG;AACH,MAAM,qBAAqB,GAAG,qBAAqB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,qBAAqB,CAAC;YAChE,GAAG,CAAC,OAAO,EAAE,WAAW,KAAK,SAAS,IAAI,EAAE,WAAW,EAAE,OAAO,CAAC,WAAW,EAAE,CAAC;YAC/E,GAAG,CAAC,OAAO,EAAE,YAAY,KAAK,SAAS,IAAI,EAAE,YAAY,EAAE,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC;YACvF,GAAG,CAAC,OAAO,EAAE,aAAa,KAAK,SAAS,IAAI,EAAE,aAAa,EAAE,OAAO,CAAC,aAAa,EAAE,CAAC;YACrF,GAAG,CAAC,kBAAkB,KAAK,SAAS,IAAI,EAAE,YAAY,EAAE,kBAAkB,EAAE,CAAC;SAC9E,CAAC;QAEF,MAAM,MAAM,GAAG,MAAM,qBAAqB,CAAC,eAAe,CAAC,CAAC;QAC5D,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;YACf,OAAO,MAAM,CAAC;QAChB,CAAC;QACD,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAChC,CAAC;IAED,gCAAgC;IAChC,uEAAuE;IACvE,2EAA2E;IAC3E,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC5B,MAAM,YAAY,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;QACnC,IAAI,YAAY,KAAK,SAAS,EAAE,CAAC;YAC/B,OAAO,CAAC,CAAC,GAAG,CAAC,sDAAsD,CAAC,CAAC;QACvE,CAAC;QACD,OAAO,CAAC,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC;IAC5B,CAAC;IAED,OAAO,CAAC,CAAC,EAAE,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC,CAAC;AAChD,CAAC"} \ No newline at end of file diff --git a/dist/generators/pipeline/build-pipeline.d.ts b/dist/generators/pipeline/build-pipeline.d.ts deleted file mode 100644 index b76542aa..00000000 --- a/dist/generators/pipeline/build-pipeline.d.ts +++ /dev/null @@ -1,106 +0,0 @@ -/** - * @libar-docs - * @libar-docs-generator @libar-docs-infra - * @libar-docs-pattern PipelineFactory - * @libar-docs-status completed - * @libar-docs-implements ProcessAPILayeredExtraction - * @libar-docs-product-area DataAPI - * @libar-docs-uses PatternScanner, GherkinScanner, DocExtractor, GherkinExtractor, MasterDataset - * - * ## PipelineFactory - Shared Pipeline Orchestration - * - * Shared factory that executes the 8-step scan-extract-merge-transform pipeline. - * Replaces inline pipeline orchestration in CLI consumers. - * - * Target: src/generators/pipeline/build-pipeline.ts - * See: ADR-006 (Single Read Model Architecture) - * See: DD-1, DD-2 (ProcessAPILayeredExtraction) - */ -import { Result } from '../../types/result.js'; -import type { RuntimeMasterDataset, ValidationSummary, ContextInferenceRule } from './transform-dataset.js'; -/** - * Options for building a MasterDataset via the shared pipeline. - * - * DD-1: Factory lives at src/generators/pipeline/build-pipeline.ts. - * DD-2: mergeConflictStrategy controls per-consumer conflict handling. - * DD-3: exclude, contextInferenceRules support future orchestrator - * migration without breaking changes. - */ -export interface PipelineOptions { - readonly input: readonly string[]; - readonly features: readonly string[]; - readonly baseDir: string; - readonly mergeConflictStrategy: 'fatal' | 'concatenate'; - readonly exclude?: readonly string[]; - readonly workflowPath?: string; - readonly contextInferenceRules?: readonly ContextInferenceRule[]; - /** DD-3: When false, skip validation pass (default true). */ - readonly includeValidation?: boolean; - /** DD-5: When true, return error on individual scan failures (default false). */ - readonly failOnScanErrors?: boolean; -} -/** - * Structured error from the pipeline factory. - * Includes the step that failed so callers can provide targeted diagnostics. - */ -export interface PipelineError { - readonly step: string; - readonly message: string; -} -/** - * DD-1: Detail for a pipeline warning (file-level diagnostic). - */ -export interface PipelineWarningDetail { - readonly file: string; - readonly line?: number; - readonly column?: number; - readonly message: string; -} -/** - * DD-1: Structured pipeline warning replacing flat strings. - * Consumers can read `.message` for human-readable text. - */ -export interface PipelineWarning { - readonly type: 'scan' | 'extraction' | 'gherkin-parse'; - readonly message: string; - readonly count?: number; - readonly details?: readonly PipelineWarningDetail[]; -} -/** - * DD-4: Aggregate scan counts for reporting. - * Avoids exposing raw ScannedFile[] arrays. - */ -export interface ScanMetadata { - readonly scannedFileCount: number; - readonly scanErrorCount: number; - readonly skippedDirectiveCount: number; - readonly gherkinErrorCount: number; -} -/** - * Successful pipeline result containing the dataset and validation summary. - */ -export interface PipelineResult { - readonly dataset: RuntimeMasterDataset; - readonly validation: ValidationSummary; - readonly warnings: readonly PipelineWarning[]; - readonly scanMetadata: ScanMetadata; -} -/** - * Build a MasterDataset by executing the 8-step extraction pipeline. - * - * Returns Result so each consumer maps errors - * to its own strategy (process.exit, throw, etc.). Does not call process.exit - * or log to console. - * - * Steps: - * 1. Load configuration (discovers delivery-process.config.ts) - * 2. Scan TypeScript source files - * 3. Extract patterns from TypeScript - * 4. Scan and extract Gherkin patterns - * 5. Merge patterns (conflict handling per mergeConflictStrategy) - * 6. Compute hierarchy children - * 7. Load workflow configuration - * 8. Transform to MasterDataset with validation - */ -export declare function buildMasterDataset(options: PipelineOptions): Promise>; -//# sourceMappingURL=build-pipeline.d.ts.map \ No newline at end of file diff --git a/dist/generators/pipeline/build-pipeline.d.ts.map b/dist/generators/pipeline/build-pipeline.d.ts.map deleted file mode 100644 index bc4fa3c0..00000000 --- a/dist/generators/pipeline/build-pipeline.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"build-pipeline.d.ts","sourceRoot":"","sources":["../../../src/generators/pipeline/build-pipeline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAoBH,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C,OAAO,KAAK,EACV,oBAAoB,EACpB,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,wBAAwB,CAAC;AAMhC;;;;;;;GAOG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IAC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AC,iBAAiB,EAAE,MAAM,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,OAAO,EAAE,oBAAoB,CAAC;IACvC,QAAQ,CAAC,UAAU,EAAE,iBAAiB,CAAC;IACvC,QAAQ,CAAC,QAAQ,EAAE,SAAS,eAAe,EAAE,CAAC;IAC9C,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;CACrC;AAMD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,aAAa,CAAC,CAAC,CAoMhD"} \ No newline at end of file diff --git a/dist/generators/pipeline/build-pipeline.js b/dist/generators/pipeline/build-pipeline.js deleted file mode 100644 index 120d55dd..00000000 --- a/dist/generators/pipeline/build-pipeline.js +++ /dev/null @@ -1,228 +0,0 @@ -/** - * @libar-docs - * @libar-docs-generator @libar-docs-infra - * @libar-docs-pattern PipelineFactory - * @libar-docs-status completed - * @libar-docs-implements ProcessAPILayeredExtraction - * @libar-docs-product-area DataAPI - * @libar-docs-uses PatternScanner, GherkinScanner, DocExtractor, GherkinExtractor, MasterDataset - * - * ## PipelineFactory - Shared Pipeline Orchestration - * - * Shared factory that executes the 8-step scan-extract-merge-transform pipeline. - * Replaces inline pipeline orchestration in CLI consumers. - * - * Target: src/generators/pipeline/build-pipeline.ts - * See: ADR-006 (Single Read Model Architecture) - * See: DD-1, DD-2 (ProcessAPILayeredExtraction) - */ -import * as path from 'path'; -import { scanPatterns } from '../../scanner/index.js'; -import { extractPatterns } from '../../extractor/doc-extractor.js'; -import { scanGherkinFiles } from '../../scanner/gherkin-scanner.js'; -import { extractPatternsFromGherkin, computeHierarchyChildren, } from '../../extractor/gherkin-extractor.js'; -import { mergePatterns } from './merge-patterns.js'; -import { loadConfig, formatConfigError } from '../../config/config-loader.js'; -import { DEFAULT_CONTEXT_INFERENCE_RULES } from '../../config/defaults.js'; -import { loadDefaultWorkflow, loadWorkflowFromPath } from '../../config/workflow-loader.js'; -import { transformToMasterDataset, transformToMasterDatasetWithValidation, } from './transform-dataset.js'; -import { Result } from '../../types/result.js'; -// ═══════════════════════════════════════════════════════════════════════════ -// Pipeline Factory -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Build a MasterDataset by executing the 8-step extraction pipeline. - * - * Returns Result so each consumer maps errors - * to its own strategy (process.exit, throw, etc.). Does not call process.exit - * or log to console. - * - * Steps: - * 1. Load configuration (discovers delivery-process.config.ts) - * 2. Scan TypeScript source files - * 3. Extract patterns from TypeScript - * 4. Scan and extract Gherkin patterns - * 5. Merge patterns (conflict handling per mergeConflictStrategy) - * 6. Compute hierarchy children - * 7. Load workflow configuration - * 8. Transform to MasterDataset with validation - */ -export async function buildMasterDataset(options) { - const baseDir = path.resolve(options.baseDir); - const warnings = []; - // Step 1: Load configuration - const configResult = await loadConfig(baseDir); - if (!configResult.ok) { - return Result.err({ - step: 'config', - message: formatConfigError(configResult.error), - }); - } - const registry = configResult.value.instance.registry; - // Step 2: Scan TypeScript source files - const scanResult = await scanPatterns({ - patterns: options.input, - baseDir, - ...(options.exclude !== undefined ? { exclude: options.exclude } : {}), - }, registry); - if (!scanResult.ok) { - return Result.err({ - step: 'scan-typescript', - message: String(scanResult.error), - }); - } - const { files: scannedFiles, errors: scanErrors, skippedDirectives } = scanResult.value; - // DD-5: failOnScanErrors — return error on individual file parse failures - if (options.failOnScanErrors === true && scanErrors.length > 0) { - return Result.err({ - step: 'scan-typescript', - message: `${scanErrors.length} file${scanErrors.length === 1 ? '' : 's'} failed to scan`, - }); - } - // DD-1: Collect structured scan warnings - if (scanErrors.length > 0) { - warnings.push({ - type: 'scan', - message: `Failed to scan ${scanErrors.length} files (syntax errors)`, - count: scanErrors.length, - }); - } - if (skippedDirectives.length > 0) { - warnings.push({ - type: 'scan', - message: `Skipped ${skippedDirectives.length} invalid directives`, - count: skippedDirectives.length, - }); - } - // Step 3: Extract patterns from TypeScript - const extraction = extractPatterns(scannedFiles, baseDir, registry); - if (extraction.errors.length > 0) { - warnings.push({ - type: 'extraction', - message: `${extraction.errors.length} TypeScript patterns had errors`, - count: extraction.errors.length, - }); - } - // Step 4: Scan and extract Gherkin patterns - let gherkinPatterns = []; - let gherkinErrorCount = 0; - if (options.features.length > 0) { - const gherkinScanResult = await scanGherkinFiles({ - patterns: options.features, - baseDir, - ...(options.exclude !== undefined ? { exclude: options.exclude } : {}), - }); - if (gherkinScanResult.ok) { - const { files: gherkinFiles, errors: gherkinErrors } = gherkinScanResult.value; - gherkinErrorCount = gherkinErrors.length; - // DD-1: Gherkin parse errors with file/line/column detail - if (gherkinErrors.length > 0) { - warnings.push({ - type: 'gherkin-parse', - message: `Failed to parse ${gherkinErrors.length} feature file${gherkinErrors.length === 1 ? '' : 's'}`, - count: gherkinErrors.length, - details: gherkinErrors.map((e) => ({ - file: e.file, - // Use spread pattern for optional properties (exactOptionalPropertyTypes) - ...(e.error.line !== undefined && { line: e.error.line }), - ...(e.error.column !== undefined && { column: e.error.column }), - message: e.error.message, - })), - }); - } - // Extract patterns from Gherkin - const gherkinResult = extractPatternsFromGherkin(gherkinFiles, { - baseDir, - tagRegistry: registry, - scenariosAsUseCases: true, - }); - gherkinPatterns = gherkinResult.patterns; - // DD-1: Gherkin extraction errors per pattern - if (gherkinResult.errors.length > 0) { - for (const error of gherkinResult.errors) { - const details = error.validationErrors !== undefined && error.validationErrors.length > 0 - ? ` [${error.validationErrors.join('; ')}]` - : ''; - warnings.push({ - type: 'extraction', - message: `${error.file}: ${error.patternName} - ${error.reason}${details}`, - }); - } - } - } - // Note: scanGherkinFiles returns Result so it always succeeds - // Individual file errors are collected in gherkinScanResult.value.errors - } - // Step 5: Merge patterns (DD-2: conflict handling per strategy) - const mergeResult = mergePatterns(extraction.patterns, gherkinPatterns); - let allMerged; - if (mergeResult.ok) { - allMerged = mergeResult.value; - } - else if (options.mergeConflictStrategy === 'concatenate') { - // Validator behavior: fall back to concatenation on conflict (DD-2) - warnings.push({ - type: 'scan', - message: `Pattern merge conflicts detected but concatenated per strategy: ${mergeResult.error}`, - }); - allMerged = [...extraction.patterns, ...gherkinPatterns]; - } - else { - // Fatal behavior: return error on conflict (DD-2) - return Result.err({ - step: 'merge', - message: mergeResult.error, - }); - } - // Step 6: Compute hierarchy children - const allPatterns = computeHierarchyChildren(allMerged); - // Step 7: Load workflow configuration - let workflow; - if (options.workflowPath !== undefined) { - const workflowResult = await loadWorkflowFromPath(options.workflowPath); - if (!workflowResult.ok) { - return Result.err({ - step: 'workflow', - message: workflowResult.error.message, - }); - } - workflow = workflowResult.value; - } - else { - workflow = loadDefaultWorkflow(); - } - // DD-4: Build scan metadata for reporting - const scanMetadata = { - scannedFileCount: scannedFiles.length, - scanErrorCount: scanErrors.length, - skippedDirectiveCount: skippedDirectives.length, - gherkinErrorCount, - }; - // Step 8: Transform to MasterDataset - // DD-3: includeValidation controls which transform path to use - const contextInferenceRules = options.contextInferenceRules ?? DEFAULT_CONTEXT_INFERENCE_RULES; - const rawDataset = { - patterns: allPatterns, - tagRegistry: registry, - workflow, - contextInferenceRules, - }; - if (options.includeValidation === false) { - const dataset = transformToMasterDataset(rawDataset); - return Result.ok({ - dataset, - validation: { - totalPatterns: allPatterns.length, - malformedPatterns: [], - danglingReferences: [], - unknownStatuses: [], - warningCount: 0, - }, - warnings, - scanMetadata, - }); - } - const { dataset, validation } = transformToMasterDatasetWithValidation(rawDataset); - return Result.ok({ dataset, validation, warnings, scanMetadata }); -} -//# sourceMappingURL=build-pipeline.js.map \ No newline at end of file diff --git a/dist/generators/pipeline/build-pipeline.js.map b/dist/generators/pipeline/build-pipeline.js.map deleted file mode 100644 index e984eaae..00000000 --- a/dist/generators/pipeline/build-pipeline.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"build-pipeline.js","sourceRoot":"","sources":["../../../src/generators/pipeline/build-pipeline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;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.d.ts deleted file mode 100644 index 452d8699..00000000 --- a/dist/generators/pipeline/index.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * @libar-docs - * @libar-docs-generator @libar-docs-infra - * @libar-docs-pattern PipelineModule - * @libar-docs-status completed - * @libar-docs-uses TransformDataset - * @libar-docs-used-by Orchestrator, Generators - * - * ## Pipeline Module - Unified Transformation Infrastructure - * - * Barrel export for the unified transformation pipeline components. - * This module provides single-pass pattern transformation. - * - * ### When to Use - * - * - When transforming extracted patterns into a MasterDataset - * - When building custom generation pipelines - * - When accessing pre-computed indexes and views from the dataset - * - * NOTE: Report codecs have been replaced by RDM codecs in src/renderable/codecs/ - */ -export { transformToMasterDataset, transformToMasterDatasetWithValidation, completionPercentage, isFullyCompleted, type RawDataset, type RuntimeMasterDataset, type ContextInferenceRule, type ValidationSummary, type MalformedPattern, type DanglingReference, type TransformResult, } from './transform-dataset.js'; -export { mergePatterns } from './merge-patterns.js'; -export { buildMasterDataset, type PipelineOptions, type PipelineResult, type PipelineError, type PipelineWarning, type PipelineWarningDetail, type ScanMetadata, } from './build-pipeline.js'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/dist/generators/pipeline/index.d.ts.map b/dist/generators/pipeline/index.d.ts.map deleted file mode 100644 index ec334697..00000000 --- a/dist/generators/pipeline/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generators/pipeline/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAMH,OAAO,EACL,wBAAwB,EACxB,sCAAsC,EACtC,oBAAoB,EACpB,gBAAgB,EAChB,KAAK,UAAU,EACf,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,eAAe,GACrB,MAAM,wBAAwB,CAAC;AAMhC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAMpD,OAAO,EACL,kBAAkB,EAClB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,YAAY,GAClB,MAAM,qBAAqB,CAAC"} \ No newline at end of file diff --git a/dist/generators/pipeline/index.js b/dist/generators/pipeline/index.js deleted file mode 100644 index 491d355a..00000000 --- a/dist/generators/pipeline/index.js +++ /dev/null @@ -1,34 +0,0 @@ -/** - * @libar-docs - * @libar-docs-generator @libar-docs-infra - * @libar-docs-pattern PipelineModule - * @libar-docs-status completed - * @libar-docs-uses TransformDataset - * @libar-docs-used-by Orchestrator, Generators - * - * ## Pipeline Module - Unified Transformation Infrastructure - * - * Barrel export for the unified transformation pipeline components. - * This module provides single-pass pattern transformation. - * - * ### When to Use - * - * - When transforming extracted patterns into a MasterDataset - * - When building custom generation pipelines - * - When accessing pre-computed indexes and views from the dataset - * - * NOTE: Report codecs have been replaced by RDM codecs in src/renderable/codecs/ - */ -// ═══════════════════════════════════════════════════════════════════════════ -// Transform Dataset -// ═══════════════════════════════════════════════════════════════════════════ -export { transformToMasterDataset, transformToMasterDatasetWithValidation, completionPercentage, isFullyCompleted, } from './transform-dataset.js'; -// ═══════════════════════════════════════════════════════════════════════════ -// Merge Patterns -// ═══════════════════════════════════════════════════════════════════════════ -export { mergePatterns } from './merge-patterns.js'; -// ═══════════════════════════════════════════════════════════════════════════ -// Pipeline Factory -// ═══════════════════════════════════════════════════════════════════════════ -export { buildMasterDataset, } from './build-pipeline.js'; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/generators/pipeline/index.js.map b/dist/generators/pipeline/index.js.map deleted file mode 100644 index aa801fcd..00000000 --- a/dist/generators/pipeline/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/generators/pipeline/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,8EAA8E;AAC9E,oBAAoB;AACpB,8EAA8E;AAE9E,OAAO,EACL,wBAAwB,EACxB,sCAAsC,EACtC,oBAAoB,EACpB,gBAAgB,GAQjB,MAAM,wBAAwB,CAAC;AAEhC,8EAA8E;AAC9E,iBAAiB;AACjB,8EAA8E;AAE9E,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,8EAA8E;AAC9E,mBAAmB;AACnB,8EAA8E;AAE9E,OAAO,EACL,kBAAkB,GAOnB,MAAM,qBAAqB,CAAC"} \ No newline at end of file diff --git a/dist/generators/pipeline/merge-patterns.d.ts b/dist/generators/pipeline/merge-patterns.d.ts deleted file mode 100644 index 2ece61a0..00000000 --- a/dist/generators/pipeline/merge-patterns.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * @libar-docs - * @libar-docs-generator @libar-docs-infra - * @libar-docs-pattern MergePatterns - * @libar-docs-status completed - * @libar-docs-implements OrchestratorPipelineFactoryMigration - * @libar-docs-product-area Generation - * @libar-docs-uses PatternHelpers - * - * ## MergePatterns - Dual-Source Pattern Merging - * - * Merges patterns from TypeScript and Gherkin sources with conflict detection. - * Each pattern name must be unique across both sources. - * - * Target: src/generators/pipeline/merge-patterns.ts - * See: DD-2 (OrchestratorPipelineFactoryMigration) - */ -import type { ExtractedPattern } from '../../validation-schemas/index.js'; -import type { Result } from '../../types/result.js'; -/** - * Merge patterns from TypeScript and Gherkin sources with conflict detection - * - * Exported for testing purposes - allows direct unit testing of merge logic - * without running the full pipeline. - * - * @param tsPatterns - Patterns extracted from TypeScript files - * @param gherkinPatterns - Patterns extracted from Gherkin feature files - * @returns Result containing merged patterns or error if conflicts detected - */ -export declare function mergePatterns(tsPatterns: readonly ExtractedPattern[], gherkinPatterns: readonly ExtractedPattern[]): Result; -//# sourceMappingURL=merge-patterns.d.ts.map \ No newline at end of file diff --git a/dist/generators/pipeline/merge-patterns.d.ts.map b/dist/generators/pipeline/merge-patterns.d.ts.map deleted file mode 100644 index 6d4ff1ab..00000000 --- a/dist/generators/pipeline/merge-patterns.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"merge-patterns.d.ts","sourceRoot":"","sources":["../../../src/generators/pipeline/merge-patterns.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAIpD;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAC3B,UAAU,EAAE,SAAS,gBAAgB,EAAE,EACvC,eAAe,EAAE,SAAS,gBAAgB,EAAE,GAC3C,MAAM,CAAC,SAAS,gBAAgB,EAAE,EAAE,MAAM,CAAC,CAuB7C"} \ No newline at end of file diff --git a/dist/generators/pipeline/merge-patterns.js b/dist/generators/pipeline/merge-patterns.js deleted file mode 100644 index 01e8739a..00000000 --- a/dist/generators/pipeline/merge-patterns.js +++ /dev/null @@ -1,48 +0,0 @@ -/** - * @libar-docs - * @libar-docs-generator @libar-docs-infra - * @libar-docs-pattern MergePatterns - * @libar-docs-status completed - * @libar-docs-implements OrchestratorPipelineFactoryMigration - * @libar-docs-product-area Generation - * @libar-docs-uses PatternHelpers - * - * ## MergePatterns - Dual-Source Pattern Merging - * - * Merges patterns from TypeScript and Gherkin sources with conflict detection. - * Each pattern name must be unique across both sources. - * - * Target: src/generators/pipeline/merge-patterns.ts - * See: DD-2 (OrchestratorPipelineFactoryMigration) - */ -import { Result as R } from '../../types/result.js'; -import { getPatternName } from '../../api/pattern-helpers.js'; -/** - * Merge patterns from TypeScript and Gherkin sources with conflict detection - * - * Exported for testing purposes - allows direct unit testing of merge logic - * without running the full pipeline. - * - * @param tsPatterns - Patterns extracted from TypeScript files - * @param gherkinPatterns - Patterns extracted from Gherkin feature files - * @returns Result containing merged patterns or error if conflicts detected - */ -export function mergePatterns(tsPatterns, gherkinPatterns) { - // Check for conflicts (same pattern name in both sources) - const conflicts = []; - const tsPatternNames = new Set(tsPatterns.map((p) => getPatternName(p))); - for (const gherkinPattern of gherkinPatterns) { - const patternName = getPatternName(gherkinPattern); - if (tsPatternNames.has(patternName)) { - conflicts.push(patternName); - } - } - if (conflicts.length > 0) { - return R.err(`Pattern conflicts detected: ${conflicts.join(', ')}. ` + - `These patterns are defined in both TypeScript and Gherkin sources. ` + - `Each pattern should only be defined in one source.`); - } - // No conflicts - merge patterns - return R.ok([...tsPatterns, ...gherkinPatterns]); -} -//# sourceMappingURL=merge-patterns.js.map \ No newline at end of file diff --git a/dist/generators/pipeline/merge-patterns.js.map b/dist/generators/pipeline/merge-patterns.js.map deleted file mode 100644 index 028de3ae..00000000 --- a/dist/generators/pipeline/merge-patterns.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"merge-patterns.js","sourceRoot":"","sources":["../../../src/generators/pipeline/merge-patterns.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D;;;;;;;;;GASG;AACH,MAAM,UAAU,aAAa,CAC3B,UAAuC,EACvC,eAA4C;IAE5C,0DAA0D;IAC1D,MAAM,SAAS,GAAa,EAAE,CAAC;IAE/B,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAEzE,KAAK,MAAM,cAAc,IAAI,eAAe,EAAE,CAAC;QAC7C,MAAM,WAAW,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;QACnD,IAAI,cAAc,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC;YACpC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAC9B,CAAC;IACH,CAAC;IAED,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACzB,OAAO,CAAC,CAAC,GAAG,CACV,+BAA+B,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI;YACrD,qEAAqE;YACrE,oDAAoD,CACvD,CAAC;IACJ,CAAC;IAED,gCAAgC;IAChC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,UAAU,EAAE,GAAG,eAAe,CAAC,CAAC,CAAC;AACnD,CAAC"} \ No newline at end of file diff --git a/dist/generators/pipeline/transform-dataset.d.ts b/dist/generators/pipeline/transform-dataset.d.ts deleted file mode 100644 index 5373d192..00000000 --- a/dist/generators/pipeline/transform-dataset.d.ts +++ /dev/null @@ -1,213 +0,0 @@ -/** - * @libar-docs - * @libar-docs-generator @libar-docs-core - * @libar-docs-pattern TransformDataset - * @libar-docs-status completed - * @libar-docs-implements PatternRelationshipModel - * @libar-docs-arch-role service - * @libar-docs-arch-context generator - * @libar-docs-arch-layer application - * @libar-docs-include pipeline-stages - * @libar-docs-uses MasterDataset, ExtractedPattern, TagRegistry, NormalizeStatus - * @libar-docs-used-by Orchestrator - * @libar-docs-usecase "When computing all pattern views in a single pass" - * @libar-docs-usecase "When transforming raw extracted data for generators" - * @libar-docs-extract-shapes RuntimeMasterDataset, RawDataset, transformToMasterDataset - * - * ## TransformDataset - Single-Pass Pattern Transformation - * - * Transforms raw extracted patterns into a MasterDataset with all pre-computed - * views. This is the core of the unified transformation pipeline, computing - * status groups, phase groups, quarter groups, category groups, and source - * groups in a single iteration over the pattern array. - * - * ### When to Use - * - * - Use in orchestrator after pattern extraction and merging - * - Use when you need pre-computed views for multiple generators - * - * ### Key Concepts - * - * - **Single-pass**: O(n) complexity regardless of view count - * - **Immutable output**: Returns a new MasterDataset object - * - **Workflow integration**: Uses workflow config for phase names - */ -import type { ExtractedPattern, TagRegistry } from '../../validation-schemas/index.js'; -import type { LoadedWorkflow } from '../../config/workflow-loader.js'; -import type { StatusCounts } from '../../validation-schemas/master-dataset.js'; -import type { MasterDataset } from '../../validation-schemas/master-dataset.js'; -/** - * Information about a malformed pattern that failed schema validation. - */ -export interface MalformedPattern { - /** Pattern ID or name for identification */ - patternId: string; - /** List of validation issues found */ - issues: string[]; -} -/** - * Information about a dangling reference (reference to non-existent pattern). - */ -export interface DanglingReference { - /** The pattern containing the dangling reference */ - pattern: string; - /** The field containing the dangling reference (e.g., "uses", "dependsOn") */ - field: string; - /** The referenced pattern name that doesn't exist */ - missing: string; -} -/** - * Summary of validation results from dataset transformation. - * - * Provides structured information about data quality issues encountered - * during transformation, enabling upstream error handling and reporting. - */ -export interface ValidationSummary { - /** Total number of patterns processed */ - totalPatterns: number; - /** Patterns that failed schema validation */ - malformedPatterns: MalformedPattern[]; - /** References to patterns that don't exist in the dataset */ - danglingReferences: DanglingReference[]; - /** Status values that were not recognized (normalized to 'planned') */ - unknownStatuses: string[]; - /** Total count of all warnings (malformed + dangling + unknown statuses) */ - warningCount: number; -} -/** - * Result of transformToMasterDataset including both dataset and validation info. - */ -export interface TransformResult { - /** The transformed MasterDataset */ - dataset: RuntimeMasterDataset; - /** Validation summary with any issues found during transformation */ - validation: ValidationSummary; -} -/** - * Rule for auto-inferring bounded context from file paths. - * - * When a pattern has an architecture layer (`@libar-docs-arch-layer`) but no explicit - * context (`@libar-docs-arch-context`), these rules can infer the context from the - * file path. This reduces annotation redundancy when directory structure already - * implies the bounded context. - * - * @example - * ```typescript - * const rules: ContextInferenceRule[] = [ - * { pattern: 'src/validation/**', context: 'validation' }, - * { pattern: 'src/lint/**', context: 'lint' }, - * ]; - * // File at src/validation/rules.ts will get archContext='validation' if not explicit - * ``` - */ -export interface ContextInferenceRule { - /** Glob pattern to match file paths (e.g., 'src/validation/**') */ - readonly pattern: string; - /** Default context name to assign when pattern matches */ - readonly context: string; -} -/** - * Runtime MasterDataset with optional workflow - * - * Extends the Zod-compatible MasterDataset with workflow reference. - * LoadedWorkflow contains Maps which aren't JSON-serializable, - * so it's kept separate from the Zod schema. - */ -export interface RuntimeMasterDataset extends MasterDataset { - /** Optional workflow configuration (not serializable) */ - readonly workflow?: LoadedWorkflow; -} -/** - * Raw input data for transformation - */ -export interface RawDataset { - /** Extracted patterns from TypeScript and/or Gherkin sources */ - readonly patterns: readonly ExtractedPattern[]; - /** Tag registry for category lookups */ - readonly tagRegistry: TagRegistry; - /** Optional workflow configuration for phase names (can be undefined) */ - readonly workflow?: LoadedWorkflow | undefined; - /** Optional rules for inferring bounded context from file paths */ - readonly contextInferenceRules?: readonly ContextInferenceRule[] | undefined; -} -/** - * Transform raw extracted data into a MasterDataset with all pre-computed views. - * - * This is a ONE-PASS transformation that computes: - * - Status-based groupings (completed/active/planned) - * - Phase-based groupings with counts - * - Quarter-based groupings for timeline views - * - Category-based groupings for taxonomy - * - Source-based views (TypeScript vs Gherkin, roadmap, PRD) - * - Aggregate statistics (counts, phase count, category count) - * - Optional relationship index - * - * For backward compatibility, this function returns just the dataset. - * Use `transformToMasterDatasetWithValidation` to get validation summary. - * - * @param raw - Raw dataset with patterns, registry, and optional workflow - * @returns MasterDataset with all pre-computed views - * - * @example - * ```typescript - * const masterDataset = transformToMasterDataset({ - * patterns: mergedPatterns, - * tagRegistry: registry, - * workflow, - * }); - * - * // Access pre-computed views - * const completed = masterDataset.byStatus.completed; - * const phase3Patterns = masterDataset.byPhase.find(p => p.phaseNumber === 3); - * const q42024 = masterDataset.byQuarter["Q4-2024"]; - * ``` - */ -export declare function transformToMasterDataset(raw: RawDataset): RuntimeMasterDataset; -/** - * Transform raw extracted data into a MasterDataset with validation summary. - * - * This is the full transformation that includes: - * - Pre-loop validation against ExtractedPatternSchema - * - Status-based groupings (completed/active/planned) - * - Phase-based groupings with counts - * - Quarter-based groupings for timeline views - * - Category-based groupings for taxonomy - * - Source-based views (TypeScript vs Gherkin, roadmap, PRD) - * - Aggregate statistics (counts, phase count, category count) - * - Relationship index with dangling reference detection - * - Validation summary with malformed patterns and unknown statuses - * - * @param raw - Raw dataset with patterns, registry, and optional workflow - * @returns TransformResult with dataset and validation summary - * - * @example - * ```typescript - * const result = transformToMasterDatasetWithValidation({ - * patterns: mergedPatterns, - * tagRegistry: registry, - * workflow, - * }); - * - * if (result.validation.warningCount > 0) { - * console.warn(`Found ${result.validation.warningCount} validation issues`); - * } - * - * const dataset = result.dataset; - * ``` - */ -export declare function transformToMasterDatasetWithValidation(raw: RawDataset): TransformResult; -/** - * Compute completion percentage from status counts - * - * @param counts - Status counts - * @returns Percentage (0-100) of completed items - */ -export declare function completionPercentage(counts: StatusCounts): number; -/** - * Check if all items in a phase/group are completed - * - * @param counts - Status counts - * @returns True if all items are completed - */ -export declare function isFullyCompleted(counts: StatusCounts): boolean; -//# sourceMappingURL=transform-dataset.d.ts.map \ No newline at end of file diff --git a/dist/generators/pipeline/transform-dataset.d.ts.map b/dist/generators/pipeline/transform-dataset.d.ts.map deleted file mode 100644 index 38c699c1..00000000 --- a/dist/generators/pipeline/transform-dataset.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"transform-dataset.d.ts","sourceRoot":"","sources":["../../../src/generators/pipeline/transform-dataset.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAGvF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,KAAK,EAEV,YAAY,EAMb,MAAM,4CAA4C,CAAC;AAEpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAOhF;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,4CAA4C;IAC5C,SAAS,EAAE,MAAM,CAAC;IAClB,sCAAsC;IACtC,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,oDAAoD;IACpD,OAAO,EAA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;;;;;;;;;;;;GA+BG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,UAAU,GAAG,oBAAoB,CAE9E;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,sCAAsC,CAAC,GAAG,EAAE,UAAU,GAAG,eAAe,CAmXvF;AA4BD;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAGjE;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAE9D"} \ No newline at end of file diff --git a/dist/generators/pipeline/transform-dataset.js b/dist/generators/pipeline/transform-dataset.js deleted file mode 100644 index 0dc742aa..00000000 --- a/dist/generators/pipeline/transform-dataset.js +++ /dev/null @@ -1,523 +0,0 @@ -/** - * @libar-docs - * @libar-docs-generator @libar-docs-core - * @libar-docs-pattern TransformDataset - * @libar-docs-status completed - * @libar-docs-implements PatternRelationshipModel - * @libar-docs-arch-role service - * @libar-docs-arch-context generator - * @libar-docs-arch-layer application - * @libar-docs-include pipeline-stages - * @libar-docs-uses MasterDataset, ExtractedPattern, TagRegistry, NormalizeStatus - * @libar-docs-used-by Orchestrator - * @libar-docs-usecase "When computing all pattern views in a single pass" - * @libar-docs-usecase "When transforming raw extracted data for generators" - * @libar-docs-extract-shapes RuntimeMasterDataset, RawDataset, transformToMasterDataset - * - * ## TransformDataset - Single-Pass Pattern Transformation - * - * Transforms raw extracted patterns into a MasterDataset with all pre-computed - * views. This is the core of the unified transformation pipeline, computing - * status groups, phase groups, quarter groups, category groups, and source - * groups in a single iteration over the pattern array. - * - * ### When to Use - * - * - Use in orchestrator after pattern extraction and merging - * - Use when you need pre-computed views for multiple generators - * - * ### Key Concepts - * - * - **Single-pass**: O(n) complexity regardless of view count - * - **Immutable output**: Returns a new MasterDataset object - * - **Workflow integration**: Uses workflow config for phase names - */ -import { ExtractedPatternSchema } from '../../validation-schemas/index.js'; -import { getPatternName } from '../../api/pattern-helpers.js'; -import { normalizeStatus, ACCEPTED_STATUS_VALUES } from '../../taxonomy/index.js'; -/** - * Infer bounded context from file path using configured rules. - * - * Iterates through rules in order and returns the context from the first - * matching pattern. Returns undefined if no rules match. - * - * Pattern matching supports: - * - Simple prefix matching: `src/validation/` matches files in that directory - * - Glob-style wildcards: `src/validation/**` matches all files recursively - * - * @param filePath - The source file path to check - * @param rules - Ordered list of inference rules - * @returns The inferred context name, or undefined if no match - */ -function inferContext(filePath, rules) { - if (!rules || rules.length === 0) - return undefined; - for (const rule of rules) { - if (matchPattern(filePath, rule.pattern)) { - return rule.context; - } - } - return undefined; -} -/** - * Simple pattern matching for file paths. - * - * Supports: - * - Exact prefix matching: `src/validation/` matches `src/validation/foo.ts` - * - Glob-style `**` wildcard: `src/validation/**` matches all files recursively - * - * @param filePath - The file path to check - * @param pattern - The pattern to match against - * @returns true if the file path matches the pattern - */ -function matchPattern(filePath, pattern) { - // Handle `**` wildcard patterns (recursive match) - if (pattern.endsWith('/**')) { - const prefix = pattern.slice(0, -3); // Remove '/**' - return filePath.startsWith(prefix); - } - // Handle `/*` wildcard patterns (single level match) - if (pattern.endsWith('/*')) { - const prefix = pattern.slice(0, -2); // Remove '/*' - const afterPrefix = filePath.slice(prefix.length); - // Must start with prefix and have exactly one path segment after - return filePath.startsWith(prefix) && !afterPrefix.slice(1).includes('/'); - } - // Simple prefix matching - return filePath.startsWith(pattern); -} -/** - * Check if a status value is a known/valid status. - * - * @param status - Status value to check - * @returns true if status is a known value - */ -function isKnownStatus(status) { - if (!status) - return true; // undefined is acceptable (defaults to planned) - return ACCEPTED_STATUS_VALUES.includes(status); -} -/** - * Transform raw extracted data into a MasterDataset with all pre-computed views. - * - * This is a ONE-PASS transformation that computes: - * - Status-based groupings (completed/active/planned) - * - Phase-based groupings with counts - * - Quarter-based groupings for timeline views - * - Category-based groupings for taxonomy - * - Source-based views (TypeScript vs Gherkin, roadmap, PRD) - * - Aggregate statistics (counts, phase count, category count) - * - Optional relationship index - * - * For backward compatibility, this function returns just the dataset. - * Use `transformToMasterDatasetWithValidation` to get validation summary. - * - * @param raw - Raw dataset with patterns, registry, and optional workflow - * @returns MasterDataset with all pre-computed views - * - * @example - * ```typescript - * const masterDataset = transformToMasterDataset({ - * patterns: mergedPatterns, - * tagRegistry: registry, - * workflow, - * }); - * - * // Access pre-computed views - * const completed = masterDataset.byStatus.completed; - * const phase3Patterns = masterDataset.byPhase.find(p => p.phaseNumber === 3); - * const q42024 = masterDataset.byQuarter["Q4-2024"]; - * ``` - */ -export function transformToMasterDataset(raw) { - return transformToMasterDatasetWithValidation(raw).dataset; -} -/** - * Transform raw extracted data into a MasterDataset with validation summary. - * - * This is the full transformation that includes: - * - Pre-loop validation against ExtractedPatternSchema - * - Status-based groupings (completed/active/planned) - * - Phase-based groupings with counts - * - Quarter-based groupings for timeline views - * - Category-based groupings for taxonomy - * - Source-based views (TypeScript vs Gherkin, roadmap, PRD) - * - Aggregate statistics (counts, phase count, category count) - * - Relationship index with dangling reference detection - * - Validation summary with malformed patterns and unknown statuses - * - * @param raw - Raw dataset with patterns, registry, and optional workflow - * @returns TransformResult with dataset and validation summary - * - * @example - * ```typescript - * const result = transformToMasterDatasetWithValidation({ - * patterns: mergedPatterns, - * tagRegistry: registry, - * workflow, - * }); - * - * if (result.validation.warningCount > 0) { - * console.warn(`Found ${result.validation.warningCount} validation issues`); - * } - * - * const dataset = result.dataset; - * ``` - */ -export function transformToMasterDatasetWithValidation(raw) { - const { patterns, tagRegistry, workflow, contextInferenceRules } = raw; - // ───────────────────────────────────────────────────────────────────────── - // Validation tracking - // ───────────────────────────────────────────────────────────────────────── - const malformedPatterns = []; - const unknownStatuses = []; - const danglingReferences = []; - // ───────────────────────────────────────────────────────────────────────── - // Pre-loop validation: validate each pattern against schema - // ───────────────────────────────────────────────────────────────────────── - // Build a set of all pattern names for reference checking - const allPatternNames = new Set(); - for (const pattern of patterns) { - const key = getPatternName(pattern); - allPatternNames.add(key); - } - for (const pattern of patterns) { - // Validate against schema - const parseResult = ExtractedPatternSchema.safeParse(pattern); - if (!parseResult.success) { - const patternId = getPatternName(pattern); - const issues = parseResult.error.issues.map((issue) => `${issue.path.join('.')}: ${issue.message}`); - malformedPatterns.push({ patternId, issues }); - } - // Check for unknown status values - if (pattern.status && !isKnownStatus(pattern.status)) { - if (!unknownStatuses.includes(pattern.status)) { - unknownStatuses.push(pattern.status); - } - } - } - // ───────────────────────────────────────────────────────────────────────── - // Initialize accumulators for single-pass computation - // ───────────────────────────────────────────────────────────────────────── - const byStatus = { - completed: [], - active: [], - planned: [], - }; - const byPhaseMap = new Map(); - const byQuarter = {}; - const byCategoryMap = new Map(); - const bySource = { - typescript: [], - gherkin: [], - roadmap: [], - prd: [], - }; - const relationshipIndex = {}; - // Architecture index for diagram generation - const archIndex = { - byRole: {}, - byContext: {}, - byLayer: {}, - byView: {}, - all: [], - }; - // ───────────────────────────────────────────────────────────────────────── - // Single pass over all patterns - // ───────────────────────────────────────────────────────────────────────── - for (const pattern of patterns) { - // Reference for accumulation - const p = pattern; - // ─── Status grouping ─────────────────────────────────────────────────── - const status = normalizeStatus(pattern.status); - byStatus[status].push(p); - // ─── Phase grouping ──────────────────────────────────────────────────── - if (pattern.phase !== undefined) { - const existing = byPhaseMap.get(pattern.phase) ?? []; - existing.push(p); - byPhaseMap.set(pattern.phase, existing); - // Also add to roadmap view (patterns with phase are roadmap items) - bySource.roadmap.push(p); - } - // ─── Quarter grouping ────────────────────────────────────────────────── - if (pattern.quarter) { - const quarter = pattern.quarter; - const quarterPatterns = (byQuarter[quarter] ??= []); - quarterPatterns.push(p); - } - // ─── Category grouping ───────────────────────────────────────────────── - const category = pattern.category; - const categoryPatterns = byCategoryMap.get(category) ?? []; - categoryPatterns.push(p); - byCategoryMap.set(category, categoryPatterns); - // ─── Source grouping ─────────────────────────────────────────────────── - if (pattern.source.file.endsWith('.feature')) { - bySource.gherkin.push(p); - } - else { - bySource.typescript.push(p); - } - // ─── PRD grouping (has productArea, userRole, or businessValue) ──────── - if (pattern.productArea || pattern.userRole || pattern.businessValue) { - bySource.prd.push(p); - } - // ─── Relationship index ──────────────────────────────────────────────── - const patternKey = getPatternName(pattern); - relationshipIndex[patternKey] = { - uses: [...(pattern.uses ?? [])], - usedBy: [...(pattern.usedBy ?? [])], - dependsOn: [...(pattern.dependsOn ?? [])], - enables: [...(pattern.enables ?? [])], - // UML-inspired relationship fields (PatternRelationshipModel) - implementsPatterns: [...(pattern.implementsPatterns ?? [])], - implementedBy: [], // Computed in second pass - extendsPattern: pattern.extendsPattern, - extendedBy: [], // Computed in second pass - // Cross-reference and API navigation fields (PatternRelationshipModel enhancement) - seeAlso: [...(pattern.seeAlso ?? [])], - apiRef: [...(pattern.apiRef ?? [])], - }; - // ─── Architecture index (for diagram generation) ────────────────────── - // Infer context from file path if not explicitly set - const inferredContext = pattern.archContext ?? inferContext(pattern.source.file, contextInferenceRules); - const hasArchMetadata = pattern.archRole !== undefined || - inferredContext !== undefined || - pattern.archLayer !== undefined || - (pattern.include !== undefined && pattern.include.length > 0); - if (hasArchMetadata) { - archIndex.all.push(p); - // Group by role (bounded-context, projection, saga, etc.) - if (pattern.archRole) { - const rolePatterns = (archIndex.byRole[pattern.archRole] ??= []); - rolePatterns.push(p); - } - // Group by context (orders, inventory, etc.) for subgraph rendering - // Uses explicit archContext OR inferred context from file path - if (inferredContext) { - const contextPatterns = (archIndex.byContext[inferredContext] ??= []); - contextPatterns.push(p); - } - // Group by layer (domain, application, infrastructure) - if (pattern.archLayer) { - const layerPatterns = (archIndex.byLayer[pattern.archLayer] ??= []); - layerPatterns.push(p); - } - // Group by view (patterns can appear in multiple named views via include tag) - if (pattern.include) { - for (const view of pattern.include) { - if (view.length === 0) - continue; - const viewPatterns = (archIndex.byView[view] ??= []); - viewPatterns.push(p); - } - } - } - } - // ───────────────────────────────────────────────────────────────────────── - // Second pass: compute reverse lookups (implementedBy, extendedBy, enables, usedBy) - // ───────────────────────────────────────────────────────────────────────── - // We iterate over patterns again to have access to source.file for implementedBy - for (const pattern of patterns) { - const patternKey = getPatternName(pattern); - const entry = relationshipIndex[patternKey]; - if (!entry) - continue; - // Build implementedBy reverse lookup with full ImplementationRef - for (const implemented of entry.implementsPatterns) { - const target = relationshipIndex[implemented]; - if (target) { - // Check if this implementation is already added (by name) - const alreadyAdded = target.implementedBy.some((impl) => impl.name === patternKey); - if (!alreadyAdded) { - // Extract first line of description if available, truncate to 100 chars - const desc = pattern.directive.description; - const firstLine = desc ? desc.split('\n')[0]?.trim() : undefined; - const description = firstLine && firstLine.length > 0 - ? firstLine.slice(0, 100) + (firstLine.length > 100 ? '...' : '') - : undefined; - target.implementedBy.push({ - name: patternKey, - file: pattern.source.file, - description, - }); - } - } - } - // Build extendedBy reverse lookup (still uses string names) - if (entry.extendsPattern) { - const target = relationshipIndex[entry.extendsPattern]; - if (target && !target.extendedBy.includes(patternKey)) { - target.extendedBy.push(patternKey); - } - } - // Build enables reverse lookup (dependsOn -> enables) - for (const dep of entry.dependsOn) { - const target = relationshipIndex[dep]; - if (target && !target.enables.includes(patternKey)) { - target.enables.push(patternKey); - } - } - // Build usedBy reverse lookup (uses -> usedBy) - for (const used of entry.uses) { - const target = relationshipIndex[used]; - if (target && !target.usedBy.includes(patternKey)) { - target.usedBy.push(patternKey); - } - } - } - // Sort reverse-computed arrays for consistent output - for (const entry of Object.values(relationshipIndex)) { - entry.implementedBy.sort((a, b) => a.file.localeCompare(b.file)); - entry.enables.sort((a, b) => a.localeCompare(b)); - entry.usedBy.sort((a, b) => a.localeCompare(b)); - } - // ───────────────────────────────────────────────────────────────────────── - // Third pass: detect dangling references in relationship fields - // ───────────────────────────────────────────────────────────────────────── - for (const pattern of patterns) { - const patternKey = getPatternName(pattern); - // Check 'uses' references - for (const ref of pattern.uses ?? []) { - if (!allPatternNames.has(ref)) { - danglingReferences.push({ pattern: patternKey, field: 'uses', missing: ref }); - } - } - // Check 'dependsOn' references - for (const ref of pattern.dependsOn ?? []) { - if (!allPatternNames.has(ref)) { - danglingReferences.push({ pattern: patternKey, field: 'dependsOn', missing: ref }); - } - } - // Check 'implementsPatterns' references - for (const ref of pattern.implementsPatterns ?? []) { - if (!allPatternNames.has(ref)) { - danglingReferences.push({ pattern: patternKey, field: 'implementsPatterns', missing: ref }); - } - } - // Check 'extendsPattern' reference - if (pattern.extendsPattern && !allPatternNames.has(pattern.extendsPattern)) { - danglingReferences.push({ - pattern: patternKey, - field: 'extendsPattern', - missing: pattern.extendsPattern, - }); - } - // Check 'seeAlso' references - for (const ref of pattern.seeAlso ?? []) { - if (!allPatternNames.has(ref)) { - danglingReferences.push({ pattern: patternKey, field: 'seeAlso', missing: ref }); - } - } - } - // ───────────────────────────────────────────────────────────────────────── - // Build phase groups with counts (sorted by phase number) - // ───────────────────────────────────────────────────────────────────────── - const byPhase = Array.from(byPhaseMap.entries()) - .sort(([a], [b]) => a - b) - .map(([phaseNumber, phasePatterns]) => { - // Try workflow config first, then derive from patterns - const workflowPhaseName = workflow?.config.phases.find((p) => p.order === phaseNumber)?.name; - // If no workflow name, use the first pattern's name (often the phase has one primary pattern) - const firstPattern = phasePatterns[0]; - const derivedName = firstPattern?.name; - return { - phaseNumber, - phaseName: workflowPhaseName ?? derivedName, - patterns: phasePatterns, - counts: computeCounts(phasePatterns), - }; - }); - // ───────────────────────────────────────────────────────────────────────── - // Convert category map to record - // ───────────────────────────────────────────────────────────────────────── - const byCategory = Object.fromEntries(byCategoryMap); - // ───────────────────────────────────────────────────────────────────────── - // Compute aggregate counts - // ───────────────────────────────────────────────────────────────────────── - const counts = { - completed: byStatus.completed.length, - active: byStatus.active.length, - planned: byStatus.planned.length, - total: patterns.length, - }; - // ───────────────────────────────────────────────────────────────────────── - // Build validation summary - // ───────────────────────────────────────────────────────────────────────── - const validation = { - totalPatterns: patterns.length, - malformedPatterns, - danglingReferences, - unknownStatuses, - warningCount: malformedPatterns.length + danglingReferences.length + unknownStatuses.length, - }; - // ───────────────────────────────────────────────────────────────────────── - // Return assembled MasterDataset with validation - // ───────────────────────────────────────────────────────────────────────── - const dataset = { - patterns: patterns, - tagRegistry, - byStatus, - byPhase, - byQuarter, - byCategory, - bySource, - counts, - phaseCount: byPhaseMap.size, - categoryCount: byCategoryMap.size, - relationshipIndex, - // Only include archIndex if it has content - ...(archIndex.all.length > 0 && { archIndex }), - }; - // Only include workflow if defined (exactOptionalPropertyTypes compliance) - if (workflow !== undefined) { - return { dataset: { ...dataset, workflow }, validation }; - } - return { dataset, validation }; -} -/** - * Compute status counts for a subset of patterns - * - * @param patterns - Patterns to count - * @returns Status counts including total - */ -function computeCounts(patterns) { - let completed = 0; - let active = 0; - let planned = 0; - for (const p of patterns) { - const s = normalizeStatus(p.status); - if (s === 'completed') - completed++; - else if (s === 'active') - active++; - else - planned++; - } - return { - completed, - active, - planned, - total: patterns.length, - }; -} -/** - * Compute completion percentage from status counts - * - * @param counts - Status counts - * @returns Percentage (0-100) of completed items - */ -export function completionPercentage(counts) { - if (counts.total === 0) - return 0; - return Math.round((counts.completed / counts.total) * 100); -} -/** - * Check if all items in a phase/group are completed - * - * @param counts - Status counts - * @returns True if all items are completed - */ -export function isFullyCompleted(counts) { - return counts.total > 0 && counts.completed === counts.total; -} -//# sourceMappingURL=transform-dataset.js.map \ No newline at end of file diff --git a/dist/generators/pipeline/transform-dataset.js.map b/dist/generators/pipeline/transform-dataset.js.map deleted file mode 100644 index ca25b920..00000000 --- a/dist/generators/pipeline/transform-dataset.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"transform-dataset.js","sourceRoot":"","sources":["../../../src/generators/pipeline/transform-dataset.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAGH,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAa9D,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,yB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C,KAAK,CAAC;AAC/D,CAAC"} \ No newline at end of file diff --git a/dist/generators/registry.d.ts b/dist/generators/registry.d.ts deleted file mode 100644 index 47697f88..00000000 --- a/dist/generators/registry.d.ts +++ /dev/null @@ -1,64 +0,0 @@ -/** - * @libar-docs - */ -import type { DocumentGenerator } from './types'; -/** - * @libar-docs-generator - * @libar-docs-pattern GeneratorRegistry - * @libar-docs-status completed - * @libar-docs-uses GeneratorTypes - * @libar-docs-used-by GeneratorFactory, Orchestrator, GenerateDocsCLI - * - * ## GeneratorRegistry - Central Registry for Document Generators - * - * Manages registration and lookup of document generators (both built-in and custom). - * Uses explicit registration pattern for transparency and debuggability. - * - * ### When to Use - * - * - Registering built-in generators on module import - * - Registering custom generators from user code - * - Looking up generators by name in the CLI - * - * ### Key Concepts - * - * - **Singleton:** Single global instance shared across the package - * - **Explicit Registration:** No auto-discovery, transparent registration - * - **Name Uniqueness:** Prevents duplicate generator names - */ -export declare class GeneratorRegistry { - private readonly generators; - /** - * Register a generator. - * - * @throws Error if generator with same name already registered - */ - register(generator: DocumentGenerator): void; - /** - * Get generator by name. - * - * @returns Generator if found, undefined otherwise - */ - get(name: string): DocumentGenerator | undefined; - /** - * Check if generator exists. - */ - has(name: string): boolean; - /** - * List all registered generator names. - * - * @returns Sorted array of generator names - */ - available(): string[]; - /** - * Clear all registered generators. - * Primarily for testing. - */ - clear(): void; -} -/** - * Singleton instance. - * Generators register themselves on import via this instance. - */ -export declare const generatorRegistry: GeneratorRegistry; -//# sourceMappingURL=registry.d.ts.map \ No newline at end of file diff --git a/dist/generators/registry.d.ts.map b/dist/generators/registry.d.ts.map deleted file mode 100644 index 0df79ad9..00000000 --- a/dist/generators/registry.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/generators/registry.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAwC;IAEnE;;;;OAIG;IACH,QAAQ,CAAC,SAAS,EAAE,iBAAiB,GAAG,IAAI;IAU5C;;;;OAIG;IACH,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,iBAAiB,GAAG,SAAS;IAIhD;;OAEG;IACH,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAI1B;;;;OAIG;IACH,SAAS,IAAI,MAAM,EAAE;IAIrB;;;OAGG;IACH,KAAK,IAAI,IAAI;CAGd;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,mBAA0B,CAAC"} \ No newline at end of file diff --git a/dist/generators/registry.js b/dist/generators/registry.js deleted file mode 100644 index 9d6a8d7f..00000000 --- a/dist/generators/registry.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * @libar-docs - */ -/** - * @libar-docs-generator - * @libar-docs-pattern GeneratorRegistry - * @libar-docs-status completed - * @libar-docs-uses GeneratorTypes - * @libar-docs-used-by GeneratorFactory, Orchestrator, GenerateDocsCLI - * - * ## GeneratorRegistry - Central Registry for Document Generators - * - * Manages registration and lookup of document generators (both built-in and custom). - * Uses explicit registration pattern for transparency and debuggability. - * - * ### When to Use - * - * - Registering built-in generators on module import - * - Registering custom generators from user code - * - Looking up generators by name in the CLI - * - * ### Key Concepts - * - * - **Singleton:** Single global instance shared across the package - * - **Explicit Registration:** No auto-discovery, transparent registration - * - **Name Uniqueness:** Prevents duplicate generator names - */ -export class GeneratorRegistry { - generators = new Map(); - /** - * Register a generator. - * - * @throws Error if generator with same name already registered - */ - register(generator) { - if (this.generators.has(generator.name)) { - throw new Error(`Generator "${generator.name}" is already registered. ` + - `Available generators: ${this.available().join(', ')}`); - } - this.generators.set(generator.name, generator); - } - /** - * Get generator by name. - * - * @returns Generator if found, undefined otherwise - */ - get(name) { - return this.generators.get(name); - } - /** - * Check if generator exists. - */ - has(name) { - return this.generators.has(name); - } - /** - * List all registered generator names. - * - * @returns Sorted array of generator names - */ - available() { - return Array.from(this.generators.keys()).sort(); - } - /** - * Clear all registered generators. - * Primarily for testing. - */ - clear() { - this.generators.clear(); - } -} -/** - * Singleton instance. - * Generators register themselves on import via this instance. - */ -export const generatorRegistry = new GeneratorRegistry(); -//# sourceMappingURL=registry.js.map \ No newline at end of file diff --git a/dist/generators/registry.js.map b/dist/generators/registry.js.map deleted file mode 100644 index 38b1e162..00000000 --- a/dist/generators/registry.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/generators/registry.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,OAAO,iBAAiB;IACX,UAAU,GAAG,IAAI,GAAG,EAA6B,CAAC;IAEnE;;;;OAIG;IACH,QAAQ,CAAC,SAA4B;QACnC,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;YACxC,MAAM,IAAI,KAAK,CACb,cAAc,SAAS,CAAC,IAAI,2BAA2B;gBACrD,yBAAyB,IAAI,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CACzD,CAAC;QACJ,CAAC;QACD,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IACjD,CAAC;IAED;;;;OAIG;IACH,GAAG,CAAC,IAAY;QACd,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IAED;;OAEG;IACH,GAAG,CAAC,IAAY;QACd,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IAED;;;;OAIG;IACH,SAAS;QACP,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IACnD,CAAC;IAED;;;OAGG;IACH,KAAK;QACH,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;IAC1B,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,iBAAiB,EAAE,CAAC"} \ No newline at end of file diff --git a/dist/generators/source-mapper.d.ts b/dist/generators/source-mapper.d.ts deleted file mode 100644 index 50e470f1..00000000 --- a/dist/generators/source-mapper.d.ts +++ /dev/null @@ -1,143 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern SourceMapper - * @libar-docs-status completed - * @libar-docs-arch-role infrastructure - * @libar-docs-arch-context generator - * @libar-docs-arch-layer infrastructure - * @libar-docs-depends-on DecisionDocCodec,ShapeExtractor,GherkinASTParser - * - * ## Source Mapper - Multi-Source Content Aggregation - * - * Aggregates content from multiple source files based on source mapping tables - * parsed from decision documents. Dispatches extraction to appropriate handlers - * based on extraction method (shape extraction, rule blocks, JSDoc, etc.). - * - * ### When to Use - * - * - When generating documentation from a decision document's source mapping - * - When aggregating content from TypeScript, Gherkin, and decision sources - * - When building docs with progressive disclosure (compact vs detailed) - * - * ### Key Concepts - * - * - **Source Mapping Table**: Defines sections, source files, and extraction methods - * - **Self-Reference**: `THIS DECISION` markers extract from current document - * - **Graceful Degradation**: Missing files produce warnings, not failures - * - **Order Preservation**: Aggregated content maintains mapping table order - */ -import type { Result } from '../types/result.js'; -import { type SourceMappingEntry, type DecisionDocContent, type ExtractedDocString } from '../renderable/codecs/decision-doc.js'; -import type { ExtractedShape } from '../validation-schemas/extracted-shape.js'; -import type { WarningCollector } from './warning-collector.js'; -import type { FileCache } from '../cache/file-cache.js'; -/** - * Options for source mapping execution - */ -export interface SourceMapperOptions { - /** Base directory for resolving relative paths */ - baseDir: string; - /** Current decision document path (for self-references) */ - decisionDocPath: string; - /** Parsed decision document content (for self-reference extraction) */ - decisionContent: DecisionDocContent; - /** Detail level affects what content is included */ - detailLevel?: 'summary' | 'standard' | 'detailed'; - /** Optional warning collector for structured warning handling */ - warningCollector?: WarningCollector; - /** Optional file cache for avoiding repeated disk reads */ - fileCache?: FileCache; -} -/** - * Warning produced during extraction - */ -export interface ExtractionWarning { - /** Warning severity */ - severity: 'warning' | 'info'; - /** Warning message */ - message: string; - /** Source mapping entry that produced the warning */ - sourceMapping: SourceMappingEntry; -} -/** - * Single extracted section from a source - */ -export interface ExtractedSection { - /** Target section name from mapping */ - section: string; - /** Source file path or self-reference marker */ - sourceFile: string; - /** Extraction method used */ - extractionMethod: string; - /** Extracted content (markdown) */ - content: string; - /** Extracted shapes (if applicable) */ - shapes?: ExtractedShape[]; - /** Extracted DocStrings (if applicable) */ - docStrings?: ExtractedDocString[]; -} -/** - * Result of source mapping execution - */ -export interface AggregatedContent { - /** Extracted sections in mapping order */ - sections: ExtractedSection[]; - /** Warnings produced during extraction */ - warnings: ExtractionWarning[]; - /** Overall success (true if at least one section extracted) */ - success: boolean; -} -/** - * Extract content from THIS DECISION (the current decision document) - */ -export declare function extractFromDecision(options: SourceMapperOptions, sourceMapping: SourceMappingEntry): Result; -/** - * Extract shapes from a TypeScript file using @extract-shapes - */ -export declare function extractFromTypeScript(filePath: string, options: SourceMapperOptions, sourceMapping: SourceMappingEntry): Promise>; -/** - * Extract Rule blocks or Scenario Outline Examples from a behavior spec - */ -export declare function extractFromBehaviorSpec(filePath: string, options: SourceMapperOptions, sourceMapping: SourceMappingEntry): Promise>; -/** - * Execute source mapping to aggregate content from multiple sources - * - * Takes source mapping entries from a decision document and extracts content - * from each referenced source file. Handles self-references (THIS DECISION), - * TypeScript files (@extract-shapes, JSDoc), and behavior specs (Rule blocks, - * Scenario Outline Examples). - * - * @param sourceMappings - Source mapping entries from decision document - * @param options - Mapper options including base directory and decision content - * @returns Aggregated content with sections in mapping order - * - * @example - * ```typescript - * const result = await executeSourceMapping(decisionContent.sourceMappings, { - * baseDir: process.cwd(), - * decisionDocPath: 'specs/my-decision.feature', - * decisionContent: decisionContent, - * detailLevel: 'detailed', - * }); - * - * if (result.success) { - * for (const section of result.sections) { - * console.log(`## ${section.section}\n${section.content}`); - * } - * } - * ``` - */ -export declare function executeSourceMapping(sourceMappings: readonly SourceMappingEntry[], options: SourceMapperOptions): Promise; -/** - * Validate source mappings before execution - * - * Checks all referenced files exist and extraction methods are valid. - * Does not perform actual extraction. - * - * @param sourceMappings - Source mapping entries to validate - * @param options - Mapper options (only baseDir is required) - * @returns Array of validation warnings - */ -export declare function validateSourceMappings(sourceMappings: readonly SourceMappingEntry[], options: Pick): Promise; -//# sourceMappingURL=source-mapper.d.ts.map \ No newline at end of file diff --git a/dist/generators/source-mapper.d.ts.map b/dist/generators/source-mapper.d.ts.map deleted file mode 100644 index 35562ebc..00000000 --- a/dist/generators/source-mapper.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"source-mapper.d.ts","sourceRoot":"","sources":["../../src/generators/source-mapper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAKH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EAOxB,MAAM,sCAAsC,CAAC;AAI9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAG/E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAMxD;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,kDAAkD;IAClD,OAAO,EAAE,MAAM,CAAC;IAEhB,2DAA2D;IAC3D,eAAe,EAAE,MAAM,CAAC;IAExB,uEAAuE;IACvE,eAAe,EAAE,kBAAkB,CAAC;IAEpC,oDAAoD;IACpD,WAAW,CAAC,EAA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uB,CAC3C,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,mBAAmB,EAC5B,aAAa,EAAE,kBAAkB,GAChC,OAAO,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,CAsCnC;AAmHD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAsB,oBAAoB,CACxC,cAAc,EAAE,SAAS,kBAAkB,EAAE,EAC7C,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,iBAAiB,CAAC,CAwE5B;AAED;;;;;;;;;GASG;AACH,wBAAsB,sBAAsB,CAC1C,cAAc,EAAE,SAAS,kBAAkB,EAAE,EAC7C,OAAO,EAAE,IAAI,CAAC,mBAAmB,EAAE,SAAS,CAAC,GAC5C,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAyC9B"} \ No newline at end of file diff --git a/dist/generators/source-mapper.js b/dist/generators/source-mapper.js deleted file mode 100644 index 6028332f..00000000 --- a/dist/generators/source-mapper.js +++ /dev/null @@ -1,602 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern SourceMapper - * @libar-docs-status completed - * @libar-docs-arch-role infrastructure - * @libar-docs-arch-context generator - * @libar-docs-arch-layer infrastructure - * @libar-docs-depends-on DecisionDocCodec,ShapeExtractor,GherkinASTParser - * - * ## Source Mapper - Multi-Source Content Aggregation - * - * Aggregates content from multiple source files based on source mapping tables - * parsed from decision documents. Dispatches extraction to appropriate handlers - * based on extraction method (shape extraction, rule blocks, JSDoc, etc.). - * - * ### When to Use - * - * - When generating documentation from a decision document's source mapping - * - When aggregating content from TypeScript, Gherkin, and decision sources - * - When building docs with progressive disclosure (compact vs detailed) - * - * ### Key Concepts - * - * - **Source Mapping Table**: Defines sections, source files, and extraction methods - * - **Self-Reference**: `THIS DECISION` markers extract from current document - * - **Graceful Degradation**: Missing files produce warnings, not failures - * - **Order Preservation**: Aggregated content maintains mapping table order - */ -import * as fs from 'node:fs'; -import * as fsPromises from 'node:fs/promises'; -import * as path from 'node:path'; -import { Result as R } from '../types/result.js'; -import { isSelfReference, parseSelfReference, normalizeExtractionMethod, findRuleByName, extractDocStrings, } from '../renderable/codecs/decision-doc.js'; -import { extractShapes } from '../extractor/shape-extractor.js'; -import { renderShapesAsMarkdown } from '../renderable/codecs/helpers.js'; -import { parseFeatureFile } from '../scanner/gherkin-ast-parser.js'; -// ============================================================================= -// File Utilities -// ============================================================================= -/** - * Read file content asynchronously with error handling and optional caching - */ -async function readFile(filePath, fileCache) { - // Check cache first - if (fileCache) { - const cached = fileCache.get(filePath); - if (cached !== undefined) { - return R.ok(cached); - } - } - try { - const content = await fsPromises.readFile(filePath, 'utf-8'); - // Store in cache if provided - if (fileCache) { - fileCache.set(filePath, content); - } - return R.ok(content); - } - catch (error) { - return R.err(error instanceof Error ? error : new Error(`Failed to read file: ${filePath}`)); - } -} -/** - * Check if file exists asynchronously. - * Captures filesystem errors (EACCES, EPERM, etc.) via warning collector to prevent silent failures. - */ -async function fileExists(filePath, warningCollector) { - try { - await fsPromises.access(filePath, fs.constants.F_OK); - return true; - } - catch (error) { - // ENOENT means file doesn't exist - this is expected, not an error - if (error.code === 'ENOENT') { - return false; - } - // Capture actual error for debugging - filesystem errors (EACCES, EPERM, ELOOP, etc.) - // should not be silently swallowed as they indicate real problems - if (warningCollector) { - warningCollector.capture({ - source: filePath, - category: 'file-access', - subcategory: 'check-error', - message: error instanceof Error ? error.message : String(error), - }); - } - return false; - } -} -/** - * Resolve a file path to absolute using the base directory. - * If already absolute, returns as-is. - * Validates that resolved path stays within the base directory to prevent path traversal. - * - * @returns Result with the resolved absolute path, or error if path traversal is detected - */ -function resolveAbsolutePath(filePath, baseDir) { - const resolved = path.isAbsolute(filePath) ? filePath : path.resolve(baseDir, filePath); - const normalizedBase = path.resolve(baseDir); - // Ensure resolved path is within base directory (prevent path traversal) - if (!resolved.startsWith(normalizedBase + path.sep) && resolved !== normalizedBase) { - return R.err(new Error(`Path traversal detected: ${filePath} escapes base directory`)); - } - return R.ok(resolved); -} -// ============================================================================= -// Extraction Helpers -// ============================================================================= -/** - * Collect all rules from partitioned decision content into a single array. - * Helper to avoid duplicating array spread across multiple locations. - */ -function collectAllRules(rules) { - return [...rules.context, ...rules.decision, ...rules.consequences, ...rules.other]; -} -/** - * Extract content from THIS DECISION (the current decision document) - */ -export function extractFromDecision(options, sourceMapping) { - const { decisionContent } = options; - const selfRef = parseSelfReference(sourceMapping.sourceFile); - if (!selfRef) { - return R.err(new Error(`Not a valid self-reference: ${sourceMapping.sourceFile}`)); - } - let content = ''; - let docStrings; - switch (selfRef.type) { - case 'document': { - // Extract based on extraction method - const method = normalizeExtractionMethod(sourceMapping.extractionMethod); - if (method === 'DECISION_RULE_DESCRIPTION') { - // Return all rule descriptions combined - const allRules = collectAllRules(decisionContent.rules); - content = allRules.map((r) => r.description).join('\n\n'); - } - else if (method === 'FENCED_CODE_BLOCK') { - // Return DocStrings as code blocks - docStrings = decisionContent.docStrings; - content = docStrings - .map((ds) => `\`\`\`${ds.language}\n${ds.content}\n\`\`\``) - .join('\n\n'); - } - else { - // Default: return feature description - content = decisionContent.description; - } - break; - } - case 'rule': { - // Find and extract specific rule by name - const ruleName = selfRef.name; - if (!ruleName) { - return R.err(new Error('Self-reference rule name is missing')); - } - // Search in all rule partitions - const rule = findRuleByName(collectAllRules(decisionContent.rules), ruleName); - if (!rule) { - return R.err(new Error(`Rule not found: ${ruleName}`)); - } - content = rule.description; - docStrings = extractDocStrings(content); - break; - } - case 'docstring': { - // Extract all DocStrings from the decision - docStrings = decisionContent.docStrings; - content = docStrings.map((ds) => `\`\`\`${ds.language}\n${ds.content}\n\`\`\``).join('\n\n'); - break; - } - } - const section = { - section: sourceMapping.section, - sourceFile: sourceMapping.sourceFile, - extractionMethod: sourceMapping.extractionMethod, - content, - }; - if (docStrings && docStrings.length > 0) { - section.docStrings = docStrings; - } - return R.ok(section); -} -/** - * Extract shapes from a TypeScript file using @extract-shapes - */ -export async function extractFromTypeScript(filePath, options, sourceMapping) { - const pathResult = resolveAbsolutePath(filePath, options.baseDir); - if (!pathResult.ok) { - return R.err(pathResult.error); - } - const absolutePath = pathResult.value; - const fileResult = await readFile(absolutePath, options.fileCache); - if (!fileResult.ok) { - return R.err(fileResult.error); - } - const sourceCode = fileResult.value; - const method = normalizeExtractionMethod(sourceMapping.extractionMethod); - let content = ''; - let shapes; - if (method === 'EXTRACT_SHAPES') { - // Look for @libar-docs-extract-shapes tag in the file - const extractShapesMatch = /@libar-docs-extract-shapes\s+(.+?)(?:\n|$)/i.exec(sourceCode); - if (extractShapesMatch?.[1]) { - const shapeNames = extractShapesMatch[1] - .split(',') - .map((s) => s.trim()) - .filter(Boolean); - const extractResult = extractShapes(sourceCode, shapeNames); - if (!extractResult.ok) { - return R.err(extractResult.error); - } - const result = extractResult.value; - shapes = [...result.shapes]; // Convert readonly to mutable - content = renderShapesAsMarkdown(result.shapes, { includeJsDoc: true }); - // Surface extraction warnings via warning collector - if (options.warningCollector) { - // Forward any extraction warnings - for (const warning of result.warnings) { - options.warningCollector.capture({ - source: filePath, - category: 'extraction', - subcategory: 'shape', - message: warning, - }); - } - // Warn about shapes not found in file - for (const name of result.notFound) { - options.warningCollector.capture({ - source: filePath, - category: 'extraction', - subcategory: 'shape-not-found', - message: `Shape '${name}' not found in file`, - }); - } - // Warn about imported shapes (should use source file instead) - for (const name of result.imported) { - options.warningCollector.capture({ - source: filePath, - category: 'extraction', - subcategory: 'shape-imported', - message: `Shape '${name}' is imported, not defined in this file. Add @libar-docs-extract-shapes to the source file instead.`, - }); - } - // Warn about re-exported shapes with source module info - for (const reExport of result.reExported) { - const typeOnlyNote = reExport.typeOnly ? ' (type-only)' : ''; - options.warningCollector.capture({ - source: filePath, - category: 'extraction', - subcategory: 'shape-re-exported', - message: `Shape '${reExport.name}' is re-exported${typeOnlyNote} from '${reExport.sourceModule}'. Add @libar-docs-extract-shapes to ${reExport.sourceModule} instead.`, - }); - } - } - } - else { - // No @extract-shapes tag found - extract all exported types - // This is a fallback for files without explicit shape tags - return R.err(new Error(`No @libar-docs-extract-shapes tag found in ${filePath}`)); - } - } - else if (method === 'JSDOC_SECTION') { - // Extract JSDoc markdown from the file's main JSDoc block - const jsDocMatch = /\/\*\*\s*\n([\s\S]*?)\*\//m.exec(sourceCode); - if (jsDocMatch?.[1]) { - // First, strip * prefix from all lines to get clean markdown - const cleanedContent = jsDocMatch[1].replace(/^\s*\*\s?/gm, '').trim(); - // Extract markdown content after ## header (stop at @tags) - // Pattern: Find ## header, capture everything until @tag line or end - const markdownMatch = /##\s+.+?\n([\s\S]*?)(?=\n\s*@|\n*$)/m.exec(cleanedContent); - if (markdownMatch?.[1]) { - content = markdownMatch[1].trim(); - } - else { - // Fallback: use everything after first ## header if no @tags found - const headerStart = cleanedContent.indexOf('##'); - if (headerStart !== -1) { - const afterHeader = cleanedContent.slice(headerStart); - const firstNewline = afterHeader.indexOf('\n'); - if (firstNewline !== -1) { - content = afterHeader.slice(firstNewline + 1).trim(); - } - } - } - // Warn if JSDoc block was found but extraction produced empty content - if (!content && options.warningCollector) { - options.warningCollector.capture({ - source: filePath, - category: 'extraction', - subcategory: 'jsdoc-empty', - message: `JSDoc block found but no markdown content extracted. Expected ## header followed by content. JSDoc starts with: "${cleanedContent.slice(0, 50)}..."`, - }); - } - } - } - else if (method === 'CREATE_VIOLATION_PATTERNS') { - // Extract error message patterns from createViolation() calls - const violationPattern = /createViolation\s*\(\s*['"`]([^'"`]+)['"`]/g; - const violations = []; - let match; - while ((match = violationPattern.exec(sourceCode)) !== null) { - if (match[1]) { - violations.push(match[1]); - } - } - content = - violations.length > 0 - ? `| Error Code |\n|---|\n${violations.map((v) => `| ${v} |`).join('\n')}` - : ''; - } - const result = { - section: sourceMapping.section, - sourceFile: sourceMapping.sourceFile, - extractionMethod: sourceMapping.extractionMethod, - content, - }; - if (shapes && shapes.length > 0) { - result.shapes = shapes; - } - return R.ok(result); -} -/** - * Extract Rule blocks or Scenario Outline Examples from a behavior spec - */ -export async function extractFromBehaviorSpec(filePath, options, sourceMapping) { - const pathResult = resolveAbsolutePath(filePath, options.baseDir); - if (!pathResult.ok) { - return R.err(pathResult.error); - } - const absolutePath = pathResult.value; - const fileResult = await readFile(absolutePath, options.fileCache); - if (!fileResult.ok) { - return R.err(fileResult.error); - } - const parseResult = parseFeatureFile(fileResult.value, absolutePath); - if (!parseResult.ok) { - return R.err(new Error(`Failed to parse ${absolutePath}: ${parseResult.error.error.message}`)); - } - const parsed = parseResult.value; - const method = normalizeExtractionMethod(sourceMapping.extractionMethod); - let content = ''; - if (method === 'RULE_BLOCKS') { - // Extract Rule: blocks with names and descriptions - if (parsed.rules && parsed.rules.length > 0) { - content = extractRuleBlocksContent(parsed.rules); - } - } - else if (method === 'SCENARIO_OUTLINE_EXAMPLES') { - // Extract Examples tables from Scenario Outlines, filtered by section name - content = extractScenarioOutlineExamples(parsed.scenarios, sourceMapping.section); - } - return R.ok({ - section: sourceMapping.section, - sourceFile: sourceMapping.sourceFile, - extractionMethod: sourceMapping.extractionMethod, - content, - }); -} -/** - * Format Rule blocks as markdown content - */ -function extractRuleBlocksContent(rules) { - const lines = []; - for (const rule of rules) { - lines.push(`### ${rule.name}`); - if (rule.description) { - lines.push(''); - lines.push(rule.description); - } - lines.push(''); - } - return lines.join('\n').trim(); -} -/** - * Check if scenario name matches section name using keyword overlap - * - * Uses case-insensitive keyword matching to find relevant scenarios. - * For example, "Protection Levels" matches "Protection level from status". - * - * @param sectionName - Section name from source mapping - * @param scenarioName - Scenario name from feature file - * @returns True if there's sufficient keyword overlap - */ -function scenarioMatchesSection(sectionName, scenarioName) { - // Basic stemming: remove common English suffixes - const stem = (word) => { - // Order matters: check longer suffixes first - if (word.endsWith('ies') && word.length > 4) - return word.slice(0, -3) + 'y'; - if (word.endsWith('es') && word.length > 3) - return word.slice(0, -2); - if (word.endsWith('s') && word.length > 3) - return word.slice(0, -1); - if (word.endsWith('ing') && word.length > 5) - return word.slice(0, -3); - if (word.endsWith('ed') && word.length > 4) - return word.slice(0, -2); - return word; - }; - // Normalize: lowercase, extract significant words (3+ chars), apply stemming - const normalizeWords = (text) => new Set(text - .toLowerCase() - .split(/[^a-z]+/) - .filter((word) => word.length >= 3) - .map(stem)); - const sectionWords = normalizeWords(sectionName); - const scenarioWords = normalizeWords(scenarioName); - // Count matching words - let matches = 0; - for (const word of sectionWords) { - if (scenarioWords.has(word)) { - matches++; - } - } - // Require at least 1 matching word (fuzzy match) - return matches >= 1; -} -/** - * Extract Examples tables from Scenario Outlines as markdown tables - * - * Uses the `examples` property on Scenario Outline nodes (not step DataTables). - * Filters scenarios by matching section name to scenario name using keyword overlap. - * This prevents duplicate content when multiple sections map to the same file. - * - * @param scenarios - All scenarios from the feature file - * @param sectionName - Section name from source mapping for filtering - * @returns Markdown tables from matching Scenario Outline Examples - */ -function extractScenarioOutlineExamples(scenarios, sectionName) { - const tables = []; - for (const scenario of scenarios) { - // Skip scenarios that don't match the section name - if (!scenarioMatchesSection(sectionName, scenario.name)) { - continue; - } - // Check if scenario has Examples tables (Scenario Outline) - if (scenario.examples && scenario.examples.length > 0) { - for (const example of scenario.examples) { - const { headers, rows } = example; - if (headers.length > 0 && rows.length > 0) { - // Build markdown table - const headerLine = `| ${headers.join(' | ')} |`; - const separatorLine = `| ${headers.map(() => '---').join(' | ')} |`; - const dataLines = rows.map((row) => `| ${headers.map((h) => row[h] ?? '').join(' | ')} |`); - tables.push([headerLine, separatorLine, ...dataLines].join('\n')); - } - } - } - } - return tables.join('\n\n'); -} -// ============================================================================= -// Main Entry Point -// ============================================================================= -/** - * Execute source mapping to aggregate content from multiple sources - * - * Takes source mapping entries from a decision document and extracts content - * from each referenced source file. Handles self-references (THIS DECISION), - * TypeScript files (@extract-shapes, JSDoc), and behavior specs (Rule blocks, - * Scenario Outline Examples). - * - * @param sourceMappings - Source mapping entries from decision document - * @param options - Mapper options including base directory and decision content - * @returns Aggregated content with sections in mapping order - * - * @example - * ```typescript - * const result = await executeSourceMapping(decisionContent.sourceMappings, { - * baseDir: process.cwd(), - * decisionDocPath: 'specs/my-decision.feature', - * decisionContent: decisionContent, - * detailLevel: 'detailed', - * }); - * - * if (result.success) { - * for (const section of result.sections) { - * console.log(`## ${section.section}\n${section.content}`); - * } - * } - * ``` - */ -export async function executeSourceMapping(sourceMappings, options) { - const sections = []; - const warnings = []; - for (const mapping of sourceMappings) { - let result; - // Check file existence for non-self-reference sources - if (!isSelfReference(mapping.sourceFile)) { - const pathResult = resolveAbsolutePath(mapping.sourceFile, options.baseDir); - if (!pathResult.ok) { - warnings.push({ - severity: 'warning', - message: pathResult.error.message, - sourceMapping: mapping, - }); - continue; - } - if (!(await fileExists(pathResult.value, options.warningCollector))) { - warnings.push({ - severity: 'warning', - message: `Source file not found: ${mapping.sourceFile}`, - sourceMapping: mapping, - }); - continue; - } - } - // Dispatch based on source file type - if (isSelfReference(mapping.sourceFile)) { - // Extract from current decision document (sync - no file I/O) - result = extractFromDecision(options, mapping); - } - else if (mapping.sourceFile.endsWith('.ts')) { - // TypeScript file - result = await extractFromTypeScript(mapping.sourceFile, options, mapping); - } - else if (mapping.sourceFile.endsWith('.feature')) { - // Gherkin behavior spec - result = await extractFromBehaviorSpec(mapping.sourceFile, options, mapping); - } - else { - // Unknown file type - warnings.push({ - severity: 'warning', - message: `Unknown source file type: ${mapping.sourceFile}`, - sourceMapping: mapping, - }); - continue; - } - if (result.ok) { - // Check for empty content and add info warning - if (!result.value.content || result.value.content.trim() === '') { - warnings.push({ - severity: 'info', - message: `No content extracted from ${mapping.sourceFile} using ${mapping.extractionMethod}`, - sourceMapping: mapping, - }); - } - sections.push(result.value); - } - else { - warnings.push({ - severity: 'warning', - message: result.error.message, - sourceMapping: mapping, - }); - } - } - return { - sections, - warnings, - success: sections.length > 0, - }; -} -/** - * Validate source mappings before execution - * - * Checks all referenced files exist and extraction methods are valid. - * Does not perform actual extraction. - * - * @param sourceMappings - Source mapping entries to validate - * @param options - Mapper options (only baseDir is required) - * @returns Array of validation warnings - */ -export async function validateSourceMappings(sourceMappings, options) { - const warnings = []; - for (const mapping of sourceMappings) { - // Self-references don't need file validation - if (isSelfReference(mapping.sourceFile)) { - continue; - } - // Check file exists - const pathResult = resolveAbsolutePath(mapping.sourceFile, options.baseDir); - if (!pathResult.ok) { - warnings.push({ - severity: 'warning', - message: pathResult.error.message, - sourceMapping: mapping, - }); - continue; - } - if (!(await fileExists(pathResult.value))) { - warnings.push({ - severity: 'warning', - message: `Source file not found: ${mapping.sourceFile}`, - sourceMapping: mapping, - }); - continue; - } - // Validate extraction method is known - const method = normalizeExtractionMethod(mapping.extractionMethod); - if (method === 'unknown') { - warnings.push({ - severity: 'info', - message: `Unknown extraction method: ${mapping.extractionMethod}`, - sourceMapping: mapping, - }); - } - } - return warnings; -} -//# sourceMappingURL=source-mapper.js.map \ No newline at end of file diff --git a/dist/generators/source-mapper.js.map b/dist/generators/source-mapper.js.map deleted file mode 100644 index a771ba01..00000000 --- a/dist/generators/source-mapper.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"source-mapper.js","sourceRoot":"","sources":["../../src/generators/source-mapper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,UAAU,MAAM,kBAAkB,CAAC;AAC/C,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAKL,eAAe,EACf,kBAAkB,EAClB,yBAAyB,EACzB,cAAc,EACd,iBAAiB,GAClB,MAAM,sCAAsC,CAAC;AAE9C,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAEzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAmFpE,gFAAgF;AAChF,iBAAiB;AACj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C,UAAU,EAAE;gBACvD,aAAa,EAAE,OAAO;aACvB,CAAC,CAAC;YACH,SAAS;QACX,CAAC;QAED,sCAAsC;QACtC,MAAM,MAAM,GAAG,yBAAyB,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;QACnE,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YACzB,QAAQ,CAAC,IAAI,CAAC;gBACZ,QAAQ,EAAE,MAAM;gBAChB,OAAO,EAAE,8BAA8B,OAAO,CAAC,gBAAgB,EAAE;gBACjE,aAAa,EAAE,OAAO;aACvB,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"} \ No newline at end of file diff --git a/dist/generators/source-mapping-validator.d.ts b/dist/generators/source-mapping-validator.d.ts deleted file mode 100644 index 1496d904..00000000 --- a/dist/generators/source-mapping-validator.d.ts +++ /dev/null @@ -1,118 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern SourceMappingValidator - * @libar-docs-status completed - * - * ## Source Mapping Validator - Pre-flight Validation - * - * Performs pre-flight checks on source mapping tables before extraction begins. - * Validates file existence, extraction method validity, and format correctness - * to fail fast with clear errors rather than producing incomplete output. - * - * ### When to Use - * - * - Before document generation from source mappings - * - When validating decision document source tables - * - When checking extraction method compatibility - * - * ### Validation Checks - * - * 1. **File existence**: Source files must exist and be files (not directories) - * 2. **Method validity**: Extraction methods must be recognized - * 3. **Compatibility**: Extraction methods must match file types - * 4. **Table format**: Required columns must be present - */ -import { Result } from '../types/result.js'; -import { type SourceMappingEntry } from '../renderable/codecs/decision-doc.js'; -import type { Warning, WarningCollector } from './warning-collector.js'; -/** - * Validation error with context - */ -export interface ValidationError { - /** Error message describing the issue */ - message: string; - /** The source mapping row that caused the error (if applicable) */ - row?: SourceMappingEntry; - /** Suggested alternatives or fixes */ - suggestions?: string[]; -} -/** - * Complete validation result - */ -export interface ValidationResult { - /** Whether validation passed (no errors) */ - isValid: boolean; - /** Validation errors (validation fails if any exist) */ - errors: ValidationError[]; - /** Non-fatal warnings */ - warnings: Warning[]; -} -/** - * Options for the validator - */ -export interface ValidatorOptions { - /** Base directory for resolving relative paths */ - baseDir: string; - /** Optional warning collector for non-fatal issues (reserved for future use) */ - warningCollector?: WarningCollector; -} -/** - * Valid extraction methods for reference - */ -export declare const VALID_EXTRACTION_METHODS: readonly string[]; -/** - * Validate that a source file exists - * - * @param mapping - The source mapping entry to validate - * @param baseDir - Base directory for resolving relative paths - * @returns Result with void on success, ValidationError on failure - */ -export declare function validateFileExists(mapping: SourceMappingEntry, baseDir: string): Result; -/** - * Validate that an extraction method is valid - * - * @param method - The extraction method string - * @returns Result with normalized method on success, ValidationError on failure - */ -export declare function validateExtractionMethod(method: string): Result; -/** - * Validate that an extraction method is compatible with the file type - * - * @param mapping - The source mapping entry to validate - * @returns Result with void on success, ValidationError on failure - */ -export declare function validateMethodFileCompatibility(mapping: SourceMappingEntry): Result; -/** - * Validate table format has required columns - * - * @param columns - Array of column names from the table header - * @returns Result with column mapping on success, ValidationError on failure - */ -export declare function validateTableFormat(columns: string[]): Result, ValidationError>; -/** - * Validate a complete source mapping table - * - * Performs all validation checks and collects all errors rather than - * stopping at the first one. - * - * @param mappings - Array of source mapping entries to validate - * @param options - Validation options including base directory - * @returns ValidationResult with all errors and warnings - * - * @example - * ```typescript - * const result = validateSourceMappingTable(mappings, { - * baseDir: process.cwd(), - * warningCollector: createWarningCollector() - * }); - * - * if (!result.isValid) { - * for (const error of result.errors) { - * console.error(error.message); - * } - * } - * ``` - */ -export declare function validateSourceMappingTable(mappings: readonly SourceMappingEntry[], options: ValidatorOptions): ValidationResult; -//# sourceMappingURL=source-mapping-validator.d.ts.map \ No newline at end of file diff --git a/dist/generators/source-mapping-validator.d.ts.map b/dist/generators/source-mapping-validator.d.ts.map deleted file mode 100644 index e47777a6..00000000 --- a/dist/generators/source-mapping-validator.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"source-mapping-validator.d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C,IAAI,EAAE,eAAe,CAAC,CAoD/B;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,MAAM,EAAE,GAChB,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,eAAe,CAAC,CAsBjD;AA0CD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,SAAS,kBAAkB,EAAE,EACvC,OAAO,EAAE,gBAAgB,GACxB,gBAAgB,CAmClB"} \ No newline at end of file diff --git a/dist/generators/source-mapping-validator.js b/dist/generators/source-mapping-validator.js deleted file mode 100644 index 9f39895a..00000000 --- a/dist/generators/source-mapping-validator.js +++ /dev/null @@ -1,334 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern SourceMappingValidator - * @libar-docs-status completed - * - * ## Source Mapping Validator - Pre-flight Validation - * - * Performs pre-flight checks on source mapping tables before extraction begins. - * Validates file existence, extraction method validity, and format correctness - * to fail fast with clear errors rather than producing incomplete output. - * - * ### When to Use - * - * - Before document generation from source mappings - * - When validating decision document source tables - * - When checking extraction method compatibility - * - * ### Validation Checks - * - * 1. **File existence**: Source files must exist and be files (not directories) - * 2. **Method validity**: Extraction methods must be recognized - * 3. **Compatibility**: Extraction methods must match file types - * 4. **Table format**: Required columns must be present - */ -import * as fs from 'node:fs'; -import * as path from 'node:path'; -import { Result } from '../types/result.js'; -import { isSelfReference, normalizeExtractionMethod, EXTRACTION_METHODS, } from '../renderable/codecs/decision-doc.js'; -// ============================================================================= -// Constants -// ============================================================================= -/** - * Valid extraction methods for reference - */ -export const VALID_EXTRACTION_METHODS = Object.values(EXTRACTION_METHODS); -/** - * Methods that only work with TypeScript files - */ -const TYPESCRIPT_ONLY_METHODS = new Set([ - '@extract-shapes tag', - 'JSDoc section', - 'createViolation() patterns', -]); -/** - * Methods that only work with Gherkin feature files - */ -const GHERKIN_ONLY_METHODS = new Set(['Rule blocks', 'Scenario Outline Examples']); -/** - * Methods that only work with self-reference (THIS DECISION) - */ -const SELF_REFERENCE_ONLY_METHODS = new Set(['Decision rule description', 'Fenced code block']); -/** - * Required columns for source mapping tables - */ -const REQUIRED_COLUMNS = ['Section', 'Source File', 'Extraction Method']; -/** - * Column name aliases - */ -const COLUMN_ALIASES = { - Source: 'Source File', - How: 'Extraction Method', - Extraction: 'Extraction Method', -}; -// ============================================================================= -// Individual Validators -// ============================================================================= -/** - * Validate that a source file exists - * - * @param mapping - The source mapping entry to validate - * @param baseDir - Base directory for resolving relative paths - * @returns Result with void on success, ValidationError on failure - */ -export function validateFileExists(mapping, baseDir) { - // Skip validation for self-references (THIS DECISION markers) - if (isSelfReference(mapping.sourceFile)) { - return Result.ok(undefined); - } - const fullPath = path.resolve(baseDir, mapping.sourceFile); - // Check if path exists - if (!fs.existsSync(fullPath)) { - return Result.err({ - message: `File not found: ${mapping.sourceFile}`, - row: mapping, - }); - } - // Check if it's a file (not a directory) - try { - const stats = fs.statSync(fullPath); - if (stats.isDirectory()) { - return Result.err({ - message: `Expected file, got directory: ${mapping.sourceFile}`, - row: mapping, - }); - } - } - catch (error) { - // Capture the actual error for better debugging (permission denied, etc.) - const errorMessage = error instanceof Error ? error.message : 'Unknown error'; - return Result.err({ - message: `Unable to read file: ${mapping.sourceFile} (${errorMessage})`, - row: mapping, - }); - } - return Result.ok(undefined); -} -/** - * Additional aliases for extraction methods - * Maps normalized (lowercase, underscore-to-space) forms to canonical method keys - */ -const METHOD_ALIASES = { - 'rule blocks': 'RULE_BLOCKS', - rule_blocks: 'RULE_BLOCKS', - ruleblocks: 'RULE_BLOCKS', - '@extract-shapes tag': 'EXTRACT_SHAPES', - 'extract-shapes': 'EXTRACT_SHAPES', - 'extract shapes': 'EXTRACT_SHAPES', - 'decision rule description': 'DECISION_RULE_DESCRIPTION', - decision_rule_description: 'DECISION_RULE_DESCRIPTION', - 'jsdoc section': 'JSDOC_SECTION', - jsdoc_section: 'JSDOC_SECTION', - 'createviolation() patterns': 'CREATE_VIOLATION_PATTERNS', - 'createviolation patterns': 'CREATE_VIOLATION_PATTERNS', - create_violation_patterns: 'CREATE_VIOLATION_PATTERNS', - 'fenced code block': 'FENCED_CODE_BLOCK', - fenced_code_block: 'FENCED_CODE_BLOCK', - 'scenario outline examples': 'SCENARIO_OUTLINE_EXAMPLES', - scenario_outline_examples: 'SCENARIO_OUTLINE_EXAMPLES', -}; -/** - * Normalize a method string by lowercasing and replacing underscores with spaces - */ -function normalizeMethodString(method) { - return method.toLowerCase().trim().replace(/_/g, ' '); -} -/** - * Validate that an extraction method is valid - * - * @param method - The extraction method string - * @returns Result with normalized method on success, ValidationError on failure - */ -export function validateExtractionMethod(method) { - // Trim whitespace before validation to handle leading/trailing spaces - const trimmedMethod = method.trim(); - // Check for empty method - if (trimmedMethod.length === 0) { - return Result.err({ - message: 'Extraction method is required', - }); - } - // First, try using the built-in normalization - const normalizedKey = normalizeExtractionMethod(trimmedMethod); - if (normalizedKey !== 'unknown') { - // Return the canonical form of the method - return Result.ok(EXTRACTION_METHODS[normalizedKey]); - } - // Try our extended aliases - const normalizedString = normalizeMethodString(trimmedMethod); - const aliasKey = METHOD_ALIASES[normalizedString]; - if (aliasKey) { - return Result.ok(EXTRACTION_METHODS[aliasKey]); - } - // Check if it's close to a known method for suggestions - const suggestions = findSimilarMethods(trimmedMethod); - return Result.err({ - message: `Unknown extraction method: ${trimmedMethod}`, - suggestions, - }); -} -/** - * Validate that an extraction method is compatible with the file type - * - * @param mapping - The source mapping entry to validate - * @returns Result with void on success, ValidationError on failure - */ -export function validateMethodFileCompatibility(mapping) { - const { sourceFile, extractionMethod } = mapping; - // Skip compatibility check for self-references with self-reference-only methods - if (isSelfReference(sourceFile)) { - // Self-references can use any method, but primarily use self-reference methods - return Result.ok(undefined); - } - // Normalize the method for comparison - const normalizedKey = normalizeExtractionMethod(extractionMethod); - if (normalizedKey === 'unknown') { - // Method validation will catch this - return Result.ok(undefined); - } - const normalizedMethod = EXTRACTION_METHODS[normalizedKey]; - const ext = path.extname(sourceFile).toLowerCase(); - // Check TypeScript-only methods against feature files - if (TYPESCRIPT_ONLY_METHODS.has(normalizedMethod)) { - if (ext === '.feature') { - const alternatives = Array.from(GHERKIN_ONLY_METHODS); - return Result.err({ - message: `Method "${normalizedMethod}" cannot be used with .feature files`, - row: mapping, - suggestions: alternatives, - }); - } - } - // Check Gherkin-only methods against TypeScript files - if (GHERKIN_ONLY_METHODS.has(normalizedMethod)) { - if (ext === '.ts' || ext === '.tsx' || ext === '.js' || ext === '.jsx') { - return Result.err({ - message: `Method "${normalizedMethod}" requires .feature file`, - row: mapping, - }); - } - } - // Check self-reference-only methods against actual files - if (SELF_REFERENCE_ONLY_METHODS.has(normalizedMethod)) { - if (!isSelfReference(sourceFile)) { - return Result.err({ - message: `Method "${normalizedMethod}" can only be used with THIS DECISION`, - row: mapping, - }); - } - } - return Result.ok(undefined); -} -/** - * Validate table format has required columns - * - * @param columns - Array of column names from the table header - * @returns Result with column mapping on success, ValidationError on failure - */ -export function validateTableFormat(columns) { - const columnMapping = {}; - const normalizedColumns = new Set(); - // Process each column, applying aliases - for (const col of columns) { - const trimmed = col.trim(); - const mapped = COLUMN_ALIASES[trimmed] ?? trimmed; - columnMapping[trimmed] = mapped; - normalizedColumns.add(mapped); - } - // Check for required columns - for (const required of REQUIRED_COLUMNS) { - if (!normalizedColumns.has(required)) { - return Result.err({ - message: `Missing required column: ${required}`, - }); - } - } - return Result.ok(columnMapping); -} -// ============================================================================= -// Helper Functions -// ============================================================================= -/** - * Find extraction methods similar to the given string - */ -function findSimilarMethods(method) { - const methodLower = method.toLowerCase(); - const suggestions = []; - // Check for partial matches - for (const validMethod of VALID_EXTRACTION_METHODS) { - const validLower = validMethod.toLowerCase(); - // Check if any word in the valid method appears in the input - const validWords = validLower.split(/[\s-]+/); - const inputWords = methodLower.split(/[\s-]+/); - const hasCommonWord = validWords.some((vw) => inputWords.some((iw) => vw.includes(iw) || iw.includes(vw)) && vw.length > 2); - if (hasCommonWord) { - suggestions.push(validMethod); - } - } - // If no suggestions found, provide the most common ones - if (suggestions.length === 0) { - suggestions.push('@extract-shapes tag', 'Rule blocks'); - } - return suggestions; -} -// ============================================================================= -// Main Validation Function -// ============================================================================= -/** - * Validate a complete source mapping table - * - * Performs all validation checks and collects all errors rather than - * stopping at the first one. - * - * @param mappings - Array of source mapping entries to validate - * @param options - Validation options including base directory - * @returns ValidationResult with all errors and warnings - * - * @example - * ```typescript - * const result = validateSourceMappingTable(mappings, { - * baseDir: process.cwd(), - * warningCollector: createWarningCollector() - * }); - * - * if (!result.isValid) { - * for (const error of result.errors) { - * console.error(error.message); - * } - * } - * ``` - */ -export function validateSourceMappingTable(mappings, options) { - const errors = []; - for (const mapping of mappings) { - // 1. Validate file existence - const fileResult = validateFileExists(mapping, options.baseDir); - if (!fileResult.ok) { - errors.push(fileResult.error); - } - // 2. Validate extraction method - const methodResult = validateExtractionMethod(mapping.extractionMethod); - if (!methodResult.ok) { - errors.push({ - ...methodResult.error, - row: mapping, - }); - } - // 3. Validate method-file compatibility (only if method is valid) - if (methodResult.ok) { - const compatResult = validateMethodFileCompatibility(mapping); - if (!compatResult.ok) { - errors.push(compatResult.error); - } - } - } - // Note: Validation is pass/fail per row, no warnings are generated. - // The warnings array is kept in the interface for future extensibility. - return { - isValid: errors.length === 0, - errors, - warnings: [], - }; -} -//# sourceMappingURL=source-mapping-validator.js.map \ No newline at end of file diff --git a/dist/generators/source-mapping-validator.js.map b/dist/generators/source-mapping-validator.js.map deleted file mode 100644 index dea60ce6..00000000 --- a/dist/generators/source-mapping-validator.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"source-mapping-validator.js","sourceRoot":"","sources":["../../src/generators/source-mapping-validator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AA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QAChE,IAAI,CAAC,UAAU,CAAC,EAAE,EAAE,CAAC;YACnB,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QAChC,CAAC;QAED,gCAAgC;QAChC,MAAM,YAAY,GAAG,wBAAwB,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;QACxE,IAAI,CAAC,YAAY,CAAC,EAAE,EAAE,CAAC;YACrB,MAAM,CAAC,IAAI,CAAC;gBACV,GAAG,YAAY,CAAC,KAAK;gBACrB,GAAG,EAAE,OAAO;aACb,CAAC,CAAC;QACL,CAAC;QAED,kEAAkE;QAClE,IAAI,YAAY,CAAC,EAAE,EAAE,CAAC;YACpB,MAAM,YAAY,GAAG,+BAA+B,CAAC,OAAO,CAAC,CAAC;YAC9D,IAAI,CAAC,YAAY,CAAC,EAAE,EAAE,CAAC;gBACrB,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;YAClC,CAAC;QACH,CAAC;IACH,CAAC;IAED,oEAAoE;IACpE,wEAAwE;IACxE,OAAO;QACL,OAAO,EAAE,MAAM,CAAC,MAAM,KAAK,CAAC;QAC5B,MAAM;QACN,QAAQ,EAAE,EAAE;KACb,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/dist/generators/types.d.ts b/dist/generators/types.d.ts deleted file mode 100644 index d7ba4074..00000000 --- a/dist/generators/types.d.ts +++ /dev/null @@ -1,104 +0,0 @@ -/** - * @libar-docs - */ -import type { ExtractedPattern, TagRegistry } from '../validation-schemas'; -import type { LoadedWorkflow } from '../validation-schemas/workflow-config.js'; -import type { RuntimeMasterDataset } from './pipeline/index.js'; -import type { CodecOptions } from '../renderable/generate.js'; -/** - * @libar-docs-generator - * @libar-docs-pattern GeneratorTypes - * @libar-docs-status completed - * @libar-docs-used-by GeneratorRegistry, GeneratorFactory, Orchestrator, SectionRegistry - * @libar-docs-extract-shapes DocumentGenerator, GeneratorContext, GeneratorOutput - * - * ## GeneratorTypes - Pluggable Document Generation Interface - * - * Minimal interface for pluggable generators that produce documentation from patterns. - * Both JSON-configured built-in generators and TypeScript custom generators implement this. - * - * ### When to Use - * - * - Creating a new document format (ADRs, planning docs, API specs) - * - Building custom generators in TypeScript - * - Integrating with the unified CLI - * - * ### Key Concepts - * - * - **Generator:** Transforms patterns → document files - * - **Context:** Runtime environment (base paths, registries, scenarios) - * - **Output:** Map of file paths → content - */ -export interface DocumentGenerator { - /** Unique generator name (e.g., "patterns", "adrs", "planning") */ - readonly name: string; - /** Optional description shown in --list-generators */ - readonly description?: string; - /** - * Generate documentation from extracted patterns. - * - * @param patterns - Extracted patterns from source code - * @param context - Runtime context (paths, registry, scenario map) - * @returns Generated files with paths relative to outputDir - */ - generate(patterns: readonly ExtractedPattern[], context: GeneratorContext): Promise; -} -/** - * Runtime context provided to generators. - */ -export interface GeneratorContext { - /** Base directory for resolving relative paths */ - readonly baseDir: string; - /** Output directory for generated files */ - readonly outputDir: string; - /** Tag registry with category/aggregation definitions */ - readonly registry: TagRegistry; - /** Optional workflow configuration for status handling */ - readonly workflow?: LoadedWorkflow; - /** - * Pre-computed pattern views for efficient access. - * - * Contains patterns grouped by status, phase, quarter, category, and source, - * computed in a single pass. Sections should use these pre-computed views - * instead of filtering the raw patterns array. - */ - readonly masterDataset?: RuntimeMasterDataset; - /** - * Optional codec-specific options for document generation. - * - * Used to pass runtime configuration (e.g., changedFiles for PR changes) - * through the CLI → Orchestrator → Generator → Codec pipeline. - * - * @example - * ```typescript - * const context: GeneratorContext = { - * // ... other fields - * codecOptions: { - * "pr-changes": { changedFiles: ["src/foo.ts"], releaseFilter: "v0.2.0" } - * } - * }; - * ``` - */ - readonly codecOptions?: CodecOptions; -} -/** - * Output from generator execution. - */ -export interface GeneratorOutput { - /** Files to write (path relative to outputDir) */ - readonly files: readonly OutputFile[]; - /** Files to delete for cleanup (path relative to outputDir) */ - readonly filesToDelete?: readonly string[]; - /** Optional metadata for registry.json or other purposes */ - readonly metadata?: Record; -} -/** - * Single output file. - */ -export interface OutputFile { - /** Path relative to outputDir (e.g., "PATTERNS.md", "patterns/core.md") */ - readonly path: string; - /** File content as string */ - readonly content: string; -} -//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/dist/generators/types.d.ts.map b/dist/generators/types.d.ts.map deleted file mode 100644 index e36208a2..00000000 --- a/dist/generators/types.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/generators/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC3E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC/E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,WAAW,iBAAiB;IAChC,mEAAmE;IACnE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,sDAAsD;IACtD,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAE9B;;;;;;OAMG;IACH,QAAQ,CACN,QAAQ,EAAE,SAAS,gBAAgB,EAAE,EACrC,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,eAAe,CAAC,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,kDAAkD;IAClD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB,2CAA2C;IAC3C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAE3B,yDAAyD;IACzD,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC;IAE/B,0DAA0D;IAC1D,QAAQ,CAAC,QAAQ,CAAC,EAAE,cAAc,CAAC;IAEnC;;;;;;OAMG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,oBAAoB,CAAC;IAE9C;;;;;;;;;;;;;;;OAeG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,YAAY,CAAC;CACtC;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,kDAAkD;IAClD,QAAQ,CAAC,KAAK,EAAE,SAAS,UAAU,EAAE,CAAC;IAEtC,+DAA+D;IAC/D,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAE3C,4DAA4D;IAC5D,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC7C;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,2EAA2E;IAC3E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,6BAA6B;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B"} \ No newline at end of file diff --git a/dist/generators/types.js b/dist/generators/types.js deleted file mode 100644 index 034c50ee..00000000 --- a/dist/generators/types.js +++ /dev/null @@ -1,5 +0,0 @@ -/** - * @libar-docs - */ -export {}; -//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/dist/generators/types.js.map b/dist/generators/types.js.map deleted file mode 100644 index fbded811..00000000 --- a/dist/generators/types.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/generators/types.ts"],"names":[],"mappings":"AAAA;;GAEG"} \ No newline at end of file diff --git a/dist/generators/warning-collector.d.ts b/dist/generators/warning-collector.d.ts deleted file mode 100644 index e91221a6..00000000 --- a/dist/generators/warning-collector.d.ts +++ /dev/null @@ -1,144 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern WarningCollector - * @libar-docs-status completed - * - * ## Warning Collector - Unified Warning Handling - * - * Provides a unified system for capturing, categorizing, and reporting - * non-fatal issues during document generation. Replaces scattered console.warn - * calls with structured warning handling that integrates with the Result pattern. - * - * ### When to Use - * - * - When generating documentation from source mappings - * - When extracting content from TypeScript or Gherkin files - * - When deduplicating or assembling content sections - * - * ### Key Concepts - * - * - **Warning Categories**: validation, extraction, deduplication, file-access, format - * - **Source Attribution**: Each warning includes source file and optional line number - * - **Aggregation**: Warnings collected across pipeline stages, maintaining insertion order - * - **Formatting**: Console, JSON, and markdown output formats - */ -/** - * Warning category for grouping and filtering - */ -export type WarningCategory = 'validation' | 'extraction' | 'deduplication' | 'file-access' | 'format'; -/** - * A captured warning with source context - */ -export interface Warning { - /** Source file path (e.g., "src/types.ts") */ - source: string; - /** Optional line number within the source file */ - line?: number; - /** Warning category for grouping */ - category: WarningCategory; - /** Optional subcategory for finer-grained classification */ - subcategory?: string; - /** Warning message describing the issue */ - message: string; -} -/** - * Warning collector interface for capturing and querying warnings - */ -export interface WarningCollector { - /** - * Capture a warning - */ - capture(warning: Warning): void; - /** - * Get all captured warnings in insertion order - */ - getAll(): readonly Warning[]; - /** - * Filter warnings by category - */ - filterByCategory(category: WarningCategory): readonly Warning[]; - /** - * Filter warnings by source file - */ - filterBySource(source: string): readonly Warning[]; - /** - * Group warnings by source file - */ - groupBySource(): Map; - /** - * Get summary counts by category - */ - getSummary(): Record; - /** - * Format warnings for console output (with colors) - */ - formatForConsole(): string; - /** - * Format warnings as JSON (machine-readable) - */ - formatAsJson(): string; - /** - * Format warnings as markdown (for documentation) - */ - formatAsMarkdown(): string; - /** - * Check if collector has no warnings - */ - isEmpty(): boolean; - /** - * Get total warning count - */ - count(): number; -} -/** - * Format a warning location string - */ -export declare function formatWarningLocation(warning: Warning): string; -/** - * Create a new warning collector - */ -export declare function createWarningCollector(): WarningCollector; -/** - * A Result that includes warnings alongside the success/error value. - * Warnings are collected regardless of success or failure state. - */ -export type ResultWithWarnings = { - ok: true; - value: T; - warnings: readonly Warning[]; -} | { - ok: false; - error: E; - warnings: readonly Warning[]; -}; -/** - * Utilities for creating ResultWithWarnings values - */ -export declare const ResultWithWarnings: { - /** - * Create a successful result with warnings - */ - ok: (value: T, warnings?: readonly Warning[]) => ResultWithWarnings; - /** - * Create an error result with warnings - */ - err: (error: E, warnings?: readonly Warning[]) => ResultWithWarnings; - /** - * Check if result is successful - */ - isOk: (result: ResultWithWarnings) => result is { - ok: true; - value: T; - warnings: readonly Warning[]; - }; - /** - * Check if result is an error - */ - isError: (result: ResultWithWarnings) => result is { - ok: false; - error: E; - warnings: readonly Warning[]; - }; -}; -//# sourceMappingURL=warning-collector.d.ts.map \ No newline at end of file diff --git a/dist/generators/warning-collector.d.ts.map b/dist/generators/warning-collector.d.ts.map deleted file mode 100644 index 3b7de1f0..00000000 --- a/dist/generators/warning-collector.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"warning-collector.d.ts","sourceRoot":"","sources":["../../src/generators/warning-collector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAMH;;GAEG;AACH,MAAM,MAAM,eAAe,GACvB,YAAY,GACZ,YAAY,GACZ,eAAe,GACf,aAAa,GACb,QAAQ,CAAC;AAEb;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,8CAA8C;IAC9C,MAAM,EAAE,MAAM,CAAC;IAEf,kDAAkD;IAClD,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,oCAAoC;IACpC,QAAQ,EAAE,eAAe,CAAC;IAE1B,4DAA4D;IAC5D,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,2CAA2C;IAC3C,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IAEhC;;OAEG;IACH,MAAM,IAAI,SAAS,OAAO,EAAE,CAAC;IAE7B;;OAEG;IACH,gBAAgB,CAAC,QAAQ,EAAE,eAAe,GAAG,SAAS,OAAO,EAAE,CAAC;IAEhE;;OAEG;IACH,cAAc,CAAC,MAAM,EAAE,MAAM,G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AE,IAAI,CAAC;QAAC,KAAK,EAAE,CAAC,CAAC;QAAC,QAAQ,EAAE,SAAS,OAAO,EAAE,CAAA;KAAE;IAEjE;;OAEG;cACO,CAAC,EAAE,CAAC,UACJ,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAC,KAC/B,MAAM,IAAI;QAAE,EAAE,EAAE,KAAK,CAAC;QAAC,KAAK,EAAE,CAAC,CAAC;QAAC,QAAQ,EAAE,SAAS,OAAO,EAAE,CAAA;KAAE;CACnE,CAAC"} \ No newline at end of file diff --git a/dist/generators/warning-collector.js b/dist/generators/warning-collector.js deleted file mode 100644 index 8a66350c..00000000 --- a/dist/generators/warning-collector.js +++ /dev/null @@ -1,166 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern WarningCollector - * @libar-docs-status completed - * - * ## Warning Collector - Unified Warning Handling - * - * Provides a unified system for capturing, categorizing, and reporting - * non-fatal issues during document generation. Replaces scattered console.warn - * calls with structured warning handling that integrates with the Result pattern. - * - * ### When to Use - * - * - When generating documentation from source mappings - * - When extracting content from TypeScript or Gherkin files - * - When deduplicating or assembling content sections - * - * ### Key Concepts - * - * - **Warning Categories**: validation, extraction, deduplication, file-access, format - * - **Source Attribution**: Each warning includes source file and optional line number - * - **Aggregation**: Warnings collected across pipeline stages, maintaining insertion order - * - **Formatting**: Console, JSON, and markdown output formats - */ -// ============================================================================= -// Helper Functions -// ============================================================================= -/** - * Format a warning location string - */ -export function formatWarningLocation(warning) { - if (warning.line !== undefined) { - return `${warning.source}:${warning.line}`; - } - return warning.source; -} -/** - * ANSI color codes for console output - */ -const ANSI = { - yellow: '\x1b[33m', - reset: '\x1b[0m', -}; -// ============================================================================= -// Implementation -// ============================================================================= -/** - * Create a new warning collector - */ -export function createWarningCollector() { - const warnings = []; - return { - capture(warning) { - warnings.push(warning); - }, - getAll() { - // Return a copy to prevent external mutation of internal state - return [...warnings]; - }, - filterByCategory(category) { - return warnings.filter((w) => w.category === category); - }, - filterBySource(source) { - return warnings.filter((w) => w.source === source); - }, - groupBySource() { - const groups = new Map(); - for (const warning of warnings) { - const existing = groups.get(warning.source); - if (existing) { - existing.push(warning); - } - else { - groups.set(warning.source, [warning]); - } - } - return groups; - }, - getSummary() { - const summary = { - validation: 0, - extraction: 0, - deduplication: 0, - 'file-access': 0, - format: 0, - }; - for (const warning of warnings) { - summary[warning.category]++; - } - return summary; - }, - formatForConsole() { - if (warnings.length === 0) { - return ''; - } - return warnings - .map((w) => { - const location = formatWarningLocation(w); - return `${ANSI.yellow}\u26a0 ${location} - ${w.message}${ANSI.reset}`; - }) - .join('\n'); - }, - formatAsJson() { - return JSON.stringify(warnings.map((w) => ({ - source: w.source, - line: w.line, - category: w.category, - subcategory: w.subcategory, - message: w.message, - })), null, 2); - }, - formatAsMarkdown() { - if (warnings.length === 0) { - return ''; - } - const lines = ['## Warnings', '']; - const groups = this.groupBySource(); - for (const [source, sourceWarnings] of groups) { - lines.push(`### ${source}`, ''); - for (const w of sourceWarnings) { - const location = w.line !== undefined ? `:${w.line}` : ''; - lines.push(`- ${w.message}${location}`); - } - lines.push(''); - } - return lines.join('\n'); - }, - isEmpty() { - return warnings.length === 0; - }, - count() { - return warnings.length; - }, - }; -} -/** - * Utilities for creating ResultWithWarnings values - */ -export const ResultWithWarnings = { - /** - * Create a successful result with warnings - */ - ok: (value, warnings = []) => ({ - ok: true, - value, - warnings, - }), - /** - * Create an error result with warnings - */ - err: (error, warnings = []) => ({ - ok: false, - error, - warnings, - }), - /** - * Check if result is successful - */ - isOk: (result) => result.ok, - /** - * Check if result is an error - */ - isError: (result) => !result.ok, -}; -//# sourceMappingURL=warning-collector.js.map \ No newline at end of file diff --git a/dist/generators/warning-collector.js.map b/dist/generators/warning-collector.js.map deleted file mode 100644 index e7b1208e..00000000 --- a/dist/generators/warning-collector.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"warning-collector.js","sourceRoot":"","sources":["../../src/generators/warning-collector.ts"],"names":[],"mappings":"AA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,GAAG,EAAE,CAAI,KAAQ,EAAE,WAA+B,EAAE,EAAgC,EAAE,CAAC,CAAC;QACtF,EAAE,EAAE,KAAK;QACT,KAAK;QACL,QAAQ;KACT,CAAC;IAEF;;OAEG;IACH,IAAI,EAAE,CACJ,MAAgC,EACgC,EAAE,CAAC,MAAM,CAAC,EAAE;IAE9E;;OAEG;IACH,OAAO,EAAE,CACP,MAAgC,EACiC,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE;CACjF,CAAC"} \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index ff1d4615..00000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,107 +0,0 @@ -/** - * @libar-docs - */ -/** - * @libar-docs-core @libar-docs-intro - * @libar-docs-pattern PublicAPI - * @libar-docs-status completed - * - * ## PublicAPI - Package Entry Point - * - * Main entry point for the @libar-dev/delivery-process package. - * Exports the three-stage pipeline (Scanner → Extractor → Generator) for - * extracting documentation directly from TypeScript source code. - * - * **Key Features:** - * - Three-stage pipeline: Scanner → Extractor → Generator - * - Tag-based categorization with priority inference - * - Composable section-based document generation - * - JSON-configurable generators - * - * ### When to Use - * - * - Use when importing the package's public API in client code - * - Use for accessing scanner, extractor, and generator modules - */ -/** - * Configuration API for creating customized delivery-process instances. - * - * @example - * ```typescript - * import { createDeliveryProcess, GENERIC_PRESET } from '@libar-dev/delivery-process'; - * - * // Use generic preset for non-DDD projects - * const dp = createDeliveryProcess({ preset: "generic" }); - * - * // Or customize the tag prefix - * const dp = createDeliveryProcess({ - * tagPrefix: "@my-project-", - * fileOptInTag: "@my-project" - * }); - * ``` - */ -export { createDeliveryProcess, type CreateDeliveryProcessOptions } from './config/factory.js'; -export type { DeliveryProcessConfig, DeliveryProcessInstance, RegexBuilders, } from './config/types.js'; -export { createRegexBuilders } from './config/regex-builders.js'; -export { GENERIC_PRESET, LIBAR_GENERIC_PRESET, DDD_ES_CQRS_PRESET, PRESETS, type PresetName, } from './config/presets.js'; -export * from './types/index.js'; -export * from './scanner/index.js'; -export * from './extractor/index.js'; -export * from './validation-schemas/index.js'; -/** - * New section-based generator system. - * - * Use this for all new code. Provides composable sections, JSON configuration, - * and cleaner API design. - * - * @example - * ```typescript - * import { generatorRegistry } from '@libar-dev/delivery-process/generators'; - * import '@libar-dev/delivery-process/generators/built-in'; - * - * const generator = generatorRegistry.get('patterns'); - * const output = await generator.generate(patterns, context); - * ``` - */ -export * as generators from './generators/index.js'; -/** - * RenderableDocument Model for codec-based document generation. - * - * New architecture that uses Zod 4 codecs to transform MasterDataset into - * RenderableDocuments, which are rendered to markdown via a universal renderer. - * - * @example - * ```typescript - * import { generateDocument, generateAllDocuments } from '@libar-dev/delivery-process/renderable'; - * - * // Generate a single document type - * const files = generateDocument("patterns", masterDataset); - * - * // Generate all document types - * const allFiles = generateAllDocuments(masterDataset); - * ``` - */ -export * as renderable from './renderable/index.js'; -/** - * Lint module for pattern annotation quality and process validation. - * - * Includes: - * - **Rules & Engine**: Pattern annotation quality checking - * - **Process Guard**: FSM validation, change detection, protection enforcement - * - * @example - * ```typescript - * import { lintFiles, validateChanges } from '@libar-dev/delivery-process/lint'; - * - * // Lint pattern annotations - * const result = await lintFiles(['src/**\/*.ts']); - * - * // Validate process changes (pre-commit) - * const validation = validateChanges(input); - * if (hasErrors(validation)) { - * console.error('Process violations detected'); - * } - * ``` - */ -export * as lint from './lint/index.js'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/dist/index.d.ts.map b/dist/index.d.ts.map deleted file mode 100644 index 691e4bcb..00000000 --- a/dist/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;;;;;;;;;;;;;;GAqBG;AAMH;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,qBAAqB,EAAE,KAAK,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AAE/F,YAAY,EACV,qBAAqB,EACrB,uBAAuB,EACvB,aAAa,GACd,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEjE,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,kBAAkB,EAClB,OAAO,EACP,KAAK,UAAU,GAChB,MAAM,qBAAqB,CAAC;AAG7B,cAAc,kBAAkB,CAAC;AAGjC,cAAc,oBAAoB,CAAC;AAGnC,cAAc,sBAAsB,CAAC;AAGrC,cAAc,+BAA+B,CAAC;AAM9C;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,UAAU,MAAM,uBAAuB,CAAC;AAMpD;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,KAAK,UAAU,MAAM,uBAAuB,CAAC;AAMpD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC"} \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 886d02c3..00000000 --- a/dist/index.js +++ /dev/null @@ -1,122 +0,0 @@ -/** - * @libar-docs - */ -/** - * @libar-docs-core @libar-docs-intro - * @libar-docs-pattern PublicAPI - * @libar-docs-status completed - * - * ## PublicAPI - Package Entry Point - * - * Main entry point for the @libar-dev/delivery-process package. - * Exports the three-stage pipeline (Scanner → Extractor → Generator) for - * extracting documentation directly from TypeScript source code. - * - * **Key Features:** - * - Three-stage pipeline: Scanner → Extractor → Generator - * - Tag-based categorization with priority inference - * - Composable section-based document generation - * - JSON-configurable generators - * - * ### When to Use - * - * - Use when importing the package's public API in client code - * - Use for accessing scanner, extractor, and generator modules - */ -// ============================================================================ -// Configuration API (Primary Entry Point for External Users) -// ============================================================================ -/** - * Configuration API for creating customized delivery-process instances. - * - * @example - * ```typescript - * import { createDeliveryProcess, GENERIC_PRESET } from '@libar-dev/delivery-process'; - * - * // Use generic preset for non-DDD projects - * const dp = createDeliveryProcess({ preset: "generic" }); - * - * // Or customize the tag prefix - * const dp = createDeliveryProcess({ - * tagPrefix: "@my-project-", - * fileOptInTag: "@my-project" - * }); - * ``` - */ -export { createDeliveryProcess } from './config/factory.js'; -export { createRegexBuilders } from './config/regex-builders.js'; -export { GENERIC_PRESET, LIBAR_GENERIC_PRESET, DDD_ES_CQRS_PRESET, PRESETS, } from './config/presets.js'; -// Core types (schema-inferred) -export * from './types/index.js'; -// Scanner functionality -export * from './scanner/index.js'; -// Extractor functionality -export * from './extractor/index.js'; -// Validation schemas (for runtime validation) -export * from './validation-schemas/index.js'; -// ============================================================================ -// NEW: Composable Generators Module (Recommended) -// ============================================================================ -/** - * New section-based generator system. - * - * Use this for all new code. Provides composable sections, JSON configuration, - * and cleaner API design. - * - * @example - * ```typescript - * import { generatorRegistry } from '@libar-dev/delivery-process/generators'; - * import '@libar-dev/delivery-process/generators/built-in'; - * - * const generator = generatorRegistry.get('patterns'); - * const output = await generator.generate(patterns, context); - * ``` - */ -export * as generators from './generators/index.js'; -// ============================================================================ -// Renderable Document Model (RDM) - Codec-based generation -// ============================================================================ -/** - * RenderableDocument Model for codec-based document generation. - * - * New architecture that uses Zod 4 codecs to transform MasterDataset into - * RenderableDocuments, which are rendered to markdown via a universal renderer. - * - * @example - * ```typescript - * import { generateDocument, generateAllDocuments } from '@libar-dev/delivery-process/renderable'; - * - * // Generate a single document type - * const files = generateDocument("patterns", masterDataset); - * - * // Generate all document types - * const allFiles = generateAllDocuments(masterDataset); - * ``` - */ -export * as renderable from './renderable/index.js'; -// ============================================================================ -// Lint Module - Pattern & Process Validation -// ============================================================================ -/** - * Lint module for pattern annotation quality and process validation. - * - * Includes: - * - **Rules & Engine**: Pattern annotation quality checking - * - **Process Guard**: FSM validation, change detection, protection enforcement - * - * @example - * ```typescript - * import { lintFiles, validateChanges } from '@libar-dev/delivery-process/lint'; - * - * // Lint pattern annotations - * const result = await lintFiles(['src/**\/*.ts']); - * - * // Validate process changes (pre-commit) - * const validation = validateChanges(input); - * if (hasErrors(validation)) { - * console.error('Process violations detected'); - * } - * ``` - */ -export * as lint from './lint/index.js'; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 80c0808b..00000000 --- a/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,+EAA+E;AAC/E,6DAA6D;AAC7D,+EAA+E;AAE/E;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,qBAAqB,EAAqC,MAAM,qBAAqB,CAAC;AAQ/F,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEjE,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,kBAAkB,EAClB,OAAO,GAER,MAAM,qBAAqB,CAAC;AAE7B,+BAA+B;AAC/B,cAAc,kBAAkB,CAAC;AAEjC,wBAAwB;AACxB,cAAc,oBAAoB,CAAC;AAEnC,0BAA0B;AAC1B,cAAc,sBAAsB,CAAC;AAErC,8CAA8C;AAC9C,cAAc,+BAA+B,CAAC;AAE9C,+EAA+E;AAC/E,kDAAkD;AAClD,+EAA+E;AAE/E;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,UAAU,MAAM,uBAAuB,CAAC;AAEpD,+EAA+E;AAC/E,2DAA2D;AAC3D,+EAA+E;AAE/E;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,KAAK,UAAU,MAAM,uBAAuB,CAAC;AAEpD,+EAA+E;AAC/E,6CAA6C;AAC7C,+EAA+E;AAE/E;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC"} \ No newline at end of file diff --git a/dist/lint/engine.d.ts b/dist/lint/engine.d.ts deleted file mode 100644 index 6ac2420a..00000000 --- a/dist/lint/engine.d.ts +++ /dev/null @@ -1,113 +0,0 @@ -/** - * @libar-docs - * @libar-docs-lint - * @libar-docs-pattern LintEngine - * @libar-docs-status completed - * @libar-docs-uses LintRules, CodecUtils - * @libar-docs-used-by LintPatternsCLI - * @libar-docs-arch-role service - * @libar-docs-arch-context lint - * @libar-docs-arch-layer application - * - * ## LintEngine - Rule Execution Orchestrator - * - * Orchestrates lint rule execution against parsed directives. - * Takes scanned @libar-docs-* directives and runs quality rules against them, - * collecting violations and computing summary statistics for CI enforcement. - * - * ### When to Use - * - * - Use when validating annotation quality across multiple files - * - Use when building CI pipelines for documentation standards - * - Use for formatting lint results (pretty or JSON output) - */ -import type { DocDirective } from '../validation-schemas/doc-directive.js'; -import type { LintViolation } from '../validation-schemas/lint.js'; -import { type LintContext, type LintRule } from './rules.js'; -import type { Result } from '../types/result.js'; -/** - * Lint results for a single file - */ -export interface LintResult { - /** Source file path */ - readonly file: string; - /** All violations found in this file */ - readonly violations: readonly LintViolation[]; -} -/** - * Summary statistics for a lint run - */ -export interface LintSummary { - /** Results per file (only files with violations) */ - readonly results: readonly LintResult[]; - /** Total error count */ - readonly errorCount: number; - /** Total warning count */ - readonly warningCount: number; - /** Total info count */ - readonly infoCount: number; - /** Total files scanned */ - readonly filesScanned: number; - /** Total directives checked */ - readonly directivesChecked: number; -} -/** - * Input format for directive with location info - */ -export interface DirectiveWithLocation { - readonly directive: DocDirective; - readonly line: number; -} -/** - * Run lint rules against a single directive - * - * @param directive - Parsed directive to check - * @param file - Source file path - * @param line - Line number in source - * @param rules - Rules to apply - * @param context - Optional context for rules that need pattern registry - * @returns Array of violations (empty if all rules pass) - */ -export declare function lintDirective(directive: DocDirective, file: string, line: number, rules: readonly LintRule[], context?: LintContext): LintViolation[]; -/** - * Run lint rules against multiple files with directives - * - * @param files - Map of file path to directives in that file - * @param rules - Rules to apply - * @param context - Optional context for rules that need pattern registry - * @returns Summary with results and statistics - */ -export declare function lintFiles(files: Map, rules: readonly LintRule[], context?: LintContext): LintSummary; -/** - * Check if lint summary indicates failure based on mode - * - * @param summary - Lint summary to check - * @param strict - Whether to treat warnings as errors - * @returns True if there are failures (exit code should be 1) - */ -export declare function hasFailures(summary: LintSummary, strict: boolean): boolean; -/** - * Sort violations by severity (errors first, then warnings, then info) - */ -export declare function sortViolationsBySeverity(violations: readonly LintViolation[]): LintViolation[]; -/** - * Format lint summary as pretty-printed text - * - * @param summary - Lint summary to format - * @param options - Formatting options - * @returns Formatted string for console output - */ -export declare function formatPretty(summary: LintSummary, options?: { - quiet?: boolean; -}): string; -/** - * Format lint summary as JSON - * - * Uses LintOutputCodec for type-safe serialization. - * Returns Result type per project guidelines (no exceptions thrown). - * - * @param summary - Lint summary to format - * @returns Result with JSON string on success, Error on serialization failure - */ -export declare function formatJson(summary: LintSummary): Result; -//# sourceMappingURL=engine.d.ts.map \ No newline at end of file diff --git a/dist/lint/engine.d.ts.map b/dist/lint/engine.d.ts.map deleted file mode 100644 index bb3deaab..00000000 --- a/dist/lint/engine.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../../src/lint/engine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,KAAK,EAAE,aAAa,EAAgB,MAAM,+BAA+B,CAAC;AACjF,OAAO,EAAiB,KAAK,WAAW,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAM5E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAOjD;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,uBAAuB;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,wCAAwC;IACxC,QAAQ,CAAC,UAAU,EAAE,SAAS,aAAa,EAAE,CAAC;CAC/C;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,oDAAoD;IACpD,QAAQ,CAAC,OAAO,EAAE,SAAS,UAAU,EA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,OAAO,EAAE,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,CA4B/D"} \ No newline at end of file diff --git a/dist/lint/engine.js b/dist/lint/engine.js deleted file mode 100644 index 7bac0351..00000000 --- a/dist/lint/engine.js +++ /dev/null @@ -1,228 +0,0 @@ -/** - * @libar-docs - * @libar-docs-lint - * @libar-docs-pattern LintEngine - * @libar-docs-status completed - * @libar-docs-uses LintRules, CodecUtils - * @libar-docs-used-by LintPatternsCLI - * @libar-docs-arch-role service - * @libar-docs-arch-context lint - * @libar-docs-arch-layer application - * - * ## LintEngine - Rule Execution Orchestrator - * - * Orchestrates lint rule execution against parsed directives. - * Takes scanned @libar-docs-* directives and runs quality rules against them, - * collecting violations and computing summary statistics for CI enforcement. - * - * ### When to Use - * - * - Use when validating annotation quality across multiple files - * - Use when building CI pipelines for documentation standards - * - Use for formatting lint results (pretty or JSON output) - */ -import { severityOrder } from './rules.js'; -import { createJsonOutputCodec, LintOutputSchema, } from '../validation-schemas/index.js'; -/** - * Codec for serializing lint output to JSON - */ -const LintOutputCodec = createJsonOutputCodec(LintOutputSchema); -/** - * Run lint rules against a single directive - * - * @param directive - Parsed directive to check - * @param file - Source file path - * @param line - Line number in source - * @param rules - Rules to apply - * @param context - Optional context for rules that need pattern registry - * @returns Array of violations (empty if all rules pass) - */ -export function lintDirective(directive, file, line, rules, context) { - const violations = []; - for (const rule of rules) { - const result = rule.check(directive, file, line, context); - if (result !== null) { - // Handle both single violation and array of violations - if (Array.isArray(result)) { - violations.push(...result); - } - else { - violations.push(result); - } - } - } - return violations; -} -/** - * Run lint rules against multiple files with directives - * - * @param files - Map of file path to directives in that file - * @param rules - Rules to apply - * @param context - Optional context for rules that need pattern registry - * @returns Summary with results and statistics - */ -export function lintFiles(files, rules, context) { - const results = []; - let errorCount = 0; - let warningCount = 0; - let infoCount = 0; - let directivesChecked = 0; - for (const [file, directives] of files) { - const fileViolations = []; - for (const { directive, line } of directives) { - directivesChecked++; - const violations = lintDirective(directive, file, line, rules, context); - fileViolations.push(...violations); - } - // Count by severity - for (const violation of fileViolations) { - switch (violation.severity) { - case 'error': - errorCount++; - break; - case 'warning': - warningCount++; - break; - case 'info': - infoCount++; - break; - } - } - // Only include files with violations - if (fileViolations.length > 0) { - results.push({ - file, - violations: fileViolations, - }); - } - } - return { - results, - errorCount, - warningCount, - infoCount, - filesScanned: files.size, - directivesChecked, - }; -} -/** - * Check if lint summary indicates failure based on mode - * - * @param summary - Lint summary to check - * @param strict - Whether to treat warnings as errors - * @returns True if there are failures (exit code should be 1) - */ -export function hasFailures(summary, strict) { - if (summary.errorCount > 0) { - return true; - } - if (strict && summary.warningCount > 0) { - return true; - } - return false; -} -/** - * Sort violations by severity (errors first, then warnings, then info) - */ -export function sortViolationsBySeverity(violations) { - return [...violations].sort((a, b) => { - const severityDiff = severityOrder[a.severity] - severityOrder[b.severity]; - if (severityDiff !== 0) - return severityDiff; - // Within same severity, sort by line number - return a.line - b.line; - }); -} -/** - * Format lint summary as pretty-printed text - * - * @param summary - Lint summary to format - * @param options - Formatting options - * @returns Formatted string for console output - */ -export function formatPretty(summary, options = {}) { - const lines = []; - for (const result of summary.results) { - const sorted = sortViolationsBySeverity(result.violations); - // Filter based on quiet mode - const filtered = options.quiet === true ? sorted.filter((v) => v.severity === 'error') : sorted; - if (filtered.length === 0) - continue; - lines.push(result.file); - for (const v of filtered) { - const severityColor = getSeverityPrefix(v.severity); - lines.push(` ${v.line}:1 ${severityColor} ${v.rule} ${v.message}`); - } - lines.push(''); // Blank line between files - } - // Summary line - const parts = []; - if (summary.errorCount > 0) { - parts.push(`${summary.errorCount} error${summary.errorCount === 1 ? '' : 's'}`); - } - if (summary.warningCount > 0 && options.quiet !== true) { - parts.push(`${summary.warningCount} warning${summary.warningCount === 1 ? '' : 's'}`); - } - if (summary.infoCount > 0 && options.quiet !== true) { - parts.push(`${summary.infoCount} info`); - } - if (parts.length > 0) { - const icon = summary.errorCount > 0 ? '\u2717' : summary.warningCount > 0 ? '\u26a0' : '\u2713'; - lines.push(`${icon} ${parts.join(', ')}`); - } - else { - lines.push(`\u2713 No issues found (${summary.directivesChecked} directives checked)`); - } - return lines.join('\n'); -} -/** - * Get severity prefix for output - */ -function getSeverityPrefix(severity) { - switch (severity) { - case 'error': - return 'error '; - case 'warning': - return 'warning'; - case 'info': - return 'info '; - } -} -/** - * Format lint summary as JSON - * - * Uses LintOutputCodec for type-safe serialization. - * Returns Result type per project guidelines (no exceptions thrown). - * - * @param summary - Lint summary to format - * @returns Result with JSON string on success, Error on serialization failure - */ -export function formatJson(summary) { - const output = { - results: summary.results.map((r) => ({ - file: r.file, - violations: r.violations.map((v) => ({ - rule: v.rule, - severity: v.severity, - message: v.message, - line: v.line, - })), - })), - summary: { - errors: summary.errorCount, - warnings: summary.warningCount, - info: summary.infoCount, - filesScanned: summary.filesScanned, - directivesChecked: summary.directivesChecked, - }, - }; - const result = LintOutputCodec.serialize(output); - if (!result.ok) { - return { - ok: false, - error: new Error(`Lint output serialization failed: ${result.error.message}`), - }; - } - return { ok: true, value: result.value }; -} -//# sourceMappingURL=engine.js.map \ No newline at end of file diff --git a/dist/lint/engine.js.map b/dist/lint/engine.js.map deleted file mode 100644 index 423aebf6..00000000 --- a/dist/lint/engine.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"engine.js","sourceRoot":"","sources":["../../src/lint/engine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAIH,OAAO,EAAE,aAAa,EAAmC,MAAM,YAAY,CAAC;AAC5E,OAAO,EACL,qBAAqB,EACrB,gBAAgB,GAEjB,MAAM,gCAAgC,CAAC;AAGxC;;GAEG;AACH,MAAM,eAAe,GAAG,qBAAqB,CAAC,gBAAgB,CAAC,CAAC;AAsChE;;;;;;;;;GASG;AACH,MAAM,UAAU,aAAa,CAC3B,SAAuB,EACvB,IAAY,EACZ,IAAY,EACZ,KAA0B,EAC1B,OAAqB;IAErB,MAAM,UAAU,GAAoB,EAAE,C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AAC,EAAE,EAAE,CAAC,CAAC;YACnC,IAAI,EAAE,CAAC,CAAC,IAAI;YACZ,UAAU,EAAE,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;gBACnC,IAAI,EAAE,CAAC,CAAC,IAAI;gBACZ,QAAQ,EAAE,CAAC,CAAC,QAAQ;gBACpB,OAAO,EAAE,CAAC,CAAC,OAAO;gBAClB,IAAI,EAAE,CAAC,CAAC,IAAI;aACb,CAAC,CAAC;SACJ,CAAC,CAAC;QACH,OAAO,EAAE;YACP,MAAM,EAAE,OAAO,CAAC,UAAU;YAC1B,QAAQ,EAAE,OAAO,CAAC,YAAY;YAC9B,IAAI,EAAE,OAAO,CAAC,SAAS;YACvB,YAAY,EAAE,OAAO,CAAC,YAAY;YAClC,iBAAiB,EAAE,OAAO,CAAC,iBAAiB;SAC7C;KACF,CAAC;IAEF,MAAM,MAAM,GAAG,eAAe,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IACjD,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO;YACL,EAAE,EAAE,KAAK;YACT,KAAK,EAAE,IAAI,KAAK,CAAC,qCAAqC,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;SAC9E,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC;AAC3C,CAAC"} \ No newline at end of file diff --git a/dist/lint/index.d.ts b/dist/lint/index.d.ts deleted file mode 100644 index 52c8644c..00000000 --- a/dist/lint/index.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * @libar-docs - * @libar-docs-lint - * @libar-docs-pattern LintModule - * @libar-docs-status completed - * @libar-docs-uses LintRules, LintEngine - * - * ## LintModule - Annotation Quality Checking - * - * Provides lint rules and engine for pattern annotation quality checking. - * Exports the complete lint API including rules, engine, and formatters. - * - * ### When to Use - * - * - Use when importing lint functionality into CLI or other consumers - * - Use for accessing both rules and engine from a single import - */ -export type { LintSeverity, LintViolation } from '../validation-schemas/lint.js'; -export type { LintRule, LintContext } from './rules.js'; -export { defaultRules, filterRulesBySeverity, missingPatternName, invalidStatus, missingStatus, missingWhenToUse, tautologicalDescription, missingRelationships, patternConflictInImplements, missingRelationshipTarget, } from './rules.js'; -export type { LintResult, LintSummary, DirectiveWithLocation } from './engine.js'; -export { lintDirective, lintFiles, hasFailures, sortViolationsBySeverity, formatPretty, formatJson, } from './engine.js'; -export * from './process-guard/index.js'; -export { runStepLint, STEP_LINT_RULES } from './steps/index.js'; -export type { StepLintRule, FeatureStepPair, StepLintOptions } from './steps/index.js'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/dist/lint/index.d.ts.map b/dist/lint/index.d.ts.map deleted file mode 100644 index 8bcf0a74..00000000 --- a/dist/lint/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lint/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACjF,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EACL,YAAY,EACZ,qBAAqB,EACrB,kBAAkB,EAClB,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,uBAAuB,EACvB,oBAAoB,EACpB,2BAA2B,EAC3B,yBAAyB,GAC1B,MAAM,YAAY,CAAC;AAGpB,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAClF,OAAO,EACL,aAAa,EACb,SAAS,EACT,WAAW,EACX,wBAAwB,EACxB,YAAY,EACZ,UAAU,GACX,MAAM,aAAa,CAAC;AAGrB,cAAc,0BAA0B,CAAC;AAGzC,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAChE,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC"} \ No newline at end of file diff --git a/dist/lint/index.js b/dist/lint/index.js deleted file mode 100644 index b6a61f5c..00000000 --- a/dist/lint/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @libar-docs - * @libar-docs-lint - * @libar-docs-pattern LintModule - * @libar-docs-status completed - * @libar-docs-uses LintRules, LintEngine - * - * ## LintModule - Annotation Quality Checking - * - * Provides lint rules and engine for pattern annotation quality checking. - * Exports the complete lint API including rules, engine, and formatters. - * - * ### When to Use - * - * - Use when importing lint functionality into CLI or other consumers - * - Use for accessing both rules and engine from a single import - */ -export { defaultRules, filterRulesBySeverity, missingPatternName, invalidStatus, missingStatus, missingWhenToUse, tautologicalDescription, missingRelationships, patternConflictInImplements, missingRelationshipTarget, } from './rules.js'; -export { lintDirective, lintFiles, hasFailures, sortViolationsBySeverity, formatPretty, formatJson, } from './engine.js'; -// Process Guard (FSM validation, change detection, protection enforcement) -export * from './process-guard/index.js'; -// Step Lint (vitest-cucumber feature/step compatibility checking) -export { runStepLint, STEP_LINT_RULES } from './steps/index.js'; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/lint/index.js.map b/dist/lint/index.js.map deleted file mode 100644 index a9cf449c..00000000 --- a/dist/lint/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lint/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAKH,OAAO,EACL,YAAY,EACZ,qBAAqB,EACrB,kBAAkB,EAClB,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,uBAAuB,EACvB,oBAAoB,EACpB,2BAA2B,EAC3B,yBAAyB,GAC1B,MAAM,YAAY,CAAC;AAIpB,OAAO,EACL,aAAa,EACb,SAAS,EACT,WAAW,EACX,wBAAwB,EACxB,YAAY,EACZ,UAAU,GACX,MAAM,aAAa,CAAC;AAErB,2EAA2E;AAC3E,cAAc,0BAA0B,CAAC;AAEzC,kEAAkE;AAClE,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC"} \ No newline at end of file diff --git a/dist/lint/process-guard/decider.d.ts b/dist/lint/process-guard/decider.d.ts deleted file mode 100644 index 7bdd106f..00000000 --- a/dist/lint/process-guard/decider.d.ts +++ /dev/null @@ -1,84 +0,0 @@ -/** - * @libar-docs - * @libar-docs-lint - * @libar-docs-pattern ProcessGuardDecider - * @libar-docs-status active - * @libar-docs-arch-role decider - * @libar-docs-arch-context lint - * @libar-docs-arch-layer application - * @libar-docs-implements ProcessGuardLinter - * @libar-docs-depends-on:FSMValidator,DeriveProcessState,DetectChanges - * @libar-docs-extract-shapes validateChanges - * - * ## ProcessGuardDecider - Pure Validation Logic - * - * Pure function that validates changes against process rules. - * Follows the Decider pattern from platform-core: no I/O, no side effects. - * - * ### When to Use - * - * - When validating proposed changes against delivery process rules - * - When implementing custom validation rules for the process guard - * - When building pre-commit hooks that enforce FSM transitions - * - * ### Design Principles - * - * - **Pure Function**: (state, changes, options) => result - * - **No I/O**: All data passed in, no file reads - * - **Composable Rules**: Rules are separate functions combined in decider - * - **Testable**: Easy to unit test with mock data - * - * ### Rules Implemented - * - * 1. **Protection Level** - Completed files require unlock-reason - * 2. **Status Transition** - Transitions must follow PDR-005 FSM - * 3. **Scope Creep** - Active specs cannot add new deliverables - * 4. **Session Scope** - Modifications outside session scope warn - */ -import type { ValidationResult, ProcessViolation, DeciderInput, DeciderOutput, ProcessGuardRule } from './types.js'; -/** - * Validate changes against process rules. - * - * Pure function following the Decider pattern: - * - Takes all inputs explicitly (no hidden state) - * - Returns result without side effects - * - Emits events for observability - * - * @param input - Complete input including state, changes, and options - * @returns DeciderOutput with validation result and events - * - * @example - * ```typescript - * const output = validateChanges({ - * state: processState, - * changes: changeDetection, - * options: { strict: false, ignoreSession: false }, - * }); - * - * if (!output.result.valid) { - * console.log('Violations:', output.result.violations); - * } - * ``` - */ -export declare function validateChanges(input: DeciderInput): DeciderOutput; -/** - * Check if validation result has any errors. - */ -export declare function hasErrors(result: ValidationResult): boolean; -/** - * Check if validation result has any warnings. - */ -export declare function hasWarnings(result: ValidationResult): boolean; -/** - * Get all violations and warnings combined. - */ -export declare function getAllIssues(result: ValidationResult): readonly ProcessViolation[]; -/** - * Filter violations by rule. - */ -export declare function getViolationsByRule(result: ValidationResult, rule: ProcessGuardRule): readonly ProcessViolation[]; -/** - * Create a summary string for the validation result. - */ -export declare function summarizeResult(result: ValidationResult): string; -//# sourceMappingURL=decider.d.ts.map \ No newline at end of file diff --git a/dist/lint/process-guard/decider.d.ts.map b/dist/lint/process-guard/decider.d.ts.map deleted file mode 100644 index e492ae1e..00000000 --- a/dist/lint/process-guard/decider.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decider.d.ts","sourceRoot":"","sources":["../../../src/lint/process-guard/decider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAQH,OAAO,KAAK,EAGV,gBAAgB,EAChB,gBAAgB,EAEhB,YAAY,EACZ,aAAa,EAEb,gBAAgB,EACjB,MAAM,YAAY,CAAC;AAQpB;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,YAAY,GAAG,aAAa,CAoElE;AAkPD;;GAEG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAE3D;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAE7D;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,gBAAgB,GAAG,SAAS,gBAAgB,EAAE,CAElF;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,gBAAgB,GACrB,SAAS,gBAAgB,EAAE,CAE7B;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,CAiBhE"} \ No newline at end of file diff --git a/dist/lint/process-guard/decider.js b/dist/lint/process-guard/decider.js deleted file mode 100644 index 12f16a4a..00000000 --- a/dist/lint/process-guard/decider.js +++ /dev/null @@ -1,328 +0,0 @@ -/** - * @libar-docs - * @libar-docs-lint - * @libar-docs-pattern ProcessGuardDecider - * @libar-docs-status active - * @libar-docs-arch-role decider - * @libar-docs-arch-context lint - * @libar-docs-arch-layer application - * @libar-docs-implements ProcessGuardLinter - * @libar-docs-uses FSMValidator, DeriveProcessState, DetectChanges - * @libar-docs-depends-on:FSMValidator,DeriveProcessState,DetectChanges - * @libar-docs-extract-shapes validateChanges - * - * ## ProcessGuardDecider - Pure Validation Logic - * - * Pure function that validates changes against process rules. - * Follows the Decider pattern from platform-core: no I/O, no side effects. - * - * ### When to Use - * - * - When validating proposed changes against delivery process rules - * - When implementing custom validation rules for the process guard - * - When building pre-commit hooks that enforce FSM transitions - * - * ### Design Principles - * - * - **Pure Function**: (state, changes, options) => result - * - **No I/O**: All data passed in, no file reads - * - **Composable Rules**: Rules are separate functions combined in decider - * - **Testable**: Easy to unit test with mock data - * - * ### Rules Implemented - * - * 1. **Protection Level** - Completed files require unlock-reason - * 2. **Status Transition** - Transitions must follow PDR-005 FSM - * 3. **Scope Creep** - Active specs cannot add new deliverables - * 4. **Session Scope** - Modifications outside session scope warn - */ -import { validateTransition, getValidTransitionsFrom, isTerminalState, } from '../../validation/fsm/index.js'; -import { isInSessionScope, isSessionExcluded } from './derive-state.js'; -import { DEFAULT_TAG_PREFIX } from '../../config/defaults.js'; -// ============================================================================= -// Decider - Main Entry Point -// ============================================================================= -/** - * Validate changes against process rules. - * - * Pure function following the Decider pattern: - * - Takes all inputs explicitly (no hidden state) - * - Returns result without side effects - * - Emits events for observability - * - * @param input - Complete input including state, changes, and options - * @returns DeciderOutput with validation result and events - * - * @example - * ```typescript - * const output = validateChanges({ - * state: processState, - * changes: changeDetection, - * options: { strict: false, ignoreSession: false }, - * }); - * - * if (!output.result.valid) { - * console.log('Violations:', output.result.violations); - * } - * ``` - */ -export function validateChanges(input) { - const { state, changes, options } = input; - const events = []; - const violations = []; - const warnings = []; - // Emit start event - const allFiles = [...changes.modifiedFiles, ...changes.addedFiles]; - events.push({ type: 'validation_started', fileCount: allFiles.length }); - // Run each rule - const rules = [ - { - rule: 'completed-protection', - fn: () => checkProtectionLevel(state, changes, options.registry), - }, - { - rule: 'invalid-status-transition', - fn: () => checkStatusTransitions(state, changes), - }, - { rule: 'scope-creep', fn: () => checkScopeCreep(state, changes) }, - { - rule: 'session-scope', - fn: () => (options.ignoreSession ? [] : checkSessionScope(state, changes)), - }, - { - rule: 'session-excluded', - fn: () => (options.ignoreSession ? [] : checkSessionExcluded(state, changes)), - }, - ]; - for (const { rule, fn } of rules) { - const ruleViolations = fn(); - const passed = ruleViolations.length === 0; - events.push({ type: 'rule_checked', rule, passed }); - for (const v of ruleViolations) { - if (v.severity === 'error') { - violations.push(v); - } - else { - warnings.push(v); - } - } - } - // In strict mode, promote warnings to violations - const finalViolations = options.strict - ? [...violations, ...warnings.map((w) => ({ ...w, severity: 'error' }))] - : violations; - const finalWarnings = options.strict ? [] : warnings; - const valid = finalViolations.length === 0; - events.push({ - type: 'validation_completed', - valid, - violationCount: finalViolations.length, - }); - return { - result: { - valid, - violations: finalViolations, - warnings: finalWarnings, - processState: state, - changes, - }, - events, - }; -} -// ============================================================================= -// Rule: Protection Level -// ============================================================================= -/** - * Check protection level violations. - * - * - Completed (hard) files require unlock-reason tag - * - Returns error if modified without unlock - * - * @param state - Current process state - * @param changes - Detected changes - * @param registry - Optional tag registry for prefix-aware messages - */ -function checkProtectionLevel(state, changes, registry) { - const tagPrefix = registry?.tagPrefix ?? DEFAULT_TAG_PREFIX; - const violations = []; - for (const file of [...changes.modifiedFiles, ...changes.addedFiles]) { - const fileState = state.files.get(file); - if (!fileState) - continue; - // Check hard protection (completed) - if (fileState.protection === 'hard' && !fileState.hasUnlockReason) { - // Exempt files transitioning TO a terminal state — this is a completion, not a post-completion edit - const transition = changes.statusTransitions.get(file); - if (transition !== undefined && isTerminalState(transition.to)) { - continue; - } - violations.push(createViolation('completed-protection', 'error', `Cannot modify completed spec '${file}' without unlock reason`, file, `Add ${tagPrefix}unlock-reason:'your reason' to proceed`)); - } - } - return violations; -} -// ============================================================================= -// Rule: Status Transitions -// ============================================================================= -/** - * Check status transition validity. - * - * Uses FSM validation from phase-state-machine module. - * Enhanced error messages include line numbers and docstring context. - */ -function checkStatusTransitions(state, changes) { - const violations = []; - for (const [file, transition] of changes.statusTransitions) { - // New files with unlock-reason bypass FSM check (supports file splits/reorganization) - if (transition.isNewFile === true && transition.hasUnlockReason === true) { - continue; - } - const validationResult = validateTransition(transition.from, transition.to); - if (!validationResult.valid) { - const validTransitions = getValidTransitionsFrom(transition.from); - // Build detailed message with context - const fileContext = transition.isNewFile === true ? ' (new file)' : ''; - const lineInfo = transition.toLocation ? ` at line ${transition.toLocation.lineNumber}` : ''; - const message = `Invalid status transition in '${file}'${fileContext}${lineInfo}: ${transition.from} → ${transition.to}`; - // Build suggestion with debugging hints - let suggestion = `Valid transitions from '${transition.from}': ${validTransitions.join(', ')}`; - // Add docstring debugging info if multiple tags were found - if (transition.allDetectedTags && transition.allDetectedTags.length > 1) { - const docstringTags = transition.allDetectedTags.filter((t) => t.insideDocstring); - if (docstringTags.length > 0) { - suggestion += `\n Note: ${docstringTags.length} status tag(s) inside docstrings were ignored`; - suggestion += '\n Detected tags:'; - for (const tag of transition.allDetectedTags) { - const context = tag.insideDocstring ? ' [inside docstring - ignored]' : ' [file-level]'; - suggestion += `\n Line ${tag.lineNumber}${context}`; - } - } - } - violations.push(createViolation('invalid-status-transition', 'error', message, file, suggestion)); - } - } - return violations; -} -// ============================================================================= -// Rule: Scope Creep -// ============================================================================= -/** - * Check for scope creep (new deliverables in active specs). - * - * Active specs cannot add new deliverables. - */ -function checkScopeCreep(state, changes) { - const violations = []; - for (const [file, deliverableChange] of changes.deliverableChanges) { - const fileState = state.files.get(file); - if (!fileState) - continue; - // Only check active specs (scope-locked) - if (fileState.protection === 'scope' && deliverableChange.added.length > 0) { - violations.push(createViolation('scope-creep', 'error', `Cannot add deliverables to active spec '${file}': ${deliverableChange.added.join(', ')}`, file, 'Create new spec or revert to roadmap status first')); - } - // Warn about removed deliverables - if (deliverableChange.removed.length > 0) { - violations.push(createViolation('deliverable-removed', 'warning', `Deliverable removed from '${file}': ${deliverableChange.removed.join(', ')}`, file, 'Was this completed or descoped? Consider documenting the reason.')); - } - } - return violations; -} -// ============================================================================= -// Rule: Session Scope -// ============================================================================= -/** - * Check session scope violations. - * - * Files outside active session scope trigger warnings. - */ -function checkSessionScope(state, changes) { - const violations = []; - if (!state.activeSession) { - return violations; // No session, no scope rules - } - for (const file of [...changes.modifiedFiles, ...changes.addedFiles]) { - if (!isInSessionScope(state, file)) { - violations.push(createViolation('session-scope', 'warning', `File '${file}' is not in session scope`, file, `Add to session '${state.activeSession.id}' scope or use --ignore-session flag`)); - } - } - return violations; -} -/** - * Check for explicitly excluded files. - * - * Explicitly excluded files trigger errors (not warnings). - */ -function checkSessionExcluded(state, changes) { - const violations = []; - if (!state.activeSession) { - return violations; - } - for (const file of [...changes.modifiedFiles, ...changes.addedFiles]) { - if (isSessionExcluded(state, file)) { - violations.push(createViolation('session-excluded', 'error', `File '${file}' is explicitly excluded from session '${state.activeSession.id}'`, file, 'This file was explicitly excluded and cannot be modified in this session')); - } - } - return violations; -} -// ============================================================================= -// Helpers -// ============================================================================= -/** - * Create a process violation. - */ -function createViolation(rule, severity, message, file, suggestion) { - // Build violation (handle exactOptionalPropertyTypes) - const violation = { rule, severity, message, file }; - // Only add suggestion if provided - if (suggestion !== undefined) { - violation.suggestion = suggestion; - } - return violation; -} -// ============================================================================= -// Convenience Functions -// ============================================================================= -/** - * Check if validation result has any errors. - */ -export function hasErrors(result) { - return result.violations.length > 0; -} -/** - * Check if validation result has any warnings. - */ -export function hasWarnings(result) { - return result.warnings.length > 0; -} -/** - * Get all violations and warnings combined. - */ -export function getAllIssues(result) { - return [...result.violations, ...result.warnings]; -} -/** - * Filter violations by rule. - */ -export function getViolationsByRule(result, rule) { - return result.violations.filter((v) => v.rule === rule); -} -/** - * Create a summary string for the validation result. - */ -export function summarizeResult(result) { - const errorCount = result.violations.length; - const warningCount = result.warnings.length; - if (result.valid && warningCount === 0) { - return 'Process guard check passed'; - } - const parts = []; - if (errorCount > 0) { - parts.push(`${errorCount} error${errorCount !== 1 ? 's' : ''}`); - } - if (warningCount > 0) { - parts.push(`${warningCount} warning${warningCount !== 1 ? 's' : ''}`); - } - return `Process guard check: ${parts.join(', ')}`; -} -//# sourceMappingURL=decider.js.map \ No newline at end of file diff --git a/dist/lint/process-guard/decider.js.map b/dist/lint/process-guard/decider.js.map deleted file mode 100644 index ee6877d9..00000000 --- a/dist/lint/process-guard/decider.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decider.js","sourceRoot":"","sources":["../../../src/lint/process-guard/decider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,eAAe,GAChB,MAAM,+BAA+B,CAAC;AAavC,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE9D,gFAAgF;AAChF,6BAA6B;AAC7B,gFAAgF;AAEhF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,UAAU,eAAe,CAAC,KAAmB;IACjD,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAC1C,MAAM,MAAM,GAAmB,EAAE,CAAC;IAClC,MAAM,U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vC,OAAO,4BAA4B,CAAC;IACtC,CAAC;IAED,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,IAAI,UAAU,GAAG,CAAC,EAAE,CAAC;QACnB,KAAK,CAAC,IAAI,CAAC,GAAG,UAAU,SAAS,UAAU,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAClE,CAAC;IACD,IAAI,YAAY,GAAG,CAAC,EAAE,CAAC;QACrB,KAAK,CAAC,IAAI,CAAC,GAAG,YAAY,WAAW,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACxE,CAAC;IAED,OAAO,wBAAwB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;AACpD,CAAC"} \ No newline at end of file diff --git a/dist/lint/process-guard/derive-state.d.ts b/dist/lint/process-guard/derive-state.d.ts deleted file mode 100644 index 78a9a269..00000000 --- a/dist/lint/process-guard/derive-state.d.ts +++ /dev/null @@ -1,93 +0,0 @@ -/** - * @libar-docs - * @libar-docs-lint - * @libar-docs-pattern DeriveProcessState - * @libar-docs-status active - * @libar-docs-implements ProcessGuardLinter - * @libar-docs-depends-on:GherkinScanner,FSMValidator - * - * ## DeriveProcessState - Extract Process State from File Annotations - * - * Derives process state from @libar-docs-* annotations in files. - * State is computed on-demand, not stored separately. - * - * ### Design Principles - * - * - **Derived, Not Stored**: State comes from file annotations - * - **Reuses Scanner**: Builds on existing gherkin-scanner infrastructure - * - **Pure Functions**: No side effects, testable - * - * ### When to Use - * - * - When validating changes against process rules - * - When computing protection levels for files - * - When determining session scope - */ -import type { Result } from '../../types/index.js'; -import { type ProtectionLevel } from '../../validation/fsm/index.js'; -import type { ProcessState, FileState } from './types.js'; -/** - * Configuration for deriving process state. - */ -export interface DeriveStateConfig { - /** Base directory for file resolution */ - readonly baseDir: string; - /** Glob patterns for spec files */ - readonly specPatterns?: readonly string[]; - /** Path to sessions directory */ - readonly sessionsDir?: string; -} -/** - * Derive complete process state from file annotations. - * - * Scans spec files and extracts: - * - Status from @libar-docs-status tags - * - Deliverables from Background tables - * - Session state from active session files - * - * @param config - Configuration for state derivation - * @returns Result containing ProcessState or error - * - * @example - * ```typescript - * const result = await deriveProcessState({ - * baseDir: '/path/to/project', - * }); - * if (result.ok) { - * const state = result.value; - * console.log(`Found ${state.files.size} spec files`); - * } - * ``` - */ -export declare function deriveProcessState(config: DeriveStateConfig): Promise>; -/** - * Get file state from process state. - */ -export declare function getFileState(state: ProcessState, relativePath: string): FileState | undefined; -/** - * Get all files with a specific protection level. - */ -export declare function getFilesByProtection(state: ProcessState, protection: ProtectionLevel): readonly FileState[]; -/** - * Check if a file is in the active session scope. - * - * Uses smart matching based on spec format: - * - If spec contains path separator: Use path-aware matching - * - `specs/auth.feature` matches exactly `specs/auth.feature` - * - `specs/auth/` matches `specs/auth/login.feature` - * - If spec is just a name: Use substring matching - * - `auth` matches `specs/auth.feature` or `tests/auth/test.ts` - */ -export declare function isInSessionScope(state: ProcessState, relativePath: string): boolean; -/** - * Check if a file is explicitly excluded from session. - * - * Uses smart matching based on spec format: - * - If spec contains path separator: Use path-aware matching - * - `specs/legacy.feature` matches exactly `specs/legacy.feature` - * - `specs/legacy/` matches `specs/legacy/old.feature` - * - If spec is just a name: Use substring matching - * - `legacy` matches `specs/phase-legacy.feature` - */ -export declare function isSessionExcluded(state: ProcessState, relativePath: string): boolean; -//# sourceMappingURL=derive-state.d.ts.map \ No newline at end of file diff --git a/dist/lint/process-guard/derive-state.d.ts.map b/dist/lint/process-guard/derive-state.d.ts.map deleted file mode 100644 index b314a99a..00000000 --- a/dist/lint/process-guard/derive-state.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"derive-state.d.ts","sourceRoot":"","sources":["../../../src/lint/process-guard/derive-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAKH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAInD,OAAO,EAAsB,KAAK,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAOzF,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAA+B,MAAM,YAAY,CAAC;AAMvF;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,yCAAyC;IACzC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,mCAAmC;IACnC,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1C,iCAAiC;IACjC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAYD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,kBAAkB,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CA0BjG;AAkPD;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAE7F;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,YAAY,EACnB,UAAU,EAAE,eAAe,GAC1B,SAAS,SAAS,EAAE,CAQtB;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAanF;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAapF"} \ No newline at end of file diff --git a/dist/lint/process-guard/derive-state.js b/dist/lint/process-guard/derive-state.js deleted file mode 100644 index fb60aa60..00000000 --- a/dist/lint/process-guard/derive-state.js +++ /dev/null @@ -1,367 +0,0 @@ -/** - * @libar-docs - * @libar-docs-lint - * @libar-docs-pattern DeriveProcessState - * @libar-docs-status active - * @libar-docs-implements ProcessGuardLinter - * @libar-docs-depends-on:GherkinScanner,FSMValidator - * - * ## DeriveProcessState - Extract Process State from File Annotations - * - * Derives process state from @libar-docs-* annotations in files. - * State is computed on-demand, not stored separately. - * - * ### Design Principles - * - * - **Derived, Not Stored**: State comes from file annotations - * - **Reuses Scanner**: Builds on existing gherkin-scanner infrastructure - * - **Pure Functions**: No side effects, testable - * - * ### When to Use - * - * - When validating changes against process rules - * - When computing protection levels for files - * - When determining session scope - */ -import * as fs from 'fs/promises'; -import * as path from 'path'; -import { glob } from 'glob'; -import { Result as R } from '../../types/index.js'; -import { scanGherkinFiles } from '../../scanner/gherkin-scanner.js'; -import { extractDeliverables } from '../../extractor/dual-source-extractor.js'; -import { getProtectionLevel } from '../../validation/fsm/index.js'; -import { DEFAULT_STATUS, PROCESS_STATUS_VALUES, normalizeStatus, } from '../../taxonomy/index.js'; -/** Default spec patterns - generic defaults that work for package-level usage */ -const DEFAULT_SPEC_PATTERNS = [ - 'delivery-process/**/*.feature', - 'specs/**/*.feature', // For consumers -]; -// ============================================================================= -// Core Functions -// ============================================================================= -/** - * Derive complete process state from file annotations. - * - * Scans spec files and extracts: - * - Status from @libar-docs-status tags - * - Deliverables from Background tables - * - Session state from active session files - * - * @param config - Configuration for state derivation - * @returns Result containing ProcessState or error - * - * @example - * ```typescript - * const result = await deriveProcessState({ - * baseDir: '/path/to/project', - * }); - * if (result.ok) { - * const state = result.value; - * console.log(`Found ${state.files.size} spec files`); - * } - * ``` - */ -export async function deriveProcessState(config) { - const specPatterns = config.specPatterns ?? DEFAULT_SPEC_PATTERNS; - const sessionsDir = config.sessionsDir ?? path.join(config.baseDir, 'sessions'); - // Derive file states - const filesResult = await deriveFileStates(config.baseDir, specPatterns); - if (!filesResult.ok) { - return filesResult; - } - // Find active session - const sessionResult = await findActiveSession(sessionsDir, config.baseDir); - const activeSession = sessionResult.ok ? sessionResult.value : undefined; - // Build ProcessState (handle exactOptionalPropertyTypes) - const processState = { - files: filesResult.value, - derivedAt: new Date().toISOString(), - }; - // Only add activeSession if it exists - if (activeSession !== undefined) { - processState.activeSession = activeSession; - } - return R.ok(processState); -} -/** - * Derive FileState for all spec files. - */ -async function deriveFileStates(baseDir, patterns) { - // Scan feature files - const scanResult = await scanGherkinFiles({ - patterns: patterns, - baseDir, - }); - if (!scanResult.ok) { - return R.err(new Error(`Failed to scan files: ${String(scanResult.error)}`)); - } - const { files } = scanResult.value; - const fileStates = new Map(); - for (const file of files) { - const relativePath = path.relative(baseDir, file.filePath); - // Extract status from feature tags - const status = extractStatusFromTags(file.feature.tags); - const normalizedStatusValue = normalizeStatus(status); - const protection = getProtectionLevel(status); - // Extract deliverables from background (canonical extractor with case-insensitive headers) - const deliverables = extractDeliverables(file).map((d) => d.name); - // Check for unlock reason - const unlockInfo = extractUnlockReason(file.feature.tags); - // Build file state (handle exactOptionalPropertyTypes) - const fileState = { - path: file.filePath, - relativePath, - status, - normalizedStatus: normalizedStatusValue, - protection, - deliverables, - hasUnlockReason: unlockInfo.hasUnlockReason, - }; - // Only add unlockReason if it exists (exactOptionalPropertyTypes compliance) - if (unlockInfo.unlockReason !== undefined) { - fileState.unlockReason = unlockInfo.unlockReason; - } - fileStates.set(relativePath, fileState); - } - return R.ok(fileStates); -} -/** - * Extract status value from feature tags. - */ -function extractStatusFromTags(tags) { - for (const tag of tags) { - // Handle @libar-docs-status:value format - if (tag.includes('status:')) { - const match = /status:(\w+)/.exec(tag); - if (match?.[1]) { - const status = match[1].toLowerCase(); - if (PROCESS_STATUS_VALUES.includes(status)) { - return status; - } - } - } - } - // Default to roadmap if no status found - return DEFAULT_STATUS; -} -/** - * Extract unlock reason from tags. - * - * Validates that unlock reasons are meaningful: - * - Minimum 10 characters - * - Not a placeholder value (test, xxx, bypass, temp, todo, fixme) - * - * If the tag exists but the reason is invalid, hasUnlockReason is false - * so the completed-protection rule will catch it. - */ -function extractUnlockReason(tags) { - const PLACEHOLDER_VALUES = /^(test|xxx|bypass|temp|todo|fixme)$/i; - const MIN_LENGTH = 10; - for (const tag of tags) { - if (tag.includes('unlock-reason:')) { - const match = /unlock-reason:["']?([^"']+)["']?/.exec(tag); - const value = match?.[1]?.trim(); - // Require meaningful reason (10+ chars, not a placeholder) - if (value && value.length >= MIN_LENGTH && !PLACEHOLDER_VALUES.test(value)) { - return { hasUnlockReason: true, unlockReason: value }; - } - // Tag exists but reason is invalid - treat as no unlock reason - // This allows the completed-protection rule to catch it - } - } - return { hasUnlockReason: false, unlockReason: undefined }; -} -/** - * Find active session from sessions directory. - */ -async function findActiveSession(sessionsDir, baseDir) { - try { - // Check if sessions directory exists - try { - await fs.access(sessionsDir); - } - catch { - // No sessions directory, that's fine - return R.ok(undefined); - } - // Find session files - const sessionFiles = await glob('*.feature', { - cwd: sessionsDir, - absolute: true, - }); - for (const sessionFile of sessionFiles) { - const session = await parseSessionFile(sessionFile, baseDir); - if (session?.status === 'active') { - return R.ok(session); - } - } - return R.ok(undefined); - } - catch (error) { - return R.err(error instanceof Error ? error : new Error(String(error))); - } -} -/** - * Parse a session definition file. - */ -async function parseSessionFile(filePath, baseDir) { - const scanResult = await scanGherkinFiles({ - patterns: [filePath], - baseDir, - }); - if (!scanResult.ok || scanResult.value.files.length === 0) { - return undefined; - } - const file = scanResult.value.files[0]; - if (!file) - return undefined; - const tags = file.feature.tags; - // Extract session ID - const sessionId = extractTagValue(tags, 'session-id'); - if (!sessionId) - return undefined; - // Extract session status - const sessionStatusRaw = extractTagValue(tags, 'session-status'); - const sessionStatus = sessionStatusRaw === 'active' || sessionStatusRaw === 'closed' ? sessionStatusRaw : 'draft'; - // Extract scoped specs (from background table or tags) - const scopedSpecs = extractScopedSpecs(file.background); - const excludedSpecs = extractExcludedSpecs(file.background); - return { - id: sessionId, - status: sessionStatus, - scopedSpecs, - excludedSpecs, - sessionFile: filePath, - }; -} -/** - * Extract a tag value by key. - */ -function extractTagValue(tags, key) { - for (const tag of tags) { - const pattern = new RegExp(`${key}:["']?([^"'\\s]+)["']?`); - const match = tag.match(pattern); - if (match?.[1]) { - return match[1]; - } - } - return undefined; -} -/** - * Extract scoped specs from session background. - * Uses unknown type to handle exactOptionalPropertyTypes compatibility. - */ -function extractScopedSpecs(background) { - if (background === null || background === undefined || typeof background !== 'object') - return []; - const bg = background; - if (bg.steps === undefined) - return []; - const specs = []; - for (const step of bg.steps) { - const rows = step.dataTable?.rows; - if (rows) { - for (const row of rows) { - const spec = row['spec'] ?? row['Spec']; - if (spec) { - specs.push(spec); - } - } - } - } - return specs; -} -/** - * Extract excluded specs from session background. - */ -function extractExcludedSpecs(_background) { - // For now, return empty - can be extended to parse exclusion tables - return []; -} -// ============================================================================= -// Utility Functions -// ============================================================================= -/** - * Get file state from process state. - */ -export function getFileState(state, relativePath) { - return state.files.get(relativePath); -} -/** - * Get all files with a specific protection level. - */ -export function getFilesByProtection(state, protection) { - const files = []; - for (const file of state.files.values()) { - if (file.protection === protection) { - files.push(file); - } - } - return files; -} -/** - * Check if a file is in the active session scope. - * - * Uses smart matching based on spec format: - * - If spec contains path separator: Use path-aware matching - * - `specs/auth.feature` matches exactly `specs/auth.feature` - * - `specs/auth/` matches `specs/auth/login.feature` - * - If spec is just a name: Use substring matching - * - `auth` matches `specs/auth.feature` or `tests/auth/test.ts` - */ -export function isInSessionScope(state, relativePath) { - if (!state.activeSession) { - return true; // No session means all files are in scope - } - const normalizedPath = path.normalize(relativePath); - for (const spec of state.activeSession.scopedSpecs) { - if (matchesSpec(normalizedPath, spec)) { - return true; - } - } - return false; -} -/** - * Check if a file is explicitly excluded from session. - * - * Uses smart matching based on spec format: - * - If spec contains path separator: Use path-aware matching - * - `specs/legacy.feature` matches exactly `specs/legacy.feature` - * - `specs/legacy/` matches `specs/legacy/old.feature` - * - If spec is just a name: Use substring matching - * - `legacy` matches `specs/phase-legacy.feature` - */ -export function isSessionExcluded(state, relativePath) { - if (!state.activeSession) { - return false; - } - const normalizedPath = path.normalize(relativePath); - for (const spec of state.activeSession.excludedSpecs) { - if (matchesSpec(normalizedPath, spec)) { - return true; - } - } - return false; -} -/** - * Match a file path against a spec pattern. - * - * Two matching modes: - * 1. Path-aware: If spec contains path separator, use strict path matching - * - Exact match or directory prefix match - * 2. Substring: If spec is just a name, match anywhere in the path - * - * @param normalizedPath - The normalized file path to check - * @param spec - The spec pattern to match against - * @returns true if the path matches the spec - */ -function matchesSpec(normalizedPath, spec) { - const normalizedSpec = path.normalize(spec); - // If spec contains a path separator, use path-aware matching - if (spec.includes('/') || spec.includes(path.sep)) { - return (normalizedPath === normalizedSpec || normalizedPath.startsWith(normalizedSpec + path.sep)); - } - // Otherwise, use substring matching for simple names - return normalizedPath.includes(spec); -} -//# sourceMappingURL=derive-state.js.map \ No newline at end of file diff --git a/dist/lint/process-guard/derive-state.js.map b/dist/lint/process-guard/derive-state.js.map deleted file mode 100644 index f8f210cb..00000000 --- a/dist/lint/process-guard/derive-state.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"derive-state.js","sourceRoot":"","sources":["../../../src/lint/process-guard/derive-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAC/E,OAAO,EAAE,kBAAkB,EAAwB,MAAM,+BAA+B,CAAC;AACzF,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,eAAe,GAEhB,MAAM,yBAAyB,CAAC;AAmBjC,iFAAiF;AACjF,MAAM,qBAAqB,GAAG;IAC5B,+BAA+B;IAC/B,oBAAoB,EAAE,gBAAgB;CACvC,CAAC;AAEF,gFAAgF;AAChF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AAY;IACvD,MAAM,cAAc,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAE5C,6DAA6D;IAC7D,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QAClD,OAAO,CACL,cAAc,KAAK,cAAc,IAAI,cAAc,CAAC,UAAU,CAAC,cAAc,GAAG,IAAI,CAAC,GAAG,CAAC,CAC1F,CAAC;IACJ,CAAC;IAED,qDAAqD;IACrD,OAAO,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AACvC,CAAC"} \ No newline at end of file diff --git a/dist/lint/process-guard/detect-changes.d.ts b/dist/lint/process-guard/detect-changes.d.ts deleted file mode 100644 index 638ee88c..00000000 --- a/dist/lint/process-guard/detect-changes.d.ts +++ /dev/null @@ -1,107 +0,0 @@ -/** - * @libar-docs - * @libar-docs-lint - * @libar-docs-pattern DetectChanges - * @libar-docs-status active - * @libar-docs-implements ProcessGuardLinter - * @libar-docs-uses DeriveProcessState - * - * ## DetectChanges - Git Diff Change Detection - * - * Detects changes from git diff including: - * - Modified, added, deleted files - * - Status transitions (@libar-docs-status changes) - * - Deliverable changes in Background tables - * - * ### Design Principles - * - * - **Parse Git Output**: Uses `git diff --name-status` and `git diff` - * - **Status Detection**: Regex patterns for @libar-docs-status changes - * - **Deliverable Detection**: Parses DataTable changes - * - * Note: Taxonomy modification detection was removed when taxonomy - * moved from JSON to TypeScript (src/taxonomy/). TypeScript changes - * require recompilation, making runtime detection unnecessary. - * - * ### When to Use - * - * - When validating staged changes (pre-commit) - * - When validating all changes against main branch - * - When detecting scope creep (new deliverables) - */ -import type { Result } from '../../types/index.js'; -import type { ChangeDetection, StatusTransition, DeliverableChange } from './types.js'; -import type { WithTagRegistry } from '../../validation/types.js'; -/** - * Options for change detection functions. - * - * Currently only includes registry from WithTagRegistry, but kept as a - * separate interface for future extensibility (e.g., adding filter options). - */ -export type ChangeDetectionOptions = WithTagRegistry; -/** - * Detect changes from git staged files. - * - * @param baseDir - Repository base directory - * @param options - Optional change detection options with registry - * @returns Result containing change detection or error - * - * @example - * ```typescript - * const result = await detectStagedChanges('/path/to/repo'); - * if (result.ok) { - * console.log(`${result.value.modifiedFiles.length} files changed`); - * } - * ``` - */ -export declare function detectStagedChanges(baseDir: string, options?: ChangeDetectionOptions): Result; -/** - * Detect all changes compared to a base branch. - * - * @param baseDir - Repository base directory - * @param baseBranch - Branch to compare against (default: main) - * @param options - Optional change detection options with registry - * @returns Result containing change detection or error - */ -export declare function detectBranchChanges(baseDir: string, baseBranch?: string, options?: ChangeDetectionOptions): Result; -/** - * Detect changes for specific files. - * - * @param baseDir - Repository base directory - * @param files - Files to analyze - * @param options - Optional change detection options with registry - * @returns Result containing change detection or error - */ -export declare function detectFileChanges(baseDir: string, files: readonly string[], options?: ChangeDetectionOptions): Result; -/** - * Detect deliverable changes from diff content. - * - * Only matches table rows that appear within a deliverable table context, - * identified by a preceding header row containing both "Deliverable" and "Status". - * This prevents false positives from Examples tables, DocString-embedded tables, - * and other non-deliverable table content. - * - * @internal Exported for testing purposes only. - */ -export declare function detectDeliverableChanges(diff: string, files: readonly string[]): Array<[string, DeliverableChange]>; -/** - * Check if any files were modified. - */ -export declare function hasChanges(detection: ChangeDetection): boolean; -/** - * Get all changed files (modified + added + deleted). - */ -export declare function getAllChangedFiles(detection: ChangeDetection): readonly string[]; -/** - * Check if a specific file was modified. - */ -export declare function fileWasModified(detection: ChangeDetection, relativePath: string): boolean; -/** - * Get status transition for a file. - */ -export declare function getStatusTransition(detection: ChangeDetection, relativePath: string): StatusTransition | undefined; -/** - * Get deliverable changes for a file. - */ -export declare function getDeliverableChanges(detection: ChangeDetection, relativePath: string): DeliverableChange | undefined; -//# sourceMappingURL=detect-changes.d.ts.map \ No newline at end of file diff --git a/dist/lint/process-guard/detect-changes.d.ts.map b/dist/lint/process-guard/detect-changes.d.ts.map deleted file mode 100644 index 51f5f967..00000000 --- a/dist/lint/process-guard/detect-changes.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"detect-changes.d.ts","sourceRoot":"","sources":["../../../src/lint/process-guard/detect-changes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAIH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAGnD,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EAElB,MAAM,YAAY,CAAC;AAGpB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AASjE;;;;;GAKG;AACH,MAAM,MAAM,sBAAsB,GAAG,eAAe,CAAC;AAMrD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,sBAAsB,GAC/B,MAAM,CAAC,eAAe,CAAC,CA2BzB;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,MAAM,EACf,UAAU,SAAS,EACnB,OAAO,CAAC,EAAE,sBAAsB,GAC/B,MAAM,CAAC,eAAe,CAAC,CAiCzB;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,OAAO,CAAC,EAAE,sBAAsB,GAC/B,MAAM,CAAC,eAAe,CAAC,CAyCzB;AA6SD;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,SAAS,MAAM,EAAE,GACvB,KAAK,CAAC,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC,CA0GpC;AAMD;;GAEG;AACH,wBAAgB,UAAU,CAAC,SAAS,EAAE,eAAe,GAAG,OAAO,CAM9D;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,eAAe,GAAG,SAAS,MAAM,EAAE,CAEhF;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAIzF;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,eAAe,EAC1B,YAAY,EAAE,MAAM,GACnB,gBAAgB,GAAG,SAAS,CAE9B;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,eAAe,EAC1B,YAAY,EAAE,MAAM,GACnB,iBAAiB,GAAG,SAAS,CAE/B"} \ No newline at end of file diff --git a/dist/lint/process-guard/detect-changes.js b/dist/lint/process-guard/detect-changes.js deleted file mode 100644 index b526980e..00000000 --- a/dist/lint/process-guard/detect-changes.js +++ /dev/null @@ -1,553 +0,0 @@ -/** - * @libar-docs - * @libar-docs-lint - * @libar-docs-pattern DetectChanges - * @libar-docs-status active - * @libar-docs-implements ProcessGuardLinter - * @libar-docs-uses DeriveProcessState - * - * ## DetectChanges - Git Diff Change Detection - * - * Detects changes from git diff including: - * - Modified, added, deleted files - * - Status transitions (@libar-docs-status changes) - * - Deliverable changes in Background tables - * - * ### Design Principles - * - * - **Parse Git Output**: Uses `git diff --name-status` and `git diff` - * - **Status Detection**: Regex patterns for @libar-docs-status changes - * - **Deliverable Detection**: Parses DataTable changes - * - * Note: Taxonomy modification detection was removed when taxonomy - * moved from JSON to TypeScript (src/taxonomy/). TypeScript changes - * require recompilation, making runtime detection unnecessary. - * - * ### When to Use - * - * - When validating staged changes (pre-commit) - * - When validating all changes against main branch - * - When detecting scope creep (new deliverables) - */ -import { execFileSync } from 'child_process'; -import * as path from 'path'; -import { Result as R } from '../../types/index.js'; -import { PROCESS_STATUS_VALUES } from '../../taxonomy/index.js'; -import { DEFAULT_TAG_PREFIX } from '../../config/defaults.js'; -import { DEFAULT_STATUS } from '../../taxonomy/status-values.js'; -/** - * Maximum buffer size for git command output (50MB). - * Large enough to handle staging entire dist/ folders with source maps. - * Prevents ENOBUFS errors when diff output exceeds Node.js default (~1MB). - */ -const GIT_MAX_BUFFER = 50 * 1024 * 1024; -// ============================================================================= -// Core Functions -// ============================================================================= -/** - * Detect changes from git staged files. - * - * @param baseDir - Repository base directory - * @param options - Optional change detection options with registry - * @returns Result containing change detection or error - * - * @example - * ```typescript - * const result = await detectStagedChanges('/path/to/repo'); - * if (result.ok) { - * console.log(`${result.value.modifiedFiles.length} files changed`); - * } - * ``` - */ -export function detectStagedChanges(baseDir, options) { - const tagPrefix = options?.registry?.tagPrefix ?? DEFAULT_TAG_PREFIX; - try { - // Get list of staged files with status - const nameStatus = execGitSafe('diff', ['--cached', '--name-status'], baseDir); - const { modified, added, deleted } = parseNameStatus(nameStatus); - // Get full diff for content analysis - const diff = execGitSafe('diff', ['--cached'], baseDir); - // Detect status transitions - const statusTransitions = detectStatusTransitions(diff, [...modified, ...added], tagPrefix); - // Detect deliverable changes - const deliverableChanges = detectDeliverableChanges(diff, [...modified, ...added]); - return R.ok({ - modifiedFiles: modified, - addedFiles: added, - deletedFiles: deleted, - statusTransitions: new Map(statusTransitions), - deliverableChanges: new Map(deliverableChanges), - }); - } - catch (error) { - return R.err(error instanceof Error ? error : new Error(String(error))); - } -} -/** - * Detect all changes compared to a base branch. - * - * @param baseDir - Repository base directory - * @param baseBranch - Branch to compare against (default: main) - * @param options - Optional change detection options with registry - * @returns Result containing change detection or error - */ -export function detectBranchChanges(baseDir, baseBranch = 'main', options) { - const tagPrefix = options?.registry?.tagPrefix ?? DEFAULT_TAG_PREFIX; - try { - // Validate branch name to prevent command injection - const safeBranch = sanitizeBranchName(baseBranch); - // Get merge base using safe execution (array args, no shell interpolation) - const mergeBase = execGitSafe('merge-base', [safeBranch, 'HEAD'], baseDir).trim(); - // Get list of changed files - const nameStatus = execGitSafe('diff', ['--name-status', mergeBase], baseDir); - const { modified, added, deleted } = parseNameStatus(nameStatus); - // Get full diff - const diff = execGitSafe('diff', [mergeBase], baseDir); - // Detect status transitions - const statusTransitions = detectStatusTransitions(diff, [...modified, ...added], tagPrefix); - // Detect deliverable changes - const deliverableChanges = detectDeliverableChanges(diff, [...modified, ...added]); - return R.ok({ - modifiedFiles: modified, - addedFiles: added, - deletedFiles: deleted, - statusTransitions: new Map(statusTransitions), - deliverableChanges: new Map(deliverableChanges), - }); - } - catch (error) { - return R.err(error instanceof Error ? error : new Error(String(error))); - } -} -/** - * Detect changes for specific files. - * - * @param baseDir - Repository base directory - * @param files - Files to analyze - * @param options - Optional change detection options with registry - * @returns Result containing change detection or error - */ -export function detectFileChanges(baseDir, files, options) { - const tagPrefix = options?.registry?.tagPrefix ?? DEFAULT_TAG_PREFIX; - try { - const modified = []; - const added = []; - for (const file of files) { - const fullPath = path.isAbsolute(file) ? file : path.join(baseDir, file); - const relativePath = path.relative(baseDir, fullPath); - // Check if file is tracked (use -- to separate path from options) - try { - execGitSafe('ls-files', ['--error-unmatch', '--', relativePath], baseDir); - modified.push(relativePath); - } - catch { - // File not tracked, might be new - added.push(relativePath); - } - } - // Get diff for modified files (use -- to separate paths from options) - const diff = modified.length > 0 ? execGitSafe('diff', ['HEAD', '--', ...modified], baseDir) : ''; - // Detect status transitions - const statusTransitions = detectStatusTransitions(diff, modified, tagPrefix); - // Detect deliverable changes - const deliverableChanges = detectDeliverableChanges(diff, modified); - return R.ok({ - modifiedFiles: modified, - addedFiles: added, - deletedFiles: [], - statusTransitions: new Map(statusTransitions), - deliverableChanges: new Map(deliverableChanges), - }); - } - catch (error) { - return R.err(error instanceof Error ? error : new Error(String(error))); - } -} -// ============================================================================= -// Git Helpers -// ============================================================================= -/** - * Execute a git command safely using execFileSync to prevent command injection. - * - * Uses array-based arguments instead of string interpolation to avoid shell - * metacharacter injection vulnerabilities. - * - * @param subcommand - Git subcommand (e.g., 'merge-base', 'diff', 'ls-files') - * @param args - Array of arguments (never interpolated into a shell command) - * @param cwd - Working directory - * @returns Command output as string - */ -function execGitSafe(subcommand, args, cwd) { - return execFileSync('git', [subcommand, ...args], { - cwd, - encoding: 'utf-8', - stdio: ['pipe', 'pipe', 'pipe'], - maxBuffer: GIT_MAX_BUFFER, - }); -} -/** - * Validate and sanitize a git branch name to prevent command injection. - * - * Allows only alphanumeric characters, dots, hyphens, underscores, and forward slashes. - * This matches the valid git branch name character set per git-check-ref-format. - * - * @param branch - Branch name to validate - * @returns The validated branch name (unchanged if valid) - * @throws Error if branch name contains invalid characters - */ -function sanitizeBranchName(branch) { - // Git branch names: alphanumeric, dots, hyphens, underscores, forward slashes - // Excludes shell metacharacters: ; | & $ ` ( ) { } [ ] < > ! ~ ^ * ? " ' \ - if (!/^[a-zA-Z0-9._\-/]+$/.test(branch)) { - throw new Error(`Invalid branch name: ${branch}`); - } - // Prevent path traversal attempts in branch names - if (branch.includes('..')) { - throw new Error(`Invalid branch name (contains ..): ${branch}`); - } - return branch; -} -/** - * Parse git name-status output into file lists. - */ -function parseNameStatus(output) { - const modified = []; - const added = []; - const deleted = []; - for (const line of output.split('\n')) { - const trimmed = line.trim(); - if (!trimmed) - continue; - const [status, ...pathParts] = trimmed.split(/\s+/); - const filePath = pathParts.join(' '); - if (!filePath) - continue; - switch (status) { - case 'M': - modified.push(filePath); - break; - case 'A': - added.push(filePath); - break; - case 'D': - deleted.push(filePath); - break; - case 'R': - case 'C': - // Renamed/Copied: path is "old -> new" - const newPath = filePath.includes('->') ? filePath.split('->')[1]?.trim() : filePath; - if (newPath) - modified.push(newPath); - break; - } - } - return { modified, added, deleted }; -} -// ============================================================================= -// Status Transition Detection -// ============================================================================= -/** - * Escape special regex characters in a string - */ -function escapeRegex(str) { - return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); -} -/** - * Check if a file path is in a generated docs directory. - * These directories contain embedded status examples that look like transitions. - */ -function isGeneratedDocsPath(filePath) { - const patterns = ['docs-living/', 'docs-generated/', 'docs/generated/']; - return patterns.some((p) => filePath.startsWith(p) || filePath.includes(`/${p}`)); -} -/** - * Detect status transitions from diff content. - * - * This function is docstring-aware: it tracks `"""` boundaries and only - * captures status tags that appear OUTSIDE docstrings. For new files, - * the FIRST valid status tag is used (not the last). - * - * Looks for lines like: - * -{tagPrefix}status:roadmap - * +{tagPrefix}status:active - * - * @param diff - Git diff content - * @param files - List of files to analyze - * @param tagPrefix - Tag prefix to match (default: "@libar-docs-") - */ -function detectStatusTransitions(diff, files, tagPrefix = DEFAULT_TAG_PREFIX) { - const transitions = []; - let currentFile = ''; - // Build regex patterns - const escapedPrefix = escapeRegex(tagPrefix); - const statusPattern = new RegExp(`${escapedPrefix}status:(\\w+)`); - const hunkHeaderPattern = /^@@ -\d+(?:,\d+)? \+(\d+)(?:,\d+)? @@/; - // Parse state per file - const fileStates = new Map(); - for (const line of diff.split('\n')) { - // Track current file from diff headers - if (line.startsWith('diff --git')) { - const match = /diff --git a\/(.+) b\/(.+)/.exec(line); - const file = match?.[2] ?? ''; - currentFile = file; - // Initialize state for relevant files - if (file && files.includes(file) && !isGeneratedDocsPath(file)) { - fileStates.set(file, { - newLineNumber: 0, - insideDocstring: false, - foundTags: [], - validAddedTag: null, - removedTag: null, - hasUnlockReason: false, - }); - } - continue; - } - // Get current file state - const state = currentFile ? fileStates.get(currentFile) : undefined; - if (!state) - continue; - // Track line numbers from hunk headers (@@ -old,count +new,count @@) - const hunkMatch = hunkHeaderPattern.exec(line); - if (hunkMatch?.[1]) { - // Hunk header gives starting line; we'll increment as we see lines - state.newLineNumber = parseInt(hunkMatch[1], 10) - 1; - // Reset docstring state at each hunk (conservative approach) - state.insideDocstring = false; - continue; - } - // Track line numbers: increment for context and added lines, not for removed - if (!line.startsWith('-') || line.startsWith('---')) { - state.newLineNumber++; - } - // Track docstring boundaries (""" in Gherkin/Python) - // Check both added and context lines for docstring markers - const lineContent = line.startsWith('+') || line.startsWith('-') ? line.substring(1) : line; - if (/^\s*"""/.test(lineContent)) { - state.insideDocstring = !state.insideDocstring; - } - // Detect unlock-reason tags in added lines - if (line.startsWith('+') && line.includes('unlock-reason')) { - state.hasUnlockReason = true; - } - // Look for removed status tags (old value for modified files) - if (line.startsWith('-') && !line.startsWith('---')) { - const oldMatch = statusPattern.exec(line); - if (oldMatch?.[1]) { - const location = { - lineNumber: state.newLineNumber, - insideDocstring: state.insideDocstring, - rawLine: line, - }; - state.foundTags.push(location); - // Capture removed tag if not inside docstring (first one wins) - if (!state.removedTag && !state.insideDocstring) { - state.removedTag = location; - } - } - } - // Look for added status tags (new value) - if (line.startsWith('+') && !line.startsWith('+++')) { - const newMatch = statusPattern.exec(line); - if (newMatch?.[1]) { - const toStatus = newMatch[1].toLowerCase(); - if (PROCESS_STATUS_VALUES.includes(toStatus)) { - const location = { - lineNumber: state.newLineNumber, - insideDocstring: state.insideDocstring, - rawLine: line, - }; - state.foundTags.push(location); - // Capture FIRST valid added tag (not inside docstring) - if (!state.validAddedTag && !state.insideDocstring) { - state.validAddedTag = location; - } - } - } - } - } - // Build transitions from parsed state - for (const [file, state] of fileStates) { - // Skip if no valid added tag found - if (!state.validAddedTag) - continue; - // Extract status values - const toMatch = statusPattern.exec(state.validAddedTag.rawLine); - const toStatusRaw = toMatch?.[1]?.toLowerCase(); - if (!toStatusRaw) - continue; - const toStatus = toStatusRaw; - const isNewFile = state.removedTag === null; - let fromStatus; - if (state.removedTag === null) { - // New file defaults from DEFAULT_STATUS - fromStatus = DEFAULT_STATUS; - } - else { - // state.removedTag is guaranteed to exist here - const fromMatch = statusPattern.exec(state.removedTag.rawLine); - const fromStatusRaw = fromMatch?.[1]?.toLowerCase(); - fromStatus = fromStatusRaw ? fromStatusRaw : DEFAULT_STATUS; - } - // Skip if no actual change - if (fromStatus === toStatus) - continue; - // Build transition with debug metadata - const transition = { - from: fromStatus, - to: toStatus, - isNewFile, - ...(state.hasUnlockReason ? { hasUnlockReason: true } : {}), - toLocation: state.validAddedTag, - // Include all detected tags if there were multiple (helps debug false positives) - ...(state.foundTags.length > 1 ? { allDetectedTags: state.foundTags } : {}), - }; - transitions.push([file, transition]); - } - return transitions; -} -// ============================================================================= -// Deliverable Change Detection -// ============================================================================= -/** - * Detect deliverable changes from diff content. - * - * Only matches table rows that appear within a deliverable table context, - * identified by a preceding header row containing both "Deliverable" and "Status". - * This prevents false positives from Examples tables, DocString-embedded tables, - * and other non-deliverable table content. - * - * @internal Exported for testing purposes only. - */ -export function detectDeliverableChanges(diff, files) { - const changes = []; - let currentFile = ''; - let inDeliverableTable = false; - // Regex for DataTable row with Deliverable column - // Matches: | Deliverable Name | Status | ... | - const deliverablePattern = /^\s*\|([^|]+)\|([^|]+)\|/; - const fileChanges = new Map(); - for (const line of diff.split('\n')) { - // Track current file - if (line.startsWith('diff --git')) { - const match = /diff --git a\/(.+) b\/(.+)/.exec(line); - currentFile = match?.[2] ?? ''; - inDeliverableTable = false; - if (currentFile && !fileChanges.has(currentFile)) { - fileChanges.set(currentFile, { added: [], removed: [], modified: [] }); - } - continue; - } - // Reset deliverable table context at hunk boundaries - if (line.startsWith('@@')) { - inDeliverableTable = false; - continue; - } - // Skip if not a relevant file - if (!currentFile || !files.includes(currentFile)) - continue; - // Strip diff prefix (+/-/space) to get raw content - const content = line.startsWith('+') || line.startsWith('-') ? line.substring(1) : line; - // Detect deliverable table header — sets context for subsequent rows - if (content.includes('Deliverable') && content.includes('Status') && content.includes('|')) { - inDeliverableTable = true; - continue; - } - // Exit deliverable table context on non-table or blank lines - if (inDeliverableTable) { - const trimmed = content.trim(); - if (trimmed !== '' && !trimmed.startsWith('|')) { - inDeliverableTable = false; - continue; - } - if (trimmed === '') { - inDeliverableTable = false; - continue; - } - } - // Only process rows within a deliverable table - if (!inDeliverableTable) - continue; - // Look for added deliverables - if (line.startsWith('+') && line.includes('|')) { - const match = deliverablePattern.exec(line.substring(1)); - if (match?.[1]) { - const deliverable = match[1].trim(); - if (deliverable && !deliverable.includes('---')) { - const fc = fileChanges.get(currentFile); - if (fc) - fc.added.push(deliverable); - } - } - } - // Look for removed deliverables - if (line.startsWith('-') && line.includes('|')) { - const match = deliverablePattern.exec(line.substring(1)); - if (match?.[1]) { - const deliverable = match[1].trim(); - if (deliverable && !deliverable.includes('---')) { - const fc = fileChanges.get(currentFile); - if (fc) - fc.removed.push(deliverable); - } - } - } - } - // Correlate added/removed to identify modifications (same deliverable, status change) - // When a deliverable's status changes, git shows it as a line deletion + addition. - // Deliverables appearing in both lists are modifications, not true additions/removals. - for (const [, change] of fileChanges) { - const removedSet = new Set(change.removed); - for (const deliverable of [...change.added]) { - if (removedSet.has(deliverable)) { - // Same deliverable in both = status/path changed, not scope change - change.modified.push(deliverable); - change.added = change.added.filter((d) => d !== deliverable); - change.removed = change.removed.filter((d) => d !== deliverable); - } - } - } - // Convert to array and filter empty - for (const [file, change] of fileChanges) { - if (change.added.length > 0 || change.removed.length > 0 || change.modified.length > 0) { - changes.push([file, change]); - } - } - return changes; -} -// ============================================================================= -// Utility Functions -// ============================================================================= -/** - * Check if any files were modified. - */ -export function hasChanges(detection) { - return (detection.modifiedFiles.length > 0 || - detection.addedFiles.length > 0 || - detection.deletedFiles.length > 0); -} -/** - * Get all changed files (modified + added + deleted). - */ -export function getAllChangedFiles(detection) { - return [...detection.modifiedFiles, ...detection.addedFiles, ...detection.deletedFiles]; -} -/** - * Check if a specific file was modified. - */ -export function fileWasModified(detection, relativePath) { - return (detection.modifiedFiles.includes(relativePath) || detection.addedFiles.includes(relativePath)); -} -/** - * Get status transition for a file. - */ -export function getStatusTransition(detection, relativePath) { - return detection.statusTransitions.get(relativePath); -} -/** - * Get deliverable changes for a file. - */ -export function getDeliverableChanges(detection, relativePath) { - return detection.deliverableChanges.get(relativePath); -} -//# sourceMappingURL=detect-changes.js.map \ No newline at end of file diff --git a/dist/lint/process-guard/detect-changes.js.map b/dist/lint/process-guard/detect-changes.js.map deleted file mode 100644 index b344fbb3..00000000 --- a/dist/lint/process-guard/detect-changes.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"detect-changes.js","sourceRoot":"","sources":["../../../src/lint/process-guard/detect-changes.ts"],"names":[],"mappings":"AAAA;;;;;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AU,eAAe,CAAC,SAA0B,EAAE,YAAoB;IAC9E,OAAO,CACL,SAAS,CAAC,aAAa,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAI,SAAS,CAAC,UAAU,CAAC,QAAQ,CAAC,YAAY,CAAC,CAC9F,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB,CACjC,SAA0B,EAC1B,YAAoB;IAEpB,OAAO,SAAS,CAAC,iBAAiB,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;AACvD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,qBAAqB,CACnC,SAA0B,EAC1B,YAAoB;IAEpB,OAAO,SAAS,CAAC,kBAAkB,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;AACxD,CAAC"} \ No newline at end of file diff --git a/dist/lint/process-guard/index.d.ts b/dist/lint/process-guard/index.d.ts deleted file mode 100644 index 8058061d..00000000 --- a/dist/lint/process-guard/index.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * @libar-docs - * @libar-docs-lint - * @libar-docs-pattern ProcessGuardModule - * @libar-docs-status active - * @libar-docs-implements ProcessGuardLinter - * @libar-docs-depends-on:FSMValidator,DeriveProcessState,DetectChanges,ProcessGuardDecider - * - * ## ProcessGuardModule - Process Guard Linter - * - * Enforces delivery process rules by validating changes against: - * - Protection levels (completed files require unlock-reason) - * - Status transitions (must follow PDR-005 FSM) - * - Scope creep (active specs cannot add new deliverables) - * - Session scope (modifications outside session warn) - * - * ### Architecture - * - * ``` - * derive-state.ts ─┐ - * ├──► decider.ts ──► ValidationResult - * detect-changes.ts┘ - * ``` - * - * ### When to Use - * - * - Pre-commit hook validation - * - CI/CD pipeline validation - * - Interactive validation during development - */ -export type { ProcessState, FileState, SessionState, SessionStatus, ChangeDetection, StatusTransition, DeliverableChange, ValidationResult, ProcessViolation, ViolationSeverity, ProcessGuardRule, ProcessGuardRuleDefinition, LintProcessOptions, ValidationMode, DeciderInput, DeciderOutput, DeciderEvent, DeciderOptions, } from './types.js'; -export { deriveProcessState, getFileState, getFilesByProtection, isInSessionScope, isSessionExcluded, type DeriveStateConfig, } from './derive-state.js'; -export { detectStagedChanges, detectBranchChanges, detectFileChanges, hasChanges, getAllChangedFiles, fileWasModified, getStatusTransition, getDeliverableChanges, detectDeliverableChanges, type ChangeDetectionOptions, } from './detect-changes.js'; -export { validateChanges, hasErrors, hasWarnings, getAllIssues, getViolationsByRule, summarizeResult, } from './decider.js'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/dist/lint/process-guard/index.d.ts.map b/dist/lint/process-guard/index.d.ts.map deleted file mode 100644 index 6d6e40e3..00000000 --- a/dist/lint/process-guard/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lint/process-guard/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAGH,YAAY,EACV,YAAY,EACZ,SAAS,EACT,YAAY,EACZ,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,0BAA0B,EAC1B,kBAAkB,EAClB,cAAc,EACd,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,cAAc,GACf,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,kBAAkB,EAClB,YAAY,EACZ,oBAAoB,EACpB,gBAAgB,EAChB,iBAAiB,EACjB,KAAK,iBAAiB,GACvB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,UAAU,EACV,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACnB,qBAAqB,EAErB,wBAAwB,EACxB,KAAK,sBAAsB,GAC5B,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACL,eAAe,EACf,SAAS,EACT,WAAW,EACX,YAAY,EACZ,mBAAmB,EACnB,eAAe,GAChB,MAAM,cAAc,CAAC"} \ No newline at end of file diff --git a/dist/lint/process-guard/index.js b/dist/lint/process-guard/index.js deleted file mode 100644 index 247d9cf9..00000000 --- a/dist/lint/process-guard/index.js +++ /dev/null @@ -1,39 +0,0 @@ -/** - * @libar-docs - * @libar-docs-lint - * @libar-docs-pattern ProcessGuardModule - * @libar-docs-status active - * @libar-docs-implements ProcessGuardLinter - * @libar-docs-depends-on:FSMValidator,DeriveProcessState,DetectChanges,ProcessGuardDecider - * - * ## ProcessGuardModule - Process Guard Linter - * - * Enforces delivery process rules by validating changes against: - * - Protection levels (completed files require unlock-reason) - * - Status transitions (must follow PDR-005 FSM) - * - Scope creep (active specs cannot add new deliverables) - * - Session scope (modifications outside session warn) - * - * ### Architecture - * - * ``` - * derive-state.ts ─┐ - * ├──► decider.ts ──► ValidationResult - * detect-changes.ts┘ - * ``` - * - * ### When to Use - * - * - Pre-commit hook validation - * - CI/CD pipeline validation - * - Interactive validation during development - */ -// Derive State -export { deriveProcessState, getFileState, getFilesByProtection, isInSessionScope, isSessionExcluded, } from './derive-state.js'; -// Detect Changes -export { detectStagedChanges, detectBranchChanges, detectFileChanges, hasChanges, getAllChangedFiles, fileWasModified, getStatusTransition, getDeliverableChanges, -// @internal - Exported for testing purposes only -detectDeliverableChanges, } from './detect-changes.js'; -// Decider -export { validateChanges, hasErrors, hasWarnings, getAllIssues, getViolationsByRule, summarizeResult, } from './decider.js'; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/lint/process-guard/index.js.map b/dist/lint/process-guard/index.js.map deleted file mode 100644 index 79871631..00000000 --- a/dist/lint/process-guard/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lint/process-guard/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAwBH,eAAe;AACf,OAAO,EACL,kBAAkB,EAClB,YAAY,EACZ,oBAAoB,EACpB,gBAAgB,EAChB,iBAAiB,GAElB,MAAM,mBAAmB,CAAC;AAE3B,iBAAiB;AACjB,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,UAAU,EACV,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACnB,qBAAqB;AACrB,iDAAiD;AACjD,wBAAwB,GAEzB,MAAM,qBAAqB,CAAC;AAE7B,UAAU;AACV,OAAO,EACL,eAAe,EACf,SAAS,EACT,WAAW,EACX,YAAY,EACZ,mBAAmB,EACnB,eAAe,GAChB,MAAM,cAAc,CAAC"} \ No newline at end of file diff --git a/dist/lint/process-guard/types.d.ts b/dist/lint/process-guard/types.d.ts deleted file mode 100644 index 59dcfa72..00000000 --- a/dist/lint/process-guard/types.d.ts +++ /dev/null @@ -1,255 +0,0 @@ -/** - * @libar-docs - * @libar-docs-lint - * @libar-docs-pattern ProcessGuardTypes - * @libar-docs-status active - * @libar-docs-implements ProcessGuardLinter - * @libar-docs-depends-on:FSMValidator - * @libar-docs-extract-shapes ProcessGuardRule, DeciderInput, ValidationResult, ProcessViolation, FileState - * - * ## ProcessGuardTypes - Type Definitions for Process Guard Linter - * - * Defines types for the process guard linter including: - * - Process state derived from file annotations - * - Git diff change detection results - * - Validation results (violations and warnings) - * - Session scoping types - * - * ### When to Use - * - * - When importing types for process guard implementations - * - When implementing custom validation rules or decider functions - * - When working with process state or change detection results - * - * ### Design Principles - * - * - Types enable pure Decider pattern (no I/O in validation) - * - State is derived, not stored - * - Protection levels from PDR-005 FSM - */ -import type { ProcessStatusValue, NormalizedStatus } from '../../taxonomy/index.js'; -import type { ProtectionLevel } from '../../validation/fsm/index.js'; -import type { TagRegistry } from '../../validation-schemas/tag-registry.js'; -/** - * Complete process state derived from file annotations. - * This is computed by scanning files, not stored separately. - */ -export interface ProcessState { - /** Map of file paths to their derived state */ - readonly files: Map; - /** Active session if one exists */ - readonly activeSession?: SessionState; - /** Timestamp when state was derived */ - readonly derivedAt: string; -} -/** - * State for a single file derived from its @libar-docs-* annotations. - */ -export interface FileState { - /** Absolute file path */ - readonly path: string; - /** Relative path from project root */ - readonly relativePath: string; - /** Status from @libar-docs-status annotation */ - readonly status: ProcessStatusValue; - /** Normalized status for display */ - readonly normalizedStatus: NormalizedStatus; - /** Protection level from FSM (none/scope/hard) */ - readonly protection: ProtectionLevel; - /** Deliverable names from Background table */ - readonly deliverables: readonly string[]; - /** Whether file has @libar-docs-unlock-reason */ - readonly hasUnlockReason: boolean; - /** The unlock reason text if present */ - readonly unlockReason?: string; -} -/** Session status lifecycle */ -export type SessionStatus = 'draft' | 'active' | 'closed'; -/** - * State for a work session that scopes modifications. - */ -export interface SessionState { - /** Session identifier from @libar-docs-session-id */ - readonly id: string; - /** Session lifecycle status */ - readonly status: SessionStatus; - /** Specs that can be modified in this session */ - readonly scopedSpecs: readonly string[]; - /** Specs explicitly excluded from modification */ - readonly excludedSpecs: readonly string[]; - /** Session file path */ - readonly sessionFile: string; -} -/** - * Result of detecting changes from git diff. - */ -export interface ChangeDetection { - /** Files that were modified (relative paths) */ - readonly modifiedFiles: readonly string[]; - /** Files that were added */ - readonly addedFiles: readonly string[]; - /** Files that were deleted */ - readonly deletedFiles: readonly string[]; - /** Status transitions detected (file path -> transition) */ - readonly statusTransitions: ReadonlyMap; - /** Deliverable changes detected (file path -> changes) */ - readonly deliverableChanges: ReadonlyMap; -} -/** - * Location of a detected status tag in the git diff. - * Used for debugging false positives and enhancing error messages. - */ -export interface StatusTagLocation { - /** Line number in the new file version */ - readonly lineNumber: number; - /** Whether this tag was inside a docstring (""") */ - readonly insideDocstring: boolean; - /** The raw line from git diff (for debugging) */ - readonly rawLine: string; -} -/** - * A status transition detected in a file. - */ -export interface StatusTransition { - readonly from: ProcessStatusValue; - readonly to: ProcessStatusValue; - /** True if this is a new file (no previous status, defaults from 'roadmap') */ - readonly isNewFile?: boolean; - /** True if the diff contains unlock-reason tag (supports file splits) */ - readonly hasUnlockReason?: boolean; - /** Location of the 'to' status tag */ - readonly toLocation?: StatusTagLocation; - /** All status tags found in diff (for debugging false positives) */ - readonly allDetectedTags?: readonly StatusTagLocation[]; -} -/** - * Deliverable changes detected in a file's Background table. - */ -export interface DeliverableChange { - readonly added: readonly string[]; - readonly removed: readonly string[]; - readonly modified: readonly string[]; -} -/** Violation severity level */ -export type ViolationSeverity = 'error' | 'warning'; -/** - * A validation violation from the process guard linter. - */ -export interface ProcessViolation { - /** Unique rule ID that triggered the violation */ - readonly rule: ProcessGuardRule; - /** Severity (error = blocking, warning = informational) */ - readonly severity: ViolationSeverity; - /** Human-readable error message */ - readonly message: string; - /** File that triggered the violation */ - readonly file: string; - /** Suggested fix or action */ - readonly suggestion?: string; -} -/** - * Result of process guard validation. - */ -export interface ValidationResult { - /** Whether all checks passed (no errors) */ - readonly valid: boolean; - /** Blocking violations (must be fixed) */ - readonly violations: readonly ProcessViolation[]; - /** Non-blocking warnings */ - readonly warnings: readonly ProcessViolation[]; - /** Process state at time of validation */ - readonly processState: ProcessState; - /** Changes that were validated */ - readonly changes: ChangeDetection; -} -/** - * Process guard rule identifiers. - * - * Note: `taxonomy-locked-tag` and `taxonomy-enum-in-use` were removed when - * taxonomy moved from JSON to TypeScript. TypeScript changes require - * recompilation, making runtime validation unnecessary. - */ -export type ProcessGuardRule = 'completed-protection' | 'scope-creep' | 'invalid-status-transition' | 'session-scope' | 'session-excluded' | 'deliverable-removed'; -/** - * A process guard validation rule. - */ -export interface ProcessGuardRuleDefinition { - /** Unique rule ID */ - readonly id: ProcessGuardRule; - /** Default severity level */ - readonly severity: ViolationSeverity; - /** Human-readable rule description */ - readonly description: string; - /** - * Validate changes against this rule. - * - * @param state - Current process state - * @param changes - Detected changes - * @returns Array of violations (empty if rule passes) - */ - validate: (state: ProcessState, changes: ChangeDetection) => readonly ProcessViolation[]; -} -/** CLI validation mode */ -export type ValidationMode = 'staged' | 'all' | 'files'; -/** - * CLI options for lint:process command. - */ -export interface LintProcessOptions { - /** Validation mode */ - readonly mode: ValidationMode; - /** Specific files to validate (when mode is 'files') */ - readonly files?: readonly string[]; - /** Treat warnings as errors */ - readonly strict: boolean; - /** Ignore session scope rules */ - readonly ignoreSession: boolean; - /** Show derived process state (debugging) */ - readonly showState: boolean; - /** Base directory for relative paths */ - readonly baseDir: string; -} -/** - * Options for the process guard decider. - */ -export interface DeciderOptions { - /** Treat warnings as errors */ - readonly strict: boolean; - /** Ignore session scope rules */ - readonly ignoreSession: boolean; - /** Tag registry for prefix-aware error messages (optional) */ - readonly registry?: TagRegistry; -} -/** - * Input to the process guard decider. - * Contains all information needed for validation. - */ -export interface DeciderInput { - readonly state: ProcessState; - readonly changes: ChangeDetection; - readonly options: DeciderOptions; -} -/** - * Output from the process guard decider. - * Pure function result with no side effects. - */ -export interface DeciderOutput { - readonly result: ValidationResult; - /** Commands to emit (for logging/metrics) */ - readonly events: readonly DeciderEvent[]; -} -/** - * Events emitted by the decider for observability. - */ -export type DeciderEvent = { - type: 'validation_started'; - fileCount: number; -} | { - type: 'rule_checked'; - rule: ProcessGuardRule; - passed: boolean; -} | { - type: 'validation_completed'; - valid: boolean; - violationCount: number; -}; -//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/dist/lint/process-guard/types.d.ts.map b/dist/lint/process-guard/types.d.ts.map deleted file mode 100644 index 069ecc81..00000000 --- a/dist/lint/process-guard/types.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lint/process-guard/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACpF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAM5E;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,+CAA+C;IAC/C,Q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CAAC;IAAC,IAAI,EAAE,gBAAgB,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,GACjE;IAAE,IAAI,EAAE,sBAAsB,CAAC;IAAC,KAAK,EAAE,OAAO,CAAC;IAAC,cAAc,EAAE,MAAM,CAAA;CAAE,CAAC"} \ No newline at end of file diff --git a/dist/lint/process-guard/types.js b/dist/lint/process-guard/types.js deleted file mode 100644 index de9606b4..00000000 --- a/dist/lint/process-guard/types.js +++ /dev/null @@ -1,31 +0,0 @@ -/** - * @libar-docs - * @libar-docs-lint - * @libar-docs-pattern ProcessGuardTypes - * @libar-docs-status active - * @libar-docs-implements ProcessGuardLinter - * @libar-docs-depends-on:FSMValidator - * @libar-docs-extract-shapes ProcessGuardRule, DeciderInput, ValidationResult, ProcessViolation, FileState - * - * ## ProcessGuardTypes - Type Definitions for Process Guard Linter - * - * Defines types for the process guard linter including: - * - Process state derived from file annotations - * - Git diff change detection results - * - Validation results (violations and warnings) - * - Session scoping types - * - * ### When to Use - * - * - When importing types for process guard implementations - * - When implementing custom validation rules or decider functions - * - When working with process state or change detection results - * - * ### Design Principles - * - * - Types enable pure Decider pattern (no I/O in validation) - * - State is derived, not stored - * - Protection levels from PDR-005 FSM - */ -export {}; -//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/dist/lint/process-guard/types.js.map b/dist/lint/process-guard/types.js.map deleted file mode 100644 index 88e4e7b6..00000000 --- a/dist/lint/process-guard/types.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/lint/process-guard/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG"} \ No newline at end of file diff --git a/dist/lint/rules.d.ts b/dist/lint/rules.d.ts deleted file mode 100644 index 330a770e..00000000 --- a/dist/lint/rules.d.ts +++ /dev/null @@ -1,150 +0,0 @@ -/** - * @libar-docs - * @libar-docs-lint - * @libar-docs-pattern LintRules - * @libar-docs-status completed - * @libar-docs-arch-role service - * @libar-docs-arch-context lint - * @libar-docs-arch-layer application - * @libar-docs-implements PatternRelationshipModel - * @libar-docs-used-by LintEngine - * @libar-docs-extract-shapes LintRule, LintContext, defaultRules, severityOrder, filterRulesBySeverity, missingPatternName, missingStatus, invalidStatus, missingWhenToUse, tautologicalDescription, missingRelationships, patternConflictInImplements, missingRelationshipTarget - * - * ## LintRules - Annotation Quality Rules - * - * Defines lint rules that check @libar-docs-* directives for completeness - * and quality. Rules include: missing-pattern-name, missing-status, - * missing-when-to-use, tautological-description, and missing-relationships. - * - * ### When to Use - * - * - Use `defaultRules` for standard quality checks - * - Use `filterRulesBySeverity()` to customize which rules apply - * - Use individual rules for targeted validation - */ -import type { DocDirective } from '../validation-schemas/doc-directive.js'; -import type { LintSeverity, LintViolation } from '../validation-schemas/lint.js'; -import type { TagRegistry } from '../validation-schemas/tag-registry.js'; -/** - * Context for lint rules that need access to the full pattern registry. - * Used for "strict mode" validation where relationships are checked - * against known patterns. - */ -export interface LintContext { - /** Set of known pattern names for relationship validation */ - readonly knownPatterns: ReadonlySet; - /** Tag registry for prefix-aware error messages (optional) */ - readonly registry?: TagRegistry; -} -/** - * A lint rule that checks a parsed directive - */ -export interface LintRule { - /** Unique rule ID */ - readonly id: string; - /** Default severity level */ - readonly severity: LintSeverity; - /** Human-readable rule description */ - readonly description: string; - /** - * Check function that returns violation(s) or null if rule passes - * - * @param directive - Parsed directive to check - * @param file - Source file path - * @param line - Line number in source - * @param context - Optional context with pattern registry for relationship validation - * @returns Violation(s) if rule fails, null if passes. Array for rules that can detect multiple issues. - */ - check: (directive: DocDirective, file: string, line: number, context?: LintContext) => LintViolation | LintViolation[] | null; -} -/** - * Rule: missing-pattern-name - * - * Patterns must have an explicit name via the pattern tag. - * Without a name, the pattern can't be referenced in relationships - * or indexed properly. - */ -export declare const missingPatternName: LintRule; -/** - * Rule: missing-status - * - * Patterns should have an explicit status (completed, active, roadmap). - * This helps readers understand if the pattern is ready for use. - */ -export declare const missingStatus: LintRule; -/** - * Rule: invalid-status - * - * Status values must be valid PDR-005 FSM states or recognized legacy aliases. - * - * Valid FSM values: roadmap, active, completed, deferred - * Accepted legacy aliases: implemented → completed, partial → active, in-progress → active, planned → planned - */ -export declare const invalidStatus: LintRule; -/** - * Rule: missing-when-to-use - * - * Patterns should have a "When to Use" section for LLM-friendly guidance. - * This helps developers understand when the pattern applies. - */ -export declare const missingWhenToUse: LintRule; -/** - * Rule: tautological-description - * - * The description should not simply repeat the pattern name. - * A tautological description provides no useful information. - */ -export declare const tautologicalDescription: LintRule; -/** - * Rule: missing-relationships - * - * Patterns should declare their relationships (uses/usedBy) for - * dependency tracking. This is informational only. - */ -export declare const missingRelationships: LintRule; -/** - * Rule: pattern-conflict-in-implements - * - * Validates that a file doesn't create a circular reference by defining - * a pattern that it also implements. Having both @libar-docs-pattern X - * AND @libar-docs-implements X on the same file is a conflict. - * - * However, a file CAN have both tags when they reference DIFFERENT patterns: - * - @libar-docs-pattern SubPattern (defines its own identity) - * - @libar-docs-implements ParentSpec (links to parent spec) - * - * This supports the sub-pattern hierarchy where implementation files can be - * named patterns that also implement a larger spec (e.g., MockPaymentActions - * implementing DurableEventsIntegration). - */ -export declare const patternConflictInImplements: LintRule; -/** - * Rule: missing-relationship-target - * - * Validates that relationship targets (uses, implements) reference - * patterns that actually exist. Only triggers when a LintContext with - * knownPatterns is provided (strict mode). - * - * This is a context-aware rule that requires access to the pattern registry. - */ -export declare const missingRelationshipTarget: LintRule; -/** - * All default lint rules - * - * Order matters for output - errors first, then warnings, then info. - */ -export declare const defaultRules: readonly LintRule[]; -/** - * Severity ordering for sorting and filtering - * Exported for use by lint engine to avoid duplication - */ -export declare const severityOrder: Record; -/** - * Get rules filtered by minimum severity - * - * @param rules - Rules to filter - * @param minSeverity - Minimum severity to include - * @returns Filtered rules - */ -export declare function filterRulesBySeverity(rules: readonly LintRule[], minSeverity: LintSeverity): LintRule[]; -//# sourceMappingURL=rules.d.ts.map \ No newline at end of file diff --git a/dist/lint/rules.d.ts.map b/dist/lint/rules.d.ts.map deleted file mode 100644 index 883d0862..00000000 --- a/dist/lint/rules.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../src/lint/rules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACjF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAIzE;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,6DAA6D;IAC7D,QAAQ,CAAC,aAAa,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC5C,8DAA8D;IAC9D,QAAQ,CAAC,QAAQ,CAAC,EAAE,WAAW,CAAC;CACjC;AAQD;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,qBAAqB;IACrB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,6BAA6B;IAC7B,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;IAChC,sCAAsC;IACtC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B;;;;;;;;OAQG;IACH,KAAK,EAAE,CACL,SAAS,EAAE,YAAY,EACvB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,WAAW,KAClB,aAAa,GAAG,aAAa,EAAE,GAAG,IAAI,CAAC;CAC7C;AAsBD;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,EAAE,QAwBhC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,aAAa,EAAE,QAiB3B,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,EAAE,QA2B3B,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,EAAE,QAiB9B,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,EAAE,QAuCrC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,EAAE,QAoBlC,CAAC;AAMF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,2BAA2B,EAAE,QA4BzC,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB,EAAE,QA4CvC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,SAAS,QAAQ,EASlC,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAItD,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,SAAS,QAAQ,EAAE,EAC1B,WAAW,EAAE,YAAY,GACxB,QAAQ,EAAE,CAGZ"} \ No newline at end of file diff --git a/dist/lint/rules.js b/dist/lint/rules.js deleted file mode 100644 index 387549d1..00000000 --- a/dist/lint/rules.js +++ /dev/null @@ -1,297 +0,0 @@ -/** - * @libar-docs - * @libar-docs-lint - * @libar-docs-pattern LintRules - * @libar-docs-status completed - * @libar-docs-arch-role service - * @libar-docs-arch-context lint - * @libar-docs-arch-layer application - * @libar-docs-implements PatternRelationshipModel - * @libar-docs-used-by LintEngine - * @libar-docs-extract-shapes LintRule, LintContext, defaultRules, severityOrder, filterRulesBySeverity, missingPatternName, missingStatus, invalidStatus, missingWhenToUse, tautologicalDescription, missingRelationships, patternConflictInImplements, missingRelationshipTarget - * - * ## LintRules - Annotation Quality Rules - * - * Defines lint rules that check @libar-docs-* directives for completeness - * and quality. Rules include: missing-pattern-name, missing-status, - * missing-when-to-use, tautological-description, and missing-relationships. - * - * ### When to Use - * - * - Use `defaultRules` for standard quality checks - * - Use `filterRulesBySeverity()` to customize which rules apply - * - Use individual rules for targeted validation - */ -import { STATUS_NORMALIZATION_MAP, PROCESS_STATUS_VALUES } from '../taxonomy/index.js'; -import { DEFAULT_TAG_PREFIX } from '../config/defaults.js'; -/** - * Multiplier for determining if description has "substantial content" beyond the pattern name. - * If description length > name length * this multiplier, it's considered substantial. - */ -const SUBSTANTIAL_CONTENT_MULTIPLIER = 2; -/** - * Create a lint violation - */ -function violation(rule, severity, message, file, line) { - return { rule, severity, message, file, line }; -} -/** - * Get the tag prefix from context or use default. - */ -function getTagPrefix(context) { - return context?.registry?.tagPrefix ?? DEFAULT_TAG_PREFIX; -} -/** - * Rule: missing-pattern-name - * - * Patterns must have an explicit name via the pattern tag. - * Without a name, the pattern can't be referenced in relationships - * or indexed properly. - */ -export const missingPatternName = { - id: 'missing-pattern-name', - severity: 'error', - description: 'Pattern must have explicit pattern name tag', - check: (directive, file, line, context) => { - // Skip if this is an implementation-only file (has implements tag) - // Implementation files realize patterns defined elsewhere and don't need their own name - const hasImplements = (directive.implements?.length ?? 0) > 0; - if (hasImplements) { - return null; - } - if (!directive.patternName || directive.patternName.trim() === '') { - const tagPrefix = getTagPrefix(context); - return violation('missing-pattern-name', 'error', `Pattern missing explicit name. Add ${tagPrefix}pattern YourPatternName`, file, line); - } - return null; - }, -}; -/** - * Rule: missing-status - * - * Patterns should have an explicit status (completed, active, roadmap). - * This helps readers understand if the pattern is ready for use. - */ -export const missingStatus = { - id: 'missing-status', - severity: 'warning', - description: 'Pattern should have status tag (completed|active|roadmap)', - check: (directive, file, line, context) => { - if (!directive.status) { - const tagPrefix = getTagPrefix(context); - return violation('missing-status', 'warning', `No ${tagPrefix}status found. Add: ${tagPrefix}status completed|active|roadmap`, file, line); - } - return null; - }, -}; -/** - * Rule: invalid-status - * - * Status values must be valid PDR-005 FSM states or recognized legacy aliases. - * - * Valid FSM values: roadmap, active, completed, deferred - * Accepted legacy aliases: implemented → completed, partial → active, in-progress → active, planned → planned - */ -export const invalidStatus = { - id: 'invalid-status', - severity: 'error', - description: 'Status must be a valid FSM state (roadmap, active, completed, deferred) or legacy alias', - check: (directive, file, line) => { - // Skip if no status (handled by missing-status rule) - if (!directive.status) { - return null; - } - // Check if status is in the normalization map (includes both FSM and legacy values) - const normalizedStatus = STATUS_NORMALIZATION_MAP[directive.status.toLowerCase()]; - if (!normalizedStatus) { - const validValues = [ - ...new Set([...PROCESS_STATUS_VALUES, ...Object.keys(STATUS_NORMALIZATION_MAP)]), - ]; - return violation('invalid-status', 'error', `Invalid status '${directive.status}'. Valid values: ${validValues.join(', ')}.`, file, line); - } - return null; - }, -}; -/** - * Rule: missing-when-to-use - * - * Patterns should have a "When to Use" section for LLM-friendly guidance. - * This helps developers understand when the pattern applies. - */ -export const missingWhenToUse = { - id: 'missing-when-to-use', - severity: 'warning', - description: 'Pattern should have "When to Use" section in description', - check: (directive, file, line) => { - // whenToUse is now an array of bullet points - if (!directive.whenToUse || directive.whenToUse.length === 0) { - return violation('missing-when-to-use', 'warning', 'No "When to Use" section found. Add ### When to Use or **When to use:** in description', file, line); - } - return null; - }, -}; -/** - * Rule: tautological-description - * - * The description should not simply repeat the pattern name. - * A tautological description provides no useful information. - */ -export const tautologicalDescription = { - id: 'tautological-description', - severity: 'error', - description: 'Description should not simply repeat the pattern name', - check: (directive, file, line) => { - if (!directive.patternName || !directive.description) { - return null; - } - // Get first meaningful line of description (skip empty lines and headings) - const lines = directive.description.split('\n'); - const firstLine = lines - .map((l) => l.trim()) - .find((l) => l.length > 0 && !l.startsWith('#') && !l.startsWith('**When')); - if (!firstLine) { - return null; - } - // Normalize for comparison (lowercase, remove punctuation) - const normalizedName = directive.patternName.toLowerCase().replace(/[^a-z0-9]/g, ''); - const normalizedDesc = firstLine.toLowerCase().replace(/[^a-z0-9]/g, ''); - // Check if description starts with or equals the pattern name - if (normalizedDesc === normalizedName || normalizedDesc.startsWith(normalizedName)) { - // Allow if there's substantial content after the name - if (normalizedDesc.length > normalizedName.length * SUBSTANTIAL_CONTENT_MULTIPLIER) { - return null; - } - return violation('tautological-description', 'error', `Description repeats pattern name "${directive.patternName}". Provide meaningful context.`, file, line); - } - return null; - }, -}; -/** - * Rule: missing-relationships - * - * Patterns should declare their relationships (uses/usedBy) for - * dependency tracking. This is informational only. - */ -export const missingRelationships = { - id: 'missing-relationships', - severity: 'info', - description: 'Consider adding uses and used-by tags', - check: (directive, file, line, context) => { - const hasUses = (directive.uses?.length ?? 0) > 0; - const hasUsedBy = (directive.usedBy?.length ?? 0) > 0; - if (!hasUses && !hasUsedBy) { - const tagPrefix = getTagPrefix(context); - return violation('missing-relationships', 'info', `Consider adding relationship tags: ${tagPrefix}uses and/or ${tagPrefix}used-by`, file, line); - } - return null; - }, -}; -// ═══════════════════════════════════════════════════════════════════════════ -// Relationship Validation Rules (PatternRelationshipModel) -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Rule: pattern-conflict-in-implements - * - * Validates that a file doesn't create a circular reference by defining - * a pattern that it also implements. Having both @libar-docs-pattern X - * AND @libar-docs-implements X on the same file is a conflict. - * - * However, a file CAN have both tags when they reference DIFFERENT patterns: - * - @libar-docs-pattern SubPattern (defines its own identity) - * - @libar-docs-implements ParentSpec (links to parent spec) - * - * This supports the sub-pattern hierarchy where implementation files can be - * named patterns that also implement a larger spec (e.g., MockPaymentActions - * implementing DurableEventsIntegration). - */ -export const patternConflictInImplements = { - id: 'pattern-conflict-in-implements', - severity: 'error', - description: 'Pattern cannot implement itself (circular reference)', - check: (directive, file, line, context) => { - const hasImplements = (directive.implements?.length ?? 0) > 0; - const patternName = directive.patternName; - if (hasImplements && patternName !== undefined) { - // Only error if pattern name matches any implements target (circular reference) - const patternNameLower = patternName.toLowerCase(); - const implementsTargets = directive.implements?.map((i) => i.toLowerCase()) ?? []; - if (implementsTargets.includes(patternNameLower)) { - const tagPrefix = getTagPrefix(context); - return violation('pattern-conflict-in-implements', 'error', `Pattern '${patternName}' cannot implement itself. ` + - `Remove either ${tagPrefix}pattern or ${tagPrefix}implements for this pattern.`, file, line); - } - // Different patterns: OK - this is a sub-pattern implementing a parent spec - } - return null; - }, -}; -/** - * Rule: missing-relationship-target - * - * Validates that relationship targets (uses, implements) reference - * patterns that actually exist. Only triggers when a LintContext with - * knownPatterns is provided (strict mode). - * - * This is a context-aware rule that requires access to the pattern registry. - */ -export const missingRelationshipTarget = { - id: 'missing-relationship-target', - severity: 'warning', - description: 'Relationship targets must reference existing patterns', - check: (directive, file, line, context) => { - // Skip if no context provided (non-strict mode) - if (!context?.knownPatterns) { - return null; - } - const violations = []; - // Check uses targets - for (const target of directive.uses ?? []) { - if (!context.knownPatterns.has(target)) { - violations.push(violation('missing-relationship-target', 'warning', `Relationship target '${target}' not found in known patterns`, file, line)); - } - } - // Check implements targets - for (const target of directive.implements ?? []) { - if (!context.knownPatterns.has(target)) { - violations.push(violation('missing-relationship-target', 'warning', `Implementation target '${target}' not found in known patterns`, file, line)); - } - } - return violations.length > 0 ? violations : null; - }, -}; -/** - * All default lint rules - * - * Order matters for output - errors first, then warnings, then info. - */ -export const defaultRules = [ - missingPatternName, - tautologicalDescription, - invalidStatus, - patternConflictInImplements, // PatternRelationshipModel rule - missingRelationshipTarget, // Context-aware relationship validation - missingStatus, - missingWhenToUse, - missingRelationships, -]; -/** - * Severity ordering for sorting and filtering - * Exported for use by lint engine to avoid duplication - */ -export const severityOrder = { - error: 0, - warning: 1, - info: 2, -}; -/** - * Get rules filtered by minimum severity - * - * @param rules - Rules to filter - * @param minSeverity - Minimum severity to include - * @returns Filtered rules - */ -export function filterRulesBySeverity(rules, minSeverity) { - const minLevel = severityOrder[minSeverity]; - return rules.filter((rule) => severityOrder[rule.severity] <= minLevel); -} -//# sourceMappingURL=rules.js.map \ No newline at end of file diff --git a/dist/lint/rules.js.map b/dist/lint/rules.js.map deleted file mode 100644 index d5910386..00000000 --- a/dist/lint/rules.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"rules.js","sourceRoot":"","sources":["../../src/lint/rules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAKH,OAAO,EAAE,wBAAwB,E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C,MAAM,aAAa,GAAiC;IACzD,KAAK,EAAE,CAAC;IACR,OAAO,EAAE,CAAC;IACV,IAAI,EAAE,CAAC;CACR,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CACnC,KAA0B,EAC1B,WAAyB;IAEzB,MAAM,QAAQ,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC;IAC5C,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,CAAC;AAC1E,CAAC"} \ No newline at end of file diff --git a/dist/lint/steps/cross-checks.d.ts b/dist/lint/steps/cross-checks.d.ts deleted file mode 100644 index 79f5071d..00000000 --- a/dist/lint/steps/cross-checks.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Cross-file lint checks for vitest-cucumber compatibility. - * - * These checks compare a .feature file with its corresponding .steps.ts - * file to detect mismatches in structure (Rule/And/ScenarioOutline patterns). - */ -import type { LintViolation } from '../../validation-schemas/lint.js'; -/** - * Check 1: Detect function params used inside ScenarioOutline blocks. - * - * In vitest-cucumber, ScenarioOutline step callbacks receive values via a - * `variables` object — NOT via function parameters. Using (_ctx, value: string) - * as callback args is the #1 trap: the value will be undefined at runtime. - * - * Detection: Find ScenarioOutline/RuleScenarioOutline blocks in step files, - * then within those blocks look for step callbacks with a second positional - * parameter after _ctx. - * - * The heuristic is conservative: we only flag when we see an explicit second - * positional parameter pattern. False negatives are acceptable; false positives - * are not. - */ -export declare function checkScenarioOutlineFunctionParams(featureContent: string, stepContent: string, stepFilePath: string): readonly LintViolation[]; -/** - * Check 2: Detect missing And destructuring. - * - * If a feature file has And steps, the step definition must destructure And - * from the scenario callback. Using Then(...) for And steps causes - * StepAbleUnknowStepError at runtime. - */ -export declare function checkMissingAndDestructuring(featureContent: string, stepContent: string, stepFilePath: string): readonly LintViolation[]; -/** - * Check 3: Detect missing Rule() wrapper. - * - * If a feature file has Rule: blocks, the step definition must destructure - * Rule from describeFeature and wrap scenarios with Rule('name', ...). - * Using top-level Scenario() instead of RuleScenario() causes step - * matching failures. - */ -export declare function checkMissingRuleWrapper(featureContent: string, stepContent: string, stepFilePath: string): readonly LintViolation[]; -/** - * Check 12: Detect quoted values in Scenario Outline steps (feature-file side). - * - * When a Scenario Outline's steps use quoted values (e.g., "foo") instead of - * angle-bracket placeholders (e.g., ), this suggests the author is - * using the Scenario pattern (Cucumber expression matching) instead of the - * ScenarioOutline pattern (variable substitution). This is the feature-file - * side of the Two-Pattern Problem — the step-file side is caught by - * scenario-outline-function-params. - * - * Detection: Find Scenario Outline sections in the feature file, extract the - * Examples table column names, then check if step lines within those sections - * contain quoted values whose content matches a column name. Only those are - * flagged — constant quoted values (e.g., "error") that don't correspond to - * any Examples column are intentionally literal and should not be placeholders. - * - * This is a cross-file check because it's only meaningful when a paired step - * file exists (roadmap specs without implementations shouldn't be flagged). - * The _stepContent parameter is unused but maintains the cross-check signature. - */ -export declare function checkOutlineQuotedValues(featureContent: string, _stepContent: string, stepFilePath: string, featurePath?: string): readonly LintViolation[]; -/** - * Run all cross-file checks on a paired feature + step file. - */ -export declare function runCrossChecks(featureContent: string, stepContent: string, stepFilePath: string, featurePath?: string): readonly LintViolation[]; -//# sourceMappingURL=cross-checks.d.ts.map \ No newline at end of file diff --git a/dist/lint/steps/cross-checks.d.ts.map b/dist/lint/steps/cross-checks.d.ts.map deleted file mode 100644 index 5b686844..00000000 --- a/dist/lint/steps/cross-checks.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"cross-checks.d.ts","sourceRoot":"","sources":["../../../src/lint/steps/cross-checks.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAItE;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,kCAAkC,CAChD,cAAc,EAAE,MAAM,EACtB,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,GACnB,SAAS,aAAa,EAAE,CAwD1B;AAED;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAC1C,cAAc,EAAE,MAAM,EACtB,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,GACnB,SAAS,aAAa,EAAE,CAqC1B;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACrC,cAAc,EAAE,MAAM,EACtB,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,GACnB,SAAS,aAAa,EAAE,CAqC1B;AAwDD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,wBAAwB,CACtC,cAAc,EAAE,MAAM,EACtB,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,MAAM,EACpB,WAAW,CAAC,EAAE,MAAM,GACnB,SAAS,aAAa,EAAE,CAmE1B;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC5B,cAAc,EAAE,MAAM,EACtB,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,EACpB,WAAW,CAAC,EAAE,MAAM,GACnB,SAAS,aAAa,EAAE,CAO1B"} \ No newline at end of file diff --git a/dist/lint/steps/cross-checks.js b/dist/lint/steps/cross-checks.js deleted file mode 100644 index e6b1c710..00000000 --- a/dist/lint/steps/cross-checks.js +++ /dev/null @@ -1,290 +0,0 @@ -/** - * Cross-file lint checks for vitest-cucumber compatibility. - * - * These checks compare a .feature file with its corresponding .steps.ts - * file to detect mismatches in structure (Rule/And/ScenarioOutline patterns). - */ -import { STEP_LINT_RULES } from './types.js'; -import { countBraceBalance } from './utils.js'; -/** - * Check 1: Detect function params used inside ScenarioOutline blocks. - * - * In vitest-cucumber, ScenarioOutline step callbacks receive values via a - * `variables` object — NOT via function parameters. Using (_ctx, value: string) - * as callback args is the #1 trap: the value will be undefined at runtime. - * - * Detection: Find ScenarioOutline/RuleScenarioOutline blocks in step files, - * then within those blocks look for step callbacks with a second positional - * parameter after _ctx. - * - * The heuristic is conservative: we only flag when we see an explicit second - * positional parameter pattern. False negatives are acceptable; false positives - * are not. - */ -export function checkScenarioOutlineFunctionParams(featureContent, stepContent, stepFilePath) { - // Only check if the feature actually has Scenario Outline - if (!/^\s*(Scenario Outline|Scenario Template):/m.test(featureContent)) { - return []; - } - const violations = []; - const lines = stepContent.split('\n'); - // Track whether we're inside a ScenarioOutline block using brace depth - let inOutlineBlock = false; - let braceDepth = 0; - let outlineStartLine = 0; - for (let i = 0; i < lines.length; i++) { - const line = lines[i]; - if (line === undefined) - continue; - // Detect ScenarioOutline( or RuleScenarioOutline( call - if (!inOutlineBlock && /(?:Scenario|RuleScenario)Outline\s*\(/.test(line)) { - inOutlineBlock = true; - outlineStartLine = i + 1; - // Count opening braces on this line to start depth tracking - braceDepth = countBraceBalance(line); - continue; - } - if (inOutlineBlock) { - braceDepth += countBraceBalance(line); - // Check for step callbacks with function params: Given('text', (_ctx, value: type) => - // The pattern: a step keyword, string arg, then a callback with 2+ params - const paramMatch = /(?:Given|When|Then|And|But)\s*\(\s*['"][^'"]*['"]\s*,\s*\(\s*_?ctx\s*(?::\s*\w+)?\s*,\s*(\w+)/.exec(line); - if (paramMatch !== null) { - const paramName = paramMatch[1] ?? 'unknown'; - violations.push({ - rule: STEP_LINT_RULES.scenarioOutlineFunctionParams.id, - severity: STEP_LINT_RULES.scenarioOutlineFunctionParams.severity, - message: `Step callback inside ScenarioOutline uses function param "${paramName}" — use variables object instead (ScenarioOutline started at line ${outlineStartLine})`, - file: stepFilePath, - line: i + 1, - }); - } - // End of ScenarioOutline block - if (braceDepth <= 0) { - inOutlineBlock = false; - braceDepth = 0; - } - } - } - return violations; -} -/** - * Check 2: Detect missing And destructuring. - * - * If a feature file has And steps, the step definition must destructure And - * from the scenario callback. Using Then(...) for And steps causes - * StepAbleUnknowStepError at runtime. - */ -export function checkMissingAndDestructuring(featureContent, stepContent, stepFilePath) { - // Check if feature has any And steps - const hasAndSteps = /^\s+And\s+/m.test(featureContent); - if (!hasAndSteps) { - return []; - } - // Check if step file destructures And anywhere. - // NOTE: This regex matches And inside ANY curly brace pair, including object - // literals with an `And` property. This is a theoretical false negative (would - // pass when it should flag), which is the safe direction. In practice, step - // files don't have object literals with `And` keys. - const destructuresAnd = /\{\s*[^}]*\bAnd\b[^}]*\}/.test(stepContent); - if (destructuresAnd) { - return []; - } - // Find the line of the describeFeature call for context - const lines = stepContent.split('\n'); - let describeLine = 1; - for (let i = 0; i < lines.length; i++) { - const ln = lines[i]; - if (ln !== undefined && /describeFeature\s*\(/.test(ln)) { - describeLine = i + 1; - break; - } - } - return [ - { - rule: STEP_LINT_RULES.missingAndDestructuring.id, - severity: STEP_LINT_RULES.missingAndDestructuring.severity, - message: `Feature has And steps but step definition does not destructure And — add And to the destructuring pattern ({ Given, When, Then, And })`, - file: stepFilePath, - line: describeLine, - }, - ]; -} -/** - * Check 3: Detect missing Rule() wrapper. - * - * If a feature file has Rule: blocks, the step definition must destructure - * Rule from describeFeature and wrap scenarios with Rule('name', ...). - * Using top-level Scenario() instead of RuleScenario() causes step - * matching failures. - */ -export function checkMissingRuleWrapper(featureContent, stepContent, stepFilePath) { - // Check if feature has any Rule: blocks - const hasRuleBlocks = /^\s*Rule:\s/m.test(featureContent); - if (!hasRuleBlocks) { - return []; - } - // Check if step file destructures Rule from describeFeature - // Pattern: describeFeature(feature, ({ ... Rule ... }) => - // We look for Rule in any destructuring pattern, since it could appear anywhere - const destructuresRule = /describeFeature\s*\([^,]*,\s*\(\s*\{[^}]*\bRule\b[^}]*\}/.test(stepContent); - if (destructuresRule) { - return []; - } - // Find the line of the describeFeature call for context - const lines = stepContent.split('\n'); - let describeLine = 1; - for (let i = 0; i < lines.length; i++) { - const ln = lines[i]; - if (ln !== undefined && /describeFeature\s*\(/.test(ln)) { - describeLine = i + 1; - break; - } - } - return [ - { - rule: STEP_LINT_RULES.missingRuleWrapper.id, - severity: STEP_LINT_RULES.missingRuleWrapper.severity, - message: `Feature has Rule: blocks but step definition does not destructure Rule from describeFeature — use Rule('name', ({ RuleScenario }) => { ... })`, - file: stepFilePath, - line: describeLine, - }, - ]; -} -/** - * Step keyword pattern for matching step lines in feature files. - */ -const FEATURE_STEP_LINE = /^\s+(Given|When|Then|And|But)\s+(.+)$/; -/** - * Extract column names from Examples tables belonging to a Scenario Outline. - * - * Scans forward from the given start index (the Scenario Outline line) until - * the next section boundary. Collects column names from every Examples table - * header row found within that range. - */ -function extractOutlineExamplesColumns(lines, outlineStartIndex) { - const columns = new Set(); - let inExamples = false; - let seenExamplesHeader = false; - for (let i = outlineStartIndex + 1; i < lines.length; i++) { - const line = lines[i]; - if (line === undefined) - continue; - // Stop at next section boundary (another Scenario, Rule, Feature, Background) - if (/^\s*(Scenario Outline|Scenario Template|Scenario:|Feature:|Rule:|Background:)/.test(line)) { - break; - } - // Enter Examples block - if (/^\s*Examples:/.test(line)) { - inExamples = true; - seenExamplesHeader = false; - continue; - } - // Inside Examples: first table row is the header with column names - if (inExamples && !seenExamplesHeader && /^\s*\|/.test(line)) { - seenExamplesHeader = true; - const cells = line - .split('|') - .map((cell) => cell.trim()) - .filter((cell) => cell.length > 0); - for (const cell of cells) { - columns.add(cell); - } - } - } - return columns; -} -/** - * Check 12: Detect quoted values in Scenario Outline steps (feature-file side). - * - * When a Scenario Outline's steps use quoted values (e.g., "foo") instead of - * angle-bracket placeholders (e.g., ), this suggests the author is - * using the Scenario pattern (Cucumber expression matching) instead of the - * ScenarioOutline pattern (variable substitution). This is the feature-file - * side of the Two-Pattern Problem — the step-file side is caught by - * scenario-outline-function-params. - * - * Detection: Find Scenario Outline sections in the feature file, extract the - * Examples table column names, then check if step lines within those sections - * contain quoted values whose content matches a column name. Only those are - * flagged — constant quoted values (e.g., "error") that don't correspond to - * any Examples column are intentionally literal and should not be placeholders. - * - * This is a cross-file check because it's only meaningful when a paired step - * file exists (roadmap specs without implementations shouldn't be flagged). - * The _stepContent parameter is unused but maintains the cross-check signature. - */ -export function checkOutlineQuotedValues(featureContent, _stepContent, stepFilePath, featurePath) { - // Only check if the feature actually has Scenario Outline - if (!/^\s*(Scenario Outline|Scenario Template):/m.test(featureContent)) { - return []; - } - const violations = []; - const lines = featureContent.split('\n'); - let inOutlineSection = false; - let currentOutlineColumns = new Set(); - for (let i = 0; i < lines.length; i++) { - const line = lines[i]; - if (line === undefined) - continue; - // Enter Scenario Outline section - if (/^\s*(Scenario Outline|Scenario Template):/.test(line)) { - inOutlineSection = true; - currentOutlineColumns = extractOutlineExamplesColumns(lines, i); - continue; - } - // Exit on new section boundary (but not Examples, which is part of Outline) - if (/^\s*(Scenario:|Feature:|Rule:|Background:)/.test(line)) { - inOutlineSection = false; - continue; - } - if (!inOutlineSection) - continue; - // Check step lines within the Outline section - const stepMatch = FEATURE_STEP_LINE.exec(line); - if (stepMatch !== null) { - const stepText = stepMatch[2] ?? ''; - // Skip steps that already use placeholders — the author clearly knows - // about the ScenarioOutline pattern and chose to keep quoted values literal - const hasPlaceholders = /<\w+>/.test(stepText); - if (hasPlaceholders) - continue; - // Extract all quoted values from the step - const quotedValues = []; - const doubleQuoteMatches = stepText.matchAll(/"([^"]*)"/g); - for (const m of doubleQuoteMatches) { - if (m[1] !== undefined) - quotedValues.push(m[1]); - } - const singleQuoteMatches = stepText.matchAll(/'([^']*)'/g); - for (const m of singleQuoteMatches) { - if (m[1] !== undefined) - quotedValues.push(m[1]); - } - // Only flag if at least one quoted value matches an Examples column name - const matchesColumn = quotedValues.some((val) => currentOutlineColumns.has(val)); - if (matchesColumn) { - violations.push({ - rule: STEP_LINT_RULES.outlineQuotedValues.id, - severity: STEP_LINT_RULES.outlineQuotedValues.severity, - message: `Scenario Outline step uses quoted values instead of syntax — this suggests the Scenario pattern (Cucumber expressions) rather than ScenarioOutline pattern (variable substitution)`, - file: featurePath ?? stepFilePath, - line: i + 1, - }); - } - } - } - return violations; -} -/** - * Run all cross-file checks on a paired feature + step file. - */ -export function runCrossChecks(featureContent, stepContent, stepFilePath, featurePath) { - return [ - ...checkScenarioOutlineFunctionParams(featureContent, stepContent, stepFilePath), - ...checkMissingAndDestructuring(featureContent, stepContent, stepFilePath), - ...checkMissingRuleWrapper(featureContent, stepContent, stepFilePath), - ...checkOutlineQuotedValues(featureContent, stepContent, stepFilePath, featurePath), - ]; -} -//# sourceMappingURL=cross-checks.js.map \ No newline at end of file diff --git a/dist/lint/steps/cross-checks.js.map b/dist/lint/steps/cross-checks.js.map deleted file mode 100644 index c3497143..00000000 --- a/dist/lint/steps/cross-checks.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"cross-checks.js","sourceRoot":"","sources":["../../../src/lint/steps/cross-checks.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/C;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,kCAAkC,CAChD,cAAsB,EACtB,WAAmB,EACnB,YAAoB;IAEpB,0DAA0D;IAC1D,IAAI,CAAC,4CAA4C,CAAC,IAAI,CAAC,cAAc,CAAC,EAAE,CAAC;QACvE,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,UAAU,GAAoB,EAAE,CAAC;IACvC,MAAM,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAEtC,uEAAuE;IACvE,IAAI,cAAc,GAAG,KAAK,CAAC;IAC3B,IAAI,UAAU,GAAG,CAAC,CAAC;IACnB,IAAI,gBAAgB,GAAG,CAAC,CAAC;IAEzB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACtC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACtB,IAAI,IAAI,KAAK,SAAS;YAAE,SAAS;QAEjC,uDAAuD;QACvD,IAAI,CAAC,cAAc,IAAI,uCAAuC,CAAC,IAAI,CAAC,IAAI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C,CAAC,CAAC,KAAK,SAAS;oBAAE,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAClD,CAAC;YAED,yEAAyE;YACzE,MAAM,aAAa,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,qBAAqB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;YACjF,IAAI,aAAa,EAAE,CAAC;gBAClB,UAAU,CAAC,IAAI,CAAC;oBACd,IAAI,EAAE,eAAe,CAAC,mBAAmB,CAAC,EAAE;oBAC5C,QAAQ,EAAE,eAAe,CAAC,mBAAmB,CAAC,QAAQ;oBACtD,OAAO,EAAE,kMAAkM;oBAC3M,IAAI,EAAE,WAAW,IAAI,YAAY;oBACjC,IAAI,EAAE,CAAC,GAAG,CAAC;iBACZ,CAAC,CAAC;YACL,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,UAAU,CAAC;AACpB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc,CAC5B,cAAsB,EACtB,WAAmB,EACnB,YAAoB,EACpB,WAAoB;IAEpB,OAAO;QACL,GAAG,kCAAkC,CAAC,cAAc,EAAE,WAAW,EAAE,YAAY,CAAC;QAChF,GAAG,4BAA4B,CAAC,cAAc,EAAE,WAAW,EAAE,YAAY,CAAC;QAC1E,GAAG,uBAAuB,CAAC,cAAc,EAAE,WAAW,EAAE,YAAY,CAAC;QACrE,GAAG,wBAAwB,CAAC,cAAc,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,CAAC;KACpF,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/dist/lint/steps/feature-checks.d.ts b/dist/lint/steps/feature-checks.d.ts deleted file mode 100644 index bfefd2a7..00000000 --- a/dist/lint/steps/feature-checks.d.ts +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Feature-only lint checks for vitest-cucumber compatibility. - * - * These checks scan raw .feature file text without needing the Gherkin parser - * (which would fail on some of the very issues we're detecting). - */ -import type { LintViolation } from '../../validation-schemas/lint.js'; -/** - * Check 4: Detect # at line start inside a """ pseudo-code-block in description context. - * - * The @cucumber/gherkin parser treats # as a comment even inside - * Feature/Rule descriptions. When authors embed code examples using - * """ delimiters in descriptions, they expect those to act as code blocks. - * But """ in descriptions is NOT a DocString — it's plain text. Any # - * inside will terminate the description and cause cryptic parse errors. - * - * Plain # comments outside """ blocks are intentional Gherkin comments - * and are NOT flagged (they gracefully terminate descriptions). - * - * Detection: State machine tracks description context AND whether we're - * inside a """ pseudo-code-block within that description. - */ -export declare function checkHashInDescription(content: string, filePath: string): readonly LintViolation[]; -/** - * Check 7: Detect multiple And steps with identical text in the same scenario. - * - * vitest-cucumber fails when the same And step text appears twice in one scenario. - * The fix is to consolidate into a single step with a DataTable or DocString. - */ -export declare function checkDuplicateAndSteps(content: string, filePath: string): readonly LintViolation[]; -/** - * Check 8: Detect $ in Given/When/Then/And step text. - * - * The $ character causes matching issues in vitest-cucumber's - * step expression parser. - */ -export declare function checkDollarInStepText(content: string, filePath: string): readonly LintViolation[]; -/** - * Check 9: Detect # character inside step text (mid-line), outside quoted strings. - * - * Some Gherkin parsers interpret # as a comment delimiter even when it - * appears in the middle of a step line, silently truncating the step text. - * For example, "Given a file with # inside" becomes "Given a file with". - * - * However, # inside quoted string values (e.g. `"## DDD Patterns"`) is - * safe — the Gherkin parser treats it as part of the string literal and - * does not interpret it as a comment. Only unquoted # is flagged. - * - * This is distinct from hash-in-description (which catches # inside """ - * pseudo-code-blocks in descriptions). This check catches # in actual - * Given/When/Then/And/But step lines. - * - * Pure comment lines (starting with #) do not match STEP_LINE, so they - * are not flagged. - */ -export declare function checkHashInStepText(content: string, filePath: string): readonly LintViolation[]; -/** - * Check 10: Detect Gherkin keywords at the start of description lines. - * - * When a Feature or Rule description line starts with Given, When, Then, - * And, or But, the Gherkin parser interprets it as a step definition - * rather than description text. This terminates the description context - * and causes parse errors on subsequent description lines. - * - * Detection uses a state machine to track description context — after - * Feature: or Rule: lines, before Background:/Scenario:/etc. terminators. - * Within that context, lines starting with step keywords are flagged. - * - * Step DocStrings (""" blocks after Given/When/Then steps) are tracked - * separately. Feature:/Rule: appearing inside step DocStrings must NOT - * trigger description mode — they are just quoted text content. - */ -export declare function checkKeywordInDescription(content: string, filePath: string): readonly LintViolation[]; -/** - * Run all feature-only checks on a single file. - */ -export declare function runFeatureChecks(content: string, filePath: string): readonly LintViolation[]; -//# sourceMappingURL=feature-checks.d.ts.map \ No newline at end of file diff --git a/dist/lint/steps/feature-checks.d.ts.map b/dist/lint/steps/feature-checks.d.ts.map deleted file mode 100644 index 258dab7c..00000000 --- a/dist/lint/steps/feature-checks.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"feature-checks.d.ts","sourceRoot":"","sources":["../../../src/lint/steps/feature-checks.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AA0BtE;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,GACf,SAAS,aAAa,EAAE,CA6C1B;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,GACf,SAAS,aAAa,EAAE,CAsC1B;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,aAAa,EAAE,CAwBjG;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,aAAa,EAAE,CAwB/F;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,GACf,SAAS,aAAa,EAAE,CA+D1B;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,aAAa,EAAE,CAQ5F"} \ No newline at end of file diff --git a/dist/lint/steps/feature-checks.js b/dist/lint/steps/feature-checks.js deleted file mode 100644 index 95f644c4..00000000 --- a/dist/lint/steps/feature-checks.js +++ /dev/null @@ -1,279 +0,0 @@ -/** - * Feature-only lint checks for vitest-cucumber compatibility. - * - * These checks scan raw .feature file text without needing the Gherkin parser - * (which would fail on some of the very issues we're detecting). - */ -import { STEP_LINT_RULES } from './types.js'; -import { stripQuotedContent } from './utils.js'; -/** - * Gherkin keywords that terminate a description context. - * When one of these appears at the expected indentation, the description is over. - */ -const DESCRIPTION_TERMINATORS = /^\s*(Background:|Scenario:|Scenario Outline:|Rule:|@\S|Examples:|\||Given |When |Then |And |But )/; -/** - * Keywords that start a description context. - */ -const DESCRIPTION_STARTERS = /^\s*(Feature:|Rule:)\s/; -/** - * Step keywords at the start of a line (after whitespace). - */ -const STEP_LINE = /^(\s+)(Given|When|Then|And|But)\s+(.+)$/; -/** - * Scenario boundary markers (for grouping steps by scenario). - */ -const SCENARIO_BOUNDARY = /^\s*(Scenario:|Scenario Outline:|Examples:|Rule:|Feature:)/; -/** - * Check 4: Detect # at line start inside a """ pseudo-code-block in description context. - * - * The @cucumber/gherkin parser treats # as a comment even inside - * Feature/Rule descriptions. When authors embed code examples using - * """ delimiters in descriptions, they expect those to act as code blocks. - * But """ in descriptions is NOT a DocString — it's plain text. Any # - * inside will terminate the description and cause cryptic parse errors. - * - * Plain # comments outside """ blocks are intentional Gherkin comments - * and are NOT flagged (they gracefully terminate descriptions). - * - * Detection: State machine tracks description context AND whether we're - * inside a """ pseudo-code-block within that description. - */ -export function checkHashInDescription(content, filePath) { - const violations = []; - const lines = content.split('\n'); - let inDescription = false; - let inPseudoCodeBlock = false; - for (let i = 0; i < lines.length; i++) { - const line = lines[i]; - if (line === undefined) - continue; - // Start of description context - if (DESCRIPTION_STARTERS.test(line)) { - inDescription = true; - inPseudoCodeBlock = false; - continue; - } - // End of description context - if (inDescription && DESCRIPTION_TERMINATORS.test(line)) { - inDescription = false; - inPseudoCodeBlock = false; - continue; - } - if (!inDescription) - continue; - // Track """ pseudo-code-block boundaries within description - if (/^\s*"""/.test(line)) { - inPseudoCodeBlock = !inPseudoCodeBlock; - continue; - } - // Only flag # inside """ pseudo-code-blocks — those are the dangerous ones - if (inPseudoCodeBlock && /^\s*#/.test(line)) { - violations.push({ - rule: STEP_LINT_RULES.hashInDescription.id, - severity: STEP_LINT_RULES.hashInDescription.severity, - message: `Line starts with # inside """ block in description — Gherkin parser will treat this as a comment, breaking the code example. Move to a step DocString or remove the #`, - file: filePath, - line: i + 1, - }); - } - } - return violations; -} -/** - * Check 7: Detect multiple And steps with identical text in the same scenario. - * - * vitest-cucumber fails when the same And step text appears twice in one scenario. - * The fix is to consolidate into a single step with a DataTable or DocString. - */ -export function checkDuplicateAndSteps(content, filePath) { - const violations = []; - const lines = content.split('\n'); - let currentScenarioAndSteps = new Map(); - for (let i = 0; i < lines.length; i++) { - const line = lines[i]; - if (line === undefined) - continue; - // New scenario boundary resets the And step collection - if (SCENARIO_BOUNDARY.test(line)) { - currentScenarioAndSteps = new Map(); - continue; - } - // Check for And steps - const stepMatch = /^\s+And\s+(.+)$/.exec(line); - if (stepMatch !== null) { - const stepText = stepMatch[1]?.trim() ?? ''; - if (stepText === '') - continue; - const previousLine = currentScenarioAndSteps.get(stepText); - if (previousLine !== undefined) { - violations.push({ - rule: STEP_LINT_RULES.duplicateAndStep.id, - severity: STEP_LINT_RULES.duplicateAndStep.severity, - message: `Duplicate And step text "${stepText}" — first seen at line ${previousLine}. Consolidate into a single step with DataTable`, - file: filePath, - line: i + 1, - }); - } - else { - currentScenarioAndSteps.set(stepText, i + 1); - } - } - } - return violations; -} -/** - * Check 8: Detect $ in Given/When/Then/And step text. - * - * The $ character causes matching issues in vitest-cucumber's - * step expression parser. - */ -export function checkDollarInStepText(content, filePath) { - const violations = []; - const lines = content.split('\n'); - for (let i = 0; i < lines.length; i++) { - const line = lines[i]; - if (line === undefined) - continue; - const stepMatch = STEP_LINE.exec(line); - if (stepMatch !== null) { - const stepText = stepMatch[3]; - if (stepText !== undefined && stripQuotedContent(stepText).includes('$')) { - violations.push({ - rule: STEP_LINT_RULES.dollarInStepText.id, - severity: STEP_LINT_RULES.dollarInStepText.severity, - message: `Step text contains $ character which causes matching issues in vitest-cucumber`, - file: filePath, - line: i + 1, - }); - } - } - } - return violations; -} -/** - * Check 9: Detect # character inside step text (mid-line), outside quoted strings. - * - * Some Gherkin parsers interpret # as a comment delimiter even when it - * appears in the middle of a step line, silently truncating the step text. - * For example, "Given a file with # inside" becomes "Given a file with". - * - * However, # inside quoted string values (e.g. `"## DDD Patterns"`) is - * safe — the Gherkin parser treats it as part of the string literal and - * does not interpret it as a comment. Only unquoted # is flagged. - * - * This is distinct from hash-in-description (which catches # inside """ - * pseudo-code-blocks in descriptions). This check catches # in actual - * Given/When/Then/And/But step lines. - * - * Pure comment lines (starting with #) do not match STEP_LINE, so they - * are not flagged. - */ -export function checkHashInStepText(content, filePath) { - const violations = []; - const lines = content.split('\n'); - for (let i = 0; i < lines.length; i++) { - const line = lines[i]; - if (line === undefined) - continue; - const stepMatch = STEP_LINE.exec(line); - if (stepMatch !== null) { - const stepText = stepMatch[3]; - if (stepText !== undefined && stripQuotedContent(stepText).includes('#')) { - violations.push({ - rule: STEP_LINT_RULES.hashInStepText.id, - severity: STEP_LINT_RULES.hashInStepText.severity, - message: `Step text contains # outside quoted strings which may be interpreted as a comment, silently truncating the step`, - file: filePath, - line: i + 1, - }); - } - } - } - return violations; -} -/** - * Check 10: Detect Gherkin keywords at the start of description lines. - * - * When a Feature or Rule description line starts with Given, When, Then, - * And, or But, the Gherkin parser interprets it as a step definition - * rather than description text. This terminates the description context - * and causes parse errors on subsequent description lines. - * - * Detection uses a state machine to track description context — after - * Feature: or Rule: lines, before Background:/Scenario:/etc. terminators. - * Within that context, lines starting with step keywords are flagged. - * - * Step DocStrings (""" blocks after Given/When/Then steps) are tracked - * separately. Feature:/Rule: appearing inside step DocStrings must NOT - * trigger description mode — they are just quoted text content. - */ -export function checkKeywordInDescription(content, filePath) { - const violations = []; - const lines = content.split('\n'); - let inDescription = false; - let inStepDocString = false; - /** Keywords that break the parser when at the start of a description line */ - const KEYWORD_AT_LINE_START = /^\s*(Given|When|Then|And|But)\s/; - /** Matches a """ delimiter line (with optional language hint) */ - const DOCSTRING_DELIMITER = /^\s*"""/; - for (let i = 0; i < lines.length; i++) { - const line = lines[i]; - if (line === undefined) - continue; - // Track step DocString boundaries (""" blocks outside description context). - // Inside a step DocString, Feature:/Rule: are just quoted text — skip them. - if (DOCSTRING_DELIMITER.test(line)) { - if (!inDescription) { - inStepDocString = !inStepDocString; - } - continue; - } - // While inside a step DocString, skip all other checks - if (inStepDocString) - continue; - // Start of description context - if (DESCRIPTION_STARTERS.test(line)) { - inDescription = true; - continue; - } - if (!inDescription) - continue; - // IMPORTANT: This keyword check MUST come before the DESCRIPTION_TERMINATORS - // check below. The keyword IS what terminates the description (it's also in - // DESCRIPTION_TERMINATORS), but we need to flag it as a violation FIRST - // before exiting the description context. Reordering these blocks would - // cause keywords to silently exit the description without being flagged. - if (KEYWORD_AT_LINE_START.test(line)) { - // But only flag if we're still in description context — - // actual step lines inside Scenario blocks are fine - violations.push({ - rule: STEP_LINT_RULES.keywordInDescription.id, - severity: STEP_LINT_RULES.keywordInDescription.severity, - message: `Description line starts with a Gherkin keyword — this breaks the parser. Rephrase to not start with Given/When/Then/And/But`, - file: filePath, - line: i + 1, - }); - inDescription = false; - continue; - } - // End of description context (non-keyword terminators) - if (DESCRIPTION_TERMINATORS.test(line)) { - inDescription = false; - continue; - } - } - return violations; -} -/** - * Run all feature-only checks on a single file. - */ -export function runFeatureChecks(content, filePath) { - return [ - ...checkHashInDescription(content, filePath), - ...checkDuplicateAndSteps(content, filePath), - ...checkDollarInStepText(content, filePath), - ...checkHashInStepText(content, filePath), - ...checkKeywordInDescription(content, filePath), - ]; -} -//# sourceMappingURL=feature-checks.js.map \ No newline at end of file diff --git a/dist/lint/steps/feature-checks.js.map b/dist/lint/steps/feature-checks.js.map deleted file mode 100644 index ac4a7029..00000000 --- a/dist/lint/steps/feature-checks.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"feature-checks.js","sourceRoot":"","sources":["../../../src/lint/steps/feature-checks.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD;;;GAGG;AACH,MAAM,uBAAuB,GAC3B,mGAAmG,CAAC;AAEtG;;GAEG;AACH,MAAM,oBAAoB,GAAG,wBAAwB,CAAC;AAEtD;;GAEG;AACH,MAAM,SAAS,GAAG,yCAAyC,CAAC;AAE5D;;GAEG;AACH,MAAM,iBAAiB,GAAG,4DAA4D,CAAC;AAEvF;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,sBAAsB,CACpC,OAAe,EACf,QAAgB;IAEhB,MAAM,UAAU,GAAoB,EAAE,CAAC;IACvC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAClC,IAAI,aAAa,GAAG,KAAK,CAAC;IAC1B,IAAI,iBAAiB,GAAG,KAAK,CAAC;IAE9B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACtC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACtB,IAAI,IAAI,KAAK,SAAS;YAAE,SAAS;QAEjC,+BAA+B;QAC/B,IAAI,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YACpC,aAAa,GAAG,IAAI,CAAC;YACrB,iBAAiB,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I,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YACpC,aAAa,GAAG,IAAI,CAAC;YACrB,SAAS;QACX,CAAC;QAED,IAAI,CAAC,aAAa;YAAE,SAAS;QAE7B,6EAA6E;QAC7E,4EAA4E;QAC5E,wEAAwE;QACxE,wEAAwE;QACxE,yEAAyE;QACzE,IAAI,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YACrC,wDAAwD;YACxD,oDAAoD;YACpD,UAAU,CAAC,IAAI,CAAC;gBACd,IAAI,EAAE,eAAe,CAAC,oBAAoB,CAAC,EAAE;gBAC7C,QAAQ,EAAE,eAAe,CAAC,oBAAoB,CAAC,QAAQ;gBACvD,OAAO,EAAE,6HAA6H;gBACtI,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,GAAG,CAAC;aACZ,CAAC,CAAC;YACH,aAAa,GAAG,KAAK,CAAC;YACtB,SAAS;QACX,CAAC;QAED,uDAAuD;QACvD,IAAI,uBAAuB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YACvC,aAAa,GAAG,KAAK,CAAC;YACtB,SAAS;QACX,CAAC;IACH,CAAC;IAED,OAAO,UAAU,CAAC;AACpB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAAe,EAAE,QAAgB;IAChE,OAAO;QACL,GAAG,sBAAsB,CAAC,OAAO,EAAE,QAAQ,CAAC;QAC5C,GAAG,sBAAsB,CAAC,OAAO,EAAE,QAAQ,CAAC;QAC5C,GAAG,qBAAqB,CAAC,OAAO,EAAE,QAAQ,CAAC;QAC3C,GAAG,mBAAmB,CAAC,OAAO,EAAE,QAAQ,CAAC;QACzC,GAAG,yBAAyB,CAAC,OAAO,EAAE,QAAQ,CAAC;KAChD,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/dist/lint/steps/index.d.ts b/dist/lint/steps/index.d.ts deleted file mode 100644 index a5438316..00000000 --- a/dist/lint/steps/index.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * vitest-cucumber step lint module. - * - * Provides static analysis for vitest-cucumber feature/step compatibility. - * Catches common traps that cause runtime failures: - * - {string} function params inside ScenarioOutline (should use variables) - * - Missing And destructuring (causes StepAbleUnknowStepError) - * - Missing Rule() wrapper (causes step matching failures) - * - # in descriptions (terminates Gherkin parser context) - * - Regex step patterns (not supported by vitest-cucumber) - * - {phrase} usage (not supported by vitest-cucumber) - */ -export type { StepLintRule, FeatureStepPair } from './types.js'; -export { STEP_LINT_RULES } from './types.js'; -export { runStepLint } from './runner.js'; -export type { StepLintOptions } from './runner.js'; -export { checkHashInDescription, checkDuplicateAndSteps, checkDollarInStepText, checkHashInStepText, checkKeywordInDescription, runFeatureChecks, } from './feature-checks.js'; -export { checkRegexStepPatterns, checkPhraseUsage, checkRepeatedStepPattern, runStepChecks, } from './step-checks.js'; -export { checkScenarioOutlineFunctionParams, checkMissingAndDestructuring, checkMissingRuleWrapper, checkOutlineQuotedValues, runCrossChecks, } from './cross-checks.js'; -export { extractFeaturePath, resolveFeatureStepPairs } from './pair-resolver.js'; -export { countBraceBalance } from './utils.js'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/dist/lint/steps/index.d.ts.map b/dist/lint/steps/index.d.ts.map deleted file mode 100644 index 3d8bd085..00000000 --- a/dist/lint/steps/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lint/steps/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAG7C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAGnD,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,mBAAmB,EACnB,yBAAyB,EACzB,gBAAgB,GACjB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACL,sBAAsB,EACtB,gBAAgB,EAChB,wBAAwB,EACxB,aAAa,GACd,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACL,kCAAkC,EAClC,4BAA4B,EAC5B,uBAAuB,EACvB,wBAAwB,EACxB,cAAc,GACf,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAGjF,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC"} \ No newline at end of file diff --git a/dist/lint/steps/index.js b/dist/lint/steps/index.js deleted file mode 100644 index 364bd823..00000000 --- a/dist/lint/steps/index.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * vitest-cucumber step lint module. - * - * Provides static analysis for vitest-cucumber feature/step compatibility. - * Catches common traps that cause runtime failures: - * - {string} function params inside ScenarioOutline (should use variables) - * - Missing And destructuring (causes StepAbleUnknowStepError) - * - Missing Rule() wrapper (causes step matching failures) - * - # in descriptions (terminates Gherkin parser context) - * - Regex step patterns (not supported by vitest-cucumber) - * - {phrase} usage (not supported by vitest-cucumber) - */ -export { STEP_LINT_RULES } from './types.js'; -// Runner -export { runStepLint } from './runner.js'; -// Feature checks (for targeted use) -export { checkHashInDescription, checkDuplicateAndSteps, checkDollarInStepText, checkHashInStepText, checkKeywordInDescription, runFeatureChecks, } from './feature-checks.js'; -// Step checks (for targeted use) -export { checkRegexStepPatterns, checkPhraseUsage, checkRepeatedStepPattern, runStepChecks, } from './step-checks.js'; -// Cross-file checks (for targeted use) -export { checkScenarioOutlineFunctionParams, checkMissingAndDestructuring, checkMissingRuleWrapper, checkOutlineQuotedValues, runCrossChecks, } from './cross-checks.js'; -// Pair resolver (for targeted use) -export { extractFeaturePath, resolveFeatureStepPairs } from './pair-resolver.js'; -// Utilities -export { countBraceBalance } from './utils.js'; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/lint/steps/index.js.map b/dist/lint/steps/index.js.map deleted file mode 100644 index 24706837..00000000 --- a/dist/lint/steps/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lint/steps/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C,SAAS;AACT,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG1C,oCAAoC;AACpC,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,mBAAmB,EACnB,yBAAyB,EACzB,gBAAgB,GACjB,MAAM,qBAAqB,CAAC;AAE7B,iCAAiC;AACjC,OAAO,EACL,sBAAsB,EACtB,gBAAgB,EAChB,wBAAwB,EACxB,aAAa,GACd,MAAM,kBAAkB,CAAC;AAE1B,uCAAuC;AACvC,OAAO,EACL,kCAAkC,EAClC,4BAA4B,EAC5B,uBAAuB,EACvB,wBAAwB,EACxB,cAAc,GACf,MAAM,mBAAmB,CAAC;AAE3B,mCAAmC;AACnC,OAAO,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAEjF,YAAY;AACZ,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC"} \ No newline at end of file diff --git a/dist/lint/steps/pair-resolver.d.ts b/dist/lint/steps/pair-resolver.d.ts deleted file mode 100644 index 7a10e622..00000000 --- a/dist/lint/steps/pair-resolver.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Resolves feature-to-step file pairs by extracting loadFeature() paths - * from step definition files. - */ -import type { LintViolation } from '../../validation-schemas/lint.js'; -import type { FeatureStepPair } from './types.js'; -/** - * Extract the feature file path from a loadFeature() call in step file content. - * - * Supports two patterns: - * 1. Simple string: loadFeature('tests/features/path/name.feature') - * 2. resolve(): loadFeature(resolve(__dirname, '../../../features/path/name.feature')) - * - * Returns null if no loadFeature call found or path is not extractable. - */ -export declare function extractFeaturePath(stepFileContent: string): string | null; -/** - * Resolve feature<->step file pairs from a list of step files. - * - * For each .steps.ts file, extracts the loadFeature() path and resolves - * it to an absolute path relative to baseDir. - * - * Returns pairs and any warnings (e.g., unparseable loadFeature calls). - */ -export declare function resolveFeatureStepPairs(stepFiles: readonly string[], baseDir: string): { - readonly pairs: readonly FeatureStepPair[]; - readonly warnings: readonly LintViolation[]; -}; -//# sourceMappingURL=pair-resolver.d.ts.map \ No newline at end of file diff --git a/dist/lint/steps/pair-resolver.d.ts.map b/dist/lint/steps/pair-resolver.d.ts.map deleted file mode 100644 index 9778c5e9..00000000 --- a/dist/lint/steps/pair-resolver.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pair-resolver.d.ts","sourceRoot":"","sources":["../../../src/lint/steps/pair-resolver.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAGlD;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAgBzE;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,SAAS,MAAM,EAAE,EAC5B,OAAO,EAAE,MAAM,GACd;IAAE,QAAQ,CAAC,KAAK,EAAE,SAAS,eAAe,EAAE,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,SAAS,aAAa,EAAE,CAAA;CAAE,CAwC7F"} \ No newline at end of file diff --git a/dist/lint/steps/pair-resolver.js b/dist/lint/steps/pair-resolver.js deleted file mode 100644 index 224838ac..00000000 --- a/dist/lint/steps/pair-resolver.js +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Resolves feature-to-step file pairs by extracting loadFeature() paths - * from step definition files. - */ -import { readFileSync } from 'fs'; -import { dirname, resolve } from 'path'; -import { STEP_LINT_RULES } from './types.js'; -/** - * Extract the feature file path from a loadFeature() call in step file content. - * - * Supports two patterns: - * 1. Simple string: loadFeature('tests/features/path/name.feature') - * 2. resolve(): loadFeature(resolve(__dirname, '../../../features/path/name.feature')) - * - * Returns null if no loadFeature call found or path is not extractable. - */ -export function extractFeaturePath(stepFileContent) { - // Pattern 1: Simple string literal - const simpleMatch = /loadFeature\s*\(\s*['"]([^'"]+)['"]\s*\)/.exec(stepFileContent); - if (simpleMatch?.[1] !== undefined) { - return simpleMatch[1]; - } - // Pattern 2: resolve(__dirname, 'relative/path') - const resolveMatch = /loadFeature\s*\(\s*resolve\s*\([^,]*,\s*['"]([^'"]+)['"]\s*\)\s*\)/.exec(stepFileContent); - if (resolveMatch?.[1] !== undefined) { - return resolveMatch[1]; - } - return null; -} -/** - * Resolve feature<->step file pairs from a list of step files. - * - * For each .steps.ts file, extracts the loadFeature() path and resolves - * it to an absolute path relative to baseDir. - * - * Returns pairs and any warnings (e.g., unparseable loadFeature calls). - */ -export function resolveFeatureStepPairs(stepFiles, baseDir) { - const pairs = []; - const warnings = []; - for (const stepPath of stepFiles) { - let content; - try { - content = readFileSync(stepPath, 'utf-8'); - } - catch { - warnings.push({ - rule: STEP_LINT_RULES.pairResolver.id, - severity: STEP_LINT_RULES.pairResolver.severity, - message: `Could not read step file`, - file: stepPath, - line: 0, - }); - continue; - } - const extractedPath = extractFeaturePath(content); - if (extractedPath === null) { - warnings.push({ - rule: STEP_LINT_RULES.pairResolver.id, - severity: STEP_LINT_RULES.pairResolver.severity, - message: `Could not extract loadFeature() path — cross-file checks will be skipped`, - file: stepPath, - line: 0, - }); - continue; - } - // If path starts with ../ or ./, resolve relative to the step file's directory - // (the resolve(__dirname, '...') pattern). Otherwise resolve relative to baseDir. - const featurePath = extractedPath.startsWith('.') - ? resolve(dirname(stepPath), extractedPath) - : resolve(baseDir, extractedPath); - pairs.push({ featurePath, stepPath }); - } - return { pairs, warnings }; -} -//# sourceMappingURL=pair-resolver.js.map \ No newline at end of file diff --git a/dist/lint/steps/pair-resolver.js.map b/dist/lint/steps/pair-resolver.js.map deleted file mode 100644 index d3a5b376..00000000 --- a/dist/lint/steps/pair-resolver.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pair-resolver.js","sourceRoot":"","sources":["../../../src/lint/steps/pair-resolver.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAGxC,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C;;;;;;;;GAQG;AACH,MAAM,UAAU,kBAAkB,CAAC,eAAuB;IACxD,mCAAmC;IACnC,MAAM,WAAW,GAAG,0CAA0C,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IACrF,IAAI,WAAW,EAAE,CAAC,CAAC,CAAC,KAAK,SAAS,EAAE,CAAC;QACnC,OAAO,WAAW,CAAC,CAAC,CAAC,CAAC;IACxB,CAAC;IAED,iDAAiD;IACjD,MAAM,YAAY,GAAG,oEAAoE,CAAC,IAAI,CAC5F,eAAe,CAChB,CAAC;IACF,IAAI,YAAY,EAAE,CAAC,CAAC,CAAC,KAAK,SAAS,EAAE,CAAC;QACpC,OAAO,YAAY,CAAC,CAAC,CAAC,CAAC;IACzB,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,uBAAuB,CACrC,SAA4B,EAC5B,OAAe;IAEf,MAAM,KAAK,GAAsB,EAAE,CAAC;IACpC,MAAM,QAAQ,GAAoB,EAAE,CAAC;IAErC,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;QACjC,IAAI,OAAe,CAAC;QACpB,IAAI,CAAC;YACH,OAAO,GAAG,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAC5C,CAAC;QAAC,MAAM,CAAC;YACP,QAAQ,CAAC,IAAI,CAAC;gBACZ,IAAI,EAAE,eAAe,CAAC,YAAY,CAAC,EAAE;gBACrC,QAAQ,EAAE,eAAe,CAAC,YAAY,CAAC,QAAQ;gBAC/C,OAAO,EAAE,0BAA0B;gBACnC,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC;aACR,CAAC,CAAC;YACH,SAAS;QACX,CAAC;QAED,MAAM,aAAa,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAC;QAClD,IAAI,aAAa,KAAK,IAAI,EAAE,CAAC;YAC3B,QAAQ,CAAC,IAAI,CAAC;gBACZ,IAAI,EAAE,eAAe,CAAC,YAAY,CAAC,EAAE;gBACrC,QAAQ,EAAE,eAAe,CAAC,YAAY,CAAC,QAAQ;gBAC/C,OAAO,EAAE,0EAA0E;gBACnF,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC;aACR,CAAC,CAAC;YACH,SAAS;QACX,CAAC;QAED,+EAA+E;QAC/E,kFAAkF;QAClF,MAAM,WAAW,GAAG,aAAa,CAAC,UAAU,CAAC,GAAG,CAAC;YAC/C,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,aAAa,CAAC;YAC3C,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;QACpC,KAAK,CAAC,IAAI,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC,CAAC;IACxC,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AAC7B,CAAC"} \ No newline at end of file diff --git a/dist/lint/steps/runner.d.ts b/dist/lint/steps/runner.d.ts deleted file mode 100644 index 5d83880a..00000000 --- a/dist/lint/steps/runner.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Orchestrator for vitest-cucumber step lint checks. - * - * Discovers feature and step files, pairs them, runs all checks, - * and returns a LintSummary compatible with the existing lint engine. - */ -import type { LintSummary } from '../engine.js'; -/** - * Options for the step lint runner - */ -export interface StepLintOptions { - /** Base directory for resolving paths (default: cwd) */ - readonly baseDir?: string; - /** Feature file glob patterns (default: tests + specs + decisions) */ - readonly featureGlobs?: readonly string[]; - /** Step file glob patterns (default: tests/steps) */ - readonly stepGlobs?: readonly string[]; -} -/** - * Run all step lint checks and return a LintSummary. - * - * Executes three categories of checks: - * 1. Feature-only checks on all .feature files - * 2. Step-only checks on all .steps.ts files - * 3. Cross-file checks on paired feature+step files - */ -export declare function runStepLint(options?: StepLintOptions): LintSummary; -//# sourceMappingURL=runner.d.ts.map \ No newline at end of file diff --git a/dist/lint/steps/runner.d.ts.map b/dist/lint/steps/runner.d.ts.map deleted file mode 100644 index 64249eb9..00000000 --- a/dist/lint/steps/runner.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../../src/lint/steps/runner.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAc,MAAM,cAAc,CAAC;AAkB5D;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,wDAAwD;IACxD,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,sEAAsE;IACtE,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1C,qDAAqD;IACrD,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACxC;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,OAAO,GAAE,eAAoB,GAAG,WAAW,CA4DtE"} \ No newline at end of file diff --git a/dist/lint/steps/runner.js b/dist/lint/steps/runner.js deleted file mode 100644 index 0872c1b0..00000000 --- a/dist/lint/steps/runner.js +++ /dev/null @@ -1,143 +0,0 @@ -/** - * Orchestrator for vitest-cucumber step lint checks. - * - * Discovers feature and step files, pairs them, runs all checks, - * and returns a LintSummary compatible with the existing lint engine. - */ -import { readFileSync } from 'fs'; -import { globSync } from 'glob'; -import { runFeatureChecks } from './feature-checks.js'; -import { runStepChecks } from './step-checks.js'; -import { runCrossChecks } from './cross-checks.js'; -import { resolveFeatureStepPairs } from './pair-resolver.js'; -/** - * Default scan paths relative to baseDir - */ -const DEFAULT_FEATURE_GLOBS = [ - 'tests/features/**/*.feature', - 'delivery-process/specs/**/*.feature', - 'delivery-process/decisions/**/*.feature', -]; -const DEFAULT_STEP_GLOBS = ['tests/steps/**/*.steps.ts']; -/** - * Run all step lint checks and return a LintSummary. - * - * Executes three categories of checks: - * 1. Feature-only checks on all .feature files - * 2. Step-only checks on all .steps.ts files - * 3. Cross-file checks on paired feature+step files - */ -export function runStepLint(options = {}) { - const baseDir = options.baseDir ?? process.cwd(); - const featureGlobs = options.featureGlobs ?? DEFAULT_FEATURE_GLOBS; - const stepGlobs = options.stepGlobs ?? DEFAULT_STEP_GLOBS; - // Discover files - const featureFiles = discoverFiles(featureGlobs, baseDir); - const stepFiles = discoverFiles(stepGlobs, baseDir); - // Collect all violations keyed by file path - const violationsByFile = new Map(); - function addViolations(filePath, violations) { - for (const v of violations) { - const existing = violationsByFile.get(filePath); - if (existing !== undefined) { - existing.push(v); - } - else { - violationsByFile.set(filePath, [v]); - } - } - } - // Phase 1: Feature-only checks - for (const featurePath of featureFiles) { - const content = readFileSafe(featurePath); - if (content === null) - continue; - addViolations(featurePath, runFeatureChecks(content, featurePath)); - } - // Phase 2: Step-only checks - for (const stepPath of stepFiles) { - const content = readFileSafe(stepPath); - if (content === null) - continue; - addViolations(stepPath, runStepChecks(content, stepPath)); - } - // Phase 3: Cross-file checks - const { pairs, warnings } = resolveFeatureStepPairs(stepFiles, baseDir); - // Add pairing warnings - for (const w of warnings) { - addViolations(w.file, [w]); - } - for (const { featurePath, stepPath } of pairs) { - const featureContent = readFileSafe(featurePath); - const stepContent = readFileSafe(stepPath); - if (featureContent === null || stepContent === null) - continue; - const crossViolations = runCrossChecks(featureContent, stepContent, stepPath, featurePath); - // Cross-check violations may reference either the step file or the feature file. - // Group each violation under its own reported file path. - for (const v of crossViolations) { - addViolations(v.file, [v]); - } - } - // Build LintSummary - return buildSummary(violationsByFile, featureFiles.length + stepFiles.length); -} -/** - * Discover files matching glob patterns relative to baseDir. - */ -function discoverFiles(patterns, baseDir) { - const files = []; - for (const pattern of patterns) { - const matches = globSync(pattern, { cwd: baseDir, absolute: true }); - files.push(...matches); - } - // Deduplicate (in case patterns overlap) - return [...new Set(files)].sort(); -} -/** - * Read a file safely, returning null on failure. - */ -function readFileSafe(filePath) { - try { - return readFileSync(filePath, 'utf-8'); - } - catch { - return null; - } -} -/** - * Build a LintSummary from collected violations. - */ -function buildSummary(violationsByFile, filesScanned) { - const results = []; - let errorCount = 0; - let warningCount = 0; - let infoCount = 0; - for (const [file, violations] of violationsByFile) { - if (violations.length === 0) - continue; - results.push({ file, violations }); - for (const v of violations) { - switch (v.severity) { - case 'error': - errorCount++; - break; - case 'warning': - warningCount++; - break; - case 'info': - infoCount++; - break; - } - } - } - return { - results, - errorCount, - warningCount, - infoCount, - filesScanned, - directivesChecked: filesScanned, // Each file is one "unit" checked - }; -} -//# sourceMappingURL=runner.js.map \ No newline at end of file diff --git a/dist/lint/steps/runner.js.map b/dist/lint/steps/runner.js.map deleted file mode 100644 index 451af193..00000000 --- a/dist/lint/steps/runner.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"runner.js","sourceRoot":"","sources":["../../../src/lint/steps/runner.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAGhC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,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C;oBACf,MAAM;gBACR,KAAK,MAAM;oBACT,SAAS,EAAE,CAAC;oBACZ,MAAM;YACV,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO;QACL,OAAO;QACP,UAAU;QACV,YAAY;QACZ,SAAS;QACT,YAAY;QACZ,iBAAiB,EAAE,YAAY,EAAE,kCAAkC;KACpE,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/dist/lint/steps/step-checks.d.ts b/dist/lint/steps/step-checks.d.ts deleted file mode 100644 index 1b588658..00000000 --- a/dist/lint/steps/step-checks.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Step-definition-only lint checks for vitest-cucumber compatibility. - * - * These checks scan .steps.ts files for patterns that vitest-cucumber - * does not support, without needing the corresponding .feature file. - */ -import type { LintViolation } from '../../validation-schemas/lint.js'; -/** - * Check 5: Detect regex patterns in step definitions. - * - * vitest-cucumber only supports string patterns with {string}/{int}. - * Using regex patterns (e.g., Given(/pattern/, ...)) throws - * StepAbleStepExpressionError. - */ -export declare function checkRegexStepPatterns(content: string, filePath: string): readonly LintViolation[]; -/** - * Check 6: Detect {phrase} usage in step definition strings. - * - * vitest-cucumber does not support the {phrase} Cucumber expression type. - * Use {string} (with quoted values in the feature file) instead. - */ -export declare function checkPhraseUsage(content: string, filePath: string): readonly LintViolation[]; -/** - * Check 11: Detect repeated step patterns within the same scenario block. - * - * When the same step pattern (e.g., Given('a state', ...)) is registered - * twice in one Scenario block, vitest-cucumber overwrites the first - * registration. Only the last callback runs, causing silent test failures - * where assertions appear to pass but the setup was wrong. - * - * Detection: Track scenario blocks using brace-depth counting, collect - * step registration patterns within each block, and flag duplicates. - * The same pattern in different scenario blocks is fine — each block - * has its own scope. - */ -export declare function checkRepeatedStepPattern(content: string, filePath: string): readonly LintViolation[]; -/** - * Run all step-only checks on a single file. - */ -export declare function runStepChecks(content: string, filePath: string): readonly LintViolation[]; -//# sourceMappingURL=step-checks.d.ts.map \ No newline at end of file diff --git a/dist/lint/steps/step-checks.d.ts.map b/dist/lint/steps/step-checks.d.ts.map deleted file mode 100644 index 36ab487c..00000000 --- a/dist/lint/steps/step-checks.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"step-checks.d.ts","sourceRoot":"","sources":["../../../src/lint/steps/step-checks.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAoBtE;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,GACf,SAAS,aAAa,EAAE,CAoB1B;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,aAAa,EAAE,CAoB5F;AAqBD;;;;;;;;;;;;GAYG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,GACf,SAAS,aAAa,EAAE,CAuD1B;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,aAAa,EAAE,CAMzF"} \ No newline at end of file diff --git a/dist/lint/steps/step-checks.js b/dist/lint/steps/step-checks.js deleted file mode 100644 index e2a2932b..00000000 --- a/dist/lint/steps/step-checks.js +++ /dev/null @@ -1,164 +0,0 @@ -/** - * Step-definition-only lint checks for vitest-cucumber compatibility. - * - * These checks scan .steps.ts files for patterns that vitest-cucumber - * does not support, without needing the corresponding .feature file. - */ -import { STEP_LINT_RULES } from './types.js'; -import { countBraceBalance } from './utils.js'; -/** - * Matches step registration calls using regex patterns instead of strings. - * Pattern: Given(/ or When(/ or Then(/ or And(/ — with optional whitespace. - * - * Excludes: - * - Comment lines (// Given(/...)) - * - String arguments that happen to contain a forward slash - */ -const REGEX_STEP_PATTERN = /^\s*(?!\/\/)(Given|When|Then|And|But)\s*\(\s*\//; -/** - * Matches step strings containing {phrase} — an unsupported Cucumber expression type. - * Looks for step registration calls with a string argument containing {phrase}. - */ -const PHRASE_IN_STEP = /(?:Given|When|Then|And|But)\s*\(\s*['"][^'"]*\{phrase\}[^'"]*['"]/; -/** - * Check 5: Detect regex patterns in step definitions. - * - * vitest-cucumber only supports string patterns with {string}/{int}. - * Using regex patterns (e.g., Given(/pattern/, ...)) throws - * StepAbleStepExpressionError. - */ -export function checkRegexStepPatterns(content, filePath) { - const violations = []; - const lines = content.split('\n'); - for (let i = 0; i < lines.length; i++) { - const line = lines[i]; - if (line === undefined) - continue; - if (REGEX_STEP_PATTERN.test(line)) { - violations.push({ - rule: STEP_LINT_RULES.regexStepPattern.id, - severity: STEP_LINT_RULES.regexStepPattern.severity, - message: `Regex step pattern detected — vitest-cucumber only supports string patterns with {string}/{int}`, - file: filePath, - line: i + 1, - }); - } - } - return violations; -} -/** - * Check 6: Detect {phrase} usage in step definition strings. - * - * vitest-cucumber does not support the {phrase} Cucumber expression type. - * Use {string} (with quoted values in the feature file) instead. - */ -export function checkPhraseUsage(content, filePath) { - const violations = []; - const lines = content.split('\n'); - for (let i = 0; i < lines.length; i++) { - const line = lines[i]; - if (line === undefined) - continue; - if (PHRASE_IN_STEP.test(line)) { - violations.push({ - rule: STEP_LINT_RULES.unsupportedPhraseType.id, - severity: STEP_LINT_RULES.unsupportedPhraseType.severity, - message: `{phrase} is not supported by vitest-cucumber — use {string} with quoted values in the feature file`, - file: filePath, - line: i + 1, - }); - } - } - return violations; -} -/** - * Matches the start of a scenario block in step definitions. - * Captures: Scenario(, ScenarioOutline(, RuleScenario(, RuleScenarioOutline( - */ -const SCENARIO_BLOCK_START = /(?:Rule)?Scenario(?:Outline)?\s*\(/; -/** - * Matches step registration calls and captures the pattern string. - * Group 1: keyword (Given/When/Then/And/But) - * Group 2: opening quote character (' or ") - * Group 3: the pattern string (inside quotes) - * - * Uses a backreference (\2) to match the closing quote of the same type - * as the opening quote. This correctly handles embedded quotes: - * And('it should include category "api"') → captures full pattern - * And("it should include category 'api'") → captures full pattern - */ -const STEP_REGISTRATION = /^\s*(Given|When|Then|And|But)\s*\(\s*(['"])(.*?)\2/; -/** - * Check 11: Detect repeated step patterns within the same scenario block. - * - * When the same step pattern (e.g., Given('a state', ...)) is registered - * twice in one Scenario block, vitest-cucumber overwrites the first - * registration. Only the last callback runs, causing silent test failures - * where assertions appear to pass but the setup was wrong. - * - * Detection: Track scenario blocks using brace-depth counting, collect - * step registration patterns within each block, and flag duplicates. - * The same pattern in different scenario blocks is fine — each block - * has its own scope. - */ -export function checkRepeatedStepPattern(content, filePath) { - const violations = []; - const lines = content.split('\n'); - let inScenarioBlock = false; - let braceDepth = 0; - // Map from "keyword:pattern" to first-seen line number - let patternsInBlock = new Map(); - for (let i = 0; i < lines.length; i++) { - const line = lines[i]; - if (line === undefined) - continue; - // Detect start of a new scenario block - if (!inScenarioBlock && SCENARIO_BLOCK_START.test(line)) { - inScenarioBlock = true; - braceDepth = countBraceBalance(line); - patternsInBlock = new Map(); - continue; - } - if (inScenarioBlock) { - braceDepth += countBraceBalance(line); - // Check for step registration - const stepMatch = STEP_REGISTRATION.exec(line); - if (stepMatch !== null) { - const keyword = stepMatch[1] ?? ''; - const pattern = stepMatch[3] ?? ''; - const key = `${keyword}:${pattern}`; - const previousLine = patternsInBlock.get(key); - if (previousLine !== undefined) { - violations.push({ - rule: STEP_LINT_RULES.repeatedStepPattern.id, - severity: STEP_LINT_RULES.repeatedStepPattern.severity, - message: `Step pattern ${keyword}('${pattern}') registered twice in this scenario — first at line ${previousLine}. Second registration overwrites the first`, - file: filePath, - line: i + 1, - }); - } - else { - patternsInBlock.set(key, i + 1); - } - } - // End of scenario block - if (braceDepth <= 0) { - inScenarioBlock = false; - braceDepth = 0; - patternsInBlock = new Map(); - } - } - } - return violations; -} -/** - * Run all step-only checks on a single file. - */ -export function runStepChecks(content, filePath) { - return [ - ...checkRegexStepPatterns(content, filePath), - ...checkPhraseUsage(content, filePath), - ...checkRepeatedStepPattern(content, filePath), - ]; -} -//# sourceMappingURL=step-checks.js.map \ No newline at end of file diff --git a/dist/lint/steps/step-checks.js.map b/dist/lint/steps/step-checks.js.map deleted file mode 100644 index 809b702a..00000000 --- a/dist/lint/steps/step-checks.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"step-checks.js","sourceRoot":"","sources":["../../../src/lint/steps/step-checks.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/C;;;;;;;GAOG;AACH,MAAM,kBAAkB,GAAG,iDAAiD,CAAC;AAE7E;;;GAGG;AACH,MAAM,cAAc,GAAG,mEAAmE,CAAC;AAE3F;;;;;;GAMG;AACH,MAAM,UAAU,sBAAsB,CACpC,OAAe,EACf,QAAgB;IAEhB,MAAM,UAAU,GAAoB,EAAE,CAAC;IACvC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAElC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACtC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACtB,IAAI,IAAI,KAAK,SAAS;YAAE,SAAS;QAEjC,IAAI,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YAClC,UAAU,CAAC,IAAI,CAAC;gBACd,IAAI,EAAE,eAAe,CAAC,gBAAgB,CAAC,EAAE;gBACzC,QAAQ,EAAE,eAAe,CAAC,gBAAgB,CAAC,QAAQ;gBACnD,OAAO,EAAE,iGAAiG;gBAC1G,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,GAAG,CAAC;aACZ,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO,UAAU,CAAC;AACpB,CAAC;A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CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;gBAClC,CAAC;YACH,CAAC;YAED,wBAAwB;YACxB,IAAI,UAAU,IAAI,CAAC,EAAE,CAAC;gBACpB,eAAe,GAAG,KAAK,CAAC;gBACxB,UAAU,GAAG,CAAC,CAAC;gBACf,eAAe,GAAG,IAAI,GAAG,EAAE,CAAC;YAC9B,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,UAAU,CAAC;AACpB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,OAAe,EAAE,QAAgB;IAC7D,OAAO;QACL,GAAG,sBAAsB,CAAC,OAAO,EAAE,QAAQ,CAAC;QAC5C,GAAG,gBAAgB,CAAC,OAAO,EAAE,QAAQ,CAAC;QACtC,GAAG,wBAAwB,CAAC,OAAO,EAAE,QAAQ,CAAC;KAC/C,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/dist/lint/steps/types.d.ts b/dist/lint/steps/types.d.ts deleted file mode 100644 index fa8c2c35..00000000 --- a/dist/lint/steps/types.d.ts +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Types for the vitest-cucumber step linter. - * - * Defines the shapes used by feature-only, step-only, and cross-file checks. - */ -import type { LintSeverity } from '../../validation-schemas/lint.js'; -/** - * A lint rule definition for step/feature boundary checking - */ -export interface StepLintRule { - /** Unique rule ID (e.g., 'hash-in-description') */ - readonly id: string; - /** Default severity level */ - readonly severity: LintSeverity; - /** Human-readable rule description */ - readonly description: string; -} -/** - * A paired feature file and its step definition file - */ -export interface FeatureStepPair { - /** Absolute path to the .feature file */ - readonly featurePath: string; - /** Absolute path to the .steps.ts file */ - readonly stepPath: string; -} -/** All step lint rule IDs */ -export declare const STEP_LINT_RULES: { - hashInDescription: { - id: string; - severity: "error"; - description: string; - }; - duplicateAndStep: { - id: string; - severity: "error"; - description: string; - }; - dollarInStepText: { - id: string; - severity: "warning"; - description: string; - }; - regexStepPattern: { - id: string; - severity: "error"; - description: string; - }; - unsupportedPhraseType: { - id: string; - severity: "error"; - description: string; - }; - scenarioOutlineFunctionParams: { - id: string; - severity: "error"; - description: string; - }; - missingAndDestructuring: { - id: string; - severity: "error"; - description: string; - }; - missingRuleWrapper: { - id: string; - severity: "error"; - description: string; - }; - hashInStepText: { - id: string; - severity: "warning"; - description: string; - }; - keywordInDescription: { - id: string; - severity: "error"; - description: string; - }; - outlineQuotedValues: { - id: string; - severity: "warning"; - description: string; - }; - repeatedStepPattern: { - id: string; - severity: "error"; - description: string; - }; - pairResolver: { - id: string; - severity: "warning"; - description: string; - }; -}; -//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/dist/lint/steps/types.d.ts.map b/dist/lint/steps/types.d.ts.map deleted file mode 100644 index 6a77bc19..00000000 --- a/dist/lint/steps/types.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lint/steps/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAErE;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,mDAAmD;IACnD,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,6BAA6B;IAC7B,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;IAChC,sCAAsC;IACtC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,yCAAyC;IACzC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,0CAA0C;IAC1C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED,6BAA6B;AAC7B,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqFY,CAAC"} \ No newline at end of file diff --git a/dist/lint/steps/types.js b/dist/lint/steps/types.js deleted file mode 100644 index 908578ef..00000000 --- a/dist/lint/steps/types.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Types for the vitest-cucumber step linter. - * - * Defines the shapes used by feature-only, step-only, and cross-file checks. - */ -/** All step lint rule IDs */ -export const STEP_LINT_RULES = { - // Feature-only checks - hashInDescription: { - id: 'hash-in-description', - severity: 'error', - description: '# at line start in description context terminates the description (Gherkin parser treats it as a comment)', - }, - duplicateAndStep: { - id: 'duplicate-and-step', - severity: 'error', - description: 'Multiple And steps with identical text in the same scenario cause vitest-cucumber matching failures', - }, - dollarInStepText: { - id: 'dollar-in-step-text', - severity: 'warning', - description: '$ character in step text causes matching issues in vitest-cucumber', - }, - // Step-only checks - regexStepPattern: { - id: 'regex-step-pattern', - severity: 'error', - description: 'vitest-cucumber does not support regex step patterns — use string patterns with {string}/{int}', - }, - unsupportedPhraseType: { - id: 'unsupported-phrase-type', - severity: 'error', - description: 'vitest-cucumber does not support {phrase} — use {string} instead', - }, - // Cross-file checks - scenarioOutlineFunctionParams: { - id: 'scenario-outline-function-params', - severity: 'error', - description: 'ScenarioOutline step callbacks should use variables object, not function params (_ctx, value)', - }, - missingAndDestructuring: { - id: 'missing-and-destructuring', - severity: 'error', - description: 'Feature has And steps but step definition does not destructure And — causes StepAbleUnknowStepError', - }, - missingRuleWrapper: { - id: 'missing-rule-wrapper', - severity: 'error', - description: 'Feature has Rule: blocks but step definition does not destructure Rule from describeFeature', - }, - // Extended rules (step-lint-extended-rules spec) - hashInStepText: { - id: 'hash-in-step-text', - severity: 'warning', - description: 'Mid-line # in step text is interpreted as a Gherkin comment, silently truncating the step', - }, - keywordInDescription: { - id: 'keyword-in-description', - severity: 'error', - description: 'Description line starting with Given/When/Then/And/But breaks the Gherkin parser', - }, - outlineQuotedValues: { - id: 'outline-quoted-values', - severity: 'warning', - description: 'Scenario Outline steps with quoted values suggest Cucumber expression pattern instead of variable substitution', - }, - repeatedStepPattern: { - id: 'repeated-step-pattern', - severity: 'error', - description: 'Same step pattern registered twice in one scenario block — second registration overwrites the first', - }, - // Infrastructure - pairResolver: { - id: 'pair-resolver', - severity: 'warning', - description: 'Feature-to-step file pairing issue — could not read step file or extract loadFeature() path', - }, -}; -//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/dist/lint/steps/types.js.map b/dist/lint/steps/types.js.map deleted file mode 100644 index aa50666d..00000000 --- a/dist/lint/steps/types.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/lint/steps/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AA0BH,6BAA6B;AAC7B,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,sBAAsB;IACtB,iBAAiB,EAAE;QACjB,EAAE,EAAE,qBAAqB;QACzB,QAAQ,EAAE,OAAgB;QAC1B,WAAW,EACT,2GAA2G;KAC9G;IACD,gBAAgB,EAAE;QAChB,EAAE,EAAE,oBAAoB;QACxB,QAAQ,EAAE,OAAgB;QAC1B,WAAW,EACT,qGAAqG;KACxG;IACD,gBAAgB,EAAE;QAChB,EAAE,EAAE,qBAAqB;QACzB,QAAQ,EAAE,SAAkB;QAC5B,WAAW,EAAE,oEAAoE;KAClF;IAED,mBAAmB;IACnB,gBAAgB,EAAE;QAChB,EAAE,EAAE,oBAAoB;QACxB,QAAQ,EAAE,OAAgB;QAC1B,WAAW,EACT,gGAAgG;KACnG;IACD,qBAAqB,EAAE;QACrB,EAAE,EAAE,yBAAyB;QAC7B,QAAQ,EAAE,OAAgB;QAC1B,WAAW,EAAE,kEAAkE;KAChF;IAED,oBAAoB;IACpB,6BAA6B,EAAE;QAC7B,EAAE,EAAE,kCAAkC;QACtC,QAAQ,EAAE,OAAgB;QAC1B,WAAW,EACT,+FAA+F;KAClG;IACD,uBAAuB,EAAE;QACvB,EAAE,EAAE,2BAA2B;QAC/B,QAAQ,EAAE,OAAgB;QAC1B,WAAW,EACT,qGAAqG;KACxG;IACD,kBAAkB,EAAE;QAClB,EAAE,EAAE,sBAAsB;QAC1B,QAAQ,EAAE,OAAgB;QAC1B,WAAW,EACT,6FAA6F;KAChG;IAED,iDAAiD;IACjD,cAAc,EAAE;QACd,EAAE,EAAE,mBAAmB;QACvB,QAAQ,EAAE,SAAkB;QAC5B,WAAW,EACT,2FAA2F;KAC9F;IACD,oBAAoB,EAAE;QACpB,EAAE,EAAE,wBAAwB;QAC5B,QAAQ,EAAE,OAAgB;QAC1B,WAAW,EAAE,kFAAkF;KAChG;IACD,mBAAmB,EAAE;QACnB,EAAE,EAAE,uBAAuB;QAC3B,QAAQ,EAAE,SAAkB;QAC5B,WAAW,EACT,gHAAgH;KACnH;IACD,mBAAmB,EAAE;QACnB,EAAE,EAAE,uBAAuB;QAC3B,QAAQ,EAAE,OAAgB;QAC1B,WAAW,EACT,qGAAqG;KACxG;IAED,iBAAiB;IACjB,YAAY,EAAE;QACZ,EAAE,EAAE,eAAe;QACnB,QAAQ,EAAE,SAAkB;QAC5B,WAAW,EACT,6FAA6F;KAChG;CACqC,CAAC"} \ No newline at end of file diff --git a/dist/lint/steps/utils.d.ts b/dist/lint/steps/utils.d.ts deleted file mode 100644 index 0c8f6d1d..00000000 --- a/dist/lint/steps/utils.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Shared utilities for the vitest-cucumber step linter. - */ -/** - * Strip content inside quoted strings (single and double quotes) from text. - * - * Returns the text with quoted content replaced by empty quote pairs. - * This allows lint checks to detect problematic characters (like $ or #) - * only when they appear OUTSIDE of quoted string values in step text. - * - * Example: `parse JSON '{"$schema": "..."}' now` → `parse JSON '' now` - */ -export declare function stripQuotedContent(text: string): string; -/** - * Count the net brace balance on a line: +1 for {, -1 for }. - * Ignores braces inside string literals (single/double/backtick quotes). - * - * Used by both step-checks and cross-checks to track scenario block - * boundaries via brace depth counting. - */ -export declare function countBraceBalance(line: string): number; -//# sourceMappingURL=utils.d.ts.map \ No newline at end of file diff --git a/dist/lint/steps/utils.d.ts.map b/dist/lint/steps/utils.d.ts.map deleted file mode 100644 index 4faf80ef..00000000 --- a/dist/lint/steps/utils.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/lint/steps/utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAMvD;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CA6BtD"} \ No newline at end of file diff --git a/dist/lint/steps/utils.js b/dist/lint/steps/utils.js deleted file mode 100644 index 9bc05e93..00000000 --- a/dist/lint/steps/utils.js +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Shared utilities for the vitest-cucumber step linter. - */ -/** - * Strip content inside quoted strings (single and double quotes) from text. - * - * Returns the text with quoted content replaced by empty quote pairs. - * This allows lint checks to detect problematic characters (like $ or #) - * only when they appear OUTSIDE of quoted string values in step text. - * - * Example: `parse JSON '{"$schema": "..."}' now` → `parse JSON '' now` - */ -export function stripQuotedContent(text) { - return text.replace(/"[^"]*"|'[^']*'/g, (match) => { - // Preserve the quote characters but remove inner content - const quote = match.charAt(0); - return `${quote}${quote}`; - }); -} -/** - * Count the net brace balance on a line: +1 for {, -1 for }. - * Ignores braces inside string literals (single/double/backtick quotes). - * - * Used by both step-checks and cross-checks to track scenario block - * boundaries via brace depth counting. - */ -export function countBraceBalance(line) { - let balance = 0; - let inString = null; - let escaped = false; - for (const ch of line) { - if (escaped) { - escaped = false; - continue; - } - if (ch === '\\') { - escaped = true; - continue; - } - if (inString !== null) { - if (ch === inString) { - inString = null; - } - continue; - } - if (ch === "'" || ch === '"' || ch === '`') { - inString = ch; - continue; - } - if (ch === '{') - balance++; - if (ch === '}') - balance--; - } - return balance; -} -//# sourceMappingURL=utils.js.map \ No newline at end of file diff --git a/dist/lint/steps/utils.js.map b/dist/lint/steps/utils.js.map deleted file mode 100644 index 6ab47ff7..00000000 --- a/dist/lint/steps/utils.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/lint/steps/utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;GAQG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAY;IAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,kBAAkB,EAAE,CAAC,KAAK,EAAE,EAAE;QAChD,yDAAyD;QACzD,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QAC9B,OAAO,GAAG,KAAK,GAAG,KAAK,EAAE,CAAC;IAC5B,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAAC,IAAY;IAC5C,IAAI,OAAO,GAAG,CAAC,CAAC;IAChB,IAAI,QAAQ,GAAkB,IAAI,CAAC;IACnC,IAAI,OAAO,GAAG,KAAK,CAAC;IAEpB,KAAK,MAAM,EAAE,IAAI,IAAI,EAAE,CAAC;QACtB,IAAI,OAAO,EAAE,CAAC;YACZ,OAAO,GAAG,KAAK,CAAC;YAChB,SAAS;QACX,CAAC;QACD,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC;YAChB,OAAO,GAAG,IAAI,CAAC;YACf,SAAS;QACX,CAAC;QACD,IAAI,QAAQ,KAAK,IAAI,EAAE,CAAC;YACtB,IAAI,EAAE,KAAK,QAAQ,EAAE,CAAC;gBACpB,QAAQ,GAAG,IAAI,CAAC;YAClB,CAAC;YACD,SAAS;QACX,CAAC;QACD,IAAI,EAAE,KAAK,GAAG,IAAI,EAAE,KAAK,GAAG,IAAI,EAAE,KAAK,GAAG,EAAE,CAAC;YAC3C,QAAQ,GAAG,EAAE,CAAC;YACd,SAAS;QACX,CAAC;QACD,IAAI,EAAE,KAAK,GAAG;YAAE,OAAO,EAAE,CAAC;QAC1B,IAAI,EAAE,KAAK,GAAG;YAAE,OAAO,EAAE,CAAC;IAC5B,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC"} \ No newline at end of file diff --git a/dist/renderable/codecs/adr.d.ts b/dist/renderable/codecs/adr.d.ts deleted file mode 100644 index 1d52ba62..00000000 --- a/dist/renderable/codecs/adr.d.ts +++ /dev/null @@ -1,4042 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern AdrDocumentCodec - * @libar-docs-status completed - * - * ## ADR Document Codec - * - * Transforms MasterDataset into RenderableDocument for Architecture Decision Records. - * Extracts ADRs from patterns with `@libar-docs-adr` tags. - * - * ### When to Use - * - * - When generating Architecture Decision Record documentation - * - When extracting ADRs from feature files with structured annotations - * - When building custom ADR reports with configurable content sections - * - * ### Factory Pattern - * - * Use `createAdrCodec(options)` for custom options: - * ```typescript - * const codec = createAdrCodec({ - * groupBy: 'phase', - * includeContext: true, - * includeDecision: true, - * includeConsequences: false, - * }); - * const doc = codec.decode(dataset); - * ``` - * - * ### ADR Content - * - * ADR content is parsed from feature file descriptions: - * - **Context**: Problem background and constraints - * - **Decision**: The chosen solution - * - **Consequences**: Positive and negative outcomes - */ -import { z } from 'zod'; -import { MasterDatasetSchema } from '../../validation-schemas/master-dataset.js'; -import { type BaseCodecOptions } from './types/base.js'; -/** - * Options for AdrDocumentCodec - */ -export interface AdrCodecOptions extends BaseCodecOptions { - /** Group ADRs by (default: "category") */ - groupBy?: 'category' | 'phase' | 'date'; - /** Include context section (default: true) */ - includeContext?: boolean; - /** Include decision section (default: true) */ - includeDecision?: boolean; - /** Include consequences section (default: true) */ - includeConsequences?: boolean; -} -/** - * Default options for AdrDocumentCodec - */ -export declare const DEFAULT_ADR_OPTIONS: Required; -import { RenderableDocumentOutputSchema } from './shared-schema.js'; -/** - * Create an AdrDocumentCodec with custom options. - * - * @param options - Codec configuration options - * @returns Configured Zod codec - * - * @example - * ```typescript - * // Group by phase instead of category - * const codec = createAdrCodec({ groupBy: 'phase' }); - * - * // Hide consequences section - * const codec = createAdrCodec({ includeConsequences: false }); - * - * // Inline all categories (no progressive disclosure) - * const codec = createAdrCodec({ generateDetailFiles: false }); - * ``` - */ -export declare function createAdrCodec(options?: AdrCodecOptions): z.ZodCodec; -/** - * Default ADR Document Codec - * - * Transforms MasterDataset → RenderableDocument for architecture decisions. - * Groups ADRs by category with progressive disclosure. - */ -export declare const AdrDocumentCodec: z.ZodCodec>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - tagRegistry: z.ZodObject<{ - $schema: z.ZodOptional; - version: z.ZodDefault; - categories: z.ZodArray>>; - }, z.core.$strict>>; - metadataTags: z.ZodArray; - purpose: z.ZodString; - required: z.ZodDefault>; - repeatable: z.ZodDefault>; - values: z.ZodOptional>; - default: z.ZodOptional; - example: z.ZodOptional; - metadataKey: z.ZodOptional; - transform: z.ZodOptional>; - }, z.core.$strict>>; - aggregationTags: z.ZodArray; - purpose: z.ZodString; - }, z.core.$strict>>; - formatOptions: z.ZodDefault>; - tagPrefix: z.ZodDefault; - fileOptInTag: z.ZodDefault; - }, z.core.$strict>; - byStatus: z.ZodObject<{ - completed: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - active: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - planned: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>; - byPhase: z.ZodArray; - patterns: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - counts: z.ZodObject<{ - completed: z.ZodNumber; - active: z.ZodNumber; - planned: z.ZodNumber; - total: z.ZodNumber; - }, z.core.$strip>; - }, z.core.$strip>>; - byQuarter: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byCategory: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - bySource: z.ZodObject<{ - typescript: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - gherkin: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - roadmap: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - prd: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>; - counts: z.ZodObject<{ - completed: z.ZodNumber; - active: z.ZodNumber; - planned: z.ZodNumber; - total: z.ZodNumber; - }, z.core.$strip>; - phaseCount: z.ZodNumber; - categoryCount: z.ZodNumber; - relationshipIndex: z.ZodOptional; - usedBy: z.ZodArray; - dependsOn: z.ZodArray; - enables: z.ZodArray; - implementsPatterns: z.ZodArray; - implementedBy: z.ZodArray; - }, z.core.$strip>>; - extendsPattern: z.ZodOptional; - extendedBy: z.ZodArray; - seeAlso: z.ZodArray; - apiRef: z.ZodArray; - }, z.core.$strip>>>; - archIndex: z.ZodOptional>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byContext: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byLayer: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byView: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - all: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>>; -}, z.core.$strip>, z.ZodObject<{ - title: z.ZodString; - purpose: z.ZodOptional; - detailLevel: z.ZodOptional; - sections: z.ZodArray; - additionalFiles: z.ZodOptional>; -}, z.core.$strip>>; -//# sourceMappingURL=adr.d.ts.map \ No newline at end of file diff --git a/dist/renderable/codecs/adr.d.ts.map b/dist/renderable/codecs/adr.d.ts.map deleted file mode 100644 index 44530ed9..00000000 --- a/dist/renderable/codecs/adr.d.ts.map +++ /dev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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAmB,CAAC"} \ No newline at end of file diff --git a/dist/renderable/codecs/adr.js b/dist/renderable/codecs/adr.js deleted file mode 100644 index 40d3c715..00000000 --- a/dist/renderable/codecs/adr.js +++ /dev/null @@ -1,584 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern AdrDocumentCodec - * @libar-docs-status completed - * - * ## ADR Document Codec - * - * Transforms MasterDataset into RenderableDocument for Architecture Decision Records. - * Extracts ADRs from patterns with `@libar-docs-adr` tags. - * - * ### When to Use - * - * - When generating Architecture Decision Record documentation - * - When extracting ADRs from feature files with structured annotations - * - When building custom ADR reports with configurable content sections - * - * ### Factory Pattern - * - * Use `createAdrCodec(options)` for custom options: - * ```typescript - * const codec = createAdrCodec({ - * groupBy: 'phase', - * includeContext: true, - * includeDecision: true, - * includeConsequences: false, - * }); - * const doc = codec.decode(dataset); - * ``` - * - * ### ADR Content - * - * ADR content is parsed from feature file descriptions: - * - **Context**: Problem background and constraints - * - **Decision**: The chosen solution - * - **Consequences**: Positive and negative outcomes - */ -import { z } from 'zod'; -import { MasterDatasetSchema, } from '../../validation-schemas/master-dataset.js'; -import { partitionRulesByPrefix, renderRuleDescription, dedent, } from './helpers.js'; -import { extractTablesFromDescription } from './convention-extractor.js'; -import { heading, paragraph, separator, table, code, collapsible, linkOut, document, } from '../schema.js'; -import { getDisplayName } from '../utils.js'; -import { groupBy } from '../../utils/index.js'; -import { DEFAULT_BASE_OPTIONS, mergeOptions } from './types/base.js'; -/** - * Default options for AdrDocumentCodec - */ -export const DEFAULT_ADR_OPTIONS = { - ...DEFAULT_BASE_OPTIONS, - groupBy: 'category', - includeContext: true, - includeDecision: true, - includeConsequences: true, -}; -import { RenderableDocumentOutputSchema } from './shared-schema.js'; -// ═══════════════════════════════════════════════════════════════════════════ -// ADR Document Codec -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Create an AdrDocumentCodec with custom options. - * - * @param options - Codec configuration options - * @returns Configured Zod codec - * - * @example - * ```typescript - * // Group by phase instead of category - * const codec = createAdrCodec({ groupBy: 'phase' }); - * - * // Hide consequences section - * const codec = createAdrCodec({ includeConsequences: false }); - * - * // Inline all categories (no progressive disclosure) - * const codec = createAdrCodec({ generateDetailFiles: false }); - * ``` - */ -export function createAdrCodec(options) { - const opts = mergeOptions(DEFAULT_ADR_OPTIONS, options); - return z.codec(MasterDatasetSchema, RenderableDocumentOutputSchema, { - decode: (dataset) => { - return buildAdrDocument(dataset, opts); - }, - /** @throws Always - this codec is decode-only. See zod-codecs.md */ - encode: () => { - throw new Error('AdrDocumentCodec is decode-only. See zod-codecs.md'); - }, - }); -} -/** - * Default ADR Document Codec - * - * Transforms MasterDataset → RenderableDocument for architecture decisions. - * Groups ADRs by category with progressive disclosure. - */ -export const AdrDocumentCodec = createAdrCodec(); -// ═══════════════════════════════════════════════════════════════════════════ -// Document Builder -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Build ADR document - */ -function buildAdrDocument(dataset, options) { - const sections = []; - // Filter to patterns with ADR metadata - const adrPatterns = dataset.patterns.filter((p) => p.adr !== undefined); - if (adrPatterns.length === 0) { - sections.push(heading(2, 'No Architecture Decisions'), paragraph('No patterns have @libar-docs-adr tags.')); - return document('Architecture Decision Records', sections, { - purpose: 'Architectural decisions extracted from feature files', - }); - } - // 1. Summary - sections.push(...buildAdrSummary(adrPatterns)); - // 2. ADRs by grouping - if (options.groupBy === 'phase') { - sections.push(...buildAdrsByPhase(adrPatterns, options)); - } - else if (options.groupBy === 'date') { - sections.push(...buildAdrsByDate(adrPatterns, options)); - } - else { - // Default: category - sections.push(...buildAdrsByCategory(adrPatterns, options)); - } - // 3. ADR index table - sections.push(...buildAdrIndexTable(adrPatterns, options)); - // Build category detail files (if enabled and threshold met) - const additionalFiles = options.generateDetailFiles - ? buildAdrDetailFiles(adrPatterns, options) - : {}; - const docOpts = { - purpose: 'Architectural decisions extracted from feature files', - detailLevel: options.generateDetailFiles - ? 'Summary with links to category details' - : 'Compact summary', - }; - if (Object.keys(additionalFiles).length > 0) { - docOpts.additionalFiles = additionalFiles; - } - return document('Architecture Decision Records', sections, docOpts); -} -// ═══════════════════════════════════════════════════════════════════════════ -// Section Builders -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Build ADR summary section - */ -function buildAdrSummary(patterns) { - // Count by status - const byStatus = groupBy(patterns.filter((p) => p.adrStatus), (p) => p.adrStatus ?? 'proposed'); - const accepted = byStatus.get('accepted')?.length ?? 0; - const proposed = byStatus.get('proposed')?.length ?? 0; - const deprecated = byStatus.get('deprecated')?.length ?? 0; - const superseded = byStatus.get('superseded')?.length ?? 0; - // Count by category - const byCategory = groupBy(patterns.filter((p) => p.adrCategory), (p) => p.adrCategory ?? 'uncategorized'); - return [ - heading(2, 'Summary'), - table(['Metric', 'Value'], [ - ['Total ADRs', String(patterns.length)], - ['Accepted', String(accepted)], - ['Proposed', String(proposed)], - ['Deprecated', String(deprecated)], - ['Superseded', String(superseded)], - ['Categories', String(byCategory.size)], - ]), - separator(), - ]; -} -/** - * Build ADRs grouped by category - * Each ADR links to its individual detail file when generateDetailFiles is enabled - */ -function buildAdrsByCategory(patterns, options) { - const sections = []; - const byCategory = groupBy(patterns, (p) => p.adrCategory ?? 'uncategorized'); - if (byCategory.size === 0) { - return []; - } - sections.push(heading(2, 'By Category')); - const sortedCategories = [...byCategory.keys()].sort(); - for (const category of sortedCategories) { - const categoryPatterns = byCategory.get(category) ?? []; - if (!options.generateDetailFiles) { - // Inline the category (no progressive disclosure) - sections.push(...buildCategorySection(category, categoryPatterns, options)); - } - else { - // Show category with list of ADRs linking to individual files - sections.push(heading(3, category), paragraph(`${categoryPatterns.length} decisions`)); - // Sort by ADR number and create links - const sorted = [...categoryPatterns].sort((a, b) => { - const aNum = parseAdrNumber(a.adr); - const bNum = parseAdrNumber(b.adr); - return aNum - bNum; - }); - const adrRows = sorted.map((p) => { - const adrNum = p.adr ?? '???'; - const name = getDisplayName(p); - const status = p.adrStatus ?? 'proposed'; - const slug = adrToSlug(p); - return [`[ADR-${adrNum}](decisions/${slug}.md)`, name, status]; - }); - sections.push(table(['ADR', 'Title', 'Status'], adrRows), separator()); - } - } - return sections; -} -/** - * Build a category section with ADRs - */ -function buildCategorySection(category, patterns, options) { - const sections = []; - sections.push(heading(3, category)); - sections.push(paragraph(`${patterns.length} decisions`)); - // Sort by ADR number - const sorted = [...patterns].sort((a, b) => { - const aNum = parseAdrNumber(a.adr); - const bNum = parseAdrNumber(b.adr); - return aNum - bNum; - }); - for (const pattern of sorted) { - sections.push(...buildAdrEntry(pattern, options)); - } - sections.push(separator()); - return sections; -} -/** - * Build a single ADR entry - */ -function buildAdrEntry(pattern, options) { - const sections = []; - const name = getDisplayName(pattern); - const adrNum = pattern.adr ?? '???'; - const status = pattern.adrStatus ?? 'proposed'; - sections.push(heading(4, `ADR-${adrNum}: ${name}`)); - // Metadata - const metaRows = [['Status', status]]; - if (pattern.adrCategory) { - metaRows.push(['Category', pattern.adrCategory]); - } - if (pattern.phase !== undefined) { - metaRows.push(['Phase', String(pattern.phase)]); - } - if (pattern.adrSupersedes) { - metaRows.push(['Supersedes', `ADR-${pattern.adrSupersedes}`]); - } - if (pattern.adrSupersededBy) { - metaRows.push(['Superseded By', `ADR-${pattern.adrSupersededBy}`]); - } - sections.push(table(['Property', 'Value'], metaRows)); - // ADR Content sections from Gherkin Rule: keywords - // Rules are partitioned by semantic prefix: "Context...", "Decision...", "Consequence..." - const partitioned = partitionRulesByPrefix(pattern.rules, { - warnOnOther: true, - patternName: name, - }); - sections.push(...renderPartitionedAdrSections(partitioned, options, 5)); - return sections; -} -/** - * Build ADRs grouped by phase - */ -function buildAdrsByPhase(patterns, options) { - const sections = []; - const byPhase = groupBy(patterns, (p) => p.phase ?? 0); - if (byPhase.size === 0) { - return []; - } - sections.push(heading(2, 'By Phase')); - const sortedPhases = [...byPhase.keys()].sort((a, b) => a - b); - for (const phaseNum of sortedPhases) { - const phasePatterns = byPhase.get(phaseNum) ?? []; - const phaseContent = []; - for (const pattern of phasePatterns) { - phaseContent.push(...buildAdrEntry(pattern, options)); - } - sections.push(collapsible(`Phase ${phaseNum} (${phasePatterns.length} decisions)`, phaseContent)); - } - sections.push(separator()); - return sections; -} -/** - * Build ADRs grouped by date (quarter) - */ -function buildAdrsByDate(patterns, options) { - const sections = []; - const byQuarter = groupBy(patterns.filter((p) => p.quarter), (p) => p.quarter ?? 'undated'); - if (byQuarter.size === 0) { - return []; - } - sections.push(heading(2, 'By Date')); - const sortedQuarters = [...byQuarter.keys()].sort().reverse(); // Most recent first - for (const quarter of sortedQuarters) { - const quarterPatterns = byQuarter.get(quarter) ?? []; - const quarterContent = []; - for (const pattern of quarterPatterns) { - quarterContent.push(...buildAdrEntry(pattern, options)); - } - sections.push(collapsible(`${quarter} (${quarterPatterns.length} decisions)`, quarterContent)); - } - sections.push(separator()); - return sections; -} -/** - * Build ADR index table - * Links to individual files when generateDetailFiles is enabled - */ -function buildAdrIndexTable(patterns, options) { - // Sort by ADR number - const sorted = [...patterns].sort((a, b) => { - const aNum = parseAdrNumber(a.adr); - const bNum = parseAdrNumber(b.adr); - return aNum - bNum; - }); - const rows = sorted.map((p) => { - const adrNum = p.adr ?? '???'; - const name = getDisplayName(p); - const status = p.adrStatus ?? 'proposed'; - const category = p.adrCategory ?? '-'; - if (options.generateDetailFiles) { - const slug = adrToSlug(p); - return [`[ADR-${adrNum}](decisions/${slug}.md)`, name, status, category]; - } - return [`ADR-${adrNum}`, name, status, category]; - }); - return [ - heading(2, 'ADR Index'), - table(['ADR', 'Title', 'Status', 'Category'], rows), - separator(), - ]; -} -// ═══════════════════════════════════════════════════════════════════════════ -// Individual ADR Detail Files (Progressive Disclosure) -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Generate URL-safe slug from ADR number and name - * - * Handles edge cases: - * - Empty pattern names fallback to "unnamed" - * - ADR numbers are zero-padded to 3 digits - * - Non-alphanumeric characters are replaced with hyphens - * - * @param pattern - The extracted pattern with ADR metadata - * @returns URL-safe slug like "adr-001-my-decision" - */ -function adrToSlug(pattern) { - const adrNum = pattern.adr ?? '000'; - const displayName = getDisplayName(pattern); - // Strip leading "ADR NNN" or "PDR NNN" prefix to avoid duplication (e.g., adr-001-adr-001-...) - const stripped = displayName.replace(/^(?:ADR|PDR)\s*\d+\s*/i, ''); - const sluggedName = stripped - .toLowerCase() - .replace(/[^a-z0-9]+/g, '-') - .replace(/^-+|-+$/g, ''); - // Fallback to "unnamed" if the slug would be empty - const name = sluggedName.length > 0 ? sluggedName : 'unnamed'; - return `adr-${adrNum.padStart(3, '0')}-${name}`; -} -/** - * Parse ADR number for sorting, handling non-numeric values - * - * Returns 0 for non-numeric ADR numbers to avoid NaN in sort comparisons. - * Emits a warning when falling back to 0 for non-numeric values. - * Examples: "001" → 1, "v1" → 0 (with warning), undefined → 0 - * - * @param adr - The ADR number string to parse - * @param onWarning - Optional callback for warnings (default: console.warn) - */ -function parseAdrNumber(adr, onWarning = console.warn) { - if (!adr) - return 0; - const parsed = parseInt(adr, 10); - if (Number.isNaN(parsed)) { - onWarning(`[adr-codec] Invalid ADR number "${adr}", defaulting to 0 for sorting`); - return 0; - } - return parsed; -} -/** - * Build individual ADR files (progressive disclosure) - * Creates one file per ADR instead of grouping by category - */ -function buildAdrDetailFiles(patterns, options) { - const files = {}; - for (const pattern of patterns) { - const slug = adrToSlug(pattern); - files[`decisions/${slug}.md`] = buildSingleAdrDocument(pattern, options); - } - return files; -} -/** - * Build a single ADR detail document - */ -function buildSingleAdrDocument(pattern, options) { - const sections = []; - const name = getDisplayName(pattern); - const adrNum = pattern.adr ?? '???'; - const status = pattern.adrStatus ?? 'proposed'; - // Metadata - const metaRows = [['Status', status]]; - if (pattern.adrCategory) { - metaRows.push(['Category', pattern.adrCategory]); - } - if (pattern.phase !== undefined) { - metaRows.push(['Phase', String(pattern.phase)]); - } - if (pattern.adrSupersedes) { - metaRows.push(['Supersedes', `ADR-${pattern.adrSupersedes}`]); - } - if (pattern.adrSupersededBy) { - metaRows.push(['Superseded By', `ADR-${pattern.adrSupersededBy}`]); - } - sections.push(heading(2, 'Overview'), table(['Property', 'Value'], metaRows)); - // Feature description content (Context, Decision, Consequences as prose) - // Some ADRs/PDRs use the Feature description for structured content instead of - // Rule: prefix naming. Render it between Overview and Rules. - // IMPORTANT: dedent BEFORE trim — trim strips first-line indent, defeating dedent. - const featureDesc = pattern.directive.description; - if (featureDesc.trim()) { - sections.push(...renderFeatureDescription(featureDesc)); - } - // ADR Content sections from Gherkin Rule: keywords - // Rules are partitioned by semantic prefix: "Context...", "Decision...", "Consequence..." - const partitioned = partitionRulesByPrefix(pattern.rules, { - warnOnOther: true, - patternName: name, - }); - sections.push(...renderPartitionedAdrSections(partitioned, options, 2)); - // Back link - sections.push(separator(), linkOut('← Back to All Decisions', '../DECISIONS.md')); - return document(`ADR-${adrNum}: ${name}`, sections, { - purpose: `Architecture decision record for ${name}`, - }); -} -// ═══════════════════════════════════════════════════════════════════════════ -// Utilities -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Render a Feature description preserving content order. - * - * Unlike `renderRuleDescription` (which extracts annotations and tables out-of-order), - * this function walks the description linearly, detecting transitions between prose, - * table blocks, and DocString blocks. Each block type is rendered appropriately: - * - Prose → `paragraph()` with dedented text - * - Tables → `table()` with proper separator rows via `extractTablesFromDescription` - * - DocStrings → `code()` with language hint and dedented content - * - * @param description - Raw Feature description text (Gherkin-indented) - * @returns Array of SectionBlocks preserving the original content order - */ -function renderFeatureDescription(description) { - const blocks = []; - const dedented = dedent(description); - const lines = dedented.split('\n'); - let currentBlock = []; - let blockType = 'prose'; - let docStringLang = ''; - const flushBlock = () => { - const content = currentBlock.join('\n').trim(); - if (content.length === 0) { - currentBlock = []; - return; - } - if (blockType === 'table') { - // Parse table lines into structured table with separator rows - const extracted = extractTablesFromDescription(content); - for (const tbl of extracted) { - const rows = tbl.rows.map((row) => tbl.headers.map((h) => row[h] ?? '')); - blocks.push(table([...tbl.headers], rows)); - } - } - else if (blockType === 'docstring') { - blocks.push(code(dedent(content), docStringLang || 'text')); - } - else { - blocks.push(paragraph(content)); - } - currentBlock = []; - }; - let inDocString = false; - for (const line of lines) { - const trimmed = line.trim(); - // DocString delimiter detection - if (trimmed.startsWith('"""')) { - if (!inDocString) { - // Opening delimiter — flush current block, start DocString - flushBlock(); - inDocString = true; - blockType = 'docstring'; - docStringLang = trimmed.slice(3).trim(); - continue; - } - else { - // Closing delimiter — flush DocString - flushBlock(); - inDocString = false; - blockType = 'prose'; - continue; - } - } - if (inDocString) { - currentBlock.push(line); - continue; - } - // Detect table lines (start and end with |) - const isTableLine = trimmed.startsWith('|') && trimmed.endsWith('|'); - if (isTableLine && blockType !== 'table') { - // Transition: prose → table - flushBlock(); - blockType = 'table'; - currentBlock.push(trimmed); - } - else if (!isTableLine && blockType === 'table') { - // Transition: table → prose - flushBlock(); - blockType = 'prose'; - currentBlock.push(trimmed); - } - else { - // Prose lines: trimmed to strip Gherkin indentation - // Table lines: trimmed for consistent pipe alignment - // DocString lines: raw (handled separately above) - currentBlock.push(trimmed); - } - } - // Flush any remaining content - flushBlock(); - return blocks; -} -/** - * Render partitioned ADR sections (Context, Decision, Consequences) - * - * Shared helper to ensure consistent rendering between buildAdrEntry and buildSingleAdrDocument. - * - * @param partitioned - Partitioned ADR rules - * @param options - ADR codec options - * @param headingLevel - Heading level for section headers (2 for detail docs, 5 for inline entries) - * @returns Array of SectionBlocks - */ -function renderPartitionedAdrSections(partitioned, options, headingLevel) { - const sections = []; - // Render Context section - if (options.includeContext && partitioned.context.length > 0) { - sections.push(heading(headingLevel, 'Context')); - for (const rule of partitioned.context) { - if (rule.description) { - sections.push(...renderRuleDescription(rule.description)); - } - } - } - // Render Decision section - if (options.includeDecision && partitioned.decision.length > 0) { - sections.push(heading(headingLevel, 'Decision')); - for (const rule of partitioned.decision) { - if (rule.description) { - sections.push(...renderRuleDescription(rule.description)); - } - } - } - // Render Consequences section - if (options.includeConsequences && partitioned.consequences.length > 0) { - sections.push(heading(headingLevel, 'Consequences')); - for (const rule of partitioned.consequences) { - if (rule.description) { - sections.push(...renderRuleDescription(rule.description)); - } - } - } - // Render rules that don't match ADR prefixes (e.g., "DD-1 - ...", invariants) - if (partitioned.other.length > 0) { - sections.push(heading(headingLevel, 'Rules')); - const ruleHeadingLevel = headingLevel === 2 ? 3 : 6; - for (const rule of partitioned.other) { - sections.push(heading(ruleHeadingLevel, rule.name)); - if (rule.description) { - sections.push(...renderRuleDescription(rule.description)); - } - } - } - return sections; -} -//# sourceMappingURL=adr.js.map \ No newline at end of file diff --git a/dist/renderable/codecs/adr.js.map b/dist/renderable/codecs/adr.js.map deleted file mode 100644 index 25a13ca1..00000000 --- a/dist/renderable/codecs/adr.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,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Q,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC,CAAC;QAC9C,MAAM,gBAAgB,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAEpD,KAAK,MAAM,IAAI,IAAI,WAAW,CAAC,KAAK,EAAE,CAAC;YACrC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;YACpD,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;gBACrB,QAAQ,CAAC,IAAI,CAAC,GAAG,qBAAqB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;YAC5D,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"} \ No newline at end of file diff --git a/dist/renderable/codecs/architecture.d.ts b/dist/renderable/codecs/architecture.d.ts deleted file mode 100644 index 831f3964..00000000 --- a/dist/renderable/codecs/architecture.d.ts +++ /dev/null @@ -1,4057 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern ArchitectureCodec - * @libar-docs-status completed - * @libar-docs-arch-role projection - * @libar-docs-arch-context renderer - * @libar-docs-arch-layer application - * @libar-docs-include codec-transformation - * @libar-docs-uses MasterDataset, ArchIndex - * - * ## Architecture Diagram Codec - * - * Transforms MasterDataset into a RenderableDocument containing - * architecture diagrams (Mermaid) generated from source annotations. - * - * ### When to Use - * - * - When generating architecture diagrams from code annotations - * - When visualizing bounded contexts and component relationships - * - When creating layered architecture views (domain/application/infrastructure) - * - * ### Factory Pattern - * - * Use `createArchitectureCodec(options)` to create a configured codec: - * ```typescript - * const codec = createArchitectureCodec({ diagramType: "component" }); - * const doc = codec.decode(dataset); - * ``` - * - * Or use the default export for standard behavior: - * ```typescript - * const doc = ArchitectureDocumentCodec.decode(dataset); - * ``` - * - * ### Supported Diagram Types - * - * - **component**: System overview with bounded context subgraphs - * - **layered**: Components organized by architectural layer - */ -import { z } from 'zod'; -import { MasterDatasetSchema } from '../../validation-schemas/master-dataset.js'; -import { type BaseCodecOptions } from './types/base.js'; -import { RenderableDocumentOutputSchema } from './shared-schema.js'; -/** - * Diagram type for architecture visualization - * - component: System overview with bounded context subgraphs - * - layered: Components organized by architectural layer - */ -export type ArchitectureDiagramType = 'component' | 'layered'; -/** - * Options for ArchitectureDocumentCodec - */ -export interface ArchitectureCodecOptions extends BaseCodecOptions { - /** Type of diagram to generate (default: "component") */ - diagramType?: ArchitectureDiagramType; - /** Include component inventory table (default: true) */ - includeInventory?: boolean; - /** Include legend for arrow styles (default: true) */ - includeLegend?: boolean; - /** Filter to specific contexts (default: all contexts) */ - filterContexts?: string[]; -} -/** - * Default options for ArchitectureDocumentCodec - */ -export declare const DEFAULT_ARCHITECTURE_OPTIONS: Required; -/** - * Create an ArchitectureDocumentCodec with custom options. - * - * @param options - Codec configuration options - * @returns Configured Zod codec - * - * @example - * ```typescript - * // Generate component diagram (default) - * const codec = createArchitectureCodec(); - * - * // Generate layered diagram - * const codec = createArchitectureCodec({ diagramType: "layered" }); - * - * // Filter to specific bounded contexts - * const codec = createArchitectureCodec({ filterContexts: ["orders", "inventory"] }); - * ``` - */ -export declare function createArchitectureCodec(options?: ArchitectureCodecOptions): z.ZodCodec; -/** - * Default Architecture Document Codec - * - * Transforms MasterDataset → RenderableDocument for architecture diagrams. - * Uses default options with component diagram type. - * - * @example - * ```typescript - * const doc = ArchitectureDocumentCodec.decode(masterDataset); - * const markdown = renderToMarkdown(doc); - * ``` - */ -export declare const ArchitectureDocumentCodec: z.ZodCodec>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - tagRegistry: z.ZodObject<{ - $schema: z.ZodOptional; - version: z.ZodDefault; - categories: z.ZodArray>>; - }, z.core.$strict>>; - metadataTags: z.ZodArray; - purpose: z.ZodString; - required: z.ZodDefault>; - repeatable: z.ZodDefault>; - values: z.ZodOptional>; - default: z.ZodOptional; - example: z.ZodOptional; - metadataKey: z.ZodOptional; - transform: z.ZodOptional>; - }, z.core.$strict>>; - aggregationTags: z.ZodArray; - purpose: z.ZodString; - }, z.core.$strict>>; - formatOptions: z.ZodDefault>; - tagPrefix: z.ZodDefault; - fileOptInTag: z.ZodDefault; - }, z.core.$strict>; - byStatus: z.ZodObject<{ - completed: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - active: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - planned: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>; - byPhase: z.ZodArray; - patterns: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - counts: z.ZodObject<{ - completed: z.ZodNumber; - active: z.ZodNumber; - planned: z.ZodNumber; - total: z.ZodNumber; - }, z.core.$strip>; - }, z.core.$strip>>; - byQuarter: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byCategory: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - bySource: z.ZodObject<{ - typescript: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - gherkin: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - roadmap: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - prd: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>; - counts: z.ZodObject<{ - completed: z.ZodNumber; - active: z.ZodNumber; - planned: z.ZodNumber; - total: z.ZodNumber; - }, z.core.$strip>; - phaseCount: z.ZodNumber; - categoryCount: z.ZodNumber; - relationshipIndex: z.ZodOptional; - usedBy: z.ZodArray; - dependsOn: z.ZodArray; - enables: z.ZodArray; - implementsPatterns: z.ZodArray; - implementedBy: z.ZodArray; - }, z.core.$strip>>; - extendsPattern: z.ZodOptional; - extendedBy: z.ZodArray; - seeAlso: z.ZodArray; - apiRef: z.ZodArray; - }, z.core.$strip>>>; - archIndex: z.ZodOptional>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byContext: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byLayer: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byView: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - all: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>>; -}, z.core.$strip>, z.ZodObject<{ - title: z.ZodString; - purpose: z.ZodOptional; - detailLevel: z.ZodOptional; - sections: z.ZodArray; - additionalFiles: z.ZodOptional>; -}, z.core.$strip>>; -//# sourceMappingURL=architecture.d.ts.map \ No newline at end of file diff --git a/dist/renderable/codecs/architecture.d.ts.map b/dist/renderable/codecs/architecture.d.ts.map deleted file mode 100644 index 4d94f89a..00000000 --- a/dist/renderable/codecs/architecture.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"architecture.d.ts","sourceRoot":"","sources":["../../../src/renderable/codecs/architecture.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,mBAAmB,EAEpB,MAAM,4CAA4C,CAAC;AAcpD,OAAO,EAAE,KAAK,gBAAgB,EAAsC,MAAM,iBAAiB,CAAC;AAC5F,OAAO,EAAE,8BAA8B,EAAE,MAAM,oBAAoB,CAAC;AAOpE;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAAG,WAAW,GAAG,SAAS,CAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAA4B,CAAC"} \ No newline at end of file diff --git a/dist/renderable/codecs/architecture.js b/dist/renderable/codecs/architecture.js deleted file mode 100644 index c03b0bb5..00000000 --- a/dist/renderable/codecs/architecture.js +++ /dev/null @@ -1,453 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern ArchitectureCodec - * @libar-docs-status completed - * @libar-docs-arch-role projection - * @libar-docs-arch-context renderer - * @libar-docs-arch-layer application - * @libar-docs-include codec-transformation - * @libar-docs-uses MasterDataset, ArchIndex - * - * ## Architecture Diagram Codec - * - * Transforms MasterDataset into a RenderableDocument containing - * architecture diagrams (Mermaid) generated from source annotations. - * - * ### When to Use - * - * - When generating architecture diagrams from code annotations - * - When visualizing bounded contexts and component relationships - * - When creating layered architecture views (domain/application/infrastructure) - * - * ### Factory Pattern - * - * Use `createArchitectureCodec(options)` to create a configured codec: - * ```typescript - * const codec = createArchitectureCodec({ diagramType: "component" }); - * const doc = codec.decode(dataset); - * ``` - * - * Or use the default export for standard behavior: - * ```typescript - * const doc = ArchitectureDocumentCodec.decode(dataset); - * ``` - * - * ### Supported Diagram Types - * - * - **component**: System overview with bounded context subgraphs - * - **layered**: Components organized by architectural layer - */ -import { z } from 'zod'; -import { MasterDatasetSchema, } from '../../validation-schemas/master-dataset.js'; -import { heading, paragraph, separator, table, mermaid, document, } from '../schema.js'; -import { getDisplayName, getStatusEmoji } from '../utils.js'; -import { getPatternName } from '../../api/pattern-helpers.js'; -import { DEFAULT_BASE_OPTIONS, mergeOptions } from './types/base.js'; -import { RenderableDocumentOutputSchema } from './shared-schema.js'; -import { sanitizeNodeId, EDGE_STYLES } from './diagram-utils.js'; -/** - * Default options for ArchitectureDocumentCodec - */ -export const DEFAULT_ARCHITECTURE_OPTIONS = { - ...DEFAULT_BASE_OPTIONS, - diagramType: 'component', - includeInventory: true, - includeLegend: true, - filterContexts: [], -}; -// ═══════════════════════════════════════════════════════════════════════════ -// Architecture Document Codec -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Create an ArchitectureDocumentCodec with custom options. - * - * @param options - Codec configuration options - * @returns Configured Zod codec - * - * @example - * ```typescript - * // Generate component diagram (default) - * const codec = createArchitectureCodec(); - * - * // Generate layered diagram - * const codec = createArchitectureCodec({ diagramType: "layered" }); - * - * // Filter to specific bounded contexts - * const codec = createArchitectureCodec({ filterContexts: ["orders", "inventory"] }); - * ``` - */ -export function createArchitectureCodec(options) { - const opts = mergeOptions(DEFAULT_ARCHITECTURE_OPTIONS, options); - return z.codec(MasterDatasetSchema, RenderableDocumentOutputSchema, { - decode: (dataset) => { - return buildArchitectureDocument(dataset, opts); - }, - /** @throws Always - this codec is decode-only. See zod-codecs.md */ - encode: () => { - throw new Error('ArchitectureDocumentCodec is decode-only. See zod-codecs.md'); - }, - }); -} -/** - * Default Architecture Document Codec - * - * Transforms MasterDataset → RenderableDocument for architecture diagrams. - * Uses default options with component diagram type. - * - * @example - * ```typescript - * const doc = ArchitectureDocumentCodec.decode(masterDataset); - * const markdown = renderToMarkdown(doc); - * ``` - */ -export const ArchitectureDocumentCodec = createArchitectureCodec(); -// ═══════════════════════════════════════════════════════════════════════════ -// Document Builder -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Build the architecture document from dataset - */ -function buildArchitectureDocument(dataset, options) { - const sections = []; - const archIndex = dataset.archIndex; - // Check if we have any architecture metadata - if (!archIndex || archIndex.all.length === 0) { - return document('Architecture', [ - heading(2, 'No Architecture Data'), - paragraph('No patterns with architecture annotations found. ' + - 'Add `@libar-docs-arch-role`, `@libar-docs-arch-context`, or ' + - '`@libar-docs-arch-layer` tags to source files to generate architecture diagrams.'), - ]); - } - // Apply context filter if specified - const filteredIndex = applyContextFilter(archIndex, options.filterContexts); - // 1. Summary section - sections.push(...buildSummarySection(filteredIndex)); - // 2. Main diagram based on type - if (options.diagramType === 'component') { - sections.push(...buildComponentDiagram(filteredIndex, dataset)); - } - else { - sections.push(...buildLayeredDiagram(filteredIndex, dataset)); - } - // 3. Legend (if enabled) - if (options.includeLegend) { - sections.push(...buildLegendSection()); - } - // 4. Component inventory (if enabled) - if (options.includeInventory) { - sections.push(...buildInventorySection(filteredIndex)); - } - return document('Architecture', sections, { - purpose: 'Auto-generated architecture diagram from source annotations', - detailLevel: options.diagramType === 'component' - ? 'Component diagram with bounded context subgraphs' - : 'Layered architecture diagram', - }); -} -/** - * Apply context filter to architecture index - */ -function applyContextFilter(archIndex, filterContexts) { - if (filterContexts.length === 0) { - return archIndex; - } - // Filter byContext to only include specified contexts - const filteredByContext = {}; - for (const ctx of filterContexts) { - if (archIndex.byContext[ctx]) { - filteredByContext[ctx] = archIndex.byContext[ctx]; - } - } - // Filter all to only include patterns in specified contexts - const filteredAll = archIndex.all.filter((p) => p.archContext !== undefined && filterContexts.includes(p.archContext)); - // Filter byRole to only include patterns in specified contexts - const filteredByRole = {}; - for (const [role, patterns] of Object.entries(archIndex.byRole)) { - const filtered = patterns.filter((p) => p.archContext !== undefined && filterContexts.includes(p.archContext)); - if (filtered.length > 0) { - filteredByRole[role] = filtered; - } - } - // Filter byLayer similarly - const filteredByLayer = {}; - for (const [layer, patterns] of Object.entries(archIndex.byLayer)) { - const filtered = patterns.filter((p) => p.archContext !== undefined && filterContexts.includes(p.archContext)); - if (filtered.length > 0) { - filteredByLayer[layer] = filtered; - } - } - // Filter byView similarly - const filteredByView = {}; - for (const [view, patterns] of Object.entries(archIndex.byView)) { - const filtered = patterns.filter((p) => p.archContext !== undefined && filterContexts.includes(p.archContext)); - if (filtered.length > 0) { - filteredByView[view] = filtered; - } - } - return { - byContext: filteredByContext, - byRole: filteredByRole, - byLayer: filteredByLayer, - byView: filteredByView, - all: filteredAll, - }; -} -// ═══════════════════════════════════════════════════════════════════════════ -// Section Builders -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Build summary section with component counts - */ -function buildSummarySection(archIndex) { - const contextCount = Object.keys(archIndex.byContext).length; - const roleCount = Object.keys(archIndex.byRole).length; - const totalComponents = archIndex.all.length; - return [ - heading(2, 'Overview'), - paragraph(`This diagram was auto-generated from ${totalComponents} annotated source files ` + - `across ${contextCount} bounded context${contextCount !== 1 ? 's' : ''}.`), - table(['Metric', 'Count'], [ - ['Total Components', String(totalComponents)], - ['Bounded Contexts', String(contextCount)], - ['Component Roles', String(roleCount)], - ]), - separator(), - ]; -} -/** - * Build component diagram with bounded context subgraphs - * - * Arrow styles per PatternRelationshipModel: - * - uses → solid arrow (-->) - * - depends-on → dashed arrow (-.->) - * - implements → dotted arrow (..->) - * - extends → solid open arrow (-->>) - */ -function buildComponentDiagram(archIndex, dataset) { - const lines = ['graph TB']; - const nodeIds = new Map(); // pattern name → node ID - // First pass: collect all node IDs - for (const pattern of archIndex.all) { - const name = getPatternName(pattern); - const nodeId = sanitizeNodeId(name); - nodeIds.set(name, nodeId); - } - // Organize patterns by context - const byContext = archIndex.byContext; - const contexts = Object.keys(byContext).sort(); - // Patterns without context go to "Shared Infrastructure" - const sharedPatterns = archIndex.all.filter((p) => !p.archContext); - // Generate subgraphs for each bounded context - for (const context of contexts) { - const patterns = byContext[context] ?? []; - if (patterns.length === 0) - continue; - const contextLabel = formatContextLabel(context); - lines.push(` subgraph ${sanitizeNodeId(context)}["${contextLabel}"]`); - for (const pattern of patterns) { - const name = getPatternName(pattern); - const nodeId = nodeIds.get(name) ?? sanitizeNodeId(name); - const roleLabel = pattern.archRole ? `[${pattern.archRole}]` : ''; - lines.push(` ${nodeId}["${name}${roleLabel}"]`); - } - lines.push(' end'); - } - // Generate shared infrastructure subgraph (patterns without context) - if (sharedPatterns.length > 0) { - lines.push(` subgraph shared["Shared Infrastructure"]`); - for (const pattern of sharedPatterns) { - const name = getPatternName(pattern); - const nodeId = nodeIds.get(name) ?? sanitizeNodeId(name); - const roleLabel = pattern.archRole ? `[${pattern.archRole}]` : ''; - lines.push(` ${nodeId}["${name}${roleLabel}"]`); - } - lines.push(' end'); - } - // Second pass: add relationships from relationshipIndex - const relationships = dataset.relationshipIndex ?? {}; - for (const pattern of archIndex.all) { - const name = getPatternName(pattern); - const sourceId = nodeIds.get(name); - if (!sourceId) - continue; - const rel = relationships[name]; - if (!rel) - continue; - // uses relationships (solid arrow) - only to other arch components - for (const target of rel.uses) { - const targetId = nodeIds.get(target); - if (targetId) { - lines.push(` ${sourceId} ${EDGE_STYLES.uses} ${targetId}`); - } - } - // dependsOn relationships (dashed arrow) - for (const target of rel.dependsOn) { - const targetId = nodeIds.get(target); - if (targetId) { - lines.push(` ${sourceId} ${EDGE_STYLES.dependsOn} ${targetId}`); - } - } - // implements relationships (dotted arrow) - for (const target of rel.implementsPatterns) { - const targetId = nodeIds.get(target); - if (targetId) { - lines.push(` ${sourceId} ${EDGE_STYLES.implementsPatterns} ${targetId}`); - } - } - // extends relationships (solid open arrow) - if (rel.extendsPattern) { - const targetId = nodeIds.get(rel.extendsPattern); - if (targetId) { - lines.push(` ${sourceId} ${EDGE_STYLES.extendsPattern} ${targetId}`); - } - } - } - return [ - heading(2, 'System Overview'), - paragraph('Component architecture with bounded context isolation:'), - mermaid(lines.join('\n')), - separator(), - ]; -} -/** - * Build layered architecture diagram organized by layer - */ -function buildLayeredDiagram(archIndex, dataset) { - const lines = ['graph TB']; - const nodeIds = new Map(); - // Collect all node IDs first - for (const pattern of archIndex.all) { - const name = getPatternName(pattern); - const nodeId = sanitizeNodeId(name); - nodeIds.set(name, nodeId); - } - // Layer order (top to bottom in diagram: domain at top, infrastructure at bottom) - const layerOrder = ['domain', 'application', 'infrastructure']; - const byLayer = archIndex.byLayer; - // Generate subgraphs for each layer - for (const layer of layerOrder) { - const patterns = byLayer[layer] ?? []; - if (patterns.length === 0) - continue; - const layerLabel = formatLayerLabel(layer); - lines.push(` subgraph ${layer}["${layerLabel}"]`); - for (const pattern of patterns) { - const name = getPatternName(pattern); - const nodeId = nodeIds.get(name) ?? sanitizeNodeId(name); - const contextLabel = pattern.archContext ? ` (${pattern.archContext})` : ''; - lines.push(` ${nodeId}["${name}${contextLabel}"]`); - } - lines.push(' end'); - } - // Patterns without layer - const unlayered = archIndex.all.filter((p) => !p.archLayer); - if (unlayered.length > 0) { - lines.push(` subgraph other["Other"]`); - for (const pattern of unlayered) { - const name = getPatternName(pattern); - const nodeId = nodeIds.get(name) ?? sanitizeNodeId(name); - lines.push(` ${nodeId}["${name}"]`); - } - lines.push(' end'); - } - // Add relationships - const relationships = dataset.relationshipIndex ?? {}; - for (const pattern of archIndex.all) { - const name = getPatternName(pattern); - const sourceId = nodeIds.get(name); - if (!sourceId) - continue; - const rel = relationships[name]; - if (!rel) - continue; - for (const target of rel.uses) { - const targetId = nodeIds.get(target); - if (targetId) { - lines.push(` ${sourceId} ${EDGE_STYLES.uses} ${targetId}`); - } - } - for (const target of rel.dependsOn) { - const targetId = nodeIds.get(target); - if (targetId) { - lines.push(` ${sourceId} ${EDGE_STYLES.dependsOn} ${targetId}`); - } - } - } - return [ - heading(2, 'Layered Architecture'), - paragraph('Components organized by architectural layer:'), - mermaid(lines.join('\n')), - separator(), - ]; -} -/** - * Build legend section explaining arrow styles - */ -function buildLegendSection() { - return [ - heading(2, 'Legend'), - table(['Arrow Style', 'Relationship', 'Description'], [ - ['`-->`', 'uses', 'Direct dependency (solid arrow)'], - ['`-.->` ', 'depends-on', 'Weak dependency (dashed arrow)'], - ['`..->` ', 'implements', 'Realization relationship (dotted arrow)'], - ['`-->>` ', 'extends', 'Generalization relationship (open arrow)'], - ]), - separator(), - ]; -} -/** - * Build component inventory table - */ -function buildInventorySection(archIndex) { - const rows = []; - // Sort patterns by context, then by role, then by name - const sorted = [...archIndex.all].sort((a, b) => { - const ctxA = a.archContext ?? 'zzz'; // No context sorts last - const ctxB = b.archContext ?? 'zzz'; - if (ctxA !== ctxB) - return ctxA.localeCompare(ctxB); - const roleA = a.archRole ?? ''; - const roleB = b.archRole ?? ''; - if (roleA !== roleB) - return roleA.localeCompare(roleB); - const nameA = getPatternName(a); - const nameB = getPatternName(b); - return nameA.localeCompare(nameB); - }); - for (const pattern of sorted) { - const name = getDisplayName(pattern); - const emoji = getStatusEmoji(pattern.status); - const context = pattern.archContext ?? '-'; - const role = pattern.archRole ?? '-'; - const layer = pattern.archLayer ?? '-'; - const source = pattern.source.file; - rows.push([`${emoji} ${name}`, context, role, layer, source]); - } - return [ - heading(2, 'Component Inventory'), - paragraph('All components with architecture annotations:'), - table(['Component', 'Context', 'Role', 'Layer', 'Source File'], rows), - ]; -} -// ═══════════════════════════════════════════════════════════════════════════ -// Utility Functions -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Format context name for subgraph label - * E.g., "orders" → "Orders BC" - */ -function formatContextLabel(context) { - const capitalized = context.charAt(0).toUpperCase() + context.slice(1); - return `${capitalized} BC`; -} -/** - * Format layer name for subgraph label - * E.g., "domain" → "Domain Layer" - */ -function formatLayerLabel(layer) { - const capitalized = layer.charAt(0).toUpperCase() + layer.slice(1); - return `${capitalized} Layer`; -} -//# sourceMappingURL=architecture.js.map \ No newline at end of file diff --git a/dist/renderable/codecs/architecture.js.map b/dist/renderable/codecs/architecture.js.map deleted file mode 100644 index 3ffa561b..00000000 --- a/dist/renderable/codecs/architecture.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"architecture.js","sourceRoot":"","sources":["../../../src/renderable/codecs/architecture.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;G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S,kBAAkB,CAAC,OAAe;IACzC,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACvE,OAAO,GAAG,WAAW,KAAK,CAAC;AAC7B,CAAC;AAED;;;GAGG;AACH,SAAS,gBAAgB,CAAC,KAAa;IACrC,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACnE,OAAO,GAAG,WAAW,QAAQ,CAAC;AAChC,CAAC"} \ No newline at end of file diff --git a/dist/renderable/codecs/business-rules.d.ts b/dist/renderable/codecs/business-rules.d.ts deleted file mode 100644 index 043d068a..00000000 --- a/dist/renderable/codecs/business-rules.d.ts +++ /dev/null @@ -1,4080 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern BusinessRulesCodec - * @libar-docs-status completed - * @libar-docs-unlock-reason:Progressive-disclosure-by-product-area - * - * ## Business Rules Document Codec - * - * Transforms MasterDataset into a RenderableDocument for business rules output. - * Generates BUSINESS-RULES.md organized by product area, phase, and feature. - * - * ### When to Use - * - * - When generating business rules documentation for stakeholders - * - When extracting domain constraints without implementation details - * - When creating compliance or audit documentation from feature specs - * - * ### Purpose - * - * Enable stakeholders to understand domain constraints without reading - * implementation details or full feature files. - * - * ### Information Architecture - * - * ``` - * Product Area (Platform, DeliveryProcess) - * └── Phase (21, 15, etc.) or Release (v0.1.0 for DeliveryProcess) - * └── Feature (pattern name with description) - * └── Rules (inline with Invariant + Rationale) - * ``` - * - * ### Progressive Disclosure - * - * - **summary**: Statistics only (compact reference) - * - **standard**: Above + all features with rules inline - * - **detailed**: Full content including code examples and verification links - * - * ### Factory Pattern - * - * Use `createBusinessRulesCodec(options)` to create a configured codec: - * ```typescript - * const codec = createBusinessRulesCodec({ detailLevel: "summary" }); - * const doc = codec.decode(dataset); - * ``` - */ -import { z } from 'zod'; -import { MasterDatasetSchema } from '../../validation-schemas/master-dataset.js'; -import { type BaseCodecOptions } from './types/base.js'; -/** - * Options for BusinessRulesCodec - * - * Supports progressive disclosure via detailLevel: - * - "summary": Statistics table + All Rules table only (no domain sections) - * - "standard": Above + domain sections with truncated descriptions - * - "detailed": Full content including code examples and verification links - */ -export interface BusinessRulesCodecOptions extends BaseCodecOptions { - /** Group rules by (default: "domain-then-phase") */ - groupBy?: 'domain' | 'phase' | 'domain-then-phase'; - /** Include code examples from DocStrings (default: false, only in detailed mode) */ - includeCodeExamples?: boolean; - /** Include markdown tables from rule descriptions (default: true) */ - includeTables?: boolean; - /** Include rationale section (default: true) */ - includeRationale?: boolean; - /** Filter by domain categories (default: all) */ - filterDomains?: string[]; - /** Filter by phases (default: all) */ - filterPhases?: number[]; - /** Show only rules with explicit invariants (default: false) */ - onlyWithInvariants?: boolean; - /** Include source feature file link for each rule (default: true) */ - includeSource?: boolean; - /** Include "Verified by" scenario links (default: false, only in detailed mode) */ - includeVerifiedBy?: boolean; - /** Maximum description length in characters for standard mode (default: 150, 0 = no limit) */ - maxDescriptionLength?: number; - /** Exclude patterns whose source.file starts with any of these prefixes (default: []) */ - excludeSourcePaths?: string[]; -} -/** - * Default options for BusinessRulesCodec - */ -export declare const DEFAULT_BUSINESS_RULES_OPTIONS: Required; -import { RenderableDocumentOutputSchema } from './shared-schema.js'; -/** - * Create a BusinessRulesCodec with custom options. - * - * @param options - Codec configuration options - * @returns Configured Zod codec - * - * @example - * ```typescript - * // Compact summary mode - * const codec = createBusinessRulesCodec({ detailLevel: "summary" }); - * - * // Filter to specific domains - * const codec = createBusinessRulesCodec({ filterDomains: ["ddd", "event-sourcing"] }); - * ``` - */ -export declare function createBusinessRulesCodec(options?: BusinessRulesCodecOptions): z.ZodCodec; -/** - * Default Business Rules Document Codec - * - * Transforms MasterDataset → RenderableDocument for business rules. - * Uses default options with standard detail level. - * - * @example - * ```typescript - * const doc = BusinessRulesCodec.decode(masterDataset); - * const markdown = renderToMarkdown(doc); - * ``` - */ -export declare const BusinessRulesCodec: z.ZodCodec>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - tagRegistry: z.ZodObject<{ - $schema: z.ZodOptional; - version: z.ZodDefault; - categories: z.ZodArray>>; - }, z.core.$strict>>; - metadataTags: z.ZodArray; - purpose: z.ZodString; - required: z.ZodDefault>; - repeatable: z.ZodDefault>; - values: z.ZodOptional>; - default: z.ZodOptional; - example: z.ZodOptional; - metadataKey: z.ZodOptional; - transform: z.ZodOptional>; - }, z.core.$strict>>; - aggregationTags: z.ZodArray; - purpose: z.ZodString; - }, z.core.$strict>>; - formatOptions: z.ZodDefault>; - tagPrefix: z.ZodDefault; - fileOptInTag: z.ZodDefault; - }, z.core.$strict>; - byStatus: z.ZodObject<{ - completed: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - active: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - planned: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>; - byPhase: z.ZodArray; - patterns: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - counts: z.ZodObject<{ - completed: z.ZodNumber; - active: z.ZodNumber; - planned: z.ZodNumber; - total: z.ZodNumber; - }, z.core.$strip>; - }, z.core.$strip>>; - byQuarter: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byCategory: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - bySource: z.ZodObject<{ - typescript: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - gherkin: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - roadmap: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - prd: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>; - counts: z.ZodObject<{ - completed: z.ZodNumber; - active: z.ZodNumber; - planned: z.ZodNumber; - total: z.ZodNumber; - }, z.core.$strip>; - phaseCount: z.ZodNumber; - categoryCount: z.ZodNumber; - relationshipIndex: z.ZodOptional; - usedBy: z.ZodArray; - dependsOn: z.ZodArray; - enables: z.ZodArray; - implementsPatterns: z.ZodArray; - implementedBy: z.ZodArray; - }, z.core.$strip>>; - extendsPattern: z.ZodOptional; - extendedBy: z.ZodArray; - seeAlso: z.ZodArray; - apiRef: z.ZodArray; - }, z.core.$strip>>>; - archIndex: z.ZodOptional>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byContext: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byLayer: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byView: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - all: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>>; -}, z.core.$strip>, z.ZodObject<{ - title: z.ZodString; - purpose: z.ZodOptional; - detailLevel: z.ZodOptional; - sections: z.ZodArray; - additionalFiles: z.ZodOptional>; -}, z.core.$strip>>; -/** - * Deduplicate scenario names from Rule block and **Verified by:** annotation. - * - * Uses case-insensitive comparison to catch near-duplicates like - * "Standard level includes source link-out" vs "Standard level includes source link-out". - */ -export declare function deduplicateScenarioNames(scenarioNames: readonly string[], verifiedBy: readonly string[] | undefined): string[]; -//# sourceMappingURL=business-rules.d.ts.map \ No newline at end of file diff --git a/dist/renderable/codecs/business-rules.d.ts.map b/dist/renderable/codecs/business-rules.d.ts.map deleted file mode 100644 index 122e723d..00000000 --- a/dist/renderable/codecs/business-rules.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"business-rules.d.ts","sourceRoot":"","sources":["../../../src/renderable/codecs/business-rules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,mBAAmB,EAEpB,MAAM,4CAA4C,CAAC;AAapD,OAAO,EAAE,KAAK,gBAAgB,EAAsC,MAAM,iBAAiB,CAAC;AAO5F;;;;;;;GAOG;AACH,MAAM,WAAW,yBAA0B,SAAQ,gBAAgB;IACjE,oDAAoD;IACpD,OAAO,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,mBAAmB,CAAC;IAEnD,oFAAoF;IACpF,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B,qEAAqE;IACrE,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB,gDAAgD;IAChD,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B,iDAAiD;IACjD,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IAEzB,sCAAsC;IACtC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IAExB,gEAAgE;IAChE,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B,qEAAqE;IACrE,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB,mFAAmF;IACnF,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B,8FAA8F;IAC9F,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAE9B,yFAAyF;IACzF,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC/B;AAED;;GAEG;AACH,eAAO,MAAM,8BAA8B,EAAE,QAAQ,CAAC,yBAAyB,CAa9E,CAAC;AACF,OAAO,EAAE,8BAA8B,EAAE,MAAM,oBAAoB,CAAC;AA2CpE;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,w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BAA6B,CAAC;AAmuB7D;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,aAAa,EAAE,SAAS,MAAM,EAAE,EAChC,UAAU,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,GACxC,MAAM,EAAE,CAiBV"} \ No newline at end of file diff --git a/dist/renderable/codecs/business-rules.js b/dist/renderable/codecs/business-rules.js deleted file mode 100644 index d88b4f43..00000000 --- a/dist/renderable/codecs/business-rules.js +++ /dev/null @@ -1,723 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern BusinessRulesCodec - * @libar-docs-status completed - * @libar-docs-unlock-reason:Progressive-disclosure-by-product-area - * - * ## Business Rules Document Codec - * - * Transforms MasterDataset into a RenderableDocument for business rules output. - * Generates BUSINESS-RULES.md organized by product area, phase, and feature. - * - * ### When to Use - * - * - When generating business rules documentation for stakeholders - * - When extracting domain constraints without implementation details - * - When creating compliance or audit documentation from feature specs - * - * ### Purpose - * - * Enable stakeholders to understand domain constraints without reading - * implementation details or full feature files. - * - * ### Information Architecture - * - * ``` - * Product Area (Platform, DeliveryProcess) - * └── Phase (21, 15, etc.) or Release (v0.1.0 for DeliveryProcess) - * └── Feature (pattern name with description) - * └── Rules (inline with Invariant + Rationale) - * ``` - * - * ### Progressive Disclosure - * - * - **summary**: Statistics only (compact reference) - * - **standard**: Above + all features with rules inline - * - **detailed**: Full content including code examples and verification links - * - * ### Factory Pattern - * - * Use `createBusinessRulesCodec(options)` to create a configured codec: - * ```typescript - * const codec = createBusinessRulesCodec({ detailLevel: "summary" }); - * const doc = codec.decode(dataset); - * ``` - */ -import { z } from 'zod'; -import { MasterDatasetSchema, } from '../../validation-schemas/master-dataset.js'; -import { heading, paragraph, separator, table, linkOut, document, } from '../schema.js'; -import { DEFAULT_BASE_OPTIONS, mergeOptions } from './types/base.js'; -import { toKebabCase } from '../../utils/index.js'; -/** - * Default options for BusinessRulesCodec - */ -export const DEFAULT_BUSINESS_RULES_OPTIONS = { - ...DEFAULT_BASE_OPTIONS, - groupBy: 'domain-then-phase', - includeCodeExamples: false, // Only in detailed mode - includeTables: true, - includeRationale: true, - filterDomains: [], - filterPhases: [], - onlyWithInvariants: false, - includeSource: true, - includeVerifiedBy: true, - maxDescriptionLength: 150, - excludeSourcePaths: [], -}; -import { RenderableDocumentOutputSchema } from './shared-schema.js'; -import { parseBusinessRuleAnnotations, extractFirstSentence, } from './helpers.js'; -// ═══════════════════════════════════════════════════════════════════════════ -// Business Rules Document Codec -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Create a BusinessRulesCodec with custom options. - * - * @param options - Codec configuration options - * @returns Configured Zod codec - * - * @example - * ```typescript - * // Compact summary mode - * const codec = createBusinessRulesCodec({ detailLevel: "summary" }); - * - * // Filter to specific domains - * const codec = createBusinessRulesCodec({ filterDomains: ["ddd", "event-sourcing"] }); - * ``` - */ -export function createBusinessRulesCodec(options) { - const opts = mergeOptions(DEFAULT_BUSINESS_RULES_OPTIONS, options); - return z.codec(MasterDatasetSchema, RenderableDocumentOutputSchema, { - decode: (dataset) => { - return buildBusinessRulesDocument(dataset, opts); - }, - /** @throws Always - this codec is decode-only. See zod-codecs.md */ - encode: () => { - throw new Error('BusinessRulesCodec is decode-only. See zod-codecs.md'); - }, - }); -} -/** - * Default Business Rules Document Codec - * - * Transforms MasterDataset → RenderableDocument for business rules. - * Uses default options with standard detail level. - * - * @example - * ```typescript - * const doc = BusinessRulesCodec.decode(masterDataset); - * const markdown = renderToMarkdown(doc); - * ``` - */ -export const BusinessRulesCodec = createBusinessRulesCodec(); -// ═══════════════════════════════════════════════════════════════════════════ -// Document Builder -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Build the business rules document from dataset - */ -function buildBusinessRulesDocument(dataset, options) { - const sections = []; - // 1. Collect all rules organized by product area → phase → feature - const productAreaGroups = collectRulesByProductArea(dataset, options); - // Calculate stats - const stats = calculateStats(productAreaGroups); - if (stats.totalRules === 0) { - sections.push(heading(2, 'No Business Rules Found'), paragraph('No business rules were found in the feature files. ' + - 'Business rules are defined using the `Rule:` keyword in Gherkin feature files.')); - return document('Business Rules', sections, { - purpose: 'Domain constraints and invariants', - }); - } - // 2. Build summary (single line with stats) - sections.push(...buildSummarySection(stats)); - // 3. Progressive disclosure: split by product area when detail files enabled - if (options.generateDetailFiles && options.detailLevel !== 'summary') { - sections.push(...buildProductAreaIndexSection(productAreaGroups)); - const additionalFiles = buildBusinessRulesDetailFiles(productAreaGroups, options); - const docOpts = { - purpose: 'Domain constraints and invariants extracted from feature files', - detailLevel: 'Overview with links to detailed business rules by product area', - }; - if (Object.keys(additionalFiles).length > 0) { - docOpts.additionalFiles = additionalFiles; - } - return document('Business Rules', sections, docOpts); - } - // 4. Non-split mode: all content in single document - if (options.detailLevel !== 'summary') { - sections.push(...buildProductAreaSections(productAreaGroups, options)); - } - return document('Business Rules', sections, { - purpose: 'Domain constraints and invariants extracted from feature files', - detailLevel: options.detailLevel, - }); -} -// ═══════════════════════════════════════════════════════════════════════════ -// Rule Collection -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Collect rules organized by Product Area → Phase → Feature - */ -function collectRulesByProductArea(dataset, options) { - const groups = new Map(); - for (const pattern of dataset.patterns) { - // Skip patterns without rules - if (!pattern.rules || pattern.rules.length === 0) { - continue; - } - // Apply source path exclusion filter - if (options.excludeSourcePaths.length > 0 && - options.excludeSourcePaths.some((prefix) => pattern.source.file.startsWith(prefix))) { - continue; - } - // Apply domain filter - if (options.filterDomains.length > 0 && !options.filterDomains.includes(pattern.category)) { - continue; - } - // Apply phase filter - if (options.filterPhases.length > 0 && - pattern.phase !== undefined && - !options.filterPhases.includes(pattern.phase)) { - continue; - } - // Determine product area (default to "Platform" if not specified) - const productArea = pattern.productArea ?? 'Platform'; - const productAreaDisplay = formatProductAreaName(productArea); - // Determine phase key (use release for DeliveryProcess items without phase) - const phaseKey = getPhaseKey(pattern); - // Get or create product area group - let group = groups.get(productArea); - if (!group) { - group = { - productArea, - displayName: productAreaDisplay, - phases: new Map(), - }; - groups.set(productArea, group); - } - // Get or create phase group - let phaseFeatures = group.phases.get(phaseKey); - if (!phaseFeatures) { - phaseFeatures = []; - group.phases.set(phaseKey, phaseFeatures); - } - // Build feature with rules - const featureWithRules = { - pattern, - featureName: pattern.name, - featureDescription: extractFeatureDescription(pattern), - rules: [], - }; - // Process rules - for (const rule of pattern.rules) { - const annotations = parseBusinessRuleAnnotations(rule.description); - // Apply onlyWithInvariants filter - if (options.onlyWithInvariants && !annotations.invariant) { - continue; - } - featureWithRules.rules.push({ - rule, - pattern, - annotations, - }); - } - // Only add feature if it has rules after filtering - if (featureWithRules.rules.length > 0) { - phaseFeatures.push(featureWithRules); - } - } - return groups; -} -/** - * Get the phase key for grouping (e.g., "Phase 21" or "v0.1.0") - */ -function getPhaseKey(pattern) { - // If pattern has a phase, use it - if (pattern.phase !== undefined) { - return `Phase ${pattern.phase}`; - } - // For DeliveryProcess items without phase, use release - const release = pattern.release; - if (release) { - return release; - } - // Fallback - return 'Uncategorized'; -} -/** - * Extract a compact description from the feature - * - * Looks for content after header markers like **Problem:** or **Business Value:** - * and extracts the full first sentence/paragraph. - */ -function extractFeatureDescription(pattern) { - const desc = pattern.directive.description; - // Headers that indicate content follows - const contentHeaders = [ - /\*\*Problem:\*\*\s*/, - /\*\*Business Value:\*\*\s*/, - /\*\*Solution:\*\*\s*/, - /\*\*Context:\*\*\s*/, - ]; - // Try to find content after a header - for (const headerPattern of contentHeaders) { - const match = headerPattern.exec(desc); - if (match) { - // Get text after the header - const afterHeader = desc.slice(match.index + match[0].length); - // Get content up to the next header or table - const nextHeaderPattern = /\n\s*(\*\*[A-Z]|^\|)/m; - const nextHeaderMatch = nextHeaderPattern.exec(afterHeader); - const content = nextHeaderMatch ? afterHeader.slice(0, nextHeaderMatch.index) : afterHeader; - // Clean up and extract first sentence - const cleaned = content.trim().split('\n')[0]?.trim() ?? ''; - if (cleaned.length > 0) { - return extractFirstSentence(cleaned); - } - } - } - // Fallback: Try to get the first meaningful line - const lines = desc.split('\n').filter((line) => { - const trimmed = line.trim(); - return (trimmed.length > 0 && - !trimmed.startsWith('**') && // Skip any header - !trimmed.startsWith('|') && // Skip table rows - !trimmed.startsWith('-') && // Skip list items - trimmed.length > 20 // Require substantial content - ); - }); - const firstLine = lines[0]; - if (firstLine) { - return extractFirstSentence(firstLine); - } - return ''; -} -function calculateStats(groups) { - let totalRules = 0; - let totalFeatures = 0; - let withInvariants = 0; - for (const group of groups.values()) { - for (const features of group.phases.values()) { - totalFeatures += features.length; - for (const feature of features) { - totalRules += feature.rules.length; - for (const ruleCtx of feature.rules) { - if (ruleCtx.annotations.invariant) { - withInvariants++; - } - } - } - } - } - return { - totalRules, - totalFeatures, - withInvariants, - productAreas: groups.size, - }; -} -// ═══════════════════════════════════════════════════════════════════════════ -// Summary Section -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Build compact summary section - */ -function buildSummarySection(stats) { - const summary = `Domain constraints and invariants extracted from feature specifications. ${stats.totalRules} rules from ${stats.totalFeatures} features across ${stats.productAreas} product areas.`; - return [paragraph(`**${summary}**`), separator()]; -} -// ═══════════════════════════════════════════════════════════════════════════ -// Product Area Sections -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Build sections organized by Product Area → Phase → Feature → Rules - */ -function buildProductAreaSections(groups, options) { - const sections = []; - // Sort product areas alphabetically - const sortedGroups = [...groups.values()].sort((a, b) => a.displayName.localeCompare(b.displayName)); - for (const group of sortedGroups) { - const sortedPhases = sortPhaseEntries([...group.phases.entries()]); - for (const [phaseKey, features] of sortedPhases) { - // Product Area / Phase heading - sections.push(heading(2, `${group.displayName} / ${phaseKey}`)); - // Sort features by name - const sortedFeatures = [...features].sort((a, b) => a.featureName.localeCompare(b.featureName)); - for (const feature of sortedFeatures) { - sections.push(...renderFeatureWithRules(feature, options)); - } - sections.push(separator()); - } - } - return sections; -} -/** - * Calculate statistics for a single product area group - */ -function calculateAreaStats(group) { - let totalRules = 0; - let totalFeatures = 0; - let withInvariants = 0; - for (const features of group.phases.values()) { - totalFeatures += features.length; - for (const feature of features) { - totalRules += feature.rules.length; - for (const ruleCtx of feature.rules) { - if (ruleCtx.annotations.invariant) { - withInvariants++; - } - } - } - } - return { totalRules, totalFeatures, withInvariants }; -} -/** - * Generate URL-safe slug from product area name - */ -function productAreaToSlug(productArea) { - return toKebabCase(productArea); -} -/** - * Build the product area index section for the main document. - * Shows a summary table with links to each product area's detail file. - */ -function buildProductAreaIndexSection(groups) { - const sections = []; - sections.push(heading(2, 'Product Areas')); - const sortedGroups = [...groups.values()].sort((a, b) => a.displayName.localeCompare(b.displayName)); - const rows = sortedGroups.map((group) => { - const areaStats = calculateAreaStats(group); - const slug = productAreaToSlug(group.productArea); - const link = `[${group.displayName}](business-rules/${slug}.md)`; - return [ - link, - String(areaStats.totalFeatures), - String(areaStats.totalRules), - String(areaStats.withInvariants), - ]; - }); - sections.push(table(['Product Area', 'Features', 'Rules', 'With Invariants'], rows)); - sections.push(separator()); - return sections; -} -/** - * Build one detail file per product area - */ -function buildBusinessRulesDetailFiles(groups, options) { - const files = {}; - const sortedGroups = [...groups.values()].sort((a, b) => a.displayName.localeCompare(b.displayName)); - for (const group of sortedGroups) { - const slug = productAreaToSlug(group.productArea); - files[`business-rules/${slug}.md`] = buildSingleProductAreaDocument(group, options); - } - return files; -} -/** - * Build a single product area detail document with rules organized by phase - */ -function buildSingleProductAreaDocument(group, options) { - const sections = []; - const areaStats = calculateAreaStats(group); - // Area stats - sections.push(paragraph(`**${areaStats.totalRules} rules** from ${areaStats.totalFeatures} features. ` + - `${areaStats.withInvariants} rules have explicit invariants.`)); - sections.push(separator()); - // Sort phases - const sortedPhases = sortPhaseEntries([...group.phases.entries()]); - for (const [phaseKey, features] of sortedPhases) { - const sortedFeatures = [...features].sort((a, b) => a.featureName.localeCompare(b.featureName)); - // Render features for this phase - const phaseContent = []; - for (const feature of sortedFeatures) { - phaseContent.push(...renderFeatureWithRules(feature, options)); - } - // Always render flat — file-level split by product area is sufficient disclosure - sections.push(heading(2, phaseKey)); - sections.push(...phaseContent); - sections.push(separator()); - } - // Back link - sections.push(linkOut('\u2190 Back to Business Rules', '../BUSINESS-RULES.md')); - return document(`${group.displayName} Business Rules`, sections, { - purpose: `Business rules for the ${group.displayName} product area`, - }); -} -/** - * Sort phase entries: numeric phases first (ascending), then releases, then uncategorized - */ -function sortPhaseEntries(entries) { - return entries.sort(([a], [b]) => { - const aNum = extractPhaseNumber(a); - const bNum = extractPhaseNumber(b); - if (aNum !== null && bNum !== null) { - return aNum - bNum; - } - if (aNum !== null) - return -1; - if (bNum !== null) - return 1; - return a.localeCompare(b); - }); -} -/** - * Extract phase number from phase key (e.g., "Phase 21" → 21) - */ -function extractPhaseNumber(phaseKey) { - const pattern = /^Phase\s+(\d+)$/; - const match = pattern.exec(phaseKey); - if (match?.[1]) { - return parseInt(match[1], 10); - } - return null; -} -// ═══════════════════════════════════════════════════════════════════════════ -// Feature Rendering -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Render a feature with its rules inline. - * - * All rules render flat — Rule title + Invariant + Rationale are essential - * business knowledge and must never be hidden behind collapsible blocks. - * Progressive disclosure happens at the file level (split by product area). - */ -function renderFeatureWithRules(feature, options) { - const sections = []; - const isDetailed = options.detailLevel === 'detailed'; - // Feature heading (H3) — humanized from camelCase pattern name - sections.push(heading(3, humanizeFeatureName(feature.featureName))); - // Feature description - if (feature.featureDescription) { - sections.push(paragraph(`*${feature.featureDescription}*`)); - } - // Render each rule flat — no collapsible wrapping - for (const ruleCtx of feature.rules) { - sections.push(...renderRuleInline(ruleCtx, options, isDetailed)); - } - // Source file path as italic text (informational, not a link — paths are - // relative to the feature repo root and don't resolve from docs-generated/) - if (options.includeSource) { - const sourceFile = feature.pattern.source.file; - sections.push(paragraph(`*${extractSourceName(sourceFile)}*`)); - } - return sections; -} -/** - * Render a single rule inline with its annotations. - * - * Each rule is preceded by a separator. Invariant + Rationale are combined - * into a blockquote "constraint card" for visual emphasis. Verified-by is - * rendered as a checkbox list for scanability. Scenario names from the - * Rule block are deduplicated against explicit **Verified by:** annotations. - */ -function renderRuleInline(ruleCtx, options, isDetailed) { - const sections = []; - const { rule, annotations } = ruleCtx; - // Visual separator before each rule - sections.push(separator()); - // Rule name as H4 heading - sections.push(heading(4, rule.name)); - // Constraint card: blockquote combining Invariant + Rationale - const cardLines = []; - if (annotations.invariant) { - cardLines.push(`> **Invariant:** ${annotations.invariant}`); - } - if (options.includeRationale && annotations.rationale) { - cardLines.push(`> **Rationale:** ${annotations.rationale}`); - } - if (cardLines.length > 0) { - sections.push(paragraph(cardLines.join('\n>\n'))); - } - else if (annotations.remainingContent) { - // Fallback first-line stays as plain paragraph (not blockquoted) - const firstLine = extractFirstSentence(annotations.remainingContent); - if (firstLine) { - sections.push(paragraph(firstLine)); - } - } - // Tables from rule description - if (options.includeTables && rule.description) { - const tableBlocks = extractTables(rule.description); - for (const tableBlock of tableBlocks) { - sections.push(tableBlock); - } - } - // Code examples (detailed mode only, or if explicitly enabled) - if ((isDetailed || options.includeCodeExamples) && annotations.codeExamples) { - for (const codeBlock of annotations.codeExamples) { - sections.push(codeBlock); - } - } - // Verified-by as compact bullet list (label + items in one block, no blank line gap) - if (options.includeVerifiedBy) { - const names = deduplicateScenarioNames(rule.scenarioNames, annotations.verifiedBy); - if (names.length > 0) { - const bullets = names.map((name) => `- ${name}`).join('\n'); - sections.push(paragraph(`**Verified by:**\n${bullets}`)); - } - } - // API implementation references - if (annotations.apiRefs && annotations.apiRefs.length > 0) { - const refList = annotations.apiRefs.map((ref) => `\`${ref}\``).join(', '); - sections.push(paragraph(`**Implementation:** ${refList}`)); - } - // Placeholder only when there is truly no content - if (!annotations.invariant && - !annotations.remainingContent && - !annotations.rationale && - rule.scenarioNames.length === 0) { - sections.push(paragraph('*No invariant or description specified.*')); - } - return sections; -} -/** - * Extract markdown tables from content - */ -function extractTables(content) { - const sections = []; - const lines = content.split('\n'); - let inTable = false; - let tableLines = []; - for (const line of lines) { - const trimmed = line.trim(); - if (trimmed.startsWith('|') && trimmed.endsWith('|')) { - inTable = true; - tableLines.push(trimmed); - } - else if (inTable) { - // End of table - if (tableLines.length >= 2) { - const tableBlock = parseMarkdownTable(tableLines); - if (tableBlock) { - sections.push(tableBlock); - } - } - inTable = false; - tableLines = []; - } - } - // Handle table at end of content - if (inTable && tableLines.length >= 2) { - const tableBlock = parseMarkdownTable(tableLines); - if (tableBlock) { - sections.push(tableBlock); - } - } - return sections; -} -/** - * Parse markdown table lines into a table SectionBlock - */ -function parseMarkdownTable(lines) { - if (lines.length < 2) - return null; - // Skip separator row (contains only dashes and pipes) - const dataLines = lines.filter((line) => !/^\|[\s-:|]+\|$/.test(line)); - if (dataLines.length < 1) - return null; - // First row is headers - const headerRow = dataLines[0]; - if (!headerRow) - return null; - const headers = headerRow - .split('|') - .map((cell) => cell.trim()) - .filter((cell) => cell.length > 0); - if (headers.length === 0) - return null; - // Remaining rows are data - const rows = []; - for (let i = 1; i < dataLines.length; i++) { - const row = dataLines[i]; - if (!row) - continue; - const cells = row - .split('|') - .map((cell) => cell.trim()) - .filter((cell) => cell.length > 0); - if (cells.length > 0) { - rows.push(cells); - } - } - return table(headers, rows); -} -// ═══════════════════════════════════════════════════════════════════════════ -// Utilities -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Humanize a camelCase/PascalCase feature name for display. - * - * Inserts spaces at camelCase boundaries and strips common suffixes - * like "Testing" that don't add value in business rules context. - * - * Examples: - * - ConfigResolution → Config Resolution - * - RichContentHelpersTesting → Rich Content Helpers - * - ProcessGuardTesting → Process Guard - * - ContextInference → Context Inference - */ -function humanizeFeatureName(name) { - // Insert spaces before uppercase letters that follow lowercase - let humanized = name.replace(/([a-z])([A-Z])/g, '$1 $2'); - // Insert spaces before sequences like "API" followed by lowercase - humanized = humanized.replace(/([A-Z]+)([A-Z][a-z])/g, '$1 $2'); - // Strip common test suffixes - humanized = humanized.replace(/\s*Testing$/i, ''); - return humanized.trim(); -} -/** - * Deduplicate scenario names from Rule block and **Verified by:** annotation. - * - * Uses case-insensitive comparison to catch near-duplicates like - * "Standard level includes source link-out" vs "Standard level includes source link-out". - */ -export function deduplicateScenarioNames(scenarioNames, verifiedBy) { - const seen = new Map(); // lowercase → original - for (const name of scenarioNames) { - const key = name.toLowerCase().trim(); - if (!seen.has(key)) { - seen.set(key, name); - } - } - if (verifiedBy) { - for (const name of verifiedBy) { - const key = name.toLowerCase().trim(); - if (!seen.has(key)) { - seen.set(key, name); - } - } - } - return [...seen.values()]; -} -/** - * Format product area name for display - */ -function formatProductAreaName(productArea) { - // Handle common product areas - switch (productArea.toLowerCase()) { - case 'platform': - return 'Platform'; - case 'deliveryprocess': - return 'Delivery Process'; - case 'exampleapp': - return 'Example App'; - case 'taxonomy': - return 'Taxonomy'; - default: - // Title case for unknown product areas - return productArea.charAt(0).toUpperCase() + productArea.slice(1); - } -} -/** - * Extract a clean source name from file path - */ -function extractSourceName(filePath) { - const pattern = /([^/]+)\.feature$/; - const match = pattern.exec(filePath); - if (match?.[1]) { - return match[1] + '.feature'; - } - return filePath; -} -//# sourceMappingURL=business-rules.js.map \ No newline at end of file diff --git a/dist/renderable/codecs/business-rules.js.map b/dist/renderable/codecs/business-rules.js.map deleted file mode 100644 index 66bf3567..00000000 --- a/dist/renderable/codecs/business-rules.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"business-rules.js","sourceRoot":"","sources":["../../../src/renderable/codecs/business-rules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,mBAAmB,GAEpB,MAAM,4CAA4C,CAAC;AAGpD,OAAO,EAGL,OAAO,EACP,SAAS,EACT,SAAS,EACT,KAAK,EACL,OAAO,EACP,QAAQ,GACT,MAAM,cAAc,CAAC;AACtB,OAAO,EAAyB,oBAAoB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAA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AAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACf,OAAO,KAAK,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC;IAC/B,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"} \ No newline at end of file diff --git a/dist/renderable/codecs/composite.d.ts b/dist/renderable/codecs/composite.d.ts deleted file mode 100644 index bc0e7176..00000000 --- a/dist/renderable/codecs/composite.d.ts +++ /dev/null @@ -1,78 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern CompositeCodec - * @libar-docs-status active - * @libar-docs-implements ReferenceDocShowcase - * @libar-docs-arch-role projection - * @libar-docs-arch-context renderer - * @libar-docs-arch-layer application - * - * ## Composite Document Codec - * - * Assembles reference documents from multiple codec outputs by concatenating - * RenderableDocument sections. Enables building documents composed from any - * combination of existing codecs. - * - * ### When to Use - * - * - When building reference docs from multiple codec outputs - * - When composing session briefs from overview + current work + remaining work - * - When referenceDocConfigs need content from arbitrary codecs - * - * ### Factory Pattern - * - * Use the factory function with child codecs and options: - * ```typescript - * const codec = createCompositeCodec( - * [OverviewCodec, CurrentWorkCodec, RemainingWorkCodec], - * { title: 'Session Brief' } - * ); - * const doc = codec.decode(dataset); - * ``` - * - * Or use `composeDocuments` directly at the document level: - * ```typescript - * const doc = composeDocuments([docA, docB], { title: 'Combined' }); - * ``` - */ -import { type RenderableDocument } from '../schema.js'; -import { type BaseCodecOptions, type DocumentCodec } from './types/base.js'; -/** - * Options for composing RenderableDocuments without the codec wrapper. - */ -export interface ComposeOptions { - /** Document title for the composed output */ - readonly title: string; - /** Optional purpose description */ - readonly purpose?: string; - /** Optional detail level indicator */ - readonly detailLevel?: string; - /** Insert separator blocks between document outputs (default: true) */ - readonly separateSections?: boolean; -} -/** - * Options for createCompositeCodec factory. - */ -export interface CompositeCodecOptions extends BaseCodecOptions { - /** Document title for the composite output */ - readonly title: string; - /** Optional purpose description */ - readonly purpose?: string; - /** Insert separator blocks between codec outputs (default: true) */ - readonly separateSections?: boolean; -} -/** - * Compose multiple RenderableDocuments into a single document. - * - * Concatenates sections in array order. Merges additionalFiles with - * last-wins semantics on key collision. Inserts separator blocks - * between non-empty document outputs by default. - */ -export declare function composeDocuments(documents: readonly RenderableDocument[], options: ComposeOptions): RenderableDocument; -/** - * Create a CompositeCodec that decodes each child codec against the same - * MasterDataset and composes their outputs into a single RenderableDocument. - */ -export declare function createCompositeCodec(codecs: readonly DocumentCodec[], options: CompositeCodecOptions): DocumentCodec; -//# sourceMappingURL=composite.d.ts.map \ No newline at end of file diff --git a/dist/renderable/codecs/composite.d.ts.map b/dist/renderable/codecs/composite.d.ts.map deleted file mode 100644 index 1597bdc2..00000000 --- a/dist/renderable/codecs/composite.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"composite.d.ts","sourceRoot":"","sources":["../../../src/renderable/codecs/composite.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAOH,OAAO,EAAE,KAAK,kBAAkB,EAA0C,MAAM,cAAc,CAAC;AAC/F,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,aAAa,EAAwB,MAAM,iBAAiB,CAAC;AAOlG;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,6CAA6C;IAC7C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAEvB,mCAAmC;IACnC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAE1B,sCAAsC;IACtC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAE9B,uEAAuE;IACvE,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC;CACrC;AAED;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,gBAAgB;IAC7D,8CAA8C;IAC9C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAEvB,mCAAmC;IACnC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAE1B,oEAAoE;IACpE,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC;CACrC;AAMD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,SAAS,kBAAkB,EAAE,EACxC,OAAO,EAAE,cAAc,GACtB,kBAAkB,CAmDpB;AAMD;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,SAAS,aAAa,EAAE,EAChC,OAAO,EAAE,qBAAqB,GAC7B,aAAa,CAuBf"} \ No newline at end of file diff --git a/dist/renderable/codecs/composite.js b/dist/renderable/codecs/composite.js deleted file mode 100644 index 58ff4bc7..00000000 --- a/dist/renderable/codecs/composite.js +++ /dev/null @@ -1,118 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern CompositeCodec - * @libar-docs-status active - * @libar-docs-implements ReferenceDocShowcase - * @libar-docs-arch-role projection - * @libar-docs-arch-context renderer - * @libar-docs-arch-layer application - * - * ## Composite Document Codec - * - * Assembles reference documents from multiple codec outputs by concatenating - * RenderableDocument sections. Enables building documents composed from any - * combination of existing codecs. - * - * ### When to Use - * - * - When building reference docs from multiple codec outputs - * - When composing session briefs from overview + current work + remaining work - * - When referenceDocConfigs need content from arbitrary codecs - * - * ### Factory Pattern - * - * Use the factory function with child codecs and options: - * ```typescript - * const codec = createCompositeCodec( - * [OverviewCodec, CurrentWorkCodec, RemainingWorkCodec], - * { title: 'Session Brief' } - * ); - * const doc = codec.decode(dataset); - * ``` - * - * Or use `composeDocuments` directly at the document level: - * ```typescript - * const doc = composeDocuments([docA, docB], { title: 'Combined' }); - * ``` - */ -import { z } from 'zod'; -import { MasterDatasetSchema, } from '../../validation-schemas/master-dataset.js'; -import { separator, document } from '../schema.js'; -import { DEFAULT_BASE_OPTIONS } from './types/base.js'; -import { RenderableDocumentOutputSchema } from './shared-schema.js'; -// ═══════════════════════════════════════════════════════════════════════════ -// composeDocuments — Pure Document Composition -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Compose multiple RenderableDocuments into a single document. - * - * Concatenates sections in array order. Merges additionalFiles with - * last-wins semantics on key collision. Inserts separator blocks - * between non-empty document outputs by default. - */ -export function composeDocuments(documents, options) { - const sections = []; - let mergedAdditionalFiles; - let hasPreviousContent = false; - for (const currentDoc of documents) { - // Skip empty documents entirely (no separator emitted) - if (currentDoc.sections.length === 0 && currentDoc.additionalFiles === undefined) { - continue; - } - // Add separator between non-empty outputs - if (options.separateSections !== false && - hasPreviousContent && - currentDoc.sections.length > 0) { - sections.push(separator()); - } - if (currentDoc.sections.length > 0) { - hasPreviousContent = true; - } - sections.push(...currentDoc.sections); - // Merge additionalFiles (last-wins on key collision) - if (currentDoc.additionalFiles !== undefined) { - mergedAdditionalFiles ??= {}; - for (const [key, value] of Object.entries(currentDoc.additionalFiles)) { - mergedAdditionalFiles[key] = value; - } - } - } - const docOptions = {}; - if (options.purpose !== undefined) { - docOptions.purpose = options.purpose; - } - if (options.detailLevel !== undefined) { - docOptions.detailLevel = options.detailLevel; - } - if (mergedAdditionalFiles !== undefined) { - docOptions.additionalFiles = mergedAdditionalFiles; - } - return document(options.title, sections, docOptions); -} -// ═══════════════════════════════════════════════════════════════════════════ -// createCompositeCodec — Codec Factory -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Create a CompositeCodec that decodes each child codec against the same - * MasterDataset and composes their outputs into a single RenderableDocument. - */ -export function createCompositeCodec(codecs, options) { - const separateSections = options.separateSections ?? true; - const detailLevel = options.detailLevel ?? DEFAULT_BASE_OPTIONS.detailLevel; - return z.codec(MasterDatasetSchema, RenderableDocumentOutputSchema, { - decode: (dataset) => { - const documents = codecs.map((codec) => codec.decode(dataset)); - const composeOpts = { - title: options.title, - detailLevel, - separateSections, - }; - return composeDocuments(documents, options.purpose !== undefined ? { ...composeOpts, purpose: options.purpose } : composeOpts); - }, - encode: () => { - throw new Error('CompositeCodec is decode-only'); - }, - }); -} -//# sourceMappingURL=composite.js.map \ No newline at end of file diff --git a/dist/renderable/codecs/composite.js.map b/dist/renderable/codecs/composite.js.map deleted file mode 100644 index 5b9420a4..00000000 --- a/dist/renderable/codecs/composite.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"composite.js","sourceRoot":"","sources":["../../../src/renderable/codecs/composite.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,mBAAmB,GAEpB,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAA8C,SAAS,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC/F,OAAO,EAA6C,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAClG,OAAO,EAAE,8BAA8B,EAAE,MAAM,oBAAoB,CAAC;AAqCpE,8EAA8E;AAC9E,+CAA+C;AAC/C,8EAA8E;AAE9E;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAC9B,SAAwC,EACxC,OAAuB;IAEvB,MAAM,QAAQ,GAAmB,EAAE,CAAC;IACpC,IAAI,qBAAqE,CAAC;IAC1E,IAAI,kBAAkB,GAAG,KAAK,CAAC;IAE/B,KAAK,MAAM,UAAU,IAAI,SAAS,EAAE,CAAC;QACnC,uDAAuD;QACvD,IAAI,UAAU,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,IAAI,UAAU,CAAC,eAAe,KAAK,SAAS,EAAE,CAAC;YACjF,SAAS;QACX,CAAC;QAED,0CAA0C;QAC1C,IACE,OAAO,CAAC,gBAAgB,KAAK,KAAK;YAClC,kBAAkB;YAClB,UAAU,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAC9B,CAAC;YACD,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;QAC7B,CAAC;QAED,IAAI,UAAU,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACnC,kBAAkB,GAAG,IAAI,CAAC;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,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAuB,CAAC,CAAC;YAErF,MAAM,WAAW,GAAmB;gBAClC,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,WAAW;gBACX,gBAAgB;aACjB,CAAC;YAEF,OAAO,gBAAgB,CACrB,SAAS,EACT,OAAO,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,GAAG,WAAW,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,WAAW,CAC3F,CAAC;QACJ,CAAC;QACD,MAAM,EAAE,GAAU,EAAE;YAClB,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;QACnD,CAAC;KACF,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/dist/renderable/codecs/convention-extractor.d.ts b/dist/renderable/codecs/convention-extractor.d.ts deleted file mode 100644 index 2b071e53..00000000 --- a/dist/renderable/codecs/convention-extractor.d.ts +++ /dev/null @@ -1,98 +0,0 @@ -/** - * Convention Extractor - * - * Filters MasterDataset for patterns tagged with `@libar-docs-convention` - * and extracts convention content as structured data for reference codec - * composition. Supports two sources: - * - * - **Gherkin**: Extracts from `Rule:` blocks on the pattern's `rules` array - * - **TypeScript**: Decomposes JSDoc `directive.description` by `## Heading` - * sections, parsing each section for structured annotations - * - * Both sources produce the same `ConventionRuleContent` output, enabling - * Gherkin and TypeScript convention content to merge in the same bundle. - * - * @see CodecDrivenReferenceGeneration spec - * @see ReferenceDocShowcase spec - */ -import type { MasterDataset } from '../../validation-schemas/master-dataset.js'; -import type { ExtractedPattern } from '../../validation-schemas/extracted-pattern.js'; -import type { SectionBlock } from '../schema.js'; -/** - * Structured content extracted from a decision record Rule block. - */ -export interface ConventionRuleContent { - /** Rule name (from Gherkin Rule: block or TypeScript ## heading) */ - readonly ruleName: string; - /** Invariant statement if present */ - readonly invariant?: string; - /** Rationale statement if present */ - readonly rationale?: string; - /** Verified-by references if present */ - readonly verifiedBy?: readonly string[]; - /** Tables found in the Rule block description */ - readonly tables: readonly ConventionTable[]; - /** Code examples extracted from DocStrings in the rule description (includes mermaid diagrams) */ - readonly codeExamples?: readonly SectionBlock[]; - /** Free-text content (non-table, non-structured) */ - readonly narrative: string; -} -/** - * A table extracted from a Rule block. - */ -export interface ConventionTable { - readonly headers: readonly string[]; - readonly rows: ReadonlyArray>; -} -/** - * All convention content for a given tag value. - */ -export interface ConventionBundle { - /** The convention tag value (e.g., "fsm-rules") */ - readonly conventionTag: string; - /** Source decision records that contributed */ - readonly sourceDecisions: readonly string[]; - /** Extracted Rule block content, ordered by source */ - readonly rules: readonly ConventionRuleContent[]; -} -/** - * Extract markdown tables from description text. - * - * Identifies lines starting and ending with `|` as table rows, - * groups consecutive table lines, and parses headers + data rows. - */ -export declare function extractTablesFromDescription(description: string): ConventionTable[]; -/** - * Extracts convention content from MasterDataset. - * - * Filters patterns tagged with `@libar-docs-convention` matching the - * requested tag values. For Gherkin-sourced patterns, extracts from - * Rule: blocks. For TypeScript-sourced patterns (no rules array), - * decomposes the JSDoc description by ## headings. - * - * @param dataset - The MasterDataset containing all extracted patterns - * @param conventionTags - Convention tag values to filter by - * @returns Array of ConventionBundles, one per requested tag value - * - * @example - * ```typescript - * const conventions = extractConventions(dataset, ['fsm-rules', 'testing-policy']); - * // conventions[0].conventionTag === 'fsm-rules' - * // conventions[0].rules[0].ruleName === 'FSM Transitions' - * // conventions[0].rules[0].tables[0].headers === ['From', 'To', 'Condition'] - * ``` - */ -export declare function extractConventions(dataset: MasterDataset, conventionTags: readonly string[]): ConventionBundle[]; -/** - * Extract convention bundles from pre-filtered patterns. - * - * DD-1 (CrossCuttingDocumentInclusion): Used by the include-tag pass to - * build convention content from patterns selected by include tag rather - * than by conventionTags filter. Groups output by each pattern's convention - * tag values. - * - * @param patterns - Pre-filtered patterns that have convention content - * @returns Array of ConventionBundles - */ -export declare function extractConventionsFromPatterns(patterns: readonly ExtractedPattern[]): ConventionBundle[]; -//# sourceMappingURL=convention-extractor.d.ts.map \ No newline at end of file diff --git a/dist/renderable/codecs/convention-extractor.d.ts.map b/dist/renderable/codecs/convention-extractor.d.ts.map deleted file mode 100644 index bc248ed3..00000000 --- a/dist/renderable/codecs/convention-extractor.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"convention-extractor.d.ts","sourceRoot":"","sources":["../../../src/renderable/codecs/convention-extractor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAChF,OAAO,KAAK,EAAgB,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AACpG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAOjD;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,oEAAoE;IACpE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE1B,qCAAqC;IACrC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAE5B,qCAAqC;IACrC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAE5B,wCAAwC;IACxC,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAExC,iDAAiD;IACjD,QAAQ,CAAC,MAAM,EAAE,SAAS,eAAe,EAAE,CAAC;IAE5C,kGAAkG;IAClG,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,YAAY,EAAE,CAAC;IAEhD,oDAAoD;IACpD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CACtD;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,mDAAmD;IACnD,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAE/B,+CAA+C;IAC/C,QAAQ,CAAC,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;IAE5C,sDAAsD;IACtD,QAAQ,CAAC,KAAK,EAAE,SAAS,qBAAqB,EAAE,CAAC;CAClD;AAMD;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAC,WAAW,EAAE,MAAM,GAAG,eAAe,EAAE,CA0BnF;AAwJD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,aAAa,EACtB,cAAc,EAAE,SAAS,MAAM,EAAE,GAChC,gBAAgB,EAAE,CA2DpB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,8BAA8B,CAC5C,QAAQ,EAAE,SAAS,gBAAgB,EAAE,GACpC,gBAAgB,EAAE,CAsCpB"} \ No newline at end of file diff --git a/dist/renderable/codecs/convention-extractor.js b/dist/renderable/codecs/convention-extractor.js deleted file mode 100644 index cf45e010..00000000 --- a/dist/renderable/codecs/convention-extractor.js +++ /dev/null @@ -1,309 +0,0 @@ -/** - * Convention Extractor - * - * Filters MasterDataset for patterns tagged with `@libar-docs-convention` - * and extracts convention content as structured data for reference codec - * composition. Supports two sources: - * - * - **Gherkin**: Extracts from `Rule:` blocks on the pattern's `rules` array - * - **TypeScript**: Decomposes JSDoc `directive.description` by `## Heading` - * sections, parsing each section for structured annotations - * - * Both sources produce the same `ConventionRuleContent` output, enabling - * Gherkin and TypeScript convention content to merge in the same bundle. - * - * @see CodecDrivenReferenceGeneration spec - * @see ReferenceDocShowcase spec - */ -import { parseBusinessRuleAnnotations } from './helpers.js'; -// ============================================================================ -// Table Extraction from Description Text -// ============================================================================ -/** - * Extract markdown tables from description text. - * - * Identifies lines starting and ending with `|` as table rows, - * groups consecutive table lines, and parses headers + data rows. - */ -export function extractTablesFromDescription(description) { - if (!description) - return []; - const lines = description.split('\n'); - const tables = []; - let currentTableLines = []; - for (const line of lines) { - const trimmed = line.trim(); - if (trimmed.startsWith('|') && trimmed.endsWith('|')) { - currentTableLines.push(trimmed); - } - else if (currentTableLines.length > 0) { - // End of a table block — parse it - const parsed = parseTableLines(currentTableLines); - if (parsed) - tables.push(parsed); - currentTableLines = []; - } - } - // Handle table at end of text - if (currentTableLines.length > 0) { - const parsed = parseTableLines(currentTableLines); - if (parsed) - tables.push(parsed); - } - return tables; -} -/** - * Parse a group of table lines into structured data. - * - * Supports both markdown tables (header + separator + data rows) and - * Gherkin-style tables (header + data rows, no separator). Returns null - * if insufficient rows. - */ -function parseTableLines(lines) { - // Need at least header + 1 data row - if (lines.length < 2) - return null; - const parseRow = (line) => line - .split('|') - .slice(1, -1) // Remove empty first/last from leading/trailing | - .map((cell) => cell.trim()); - const headerLine = lines[0]; - if (!headerLine) - return null; - const headers = parseRow(headerLine); - // Detect whether line 2 is a markdown separator row (| --- | --- |) - const secondLine = lines[1]; - if (!secondLine) - return null; - const secondCells = secondLine.split('|').slice(1, -1); - const hasSeparator = secondCells.every((cell) => /^[\s:-]+$/.test(cell)); - // Data rows start after separator (markdown) or immediately after header (Gherkin) - const dataStart = hasSeparator ? 2 : 1; - const rows = []; - for (let i = dataStart; i < lines.length; i++) { - const dataLine = lines[i]; - if (!dataLine) - continue; - const cells = parseRow(dataLine); - const row = {}; - for (let j = 0; j < headers.length; j++) { - const header = headers[j]; - if (header) { - row[header] = cells[j] ?? ''; - } - } - rows.push(row); - } - return { headers, rows }; -} -// ============================================================================ -// Rule Content Extraction -// ============================================================================ -/** - * Build a ConventionRuleContent from raw text and a rule name. - * - * Shared helper used by both Gherkin Rule: block extraction and - * TypeScript JSDoc description decomposition. - */ -function buildRuleContentFromText(text, ruleName) { - const annotations = parseBusinessRuleAnnotations(text); - const tables = extractTablesFromDescription(text); - return { - ruleName, - ...(annotations.invariant !== undefined && { invariant: annotations.invariant }), - ...(annotations.rationale !== undefined && { rationale: annotations.rationale }), - ...(annotations.verifiedBy !== undefined && { - verifiedBy: annotations.verifiedBy, - }), - tables, - ...(annotations.codeExamples !== undefined && - annotations.codeExamples.length > 0 && { - codeExamples: annotations.codeExamples, - }), - narrative: annotations.remainingContent ?? '', - }; -} -/** - * Extract structured convention content from a Gherkin business rule. - */ -function extractConventionRuleContent(rule) { - return buildRuleContentFromText(rule.description, rule.name); -} -// ============================================================================ -// TypeScript JSDoc Description Decomposition -// ============================================================================ -/** - * Extract convention rules from a TypeScript JSDoc description. - * - * Decomposes the description by `## Heading` sections into individual - * convention rules. Each heading becomes a rule name; the content below it - * (until the next `## ` or end) is parsed through `parseBusinessRuleAnnotations()`. - * - * If no `## ` headings exist, treats the entire description as a single rule. - * - * @param description - The JSDoc description text - * @param patternName - Fallback rule name when no ## headings exist - * @returns Array of ConventionRuleContent - */ -function extractConventionRulesFromDescription(description, patternName) { - if (!description || description.trim().length === 0) - return []; - // Split by ## headings (level 2 only, not ### or deeper) - // Allow optional leading whitespace for DocString content - const headingPattern = /^\s*## (?!#)(.+)$/gm; - const headings = []; - let match; - while ((match = headingPattern.exec(description)) !== null) { - const captured = match[1]; - if (captured) { - headings.push({ name: captured.trim(), index: match.index }); - } - } - if (headings.length === 0) { - // No headings: treat entire description as single rule - return [buildRuleContentFromText(description, patternName)]; - } - const rules = []; - for (let i = 0; i < headings.length; i++) { - const heading = headings[i]; - if (!heading) - continue; - const nextIndex = i + 1 < headings.length ? (headings[i + 1]?.index ?? description.length) : description.length; - // Content starts after the heading line - const headingLineEnd = description.indexOf('\n', heading.index); - const contentStart = headingLineEnd >= 0 ? headingLineEnd + 1 : description.length; - const content = description.slice(contentStart, nextIndex).trim(); - if (content.length > 0) { - rules.push(buildRuleContentFromText(content, heading.name)); - } - } - return rules; -} -// ============================================================================ -// Extraction Function -// ============================================================================ -/** - * Extracts convention content from MasterDataset. - * - * Filters patterns tagged with `@libar-docs-convention` matching the - * requested tag values. For Gherkin-sourced patterns, extracts from - * Rule: blocks. For TypeScript-sourced patterns (no rules array), - * decomposes the JSDoc description by ## headings. - * - * @param dataset - The MasterDataset containing all extracted patterns - * @param conventionTags - Convention tag values to filter by - * @returns Array of ConventionBundles, one per requested tag value - * - * @example - * ```typescript - * const conventions = extractConventions(dataset, ['fsm-rules', 'testing-policy']); - * // conventions[0].conventionTag === 'fsm-rules' - * // conventions[0].rules[0].ruleName === 'FSM Transitions' - * // conventions[0].rules[0].tables[0].headers === ['From', 'To', 'Condition'] - * ``` - */ -export function extractConventions(dataset, conventionTags) { - if (conventionTags.length === 0) - return []; - // Build a map of conventionTag -> { sourceDecisions, rules } - const bundles = new Map(); - // Initialize bundles for all requested tags - for (const tag of conventionTags) { - bundles.set(tag, { sourceDecisions: [], rules: [] }); - } - // Filter patterns that have convention tags matching our request - for (const pattern of dataset.patterns) { - if (!pattern.convention || pattern.convention.length === 0) - continue; - // Check if this pattern has any of the requested convention tags - const matchingTags = pattern.convention.filter((t) => conventionTags.includes(t)); - if (matchingTags.length === 0) - continue; - // Extract rule content from Gherkin Rule: blocks or TypeScript JSDoc description - let ruleContents; - if (pattern.rules && pattern.rules.length > 0) { - // Gherkin source: extract from Rule: blocks - ruleContents = pattern.rules.map(extractConventionRuleContent); - } - else if (pattern.directive.description) { - // TypeScript source: decompose JSDoc description by ## headings - ruleContents = extractConventionRulesFromDescription(pattern.directive.description, pattern.name); - } - else { - ruleContents = []; - } - // Only add to bundles if rules were extracted - if (ruleContents.length === 0) - continue; - for (const tag of matchingTags) { - const bundle = bundles.get(tag); - if (bundle) { - bundle.sourceDecisions.push(pattern.name); - bundle.rules.push(...ruleContents); - } - } - } - // Convert map to array, preserving requested order - const result = []; - for (const tag of conventionTags) { - const bundle = bundles.get(tag); - if (!bundle) - continue; - if (bundle.rules.length === 0 && bundle.sourceDecisions.length === 0) - continue; - result.push({ - conventionTag: tag, - sourceDecisions: bundle.sourceDecisions, - rules: bundle.rules, - }); - } - return result; -} -/** - * Extract convention bundles from pre-filtered patterns. - * - * DD-1 (CrossCuttingDocumentInclusion): Used by the include-tag pass to - * build convention content from patterns selected by include tag rather - * than by conventionTags filter. Groups output by each pattern's convention - * tag values. - * - * @param patterns - Pre-filtered patterns that have convention content - * @returns Array of ConventionBundles - */ -export function extractConventionsFromPatterns(patterns) { - const bundles = new Map(); - for (const pattern of patterns) { - if (!pattern.convention || pattern.convention.length === 0) - continue; - let ruleContents; - if (pattern.rules && pattern.rules.length > 0) { - ruleContents = pattern.rules.map(extractConventionRuleContent); - } - else if (pattern.directive.description) { - ruleContents = extractConventionRulesFromDescription(pattern.directive.description, pattern.name); - } - else { - ruleContents = []; - } - if (ruleContents.length === 0) - continue; - for (const tag of pattern.convention) { - const bundle = bundles.get(tag) ?? { sourceDecisions: [], rules: [] }; - bundle.sourceDecisions.push(pattern.name); - bundle.rules.push(...ruleContents); - bundles.set(tag, bundle); - } - } - const result = []; - for (const [tag, bundle] of bundles) { - if (bundle.rules.length === 0) - continue; - result.push({ - conventionTag: tag, - sourceDecisions: bundle.sourceDecisions, - rules: bundle.rules, - }); - } - return result; -} -//# sourceMappingURL=convention-extractor.js.map \ No newline at end of file diff --git a/dist/renderable/codecs/convention-extractor.js.map b/dist/renderable/codecs/convention-extractor.js.map deleted file mode 100644 index a6ce7710..00000000 --- a/dist/renderable/codecs/convention-extractor.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"convention-extractor.js","sourceRoot":"","sources":["../../../src/renderable/codecs/convention-extractor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAKH,OAAO,EAAE,4BAA4B,EAAE,MAAM,cAAc,CAAC;AAsD5D,+EAA+E;AAC/E,yCAAyC;AACzC,+EAA+E;AAE/E;;;;;GAKG;AACH,MAAM,UAAU,4BAA4B,CAAC,WAAmB;IAC9D,IAAI,CAAC,WAAW;QAAE,OAAO,EAAE,CAAC;IAE5B,MAAM,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC,IAAI,CAAC,C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,CAAC;IACH,CAAC;IAED,MAAM,MAAM,GAAuB,EAAE,CAAC;IACtC,KAAK,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,OAAO,EAAE,CAAC;QACpC,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC;YAAE,SAAS;QACxC,MAAM,CAAC,IAAI,CAAC;YACV,aAAa,EAAE,GAAG;YAClB,eAAe,EAAE,MAAM,CAAC,eAAe;YACvC,KAAK,EAAE,MAAM,CAAC,KAAK;SACpB,CAAC,CAAC;IACL,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"} \ No newline at end of file diff --git a/dist/renderable/codecs/decision-doc.d.ts b/dist/renderable/codecs/decision-doc.d.ts deleted file mode 100644 index 4c5df0cf..00000000 --- a/dist/renderable/codecs/decision-doc.d.ts +++ /dev/null @@ -1,308 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern DecisionDocCodec - * @libar-docs-status completed - * @libar-docs-arch-role projection - * @libar-docs-arch-context renderer - * @libar-docs-arch-layer application - * - * ## Decision Doc Codec - * - * Parses decision documents (ADR/PDR in .feature format) and extracts content - * for documentation generation. Provides parsing utilities for source mapping - * tables, self-reference markers, and rule block extraction. - * - * ### When to Use - * - * - When extracting content from decision documents for doc generation - * - When parsing Rule: blocks for Context/Decision/Consequences sections - * - When extracting DocStrings (fenced code blocks) with language tags - * - When parsing source mapping tables from decision descriptions - * - * ### Source Mapping Table Format - * - * ``` - * | Section | Source File | Extraction Method | - * | Intro & Context | THIS DECISION | Decision rule description | - * | API Types | src/types.ts | @extract-shapes tag | - * ``` - * - * ### Self-Reference Markers - * - * - `THIS DECISION` - Extract from the current decision document - * - `THIS DECISION (Rule: X)` - Extract specific Rule: block - * - `THIS DECISION (DocString)` - Extract fenced code blocks - */ -import type { BusinessRule } from '../../validation-schemas/extracted-pattern.js'; -import { type PartitionedRules } from './helpers.js'; -import type { SectionBlock, CodeBlock } from '../schema.js'; -/** - * Entry in a source mapping table - * - * Defines how a documentation section is assembled from source files. - */ -export interface SourceMappingEntry { - /** Target section heading in generated doc (e.g., "Intro & Context", "API Types") */ - section: string; - /** Path to source file or self-reference marker (e.g., "src/types.ts", "THIS DECISION") */ - sourceFile: string; - /** How to extract content from source (e.g., "@extract-shapes", "Rule blocks") */ - extractionMethod: string; -} -/** - * Partitioned rules from a decision document. - * Re-exported from helpers for convenience. - */ -export type PartitionedDecisionRules = PartitionedRules; -/** - * Extracted DocString with language tag - */ -export interface ExtractedDocString { - /** Language tag from the fenced code block (e.g., "typescript", "bash") */ - language: string; - /** Content of the DocString */ - content: string; -} -/** - * Result of parsing a self-reference marker - * - * Identifies whether the reference points to: - * - The entire document (`document`) - * - A specific Rule: block (`rule` with name) - * - DocStrings in the document (`docstring`) - */ -export interface SelfReferenceResult { - /** Type of self-reference */ - type: 'document' | 'rule' | 'docstring'; - /** Name of the rule block (only for type: 'rule') */ - name?: string; -} -/** - * Parsed content from a decision document - * - * Contains all extracted content from ADR/PDR feature files including: - * - Partitioned rules (Context/Decision/Consequences) - * - DocStrings with language tags - * - Source mapping entries - */ -export interface DecisionDocContent { - /** Pattern name from the decision document */ - patternName: string; - /** Feature description text (before any rules) */ - description: string; - /** Partitioned rules by semantic category */ - rules: PartitionedDecisionRules; - /** Extracted DocStrings with language tags */ - docStrings: ExtractedDocString[]; - /** Source mapping entries parsed from tables */ - sourceMappings: SourceMappingEntry[]; -} -/** - * Self-reference marker indicating content should be extracted from current document - */ -export declare const SELF_REFERENCE_MARKER = "THIS DECISION"; -/** - * Pattern for self-reference with specific Rule: block - * Matches: "THIS DECISION (Rule: SomeName)" - */ -export declare const SELF_REFERENCE_RULE_PATTERN: RegExp; -/** - * Pattern for self-reference to DocStrings - * Matches: "THIS DECISION (DocString)" - */ -export declare const SELF_REFERENCE_DOCSTRING_PATTERN: RegExp; -/** - * Partition decision rules by semantic prefix - * - * Wrapper around shared partitionRulesByPrefix that doesn't warn about "other" rules. - * Decision docs may have additional rules like "Proof of Concept" or "Expected Output" - * that are valid but don't fit the standard ADR sections. - * - * @param rules - Business rules from the extracted pattern - * @param _patternName - Pattern name for context (unused, kept for API compatibility) - * @returns Partitioned rules by category - */ -export declare function partitionDecisionRules(rules: readonly BusinessRule[] | undefined, _patternName?: string): PartitionedDecisionRules; -/** - * Extract DocStrings (fenced code blocks) from text content - * - * Supports two formats: - * - Gherkin DocStrings: """language\ncontent\n""" - * - Markdown code fences: ```language\ncontent\n``` - * - * @param text - Text content that may contain DocStrings - * @returns Array of extracted DocStrings with language tags - * - * @example - * ```typescript - * const docStrings = extractDocStrings(` - * Some text... - * - * """bash - * npm install - * """ - * - * More text... - * - * """typescript - * const x = 1; - * """ - * `); - * // Returns: [ - * // { language: 'bash', content: 'npm install' }, - * // { language: 'typescript', content: 'const x = 1;' } - * // ] - * ``` - */ -export declare function extractDocStrings(text: string): ExtractedDocString[]; -/** - * Extract DocStrings from business rules - * - * Iterates through rule descriptions and extracts all embedded DocStrings. - * - * @param rules - Business rules to extract DocStrings from - * @returns Array of extracted DocStrings with language tags - */ -export declare function extractDocStringsFromRules(rules: readonly BusinessRule[] | undefined): ExtractedDocString[]; -/** - * Parse a source mapping table from markdown text - * - * Expected format: - * ``` - * | Section | Source File | Extraction Method | - * | Intro & Context | THIS DECISION (Rule: Context above) | Decision rule description | - * | API Types | src/types.ts | @extract-shapes tag | - * ``` - * - * The table must have headers: Section, Source File (or Source), Extraction Method (or Extraction) - * - * @param text - Text content that may contain a source mapping table - * @returns Array of source mapping entries, empty if no table found - * - * @example - * ```typescript - * const mappings = parseSourceMappingTable(` - * **Source Mapping for Process Guard:** - * - * | Section | Source File | Extraction Method | - * | Intro & Context | THIS DECISION | Decision rule description | - * | API Types | src/types.ts | @extract-shapes tag | - * `); - * // Returns: [ - * // { section: 'Intro & Context', sourceFile: 'THIS DECISION', extractionMethod: 'Decision rule description' }, - * // { section: 'API Types', sourceFile: 'src/types.ts', extractionMethod: '@extract-shapes tag' } - * // ] - * ``` - */ -export declare function parseSourceMappingTable(text: string): SourceMappingEntry[]; -/** - * Parse source mapping tables from business rules - * - * Searches through rule descriptions for source mapping tables. - * - * @param rules - Business rules to search for source mapping tables - * @returns Array of source mapping entries from all rules - */ -export declare function parseSourceMappingsFromRules(rules: readonly BusinessRule[] | undefined): SourceMappingEntry[]; -/** - * Check if a source file reference is a self-reference - * - * @param sourceFile - The source file path to check - * @returns True if the reference is to the current decision document, false for null/undefined - */ -export declare function isSelfReference(sourceFile: string): boolean; -/** - * Parse a self-reference to extract the referenced element - * - * @param sourceFile - The source file reference to parse - * @returns Object with type and optional name, or null if not a self-reference - * - * @example - * ```typescript - * parseSelfReference('THIS DECISION'); - * // Returns: { type: 'document' } - * - * parseSelfReference('THIS DECISION (Rule: Context above)'); - * // Returns: { type: 'rule', name: 'Context above' } - * - * parseSelfReference('THIS DECISION (DocString)'); - * // Returns: { type: 'docstring' } - * - * parseSelfReference('src/types.ts'); - * // Returns: null - * ``` - */ -export declare function parseSelfReference(sourceFile: string): SelfReferenceResult | null; -/** - * Find a specific rule by name (flexible matching) - * - * Matching strategy (in order): - * 1. Exact match on full name - * 2. Rule name contains search term - * 3. Both start with the same word (e.g., "Context above" matches "Context - ...") - * - * @param rules - Rules to search - * @param ruleName - Name to search for (case-insensitive) - * @returns The matching rule or undefined - */ -export declare function findRuleByName(rules: readonly BusinessRule[] | undefined, ruleName: string): BusinessRule | undefined; -/** - * Extract content from a rule's description - * - * Returns the description text with DocStrings parsed as code blocks. - * - * @param rule - The rule to extract content from - * @returns Array of SectionBlocks representing the rule content - */ -export declare function extractRuleContent(rule: BusinessRule): SectionBlock[]; -/** - * Parse a complete decision document - * - * Extracts all relevant content from an ADR/PDR pattern including: - * - Partitioned rules (Context/Decision/Consequences/Other) - * - DocStrings with language tags - * - Source mapping entries - * - * @param patternName - The pattern name - * @param description - The feature description - * @param rules - Business rules from the pattern - * @returns Parsed decision document content - * - * @example - * ```typescript - * const content = parseDecisionDocument( - * 'DocGenerationProofOfConcept', - * pattern.directive.description ?? '', - * pattern.rules - * ); - * ``` - */ -export declare function parseDecisionDocument(patternName: string, description: string, rules: readonly BusinessRule[] | undefined): DecisionDocContent; -/** - * Known extraction methods and their descriptions - */ -export declare const EXTRACTION_METHODS: { - readonly DECISION_RULE_DESCRIPTION: "Decision rule description"; - readonly EXTRACT_SHAPES: "@extract-shapes tag"; - readonly RULE_BLOCKS: "Rule blocks"; - readonly SCENARIO_OUTLINE_EXAMPLES: "Scenario Outline Examples"; - readonly JSDOC_SECTION: "JSDoc section"; - readonly CREATE_VIOLATION_PATTERNS: "createViolation() patterns"; - readonly FENCED_CODE_BLOCK: "Fenced code block"; -}; -/** - * Normalize an extraction method string to a known type - * - * @param method - The extraction method string from the source mapping - * @returns Normalized method key or 'unknown' - */ -export declare function normalizeExtractionMethod(method: string): keyof typeof EXTRACTION_METHODS | 'unknown'; -/** - * Convert ExtractedDocStrings to CodeBlock SectionBlocks - * - * @param docStrings - Extracted DocStrings - * @returns Array of CodeBlock sections - */ -export declare function docStringsToCodeBlocks(docStrings: ExtractedDocString[]): CodeBlock[]; -//# sourceMappingURL=decision-doc.d.ts.map \ No newline at end of file diff --git a/dist/renderable/codecs/decision-doc.d.ts.map b/dist/renderable/codecs/decision-doc.d.ts.map deleted file mode 100644 index 3502c32b..00000000 --- a/dist/renderable/codecs/decision-doc.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decision-doc.d.ts","sourceRoot":"","sources":["../../../src/renderable/codecs/decision-doc.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAClF,OAAO,EAGL,KAAK,gBAAgB,EACtB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAO5D;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IAC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No newline at end of file diff --git a/dist/renderable/codecs/decision-doc.js b/dist/renderable/codecs/decision-doc.js deleted file mode 100644 index c7d68e11..00000000 --- a/dist/renderable/codecs/decision-doc.js +++ /dev/null @@ -1,485 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern DecisionDocCodec - * @libar-docs-status completed - * @libar-docs-arch-role projection - * @libar-docs-arch-context renderer - * @libar-docs-arch-layer application - * - * ## Decision Doc Codec - * - * Parses decision documents (ADR/PDR in .feature format) and extracts content - * for documentation generation. Provides parsing utilities for source mapping - * tables, self-reference markers, and rule block extraction. - * - * ### When to Use - * - * - When extracting content from decision documents for doc generation - * - When parsing Rule: blocks for Context/Decision/Consequences sections - * - When extracting DocStrings (fenced code blocks) with language tags - * - When parsing source mapping tables from decision descriptions - * - * ### Source Mapping Table Format - * - * ``` - * | Section | Source File | Extraction Method | - * | Intro & Context | THIS DECISION | Decision rule description | - * | API Types | src/types.ts | @extract-shapes tag | - * ``` - * - * ### Self-Reference Markers - * - * - `THIS DECISION` - Extract from the current decision document - * - `THIS DECISION (Rule: X)` - Extract specific Rule: block - * - `THIS DECISION (DocString)` - Extract fenced code blocks - */ -import { parseDescriptionWithDocStrings, partitionRulesByPrefix, } from './helpers.js'; -import { normalizeLineEndings } from '../../utils/string-utils.js'; -// ═══════════════════════════════════════════════════════════════════════════ -// Self-Reference Constants -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Self-reference marker indicating content should be extracted from current document - */ -export const SELF_REFERENCE_MARKER = 'THIS DECISION'; -/** - * Pattern for self-reference with specific Rule: block - * Matches: "THIS DECISION (Rule: SomeName)" - */ -export const SELF_REFERENCE_RULE_PATTERN = /^THIS DECISION \(Rule:\s*([^)]+)\)$/i; -/** - * Pattern for self-reference to DocStrings - * Matches: "THIS DECISION (DocString)" - */ -export const SELF_REFERENCE_DOCSTRING_PATTERN = /^THIS DECISION \(DocString\)$/i; -// ═══════════════════════════════════════════════════════════════════════════ -// Rule Partitioning (Uses shared helper from helpers.ts) -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Partition decision rules by semantic prefix - * - * Wrapper around shared partitionRulesByPrefix that doesn't warn about "other" rules. - * Decision docs may have additional rules like "Proof of Concept" or "Expected Output" - * that are valid but don't fit the standard ADR sections. - * - * @param rules - Business rules from the extracted pattern - * @param _patternName - Pattern name for context (unused, kept for API compatibility) - * @returns Partitioned rules by category - */ -export function partitionDecisionRules(rules, _patternName) { - // Note: Unlike ADR codec, we don't warn about "other" rules - return partitionRulesByPrefix(rules, { warnOnOther: false }); -} -// ═══════════════════════════════════════════════════════════════════════════ -// DocString Extraction -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Extract DocStrings (fenced code blocks) from text content - * - * Supports two formats: - * - Gherkin DocStrings: """language\ncontent\n""" - * - Markdown code fences: ```language\ncontent\n``` - * - * @param text - Text content that may contain DocStrings - * @returns Array of extracted DocStrings with language tags - * - * @example - * ```typescript - * const docStrings = extractDocStrings(` - * Some text... - * - * """bash - * npm install - * """ - * - * More text... - * - * """typescript - * const x = 1; - * """ - * `); - * // Returns: [ - * // { language: 'bash', content: 'npm install' }, - * // { language: 'typescript', content: 'const x = 1;' } - * // ] - * ``` - */ -export function extractDocStrings(text) { - if (!text || text.trim().length === 0) { - return []; - } - // Normalize line endings (Windows CRLF -> LF) - const normalized = normalizeLineEndings(text); - const docStrings = []; - // Extract Gherkin DocStrings (""" format) - const gherkinDocStringPattern = /"""(\w*)\n([\s\S]*?)"""/g; - let match; - while ((match = gherkinDocStringPattern.exec(normalized)) !== null) { - const langMatch = match[1] ?? ''; - const language = langMatch.length > 0 ? langMatch : 'text'; - const content = (match[2] ?? '').trim(); - if (content) { - docStrings.push({ language, content }); - } - } - // Extract markdown code fences (``` format) - const markdownCodePattern = /```(\w*)\n([\s\S]*?)```/g; - while ((match = markdownCodePattern.exec(normalized)) !== null) { - const langMatch = match[1] ?? ''; - const language = langMatch.length > 0 ? langMatch : 'text'; - const content = (match[2] ?? '').trim(); - if (content) { - docStrings.push({ language, content }); - } - } - return docStrings; -} -/** - * Extract DocStrings from business rules - * - * Iterates through rule descriptions and extracts all embedded DocStrings. - * - * @param rules - Business rules to extract DocStrings from - * @returns Array of extracted DocStrings with language tags - */ -export function extractDocStringsFromRules(rules) { - if (!rules || rules.length === 0) { - return []; - } - const docStrings = []; - for (const rule of rules) { - if (rule.description) { - docStrings.push(...extractDocStrings(rule.description)); - } - } - return docStrings; -} -// ═══════════════════════════════════════════════════════════════════════════ -// Source Mapping Table Parsing -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Parse a source mapping table from markdown text - * - * Expected format: - * ``` - * | Section | Source File | Extraction Method | - * | Intro & Context | THIS DECISION (Rule: Context above) | Decision rule description | - * | API Types | src/types.ts | @extract-shapes tag | - * ``` - * - * The table must have headers: Section, Source File (or Source), Extraction Method (or Extraction) - * - * @param text - Text content that may contain a source mapping table - * @returns Array of source mapping entries, empty if no table found - * - * @example - * ```typescript - * const mappings = parseSourceMappingTable(` - * **Source Mapping for Process Guard:** - * - * | Section | Source File | Extraction Method | - * | Intro & Context | THIS DECISION | Decision rule description | - * | API Types | src/types.ts | @extract-shapes tag | - * `); - * // Returns: [ - * // { section: 'Intro & Context', sourceFile: 'THIS DECISION', extractionMethod: 'Decision rule description' }, - * // { section: 'API Types', sourceFile: 'src/types.ts', extractionMethod: '@extract-shapes tag' } - * // ] - * ``` - */ -export function parseSourceMappingTable(text) { - if (!text || text.trim().length === 0) { - return []; - } - // Normalize line endings - const normalized = normalizeLineEndings(text); - // Find all markdown tables in the text - const lines = normalized.split('\n'); - const mappings = []; - let inTable = false; - let headerIndices = null; - for (const currentLine of lines) { - const line = currentLine.trim(); - // Check if this line looks like a table row - if (line.startsWith('|') && line.endsWith('|')) { - const cells = line - .split('|') - .slice(1, -1) // Remove first and last empty strings from split - .map((cell) => cell.trim()); - // Check if this is a header row - if (!inTable) { - // Look for header columns (case-insensitive) - const sectionIdx = cells.findIndex((c) => c.toLowerCase() === 'section'); - const sourceIdx = cells.findIndex((c) => c.toLowerCase() === 'source file' || c.toLowerCase() === 'source'); - const extractionIdx = cells.findIndex((c) => c.toLowerCase() === 'extraction method' || - c.toLowerCase() === 'extraction' || - c.toLowerCase() === 'how'); - if (sectionIdx !== -1 && sourceIdx !== -1 && extractionIdx !== -1) { - headerIndices = { - section: sectionIdx, - sourceFile: sourceIdx, - extraction: extractionIdx, - }; - inTable = true; - continue; - } - } - else { - // Check if this is the separator row (contains only dashes and pipes) - if (cells.every((cell) => /^[-:]+$/.test(cell))) { - continue; - } - // This is a data row - extract the mapping - if (headerIndices) { - const section = cells[headerIndices.section] ?? ''; - const sourceFile = cells[headerIndices.sourceFile] ?? ''; - const extractionMethod = cells[headerIndices.extraction] ?? ''; - // Only add if we have valid data - if (section && sourceFile && extractionMethod) { - mappings.push({ - section, - sourceFile, - extractionMethod, - }); - } - } - } - } - else if (inTable) { - // End of table - inTable = false; - headerIndices = null; - } - } - return mappings; -} -/** - * Parse source mapping tables from business rules - * - * Searches through rule descriptions for source mapping tables. - * - * @param rules - Business rules to search for source mapping tables - * @returns Array of source mapping entries from all rules - */ -export function parseSourceMappingsFromRules(rules) { - if (!rules || rules.length === 0) { - return []; - } - const mappings = []; - for (const rule of rules) { - if (rule.description) { - mappings.push(...parseSourceMappingTable(rule.description)); - } - } - return mappings; -} -// ═══════════════════════════════════════════════════════════════════════════ -// Self-Reference Resolution -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Check if a source file reference is a self-reference - * - * @param sourceFile - The source file path to check - * @returns True if the reference is to the current decision document, false for null/undefined - */ -export function isSelfReference(sourceFile) { - if (!sourceFile) - return false; - return (sourceFile === SELF_REFERENCE_MARKER || - SELF_REFERENCE_RULE_PATTERN.test(sourceFile) || - SELF_REFERENCE_DOCSTRING_PATTERN.test(sourceFile)); -} -/** - * Parse a self-reference to extract the referenced element - * - * @param sourceFile - The source file reference to parse - * @returns Object with type and optional name, or null if not a self-reference - * - * @example - * ```typescript - * parseSelfReference('THIS DECISION'); - * // Returns: { type: 'document' } - * - * parseSelfReference('THIS DECISION (Rule: Context above)'); - * // Returns: { type: 'rule', name: 'Context above' } - * - * parseSelfReference('THIS DECISION (DocString)'); - * // Returns: { type: 'docstring' } - * - * parseSelfReference('src/types.ts'); - * // Returns: null - * ``` - */ -export function parseSelfReference(sourceFile) { - if (sourceFile === SELF_REFERENCE_MARKER) { - return { type: 'document' }; - } - const ruleMatch = SELF_REFERENCE_RULE_PATTERN.exec(sourceFile); - if (ruleMatch?.[1]) { - return { type: 'rule', name: ruleMatch[1].trim() }; - } - if (SELF_REFERENCE_DOCSTRING_PATTERN.test(sourceFile)) { - return { type: 'docstring' }; - } - return null; -} -// ═══════════════════════════════════════════════════════════════════════════ -// Rule Block Content Extraction -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Find a specific rule by name (flexible matching) - * - * Matching strategy (in order): - * 1. Exact match on full name - * 2. Rule name contains search term - * 3. Both start with the same word (e.g., "Context above" matches "Context - ...") - * - * @param rules - Rules to search - * @param ruleName - Name to search for (case-insensitive) - * @returns The matching rule or undefined - */ -export function findRuleByName(rules, ruleName) { - if (!rules || rules.length === 0) { - return undefined; - } - const nameLower = ruleName.toLowerCase().trim(); - // First try exact match - const exactMatch = rules.find((r) => r.name.toLowerCase() === nameLower); - if (exactMatch) { - return exactMatch; - } - // Then try partial match (rule name contains search term) - const partialMatch = rules.find((r) => r.name.toLowerCase().includes(nameLower)); - if (partialMatch) { - return partialMatch; - } - // Try prefix match - both start with the same word - // This handles cases like "Context above" matching "Context - Manual..." - const firstWord = nameLower.split(/[\s-]+/)[0]; - if (firstWord && firstWord.length > 2) { - return rules.find((r) => r.name.toLowerCase().startsWith(firstWord)); - } - return undefined; -} -/** - * Extract content from a rule's description - * - * Returns the description text with DocStrings parsed as code blocks. - * - * @param rule - The rule to extract content from - * @returns Array of SectionBlocks representing the rule content - */ -export function extractRuleContent(rule) { - if (!rule.description) { - return []; - } - return parseDescriptionWithDocStrings(rule.description); -} -// ═══════════════════════════════════════════════════════════════════════════ -// Full Decision Document Parsing -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Parse a complete decision document - * - * Extracts all relevant content from an ADR/PDR pattern including: - * - Partitioned rules (Context/Decision/Consequences/Other) - * - DocStrings with language tags - * - Source mapping entries - * - * @param patternName - The pattern name - * @param description - The feature description - * @param rules - Business rules from the pattern - * @returns Parsed decision document content - * - * @example - * ```typescript - * const content = parseDecisionDocument( - * 'DocGenerationProofOfConcept', - * pattern.directive.description ?? '', - * pattern.rules - * ); - * ``` - */ -export function parseDecisionDocument(patternName, description, rules) { - const partitionedRules = partitionDecisionRules(rules, patternName); - // Collect DocStrings from all sources - const docStrings = []; - // DocStrings from description - docStrings.push(...extractDocStrings(description)); - // DocStrings from all rules - docStrings.push(...extractDocStringsFromRules(rules)); - // Parse source mappings from description AND rules - // The description may contain a source mapping table (e.g., in decision documents) - const sourceMappings = [ - ...parseSourceMappingTable(description), - ...parseSourceMappingsFromRules(rules), - ]; - return { - patternName, - description, - rules: partitionedRules, - docStrings, - sourceMappings, - }; -} -// ═══════════════════════════════════════════════════════════════════════════ -// Extraction Method Dispatch -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Known extraction methods and their descriptions - */ -export const EXTRACTION_METHODS = { - DECISION_RULE_DESCRIPTION: 'Decision rule description', - EXTRACT_SHAPES: '@extract-shapes tag', - RULE_BLOCKS: 'Rule blocks', - SCENARIO_OUTLINE_EXAMPLES: 'Scenario Outline Examples', - JSDOC_SECTION: 'JSDoc section', - CREATE_VIOLATION_PATTERNS: 'createViolation() patterns', - FENCED_CODE_BLOCK: 'Fenced code block', -}; -/** - * Normalize an extraction method string to a known type - * - * @param method - The extraction method string from the source mapping - * @returns Normalized method key or 'unknown' - */ -export function normalizeExtractionMethod(method) { - const methodLower = method.toLowerCase().trim(); - if (methodLower.includes('decision rule') || methodLower.includes('rule description')) { - return 'DECISION_RULE_DESCRIPTION'; - } - if (methodLower.includes('@extract-shapes') || methodLower.includes('extract-shapes')) { - return 'EXTRACT_SHAPES'; - } - if (methodLower.includes('rule block')) { - return 'RULE_BLOCKS'; - } - if (methodLower.includes('scenario outline') || methodLower.includes('examples')) { - return 'SCENARIO_OUTLINE_EXAMPLES'; - } - if (methodLower.includes('jsdoc')) { - return 'JSDOC_SECTION'; - } - if (methodLower.includes('createviolation') || methodLower.includes('violation')) { - return 'CREATE_VIOLATION_PATTERNS'; - } - if (methodLower.includes('fenced') || methodLower.includes('code block')) { - return 'FENCED_CODE_BLOCK'; - } - return 'unknown'; -} -/** - * Convert ExtractedDocStrings to CodeBlock SectionBlocks - * - * @param docStrings - Extracted DocStrings - * @returns Array of CodeBlock sections - */ -export function docStringsToCodeBlocks(docStrings) { - return docStrings.map((ds) => ({ - type: 'code', - language: ds.language, - content: ds.content, - })); -} -//# sourceMappingURL=decision-doc.js.map \ No newline at end of file diff --git a/dist/renderable/codecs/decision-doc.js.map b/dist/renderable/codecs/decision-doc.js.map deleted file mode 100644 index ddc2cf36..00000000 --- a/dist/renderable/codecs/decision-doc.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decision-doc.js","sourceRoot":"","sources":["../../../src/renderable/codecs/decision-doc.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAGH,OAAO,EACL,8BAA8B,EAC9B,sBAAsB,GAEvB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAgFnE,8EAA8E;AAC9E,2BAA2B;AAC3B,8EAA8E;AAE9E;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,eAAe,CAAC;AAErD;;;GAGG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,sCAAsC,CAAC;AAElF;;;GAGG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,gCAAgC,CAAC;AAEjF,8EAA8E;AAC9E,yDAAyD;AACzD,8EAA8E;AAE9E;;;;;;;;;;GA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dist/renderable/codecs/diagram-utils.d.ts deleted file mode 100644 index 9863ca86..00000000 --- a/dist/renderable/codecs/diagram-utils.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -/** - * @libar-docs - * @libar-docs-used-by Architecture Codec, Reference Codec - * @libar-docs-arch-context renderer - * - * ## Shared Mermaid Diagram Utilities - * - * Sanitization and formatting helpers shared across architecture.ts and reference.ts - * diagram builders. - */ -/** - * Sanitize pattern name for Mermaid node ID. - * Mermaid requires alphanumeric + underscore only. - */ -export declare function sanitizeNodeId(name: string): string; -/** Arrow styles per relationship type for Mermaid diagram generation */ -export declare const EDGE_STYLES: { - readonly uses: "-->"; - readonly dependsOn: "-.->"; - readonly implementsPatterns: "..->"; - readonly extendsPattern: "-->>"; -}; -/** Human-readable relationship labels for edge annotations (DD-4) */ -export declare const EDGE_LABELS: { - readonly uses: "uses"; - readonly dependsOn: "depends on"; - readonly implementsPatterns: "implements"; - readonly extendsPattern: "extends"; -}; -/** Arrow syntax for sequence diagram messages (DD-2) */ -export declare const SEQUENCE_ARROWS: { - readonly uses: "->>"; - readonly dependsOn: "-->>"; - readonly implementsPatterns: "--)"; - readonly extendsPattern: "-->>"; -}; -/** - * Mermaid flowchart node shape brackets per archRole (DD-1). - * Maps archRole to [openBracket, closeBracket] pairs. - * Uses `satisfies` to ensure every canonical archRole has a mapping. - */ -export declare const NODE_SHAPES: { - readonly 'bounded-context': readonly ["[[\"", "\"]]"]; - readonly 'command-handler': readonly ["([\"", "\"])"]; - readonly projection: readonly ["[(\"", "\")]"]; - readonly saga: readonly ["{{\"", "\"}}"]; - readonly 'process-manager': readonly ["{{\"", "\"}}"]; - readonly infrastructure: readonly ["[/\"", "\"/]"]; - readonly repository: readonly ["[(\"", "\")]"]; - readonly decider: readonly ["(\"", "\")"]; - readonly 'read-model': readonly ["[/\"", "\"/]"]; - readonly service: readonly ["(\"", "\")"]; -}; -/** Format a Mermaid flowchart node declaration with shape based on archRole */ -export declare function formatNodeDeclaration(nodeId: string, label: string, archRole?: string): string; -//# sourceMappingURL=diagram-utils.d.ts.map \ No newline at end of file diff --git a/dist/renderable/codecs/diagram-utils.d.ts.map b/dist/renderable/codecs/diagram-utils.d.ts.map deleted file mode 100644 index 72346be4..00000000 --- a/dist/renderable/codecs/diagram-utils.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"diagram-utils.d.ts","sourceRoot":"","sources":["../../../src/renderable/codecs/diagram-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAUH;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEnD;AAED,wEAAwE;AACxE,eAAO,MAAM,WAAW;;;;;CAKd,CAAC;AAEX,qEAAqE;AACrE,eAAO,MAAM,WAAW;;;;;CAK6B,CAAC;AAEtD,wDAAwD;AACxD,eAAO,MAAM,eAAe;;;;;CAKyB,CAAC;AAEtD;;;;GAIG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;CAWwC,CAAC;AAEjE,+EAA+E;AAC/E,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAM9F"} \ No newline at end of file diff --git a/dist/renderable/codecs/diagram-utils.js b/dist/renderable/codecs/diagram-utils.js deleted file mode 100644 index 378f50d3..00000000 --- a/dist/renderable/codecs/diagram-utils.js +++ /dev/null @@ -1,64 +0,0 @@ -/** - * @libar-docs - * @libar-docs-used-by Architecture Codec, Reference Codec - * @libar-docs-arch-context renderer - * - * ## Shared Mermaid Diagram Utilities - * - * Sanitization and formatting helpers shared across architecture.ts and reference.ts - * diagram builders. - */ -/** - * Sanitize pattern name for Mermaid node ID. - * Mermaid requires alphanumeric + underscore only. - */ -export function sanitizeNodeId(name) { - return name.replace(/[^a-zA-Z0-9]/g, '_'); -} -/** Arrow styles per relationship type for Mermaid diagram generation */ -export const EDGE_STYLES = { - uses: '-->', - dependsOn: '-.->', - implementsPatterns: '..->', - extendsPattern: '-->>', -}; -/** Human-readable relationship labels for edge annotations (DD-4) */ -export const EDGE_LABELS = { - uses: 'uses', - dependsOn: 'depends on', - implementsPatterns: 'implements', - extendsPattern: 'extends', -}; -/** Arrow syntax for sequence diagram messages (DD-2) */ -export const SEQUENCE_ARROWS = { - uses: '->>', - dependsOn: '-->>', - implementsPatterns: '--)', - extendsPattern: '-->>', -}; -/** - * Mermaid flowchart node shape brackets per archRole (DD-1). - * Maps archRole to [openBracket, closeBracket] pairs. - * Uses `satisfies` to ensure every canonical archRole has a mapping. - */ -export const NODE_SHAPES = { - 'bounded-context': ['[["', '"]]'], - 'command-handler': ['(["', '"])'], - projection: ['[("', '")]'], - saga: ['{{"', '"}}'], - 'process-manager': ['{{"', '"}}'], - infrastructure: ['[/"', '"/]'], - repository: ['[("', '")]'], - decider: ['("', '")'], - 'read-model': ['[/"', '"/]'], - service: ['("', '")'], -}; -/** Format a Mermaid flowchart node declaration with shape based on archRole */ -export function formatNodeDeclaration(nodeId, label, archRole) { - if (archRole !== undefined && archRole in NODE_SHAPES) { - const shape = NODE_SHAPES[archRole]; - return `${nodeId}${shape[0]}${label}${shape[1]}`; - } - return `${nodeId}["${label}"]`; -} -//# sourceMappingURL=diagram-utils.js.map \ No newline at end of file diff --git a/dist/renderable/codecs/diagram-utils.js.map b/dist/renderable/codecs/diagram-utils.js.map deleted file mode 100644 index 153cad42..00000000 --- a/dist/renderable/codecs/diagram-utils.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"diagram-utils.js","sourceRoot":"","sources":["../../../src/renderable/codecs/diagram-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAUH;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,IAAY;IACzC,OAAO,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE,GAAG,CAAC,CAAC;AAC5C,CAAC;AAED,wEAAwE;AACxE,MAAM,CAAC,MAAM,WAAW,GAAG;IACz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AC,CAAC,CAAC,GAAG,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;IACnD,CAAC;IACD,OAAO,GAAG,MAAM,KAAK,KAAK,IAAI,CAAC;AACjC,CAAC"} \ No newline at end of file diff --git a/dist/renderable/codecs/helpers.d.ts b/dist/renderable/codecs/helpers.d.ts deleted file mode 100644 index 6831fc4f..00000000 --- a/dist/renderable/codecs/helpers.d.ts +++ /dev/null @@ -1,549 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern RichContentHelpers - * @libar-docs-status completed - * - * ## Rich Content Rendering Helpers - * - * Shared helper functions for rendering Gherkin rich content in document codecs. - * Provides granular and composite helpers for DataTables, DocStrings, steps, - * scenarios, and business rules. - * - * ### When to Use - * - * - When building custom codecs that need to render Gherkin content - * - When transforming DataTables, DocStrings, or scenarios into markdown - * - When implementing acceptance criteria or business rules sections - * - * ### Usage Pattern - * - * ```typescript - * import { renderAcceptanceCriteria, renderBusinessRulesSection } from "./helpers.js"; - * - * // Composite helpers (most common use) - * sections.push(...renderAcceptanceCriteria(pattern.scenarios)); - * sections.push(...renderBusinessRulesSection(pattern.rules)); - * - * // Granular helpers (for custom rendering) - * const tableBlock = renderDataTable(step.dataTable); - * const codeBlock = renderDocString(step.docString, "markdown"); - * ``` - */ -import type { ScenarioDataTable, ScenarioStep, ScenarioRef } from '../../validation-schemas/scenario-ref.js'; -import type { BusinessRule } from '../../validation-schemas/extracted-pattern.js'; -import type { ExtractedShape, PropertyDoc } from '../../validation-schemas/extracted-shape.js'; -import { type SectionBlock } from '../schema.js'; -import type { WarningCollector } from '../../generators/warning-collector.js'; -export type { BusinessRule }; -/** - * Result of partitioning business rules by ADR-style prefixes. - */ -export interface PartitionedRules { - /** Rules with names starting with "Context" */ - context: BusinessRule[]; - /** Rules with names starting with "Decision" */ - decision: BusinessRule[]; - /** Rules with names starting with "Consequence" */ - consequences: BusinessRule[]; - /** Rules that don't match any expected prefix */ - other: BusinessRule[]; -} -/** - * Options for partitioning business rules. - */ -export interface PartitionRulesOptions { - /** - * Warn about rules that don't match expected prefixes (default: false). - * When true, emits a warning for non-matching rules via onWarning callback. - * ADR codec sets this to true; Decision Doc codec keeps false. - */ - warnOnOther?: boolean; - /** Pattern name for warning context (optional) */ - patternName?: string; - /** - * Callback for warnings (default: console.warn). - * Allows programmatic capture of warnings for testing or custom handling. - */ - onWarning?: (message: string) => void; -} -/** - * Partition business rules by ADR-style name prefixes. - * - * Rules are categorized based on their name prefix: - * - "Context..." → context section - * - "Decision..." → decision section - * - "Consequence..." → consequences section - * - Others → other (optionally logged as warning) - * - * This is a shared helper used by both ADR and Decision Doc codecs. - * - * @param rules - Business rules from the extracted pattern - * @param options - Partitioning options - * @returns Partitioned rules by category - * - * @example - * ```typescript - * // ADR codec (warn about unmatched rules) - * const partitioned = partitionRulesByPrefix(pattern.rules, { - * warnOnOther: true, - * patternName: pattern.name - * }); - * - * // Decision doc codec (no warning) - * const partitioned = partitionRulesByPrefix(pattern.rules); - * ``` - */ -export declare function partitionRulesByPrefix(rules: readonly BusinessRule[] | undefined, options?: PartitionRulesOptions): PartitionedRules; -/** - * Warning information emitted during rich content rendering - */ -export interface RichContentWarning { - /** Warning code for programmatic handling */ - code: 'unclosed-docstring' | 'invalid-content'; - /** Human-readable warning message */ - message: string; - /** Additional context about the warning */ - context?: string; -} -/** - * Configuration options for rich content rendering - */ -export interface RichContentOptions { - /** Include Given/When/Then steps (default: true) */ - includeSteps?: boolean; - /** Include DataTables from steps (default: true) */ - includeDataTables?: boolean; - /** Include DocStrings from steps (default: true) */ - includeDocStrings?: boolean; - /** Include business rules section (default: true) */ - includeRules?: boolean; - /** Default language for DocString code blocks (default: "markdown") */ - docStringLanguage?: string; - /** - * Base heading level for section headers (default: 4) - * - * Used by renderAcceptanceCriteria and renderBusinessRulesSection to set - * the heading level for "Acceptance Criteria" and "Business Rules" sections. - * Callers can override to maintain proper document hierarchy. - * - * - H2: Use when rendering as top-level section in detail documents - * - H3: Use when rendering under a parent H2 section - * - H4: Use when deeply nested (default for backward compatibility) - */ - baseHeadingLevel?: 2 | 3 | 4; - /** - * Optional callback invoked when warnings are detected during rendering. - * - * If not provided or undefined, warnings are logged to stderr via console.warn. - * Provide this callback to capture warnings programmatically or suppress them. - */ - onWarning?: ((warning: RichContentWarning) => void) | undefined; - /** - * Optional WarningCollector for structured warning capture. - * - * When provided, warnings are captured using the collector for aggregation - * and structured reporting. Takes precedence over `onWarning` callback. - * Use this for CI/CD pipelines that need machine-readable warning output. - */ - warningCollector?: WarningCollector | undefined; -} -/** - * Default options type - all fields are required values from RichContentOptions. - * Since RichContentOptions.onWarning explicitly allows undefined in its type definition, - * Required correctly allows undefined for onWarning. - */ -export type ResolvedRichContentOptions = Required; -/** - * Default rich content options - * - * Note: onWarning and warningCollector are intentionally undefined by default. - * When undefined, warnings fall back to console.warn via emitWarning(). - */ -export declare const DEFAULT_RICH_CONTENT_OPTIONS: ResolvedRichContentOptions; -/** - * Merge user options with defaults - */ -export declare function mergeRichContentOptions(options?: RichContentOptions): ResolvedRichContentOptions; -/** - * Structured warning format for CI parsing. - * - * Format: `::warning file={file},code={code}::{message}` - * - * This format is compatible with GitHub Actions and other CI systems - * that support structured annotations. - */ -export interface StructuredWarning { - /** Warning code for categorization */ - code: string; - /** Human-readable message */ - message: string; - /** Source file (if available) */ - file?: string; - /** Line number (if available) */ - line?: number; -} -/** - * Format a warning for CI output (GitHub Actions compatible). - * - * @param warning - The warning to format - * @returns Formatted string for CI log parsing - */ -export declare function formatWarningForCI(warning: StructuredWarning): string; -/** - * Render a Gherkin DataTable as a markdown table block - * - * @param dt - The DataTable to render - * @returns A table SectionBlock - * - * @example - * ```typescript - * const tableBlock = renderDataTable(step.dataTable); - * sections.push(tableBlock); - * ``` - */ -export declare function renderDataTable(dt: ScenarioDataTable): SectionBlock; -/** - * Render a DocString as a code block - * - * Accepts either a plain string (legacy format) or an object with content and optional mediaType. - * When mediaType is provided in the object, it takes precedence over the language parameter. - * - * @param docString - The DocString content (string or object with content/mediaType) - * @param language - Optional language hint fallback (default: "markdown") - * @returns A code SectionBlock - * - * @example - * ```typescript - * // With plain string (legacy) - * const codeBlock = renderDocString(step.docString, "json"); - * - * // With object containing mediaType - * const codeBlock = renderDocString({ content: "code", mediaType: "typescript" }); - * ``` - */ -export declare function renderDocString(docString: string | { - content: string; - mediaType?: string | undefined; -}, language?: string): SectionBlock; -/** - * Render scenario steps as a list - * - * @param steps - The scenario steps - * @returns A list SectionBlock - * - * @example - * ```typescript - * const stepsList = renderStepsList(scenario.steps); - * sections.push(stepsList); - * ``` - */ -export declare function renderStepsList(steps: readonly ScenarioStep[]): SectionBlock; -/** - * Remove common leading indentation from all lines in a code block. - * - * When DocStrings are embedded in Gherkin files, they often have consistent - * indentation to align with the surrounding scenario structure. This function - * normalizes that indentation by: - * 1. Normalizing tabs to spaces (default: 2 spaces per tab) - * 2. Finding the minimum indentation across all non-empty lines - * 3. Removing that common indentation from every line - * 4. Trimming trailing whitespace from each line - * - * @param text - The code block content to dedent - * @param tabWidth - Number of spaces per tab (default: 2) - * @returns The dedented text with normalized indentation - * - * @example - * ```typescript - * // Input (indented to match Gherkin formatting): - * dedent(" const x = 1;\n const y = 2;") - * // Returns: "const x = 1;\nconst y = 2;" - * - * // Mixed indentation (preserves relative indentation): - * dedent(" function foo() {\n return 42;\n }") - * // Returns: "function foo() {\n return 42;\n}" - * - * // Tab-indented code (tabs normalized to spaces): - * dedent("\t\tconst x = 1;") - * // Returns: "const x = 1;" - * ``` - */ -export declare function dedent(text: string, tabWidth?: number): string; -/** - * Parse description text for embedded DocStrings and convert to mixed content - * - * DocStrings in Gherkin are identified by: """language\n...\n""" - * Text between DocStrings renders as paragraphs, DocStrings render as code blocks. - * - * **Defensive handling:** - * - Normalizes Windows line endings (CRLF → LF) before parsing - * - Detects unclosed DocStrings (odd count of """) and returns plain paragraph fallback - * - Handles empty input gracefully - * - Dedents code block content to normalize indentation from Gherkin formatting - * - * @param description - The description text that may contain DocStrings - * @param options - Optional rendering options (used for warning callback) - * @returns Array of SectionBlocks (paragraphs and code blocks) - * - * @example - * ```typescript - * // Input with DocString: - * // "Some text\n\"\"\"typescript\nconst x = 1;\n\"\"\"\nMore text" - * // Output: [paragraph("Some text"), code("const x = 1;", "typescript"), paragraph("More text")] - * ``` - */ -export declare function parseDescriptionWithDocStrings(description: string, options?: RichContentOptions): SectionBlock[]; -/** - * Protect backtick-quoted content from regex matching by replacing with placeholders. - * - * This is essential when parsing markdown-style content where `**bold**` patterns - * might appear inside inline code (e.g., `` `**Verified by:**` ``). Without protection, - * regexes that look for `**` boundaries will incorrectly match inside backticks. - * - * @param text - The text to process - * @returns Object with processed text and restore function - * - * @example - * ```typescript - * const { processed, restore } = protectBacktickContent("Text `**inside**` more"); - * // processed = "Text __BT0__ more" - * const result = "Extracted: __BT0__"; - * restore(result); // "Extracted: `**inside**`" - * ``` - */ -export declare function protectBacktickContent(text: string): { - processed: string; - restore: (s: string) => string; -}; -/** - * Parsed annotations from a business rule description. - * - * Business rules in feature files can include structured annotations: - * - `**Invariant:**` - What must always be true (business constraint) - * - `**Rationale:**` - Why this rule exists (business justification) - * - `**Verified by:**` - Comma-separated list of verifying scenario names - * - `**API:** See \`path\`` - Reference to implementation file/stub - */ -export interface BusinessRuleAnnotations { - /** The business constraint that must always be true */ - invariant?: string; - /** Business justification for why this rule exists */ - rationale?: string; - /** List of scenario names that verify this rule */ - verifiedBy?: string[]; - /** Code examples extracted from DocStrings in the description */ - codeExamples?: SectionBlock[]; - /** API implementation references extracted from **API:** See `path` patterns */ - apiRefs?: readonly string[]; - /** Remaining description content after annotation extraction */ - remainingContent?: string; -} -/** - * Truncate text to a maximum length, adding ellipsis if truncated. - * - * Attempts to truncate at word boundaries for cleaner output. - * If the text is already shorter than maxLength, returns it unchanged. - * - * @param text - The text to truncate - * @param maxLength - Maximum length (0 or negative = no limit) - * @returns Truncated text with "..." suffix if truncated - * - * @example - * ```typescript - * truncateText("This is a long description", 15); - * // Returns: "This is a..." - * - * truncateText("Short", 100); - * // Returns: "Short" - * ``` - */ -export declare function truncateText(text: string, maxLength: number): string; -export { extractFirstSentenceRaw as extractFirstSentence } from '../../utils/string-utils.js'; -/** - * Parse structured annotations from a business rule description. - * - * Extracts: - * - `**Invariant:** ` - until next `**` annotation or end - * - `**Rationale:** ` - until next `**` annotation or end - * - `**Verified by:** ` - * - DocStrings ("""language\n...\n""") as code blocks - * - * The remaining content after extraction is returned in `remainingContent`. - * - * @param description - The rule description text to parse - * @returns Parsed annotations with structured fields - * - * @example - * ```typescript - * const annotations = parseBusinessRuleAnnotations(` - * **Invariant:** Only one reservation can exist for a given key. - * - * **Rationale:** Prevents TOCTOU race conditions. - * - * **Verified by:** Concurrent reservations, Expired cleanup - * `); - * // annotations.invariant === "Only one reservation can exist for a given key." - * // annotations.rationale === "Prevents TOCTOU race conditions." - * // annotations.verifiedBy === ["Concurrent reservations", "Expired cleanup"] - * ``` - */ -export declare function parseBusinessRuleAnnotations(description: string): BusinessRuleAnnotations; -/** - * Strip markdown tables from text content. - * - * Tables are identified by lines starting and ending with | character. - * This removes header rows, separator rows, and data rows to prevent - * duplicate rendering when tables are extracted separately. - * - * @param text - Text that may contain markdown tables - * @returns Text with tables removed and excess newlines cleaned up - * - * @example - * ```typescript - * const text = "Intro\n| Col | Col |\n| --- | --- |\n| A | B |\nOutro"; - * stripMarkdownTables(text); // "Intro\n\nOutro" - * ``` - */ -export declare function stripMarkdownTables(text: string): string; -/** - * Render a single business rule with its description and verification info - * - * Parses the description for embedded DocStrings and renders them as code blocks. - * - * @param rule - The business rule to render - * @returns Array of SectionBlocks for the rule - * - * @example - * ```typescript - * sections.push(...renderBusinessRule(rule)); - * ``` - */ -export declare function renderBusinessRule(rule: BusinessRule): SectionBlock[]; -/** - * Render a rule description using structured annotation parsing. - * - * Extracts `**Invariant:**`, `**Rationale:**`, `**Verified by:**`, tables, and - * code examples for polished output with proper table formatting and separator rows. - * - * IMPORTANT: Table lines are stripped BEFORE annotation regexes so that bold markers - * inside table cells (e.g. `| **Context:** ... |`) don't act as false annotation - * boundaries that truncate the lazy `[\s\S]*?` capture. - * - * @param description - Raw rule description text from Gherkin Rule: block - * @returns Array of SectionBlocks with structured content - */ -export declare function renderRuleDescription(description: string): SectionBlock[]; -/** - * Render a scenario's content including steps, DataTables, and DocStrings - * - * @param scenario - The scenario to render - * @param options - Rendering options - * @returns Array of SectionBlocks for the scenario - * - * @example - * ```typescript - * for (const scenario of pattern.scenarios) { - * sections.push(...renderScenarioContent(scenario)); - * } - * ``` - */ -export declare function renderScenarioContent(scenario: ScenarioRef, options?: RichContentOptions): SectionBlock[]; -/** - * Render acceptance criteria from a list of scenarios - * - * Includes a "Acceptance Criteria" heading followed by all scenarios - * with their steps, DataTables, and DocStrings. - * - * @param scenarios - The scenarios to render as acceptance criteria - * @param options - Rendering options (including baseHeadingLevel for proper hierarchy) - * @returns Array of SectionBlocks, empty if no scenarios - * - * @example - * ```typescript - * if (pattern.scenarios && pattern.scenarios.length > 0) { - * // Default H4 heading (backward compatible) - * sections.push(...renderAcceptanceCriteria(pattern.scenarios)); - * - * // H2 heading for top-level section in detail documents - * sections.push(...renderAcceptanceCriteria(pattern.scenarios, { baseHeadingLevel: 2 })); - * } - * ``` - */ -export declare function renderAcceptanceCriteria(scenarios: readonly ScenarioRef[] | undefined, options?: RichContentOptions): SectionBlock[]; -/** - * Render a business rules section from a list of rules - * - * Includes a "Business Rules" heading followed by all rules - * with their descriptions and verification info. - * - * @param rules - The business rules to render - * @param options - Rendering options (including baseHeadingLevel for proper hierarchy) - * @returns Array of SectionBlocks, empty if no rules - * - * @example - * ```typescript - * if (pattern.rules && pattern.rules.length > 0) { - * // Default H4 heading (backward compatible) - * sections.push(...renderBusinessRulesSection(pattern.rules)); - * - * // H2 heading for top-level section in detail documents - * sections.push(...renderBusinessRulesSection(pattern.rules, { baseHeadingLevel: 2 })); - * } - * ``` - */ -export declare function renderBusinessRulesSection(rules: readonly BusinessRule[] | undefined, options?: RichContentOptions): SectionBlock[]; -/** - * Render all rich content for a pattern (scenarios + rules) - * - * Convenience function that combines acceptance criteria and business rules. - * - * @param pattern - Object with optional scenarios and rules arrays - * @param options - Rendering options - * @returns Array of SectionBlocks - * - * @example - * ```typescript - * sections.push(...renderPatternRichContent(pattern)); - * ``` - */ -export declare function renderPatternRichContent(pattern: { - scenarios?: readonly ScenarioRef[]; - rules?: readonly BusinessRule[]; -}, options?: RichContentOptions): SectionBlock[]; -/** - * Options for rendering extracted shapes as markdown. - */ -export interface RenderShapesOptions { - /** If true, combine all shapes into a single fenced code block (default: true) */ - groupInSingleBlock?: boolean; - /** If true, include JSDoc comments with each shape (default: true) */ - includeJsDoc?: boolean; -} -/** - * Render extracted TypeScript shapes as markdown code blocks. - * - * @param shapes - Shapes to render - * @param options - Rendering options - * @returns Markdown string with fenced code blocks - */ -export declare function renderShapesAsMarkdown(shapes: readonly ExtractedShape[], options?: RenderShapesOptions): string; -/** - * Render property documentation as a markdown table. - * - * Generates a two-column table with property names and their JSDoc descriptions. - * Returns empty string if no property docs exist. - * - * @param propertyDocs - Property documentation array from ExtractedShape - * @returns Markdown table string, or empty string if no docs - * - * @example - * ```typescript - * const table = renderPropertyDocsTable(shape.propertyDocs); - * if (table) { - * sections.push(md(table)); - * } - * ``` - */ -export declare function renderPropertyDocsTable(propertyDocs: readonly PropertyDoc[] | undefined): string; -//# sourceMappingURL=helpers.d.ts.map \ No newline at end of file diff --git a/dist/renderable/codecs/helpers.d.ts.map b/dist/renderable/codecs/helpers.d.ts.map deleted file mode 100644 index ad64ae35..00000000 --- a/dist/renderable/codecs/helpers.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/renderable/codecs/helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,KAAK,EACV,iBAAiB,EACjB,YAAY,EACZ,WAAW,EACZ,M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;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,SAAS,cAAc,EAAE,EACjC,OAAO,GAAE,mBAAwB,GAChC,MAAM,CAsBR;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,uBAAuB,CAAC,YAAY,EAAE,SAAS,WAAW,EAAE,GAAG,SAAS,GAAG,MAAM,CAchG"} \ No newline at end of file diff --git a/dist/renderable/codecs/helpers.js b/dist/renderable/codecs/helpers.js deleted file mode 100644 index bf852a6f..00000000 --- a/dist/renderable/codecs/helpers.js +++ /dev/null @@ -1,889 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern RichContentHelpers - * @libar-docs-status completed - * - * ## Rich Content Rendering Helpers - * - * Shared helper functions for rendering Gherkin rich content in document codecs. - * Provides granular and composite helpers for DataTables, DocStrings, steps, - * scenarios, and business rules. - * - * ### When to Use - * - * - When building custom codecs that need to render Gherkin content - * - When transforming DataTables, DocStrings, or scenarios into markdown - * - When implementing acceptance criteria or business rules sections - * - * ### Usage Pattern - * - * ```typescript - * import { renderAcceptanceCriteria, renderBusinessRulesSection } from "./helpers.js"; - * - * // Composite helpers (most common use) - * sections.push(...renderAcceptanceCriteria(pattern.scenarios)); - * sections.push(...renderBusinessRulesSection(pattern.rules)); - * - * // Granular helpers (for custom rendering) - * const tableBlock = renderDataTable(step.dataTable); - * const codeBlock = renderDocString(step.docString, "markdown"); - * ``` - */ -import { table, code, list, paragraph, heading } from '../schema.js'; -import { normalizeLineEndings } from '../../utils/string-utils.js'; -import { extractTablesFromDescription } from './convention-extractor.js'; -/** - * Partition business rules by ADR-style name prefixes. - * - * Rules are categorized based on their name prefix: - * - "Context..." → context section - * - "Decision..." → decision section - * - "Consequence..." → consequences section - * - Others → other (optionally logged as warning) - * - * This is a shared helper used by both ADR and Decision Doc codecs. - * - * @param rules - Business rules from the extracted pattern - * @param options - Partitioning options - * @returns Partitioned rules by category - * - * @example - * ```typescript - * // ADR codec (warn about unmatched rules) - * const partitioned = partitionRulesByPrefix(pattern.rules, { - * warnOnOther: true, - * patternName: pattern.name - * }); - * - * // Decision doc codec (no warning) - * const partitioned = partitionRulesByPrefix(pattern.rules); - * ``` - */ -export function partitionRulesByPrefix(rules, options = {}) { - if (!rules || rules.length === 0) { - return { context: [], decision: [], consequences: [], other: [] }; - } - const { warnOnOther = false, patternName, onWarning = console.warn } = options; - const context = []; - const decision = []; - const consequences = []; - const other = []; - for (const rule of rules) { - const nameLower = rule.name.toLowerCase(); - if (nameLower.startsWith('context')) { - context.push(rule); - } - else if (nameLower.startsWith('decision')) { - decision.push(rule); - } - else if (nameLower.startsWith('consequence')) { - consequences.push(rule); - } - else { - other.push(rule); - } - } - // Optionally warn about rules that don't match expected ADR prefixes - if (warnOnOther && other.length > 0) { - const otherNames = other.map((r) => `"${r.name}"`).join(', '); - const patternContext = patternName ? ` in pattern "${patternName}"` : ''; - onWarning(`[codec] ${other.length} rule(s)${patternContext} not matching ADR prefixes (Context/Decision/Consequence): ${otherNames}. These rules will not be rendered in standard ADR sections.`); - } - return { context, decision, consequences, other }; -} -/** - * Default rich content options - * - * Note: onWarning and warningCollector are intentionally undefined by default. - * When undefined, warnings fall back to console.warn via emitWarning(). - */ -export const DEFAULT_RICH_CONTENT_OPTIONS = { - includeSteps: true, - includeDataTables: true, - includeDocStrings: true, - includeRules: true, - docStringLanguage: 'markdown', - baseHeadingLevel: 4, - onWarning: undefined, - warningCollector: undefined, -}; -/** - * Merge user options with defaults - */ -export function mergeRichContentOptions(options) { - if (!options) { - return DEFAULT_RICH_CONTENT_OPTIONS; - } - return { - ...DEFAULT_RICH_CONTENT_OPTIONS, - ...options, - }; -} -/** - * Format a warning for CI output (GitHub Actions compatible). - * - * @param warning - The warning to format - * @returns Formatted string for CI log parsing - */ -export function formatWarningForCI(warning) { - const parts = []; - if (warning.file) - parts.push(`file=${warning.file}`); - if (warning.line !== undefined) - parts.push(`line=${warning.line}`); - parts.push(`code=${warning.code}`); - const attributes = parts.join(','); - return `::warning ${attributes}::${warning.message}`; -} -/** - * Emit a warning using the configured handler, collector, or console.warn fallback. - * - * Priority order: - * 1. WarningCollector (if provided) - for structured aggregation - * 2. onWarning callback (if provided) - for custom handling - * 3. console.warn - default fallback - * - * @param warning - The warning to emit - * @param options - Options containing warning handlers - * @param source - Optional source file for collector context - * @internal - */ -function emitWarning(warning, options, source) { - // Priority 1: Use WarningCollector if available (structured aggregation) - if (options?.warningCollector) { - options.warningCollector.capture({ - source: source ?? 'rich-content-rendering', - category: 'format', - message: warning.message, - subcategory: warning.code, - }); - return; - } - // Priority 2: Use onWarning callback if available - if (options?.onWarning) { - options.onWarning(warning); - return; - } - // Priority 3: Fall back to console.warn with structured format - const contextSuffix = warning.context ? ` Context: ${warning.context}` : ''; - console.warn(`[${warning.code}] ${warning.message}${contextSuffix}`); -} -// ═══════════════════════════════════════════════════════════════════════════ -// Granular Helpers -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Render a Gherkin DataTable as a markdown table block - * - * @param dt - The DataTable to render - * @returns A table SectionBlock - * - * @example - * ```typescript - * const tableBlock = renderDataTable(step.dataTable); - * sections.push(tableBlock); - * ``` - */ -export function renderDataTable(dt) { - const rows = dt.rows.map((row) => { - return dt.headers.map((header) => row[header] ?? ''); - }); - return table(dt.headers, rows); -} -/** - * Render a DocString as a code block - * - * Accepts either a plain string (legacy format) or an object with content and optional mediaType. - * When mediaType is provided in the object, it takes precedence over the language parameter. - * - * @param docString - The DocString content (string or object with content/mediaType) - * @param language - Optional language hint fallback (default: "markdown") - * @returns A code SectionBlock - * - * @example - * ```typescript - * // With plain string (legacy) - * const codeBlock = renderDocString(step.docString, "json"); - * - * // With object containing mediaType - * const codeBlock = renderDocString({ content: "code", mediaType: "typescript" }); - * ``` - */ -export function renderDocString(docString, language = 'markdown') { - if (typeof docString === 'string') { - // Legacy string format - return code(docString, language); - } - // Object format with optional mediaType - return code(docString.content, docString.mediaType ?? language); -} -/** - * Render scenario steps as a list - * - * @param steps - The scenario steps - * @returns A list SectionBlock - * - * @example - * ```typescript - * const stepsList = renderStepsList(scenario.steps); - * sections.push(stepsList); - * ``` - */ -export function renderStepsList(steps) { - const stepItems = steps.map((step) => `${step.keyword} ${step.text}`); - return list(stepItems); -} -/** - * Default tab width for tab-to-space normalization in dedent. - */ -const DEFAULT_TAB_WIDTH = 2; -/** - * Normalize tabs to spaces for consistent indentation calculation. - * - * @param text - Text that may contain tabs - * @param tabWidth - Number of spaces per tab (default: 2) - * @returns Text with tabs replaced by spaces - */ -function normalizeTabs(text, tabWidth = DEFAULT_TAB_WIDTH) { - return text.replace(/\t/g, ' '.repeat(tabWidth)); -} -/** - * Remove common leading indentation from all lines in a code block. - * - * When DocStrings are embedded in Gherkin files, they often have consistent - * indentation to align with the surrounding scenario structure. This function - * normalizes that indentation by: - * 1. Normalizing tabs to spaces (default: 2 spaces per tab) - * 2. Finding the minimum indentation across all non-empty lines - * 3. Removing that common indentation from every line - * 4. Trimming trailing whitespace from each line - * - * @param text - The code block content to dedent - * @param tabWidth - Number of spaces per tab (default: 2) - * @returns The dedented text with normalized indentation - * - * @example - * ```typescript - * // Input (indented to match Gherkin formatting): - * dedent(" const x = 1;\n const y = 2;") - * // Returns: "const x = 1;\nconst y = 2;" - * - * // Mixed indentation (preserves relative indentation): - * dedent(" function foo() {\n return 42;\n }") - * // Returns: "function foo() {\n return 42;\n}" - * - * // Tab-indented code (tabs normalized to spaces): - * dedent("\t\tconst x = 1;") - * // Returns: "const x = 1;" - * ``` - */ -export function dedent(text, tabWidth = DEFAULT_TAB_WIDTH) { - // Normalize tabs to spaces before processing - const normalizedText = normalizeTabs(text, tabWidth); - const lines = normalizedText.split('\n'); - // Find minimum indentation (ignoring empty lines) - const nonEmptyLines = lines.filter((line) => line.trim().length > 0); - if (nonEmptyLines.length === 0) - return text; - const minIndent = Math.min(...nonEmptyLines.map((line) => { - const match = /^(\s*)/.exec(line); - // The regex always matches (even empty string), but TypeScript needs reassurance - return match?.[1]?.length ?? 0; - })); - // If no common indentation, just trim trailing whitespace - if (minIndent === 0) { - return lines.map((line) => line.trimEnd()).join('\n'); - } - // Remove common indentation and trailing whitespace from each line - return lines.map((line) => line.slice(minIndent).trimEnd()).join('\n'); -} -/** - * Parse description text for embedded DocStrings and convert to mixed content - * - * DocStrings in Gherkin are identified by: """language\n...\n""" - * Text between DocStrings renders as paragraphs, DocStrings render as code blocks. - * - * **Defensive handling:** - * - Normalizes Windows line endings (CRLF → LF) before parsing - * - Detects unclosed DocStrings (odd count of """) and returns plain paragraph fallback - * - Handles empty input gracefully - * - Dedents code block content to normalize indentation from Gherkin formatting - * - * @param description - The description text that may contain DocStrings - * @param options - Optional rendering options (used for warning callback) - * @returns Array of SectionBlocks (paragraphs and code blocks) - * - * @example - * ```typescript - * // Input with DocString: - * // "Some text\n\"\"\"typescript\nconst x = 1;\n\"\"\"\nMore text" - * // Output: [paragraph("Some text"), code("const x = 1;", "typescript"), paragraph("More text")] - * ``` - */ -export function parseDescriptionWithDocStrings(description, options) { - // Handle empty input - if (!description || description.trim().length === 0) { - return []; - } - // Normalize line endings (Windows CRLF → LF) - const normalized = normalizeLineEndings(description); - // Detect unclosed DocStrings (odd number of """) - // Important: Exclude """ that appears inside backticks (inline code examples) - // e.g., `"""typescript` should not be counted as a delimiter - const withoutInlineCode = normalized.replace(/`[^`]+`/g, ''); - const docStringDelimiters = withoutInlineCode.match(/"""/g); - if (docStringDelimiters && docStringDelimiters.length % 2 !== 0) { - // Unclosed DocString detected - return as plain paragraph to avoid corruption - // This is a defensive fallback; the content may not render as intended - emitWarning({ - code: 'unclosed-docstring', - message: 'Unclosed DocString detected (odd number of """ delimiters)', - context: `Found ${docStringDelimiters.length} delimiters in description`, - }, options); - return [paragraph(normalized.trim())]; - } - const sections = []; - // Match """language\ncontent\n""" pattern (language is optional) - const docStringPattern = /"""(\w*)\n([\s\S]*?)"""/g; - let lastIndex = 0; - let match; - while ((match = docStringPattern.exec(normalized)) !== null) { - // Text before this DocString - const textBefore = normalized.slice(lastIndex, match.index).trim(); - if (textBefore) { - sections.push(paragraph(textBefore)); - } - // The DocString as a code block (empty string means no language hint) - // Apply dedent to normalize indentation from Gherkin formatting - const language = (match[1] ?? '').length > 0 ? match[1] : 'text'; - const rawContent = (match[2] ?? '').trim(); - const content = dedent(rawContent); - sections.push(code(content, language)); - lastIndex = match.index + match[0].length; - } - // Text after last DocString (or entire text if no DocStrings) - const textAfter = normalized.slice(lastIndex).trim(); - if (textAfter) { - sections.push(paragraph(textAfter)); - } - return sections; -} -// ═══════════════════════════════════════════════════════════════════════════ -// Backtick Content Protection -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Protect backtick-quoted content from regex matching by replacing with placeholders. - * - * This is essential when parsing markdown-style content where `**bold**` patterns - * might appear inside inline code (e.g., `` `**Verified by:**` ``). Without protection, - * regexes that look for `**` boundaries will incorrectly match inside backticks. - * - * @param text - The text to process - * @returns Object with processed text and restore function - * - * @example - * ```typescript - * const { processed, restore } = protectBacktickContent("Text `**inside**` more"); - * // processed = "Text __BT0__ more" - * const result = "Extracted: __BT0__"; - * restore(result); // "Extracted: `**inside**`" - * ``` - */ -export function protectBacktickContent(text) { - const placeholders = []; - // Use unique prefix to reduce collision risk with real content - const processed = text.replace(/`[^`]+`/g, (match) => { - placeholders.push(match); - return `__LIBAR_BT_${placeholders.length - 1}__`; - }); - const restore = (s) => s.replace(/__LIBAR_BT_(\d+)__/g, (_, i) => placeholders[Number(i)] ?? ''); - return { processed, restore }; -} -// ═══════════════════════════════════════════════════════════════════════════ -// Text Utilities -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Truncate text to a maximum length, adding ellipsis if truncated. - * - * Attempts to truncate at word boundaries for cleaner output. - * If the text is already shorter than maxLength, returns it unchanged. - * - * @param text - The text to truncate - * @param maxLength - Maximum length (0 or negative = no limit) - * @returns Truncated text with "..." suffix if truncated - * - * @example - * ```typescript - * truncateText("This is a long description", 15); - * // Returns: "This is a..." - * - * truncateText("Short", 100); - * // Returns: "Short" - * ``` - */ -export function truncateText(text, maxLength) { - if (!text || maxLength <= 0 || text.length <= maxLength) { - return text || ''; - } - // Find the last space before maxLength to truncate at word boundary - const truncateAt = maxLength - 3; // Reserve space for "..." - const lastSpace = text.lastIndexOf(' ', truncateAt); - // If no space found, truncate at exact position - const cutPoint = lastSpace > 0 ? lastSpace : truncateAt; - return text.slice(0, cutPoint).trim() + '...'; -} -export { extractFirstSentenceRaw as extractFirstSentence } from '../../utils/string-utils.js'; -/** - * Parse structured annotations from a business rule description. - * - * Extracts: - * - `**Invariant:** ` - until next `**` annotation or end - * - `**Rationale:** ` - until next `**` annotation or end - * - `**Verified by:** ` - * - DocStrings ("""language\n...\n""") as code blocks - * - * The remaining content after extraction is returned in `remainingContent`. - * - * @param description - The rule description text to parse - * @returns Parsed annotations with structured fields - * - * @example - * ```typescript - * const annotations = parseBusinessRuleAnnotations(` - * **Invariant:** Only one reservation can exist for a given key. - * - * **Rationale:** Prevents TOCTOU race conditions. - * - * **Verified by:** Concurrent reservations, Expired cleanup - * `); - * // annotations.invariant === "Only one reservation can exist for a given key." - * // annotations.rationale === "Prevents TOCTOU race conditions." - * // annotations.verifiedBy === ["Concurrent reservations", "Expired cleanup"] - * ``` - */ -export function parseBusinessRuleAnnotations(description) { - if (!description || description.trim().length === 0) { - return {}; - } - // Normalize line endings - const normalized = normalizeLineEndings(description); - const result = {}; - const codeExamples = []; - // Step 1: Extract code fences FIRST (before annotation parsing) - // This prevents code fences from being captured inside annotations - // Extract Gherkin DocStrings (""" format) - const docStringPattern = /"""(\w*)\n([\s\S]*?)"""/g; - let docMatch; - while ((docMatch = docStringPattern.exec(normalized)) !== null) { - const language = (docMatch[1] ?? '').length > 0 ? docMatch[1] : 'text'; - const content = (docMatch[2] ?? '').trim(); - if (content) { - codeExamples.push(code(content, language)); - } - } - // Extract markdown code fences (``` format) - const markdownCodePattern = /```(\w*)\n([\s\S]*?)```/g; - let mdMatch; - while ((mdMatch = markdownCodePattern.exec(normalized)) !== null) { - const language = (mdMatch[1] ?? '').length > 0 ? mdMatch[1] : 'text'; - const content = (mdMatch[2] ?? '').trim(); - if (content) { - codeExamples.push(code(content, language)); - } - } - if (codeExamples.length > 0) { - result.codeExamples = codeExamples; - } - // Step 2: Remove code fences from text before parsing annotations - // This ensures annotations don't accidentally capture code fence content - let textWithoutCode = normalized; - textWithoutCode = textWithoutCode.replace(/"""(\w*)\n[\s\S]*?"""/g, ''); - textWithoutCode = textWithoutCode.replace(/```(\w*)\n[\s\S]*?```/g, ''); - // Step 2a: Remove table lines (| ... |) from text before parsing annotations. - // Tables are extracted separately by extractTablesFromDescription() upstream. - // Without this, annotation regexes over-capture table content and whitespace - // normalization collapses tables into single-line text inside invariant/rationale. - // Note: stripMarkdownTables() also strips these downstream in remainingContent; - // the early strip here prevents annotation regex over-capture before that point. - textWithoutCode = textWithoutCode - .split('\n') - .filter((line) => { - const trimmed = line.trim(); - return !(trimmed.startsWith('|') && trimmed.endsWith('|')); - }) - .join('\n'); - // Step 2b: Protect backtick-quoted content from regex matching - // This prevents `**Verified by:**` inside backticks from being treated as annotation boundary - // e.g., "Scenario names in `**Verified by:**` are matched" should not truncate at `**V` - const { processed: protectedText, restore } = protectBacktickContent(textWithoutCode); - // Step 3: Extract annotations from protected text - // Extract **Invariant:** - matches until next ** or end of string - const invariantPattern = /\*\*Invariant:\*\*\s*([\s\S]*?)(?=\*\*[A-Z]|\*\*$|$)/i; - const invariantMatch = invariantPattern.exec(protectedText); - if (invariantMatch?.[1]) { - const invariantText = invariantMatch[1].trim(); - // Clean up: remove trailing empty lines and normalize whitespace, then restore backticks - result.invariant = restore(invariantText - .replace(/\n\s*\n/g, ' ') - .replace(/\s+/g, ' ') - .trim()); - } - // Extract **Rationale:** - matches until next ** or end of string - const rationalePattern = /\*\*Rationale:\*\*\s*([\s\S]*?)(?=\*\*[A-Z]|\*\*$|$)/i; - const rationaleMatch = rationalePattern.exec(protectedText); - if (rationaleMatch?.[1]) { - const rationaleText = rationaleMatch[1].trim(); - result.rationale = restore(rationaleText - .replace(/\n\s*\n/g, ' ') - .replace(/\s+/g, ' ') - .trim()); - } - // Extract **Verified by:** - parse as comma-separated list - const verifiedByPattern = /\*\*Verified by:\*\*\s*([\s\S]*?)(?=\*\*[A-Z]|\*\*$|$)/i; - const verifiedByMatch = verifiedByPattern.exec(protectedText); - if (verifiedByMatch?.[1]) { - const verifiedByText = verifiedByMatch[1].trim(); - // Split by comma and clean up each entry (restore backticks in each item) - result.verifiedBy = verifiedByText - .split(',') - .map((s) => restore(s.trim())) - .filter((s) => s.length > 0); - } - // Extract **API:** See `path` references (can appear multiple times) - // Note: This pattern looks for content INSIDE backticks, so we use the original - // textWithoutCode which still has backticks intact (only code fences removed) - // Pattern is case-insensitive and allows optional bold markers: - // - "**API:** See `path`" (standard bold) - // - "API: See `path`" (plain text) - // - "api: see `path`" (lowercase) - const apiRefPattern = /(?:\*\*)?API:(?:\*\*)?\s*See\s*`([^`]+)`/gi; - const apiRefs = []; - let apiMatch; - while ((apiMatch = apiRefPattern.exec(textWithoutCode)) !== null) { - const path = apiMatch[1]?.trim(); - if (path && path.length > 0) { - apiRefs.push(path); - } - } - if (apiRefs.length > 0) { - result.apiRefs = apiRefs; - } - // Step 4: Calculate remaining content (after removing annotations from protected text) - // Use protectedText to ensure regexes don't stop at `**X` inside backticks - let remaining = protectedText; - // Remove **Invariant:** block - remaining = remaining.replace(/\*\*Invariant:\*\*\s*[\s\S]*?(?=\*\*[A-Z]|\*\*$|$)/i, ''); - // Remove **Rationale:** block - remaining = remaining.replace(/\*\*Rationale:\*\*\s*[\s\S]*?(?=\*\*[A-Z]|\*\*$|$)/i, ''); - // Remove **Verified by:** block - remaining = remaining.replace(/\*\*Verified by:\*\*\s*[\s\S]*?(?=\*\*[A-Z]|\*\*$|$)/i, ''); - // Remove **API:** See `path` references (use original pattern for protected text) - // Pattern matches both bold and non-bold, case-insensitive - remaining = remaining.replace(/(?:\*\*)?API:(?:\*\*)?\s*See\s*__LIBAR_BT_\d+__/gi, ''); - // Clean up remaining content and restore backticks - remaining = restore(remaining.trim()); - // Strip markdown tables from remaining content (tables are extracted separately - // by extractTables() in business-rules.ts to avoid duplicate rendering) - remaining = stripMarkdownTables(remaining); - if (remaining.length > 0) { - result.remainingContent = remaining; - } - return result; -} -/** - * Strip markdown tables from text content. - * - * Tables are identified by lines starting and ending with | character. - * This removes header rows, separator rows, and data rows to prevent - * duplicate rendering when tables are extracted separately. - * - * @param text - Text that may contain markdown tables - * @returns Text with tables removed and excess newlines cleaned up - * - * @example - * ```typescript - * const text = "Intro\n| Col | Col |\n| --- | --- |\n| A | B |\nOutro"; - * stripMarkdownTables(text); // "Intro\n\nOutro" - * ``` - */ -export function stripMarkdownTables(text) { - if (!text) - return text; - return text - .split('\n') - .filter((line) => { - const trimmed = line.trim(); - // Skip lines that are markdown table rows (start and end with |) - return !(trimmed.startsWith('|') && trimmed.endsWith('|')); - }) - .join('\n') - .replace(/\n{3,}/g, '\n\n') // Clean up excess newlines - .trim(); -} -/** - * Render a single business rule with its description and verification info - * - * Parses the description for embedded DocStrings and renders them as code blocks. - * - * @param rule - The business rule to render - * @returns Array of SectionBlocks for the rule - * - * @example - * ```typescript - * sections.push(...renderBusinessRule(rule)); - * ``` - */ -export function renderBusinessRule(rule) { - const sections = []; - sections.push(paragraph(`**${rule.name}**`)); - if (rule.description) { - // Parse DocStrings in description instead of plain paragraph - sections.push(...parseDescriptionWithDocStrings(rule.description)); - } - if (rule.scenarioNames.length > 0) { - sections.push(paragraph(`_Verified by: ${rule.scenarioNames.join(', ')}_`)); - } - return sections; -} -/** - * Render a rule description using structured annotation parsing. - * - * Extracts `**Invariant:**`, `**Rationale:**`, `**Verified by:**`, tables, and - * code examples for polished output with proper table formatting and separator rows. - * - * IMPORTANT: Table lines are stripped BEFORE annotation regexes so that bold markers - * inside table cells (e.g. `| **Context:** ... |`) don't act as false annotation - * boundaries that truncate the lazy `[\s\S]*?` capture. - * - * @param description - Raw rule description text from Gherkin Rule: block - * @returns Array of SectionBlocks with structured content - */ -export function renderRuleDescription(description) { - const blocks = []; - const annotations = parseBusinessRuleAnnotations(description); - // 1. Render structured annotations first (extracted cleanly) - if (annotations.invariant) { - blocks.push(paragraph(`**Invariant:** ${annotations.invariant}`)); - } - if (annotations.rationale) { - blocks.push(paragraph(`**Rationale:** ${annotations.rationale}`)); - } - // 2. Extract tables and render with proper markdown formatting (separator rows) - const tables = extractTablesFromDescription(description); - for (const tbl of tables) { - const rows = tbl.rows.map((row) => tbl.headers.map((h) => row[h] ?? '')); - blocks.push(table([...tbl.headers], rows)); - } - // 3. Render remaining content with interleaved DocStrings preserved. - // Strip table lines FIRST (before annotation regexes) so that bold markers - // inside table cells (e.g. `| **Context:** ... |`) don't act as false - // annotation boundaries that truncate the lazy `[\s\S]*?` capture. - // Then strip known annotations and pass through parseDescriptionWithDocStrings - // which preserves text → code → text → code ordering. - let stripped = description - .split('\n') - .filter((line) => { - const trimmed = line.trim(); - return !(trimmed.startsWith('|') && trimmed.endsWith('|')); - }) - .join('\n'); - stripped = stripped.replace(/\*\*Invariant:\*\*\s*[\s\S]*?(?=\*\*[A-Z]|\*\*$|$)/i, ''); - stripped = stripped.replace(/\*\*Rationale:\*\*\s*[\s\S]*?(?=\*\*[A-Z]|\*\*$|$)/i, ''); - stripped = stripped.replace(/\*\*Verified by:\*\*\s*[\s\S]*?(?=\*\*[A-Z]|\*\*$|$)/i, ''); - const strippedTrimmed = stripped.trim(); - if (strippedTrimmed.length > 0) { - blocks.push(...parseDescriptionWithDocStrings(strippedTrimmed)); - } - // 4. Render verified-by list last - if (annotations.verifiedBy && annotations.verifiedBy.length > 0) { - blocks.push(paragraph('**Verified by:**')); - blocks.push(list([...annotations.verifiedBy])); - } - return blocks; -} -// ═══════════════════════════════════════════════════════════════════════════ -// Composite Helpers -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Render a scenario's content including steps, DataTables, and DocStrings - * - * @param scenario - The scenario to render - * @param options - Rendering options - * @returns Array of SectionBlocks for the scenario - * - * @example - * ```typescript - * for (const scenario of pattern.scenarios) { - * sections.push(...renderScenarioContent(scenario)); - * } - * ``` - */ -export function renderScenarioContent(scenario, options) { - const opts = mergeRichContentOptions(options); - const sections = []; - // Scenario name as bold paragraph - sections.push(paragraph(`**${scenario.scenarioName}**`)); - // Render steps if available and enabled - if (opts.includeSteps && scenario.steps && scenario.steps.length > 0) { - sections.push(renderStepsList(scenario.steps)); - // Render DataTables and DocStrings after the step list - for (const step of scenario.steps) { - if (opts.includeDataTables && step.dataTable && step.dataTable.headers.length > 0) { - sections.push(renderDataTable(step.dataTable)); - } - if (opts.includeDocStrings && step.docString) { - sections.push(renderDocString(step.docString, opts.docStringLanguage)); - } - } - } - return sections; -} -/** - * Render acceptance criteria from a list of scenarios - * - * Includes a "Acceptance Criteria" heading followed by all scenarios - * with their steps, DataTables, and DocStrings. - * - * @param scenarios - The scenarios to render as acceptance criteria - * @param options - Rendering options (including baseHeadingLevel for proper hierarchy) - * @returns Array of SectionBlocks, empty if no scenarios - * - * @example - * ```typescript - * if (pattern.scenarios && pattern.scenarios.length > 0) { - * // Default H4 heading (backward compatible) - * sections.push(...renderAcceptanceCriteria(pattern.scenarios)); - * - * // H2 heading for top-level section in detail documents - * sections.push(...renderAcceptanceCriteria(pattern.scenarios, { baseHeadingLevel: 2 })); - * } - * ``` - */ -export function renderAcceptanceCriteria(scenarios, options) { - if (!scenarios || scenarios.length === 0) { - return []; - } - const opts = mergeRichContentOptions(options); - const sections = []; - sections.push(heading(opts.baseHeadingLevel, 'Acceptance Criteria')); - for (const scenario of scenarios) { - sections.push(...renderScenarioContent(scenario, options)); - } - return sections; -} -/** - * Render a business rules section from a list of rules - * - * Includes a "Business Rules" heading followed by all rules - * with their descriptions and verification info. - * - * @param rules - The business rules to render - * @param options - Rendering options (including baseHeadingLevel for proper hierarchy) - * @returns Array of SectionBlocks, empty if no rules - * - * @example - * ```typescript - * if (pattern.rules && pattern.rules.length > 0) { - * // Default H4 heading (backward compatible) - * sections.push(...renderBusinessRulesSection(pattern.rules)); - * - * // H2 heading for top-level section in detail documents - * sections.push(...renderBusinessRulesSection(pattern.rules, { baseHeadingLevel: 2 })); - * } - * ``` - */ -export function renderBusinessRulesSection(rules, options) { - if (!rules || rules.length === 0) { - return []; - } - const opts = mergeRichContentOptions(options); - const sections = []; - sections.push(heading(opts.baseHeadingLevel, 'Business Rules')); - for (const rule of rules) { - sections.push(...renderBusinessRule(rule)); - } - return sections; -} -/** - * Render all rich content for a pattern (scenarios + rules) - * - * Convenience function that combines acceptance criteria and business rules. - * - * @param pattern - Object with optional scenarios and rules arrays - * @param options - Rendering options - * @returns Array of SectionBlocks - * - * @example - * ```typescript - * sections.push(...renderPatternRichContent(pattern)); - * ``` - */ -export function renderPatternRichContent(pattern, options) { - const opts = mergeRichContentOptions(options); - const sections = []; - // Add acceptance criteria from scenarios - if (pattern.scenarios && pattern.scenarios.length > 0) { - sections.push(...renderAcceptanceCriteria(pattern.scenarios, opts)); - } - // Add business rules - if (opts.includeRules && pattern.rules && pattern.rules.length > 0) { - sections.push(...renderBusinessRulesSection(pattern.rules, opts)); - } - return sections; -} -/** - * Render extracted TypeScript shapes as markdown code blocks. - * - * @param shapes - Shapes to render - * @param options - Rendering options - * @returns Markdown string with fenced code blocks - */ -export function renderShapesAsMarkdown(shapes, options = {}) { - const { groupInSingleBlock = true, includeJsDoc = true } = options; - if (shapes.length === 0) { - return ''; - } - const renderShape = (shape) => { - const parts = []; - if (includeJsDoc && shape.jsDoc) { - parts.push(shape.jsDoc); - } - parts.push(shape.sourceText); - return parts.join('\n'); - }; - if (groupInSingleBlock) { - const content = shapes.map(renderShape).join('\n\n'); - return '```typescript\n' + content + '\n```'; - } - return shapes.map((shape) => '```typescript\n' + renderShape(shape) + '\n```').join('\n\n'); -} -/** - * Render property documentation as a markdown table. - * - * Generates a two-column table with property names and their JSDoc descriptions. - * Returns empty string if no property docs exist. - * - * @param propertyDocs - Property documentation array from ExtractedShape - * @returns Markdown table string, or empty string if no docs - * - * @example - * ```typescript - * const table = renderPropertyDocsTable(shape.propertyDocs); - * if (table) { - * sections.push(md(table)); - * } - * ``` - */ -export function renderPropertyDocsTable(propertyDocs) { - if (!propertyDocs || propertyDocs.length === 0) { - return ''; - } - const lines = ['| Property | Description |', '| --- | --- |']; - for (const prop of propertyDocs) { - // Escape pipe characters in description to prevent table breakage - const escapedDesc = prop.jsDoc.replace(/\|/g, '\\|'); - lines.push(`| \`${prop.name}\` | ${escapedDesc} |`); - } - return lines.join('\n'); -} -//# sourceMappingURL=helpers.js.map \ No newline at end of file diff --git a/dist/renderable/codecs/helpers.js.map b/dist/renderable/codecs/helpers.js.map deleted file mode 100644 index 903b14d3..00000000 --- a/dist/renderable/codecs/helpers.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../src/renderable/codecs/helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AASH,OAAO,EAAqB,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACxF,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AA2CzE;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,UAAU,sBAAsB,CACpC,KAA0C,EAC1C,UAAiC,EAAE;IAEnC,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACjC,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,YAAY,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;IACpE,CAAC;IAED,MAAM,EAAE,WAAW,GAAG,KAAK,EAAE,WAAW,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,EAAE,GAAG,O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AED,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,iBAAiB,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAC9F,CAAC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,uBAAuB,CAAC,YAAgD;IACtF,IAAI,CAAC,YAAY,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC/C,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,KAAK,GAAa,CAAC,4BAA4B,EAAE,eAAe,CAAC,CAAC;IAExE,KAAK,MAAM,IAAI,IAAI,YAAY,EAAE,CAAC;QAChC,kEAAkE;QAClE,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QACrD,KAAK,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,QAAQ,WAAW,IAAI,CAAC,CAAC;IACtD,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"} \ No newline at end of file diff --git a/dist/renderable/codecs/index.d.ts b/dist/renderable/codecs/index.d.ts deleted file mode 100644 index 642ebbb2..00000000 --- a/dist/renderable/codecs/index.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern DocumentCodecs - * @libar-docs-status completed - * - * ## Document Codecs - * - * Barrel export for all document codecs. - * Each codec transforms MasterDataset → RenderableDocument. - * - * ### When to Use - * - * - When importing codecs for document generation - * - When accessing codec factory functions with custom options - * - When using shared helpers for rich content rendering - * - * ### Factory Pattern - * - * Each codec exports both: - * - Default codec with standard options: `PatternsDocumentCodec` - * - Factory function for custom options: `createPatternsCodec(options)` - */ -export * from './types/index.js'; -export { RenderableDocumentOutputSchema } from './shared-schema.js'; -export { renderDataTable, renderDocString, renderStepsList, renderBusinessRule, renderScenarioContent, renderAcceptanceCriteria, renderBusinessRulesSection, renderPatternRichContent, parseDescriptionWithDocStrings, parseBusinessRuleAnnotations, type RichContentOptions, type BusinessRule, type BusinessRuleAnnotations, DEFAULT_RICH_CONTENT_OPTIONS, mergeRichContentOptions, } from './helpers.js'; -export { PatternsDocumentCodec, createPatternsCodec, type PatternsCodecOptions, DEFAULT_PATTERNS_OPTIONS, } from './patterns.js'; -export { RoadmapDocumentCodec, CompletedMilestonesCodec, CurrentWorkCodec, createRoadmapCodec, createMilestonesCodec, createCurrentWorkCodec, type RoadmapCodecOptions, type CompletedMilestonesCodecOptions, type CurrentWorkCodecOptions, DEFAULT_ROADMAP_OPTIONS, DEFAULT_MILESTONES_OPTIONS, DEFAULT_CURRENT_WORK_OPTIONS, } from './timeline.js'; -export { RequirementsDocumentCodec, createRequirementsCodec, type RequirementsCodecOptions, DEFAULT_REQUIREMENTS_OPTIONS, } from './requirements.js'; -export { SessionContextCodec, RemainingWorkCodec, createSessionContextCodec, createRemainingWorkCodec, type SessionCodecOptions, type RemainingWorkCodecOptions, DEFAULT_SESSION_OPTIONS, DEFAULT_REMAINING_WORK_OPTIONS, } from './session.js'; -export { PrChangesCodec, createPrChangesCodec, type PrChangesCodecOptions, DEFAULT_PR_CHANGES_OPTIONS, } from './pr-changes.js'; -export { AdrDocumentCodec, createAdrCodec, type AdrCodecOptions, DEFAULT_ADR_OPTIONS, } from './adr.js'; -export { PlanningChecklistCodec, SessionPlanCodec, SessionFindingsCodec, createPlanningChecklistCodec, createSessionPlanCodec, createSessionFindingsCodec, type PlanningChecklistCodecOptions, type SessionPlanCodecOptions, type SessionFindingsCodecOptions, DEFAULT_PLANNING_CHECKLIST_OPTIONS, DEFAULT_SESSION_PLAN_OPTIONS, DEFAULT_SESSION_FINDINGS_OPTIONS, } from './planning.js'; -export { ChangelogCodec, TraceabilityCodec, OverviewCodec, createChangelogCodec, createTraceabilityCodec, createOverviewCodec, type ChangelogCodecOptions, type TraceabilityCodecOptions, type OverviewCodecOptions, DEFAULT_CHANGELOG_OPTIONS, DEFAULT_TRACEABILITY_OPTIONS, DEFAULT_OVERVIEW_OPTIONS, } from './reporting.js'; -export { BusinessRulesCodec, createBusinessRulesCodec, type BusinessRulesCodecOptions, DEFAULT_BUSINESS_RULES_OPTIONS, } from './business-rules.js'; -export { ArchitectureDocumentCodec, createArchitectureCodec, type ArchitectureCodecOptions, type ArchitectureDiagramType, DEFAULT_ARCHITECTURE_OPTIONS, } from './architecture.js'; -export { type SourceMappingEntry, type PartitionedDecisionRules, type ExtractedDocString, type DecisionDocContent, SELF_REFERENCE_MARKER, SELF_REFERENCE_RULE_PATTERN, SELF_REFERENCE_DOCSTRING_PATTERN, EXTRACTION_METHODS, partitionDecisionRules, extractDocStrings, extractDocStringsFromRules, parseSourceMappingTable, parseSourceMappingsFromRules, isSelfReference, parseSelfReference, findRuleByName, extractRuleContent, parseDecisionDocument, normalizeExtractionMethod, docStringsToCodeBlocks, } from './decision-doc.js'; -export { TaxonomyDocumentCodec, createTaxonomyCodec, type TaxonomyCodecOptions, DEFAULT_TAXONOMY_OPTIONS, } from './taxonomy.js'; -export { ValidationRulesCodec, createValidationRulesCodec, type ValidationRulesCodecOptions, DEFAULT_VALIDATION_RULES_OPTIONS, } from './validation-rules.js'; -export { extractConventions, type ConventionBundle, type ConventionRuleContent, type ConventionTable, } from './convention-extractor.js'; -export { createReferenceCodec, type ReferenceDocConfig, type ReferenceCodecOptions, } from './reference.js'; -export { type ShapeSelector } from './shape-matcher.js'; -export { createCompositeCodec, composeDocuments, type CompositeCodecOptions, type ComposeOptions, } from './composite.js'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/dist/renderable/codecs/index.d.ts.map b/dist/renderable/codecs/index.d.ts.map deleted file mode 100644 index 9ea59b6e..00000000 --- a/dist/renderable/codecs/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src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AO,EACL,kBAAkB,EAClB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,eAAe,GACrB,MAAM,2BAA2B,CAAC;AAGnC,OAAO,EACL,oBAAoB,EACpB,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,GAC3B,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGxD,OAAO,EACL,oBAAoB,EACpB,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,KAAK,cAAc,GACpB,MAAM,gBAAgB,CAAC"} \ No newline at end of file diff --git a/dist/renderable/codecs/index.js b/dist/renderable/codecs/index.js deleted file mode 100644 index fa99dfd1..00000000 --- a/dist/renderable/codecs/index.js +++ /dev/null @@ -1,66 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern DocumentCodecs - * @libar-docs-status completed - * - * ## Document Codecs - * - * Barrel export for all document codecs. - * Each codec transforms MasterDataset → RenderableDocument. - * - * ### When to Use - * - * - When importing codecs for document generation - * - When accessing codec factory functions with custom options - * - When using shared helpers for rich content rendering - * - * ### Factory Pattern - * - * Each codec exports both: - * - Default codec with standard options: `PatternsDocumentCodec` - * - Factory function for custom options: `createPatternsCodec(options)` - */ -// Base Types (shared by all codecs) -export * from './types/index.js'; -// Shared Schema (for codec output validation) -export { RenderableDocumentOutputSchema } from './shared-schema.js'; -// Rich Content Helpers -export { renderDataTable, renderDocString, renderStepsList, renderBusinessRule, renderScenarioContent, renderAcceptanceCriteria, renderBusinessRulesSection, renderPatternRichContent, parseDescriptionWithDocStrings, parseBusinessRuleAnnotations, DEFAULT_RICH_CONTENT_OPTIONS, mergeRichContentOptions, } from './helpers.js'; -// Patterns (includes PatternsCodecOptions) -export { PatternsDocumentCodec, createPatternsCodec, DEFAULT_PATTERNS_OPTIONS, } from './patterns.js'; -// Timeline (includes Roadmap, Milestones, CurrentWork options) -export { RoadmapDocumentCodec, CompletedMilestonesCodec, CurrentWorkCodec, createRoadmapCodec, createMilestonesCodec, createCurrentWorkCodec, DEFAULT_ROADMAP_OPTIONS, DEFAULT_MILESTONES_OPTIONS, DEFAULT_CURRENT_WORK_OPTIONS, } from './timeline.js'; -// Requirements (includes RequirementsCodecOptions) -export { RequirementsDocumentCodec, createRequirementsCodec, DEFAULT_REQUIREMENTS_OPTIONS, } from './requirements.js'; -// Session (includes Session and RemainingWork options) -export { SessionContextCodec, RemainingWorkCodec, createSessionContextCodec, createRemainingWorkCodec, DEFAULT_SESSION_OPTIONS, DEFAULT_REMAINING_WORK_OPTIONS, } from './session.js'; -// PR Changes (includes PrChangesCodecOptions) -export { PrChangesCodec, createPrChangesCodec, DEFAULT_PR_CHANGES_OPTIONS, } from './pr-changes.js'; -// ADR (Architecture Decision Records) (includes AdrCodecOptions) -export { AdrDocumentCodec, createAdrCodec, DEFAULT_ADR_OPTIONS, } from './adr.js'; -// Planning (Checklist, Session Plan, Session Findings) (includes planning options) -export { PlanningChecklistCodec, SessionPlanCodec, SessionFindingsCodec, createPlanningChecklistCodec, createSessionPlanCodec, createSessionFindingsCodec, DEFAULT_PLANNING_CHECKLIST_OPTIONS, DEFAULT_SESSION_PLAN_OPTIONS, DEFAULT_SESSION_FINDINGS_OPTIONS, } from './planning.js'; -// Reporting (Changelog, Traceability, Overview) (includes reporting options) -export { ChangelogCodec, TraceabilityCodec, OverviewCodec, createChangelogCodec, createTraceabilityCodec, createOverviewCodec, DEFAULT_CHANGELOG_OPTIONS, DEFAULT_TRACEABILITY_OPTIONS, DEFAULT_OVERVIEW_OPTIONS, } from './reporting.js'; -// Business Rules (includes BusinessRulesCodecOptions) -export { BusinessRulesCodec, createBusinessRulesCodec, DEFAULT_BUSINESS_RULES_OPTIONS, } from './business-rules.js'; -// Architecture (includes ArchitectureCodecOptions) -export { ArchitectureDocumentCodec, createArchitectureCodec, DEFAULT_ARCHITECTURE_OPTIONS, } from './architecture.js'; -// Decision Doc (for documentation generation from ADR/PDR) -export { -// Constants -SELF_REFERENCE_MARKER, SELF_REFERENCE_RULE_PATTERN, SELF_REFERENCE_DOCSTRING_PATTERN, EXTRACTION_METHODS, -// Functions -partitionDecisionRules, extractDocStrings, extractDocStringsFromRules, parseSourceMappingTable, parseSourceMappingsFromRules, isSelfReference, parseSelfReference, findRuleByName, extractRuleContent, parseDecisionDocument, normalizeExtractionMethod, docStringsToCodeBlocks, } from './decision-doc.js'; -// Taxonomy (includes TaxonomyCodecOptions) -export { TaxonomyDocumentCodec, createTaxonomyCodec, DEFAULT_TAXONOMY_OPTIONS, } from './taxonomy.js'; -// Validation Rules (includes ValidationRulesCodecOptions) -export { ValidationRulesCodec, createValidationRulesCodec, DEFAULT_VALIDATION_RULES_OPTIONS, } from './validation-rules.js'; -// Convention Extractor -export { extractConventions, } from './convention-extractor.js'; -// Reference Document Codec (parameterized factory) -export { createReferenceCodec, } from './reference.js'; -// Composite (multi-codec assembly) -export { createCompositeCodec, composeDocuments, } from './composite.js'; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/renderable/codecs/index.js.map b/dist/renderable/codecs/index.js.map deleted file mode 100644 index 234cfa6b..00000000 --- a/dist/renderable/codecs/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/renderable/codecs/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,oCAAoC;AACpC,cAAc,kBAAkB,CAAC;AAEjC,8CAA8C;AAC9C,OAAO,EAAE,8BAA8B,EAAE,MAAM,oBAAoB,CAAC;AAEpE,uBAAuB;AACvB,OAAO,EACL,eAAe,EACf,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,qBAAqB,EACrB,wBAAwB,EACxB,0BAA0B,EAC1B,wBAAwB,EACxB,8BAA8B,EAC9B,4BAA4B,EAI5B,4BAA4B,EAC5B,uBAAuB,GACxB,MAAM,cAAc,CAAC;AAEtB,2CAA2C;AAC3C,OAAO,EACL,qBAA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DAA2D;AAC3D,OAAO;AAML,YAAY;AACZ,qBAAqB,EACrB,2BAA2B,EAC3B,gCAAgC,EAChC,kBAAkB;AAClB,YAAY;AACZ,sBAAsB,EACtB,iBAAiB,EACjB,0BAA0B,EAC1B,uBAAuB,EACvB,4BAA4B,EAC5B,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,qBAAqB,EACrB,yBAAyB,EACzB,sBAAsB,GACvB,MAAM,mBAAmB,CAAC;AAE3B,2CAA2C;AAC3C,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EAEnB,wBAAwB,GACzB,MAAM,eAAe,CAAC;AAEvB,0DAA0D;AAC1D,OAAO,EACL,oBAAoB,EACpB,0BAA0B,EAE1B,gCAAgC,GACjC,MAAM,uBAAuB,CAAC;AAE/B,uBAAuB;AACvB,OAAO,EACL,kBAAkB,GAInB,MAAM,2BAA2B,CAAC;AAEnC,mDAAmD;AACnD,OAAO,EACL,oBAAoB,GAGrB,MAAM,gBAAgB,CAAC;AAIxB,mCAAmC;AACnC,OAAO,EACL,oBAAoB,EACpB,gBAAgB,GAGjB,MAAM,gBAAgB,CAAC"} \ No newline at end of file diff --git a/dist/renderable/codecs/patterns.d.ts b/dist/renderable/codecs/patterns.d.ts deleted file mode 100644 index c76a89f9..00000000 --- a/dist/renderable/codecs/patterns.d.ts +++ /dev/null @@ -1,4061 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern PatternsCodec - * @libar-docs-status completed - * @libar-docs-arch-role projection - * @libar-docs-arch-context renderer - * @libar-docs-arch-layer application - * @libar-docs-include codec-transformation,pipeline-stages - * @libar-docs-implements PatternRelationshipModel - * - * ## Patterns Document Codec - * - * Transforms MasterDataset into a RenderableDocument for pattern registry output. - * Generates PATTERNS.md and category detail files (patterns/*.md). - * - * ### When to Use - * - * - When generating the pattern registry documentation (PATTERNS.md) - * - When creating category-specific pattern detail files - * - When building pattern overview reports with status tracking - * - * ### Factory Pattern - * - * Use `createPatternsCodec(options)` to create a configured codec: - * ```typescript - * const codec = createPatternsCodec({ generateDetailFiles: false }); - * const doc = codec.decode(dataset); - * ``` - * - * Or use the default export for standard behavior: - * ```typescript - * const doc = PatternsDocumentCodec.decode(dataset); - * ``` - */ -import { z } from 'zod'; -import { MasterDatasetSchema } from '../../validation-schemas/master-dataset.js'; -import { type BaseCodecOptions } from './types/base.js'; -/** - * Normalize implementation file path by stripping repository prefixes. - * - * When extraction uses a parent directory as baseDir, paths may include - * the repo directory name (e.g., "libar-platform/packages/..."). This - * function strips those prefixes to generate correct relative links. - * - * @param filePath - The implementation file path (may include repo prefix) - * @returns Path with repo prefix stripped if present - * - * @example - * ```typescript - * normalizeImplPath("libar-platform/packages/core/src/handler.ts") - * // Returns: "packages/core/src/handler.ts" - * - * normalizeImplPath("packages/core/src/handler.ts") - * // Returns: "packages/core/src/handler.ts" (unchanged) - * ``` - */ -export declare function normalizeImplPath(filePath: string): string; -/** - * Options for PatternsDocumentCodec - */ -export interface PatternsCodecOptions extends BaseCodecOptions { - /** Include dependency graph visualization (default: true) */ - includeDependencyGraph?: boolean; - /** Include use cases section (default: true) */ - includeUseCases?: boolean; - /** Filter by categories (default: all categories) */ - filterCategories?: string[]; -} -/** - * Default options for PatternsDocumentCodec - */ -export declare const DEFAULT_PATTERNS_OPTIONS: Required; -import { RenderableDocumentOutputSchema } from './shared-schema.js'; -/** - * Create a PatternsDocumentCodec with custom options. - * - * @param options - Codec configuration options - * @returns Configured Zod codec - * - * @example - * ```typescript - * // Disable detail files for summary output - * const codec = createPatternsCodec({ generateDetailFiles: false }); - * - * // Filter to specific categories - * const codec = createPatternsCodec({ filterCategories: ["core", "generator"] }); - * ``` - */ -export declare function createPatternsCodec(options?: PatternsCodecOptions): z.ZodCodec; -/** - * Default Patterns Document Codec - * - * Transforms MasterDataset → RenderableDocument for pattern registry. - * Uses default options with all features enabled. - * - * @example - * ```typescript - * const doc = PatternsDocumentCodec.decode(masterDataset); - * const markdown = renderToMarkdown(doc); - * ``` - */ -export declare const PatternsDocumentCodec: z.ZodCodec>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - tagRegistry: z.ZodObject<{ - $schema: z.ZodOptional; - version: z.ZodDefault; - categories: z.ZodArray>>; - }, z.core.$strict>>; - metadataTags: z.ZodArray; - purpose: z.ZodString; - required: z.ZodDefault>; - repeatable: z.ZodDefault>; - values: z.ZodOptional>; - default: z.ZodOptional; - example: z.ZodOptional; - metadataKey: z.ZodOptional; - transform: z.ZodOptional>; - }, z.core.$strict>>; - aggregationTags: z.ZodArray; - purpose: z.ZodString; - }, z.core.$strict>>; - formatOptions: z.ZodDefault>; - tagPrefix: z.ZodDefault; - fileOptInTag: z.ZodDefault; - }, z.core.$strict>; - byStatus: z.ZodObject<{ - completed: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - active: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - planned: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>; - byPhase: z.ZodArray; - patterns: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - counts: z.ZodObject<{ - completed: z.ZodNumber; - active: z.ZodNumber; - planned: z.ZodNumber; - total: z.ZodNumber; - }, z.core.$strip>; - }, z.core.$strip>>; - byQuarter: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byCategory: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - bySource: z.ZodObject<{ - typescript: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - gherkin: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - roadmap: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - prd: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>; - counts: z.ZodObject<{ - completed: z.ZodNumber; - active: z.ZodNumber; - planned: z.ZodNumber; - total: z.ZodNumber; - }, z.core.$strip>; - phaseCount: z.ZodNumber; - categoryCount: z.ZodNumber; - relationshipIndex: z.ZodOptional; - usedBy: z.ZodArray; - dependsOn: z.ZodArray; - enables: z.ZodArray; - implementsPatterns: z.ZodArray; - implementedBy: z.ZodArray; - }, z.core.$strip>>; - extendsPattern: z.ZodOptional; - extendedBy: z.ZodArray; - seeAlso: z.ZodArray; - apiRef: z.ZodArray; - }, z.core.$strip>>>; - archIndex: z.ZodOptional>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byContext: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byLayer: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byView: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - all: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>>; -}, z.core.$strip>, z.ZodObject<{ - title: z.ZodString; - purpose: z.ZodOptional; - detailLevel: z.ZodOptional; - sections: z.ZodArray; - additionalFiles: z.ZodOptional>; -}, z.core.$strip>>; -//# sourceMappingURL=patterns.d.ts.map \ No newline at end of file diff --git a/dist/renderable/codecs/patterns.d.ts.map b/dist/renderable/codecs/patterns.d.ts.map deleted file mode 100644 index 2fa21893..00000000 --- a/dist/renderable/codecs/patterns.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"patterns.d.ts","sourceRoot":"","sources":["../../../src/renderable/codecs/patterns.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAwB,CAAC"} \ No newline at end of file diff --git a/dist/renderable/codecs/patterns.js b/dist/renderable/codecs/patterns.js deleted file mode 100644 index 2a2e22f6..00000000 --- a/dist/renderable/codecs/patterns.js +++ /dev/null @@ -1,448 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern PatternsCodec - * @libar-docs-status completed - * @libar-docs-arch-role projection - * @libar-docs-arch-context renderer - * @libar-docs-arch-layer application - * @libar-docs-include codec-transformation,pipeline-stages - * @libar-docs-implements PatternRelationshipModel - * - * ## Patterns Document Codec - * - * Transforms MasterDataset into a RenderableDocument for pattern registry output. - * Generates PATTERNS.md and category detail files (patterns/*.md). - * - * ### When to Use - * - * - When generating the pattern registry documentation (PATTERNS.md) - * - When creating category-specific pattern detail files - * - When building pattern overview reports with status tracking - * - * ### Factory Pattern - * - * Use `createPatternsCodec(options)` to create a configured codec: - * ```typescript - * const codec = createPatternsCodec({ generateDetailFiles: false }); - * const doc = codec.decode(dataset); - * ``` - * - * Or use the default export for standard behavior: - * ```typescript - * const doc = PatternsDocumentCodec.decode(dataset); - * ``` - */ -import { z } from 'zod'; -import { MasterDatasetSchema, } from '../../validation-schemas/master-dataset.js'; -import { heading, paragraph, separator, table, list, mermaid, linkOut, document, } from '../schema.js'; -import { normalizeStatus } from '../../taxonomy/index.js'; -import { getStatusEmoji, getDisplayName, formatCategoryName, extractSummary, computeStatusCounts, completionPercentage, renderProgressBar, sortByStatusAndName, stripLeadingHeaders, } from '../utils.js'; -import { toKebabCase } from '../../utils/index.js'; -import { DEFAULT_BASE_OPTIONS, mergeOptions } from './types/base.js'; -import { getPatternName } from '../../api/pattern-helpers.js'; -// ═══════════════════════════════════════════════════════════════════════════ -// Path Normalization Helpers -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Known repository prefixes that should be stripped from implementation paths. - * These prefixes appear when the baseDir used for extraction is a parent - * directory of the actual repo root. - */ -const REPO_PREFIXES = ['libar-platform/', 'monorepo/']; -/** - * Normalize implementation file path by stripping repository prefixes. - * - * When extraction uses a parent directory as baseDir, paths may include - * the repo directory name (e.g., "libar-platform/packages/..."). This - * function strips those prefixes to generate correct relative links. - * - * @param filePath - The implementation file path (may include repo prefix) - * @returns Path with repo prefix stripped if present - * - * @example - * ```typescript - * normalizeImplPath("libar-platform/packages/core/src/handler.ts") - * // Returns: "packages/core/src/handler.ts" - * - * normalizeImplPath("packages/core/src/handler.ts") - * // Returns: "packages/core/src/handler.ts" (unchanged) - * ``` - */ -export function normalizeImplPath(filePath) { - for (const prefix of REPO_PREFIXES) { - if (filePath.startsWith(prefix)) { - return filePath.slice(prefix.length); - } - } - return filePath; -} -/** - * Default options for PatternsDocumentCodec - */ -export const DEFAULT_PATTERNS_OPTIONS = { - ...DEFAULT_BASE_OPTIONS, - includeDependencyGraph: true, - includeUseCases: true, - filterCategories: [], -}; -import { RenderableDocumentOutputSchema } from './shared-schema.js'; -import { renderAcceptanceCriteria, renderBusinessRulesSection } from './helpers.js'; -// ═══════════════════════════════════════════════════════════════════════════ -// Patterns Document Codec -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Create a PatternsDocumentCodec with custom options. - * - * @param options - Codec configuration options - * @returns Configured Zod codec - * - * @example - * ```typescript - * // Disable detail files for summary output - * const codec = createPatternsCodec({ generateDetailFiles: false }); - * - * // Filter to specific categories - * const codec = createPatternsCodec({ filterCategories: ["core", "generator"] }); - * ``` - */ -export function createPatternsCodec(options) { - const opts = mergeOptions(DEFAULT_PATTERNS_OPTIONS, options); - return z.codec(MasterDatasetSchema, RenderableDocumentOutputSchema, { - decode: (dataset) => { - return buildPatternsDocument(dataset, opts); - }, - /** @throws Always - this codec is decode-only. See zod-codecs.md */ - encode: () => { - throw new Error('PatternsDocumentCodec is decode-only. See zod-codecs.md'); - }, - }); -} -/** - * Default Patterns Document Codec - * - * Transforms MasterDataset → RenderableDocument for pattern registry. - * Uses default options with all features enabled. - * - * @example - * ```typescript - * const doc = PatternsDocumentCodec.decode(masterDataset); - * const markdown = renderToMarkdown(doc); - * ``` - */ -export const PatternsDocumentCodec = createPatternsCodec(); -// ═══════════════════════════════════════════════════════════════════════════ -// Document Builder -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Build the patterns document from dataset - */ -function buildPatternsDocument(dataset, options) { - const sections = []; - // Apply category filter if specified - const filteredDataset = applyPatternFilters(dataset, options); - // 1. Progress summary - sections.push(...buildProgressSummary(filteredDataset)); - // 2. Quick navigation (category links) - sections.push(...buildQuickNavigation(filteredDataset)); - // 3. Pattern table (all patterns) - sections.push(...buildPatternTable(filteredDataset)); - // 4. Category sections (inline summaries) - sections.push(...buildCategorySections(filteredDataset, options)); - // 5. Dependency graph (if relationships exist and enabled) - if (options.includeDependencyGraph && - filteredDataset.relationshipIndex && - Object.keys(filteredDataset.relationshipIndex).length > 0) { - sections.push(...buildDependencyGraph(filteredDataset)); - } - // Build additional files for individual patterns (if enabled) - const additionalFiles = options.generateDetailFiles - ? buildIndividualPatternFiles(filteredDataset) - : {}; - const docOpts = { - purpose: 'Quick reference for discovering and implementing patterns', - detailLevel: options.generateDetailFiles ? 'Overview with links to details' : 'Compact summary', - }; - if (Object.keys(additionalFiles).length > 0) { - docOpts.additionalFiles = additionalFiles; - } - return document('Pattern Registry', sections, docOpts); -} -/** - * Apply filters to dataset based on options. - * Always excludes ADR patterns (they belong to the ADR codec). - */ -function applyPatternFilters(dataset, options) { - // Always exclude ADR patterns — they belong to the ADR codec, not patterns - const nonAdrPatterns = dataset.patterns.filter((p) => p.adr === undefined); - // Apply category filter if specified - const filteredPatterns = options.filterCategories.length > 0 - ? nonAdrPatterns.filter((p) => options.filterCategories.includes(p.category)) - : nonAdrPatterns; - // Rebuild byCategory from filtered patterns - const filteredByCategory = {}; - for (const p of filteredPatterns) { - const existing = filteredByCategory[p.category]; - filteredByCategory[p.category] = existing ? [...existing, p] : [p]; - } - return { - ...dataset, - patterns: filteredPatterns, - byCategory: filteredByCategory, - categoryCount: Object.keys(filteredByCategory).length, - counts: computeStatusCounts(filteredPatterns), - }; -} -// ═══════════════════════════════════════════════════════════════════════════ -// Section Builders -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Build progress summary section - */ -function buildProgressSummary(dataset) { - const { counts } = dataset; - const progress = completionPercentage(counts); - const progressBar = renderProgressBar(counts.completed, counts.total, 20); - return [ - heading(2, 'Progress'), - paragraph(`**Overall:** ${progressBar} (${progress}% complete)`), - table(['Status', 'Count'], [ - ['✅ Completed', String(counts.completed)], - ['🚧 Active', String(counts.active)], - ['📋 Planned', String(counts.planned)], - ['**Total**', String(counts.total)], - ]), - separator(), - ]; -} -/** - * Build quick navigation section - * Links to category anchors within the main document (categories are H3 sections) - */ -function buildQuickNavigation(dataset) { - const categories = Object.keys(dataset.byCategory).sort(); - if (categories.length === 0) { - return []; - } - // Always link to anchors - categories are sections in the main file - // Individual patterns have their own files but categories serve as groupings - const items = categories.map((cat) => { - const count = dataset.byCategory[cat]?.length ?? 0; - const displayName = formatCategoryName(cat); - return `[${displayName}](#${cat}) (${count})`; - }); - return [heading(2, 'Categories'), list(items), separator()]; -} -/** - * Build pattern table section - */ -function buildPatternTable(dataset) { - const patterns = sortByStatusAndName([...dataset.patterns]); - const rows = patterns.map((p) => { - const status = normalizeStatus(p.status); - const emoji = getStatusEmoji(p.status); - const displayName = getDisplayName(p); - const category = formatCategoryName(p.category); - const summary = extractSummary(p.directive.description, p.patternName); - return [`${emoji} ${displayName}`, category, status, summary || '-']; - }); - return [ - heading(2, 'All Patterns'), - table(['Pattern', 'Category', 'Status', 'Description'], rows), - separator(), - ]; -} -/** - * Build inline category sections - * Each pattern links to its individual detail file when generateDetailFiles is enabled - */ -function buildCategorySections(dataset, options) { - const sections = []; - const categories = Object.keys(dataset.byCategory).sort(); - for (const category of categories) { - const patterns = dataset.byCategory[category] ?? []; - const displayName = formatCategoryName(category); - const counts = computeStatusCounts(patterns); - const progress = completionPercentage(counts); - sections.push(heading(3, displayName), paragraph(`${counts.completed}/${counts.total} complete (${progress}%)`)); - // Pattern list - link each pattern to its individual file if enabled - const items = sortByStatusAndName([...patterns]).map((p) => { - const emoji = getStatusEmoji(p.status); - const name = getDisplayName(p); - if (options.generateDetailFiles) { - const slug = patternToSlug(getPatternName(p)); - return `[${emoji} ${name}](patterns/${slug}.md)`; - } - return `${emoji} ${name}`; - }); - sections.push(list(items), separator()); - } - return sections; -} -/** - * Build dependency graph section with UML-inspired relationship styles - * - * Arrow styles per PatternRelationshipModel: - * - uses → solid arrow (-->) - * - depends-on → dashed arrow (-.->) - * - implements → dotted arrow (..->) - * - extends → solid open arrow (-->>) - */ -function buildDependencyGraph(dataset) { - const relationships = dataset.relationshipIndex ?? {}; - const patternNames = Object.keys(relationships); - if (patternNames.length === 0) { - return []; - } - // Build mermaid graph - const lines = ['graph TD']; - for (const name of patternNames) { - const rel = relationships[name]; - if (!rel) - continue; - // Node definition with short ID - const nodeId = sanitizeNodeId(name); - // uses relationships (solid arrow) - for (const target of rel.uses) { - lines.push(` ${nodeId} --> ${sanitizeNodeId(target)}`); - } - // dependsOn relationships (dashed arrow) - for (const target of rel.dependsOn) { - lines.push(` ${nodeId} -.-> ${sanitizeNodeId(target)}`); - } - // implements relationships (dotted arrow) - realization relationship - for (const target of rel.implementsPatterns) { - lines.push(` ${nodeId} ..-> ${sanitizeNodeId(target)}`); - } - // extends relationships (solid open arrow) - generalization relationship - if (rel.extendsPattern) { - lines.push(` ${nodeId} -->> ${sanitizeNodeId(rel.extendsPattern)}`); - } - } - if (lines.length === 1) { - // No relationships to show - return []; - } - return [ - heading(2, 'Dependencies'), - paragraph('Pattern relationships and dependencies:'), - mermaid(lines.join('\n')), - separator(), - ]; -} -/** - * Sanitize pattern name for mermaid node ID - */ -function sanitizeNodeId(name) { - return name.replace(/[^a-zA-Z0-9]/g, '_'); -} -// ═══════════════════════════════════════════════════════════════════════════ -// Individual Pattern Detail Files -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Generate URL-safe slug from pattern name - * - * Produces readable slugs with proper word separation: - * - DeciderPattern → "decider-pattern" - * - BddTestingInfrastructure → "bdd-testing-infrastructure" - * - APIEndpoint → "api-endpoint" - * - * @param patternName - The pattern name (typically CamelCase) - * @returns URL-safe slug - */ -function patternToSlug(patternName) { - return toKebabCase(patternName); -} -/** - * Build individual pattern files (progressive disclosure) - * Creates one file per pattern instead of grouping by category - */ -function buildIndividualPatternFiles(dataset) { - const files = {}; - for (const pattern of dataset.patterns) { - const slug = patternToSlug(getPatternName(pattern)); - files[`patterns/${slug}.md`] = buildSinglePatternDocument(pattern, dataset); - } - return files; -} -/** - * Build a single pattern detail document - * - * @param pattern - The pattern to document - * @param dataset - Full dataset for relationship lookups (implementedBy, extendedBy) - */ -function buildSinglePatternDocument(pattern, dataset) { - const sections = []; - const emoji = getStatusEmoji(pattern.status); - const displayName = getDisplayName(pattern); - const status = normalizeStatus(pattern.status); - // Metadata table - const metaRows = [ - ['Status', status], - ['Category', formatCategoryName(pattern.category)], - ]; - if (pattern.phase !== undefined) { - metaRows.push(['Phase', String(pattern.phase)]); - } - if (pattern.quarter) { - metaRows.push(['Quarter', pattern.quarter]); - } - sections.push(heading(2, 'Overview'), table(['Property', 'Value'], metaRows)); - // Description - // Description - strip leading headers to avoid duplicate headings when - // directive descriptions start with markdown headers like "## Topic" - if (pattern.directive.description) { - const cleanDescription = stripLeadingHeaders(pattern.directive.description); - if (cleanDescription) { - sections.push(heading(2, 'Description'), paragraph(cleanDescription)); - } - } - // Use cases - if (pattern.useCases && pattern.useCases.length > 0) { - sections.push(heading(2, 'Use Cases'), list([...pattern.useCases])); - } - // Dependencies - if ((pattern.dependsOn && pattern.dependsOn.length > 0) || - (pattern.enables && pattern.enables.length > 0)) { - sections.push(heading(2, 'Dependencies')); - if (pattern.dependsOn && pattern.dependsOn.length > 0) { - sections.push(list(pattern.dependsOn.map((d) => `Depends on: ${d}`))); - } - if (pattern.enables && pattern.enables.length > 0) { - sections.push(list(pattern.enables.map((e) => `Enables: ${e}`))); - } - } - // Implementations (files that implement this pattern via @libar-docs-implements) - const patternKey = getPatternName(pattern); - const rel = dataset.relationshipIndex?.[patternKey]; - if (rel?.implementedBy && rel.implementedBy.length > 0) { - sections.push(heading(2, 'Implementations')); - sections.push(paragraph('Files that implement this pattern:'), list(rel.implementedBy.map((impl) => { - // Extract file name from path for display (e.g., "outbox.ts" from "packages/.../outbox.ts") - const fileName = impl.file.split('/').pop() ?? impl.file; - // Normalize path to strip repo prefixes (e.g., "libar-platform/packages/..." -> "packages/...") - const normalizedPath = normalizeImplPath(impl.file); - // ListItem accepts plain strings - build inline markdown link - // Link is relative from output/patterns/ directory, go up two levels to project root - const link = `[\`${fileName}\`](../../${normalizedPath})`; - return impl.description ? `${link} - ${impl.description}` : link; - }))); - } - // Extensions (patterns that extend this pattern via @libar-docs-extends) - if (rel?.extendedBy && rel.extendedBy.length > 0) { - sections.push(heading(2, 'Extensions')); - sections.push(paragraph('Patterns that extend this one:'), list(rel.extendedBy.map((ext) => linkOut(`patterns/${patternToSlug(ext)}.md`, ext)))); - } - // Acceptance Criteria (scenarios with steps, DataTables, DocStrings) - // Use H2 to match other top-level sections in detail documents - sections.push(...renderAcceptanceCriteria(pattern.scenarios, { baseHeadingLevel: 2 })); - // Business Rules (from Gherkin Rule: keyword) - // Use H2 to match other top-level sections in detail documents - sections.push(...renderBusinessRulesSection(pattern.rules, { baseHeadingLevel: 2 })); - // Back link - sections.push(separator(), linkOut('← Back to Pattern Registry', '../PATTERNS.md')); - return document(`${emoji} ${displayName}`, sections, { - purpose: `Detailed documentation for the ${displayName} pattern`, - }); -} -//# sourceMappingURL=patterns.js.map \ No newline at end of file diff --git a/dist/renderable/codecs/patterns.js.map b/dist/renderable/codecs/patterns.js.map deleted file mode 100644 index ee9471d0..00000000 --- a/dist/renderable/codecs/patterns.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"patterns.js","sourceRoot":"","sources":["../../../src/renderable/codecs/patterns.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,mBAAmB,GAEpB,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAGL,OAAO,EACP,SAAS,EACT,SAAS,EACT,KAAK,EACL,IAAI,EACJ,OAAO,EACP,OAAO,EACP,QAAQ,GACT,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EACL,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAyB,oBAAoB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC5F,OAAO,EAAE,cAAc,EAAE,M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EAAE,CAAC,CAAC,CAAC;IAErF,YAAY;IACZ,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,OAAO,CAAC,4BAA4B,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAEpF,OAAO,QAAQ,CAAC,GAAG,KAAK,IAAI,WAAW,EAAE,EAAE,QAAQ,EAAE;QACnD,OAAO,EAAE,kCAAkC,WAAW,UAAU;KACjE,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/dist/renderable/codecs/planning.d.ts b/dist/renderable/codecs/planning.d.ts deleted file mode 100644 index 1a1d507c..00000000 --- a/dist/renderable/codecs/planning.d.ts +++ /dev/null @@ -1,11977 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern PlanningCodecs - * @libar-docs-status completed - * - * ## Planning Document Codecs - * - * Transforms MasterDataset into RenderableDocuments for planning outputs: - * - PLANNING-CHECKLIST.md (pre-planning questions and DoD) - * - SESSION-PLAN.md (implementation plans for phases) - * - SESSION-FINDINGS.md (retrospective discoveries) - * - * ### When to Use - * - * - When generating planning documentation for implementation sessions - * - When creating pre-planning checklists with Definition of Done - * - When documenting session findings and retrospective discoveries - */ -import { z } from 'zod'; -import { MasterDatasetSchema } from '../../validation-schemas/master-dataset.js'; -import { type BaseCodecOptions, type NormalizedStatusFilter } from './types/base.js'; -/** - * Options for PlanningChecklistCodec - */ -export interface PlanningChecklistCodecOptions extends BaseCodecOptions { - /** Include pre-planning questions (default: true) */ - includePrePlanning?: boolean; - /** Include Definition of Done (default: true) */ - includeDoD?: boolean; - /** Include risk assessment (default: true) */ - includeRiskAssessment?: boolean; - /** Include validation steps (default: true) */ - includeValidationSteps?: boolean; - /** Generate for active phases (default: true) */ - forActivePhases?: boolean; - /** Generate for next actionable phases (default: true) */ - forNextActionable?: boolean; -} -/** - * Default options for PlanningChecklistCodec - */ -export declare const DEFAULT_PLANNING_CHECKLIST_OPTIONS: Required; -/** - * Options for SessionPlanCodec - */ -export interface SessionPlanCodecOptions extends BaseCodecOptions { - /** Include implementation approach (default: true) */ - includeImplementationApproach?: boolean; - /** Include deliverables (default: true) */ - includeDeliverables?: boolean; - /** Include acceptance criteria (default: true) */ - includeAcceptanceCriteria?: boolean; - /** Include execution steps (default: true) */ - includeExecutionSteps?: boolean; - /** Include pre-planning section (default: true) */ - includePrePlanning?: boolean; - /** Include risk assessment (default: true) */ - includeRiskAssessment?: boolean; - /** Filter by status (default: ["planned", "active"]). Uses normalized status values. */ - statusFilter?: NormalizedStatusFilter[]; -} -/** - * Default options for SessionPlanCodec - */ -export declare const DEFAULT_SESSION_PLAN_OPTIONS: Required; -/** - * Options for SessionFindingsCodec - */ -export interface SessionFindingsCodecOptions extends BaseCodecOptions { - /** Include gaps (default: true) */ - includeGaps?: boolean; - /** Include improvements (default: true) */ - includeImprovements?: boolean; - /** Include risks (default: true) */ - includeRisks?: boolean; - /** Include learnings (default: true) */ - includeLearnings?: boolean; - /** Show source phase attribution (default: true) */ - showSourcePhase?: boolean; - /** Include links to patterns (default: true) */ - includeLinks?: boolean; - /** Group by (default: "category") */ - groupBy?: 'category' | 'phase' | 'type'; -} -/** - * Default options for SessionFindingsCodec - */ -export declare const DEFAULT_SESSION_FINDINGS_OPTIONS: Required; -import { RenderableDocumentOutputSchema } from './shared-schema.js'; -/** - * Create a PlanningChecklistCodec with custom options. - */ -export declare function createPlanningChecklistCodec(options?: PlanningChecklistCodecOptions): z.ZodCodec; -export declare const PlanningChecklistCodec: z.ZodCodec>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - tagRegistry: z.ZodObject<{ - $schema: z.ZodOptional; - version: z.ZodDefault; - categories: z.ZodArray>>; - }, z.core.$strict>>; - metadataTags: z.ZodArray; - purpose: z.ZodString; - required: z.ZodDefault>; - repeatable: z.ZodDefault>; - values: z.ZodOptional>; - default: z.ZodOptional; - example: z.ZodOptional; - metadataKey: z.ZodOptional; - transform: z.ZodOptional>; - }, z.core.$strict>>; - aggregationTags: z.ZodArray; - purpose: z.ZodString; - }, z.core.$strict>>; - formatOptions: z.ZodDefault>; - tagPrefix: z.ZodDefault; - fileOptInTag: z.ZodDefault; - }, z.core.$strict>; - byStatus: z.ZodObject<{ - completed: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - active: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - planned: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>; - byPhase: z.ZodArray; - patterns: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - counts: z.ZodObject<{ - completed: z.ZodNumber; - active: z.ZodNumber; - planned: z.ZodNumber; - total: z.ZodNumber; - }, z.core.$strip>; - }, z.core.$strip>>; - byQuarter: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byCategory: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - bySource: z.ZodObject<{ - typescript: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - gherkin: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - roadmap: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - prd: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>; - counts: z.ZodObject<{ - completed: z.ZodNumber; - active: z.ZodNumber; - planned: z.ZodNumber; - total: z.ZodNumber; - }, z.core.$strip>; - phaseCount: z.ZodNumber; - categoryCount: z.ZodNumber; - relationshipIndex: z.ZodOptional; - usedBy: z.ZodArray; - dependsOn: z.ZodArray; - enables: z.ZodArray; - implementsPatterns: z.ZodArray; - implementedBy: z.ZodArray; - }, z.core.$strip>>; - extendsPattern: z.ZodOptional; - extendedBy: z.ZodArray; - seeAlso: z.ZodArray; - apiRef: z.ZodArray; - }, z.core.$strip>>>; - archIndex: z.ZodOptional>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byContext: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byLayer: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byView: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - all: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>>; -}, z.core.$strip>, z.ZodObject<{ - title: z.ZodString; - purpose: z.ZodOptional; - detailLevel: z.ZodOptional; - sections: z.ZodArray; - additionalFiles: z.ZodOptional>; -}, z.core.$strip>>; -/** - * Create a SessionPlanCodec with custom options. - */ -export declare function createSessionPlanCodec(options?: SessionPlanCodecOptions): z.ZodCodec; -export declare const SessionPlanCodec: z.ZodCodec>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - tagRegistry: z.ZodObject<{ - $schema: z.ZodOptional; - version: z.ZodDefault; - categories: z.ZodArray>>; - }, z.core.$strict>>; - metadataTags: z.ZodArray; - purpose: z.ZodString; - required: z.ZodDefault>; - repeatable: z.ZodDefault>; - values: z.ZodOptional>; - default: z.ZodOptional; - example: z.ZodOptional; - metadataKey: z.ZodOptional; - transform: z.ZodOptional>; - }, z.core.$strict>>; - aggregationTags: z.ZodArray; - purpose: z.ZodString; - }, z.core.$strict>>; - formatOptions: z.ZodDefault>; - tagPrefix: z.ZodDefault; - fileOptInTag: z.ZodDefault; - }, z.core.$strict>; - byStatus: z.ZodObject<{ - completed: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - active: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - planned: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>; - byPhase: z.ZodArray; - patterns: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - counts: z.ZodObject<{ - completed: z.ZodNumber; - active: z.ZodNumber; - planned: z.ZodNumber; - total: z.ZodNumber; - }, z.core.$strip>; - }, z.core.$strip>>; - byQuarter: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byCategory: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - bySource: z.ZodObject<{ - typescript: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - gherkin: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - roadmap: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - prd: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>; - counts: z.ZodObject<{ - completed: z.ZodNumber; - active: z.ZodNumber; - planned: z.ZodNumber; - total: z.ZodNumber; - }, z.core.$strip>; - phaseCount: z.ZodNumber; - categoryCount: z.ZodNumber; - relationshipIndex: z.ZodOptional; - usedBy: z.ZodArray; - dependsOn: z.ZodArray; - enables: z.ZodArray; - implementsPatterns: z.ZodArray; - implementedBy: z.ZodArray; - }, z.core.$strip>>; - extendsPattern: z.ZodOptional; - extendedBy: z.ZodArray; - seeAlso: z.ZodArray; - apiRef: z.ZodArray; - }, z.core.$strip>>>; - archIndex: z.ZodOptional>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byContext: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byLayer: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byView: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - all: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>>; -}, z.core.$strip>, z.ZodObject<{ - title: z.ZodString; - purpose: z.ZodOptional; - detailLevel: z.ZodOptional; - sections: z.ZodArray; - additionalFiles: z.ZodOptional>; -}, z.core.$strip>>; -/** - * Create a SessionFindingsCodec with custom options. - */ -export declare function createSessionFindingsCodec(options?: SessionFindingsCodecOptions): z.ZodCodec; -export declare const SessionFindingsCodec: z.ZodCodec>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - tagRegistry: z.ZodObject<{ - $schema: z.ZodOptional; - version: z.ZodDefault; - categories: z.ZodArray>>; - }, z.core.$strict>>; - metadataTags: z.ZodArray; - purpose: z.ZodString; - required: z.ZodDefault>; - repeatable: z.ZodDefault>; - values: z.ZodOptional>; - default: z.ZodOptional; - example: z.ZodOptional; - metadataKey: z.ZodOptional; - transform: z.ZodOptional>; - }, z.core.$strict>>; - aggregationTags: z.ZodArray; - purpose: z.ZodString; - }, z.core.$strict>>; - formatOptions: z.ZodDefault>; - tagPrefix: z.ZodDefault; - fileOptInTag: z.ZodDefault; - }, z.core.$strict>; - byStatus: z.ZodObject<{ - completed: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - active: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - planned: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>; - byPhase: z.ZodArray; - patterns: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - counts: z.ZodObject<{ - completed: z.ZodNumber; - active: z.ZodNumber; - planned: z.ZodNumber; - total: z.ZodNumber; - }, z.core.$strip>; - }, z.core.$strip>>; - byQuarter: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byCategory: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - bySource: z.ZodObject<{ - typescript: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - gherkin: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - roadmap: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - prd: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>; - counts: z.ZodObject<{ - completed: z.ZodNumber; - active: z.ZodNumber; - planned: z.ZodNumber; - total: z.ZodNumber; - }, z.core.$strip>; - phaseCount: z.ZodNumber; - categoryCount: z.ZodNumber; - relationshipIndex: z.ZodOptional; - usedBy: z.ZodArray; - dependsOn: z.ZodArray; - enables: z.ZodArray; - implementsPatterns: z.ZodArray; - implementedBy: z.ZodArray; - }, z.core.$strip>>; - extendsPattern: z.ZodOptional; - extendedBy: z.ZodArray; - seeAlso: z.ZodArray; - apiRef: z.ZodArray; - }, z.core.$strip>>>; - archIndex: z.ZodOptional>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byContext: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byLayer: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byView: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - all: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>>; -}, z.core.$strip>, z.ZodObject<{ - title: z.ZodString; - purpose: z.ZodOptional; - detailLevel: z.ZodOptional; - sections: z.ZodArray; - additionalFiles: z.ZodOptional>; -}, z.core.$strip>>; -//# sourceMappingURL=planning.d.ts.map \ No newline at end of file diff --git a/dist/renderable/codecs/planning.d.ts.map b/dist/renderable/codecs/planning.d.ts.map deleted file mode 100644 index aa234d90..00000000 --- a/dist/renderable/codecs/planning.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"planning.d.ts","sourceRoot":"","sources":["../../../src/renderable/codecs/planning.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,mBAAmB,EAEpB,MAAM,4CAA4C,CAAC;AAqBpD,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAG5B,MAAM,iBAAiB,CAAC;AAMzB;;GAEG;AACH,MAAM,WAAW,6BAA8B,SAAQ,gBAAgB;IACrE,qDAAqD;IACrD,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B,iDAAiD;IACjD,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,8CAA8C;IAC9C,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC,+CAA+C;IAC/C,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC,iDAAiD;IACjD,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B,0DAA0D;IAC1D,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED;;GAEG;AACH,eAAO,MAAM,kCAAkC,EAAE,QAAQ,CAAC,6BAA6B,CAQtF,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,uBAAwB,SAAQ,gBAAgB;IAC/D,sDAAsD;IACtD,6BAA6B,CAAC,EAAE,OAAO,CAAC;IAExC,2CAA2C;IAC3C,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B,kDAAkD;IAClD,yBAAyB,CAAC,EAAE,OAAO,CAAC;IAEpC,8CAA8C;IAC9C,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC,mDAAmD;IACnD,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B,8CAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAA+B,CAAC"} \ No newline at end of file diff --git a/dist/renderable/codecs/planning.js b/dist/renderable/codecs/planning.js deleted file mode 100644 index 77d92ded..00000000 --- a/dist/renderable/codecs/planning.js +++ /dev/null @@ -1,417 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern PlanningCodecs - * @libar-docs-status completed - * - * ## Planning Document Codecs - * - * Transforms MasterDataset into RenderableDocuments for planning outputs: - * - PLANNING-CHECKLIST.md (pre-planning questions and DoD) - * - SESSION-PLAN.md (implementation plans for phases) - * - SESSION-FINDINGS.md (retrospective discoveries) - * - * ### When to Use - * - * - When generating planning documentation for implementation sessions - * - When creating pre-planning checklists with Definition of Done - * - When documenting session findings and retrospective discoveries - */ -import { z } from 'zod'; -import { MasterDatasetSchema, } from '../../validation-schemas/master-dataset.js'; -import { heading, paragraph, separator, table, list, document, } from '../schema.js'; -import { renderScenarioContent, renderBusinessRulesSection } from './helpers.js'; -import { getStatusEmoji, getDisplayName } from '../utils.js'; -import { getPatternName } from '../../api/pattern-helpers.js'; -import { getDeliverableStatusEmoji, isDeliverableStatusComplete, } from '../../taxonomy/deliverable-status.js'; -import { normalizeStatus, isPatternPlanned } from '../../taxonomy/index.js'; -import { groupBy } from '../../utils/index.js'; -import { DEFAULT_BASE_OPTIONS, mergeOptions, } from './types/base.js'; -/** - * Default options for PlanningChecklistCodec - */ -export const DEFAULT_PLANNING_CHECKLIST_OPTIONS = { - ...DEFAULT_BASE_OPTIONS, - includePrePlanning: true, - includeDoD: true, - includeRiskAssessment: true, - includeValidationSteps: true, - forActivePhases: true, - forNextActionable: true, -}; -/** - * Default options for SessionPlanCodec - */ -export const DEFAULT_SESSION_PLAN_OPTIONS = { - ...DEFAULT_BASE_OPTIONS, - includeImplementationApproach: true, - includeDeliverables: true, - includeAcceptanceCriteria: true, - includeExecutionSteps: true, - includePrePlanning: true, - includeRiskAssessment: true, - statusFilter: ['planned', 'active'], -}; -/** - * Default options for SessionFindingsCodec - */ -export const DEFAULT_SESSION_FINDINGS_OPTIONS = { - ...DEFAULT_BASE_OPTIONS, - includeGaps: true, - includeImprovements: true, - includeRisks: true, - includeLearnings: true, - showSourcePhase: true, - includeLinks: true, - groupBy: 'category', -}; -import { RenderableDocumentOutputSchema } from './shared-schema.js'; -// ═══════════════════════════════════════════════════════════════════════════ -// Planning Checklist Codec -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Create a PlanningChecklistCodec with custom options. - */ -export function createPlanningChecklistCodec(options) { - const opts = mergeOptions(DEFAULT_PLANNING_CHECKLIST_OPTIONS, options); - return z.codec(MasterDatasetSchema, RenderableDocumentOutputSchema, { - decode: (dataset) => { - return buildPlanningChecklistDocument(dataset, opts); - }, - /** @throws Always - this codec is decode-only. See zod-codecs.md */ - encode: () => { - throw new Error('PlanningChecklistCodec is decode-only. See zod-codecs.md'); - }, - }); -} -export const PlanningChecklistCodec = createPlanningChecklistCodec(); -// ═══════════════════════════════════════════════════════════════════════════ -// Session Plan Codec -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Create a SessionPlanCodec with custom options. - */ -export function createSessionPlanCodec(options) { - const opts = mergeOptions(DEFAULT_SESSION_PLAN_OPTIONS, options); - return z.codec(MasterDatasetSchema, RenderableDocumentOutputSchema, { - decode: (dataset) => { - return buildSessionPlanDocument(dataset, opts); - }, - /** @throws Always - this codec is decode-only. See zod-codecs.md */ - encode: () => { - throw new Error('SessionPlanCodec is decode-only. See zod-codecs.md'); - }, - }); -} -export const SessionPlanCodec = createSessionPlanCodec(); -// ═══════════════════════════════════════════════════════════════════════════ -// Session Findings Codec -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Create a SessionFindingsCodec with custom options. - */ -export function createSessionFindingsCodec(options) { - const opts = mergeOptions(DEFAULT_SESSION_FINDINGS_OPTIONS, options); - return z.codec(MasterDatasetSchema, RenderableDocumentOutputSchema, { - decode: (dataset) => { - return buildSessionFindingsDocument(dataset, opts); - }, - /** @throws Always - this codec is decode-only. See zod-codecs.md */ - encode: () => { - throw new Error('SessionFindingsCodec is decode-only. See zod-codecs.md'); - }, - }); -} -export const SessionFindingsCodec = createSessionFindingsCodec(); -// ═══════════════════════════════════════════════════════════════════════════ -// Planning Checklist Builder -// ═══════════════════════════════════════════════════════════════════════════ -function buildPlanningChecklistDocument(dataset, options) { - const sections = []; - const completedNames = new Set(dataset.byStatus.completed.map((p) => getPatternName(p))); - // Collect phases for checklists - const phasesToCheck = []; - if (options.forActivePhases) { - phasesToCheck.push(...dataset.byStatus.active); - } - if (options.forNextActionable) { - const actionable = dataset.byStatus.planned.filter((p) => { - const deps = p.dependsOn ?? []; - return deps.every((dep) => completedNames.has(dep)); - }); - for (const pattern of actionable) { - if (!phasesToCheck.some((p) => p.name === pattern.name)) { - phasesToCheck.push(pattern); - } - } - } - if (phasesToCheck.length === 0) { - sections.push(heading(2, 'Planning Checklists'), paragraph('*No active or actionable phases found.*')); - return document('Planning Checklist', sections, { - purpose: 'Pre-planning questions and Definition of Done validation', - }); - } - // Sort by phase number - phasesToCheck.sort((a, b) => (a.phase ?? 0) - (b.phase ?? 0)); - // Summary - sections.push(heading(2, 'Summary'), table(['Metric', 'Value'], [ - ['Phases to Plan', String(phasesToCheck.length)], - ['Active', String(dataset.byStatus.active.filter((p) => phasesToCheck.includes(p)).length)], - ['Next Actionable', String(phasesToCheck.filter((p) => isPatternPlanned(p.status)).length)], - ]), separator()); - // Generate checklist for each phase - for (const pattern of phasesToCheck) { - sections.push(...buildPhaseChecklist(pattern, options, completedNames)); - } - return document('Planning Checklist', sections, { - purpose: 'Pre-planning questions and Definition of Done validation', - }); -} -function buildPhaseChecklist(pattern, options, completedNames) { - const sections = []; - const name = getDisplayName(pattern); - const emoji = getStatusEmoji(pattern.status); - sections.push(heading(3, `${emoji} ${name}`)); - // Pre-planning questions - if (options.includePrePlanning) { - const prePlanningItems = [ - '- [ ] Context and requirements understood?', - '- [ ] Dependencies identified and verified?', - '- [ ] Implementation approach chosen?', - '- [ ] Risks assessed and mitigated?', - ]; - // Add dependency status - if (pattern.dependsOn && pattern.dependsOn.length > 0) { - const depStatus = pattern.dependsOn.map((dep) => { - const met = completedNames.has(dep); - return ` - ${met ? '✅' : '⏳'} ${dep}`; - }); - prePlanningItems.push('**Dependencies:**'); - prePlanningItems.push(...depStatus); - } - sections.push(heading(4, 'Pre-Planning'), paragraph(prePlanningItems.join('\n'))); - } - // Definition of Done - if (options.includeDoD) { - const dodItems = ['**Deliverables:**']; - if (pattern.deliverables && pattern.deliverables.length > 0) { - for (const d of pattern.deliverables) { - const status = isDeliverableStatusComplete(d.status) ? '✅' : '- [ ]'; - dodItems.push(`${status} ${d.name}`); - } - } - else { - dodItems.push('- [ ] (No deliverables defined)'); - } - // Acceptance criteria from scenarios - if (pattern.scenarios && pattern.scenarios.length > 0) { - dodItems.push('\n**Acceptance Criteria:**'); - for (const s of pattern.scenarios) { - dodItems.push(`- [ ] ${s.scenarioName}`); - } - } - sections.push(heading(4, 'Definition of Done'), paragraph(dodItems.join('\n'))); - } - // Risk assessment - if (options.includeRiskAssessment) { - sections.push(heading(4, 'Risk Assessment'), paragraph([ - '- [ ] Technical risks identified?', - '- [ ] Scope creep controls in place?', - '- [ ] Fallback options available?', - ].join('\n'))); - } - sections.push(separator()); - return sections; -} -// ═══════════════════════════════════════════════════════════════════════════ -// Session Plan Builder -// ═══════════════════════════════════════════════════════════════════════════ -function buildSessionPlanDocument(dataset, options) { - const sections = []; - // Filter by status - const patterns = dataset.patterns.filter((p) => options.statusFilter.includes(normalizeStatus(p.status))); - if (patterns.length === 0) { - sections.push(heading(2, 'No Phases to Plan'), paragraph('*No phases match the status filter.*')); - return document('Session Implementation Plan', sections, { - purpose: 'Structured implementation plan for coding sessions', - }); - } - // Sort by phase - patterns.sort((a, b) => (a.phase ?? 0) - (b.phase ?? 0)); - // Summary - const byStatus = groupBy(patterns, (p) => normalizeStatus(p.status)); - sections.push(heading(2, 'Summary'), table(['Status', 'Count'], [ - ['Active', String(byStatus.get('active')?.length ?? 0)], - ['Planned', String(byStatus.get('planned')?.length ?? 0)], - ['Total', String(patterns.length)], - ]), separator()); - // Implementation plans by phase - for (const pattern of patterns) { - sections.push(...buildPhasePlan(pattern, options)); - } - return document('Session Implementation Plan', sections, { - purpose: 'Structured implementation plan for coding sessions', - }); -} -function buildPhasePlan(pattern, options) { - const sections = []; - const name = getDisplayName(pattern); - const emoji = getStatusEmoji(pattern.status); - sections.push(heading(3, `${emoji} ${name}`)); - // Metadata - const metaRows = [['Status', normalizeStatus(pattern.status)]]; - if (pattern.phase !== undefined) - metaRows.push(['Phase', String(pattern.phase)]); - if (pattern.effort) - metaRows.push(['Effort', pattern.effort]); - sections.push(table(['Property', 'Value'], metaRows)); - // Description - if (pattern.directive.description) { - sections.push(paragraph(pattern.directive.description)); - } - // Implementation approach - if (options.includeImplementationApproach && pattern.useCases && pattern.useCases.length > 0) { - sections.push(heading(4, 'Implementation Approach'), list([...pattern.useCases])); - } - // Deliverables - if (options.includeDeliverables && pattern.deliverables && pattern.deliverables.length > 0) { - const items = pattern.deliverables.map((d) => { - const emoji = getDeliverableStatusEmoji(d.status); - return `${emoji} ${d.name}`; - }); - sections.push(heading(4, 'Deliverables'), list(items)); - } - // Acceptance criteria with full steps, DataTables, and DocStrings - if (options.includeAcceptanceCriteria && pattern.scenarios && pattern.scenarios.length > 0) { - sections.push(heading(4, 'Acceptance Criteria')); - for (const scenario of pattern.scenarios) { - sections.push(...renderScenarioContent(scenario)); - } - } - // Business Rules from Gherkin Rule: keyword - sections.push(...renderBusinessRulesSection(pattern.rules)); - sections.push(separator()); - return sections; -} -// ═══════════════════════════════════════════════════════════════════════════ -// Session Findings Builder -// ═══════════════════════════════════════════════════════════════════════════ -function buildSessionFindingsDocument(dataset, options) { - const sections = []; - // Collect findings from completed patterns - const findings = []; - for (const pattern of dataset.byStatus.completed) { - const sourceName = getPatternName(pattern); - const sourcePhase = pattern.phase; - // Extract gaps from pattern metadata if available - if (options.includeGaps && pattern.discoveredGaps) { - for (const gapText of pattern.discoveredGaps) { - findings.push({ - type: 'gap', - text: gapText, - ...(sourcePhase !== undefined && { sourcePhase }), - sourceName, - }); - } - } - // Extract improvements - if (options.includeImprovements && pattern.discoveredImprovements) { - for (const improvementText of pattern.discoveredImprovements) { - findings.push({ - type: 'improvement', - text: improvementText, - ...(sourcePhase !== undefined && { sourcePhase }), - sourceName, - }); - } - } - // Extract risks (both explicit discoveredRisks and the risk field) - if (options.includeRisks) { - if (pattern.discoveredRisks) { - for (const riskText of pattern.discoveredRisks) { - findings.push({ - type: 'risk', - text: riskText, - ...(sourcePhase !== undefined && { sourcePhase }), - sourceName, - }); - } - } - // Also include the single risk field if present - if (pattern.risk) { - findings.push({ - type: 'risk', - text: pattern.risk, - ...(sourcePhase !== undefined && { sourcePhase }), - sourceName, - }); - } - } - // Extract learnings - if (options.includeLearnings && pattern.discoveredLearnings) { - for (const learningText of pattern.discoveredLearnings) { - findings.push({ - type: 'learning', - text: learningText, - ...(sourcePhase !== undefined && { sourcePhase }), - sourceName, - }); - } - } - } - if (findings.length === 0) { - sections.push(heading(2, 'No Findings'), paragraph('*No gaps, improvements, risks, or learnings discovered yet.*')); - return document('Session Findings', sections, { - purpose: 'Retrospective discoveries for roadmap refinement', - }); - } - // Summary - const byType = groupBy(findings, (f) => f.type); - sections.push(heading(2, 'Summary'), table(['Finding Type', 'Count'], [ - ['Gaps', String(byType.get('gap')?.length ?? 0)], - ['Improvements', String(byType.get('improvement')?.length ?? 0)], - ['Risks', String(byType.get('risk')?.length ?? 0)], - ['Learnings', String(byType.get('learning')?.length ?? 0)], - ['**Total**', String(findings.length)], - ]), separator()); - // Group by category or type - if (options.groupBy === 'category' || options.groupBy === 'type') { - for (const [type, typeFindings] of byType.entries()) { - const emoji = type === 'gap' ? '🔍' : type === 'improvement' ? '💡' : type === 'risk' ? '⚠️' : '📚'; - const title = type.charAt(0).toUpperCase() + type.slice(1) + 's'; - sections.push(heading(3, `${emoji} ${title}`)); - const items = typeFindings.map((f) => { - const source = options.showSourcePhase && f.sourcePhase !== undefined - ? ` *(Phase ${f.sourcePhase})*` - : ''; - return `${f.text}${source}`; - }); - sections.push(list(items)); - } - } - else { - // Group by phase - const byPhase = groupBy(findings, (f) => f.sourcePhase ?? 0); - const sortedPhases = [...byPhase.keys()].sort((a, b) => a - b); - for (const phase of sortedPhases) { - const phaseFindings = byPhase.get(phase) ?? []; - sections.push(heading(3, `Phase ${phase}`)); - const items = phaseFindings.map((f) => { - const emoji = f.type === 'gap' - ? '🔍' - : f.type === 'improvement' - ? '💡' - : f.type === 'risk' - ? '⚠️' - : '📚'; - return `${emoji} ${f.text}`; - }); - sections.push(list(items)); - } - } - sections.push(separator()); - return document('Session Findings', sections, { - purpose: 'Retrospective discoveries for roadmap refinement', - }); -} -//# sourceMappingURL=planning.js.map \ No newline at end of file diff --git a/dist/renderable/codecs/planning.js.map b/dist/renderable/codecs/planning.js.map deleted file mode 100644 index 1c43cb0f..00000000 --- a/dist/renderable/codecs/planning.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"planning.js","sourceRoot":"","sources":["../../../src/renderable/codecs/planning.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,mBAAmB,GAEpB,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAGL,OAAO,EACP,SAAS,EACT,SAAS,EACT,KAAK,EACL,IAAI,EACJ,QAAQ,GACT,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AACjF,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EACL,yBAAyB,EACzB,2BAA2B,GAC5B,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAGL,oBAAoB,EACpB,YAAY,GACb,MAAM,iBAAiB,CAAC;AA6BzB;;GAEG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAA4C;IACzF,GAAG,oBAAoB;IACvB,kBAAkB,EAAE,IAAI;IACxB,UAAU,EAAE,IAAI;IAChB,qBAAqB,EAAE,IAAI;IAC3B,sBAAsB,EAAE,IAAI;IAC5B,eAAe,EAAE,IAAI;IACrB,iBAAiB,EAAE,IAAI;CACxB,CAAC;AA4BF;;GAEG;AACH,MAAM,CAAC,MAA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,CAAC,IAAI;wBACN,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,MAAM;4BACjB,CAAC,CAAC,IAAI;4BACN,CAAC,CAAC,IAAI,CAAC;gBACf,OAAO,GAAG,KAAK,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC;YAC9B,CAAC,CAAC,CAAC;YAEH,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;QAC7B,CAAC;IACH,CAAC;IAED,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;IAE3B,OAAO,QAAQ,CAAC,kBAAkB,EAAE,QAAQ,EAAE;QAC5C,OAAO,EAAE,kDAAkD;KAC5D,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/dist/renderable/codecs/pr-changes.d.ts b/dist/renderable/codecs/pr-changes.d.ts deleted file mode 100644 index 83d3c964..00000000 --- a/dist/renderable/codecs/pr-changes.d.ts +++ /dev/null @@ -1,4054 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern PrChangesCodec - * @libar-docs-status completed - * - * ## PR Changes Document Codec - * - * Transforms MasterDataset into RenderableDocument for PR-scoped output. - * Filters patterns by changed files and/or release version tags. - * - * ### When to Use - * - * - When generating PR summaries filtered by changed files - * - When creating release-scoped documentation for PR reviews - * - When building CI/CD outputs focused on PR scope - * - * ### Factory Pattern - * - * Use `createPrChangesCodec(options)` for custom options: - * ```typescript - * const codec = createPrChangesCodec({ - * changedFiles: ['src/commands/order.ts'], - * releaseFilter: 'v1.0.0', - * }); - * const doc = codec.decode(dataset); - * ``` - * - * ### Scope Filtering - * - * PR Changes codec filters patterns by: - * 1. Changed files (matches against pattern.filePath) - * 2. Release version (matches against deliverable.release tags) - * - * If both are specified, patterns must match at least one criterion. - */ -import { z } from 'zod'; -import { MasterDatasetSchema } from '../../validation-schemas/master-dataset.js'; -import { type BaseCodecOptions } from './types/base.js'; -/** - * Options for PrChangesCodec - * - * NOTE: changedFiles is required for PR scope filtering - */ -export interface PrChangesCodecOptions extends BaseCodecOptions { - /** Files changed in this PR (required for PR scope) */ - changedFiles?: string[]; - /** Release version filter (e.g., "v1.0.0") */ - releaseFilter?: string; - /** Include deliverables (default: true) */ - includeDeliverables?: boolean; - /** Include review checklist (default: true) */ - includeReviewChecklist?: boolean; - /** Include business value (default: true) */ - includeBusinessValue?: boolean; - /** Include dependencies (default: true) */ - includeDependencies?: boolean; - /** Sort by (default: "phase") */ - sortBy?: 'phase' | 'priority' | 'workflow'; -} -/** - * Default options for PrChangesCodec - */ -export declare const DEFAULT_PR_CHANGES_OPTIONS: Required; -import { RenderableDocumentOutputSchema } from './shared-schema.js'; -/** - * Create a PrChangesCodec with custom options. - * - * @param options - Codec configuration options - * @returns Configured Zod codec - * - * @example - * ```typescript - * // Filter by changed files in PR - * const codec = createPrChangesCodec({ - * changedFiles: ['src/commands/order.ts', 'src/events/order.ts'], - * }); - * - * // Filter by release version - * const codec = createPrChangesCodec({ releaseFilter: 'v1.0.0' }); - * - * // Combine both filters - * const codec = createPrChangesCodec({ - * changedFiles: ['src/commands/order.ts'], - * releaseFilter: 'v1.0.0', - * }); - * ``` - */ -export declare function createPrChangesCodec(options?: PrChangesCodecOptions): z.ZodCodec; -/** - * Default PR Changes Document Codec - * - * Transforms MasterDataset → RenderableDocument for PR changes. - * Without options, shows all patterns (no filtering). - */ -export declare const PrChangesCodec: z.ZodCodec>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - tagRegistry: z.ZodObject<{ - $schema: z.ZodOptional; - version: z.ZodDefault; - categories: z.ZodArray>>; - }, z.core.$strict>>; - metadataTags: z.ZodArray; - purpose: z.ZodString; - required: z.ZodDefault>; - repeatable: z.ZodDefault>; - values: z.ZodOptional>; - default: z.ZodOptional; - example: z.ZodOptional; - metadataKey: z.ZodOptional; - transform: z.ZodOptional>; - }, z.core.$strict>>; - aggregationTags: z.ZodArray; - purpose: z.ZodString; - }, z.core.$strict>>; - formatOptions: z.ZodDefault>; - tagPrefix: z.ZodDefault; - fileOptInTag: z.ZodDefault; - }, z.core.$strict>; - byStatus: z.ZodObject<{ - completed: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - active: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - planned: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>; - byPhase: z.ZodArray; - patterns: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - counts: z.ZodObject<{ - completed: z.ZodNumber; - active: z.ZodNumber; - planned: z.ZodNumber; - total: z.ZodNumber; - }, z.core.$strip>; - }, z.core.$strip>>; - byQuarter: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byCategory: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - bySource: z.ZodObject<{ - typescript: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - gherkin: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - roadmap: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - prd: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>; - counts: z.ZodObject<{ - completed: z.ZodNumber; - active: z.ZodNumber; - planned: z.ZodNumber; - total: z.ZodNumber; - }, z.core.$strip>; - phaseCount: z.ZodNumber; - categoryCount: z.ZodNumber; - relationshipIndex: z.ZodOptional; - usedBy: z.ZodArray; - dependsOn: z.ZodArray; - enables: z.ZodArray; - implementsPatterns: z.ZodArray; - implementedBy: z.ZodArray; - }, z.core.$strip>>; - extendsPattern: z.ZodOptional; - extendedBy: z.ZodArray; - seeAlso: z.ZodArray; - apiRef: z.ZodArray; - }, z.core.$strip>>>; - archIndex: z.ZodOptional>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byContext: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byLayer: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byView: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - all: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>>; -}, z.core.$strip>, z.ZodObject<{ - title: z.ZodString; - purpose: z.ZodOptional; - detailLevel: z.ZodOptional; - sections: z.ZodArray; - additionalFiles: z.ZodOptional>; -}, z.core.$strip>>; -//# sourceMappingURL=pr-changes.d.ts.map \ No newline at end of file diff --git a/dist/renderable/codecs/pr-changes.d.ts.map b/dist/renderable/codecs/pr-changes.d.ts.map deleted file mode 100644 index 92218584..00000000 --- a/dist/renderable/codecs/pr-changes.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pr-changes.d.ts","sourceRoot":"","sources":["../../../src/renderable/codecs/pr-changes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,mBAAmB,EAEpB,MAAM,4CAA4C,CAAC;AAqBpD,OAAO,EAAE,KAAK,gBAAgB,EAAsC,MAAM,iBAAiB,CAAC;AAM5F;;;;GAIG;AACH,MAAM,WAAW,qBAAsB,SAAQ,gBAAgB;IAC7D,uDAAuD;IACvD,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IAExB,8CAA8C;IAC9C,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,2CAA2C;IAC3C,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B,+CAA+C;IAC/C,sBAAsB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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAyB,CAAC"} \ No newline at end of file diff --git a/dist/renderable/codecs/pr-changes.js b/dist/renderable/codecs/pr-changes.js deleted file mode 100644 index 921ed95b..00000000 --- a/dist/renderable/codecs/pr-changes.js +++ /dev/null @@ -1,419 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern PrChangesCodec - * @libar-docs-status completed - * - * ## PR Changes Document Codec - * - * Transforms MasterDataset into RenderableDocument for PR-scoped output. - * Filters patterns by changed files and/or release version tags. - * - * ### When to Use - * - * - When generating PR summaries filtered by changed files - * - When creating release-scoped documentation for PR reviews - * - When building CI/CD outputs focused on PR scope - * - * ### Factory Pattern - * - * Use `createPrChangesCodec(options)` for custom options: - * ```typescript - * const codec = createPrChangesCodec({ - * changedFiles: ['src/commands/order.ts'], - * releaseFilter: 'v1.0.0', - * }); - * const doc = codec.decode(dataset); - * ``` - * - * ### Scope Filtering - * - * PR Changes codec filters patterns by: - * 1. Changed files (matches against pattern.filePath) - * 2. Release version (matches against deliverable.release tags) - * - * If both are specified, patterns must match at least one criterion. - */ -import { z } from 'zod'; -import { MasterDatasetSchema, } from '../../validation-schemas/master-dataset.js'; -import { heading, paragraph, separator, table, list, document, } from '../schema.js'; -import { normalizeStatus, isPatternComplete, isPatternActive } from '../../taxonomy/index.js'; -import { getDeliverableStatusEmoji } from '../../taxonomy/deliverable-status.js'; -import { getStatusEmoji, getDisplayName, extractSummary, formatBusinessValue, sortByPhaseAndName, } from '../utils.js'; -import { DEFAULT_BASE_OPTIONS, mergeOptions } from './types/base.js'; -/** - * Default options for PrChangesCodec - */ -export const DEFAULT_PR_CHANGES_OPTIONS = { - ...DEFAULT_BASE_OPTIONS, - changedFiles: [], - releaseFilter: '', - includeDeliverables: true, - includeReviewChecklist: true, - includeBusinessValue: true, - includeDependencies: true, - sortBy: 'phase', -}; -import { RenderableDocumentOutputSchema } from './shared-schema.js'; -import { renderAcceptanceCriteria, renderBusinessRulesSection } from './helpers.js'; -// ═══════════════════════════════════════════════════════════════════════════ -// PR Changes Document Codec -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Create a PrChangesCodec with custom options. - * - * @param options - Codec configuration options - * @returns Configured Zod codec - * - * @example - * ```typescript - * // Filter by changed files in PR - * const codec = createPrChangesCodec({ - * changedFiles: ['src/commands/order.ts', 'src/events/order.ts'], - * }); - * - * // Filter by release version - * const codec = createPrChangesCodec({ releaseFilter: 'v1.0.0' }); - * - * // Combine both filters - * const codec = createPrChangesCodec({ - * changedFiles: ['src/commands/order.ts'], - * releaseFilter: 'v1.0.0', - * }); - * ``` - */ -export function createPrChangesCodec(options) { - const opts = mergeOptions(DEFAULT_PR_CHANGES_OPTIONS, options); - return z.codec(MasterDatasetSchema, RenderableDocumentOutputSchema, { - decode: (dataset) => { - return buildPrChangesDocument(dataset, opts); - }, - /** @throws Always - this codec is decode-only. See zod-codecs.md */ - encode: () => { - throw new Error('PrChangesCodec is decode-only. See zod-codecs.md'); - }, - }); -} -/** - * Default PR Changes Document Codec - * - * Transforms MasterDataset → RenderableDocument for PR changes. - * Without options, shows all patterns (no filtering). - */ -export const PrChangesCodec = createPrChangesCodec(); -// ═══════════════════════════════════════════════════════════════════════════ -// Document Builder -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Build PR changes document - */ -function buildPrChangesDocument(dataset, options) { - const sections = []; - // Filter patterns by PR scope - const filteredPatterns = filterPatternsByPrScope(dataset.patterns, options); - if (filteredPatterns.length === 0) { - sections.push(heading(2, 'No Changes'), paragraph(buildNoChangesMessage(options))); - return document('Pull Request Changes', sections, { - purpose: 'Summary of changes in this PR for review', - }); - } - // 1. Summary - sections.push(...buildPrSummary(filteredPatterns, options)); - // 2. Changes by phase (if sortBy is "phase") - if (options.sortBy === 'phase') { - sections.push(...buildChangesByPhase(filteredPatterns, options)); - } - else if (options.sortBy === 'priority') { - sections.push(...buildChangesByPriority(filteredPatterns, options)); - } - else { - // Default: flat list - sections.push(...buildFlatChangesList(filteredPatterns, options)); - } - // 3. Review checklist (if configured) - if (options.includeReviewChecklist) { - sections.push(...buildReviewChecklist(filteredPatterns)); - } - // 4. Dependencies (if configured) - if (options.includeDependencies) { - sections.push(...buildPrDependencies(filteredPatterns)); - } - return document('Pull Request Changes', sections, { - purpose: 'Summary of changes in this PR for review', - detailLevel: buildDetailLevelDescription(options), - }); -} -// ═══════════════════════════════════════════════════════════════════════════ -// Scope Filtering -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Filter patterns by PR scope criteria - */ -function filterPatternsByPrScope(patterns, options) { - const { changedFiles, releaseFilter } = options; - const hasFileFilter = changedFiles.length > 0; - const hasReleaseFilter = releaseFilter.length > 0; - // No filters = return all active/completed patterns - if (!hasFileFilter && !hasReleaseFilter) { - return patterns.filter((p) => isPatternComplete(p.status) || isPatternActive(p.status)); - } - return patterns.filter((pattern) => { - // Check status first - only active or completed patterns - if (!isPatternComplete(pattern.status) && !isPatternActive(pattern.status)) { - return false; - } - // File match: pattern's source file is in changed files - const matchesFile = hasFileFilter && - changedFiles.some((file) => { - // Normalize paths for comparison - const normalizedFile = file.replace(/\\/g, '/'); - const normalizedPattern = pattern.source.file.replace(/\\/g, '/'); - return (normalizedPattern.includes(normalizedFile) || normalizedFile.includes(normalizedPattern)); - }); - // Release match: any deliverable has matching release tag - const matchesRelease = hasReleaseFilter && (pattern.deliverables?.some((d) => d.release === releaseFilter) ?? false); - // If both filters specified, match either (OR logic) - if (hasFileFilter && hasReleaseFilter) { - return matchesFile || matchesRelease; - } - // Single filter - match that one - return hasFileFilter ? matchesFile : matchesRelease; - }); -} -/** - * Build message for when no changes match filters - */ -function buildNoChangesMessage(options) { - const parts = []; - if (options.changedFiles.length > 0) { - parts.push(`files matching: ${options.changedFiles.slice(0, 3).join(', ')}${options.changedFiles.length > 3 ? '...' : ''}`); - } - if (options.releaseFilter) { - parts.push(`release: ${options.releaseFilter}`); - } - if (parts.length === 0) { - return 'No active or completed patterns found.'; - } - return `No patterns found matching ${parts.join(' or ')}.`; -} -/** - * Build detail level description - */ -function buildDetailLevelDescription(options) { - const parts = ['PR-scoped view']; - if (options.changedFiles.length > 0) { - parts.push(`${options.changedFiles.length} changed files`); - } - if (options.releaseFilter) { - parts.push(`release ${options.releaseFilter}`); - } - return parts.join(', '); -} -// ═══════════════════════════════════════════════════════════════════════════ -// Section Builders -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Build PR summary section - */ -function buildPrSummary(patterns, options) { - const completed = patterns.filter((p) => isPatternComplete(p.status)); - const active = patterns.filter((p) => isPatternActive(p.status)); - const rows = [ - ['Patterns in PR', String(patterns.length)], - ['Completed', String(completed.length)], - ['Active', String(active.length)], - ]; - if (options.releaseFilter) { - rows.push(['Release Tag', options.releaseFilter]); - } - if (options.changedFiles.length > 0) { - rows.push(['Files Filter', `${options.changedFiles.length} files`]); - } - return [heading(2, 'Summary'), table(['Metric', 'Value'], rows), separator()]; -} -/** - * Build changes grouped by phase - */ -function buildChangesByPhase(patterns, options) { - const sections = []; - // Group by phase - const byPhase = new Map(); - for (const pattern of patterns) { - const phaseNum = pattern.phase ?? 0; - if (!byPhase.has(phaseNum)) { - byPhase.set(phaseNum, []); - } - byPhase.get(phaseNum)?.push(pattern); - } - if (byPhase.size === 0) { - return []; - } - sections.push(heading(2, 'Changes by Phase')); - const sortedPhases = [...byPhase.keys()].sort((a, b) => a - b); - for (const phaseNum of sortedPhases) { - const phasePatterns = byPhase.get(phaseNum) ?? []; - sections.push(heading(3, `Phase ${phaseNum}`)); - sections.push(...buildPatternChangesList(phasePatterns, options)); - } - return sections; -} -/** - * Build changes grouped by priority - */ -function buildChangesByPriority(patterns, options) { - const sections = []; - // Group by priority - const byPriority = new Map(); - for (const pattern of patterns) { - const priority = pattern.priority ?? 'none'; - if (!byPriority.has(priority)) { - byPriority.set(priority, []); - } - byPriority.get(priority)?.push(pattern); - } - if (byPriority.size === 0) { - return []; - } - sections.push(heading(2, 'Changes by Priority')); - // Sort priorities: high, medium, low, none - const priorityOrder = ['high', 'medium', 'low', 'none']; - const sortedPriorities = [...byPriority.keys()].sort((a, b) => priorityOrder.indexOf(a) - priorityOrder.indexOf(b)); - for (const priority of sortedPriorities) { - const priorityPatterns = byPriority.get(priority) ?? []; - const emoji = priority === 'high' ? '!' : priority === 'medium' ? '-' : ''; - sections.push(heading(3, `${emoji} ${priority.charAt(0).toUpperCase() + priority.slice(1)} Priority`)); - sections.push(...buildPatternChangesList(priorityPatterns, options)); - } - return sections; -} -/** - * Build flat changes list (no grouping) - */ -function buildFlatChangesList(patterns, options) { - const sections = []; - sections.push(heading(2, 'Changes')); - sections.push(...buildPatternChangesList(patterns, options)); - return sections; -} -/** - * Build list of pattern changes - */ -function buildPatternChangesList(patterns, options) { - const sections = []; - const sorted = sortByPhaseAndName([...patterns]); - for (const pattern of sorted) { - const emoji = getStatusEmoji(pattern.status); - const name = getDisplayName(pattern); - const status = normalizeStatus(pattern.status); - sections.push(heading(4, `${emoji} ${name}`)); - // Metadata - const metaRows = [['Status', status]]; - if (pattern.phase !== undefined) { - metaRows.push(['Phase', String(pattern.phase)]); - } - if (options.includeBusinessValue) { - const businessValue = formatBusinessValue(pattern.businessValue); - if (businessValue) { - metaRows.push(['Business Value', businessValue]); - } - } - sections.push(table(['Property', 'Value'], metaRows)); - // Description - if (pattern.directive.description) { - const summary = extractSummary(pattern.directive.description, pattern.patternName); - if (summary) { - sections.push(paragraph(summary)); - } - } - // Deliverables (if configured) - if (options.includeDeliverables && pattern.deliverables && pattern.deliverables.length > 0) { - // Filter deliverables by release if releaseFilter is set - let deliverables = pattern.deliverables; - if (options.releaseFilter) { - deliverables = deliverables.filter((d) => d.release === options.releaseFilter); - } - if (deliverables.length > 0) { - const deliverableItems = deliverables.map((d) => { - const statusEmoji = getDeliverableStatusEmoji(d.status); - const release = d.release ? ` (${d.release})` : ''; - return `${statusEmoji} ${d.name}${release}`; - }); - sections.push(paragraph('**Deliverables:**'), list(deliverableItems)); - } - } - // Acceptance Criteria (scenarios with steps, DataTables, DocStrings) - sections.push(...renderAcceptanceCriteria(pattern.scenarios)); - // Business Rules (from Gherkin Rule: keyword) - sections.push(...renderBusinessRulesSection(pattern.rules)); - } - sections.push(separator()); - return sections; -} -/** - * Build review checklist section - */ -function buildReviewChecklist(patterns) { - const sections = []; - sections.push(heading(2, 'Review Checklist')); - // Generate checklist items based on patterns - const checklistItems = []; - // General items - checklistItems.push('- [ ] Code follows project conventions'); - checklistItems.push('- [ ] Tests added/updated for changes'); - checklistItems.push('- [ ] Documentation updated if needed'); - // Pattern-specific items - const hasCompletedPatterns = patterns.some((p) => isPatternComplete(p.status)); - if (hasCompletedPatterns) { - checklistItems.push('- [ ] Completed patterns verified working'); - } - const hasActivePatterns = patterns.some((p) => isPatternActive(p.status)); - if (hasActivePatterns) { - checklistItems.push('- [ ] Active work is in a consistent state'); - } - // Check for dependencies - const hasDependencies = patterns.some((p) => p.dependsOn !== undefined && p.dependsOn.length > 0); - if (hasDependencies) { - checklistItems.push('- [ ] Dependencies are satisfied'); - } - // Check for deliverables - const hasDeliverables = patterns.some((p) => p.deliverables !== undefined && p.deliverables.length > 0); - if (hasDeliverables) { - checklistItems.push('- [ ] Deliverables tracked in feature files'); - } - sections.push(paragraph(checklistItems.join('\n'))); - sections.push(separator()); - return sections; -} -/** - * Build dependencies section for PR - */ -function buildPrDependencies(patterns) { - const sections = []; - // Collect all dependencies - const allDependsOn = []; - const allEnables = []; - for (const pattern of patterns) { - if (pattern.dependsOn) { - allDependsOn.push(...pattern.dependsOn); - } - if (pattern.enables) { - allEnables.push(...pattern.enables); - } - } - // Deduplicate - const uniqueDependsOn = [...new Set(allDependsOn)]; - const uniqueEnables = [...new Set(allEnables)]; - if (uniqueDependsOn.length === 0 && uniqueEnables.length === 0) { - return []; - } - sections.push(heading(2, 'Dependencies')); - if (uniqueDependsOn.length > 0) { - sections.push(heading(3, 'Depends On'), list(uniqueDependsOn.map((d) => `Requires: ${d}`))); - } - if (uniqueEnables.length > 0) { - sections.push(heading(3, 'Enables'), list(uniqueEnables.map((e) => `Unlocks: ${e}`))); - } - sections.push(separator()); - return sections; -} -//# sourceMappingURL=pr-changes.js.map \ No newline at end of file diff --git a/dist/renderable/codecs/pr-changes.js.map b/dist/renderable/codecs/pr-changes.js.map deleted file mode 100644 index c1c9e413..00000000 --- a/dist/renderable/codecs/pr-changes.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pr-changes.js","sourceRoot":"","sources":["../../../src/renderable/codecs/pr-changes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,mBAAmB,GAEpB,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAGL,OAAO,EACP,SAAS,EACT,SAAS,EACT,KAAK,EACL,IAAI,EACJ,QAAQ,GACT,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC9F,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,EACL,cAAc,EACd,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAyB,oBAAoB,EAAE,YAAY,EAAE,MAAM,iBAAiB,C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AAE,EAAE,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAC9F,CAAC;IAED,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC7B,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,SAAS,CAAC,EAAE,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACxF,CAAC;IAED,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;IAE3B,OAAO,QAAQ,CAAC;AAClB,CAAC"} \ No newline at end of file diff --git a/dist/renderable/codecs/reference.d.ts b/dist/renderable/codecs/reference.d.ts deleted file mode 100644 index 87ffd079..00000000 --- a/dist/renderable/codecs/reference.d.ts +++ /dev/null @@ -1,165 +0,0 @@ -/** - * @libar-docs - * @libar-docs-pattern ReferenceDocumentCodec - * @libar-docs-status active - * @libar-docs-implements CodecDrivenReferenceGeneration - * - * ## Parameterized Reference Document Codec - * - * A single codec factory that creates reference document codecs from - * configuration objects. Convention content is sourced from - * decision records tagged with @libar-docs-convention. - * - * ### When to Use - * - * - When generating reference documentation from convention-tagged decisions - * - When creating both detailed (docs/) and summary (_claude-md/) outputs - * - * ### Factory Pattern - * - * ```typescript - * const codec = createReferenceCodec(config, { detailLevel: 'detailed' }); - * const doc = codec.decode(dataset); - * ``` - */ -import { type MasterDataset } from '../../validation-schemas/master-dataset.js'; -import { type SectionBlock } from '../schema.js'; -import { type BaseCodecOptions, type DetailLevel, type DocumentCodec } from './types/base.js'; -import type { ShapeSelector } from './shape-matcher.js'; -/** Content source identifiers for hardcoded domain diagrams */ -export declare const DIAGRAM_SOURCE_VALUES: readonly ["fsm-lifecycle", "generation-pipeline"]; -/** Discriminated source type for DiagramScope.source */ -export type DiagramSource = (typeof DIAGRAM_SOURCE_VALUES)[number]; -/** - * Scoped diagram filter for dynamic mermaid generation from relationship metadata. - * - * Patterns matching the filter become diagram nodes. Immediate neighbors - * (connected via relationship edges but not in scope) appear with a distinct style. - */ -export interface DiagramScope { - /** Bounded contexts to include (matches pattern.archContext) */ - readonly archContext?: readonly string[]; - /** Explicit pattern names to include */ - readonly patterns?: readonly string[]; - /** Cross-cutting include tags (matches pattern.include entries) */ - readonly include?: readonly string[]; - /** Architectural layers to include (matches pattern.archLayer) */ - readonly archLayer?: readonly string[]; - /** Mermaid graph direction (default: 'TB') */ - readonly direction?: 'TB' | 'LR'; - /** Section heading for this diagram (default: 'Component Overview') */ - readonly title?: string; - /** Mermaid diagram type (default: 'graph' for flowchart) */ - readonly diagramType?: 'graph' | 'sequenceDiagram' | 'stateDiagram-v2' | 'C4Context' | 'classDiagram'; - /** Show relationship type labels on edges (default: true) */ - readonly showEdgeLabels?: boolean; - /** Content source override. When set, uses hardcoded domain content - * instead of computing from pattern relationships. - * - 'fsm-lifecycle': FSM state transitions with protection levels - * - 'generation-pipeline': 4-stage generation pipeline temporal flow - */ - readonly source?: DiagramSource; -} -/** - * Configuration for a reference document type. - * - * Each config object defines one reference document's composition. - * Convention tags, shape sources, and behavior tags control content assembly. - */ -export interface ReferenceDocConfig { - /** Document title (e.g., "Process Guard Reference") */ - readonly title: string; - /** Convention tag values to extract from decision records */ - readonly conventionTags: readonly string[]; - /** - * Glob patterns for TypeScript shape extraction sources. - * Resolved via in-memory matching against pattern.source.file (AD-6). - */ - readonly shapeSources: readonly string[]; - /** Categories to filter behavior patterns from MasterDataset */ - readonly behaviorCategories: readonly string[]; - /** Optional scoped diagram generation from relationship metadata */ - readonly diagramScope?: DiagramScope; - /** Multiple scoped diagrams. Takes precedence over diagramScope. */ - readonly diagramScopes?: readonly DiagramScope[]; - /** Target _claude-md/ directory for summary output */ - readonly claudeMdSection: string; - /** Output filename for detailed docs (in docs/) */ - readonly docsFilename: string; - /** Output filename for summary _claude-md module */ - readonly claudeMdFilename: string; - /** DD-3/DD-6: Fine-grained shape selectors for declaration-level filtering */ - readonly shapeSelectors?: readonly ShapeSelector[]; - /** DD-1 (CrossCuttingDocumentInclusion): Include-tag values for cross-cutting content routing */ - readonly includeTags?: readonly string[]; - /** - * Product area filter (ADR-001 canonical values). - * When set, pre-filters all content sources to patterns with matching productArea. - * Auto-generates diagram scopes from productArea→archContext mapping if no - * explicit diagramScopes are provided. - */ - readonly productArea?: string; - /** - * Exclude patterns whose source.file starts with any of these prefixes. - * Used to filter ephemeral planning specs from behavior sections. - * @example ['delivery-process/specs/'] - */ - readonly excludeSourcePaths?: readonly string[]; -} -/** - * Maps canonical product area values to their associated archContext values. - * Product areas are Gherkin-side tags; archContexts are TypeScript-side tags. - * This mapping bridges the two tagging domains for diagram scoping. - */ -export declare const PRODUCT_AREA_ARCH_CONTEXT_MAP: Readonly>; -/** - * Product area metadata for intro sections and index generation. - * - * Each area has a reader-facing question (from ADR-001), a coverage summary, - * an intro paragraph synthesized from executable specs, key invariants - * curated from business rules, and the most important patterns in the area. - */ -export interface ProductAreaMeta { - /** Reader-facing question (from ADR-001 canonical values) */ - readonly question: string; - /** Comma-separated coverage summary */ - readonly covers: string; - /** 2-4 sentence intro explaining what this area does and why it matters */ - readonly intro: string; - /** Live diagram scopes generated from annotation data (overrides auto-generated diagram) */ - readonly diagramScopes?: readonly DiagramScope[]; - /** Key invariants to surface prominently (curated from executable specs) */ - readonly keyInvariants: readonly string[]; - /** Key patterns in this area */ - readonly keyPatterns: readonly string[]; -} -/** - * ADR-001 canonical product area metadata for intro sections. - */ -export declare const PRODUCT_AREA_META: Readonly>; -export interface ReferenceCodecOptions extends BaseCodecOptions { - /** Override detail level (default: 'standard') */ - readonly detailLevel?: DetailLevel; -} -/** - * Creates a reference document codec from configuration. - * - * The codec composes a RenderableDocument from up to four sources: - * 1. Convention content from convention-tagged decision records - * 2. Scoped relationship diagram (if diagramScope configured) - * 3. TypeScript shapes from patterns matching shapeSources globs - * 4. Behavior content from category-tagged patterns - * - * @param config - Reference document configuration - * @param options - Codec options including DetailLevel - */ -export declare function createReferenceCodec(config: ReferenceDocConfig, options?: ReferenceCodecOptions): DocumentCodec; -/** - * Build a scoped relationship diagram from DiagramScope config. - * - * Dispatches to type-specific builders based on scope.diagramType (DD-6). - * Scope patterns are grouped by archContext in subgraphs (flowchart) or - * rendered as participants/states (sequence/state diagrams). - */ -export declare function buildScopedDiagram(dataset: MasterDataset, scope: DiagramScope): SectionBlock[]; -//# sourceMappingURL=reference.d.ts.map \ No newline at end of file diff --git a/dist/renderable/codecs/reference.d.ts.map b/dist/renderable/codecs/reference.d.ts.map deleted file mode 100644 index a7d03353..00000000 --- a/dist/renderable/codecs/reference.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"reference.d.ts","sourceRoot":"","sources":["../../../src/renderable/codecs/reference.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAGH,OAAO,EAEL,KAAK,aAAa,EACnB,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAEL,KAAK,YAAY,EAWlB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,aAAa,EAGnB,MAAM,iBAAiB,CAAC;AAUzB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAmBxD,+DAA+D;AAC/D,eAAO,MAAM,qBAAqB,mDAAoD,CAAC;AAEvF,wDAAwD;AACxD,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAMnE;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,gEAAgE;IAChE,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAEzC,wCAAwC;IACxC,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAEtC,mEAAmE;IACnE,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAA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git a/dist/renderable/codecs/reference.js b/dist/renderable/codecs/reference.js deleted file mode 100644 index 3c86f2a8..00000000 --- a/dist/renderable/codecs/reference.js +++ /dev/null @@ -1,1327 +0,0 @@ -/** - * @libar-docs - * @libar-docs-pattern ReferenceDocumentCodec - * @libar-docs-status active - * @libar-docs-implements CodecDrivenReferenceGeneration - * - * ## Parameterized Reference Document Codec - * - * A single codec factory that creates reference document codecs from - * configuration objects. Convention content is sourced from - * decision records tagged with @libar-docs-convention. - * - * ### When to Use - * - * - When generating reference documentation from convention-tagged decisions - * - When creating both detailed (docs/) and summary (_claude-md/) outputs - * - * ### Factory Pattern - * - * ```typescript - * const codec = createReferenceCodec(config, { detailLevel: 'detailed' }); - * const doc = codec.decode(dataset); - * ``` - */ -import { z } from 'zod'; -import { MasterDatasetSchema, } from '../../validation-schemas/master-dataset.js'; -import { heading, paragraph, separator, table, code, list, mermaid, collapsible, linkOut, document, } from '../schema.js'; -import { DEFAULT_BASE_OPTIONS, mergeOptions, } from './types/base.js'; -import { RenderableDocumentOutputSchema } from './shared-schema.js'; -import { extractConventions, extractConventionsFromPatterns, extractTablesFromDescription, } from './convention-extractor.js'; -import { parseBusinessRuleAnnotations, truncateText } from './helpers.js'; -import { extractShapesFromDataset, filterShapesBySelectors } from './shape-matcher.js'; -import { sanitizeNodeId, EDGE_STYLES, EDGE_LABELS, SEQUENCE_ARROWS, formatNodeDeclaration, } from './diagram-utils.js'; -import { getPatternName } from '../../api/pattern-helpers.js'; -import { VALID_TRANSITIONS } from '../../validation/fsm/transitions.js'; -import { PROTECTION_LEVELS } from '../../validation/fsm/states.js'; -// ============================================================================ -// Shared Constants -// ============================================================================ -/** Content source identifiers for hardcoded domain diagrams */ -export const DIAGRAM_SOURCE_VALUES = ['fsm-lifecycle', 'generation-pipeline']; -// ============================================================================ -// Product Area → archContext Mapping (ADR-001) -// ============================================================================ -/** - * Maps canonical product area values to their associated archContext values. - * Product areas are Gherkin-side tags; archContexts are TypeScript-side tags. - * This mapping bridges the two tagging domains for diagram scoping. - */ -export const PRODUCT_AREA_ARCH_CONTEXT_MAP = { - Annotation: ['scanner', 'extractor', 'taxonomy'], - Configuration: ['config'], - Generation: ['generator', 'renderer'], - Validation: ['validation', 'lint'], - DataAPI: ['api', 'cli'], - CoreTypes: [], - Process: [], -}; -/** - * ADR-001 canonical product area metadata for intro sections. - */ -export const PRODUCT_AREA_META = { - Annotation: { - question: 'How do I annotate code?', - covers: 'Scanning, extraction, tag parsing, dual-source', - intro: 'The annotation system is the ingestion boundary — it transforms annotated TypeScript ' + - 'and Gherkin files into `ExtractedPattern[]` objects that feed the entire downstream ' + - 'pipeline. Two parallel scanning paths (TypeScript AST + Gherkin parser) converge ' + - 'through dual-source merging. The system is fully data-driven: the `TagRegistry` ' + - 'defines all tags, formats, and categories — adding a new annotation requires only ' + - 'a registry entry, zero parser changes.', - diagramScopes: [ - { - archContext: ['scanner', 'extractor'], - diagramType: 'C4Context', - title: 'Scanning & Extraction Boundary', - }, - { - archContext: ['scanner', 'extractor'], - direction: 'LR', - title: 'Annotation Pipeline', - }, - ], - keyInvariants: [ - 'Source ownership enforced: `uses`/`used-by`/`category` belong in TypeScript only; `depends-on`/`quarter`/`team`/`phase` belong in Gherkin only. Anti-pattern detector validates at lint time', - 'Data-driven tag dispatch: Both AST parser and Gherkin parser use `TagRegistry.metadataTags` to determine extraction. 6 format types (`value`/`enum`/`csv`/`number`/`flag`/`quoted-value`) cover all tag shapes — zero parser changes for new tags', - 'Pipeline data preservation: Gherkin `Rule:` blocks, deliverables, scenarios, and all metadata flow through scanner → extractor → `ExtractedPattern` → generators without data loss', - 'Dual-source merge with conflict detection: Same pattern name in both TypeScript and Gherkin produces a merge conflict error. Phase mismatches between sources produce validation errors', - ], - keyPatterns: [ - 'PatternRelationshipModel', - 'ShapeExtraction', - 'DualSourceExtraction', - 'GherkinRulesSupport', - 'DeclarationLevelShapeTagging', - 'CrossSourceValidation', - 'ExtractionPipelineEnhancementsTesting', - ], - }, - Configuration: { - question: 'How do I configure the tool?', - covers: 'Config loading, presets, resolution, source merging, schema validation', - intro: 'Configuration is the entry boundary — it transforms a user-authored ' + - '`delivery-process.config.ts` file into a fully resolved `DeliveryProcessInstance` ' + - 'that powers the entire pipeline. The flow is: `defineConfig()` provides type-safe ' + - 'authoring (Vite convention, zero validation), `ConfigLoader` discovers and loads ' + - 'the file, `ProjectConfigSchema` validates via Zod, `ConfigResolver` applies defaults ' + - 'and merges stubs into sources, and `DeliveryProcessFactory` builds the final instance ' + - 'with `TagRegistry` and `RegexBuilders`. Three presets define escalating taxonomy ' + - 'complexity — from 3 categories (`generic`, `libar-generic`) to 21 (`ddd-es-cqrs`). ' + - '`SourceMerger` computes per-generator source overrides, enabling generators like ' + - 'changelog to pull from different feature sets than the base config.', - diagramScopes: [ - { - archContext: ['config'], - diagramType: 'C4Context', - title: 'Configuration Loading Boundary', - }, - { - archContext: ['config'], - direction: 'LR', - title: 'Configuration Resolution Pipeline', - }, - ], - keyInvariants: [ - 'Preset-based taxonomy: `generic` (3 categories, `@docs-`), `libar-generic` (3 categories, `@libar-docs-`), `ddd-es-cqrs` (21 categories, full DDD). Presets replace base categories entirely — they define prefix, categories, and metadata tags as a unit', - 'Resolution pipeline: defineConfig() → ConfigLoader → ProjectConfigSchema (Zod) → ConfigResolver → DeliveryProcessFactory → DeliveryProcessInstance. Each stage has a single responsibility', - 'Stubs merged at resolution time: Stub directory globs are appended to typescript sources, making stubs transparent to the downstream pipeline', - 'Source override composition: SourceMerger applies per-generator overrides (`replaceFeatures`, `additionalFeatures`, `additionalInput`) to base sources. Exclude is always inherited from base', - ], - keyPatterns: [ - 'DeliveryProcessFactory', - 'ConfigLoader', - 'ConfigResolver', - 'DefineConfig', - 'ConfigurationPresets', - 'SourceMerger', - ], - }, - Generation: { - question: 'How does code become docs?', - covers: 'Codecs, generators, rendering, diagrams', - intro: 'The generation pipeline transforms annotated source code into markdown documents. ' + - 'It follows a four-stage architecture: Scanner → Extractor → Transformer → Codec. ' + - 'Codecs are pure functions — given a MasterDataset, they produce a RenderableDocument ' + - 'without side effects. CompositeCodec composes multiple codecs into a single document.', - keyInvariants: [ - 'Codec purity: Every codec is a pure function (dataset in, document out). No side effects, no filesystem access. Same input always produces same output', - 'Config-driven generation: A single `ReferenceDocConfig` produces a complete document. Content sources compose in fixed order: conventions, diagrams, shapes, behaviors', - 'RenderableDocument IR: Codecs express intent ("this is a table"), the renderer handles syntax ("pipe-delimited markdown"). Switching output format requires only a new renderer', - ], - keyPatterns: [ - 'ADR005CodecBasedMarkdownRendering', - 'CodecDrivenReferenceGeneration', - 'CrossCuttingDocumentInclusion', - 'ArchitectureDiagramGeneration', - 'ScopedArchitecturalView', - ], - }, - Validation: { - question: 'How is the workflow enforced?', - covers: 'FSM, DoD, anti-patterns, process guard, lint', - intro: 'Validation is the enforcement boundary — it ensures that every change to annotated source files ' + - 'respects the delivery lifecycle rules defined by the FSM, protection levels, and scope constraints. ' + - 'The system operates in three layers: the FSM validator checks status transitions against a 4-state ' + - 'directed graph, the Process Guard orchestrates commit-time validation using a Decider pattern ' + - '(state derived from annotations, not stored separately), and the lint engine provides pluggable ' + - 'rule execution with pretty and JSON output. Anti-pattern detection enforces dual-source ownership ' + - 'boundaries — `@libar-docs-uses` belongs on TypeScript, `@libar-docs-depends-on` belongs on Gherkin — ' + - 'preventing cross-domain tag confusion that causes documentation drift. Definition of Done validation ' + - 'ensures completed patterns have all deliverables marked done and at least one acceptance-criteria scenario.', - diagramScopes: [ - { - archContext: ['validation', 'lint'], - diagramType: 'C4Context', - title: 'Validation & Lint Boundary', - }, - { - archContext: ['validation', 'lint'], - direction: 'LR', - title: 'Enforcement Pipeline', - }, - ], - keyInvariants: [ - 'Protection levels: `roadmap`/`deferred` = none (fully editable), `active` = scope-locked (no new deliverables), `completed` = hard-locked (requires `@libar-docs-unlock-reason`)', - 'Valid FSM transitions: Only roadmap→active, roadmap→deferred, active→completed, active→roadmap, deferred→roadmap. Completed is terminal', - 'Decider pattern: All validation is (state, changes, options) → result. State is derived from annotations, not maintained separately', - 'Dual-source ownership: Anti-pattern detection enforces tag boundaries — `uses` on TypeScript (runtime deps), `depends-on`/`quarter`/`team` on Gherkin (planning metadata). Violations are flagged before they cause documentation drift', - ], - keyPatterns: [ - 'ProcessGuardLinter', - 'PhaseStateMachineValidation', - 'DoDValidation', - 'StepLintVitestCucumber', - 'ProgressiveGovernance', - ], - }, - DataAPI: { - question: 'How do I query process state?', - covers: 'Process state API, stubs, context assembly, CLI', - intro: 'The Data API provides direct terminal access to delivery process state. ' + - 'It replaces reading generated markdown or launching explore agents — targeted queries ' + - 'use 5-10x less context. The `context` command assembles curated bundles tailored to ' + - 'session type (planning, design, implement).', - keyInvariants: [ - 'One-command context assembly: `context --session ` returns metadata + file paths + dependency status + architecture position in ~1.5KB', - 'Session type tailoring: `planning` (~500B, brief + deps), `design` (~1.5KB, spec + stubs + deps), `implement` (deliverables + FSM + tests)', - 'Direct API queries replace doc reading: JSON output is 5-10x smaller than generated docs', - ], - keyPatterns: [ - 'DataAPIContextAssembly', - 'ProcessStateAPICLI', - 'DataAPIDesignSessionSupport', - 'DataAPIRelationshipGraph', - 'DataAPIOutputShaping', - ], - }, - CoreTypes: { - question: 'What foundational types exist?', - covers: 'Result monad, error factories, branded types, string utils', - intro: 'CoreTypes provides the foundational type system used across all other areas. Three pillars ' + - 'enforce discipline at compile time: the Result monad replaces try/catch with explicit ' + - 'error handling — functions return `Result.ok(value)` or `Result.err(error)` instead of ' + - 'throwing. The DocError discriminated union provides structured error context with type, ' + - 'file, line, and reason fields, enabling exhaustive pattern matching in error handlers. ' + - 'Branded types create nominal typing from structural TypeScript — `PatternId`, ' + - '`CategoryName`, and `SourceFilePath` are compile-time distinct despite all being strings. ' + - 'String utilities handle slugification and case conversion with acronym-aware title casing.', - diagramScopes: [ - { - include: ['core-types'], - diagramType: 'C4Context', - title: 'Core Type System', - }, - { - include: ['core-types'], - direction: 'LR', - title: 'Error Handling Flow', - }, - ], - keyInvariants: [ - 'Result over try/catch: All functions return `Result` instead of throwing. Compile-time verification that errors are handled. `isOk`/`isErr` type guards enable safe narrowing', - 'DocError discriminated union: 12 structured error types with `type` discriminator field. `isDocError` type guard for safe classification. Specialized union aliases (`ScanError`, `ExtractionError`) scope error handling per operation', - 'Branded nominal types: `Branded` creates compile-time distinct types from structural TypeScript. Prevents mixing `PatternId` with `CategoryName` even though both are `string` at runtime', - 'String transformation consistency: `slugify` produces URL-safe identifiers, `camelCaseToTitleCase` preserves acronyms (e.g., "APIEndpoint" becomes "API Endpoint"), `toKebabCase` handles consecutive uppercase correctly', - ], - keyPatterns: [ - 'ResultMonad', - 'ErrorHandlingUnification', - 'ErrorFactories', - 'StringUtils', - 'KebabCaseSlugs', - ], - }, - Process: { - question: 'How does the session workflow work?', - covers: 'Session lifecycle, handoffs, FSM alignment, governance decisions, conventions', - intro: 'Process defines the USDP-inspired session workflow that governs how work moves through ' + - 'the delivery lifecycle. Three session types (planning, design, implementation) have fixed ' + - 'input/output contracts: planning creates roadmap specs from pattern briefs, design produces ' + - 'code stubs and decision records, and implementation writes code against scope-locked specs. ' + - 'Git is the event store — documentation artifacts are projections of annotated source code, ' + - 'not hand-maintained files. The FSM enforces state transitions (roadmap → active → completed) ' + - 'with escalating protection levels, while handoff templates preserve context across LLM session ' + - 'boundaries. ADR-003 established that TypeScript source owns pattern identity; tier 1 specs ' + - 'are ephemeral planning documents that lose value after completion.', - diagramScopes: [ - { - source: 'fsm-lifecycle', - title: 'Delivery Lifecycle FSM', - }, - { - include: ['process-workflow'], - direction: 'LR', - title: 'Process Pattern Relationships', - }, - ], - keyInvariants: [ - 'TypeScript source owns pattern identity: `@libar-docs-pattern` in TypeScript defines the pattern. Tier 1 specs are ephemeral working documents', - '7 canonical product-area values: Annotation, Configuration, Generation, Validation, DataAPI, CoreTypes, Process — reader-facing sections, not source modules', - 'Two distinct status domains: Pattern FSM status (4 values) vs. deliverable status (6 values). Never cross domains', - 'Session types define capabilities: planning creates specs, design creates stubs, implementation writes code. Each session type has a fixed input/output contract enforced by convention', - ], - keyPatterns: [ - 'ADR001TaxonomyCanonicalValues', - 'ADR003SourceFirstPatternArchitecture', - 'MvpWorkflowImplementation', - 'SessionHandoffs', - ], - }, -}; -const DEFAULT_REFERENCE_OPTIONS = { - ...DEFAULT_BASE_OPTIONS, - detailLevel: 'standard', -}; -// ============================================================================ -// Codec Factory -// ============================================================================ -/** - * Creates a reference document codec from configuration. - * - * The codec composes a RenderableDocument from up to four sources: - * 1. Convention content from convention-tagged decision records - * 2. Scoped relationship diagram (if diagramScope configured) - * 3. TypeScript shapes from patterns matching shapeSources globs - * 4. Behavior content from category-tagged patterns - * - * @param config - Reference document configuration - * @param options - Codec options including DetailLevel - */ -export function createReferenceCodec(config, options) { - const opts = mergeOptions(DEFAULT_REFERENCE_OPTIONS, options); - return z.codec(MasterDatasetSchema, RenderableDocumentOutputSchema, { - decode: (dataset) => { - const sections = []; - // Product area filtering: when set, pre-filter and auto-derive content sources - if (config.productArea !== undefined) { - return decodeProductArea(dataset, config, opts); - } - // DD-1 (CrossCuttingDocumentInclusion): Pre-compute include set for additive merging - const includeSet = config.includeTags !== undefined && config.includeTags.length > 0 - ? new Set(config.includeTags) - : undefined; - // 1. Convention content from tagged decision records - const conventions = extractConventions(dataset, config.conventionTags); - // DD-1: Merge include-tagged convention patterns (additive) - if (includeSet !== undefined) { - const existingNames = new Set(conventions.flatMap((b) => b.sourceDecisions)); - const includedConventionPatterns = dataset.patterns.filter((p) => !existingNames.has(p.name) && - p.include?.some((v) => includeSet.has(v)) === true && - p.convention !== undefined && - p.convention.length > 0); - if (includedConventionPatterns.length > 0) { - // Build bundles from included convention patterns - const includedConventions = extractConventionsFromPatterns(includedConventionPatterns); - conventions.push(...includedConventions); - } - } - if (conventions.length > 0) { - sections.push(...buildConventionSections(conventions, opts.detailLevel)); - } - // 2. Scoped relationship diagrams (normalize singular to array) - if (opts.detailLevel !== 'summary') { - const scopes = config.diagramScopes ?? (config.diagramScope !== undefined ? [config.diagramScope] : []); - for (const scope of scopes) { - const diagramSections = buildScopedDiagram(dataset, scope); - if (diagramSections.length > 0) { - sections.push(...diagramSections); - } - } - } - // 3. Shape extraction: combine shapeSources (coarse) + shapeSelectors (fine) - { - const allShapes = config.shapeSources.length > 0 - ? [...extractShapesFromDataset(dataset, config.shapeSources)] - : []; - // DD-3/DD-6: Fine-grained selector-based filtering - if (config.shapeSelectors !== undefined && config.shapeSelectors.length > 0) { - const selectorShapes = filterShapesBySelectors(dataset, config.shapeSelectors); - const seenNames = new Set(allShapes.map((s) => s.name)); - for (const shape of selectorShapes) { - if (!seenNames.has(shape.name)) { - seenNames.add(shape.name); - allShapes.push(shape); - } - } - } - // DD-1: Merge include-tagged shapes (additive) - if (includeSet !== undefined) { - const seenNames = new Set(allShapes.map((s) => s.name)); - for (const pattern of dataset.patterns) { - if (pattern.extractedShapes === undefined || pattern.extractedShapes.length === 0) - continue; - for (const shape of pattern.extractedShapes) { - if (!seenNames.has(shape.name) && - shape.includes?.some((v) => includeSet.has(v)) === true) { - seenNames.add(shape.name); - allShapes.push(shape); - } - } - } - } - if (allShapes.length > 0) { - sections.push(...buildShapeSections(allShapes, opts.detailLevel)); - } - } - // 4. Behavior content from tagged patterns - const behaviorPatterns = config.behaviorCategories.length > 0 - ? dataset.patterns.filter((p) => config.behaviorCategories.includes(p.category)) - : []; - // DD-1: Merge include-tagged behavior patterns (additive) - if (includeSet !== undefined) { - const existingNames = new Set(behaviorPatterns.map((p) => p.name)); - const includedBehaviors = dataset.patterns.filter((p) => !existingNames.has(p.name) && - p.include?.some((v) => includeSet.has(v)) === true && - (p.directive.description.length > 0 || (p.rules !== undefined && p.rules.length > 0))); - behaviorPatterns.push(...includedBehaviors); - } - if (behaviorPatterns.length > 0) { - sections.push(...buildBehaviorSectionsFromPatterns(behaviorPatterns, opts.detailLevel)); - } - if (sections.length === 0) { - const diagnostics = []; - if (config.conventionTags.length > 0) { - diagnostics.push(`conventions [${config.conventionTags.join(', ')}]`); - } - if (config.shapeSources.length > 0) { - diagnostics.push(`shapes [${config.shapeSources.join(', ')}]`); - } - if (config.shapeSelectors !== undefined && config.shapeSelectors.length > 0) { - diagnostics.push(`selectors [${config.shapeSelectors.length} selectors]`); - } - if (config.behaviorCategories.length > 0) { - diagnostics.push(`behaviors [${config.behaviorCategories.join(', ')}]`); - } - if (includeSet !== undefined) { - diagnostics.push(`includeTags [${[...includeSet].join(', ')}]`); - } - sections.push(paragraph(`No content found. Sources checked: ${diagnostics.join('; ')}.`)); - } - return document(config.title, sections, { - purpose: `Reference document: ${config.title}`, - detailLevel: opts.detailLevel === 'summary' ? 'Compact summary' : 'Full reference', - }); - }, - encode: () => { - throw new Error('ReferenceDocumentCodec is decode-only'); - }, - }); -} -// ============================================================================ -// Product Area Decode Path -// ============================================================================ -/** - * Decode a product-area-scoped reference document. - * - * When `config.productArea` is set, this function replaces the standard decode - * path. It pre-filters all patterns by product area and auto-derives content - * sources from the filtered set rather than relying on explicit config arrays. - * - * Document structure: - * 1. Intro (reader question + coverage from ADR-001 metadata) - * 2. Invariant rules from executable specs (conventions + behavior rules) - * 3. Architecture diagrams (auto-scoped via productArea→archContext mapping) - * 4. Key API types (shapes from TypeScript patterns in this area) - * 5. Behavior specifications (all patterns with rules/descriptions) - */ -function decodeProductArea(dataset, config, opts) { - const area = config.productArea; - if (area === undefined) { - return document('Error', [paragraph('No product area specified.')], {}); - } - const sections = []; - // Pre-filter patterns by product area - const areaPatterns = dataset.patterns.filter((p) => p.productArea === area); - // Also collect TypeScript patterns by archContext mapping (for shapes + diagrams) - const archContexts = PRODUCT_AREA_ARCH_CONTEXT_MAP[area] ?? []; - const contextSet = new Set(archContexts); - const tsPatterns = contextSet.size > 0 - ? dataset.patterns.filter((p) => p.archContext !== undefined && contextSet.has(p.archContext)) - : []; - // Combined set of all relevant patterns (deduplicated) - const allRelevantNames = new Set([ - ...areaPatterns.map((p) => p.name), - ...tsPatterns.map((p) => p.name), - ]); - // 1. Intro section from ADR-001 metadata with key invariants - const meta = PRODUCT_AREA_META[area]; - if (meta !== undefined) { - sections.push(paragraph(`**${meta.question}** ${meta.intro}`)); - if (meta.keyInvariants.length > 0) { - sections.push(heading(2, 'Key Invariants')); - sections.push(list([...meta.keyInvariants])); - } - sections.push(separator()); - } - // 2. Convention/invariant content from area patterns with convention tags - const conventionPatterns = areaPatterns.filter((p) => p.convention !== undefined && p.convention.length > 0); - if (conventionPatterns.length > 0) { - const conventions = extractConventionsFromPatterns(conventionPatterns); - if (conventions.length > 0) { - sections.push(...buildConventionSections(conventions, opts.detailLevel)); - } - } - // 3. Architecture diagrams — priority: config > meta > auto-generate - if (opts.detailLevel !== 'summary') { - const scopes = config.diagramScopes ?? - (config.diagramScope !== undefined ? [config.diagramScope] : undefined) ?? - meta?.diagramScopes ?? - []; - if (scopes.length > 0) { - // Explicit scopes from config or meta — always render - for (const scope of scopes) { - const diagramSections = buildScopedDiagram(dataset, scope); - if (diagramSections.length > 0) { - sections.push(...diagramSections); - } - } - } - else if (contextSet.size > 0) { - // Auto-generate fallback — only when archContext mappings exist - const autoScope = { - archContext: archContexts, - direction: 'TB', - title: `${area} Components`, - }; - const diagramSections = buildScopedDiagram(dataset, autoScope); - if (diagramSections.length > 0) { - sections.push(...diagramSections); - } - } - } - // 4. Shapes from TypeScript patterns in this product area - { - const allShapes = []; - const seenNames = new Set(); - // Collect shapes from all patterns associated with this area - for (const pattern of dataset.patterns) { - if (!allRelevantNames.has(pattern.name)) - continue; - if (pattern.extractedShapes === undefined || pattern.extractedShapes.length === 0) - continue; - for (const shape of pattern.extractedShapes) { - if (!seenNames.has(shape.name)) { - seenNames.add(shape.name); - allShapes.push(shape); - } - } - } - // Also include shapes matched by explicit config (if any) - if (config.shapeSources.length > 0) { - for (const shape of extractShapesFromDataset(dataset, config.shapeSources)) { - if (!seenNames.has(shape.name)) { - seenNames.add(shape.name); - allShapes.push(shape); - } - } - } - if (config.shapeSelectors !== undefined && config.shapeSelectors.length > 0) { - for (const shape of filterShapesBySelectors(dataset, config.shapeSelectors)) { - if (!seenNames.has(shape.name)) { - seenNames.add(shape.name); - allShapes.push(shape); - } - } - } - if (allShapes.length > 0) { - // Prioritize interfaces and types over functions/variables to keep - // product area docs focused on key API types, not implementation details. - const kindOrder = { - interface: 0, - type: 1, - enum: 2, - function: 3, - const: 4, - }; - const sorted = [...allShapes].sort((a, b) => (kindOrder[a.kind] ?? 5) - (kindOrder[b.kind] ?? 5)); - const maxShapes = opts.detailLevel === 'detailed' ? 30 : 20; - const limited = sorted.slice(0, maxShapes); - sections.push(...buildShapeSections(limited, opts.detailLevel)); - } - } - // 5. Behavior specifications from area patterns with rules or descriptions - // Optionally exclude source paths (e.g., Tier 1 specs) via config - const behaviorPatterns = areaPatterns.filter((p) => (config.excludeSourcePaths === undefined || - config.excludeSourcePaths.length === 0 || - !config.excludeSourcePaths.some((prefix) => p.source.file.startsWith(prefix))) && - (p.directive.description.length > 0 || (p.rules !== undefined && p.rules.length > 0))); - if (behaviorPatterns.length > 0) { - sections.push(...buildBehaviorSectionsFromPatterns(behaviorPatterns, opts.detailLevel)); - } - if (sections.length === 0) { - sections.push(paragraph(`No content found for product area "${area}". ` + - `Checked ${areaPatterns.length} patterns by productArea tag, ` + - `${tsPatterns.length} patterns by archContext [${archContexts.join(', ')}].`)); - } - return document(config.title, sections, { - purpose: `${area} product area overview`, - detailLevel: opts.detailLevel === 'summary' ? 'Compact summary' : 'Full reference', - }); -} -// ============================================================================ -// Section Builders -// ============================================================================ -/** - * Build sections from convention bundles. - */ -function buildConventionSections(conventions, detailLevel) { - const sections = []; - for (const bundle of conventions) { - if (bundle.rules.length === 0) - continue; - for (const rule of bundle.rules) { - sections.push(heading(2, rule.ruleName)); - if (rule.invariant) { - sections.push(paragraph(`**Invariant:** ${rule.invariant}`)); - } - if (rule.narrative && detailLevel !== 'summary') { - sections.push(paragraph(rule.narrative)); - } - if (rule.rationale && detailLevel === 'detailed') { - sections.push(paragraph(`**Rationale:** ${rule.rationale}`)); - } - for (const tbl of rule.tables) { - const rows = tbl.rows.map((row) => tbl.headers.map((h) => row[h] ?? '')); - sections.push(table([...tbl.headers], rows)); - } - if (rule.codeExamples !== undefined && detailLevel !== 'summary') { - for (const example of rule.codeExamples) { - if (example.type === 'code' && example.language === 'mermaid') { - sections.push(mermaid(example.content)); - } - else { - sections.push(example); - } - } - } - if (rule.verifiedBy && rule.verifiedBy.length > 0 && detailLevel === 'detailed') { - sections.push(paragraph(`**Verified by:** ${rule.verifiedBy.join(', ')}`)); - } - sections.push(separator()); - } - } - return sections; -} -/** - * Build sections from a pre-filtered list of behavior patterns. - * - * DD-1 (CrossCuttingDocumentInclusion): Extracted from buildBehaviorSections to - * accept pre-merged patterns (category-selected + include-tagged). - */ -function buildBehaviorSectionsFromPatterns(patterns, detailLevel) { - const sections = []; - if (patterns.length === 0) - return sections; - sections.push(heading(2, 'Behavior Specifications')); - for (const pattern of patterns) { - sections.push(heading(3, pattern.name)); - // Cross-reference link to source file (omitted at summary level) - if (detailLevel !== 'summary') { - sections.push(linkOut(`View ${pattern.name} source`, pattern.source.file)); - } - if (pattern.directive.description && detailLevel !== 'summary') { - sections.push(paragraph(pattern.directive.description)); - } - if (pattern.rules && pattern.rules.length > 0) { - if (detailLevel === 'summary') { - // Compact table with word-boundary-aware truncation - const ruleRows = pattern.rules.map((r) => [ - r.name, - r.description ? truncateText(r.description, 120) : '', - ]); - sections.push(table(['Rule', 'Description'], ruleRows)); - } - else { - // Structured per-rule rendering with parsed annotations - // Wrap in collapsible blocks when 3+ rules for progressive disclosure - const wrapInCollapsible = pattern.rules.length >= 3; - for (const rule of pattern.rules) { - const ruleBlocks = []; - ruleBlocks.push(heading(4, rule.name)); - const annotations = parseBusinessRuleAnnotations(rule.description); - if (annotations.invariant) { - ruleBlocks.push(paragraph(`**Invariant:** ${annotations.invariant}`)); - } - if (annotations.rationale && detailLevel === 'detailed') { - ruleBlocks.push(paragraph(`**Rationale:** ${annotations.rationale}`)); - } - if (annotations.remainingContent) { - ruleBlocks.push(paragraph(annotations.remainingContent)); - } - // Extract and render tables from Rule descriptions (Gherkin or markdown) - const ruleTables = extractTablesFromDescription(rule.description); - for (const tbl of ruleTables) { - const rows = tbl.rows.map((row) => tbl.headers.map((h) => row[h] ?? '')); - ruleBlocks.push(table([...tbl.headers], rows)); - } - if (annotations.codeExamples && detailLevel === 'detailed') { - for (const example of annotations.codeExamples) { - ruleBlocks.push(example); - } - } - // Merged scenario names + verifiedBy as deduplicated list - const names = new Set(rule.scenarioNames); - if (annotations.verifiedBy) { - for (const v of annotations.verifiedBy) { - names.add(v); - } - } - if (names.size > 0) { - ruleBlocks.push(paragraph('**Verified by:**')); - ruleBlocks.push(list([...names])); - } - if (wrapInCollapsible) { - const scenarioCount = rule.scenarioNames.length; - const summary = scenarioCount > 0 ? `${rule.name} (${scenarioCount} scenarios)` : rule.name; - sections.push(collapsible(summary, ruleBlocks)); - } - else { - sections.push(...ruleBlocks); - } - } - } - } - } - sections.push(separator()); - return sections; -} -/** - * Build sections from extracted TypeScript shapes. - * - * Composition order follows AD-5: conventions → shapes → behaviors. - * - * Detail level controls: - * - summary: type name + kind table only (compact) - * - standard: names + source text code blocks - * - detailed: full source with JSDoc and property doc tables - */ -function buildShapeSections(shapes, detailLevel) { - const sections = []; - sections.push(heading(2, 'API Types')); - if (detailLevel === 'summary') { - // Summary: just a table of type names and kinds - const rows = shapes.map((s) => [s.name, s.kind]); - sections.push(table(['Type', 'Kind'], rows)); - } - else { - // Standard/Detailed: code blocks for each shape - for (const shape of shapes) { - sections.push(heading(3, `${shape.name} (${shape.kind})`)); - if (shape.jsDoc) { - sections.push(code(shape.jsDoc, 'typescript')); - } - sections.push(code(shape.sourceText, 'typescript')); - // Property docs table for interfaces at detailed level - if (detailLevel === 'detailed' && shape.propertyDocs && shape.propertyDocs.length > 0) { - const propRows = shape.propertyDocs.map((p) => [p.name, p.jsDoc]); - sections.push(table(['Property', 'Description'], propRows)); - } - // Param docs table for functions at standard and detailed levels - if (shape.params && shape.params.length > 0) { - const paramRows = shape.params.map((p) => [p.name, p.type ?? '', p.description]); - sections.push(table(['Parameter', 'Type', 'Description'], paramRows)); - } - // Returns and throws docs at detailed level only - if (detailLevel === 'detailed') { - if (shape.returns) { - const returnText = shape.returns.type - ? `**Returns** (\`${shape.returns.type}\`): ${shape.returns.description}` - : `**Returns:** ${shape.returns.description}`; - sections.push(paragraph(returnText)); - } - if (shape.throws && shape.throws.length > 0) { - const throwsRows = shape.throws.map((t) => [t.type ?? '', t.description]); - sections.push(table(['Exception', 'Description'], throwsRows)); - } - } - } - } - sections.push(separator()); - return sections; -} -// ============================================================================ -// Scoped Diagram Builder -// ============================================================================ -/** - * Collect patterns matching a DiagramScope filter. - */ -function collectScopePatterns(dataset, scope) { - const nameSet = new Set(scope.patterns ?? []); - const contextSet = new Set(scope.archContext ?? []); - const viewSet = new Set(scope.include ?? []); - const layerSet = new Set(scope.archLayer ?? []); - return dataset.patterns.filter((p) => { - const name = getPatternName(p); - if (nameSet.has(name)) - return true; - if (p.archContext !== undefined && contextSet.has(p.archContext)) - return true; - if (p.include?.some((v) => viewSet.has(v)) === true) - return true; - if (p.archLayer !== undefined && layerSet.has(p.archLayer)) - return true; - return false; - }); -} -/** - * Collect neighbor patterns — targets of relationship edges from scope patterns - * that are not themselves in scope. Only outgoing edges (uses, dependsOn, - * implementsPatterns, extendsPattern) are traversed; incoming edges (usedBy, - * enables) are intentionally excluded to keep scoped diagrams focused on what - * the scope depends on, not what depends on it. - */ -function collectNeighborPatterns(dataset, scopeNames) { - const neighborNames = new Set(); - const relationships = dataset.relationshipIndex ?? {}; - for (const name of scopeNames) { - const rel = relationships[name]; - if (!rel) - continue; - for (const target of rel.uses) { - if (!scopeNames.has(target)) - neighborNames.add(target); - } - for (const target of rel.dependsOn) { - if (!scopeNames.has(target)) - neighborNames.add(target); - } - for (const target of rel.implementsPatterns) { - if (!scopeNames.has(target)) - neighborNames.add(target); - } - if (rel.extendsPattern !== undefined && !scopeNames.has(rel.extendsPattern)) { - neighborNames.add(rel.extendsPattern); - } - } - if (neighborNames.size === 0) - return []; - return dataset.patterns.filter((p) => neighborNames.has(getPatternName(p))); -} -/** Extract shared setup from scope + dataset into a reusable context */ -function prepareDiagramContext(dataset, scope) { - const scopePatterns = collectScopePatterns(dataset, scope); - if (scopePatterns.length === 0) - return undefined; - const nodeIds = new Map(); - const scopeNames = new Set(); - for (const pattern of scopePatterns) { - const name = getPatternName(pattern); - scopeNames.add(name); - nodeIds.set(name, sanitizeNodeId(name)); - } - const neighborPatterns = collectNeighborPatterns(dataset, scopeNames); - const neighborNames = new Set(); - for (const pattern of neighborPatterns) { - const name = getPatternName(pattern); - neighborNames.add(name); - nodeIds.set(name, sanitizeNodeId(name)); - } - const relationships = dataset.relationshipIndex ?? {}; - const allNames = new Set([...scopeNames, ...neighborNames]); - // Prune orphan scope patterns — nodes with zero edges in the diagram context. - // A pattern participates if it is the source or target of any edge within allNames. - const connected = new Set(); - for (const name of allNames) { - const rel = relationships[name]; - if (!rel) - continue; - const edgeArrays = [rel.uses, rel.dependsOn, rel.implementsPatterns]; - for (const targets of edgeArrays) { - for (const target of targets) { - if (allNames.has(target)) { - connected.add(name); - connected.add(target); - } - } - } - if (rel.extendsPattern !== undefined && allNames.has(rel.extendsPattern)) { - connected.add(name); - connected.add(rel.extendsPattern); - } - } - // Only prune orphan scope patterns when the diagram has SOME connected - // patterns. If no edges exist at all, the diagram is a component listing - // and all scope patterns should be preserved. - if (connected.size > 0) { - const prunedScopePatterns = scopePatterns.filter((p) => connected.has(getPatternName(p))); - if (prunedScopePatterns.length === 0) { - return undefined; - } - const prunedScopeNames = new Set(); - for (const p of prunedScopePatterns) { - prunedScopeNames.add(getPatternName(p)); - } - // Rebuild nodeIds — remove pruned entries - const prunedNodeIds = new Map(); - for (const name of [...prunedScopeNames, ...neighborNames]) { - const id = nodeIds.get(name); - if (id !== undefined) - prunedNodeIds.set(name, id); - } - const prunedAllNames = new Set([...prunedScopeNames, ...neighborNames]); - return { - scopePatterns: prunedScopePatterns, - neighborPatterns, - scopeNames: prunedScopeNames, - neighborNames, - nodeIds: prunedNodeIds, - relationships, - allNames: prunedAllNames, - }; - } - return { - scopePatterns, - neighborPatterns, - scopeNames, - neighborNames, - nodeIds, - relationships, - allNames, - }; -} -/** Emit relationship edges for flowchart diagrams (DD-4, DD-7) */ -function emitFlowchartEdges(ctx, showLabels) { - const lines = []; - const edgeTypes = ['uses', 'dependsOn', 'implementsPatterns']; - for (const sourceName of ctx.allNames) { - const sourceId = ctx.nodeIds.get(sourceName); - if (sourceId === undefined) - continue; - const rel = ctx.relationships[sourceName]; - if (!rel) - continue; - for (const type of edgeTypes) { - for (const target of rel[type]) { - const targetId = ctx.nodeIds.get(target); - if (targetId !== undefined) { - const arrow = EDGE_STYLES[type]; - const label = showLabels ? `|${EDGE_LABELS[type]}|` : ''; - lines.push(` ${sourceId} ${arrow}${label} ${targetId}`); - } - } - } - if (rel.extendsPattern !== undefined) { - const targetId = ctx.nodeIds.get(rel.extendsPattern); - if (targetId !== undefined) { - const arrow = EDGE_STYLES.extendsPattern; - const label = showLabels ? `|${EDGE_LABELS.extendsPattern}|` : ''; - lines.push(` ${sourceId} ${arrow}${label} ${targetId}`); - } - } - } - return lines; -} -/** Build a Mermaid flowchart diagram with custom shapes and edge labels (DD-1, DD-4) */ -function buildFlowchartDiagram(ctx, scope) { - const direction = scope.direction ?? 'TB'; - const showLabels = scope.showEdgeLabels !== false; - const lines = [`graph ${direction}`]; - // Group scope patterns by archContext for subgraphs - const byContext = new Map(); - const noContext = []; - for (const pattern of ctx.scopePatterns) { - if (pattern.archContext !== undefined) { - const group = byContext.get(pattern.archContext) ?? []; - group.push(pattern); - byContext.set(pattern.archContext, group); - } - else { - noContext.push(pattern); - } - } - // Emit context subgraphs - for (const [context, patterns] of [...byContext.entries()].sort((a, b) => a[0].localeCompare(b[0]))) { - const contextLabel = context.charAt(0).toUpperCase() + context.slice(1); - lines.push(` subgraph ${sanitizeNodeId(context)}["${contextLabel}"]`); - for (const pattern of patterns) { - const name = getPatternName(pattern); - const nodeId = ctx.nodeIds.get(name) ?? sanitizeNodeId(name); - lines.push(` ${formatNodeDeclaration(nodeId, name, pattern.archRole)}`); - } - lines.push(' end'); - } - // Emit scope patterns without context - for (const pattern of noContext) { - const name = getPatternName(pattern); - const nodeId = ctx.nodeIds.get(name) ?? sanitizeNodeId(name); - lines.push(` ${formatNodeDeclaration(nodeId, name, pattern.archRole)}`); - } - // Emit neighbor subgraph - if (ctx.neighborPatterns.length > 0) { - lines.push(' subgraph related["Related"]'); - for (const pattern of ctx.neighborPatterns) { - const name = getPatternName(pattern); - const nodeId = ctx.nodeIds.get(name) ?? sanitizeNodeId(name); - lines.push(` ${nodeId}["${name}"]:::neighbor`); - } - lines.push(' end'); - } - // Emit edges - lines.push(...emitFlowchartEdges(ctx, showLabels)); - // Add neighbor class definition - if (ctx.neighborPatterns.length > 0) { - lines.push(' classDef neighbor stroke-dasharray: 5 5'); - } - return lines; -} -/** Build a Mermaid sequence diagram with participants and messages (DD-2) */ -function buildSequenceDiagram(ctx) { - const lines = ['sequenceDiagram']; - const edgeTypes = ['uses', 'dependsOn', 'implementsPatterns']; - // Emit participant declarations for scope patterns (sanitized for Mermaid syntax) - for (const name of ctx.scopeNames) { - lines.push(` participant ${sanitizeNodeId(name)} as ${name}`); - } - // Emit participant declarations for neighbor patterns - for (const name of ctx.neighborNames) { - lines.push(` participant ${sanitizeNodeId(name)} as ${name}`); - } - // Emit messages from relationships - for (const sourceName of ctx.allNames) { - const rel = ctx.relationships[sourceName]; - if (!rel) - continue; - for (const type of edgeTypes) { - for (const target of rel[type]) { - if (ctx.allNames.has(target)) { - const arrow = SEQUENCE_ARROWS[type]; - lines.push(` ${sanitizeNodeId(sourceName)} ${arrow} ${sanitizeNodeId(target)}: ${EDGE_LABELS[type]}`); - } - } - } - if (rel.extendsPattern !== undefined && ctx.allNames.has(rel.extendsPattern)) { - const arrow = SEQUENCE_ARROWS.extendsPattern; - lines.push(` ${sanitizeNodeId(sourceName)} ${arrow} ${sanitizeNodeId(rel.extendsPattern)}: ${EDGE_LABELS.extendsPattern}`); - } - } - return lines; -} -/** Build a Mermaid state diagram with transitions and pseudo-states (DD-3) */ -function buildStateDiagram(ctx, scope) { - const showLabels = scope.showEdgeLabels !== false; - const lines = ['stateDiagram-v2']; - // Track incoming/outgoing dependsOn edges for pseudo-states - const hasIncoming = new Set(); - const hasOutgoing = new Set(); - // Emit state declarations for scope patterns - for (const name of ctx.scopeNames) { - const nodeId = ctx.nodeIds.get(name) ?? sanitizeNodeId(name); - lines.push(` state "${name}" as ${nodeId}`); - } - // Emit state declarations for neighbor patterns - for (const name of ctx.neighborNames) { - const nodeId = ctx.nodeIds.get(name) ?? sanitizeNodeId(name); - lines.push(` state "${name}" as ${nodeId}`); - } - // Emit transitions from dependsOn relationships - for (const sourceName of ctx.allNames) { - const rel = ctx.relationships[sourceName]; - if (!rel) - continue; - for (const target of rel.dependsOn) { - if (!ctx.allNames.has(target)) - continue; - const sourceId = ctx.nodeIds.get(sourceName) ?? sanitizeNodeId(sourceName); - const targetId = ctx.nodeIds.get(target) ?? sanitizeNodeId(target); - const label = showLabels ? ` : ${EDGE_LABELS.dependsOn}` : ''; - lines.push(` ${targetId} --> ${sourceId}${label}`); - hasIncoming.add(sourceName); - hasOutgoing.add(target); - } - } - // Add start pseudo-states for patterns with no incoming edges - for (const name of ctx.scopeNames) { - if (!hasIncoming.has(name)) { - const nodeId = ctx.nodeIds.get(name) ?? sanitizeNodeId(name); - lines.push(` [*] --> ${nodeId}`); - } - } - // Add end pseudo-states for patterns with no outgoing edges - for (const name of ctx.scopeNames) { - if (!hasOutgoing.has(name)) { - const nodeId = ctx.nodeIds.get(name) ?? sanitizeNodeId(name); - lines.push(` ${nodeId} --> [*]`); - } - } - return lines; -} -/** Presentation labels for FSM transitions (codec concern, not FSM domain) */ -const FSM_TRANSITION_LABELS = { - roadmap: { active: 'Start work', deferred: 'Postpone', roadmap: 'Stay in planning' }, - active: { completed: 'All deliverables done', roadmap: 'Blocked / regressed' }, - deferred: { roadmap: 'Resume planning' }, -}; -/** Display names for protection levels in diagram notes */ -const PROTECTION_DISPLAY = { - none: 'none', - scope: 'scope-locked', - hard: 'hard-locked', -}; -/** Build FSM lifecycle state diagram from VALID_TRANSITIONS and PROTECTION_LEVELS */ -function buildFsmLifecycleStateDiagram() { - const lines = ['stateDiagram-v2']; - const states = Object.keys(VALID_TRANSITIONS); - // Entry point: first state is initial - const initialState = states[0]; - if (initialState !== undefined) { - lines.push(` [*] --> ${initialState}`); - } - // Transitions derived from the FSM transition matrix - for (const [from, targets] of Object.entries(VALID_TRANSITIONS)) { - if (targets.length === 0) { - // Terminal state - lines.push(` ${from} --> [*]`); - } - else { - for (const to of targets) { - const label = FSM_TRANSITION_LABELS[from]?.[to]; - const suffix = label !== undefined ? ` : ${label}` : ''; - lines.push(` ${from} --> ${to}${suffix}`); - } - } - } - // Protection level notes derived from PROTECTION_LEVELS - for (const [state, level] of Object.entries(PROTECTION_LEVELS)) { - const display = PROTECTION_DISPLAY[level]; - lines.push(` note right of ${state}`); - lines.push(` Protection: ${display}`); - lines.push(' end note'); - } - return lines; -} -/** Build generation pipeline sequence diagram from hardcoded domain knowledge */ -function buildGenerationPipelineSequenceDiagram() { - return [ - 'sequenceDiagram', - ' participant CLI', - ' participant Orchestrator', - ' participant Scanner', - ' participant Extractor', - ' participant Transformer', - ' participant Codec', - ' participant Renderer', - ' CLI ->> Orchestrator: generate(config)', - ' Orchestrator ->> Scanner: scanPatterns(globs)', - ' Scanner -->> Orchestrator: TypeScript ASTs', - ' Orchestrator ->> Scanner: scanGherkinFiles(globs)', - ' Scanner -->> Orchestrator: Gherkin documents', - ' Orchestrator ->> Extractor: extractPatterns(files)', - ' Extractor -->> Orchestrator: ExtractedPattern[]', - ' Orchestrator ->> Extractor: extractFromGherkin(docs)', - ' Extractor -->> Orchestrator: ExtractedPattern[]', - ' Orchestrator ->> Orchestrator: mergePatterns(ts, gherkin)', - ' Orchestrator ->> Transformer: transformToMasterDataset(patterns)', - ' Transformer -->> Orchestrator: MasterDataset', - ' Orchestrator ->> Codec: codec.decode(dataset)', - ' Codec -->> Orchestrator: RenderableDocument', - ' Orchestrator ->> Renderer: render(document)', - ' Renderer -->> Orchestrator: markdown string', - ]; -} -/** Build a Mermaid C4 context diagram with system boundaries */ -function buildC4Diagram(ctx, scope) { - const showLabels = scope.showEdgeLabels !== false; - const lines = ['C4Context']; - if (scope.title !== undefined) { - lines.push(` title ${scope.title}`); - } - // Group scope patterns by archContext for system boundaries - const byContext = new Map(); - const noContext = []; - for (const pattern of ctx.scopePatterns) { - if (pattern.archContext !== undefined) { - const group = byContext.get(pattern.archContext) ?? []; - group.push(pattern); - byContext.set(pattern.archContext, group); - } - else { - noContext.push(pattern); - } - } - // Emit system boundaries - for (const [context, patterns] of [...byContext.entries()].sort((a, b) => a[0].localeCompare(b[0]))) { - const contextLabel = context.charAt(0).toUpperCase() + context.slice(1); - const contextId = sanitizeNodeId(context); - lines.push(` Boundary(${contextId}, "${contextLabel}") {`); - for (const pattern of patterns) { - const name = getPatternName(pattern); - const nodeId = ctx.nodeIds.get(name) ?? sanitizeNodeId(name); - lines.push(` System(${nodeId}, "${name}")`); - } - lines.push(' }'); - } - // Emit standalone systems (no context) - for (const pattern of noContext) { - const name = getPatternName(pattern); - const nodeId = ctx.nodeIds.get(name) ?? sanitizeNodeId(name); - lines.push(` System(${nodeId}, "${name}")`); - } - // Emit external systems for neighbor patterns - for (const pattern of ctx.neighborPatterns) { - const name = getPatternName(pattern); - const nodeId = ctx.nodeIds.get(name) ?? sanitizeNodeId(name); - lines.push(` System_Ext(${nodeId}, "${name}")`); - } - // Emit relationships - const edgeTypes = ['uses', 'dependsOn', 'implementsPatterns']; - for (const sourceName of ctx.allNames) { - const sourceId = ctx.nodeIds.get(sourceName); - if (sourceId === undefined) - continue; - const rel = ctx.relationships[sourceName]; - if (!rel) - continue; - for (const type of edgeTypes) { - for (const target of rel[type]) { - const targetId = ctx.nodeIds.get(target); - if (targetId !== undefined) { - const label = showLabels ? EDGE_LABELS[type] : ''; - lines.push(` Rel(${sourceId}, ${targetId}, "${label}")`); - } - } - } - if (rel.extendsPattern !== undefined) { - const targetId = ctx.nodeIds.get(rel.extendsPattern); - if (targetId !== undefined) { - const label = showLabels ? EDGE_LABELS.extendsPattern : ''; - lines.push(` Rel(${sourceId}, ${targetId}, "${label}")`); - } - } - } - return lines; -} -/** Build a Mermaid class diagram with pattern exports and relationships */ -function buildClassDiagram(ctx) { - const lines = ['classDiagram']; - const edgeTypes = ['uses', 'dependsOn', 'implementsPatterns']; - // Class arrow styles per relationship type - const classArrows = { - uses: '..>', - dependsOn: '..>', - implementsPatterns: '..|>', - extendsPattern: '--|>', - }; - // Emit class declarations for scope patterns (with members) - for (const pattern of ctx.scopePatterns) { - const name = getPatternName(pattern); - const nodeId = ctx.nodeIds.get(name) ?? sanitizeNodeId(name); - lines.push(` class ${nodeId} {`); - if (pattern.archRole !== undefined) { - lines.push(` <<${pattern.archRole}>>`); - } - if (pattern.exports.length > 0) { - for (const exp of pattern.exports) { - lines.push(` +${exp.name} ${exp.type}`); - } - } - lines.push(' }'); - } - // Emit class declarations for neighbor patterns (no members) - for (const pattern of ctx.neighborPatterns) { - const name = getPatternName(pattern); - const nodeId = ctx.nodeIds.get(name) ?? sanitizeNodeId(name); - lines.push(` class ${nodeId}`); - } - // Emit relationship edges - for (const sourceName of ctx.allNames) { - const sourceId = ctx.nodeIds.get(sourceName); - if (sourceId === undefined) - continue; - const rel = ctx.relationships[sourceName]; - if (!rel) - continue; - for (const type of edgeTypes) { - for (const target of rel[type]) { - const targetId = ctx.nodeIds.get(target); - if (targetId !== undefined) { - const arrow = classArrows[type] ?? '..>'; - lines.push(` ${sourceId} ${arrow} ${targetId} : ${EDGE_LABELS[type]}`); - } - } - } - if (rel.extendsPattern !== undefined) { - const targetId = ctx.nodeIds.get(rel.extendsPattern); - if (targetId !== undefined) { - lines.push(` ${sourceId} --|> ${targetId} : ${EDGE_LABELS.extendsPattern}`); - } - } - } - return lines; -} -/** - * Build a scoped relationship diagram from DiagramScope config. - * - * Dispatches to type-specific builders based on scope.diagramType (DD-6). - * Scope patterns are grouped by archContext in subgraphs (flowchart) or - * rendered as participants/states (sequence/state diagrams). - */ -export function buildScopedDiagram(dataset, scope) { - const title = scope.title ?? 'Component Overview'; - // Content source override: render hardcoded domain diagrams - if (scope.source === 'fsm-lifecycle') { - return [ - heading(2, title), - paragraph('FSM lifecycle showing valid state transitions and protection levels:'), - mermaid(buildFsmLifecycleStateDiagram().join('\n')), - separator(), - ]; - } - if (scope.source === 'generation-pipeline') { - return [ - heading(2, title), - paragraph('Temporal flow of the documentation generation pipeline:'), - mermaid(buildGenerationPipelineSequenceDiagram().join('\n')), - separator(), - ]; - } - const ctx = prepareDiagramContext(dataset, scope); - if (ctx === undefined) - return []; - let diagramLines; - switch (scope.diagramType ?? 'graph') { - case 'sequenceDiagram': - diagramLines = buildSequenceDiagram(ctx); - break; - case 'stateDiagram-v2': - diagramLines = buildStateDiagram(ctx, scope); - break; - case 'C4Context': - diagramLines = buildC4Diagram(ctx, scope); - break; - case 'classDiagram': - diagramLines = buildClassDiagram(ctx); - break; - case 'graph': - default: - diagramLines = buildFlowchartDiagram(ctx, scope); - break; - } - return [ - heading(2, title), - paragraph('Scoped architecture diagram showing component relationships:'), - mermaid(diagramLines.join('\n')), - separator(), - ]; -} -//# sourceMappingURL=reference.js.map \ No newline at end of file diff --git a/dist/renderable/codecs/reference.js.map b/dist/renderable/codecs/reference.js.map deleted file mode 100644 index 9b7cbd32..00000000 --- a/dist/renderable/codecs/reference.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"reference.js","sourceRoot":"","sources":["../../../src/renderable/codecs/reference.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACx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,EAAE,KAAK,CAAC,CAAC;YAC1C,MAAM;QACR,KAAK,cAAc;YACjB,YAAY,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAC;YACtC,MAAM;QACR,KAAK,OAAO,CAAC;QACb;YACE,YAAY,GAAG,qBAAqB,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;YACjD,MAAM;IACV,CAAC;IAED,OAAO;QACL,OAAO,CAAC,CAAC,EAAE,KAAK,CAAC;QACjB,SAAS,CAAC,8DAA8D,CAAC;QACzE,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChC,SAAS,EAAE;KACZ,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/dist/renderable/codecs/reporting.d.ts b/dist/renderable/codecs/reporting.d.ts deleted file mode 100644 index 7c848294..00000000 --- a/dist/renderable/codecs/reporting.d.ts +++ /dev/null @@ -1,11955 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern ReportingCodecs - * @libar-docs-status completed - * - * ## Reporting Document Codecs - * - * Transforms MasterDataset into RenderableDocuments for reporting outputs: - * - CHANGELOG-GENERATED.md (Keep a Changelog format) - * - TRACEABILITY.md (Timeline to behavior file coverage) - * - OVERVIEW.md (Project architecture overview) - * - * ### When to Use - * - * - When generating changelogs in Keep a Changelog format - * - When creating traceability reports for spec-to-test coverage - * - When building project overview documentation - */ -import { z } from 'zod'; -import { MasterDatasetSchema } from '../../validation-schemas/master-dataset.js'; -import { type BaseCodecOptions } from './types/base.js'; -/** - * Options for ChangelogCodec - */ -export interface ChangelogCodecOptions extends BaseCodecOptions { - /** Include unreleased section (default: true) */ - includeUnreleased?: boolean; - /** Include links (default: true) */ - includeLinks?: boolean; - /** Category mapping for grouping changes */ - categoryMapping?: Record; -} -/** - * Default options for ChangelogCodec - */ -export declare const DEFAULT_CHANGELOG_OPTIONS: Required; -/** - * Options for TraceabilityCodec - */ -export interface TraceabilityCodecOptions extends BaseCodecOptions { - /** Include gaps in coverage (default: true) */ - includeGaps?: boolean; - /** Include statistics (default: true) */ - includeStats?: boolean; - /** Include covered phases (default: true) */ - includeCovered?: boolean; -} -/** - * Default options for TraceabilityCodec - */ -export declare const DEFAULT_TRACEABILITY_OPTIONS: Required; -/** - * Options for OverviewCodec - */ -export interface OverviewCodecOptions extends BaseCodecOptions { - /** Include architecture section (default: true) */ - includeArchitecture?: boolean; - /** Include patterns summary (default: true) */ - includePatternsSummary?: boolean; - /** Include timeline summary (default: true) */ - includeTimelineSummary?: boolean; -} -/** - * Default options for OverviewCodec - */ -export declare const DEFAULT_OVERVIEW_OPTIONS: Required; -import { RenderableDocumentOutputSchema } from './shared-schema.js'; -/** - * Create a ChangelogCodec with custom options. - */ -export declare function createChangelogCodec(options?: ChangelogCodecOptions): z.ZodCodec; -export declare const ChangelogCodec: z.ZodCodec>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - tagRegistry: z.ZodObject<{ - $schema: z.ZodOptional; - version: z.ZodDefault; - categories: z.ZodArray>>; - }, z.core.$strict>>; - metadataTags: z.ZodArray; - purpose: z.ZodString; - required: z.ZodDefault>; - repeatable: z.ZodDefault>; - values: z.ZodOptional>; - default: z.ZodOptional; - example: z.ZodOptional; - metadataKey: z.ZodOptional; - transform: z.ZodOptional>; - }, z.core.$strict>>; - aggregationTags: z.ZodArray; - purpose: z.ZodString; - }, z.core.$strict>>; - formatOptions: z.ZodDefault>; - tagPrefix: z.ZodDefault; - fileOptInTag: z.ZodDefault; - }, z.core.$strict>; - byStatus: z.ZodObject<{ - completed: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - active: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - planned: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>; - byPhase: z.ZodArray; - patterns: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - counts: z.ZodObject<{ - completed: z.ZodNumber; - active: z.ZodNumber; - planned: z.ZodNumber; - total: z.ZodNumber; - }, z.core.$strip>; - }, z.core.$strip>>; - byQuarter: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byCategory: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - bySource: z.ZodObject<{ - typescript: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - gherkin: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - roadmap: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - prd: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>; - counts: z.ZodObject<{ - completed: z.ZodNumber; - active: z.ZodNumber; - planned: z.ZodNumber; - total: z.ZodNumber; - }, z.core.$strip>; - phaseCount: z.ZodNumber; - categoryCount: z.ZodNumber; - relationshipIndex: z.ZodOptional; - usedBy: z.ZodArray; - dependsOn: z.ZodArray; - enables: z.ZodArray; - implementsPatterns: z.ZodArray; - implementedBy: z.ZodArray; - }, z.core.$strip>>; - extendsPattern: z.ZodOptional; - extendedBy: z.ZodArray; - seeAlso: z.ZodArray; - apiRef: z.ZodArray; - }, z.core.$strip>>>; - archIndex: z.ZodOptional>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byContext: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byLayer: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byView: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - all: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>>; -}, z.core.$strip>, z.ZodObject<{ - title: z.ZodString; - purpose: z.ZodOptional; - detailLevel: z.ZodOptional; - sections: z.ZodArray; - additionalFiles: z.ZodOptional>; -}, z.core.$strip>>; -/** - * Create a TraceabilityCodec with custom options. - */ -export declare function createTraceabilityCodec(options?: TraceabilityCodecOptions): z.ZodCodec; -export declare const TraceabilityCodec: z.ZodCodec>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - tagRegistry: z.ZodObject<{ - $schema: z.ZodOptional; - version: z.ZodDefault; - categories: z.ZodArray>>; - }, z.core.$strict>>; - metadataTags: z.ZodArray; - purpose: z.ZodString; - required: z.ZodDefault>; - repeatable: z.ZodDefault>; - values: z.ZodOptional>; - default: z.ZodOptional; - example: z.ZodOptional; - metadataKey: z.ZodOptional; - transform: z.ZodOptional>; - }, z.core.$strict>>; - aggregationTags: z.ZodArray; - purpose: z.ZodString; - }, z.core.$strict>>; - formatOptions: z.ZodDefault>; - tagPrefix: z.ZodDefault; - fileOptInTag: z.ZodDefault; - }, z.core.$strict>; - byStatus: z.ZodObject<{ - completed: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - active: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - planned: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>; - byPhase: z.ZodArray; - patterns: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - counts: z.ZodObject<{ - completed: z.ZodNumber; - active: z.ZodNumber; - planned: z.ZodNumber; - total: z.ZodNumber; - }, z.core.$strip>; - }, z.core.$strip>>; - byQuarter: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byCategory: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - bySource: z.ZodObject<{ - typescript: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - gherkin: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - roadmap: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - prd: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>; - counts: z.ZodObject<{ - completed: z.ZodNumber; - active: z.ZodNumber; - planned: z.ZodNumber; - total: z.ZodNumber; - }, z.core.$strip>; - phaseCount: z.ZodNumber; - categoryCount: z.ZodNumber; - relationshipIndex: z.ZodOptional; - usedBy: z.ZodArray; - dependsOn: z.ZodArray; - enables: z.ZodArray; - implementsPatterns: z.ZodArray; - implementedBy: z.ZodArray; - }, z.core.$strip>>; - extendsPattern: z.ZodOptional; - extendedBy: z.ZodArray; - seeAlso: z.ZodArray; - apiRef: z.ZodArray; - }, z.core.$strip>>>; - archIndex: z.ZodOptional>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byContext: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byLayer: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byView: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - all: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>>; -}, z.core.$strip>, z.ZodObject<{ - title: z.ZodString; - purpose: z.ZodOptional; - detailLevel: z.ZodOptional; - sections: z.ZodArray; - additionalFiles: z.ZodOptional>; -}, z.core.$strip>>; -/** - * Create an OverviewCodec with custom options. - */ -export declare function createOverviewCodec(options?: OverviewCodecOptions): z.ZodCodec; -export declare const OverviewCodec: z.ZodCodec>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - tagRegistry: z.ZodObject<{ - $schema: z.ZodOptional; - version: z.ZodDefault; - categories: z.ZodArray>>; - }, z.core.$strict>>; - metadataTags: z.ZodArray; - purpose: z.ZodString; - required: z.ZodDefault>; - repeatable: z.ZodDefault>; - values: z.ZodOptional>; - default: z.ZodOptional; - example: z.ZodOptional; - metadataKey: z.ZodOptional; - transform: z.ZodOptional>; - }, z.core.$strict>>; - aggregationTags: z.ZodArray; - purpose: z.ZodString; - }, z.core.$strict>>; - formatOptions: z.ZodDefault>; - tagPrefix: z.ZodDefault; - fileOptInTag: z.ZodDefault; - }, z.core.$strict>; - byStatus: z.ZodObject<{ - completed: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - active: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - planned: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>; - byPhase: z.ZodArray; - patterns: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - counts: z.ZodObject<{ - completed: z.ZodNumber; - active: z.ZodNumber; - planned: z.ZodNumber; - total: z.ZodNumber; - }, z.core.$strip>; - }, z.core.$strip>>; - byQuarter: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byCategory: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - bySource: z.ZodObject<{ - typescript: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - gherkin: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - roadmap: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - prd: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>; - counts: z.ZodObject<{ - completed: z.ZodNumber; - active: z.ZodNumber; - planned: z.ZodNumber; - total: z.ZodNumber; - }, z.core.$strip>; - phaseCount: z.ZodNumber; - categoryCount: z.ZodNumber; - relationshipIndex: z.ZodOptional; - usedBy: z.ZodArray; - dependsOn: z.ZodArray; - enables: z.ZodArray; - implementsPatterns: z.ZodArray; - implementedBy: z.ZodArray; - }, z.core.$strip>>; - extendsPattern: z.ZodOptional; - extendedBy: z.ZodArray; - seeAlso: z.ZodArray; - apiRef: z.ZodArray; - }, z.core.$strip>>>; - archIndex: z.ZodOptional>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byContext: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byLayer: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byView: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - all: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>>; -}, z.core.$strip>, z.ZodObject<{ - title: z.ZodString; - purpose: z.ZodOptional; - detailLevel: z.ZodOptional; - sections: z.ZodArray; - additionalFiles: z.ZodOptional>; -}, z.core.$strip>>; -//# sourceMappingURL=reporting.d.ts.map \ No newline at end of file diff --git a/dist/renderable/codecs/reporting.d.ts.map b/dist/renderable/codecs/reporting.d.ts.map deleted file mode 100644 index 24d8abc2..00000000 --- a/dist/renderable/codecs/reporting.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"reporting.d.ts","sourceRoot":"","sources":["../../../src/renderable/codecs/reporting.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,mBAAmB,EAEpB,MAAM,4CAA4C,CAAC;AAoBpD,OAAO,EAAE,KAAK,gBAAgB,EAAsC,MAAM,iBAAiB,C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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAwB,CAAC"} \ No newline at end of file diff --git a/dist/renderable/codecs/reporting.js b/dist/renderable/codecs/reporting.js deleted file mode 100644 index cff78d10..00000000 --- a/dist/renderable/codecs/reporting.js +++ /dev/null @@ -1,340 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern ReportingCodecs - * @libar-docs-status completed - * - * ## Reporting Document Codecs - * - * Transforms MasterDataset into RenderableDocuments for reporting outputs: - * - CHANGELOG-GENERATED.md (Keep a Changelog format) - * - TRACEABILITY.md (Timeline to behavior file coverage) - * - OVERVIEW.md (Project architecture overview) - * - * ### When to Use - * - * - When generating changelogs in Keep a Changelog format - * - When creating traceability reports for spec-to-test coverage - * - When building project overview documentation - */ -import { z } from 'zod'; -import { MasterDatasetSchema, } from '../../validation-schemas/master-dataset.js'; -import { heading, paragraph, separator, table, list, collapsible, document, } from '../schema.js'; -import { getDisplayName, extractSummary, completionPercentage, renderProgressBar, } from '../utils.js'; -import { groupBy } from '../../utils/index.js'; -import { DEFAULT_BASE_OPTIONS, mergeOptions } from './types/base.js'; -/** - * Default options for ChangelogCodec - */ -export const DEFAULT_CHANGELOG_OPTIONS = { - ...DEFAULT_BASE_OPTIONS, - includeUnreleased: true, - includeLinks: true, - categoryMapping: {}, -}; -/** - * Default options for TraceabilityCodec - */ -export const DEFAULT_TRACEABILITY_OPTIONS = { - ...DEFAULT_BASE_OPTIONS, - includeGaps: true, - includeStats: true, - includeCovered: true, -}; -/** - * Default options for OverviewCodec - */ -export const DEFAULT_OVERVIEW_OPTIONS = { - ...DEFAULT_BASE_OPTIONS, - includeArchitecture: true, - includePatternsSummary: true, - includeTimelineSummary: true, -}; -import { RenderableDocumentOutputSchema } from './shared-schema.js'; -// ═══════════════════════════════════════════════════════════════════════════ -// Changelog Codec -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Create a ChangelogCodec with custom options. - */ -export function createChangelogCodec(options) { - const opts = mergeOptions(DEFAULT_CHANGELOG_OPTIONS, options); - return z.codec(MasterDatasetSchema, RenderableDocumentOutputSchema, { - decode: (dataset) => { - return buildChangelogDocument(dataset, opts); - }, - /** @throws Always - this codec is decode-only. See zod-codecs.md */ - encode: () => { - throw new Error('ChangelogCodec is decode-only. See zod-codecs.md'); - }, - }); -} -export const ChangelogCodec = createChangelogCodec(); -// ═══════════════════════════════════════════════════════════════════════════ -// Traceability Codec -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Create a TraceabilityCodec with custom options. - */ -export function createTraceabilityCodec(options) { - const opts = mergeOptions(DEFAULT_TRACEABILITY_OPTIONS, options); - return z.codec(MasterDatasetSchema, RenderableDocumentOutputSchema, { - decode: (dataset) => { - return buildTraceabilityDocument(dataset, opts); - }, - /** @throws Always - this codec is decode-only. See zod-codecs.md */ - encode: () => { - throw new Error('TraceabilityCodec is decode-only. See zod-codecs.md'); - }, - }); -} -export const TraceabilityCodec = createTraceabilityCodec(); -// ═══════════════════════════════════════════════════════════════════════════ -// Overview Codec -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Create an OverviewCodec with custom options. - */ -export function createOverviewCodec(options) { - const opts = mergeOptions(DEFAULT_OVERVIEW_OPTIONS, options); - return z.codec(MasterDatasetSchema, RenderableDocumentOutputSchema, { - decode: (dataset) => { - return buildOverviewDocument(dataset, opts); - }, - /** @throws Always - this codec is decode-only. See zod-codecs.md */ - encode: () => { - throw new Error('OverviewCodec is decode-only. See zod-codecs.md'); - }, - }); -} -export const OverviewCodec = createOverviewCodec(); -// ═══════════════════════════════════════════════════════════════════════════ -// Changelog Builder -// ═══════════════════════════════════════════════════════════════════════════ -function buildChangelogDocument(dataset, options) { - const sections = []; - // Header following Keep a Changelog format - sections.push(paragraph('All notable changes to this project will be documented in this file.'), paragraph('The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).'), separator()); - // Unreleased section (active patterns + vNEXT tagged patterns) - if (options.includeUnreleased) { - const unreleased = [ - ...dataset.byStatus.active, - ...dataset.patterns.filter((p) => p.release === 'vNEXT'), - ]; - // Deduplicate by name - const seen = new Set(); - const uniqueUnreleased = unreleased.filter((p) => { - if (seen.has(p.name)) - return false; - seen.add(p.name); - return true; - }); - if (uniqueUnreleased.length > 0) { - sections.push(heading(2, '[Unreleased]')); - sections.push(...buildChangelogSection(uniqueUnreleased, options)); - } - } - // Group completed by release version (primary) or fall back to quarter - const completedWithRelease = dataset.byStatus.completed.filter((p) => p.release !== undefined && p.release !== '' && p.release !== 'vNEXT'); - const byRelease = groupBy(completedWithRelease, (p) => p.release ?? 'Unknown'); - // Sort releases in reverse semver order (most recent first) - const sortedReleases = [...byRelease.keys()].sort((a, b) => { - // Simple semver-like comparison (v0.2.0 > v0.1.0) - return b.localeCompare(a, undefined, { numeric: true, sensitivity: 'base' }); - }); - for (const release of sortedReleases) { - const patterns = byRelease.get(release) ?? []; - sections.push(heading(2, `[${release}]`)); - sections.push(...buildChangelogSection(patterns, options)); - } - // Patterns without release tag - group by quarter as fallback - const noRelease = dataset.byStatus.completed.filter((p) => !p.release); - if (noRelease.length > 0) { - const byQuarter = groupBy(noRelease.filter((p) => p.quarter), (p) => p.quarter ?? 'Unknown'); - const sortedQuarters = [...byQuarter.keys()].sort().reverse(); - for (const quarter of sortedQuarters) { - const patterns = byQuarter.get(quarter) ?? []; - sections.push(heading(2, `[${quarter}]`)); - sections.push(...buildChangelogSection(patterns, options)); - } - // Patterns without quarter or release - const noQuarter = noRelease.filter((p) => !p.quarter); - if (noQuarter.length > 0) { - sections.push(heading(2, '[Earlier]')); - sections.push(...buildChangelogSection(noQuarter, options)); - } - } - return document('Changelog', sections, { - purpose: 'Project changelog in Keep a Changelog format', - }); -} -function buildChangelogSection(patterns, options) { - const sections = []; - // Group by change type (Added, Changed, Fixed, etc.) - const byType = new Map(); - for (const pattern of patterns) { - // Determine change type from category or default to "Added" - let changeType = 'Added'; - // Use pattern.category (the primary category) for classification - const category = String(pattern.category).toLowerCase(); - if (options.categoryMapping[category]) { - changeType = options.categoryMapping[category]; - } - else if (category.includes('fix') || category.includes('bug')) { - changeType = 'Fixed'; - } - else if (category.includes('change') || - category.includes('update') || - category.includes('refactor')) { - changeType = 'Changed'; - } - else if (category.includes('remove') || category.includes('deprecate')) { - changeType = 'Removed'; - } - else if (category.includes('security')) { - changeType = 'Security'; - } - if (!byType.has(changeType)) { - byType.set(changeType, []); - } - byType.get(changeType)?.push(pattern); - } - // Standard order for changelog sections - const typeOrder = ['Added', 'Changed', 'Deprecated', 'Removed', 'Fixed', 'Security']; - for (const type of typeOrder) { - const typePatterns = byType.get(type); - if (!typePatterns || typePatterns.length === 0) - continue; - sections.push(heading(3, type)); - const items = typePatterns.map((p) => { - const name = getDisplayName(p); - const summary = extractSummary(p.directive.description, p.patternName); - return summary ? `**${name}**: ${summary}` : `**${name}**`; - }); - sections.push(list(items)); - } - // Any remaining types not in standard order - for (const [type, typePatterns] of byType.entries()) { - if (typeOrder.includes(type)) - continue; - sections.push(heading(3, type)); - const items = typePatterns.map((p) => { - const name = getDisplayName(p); - return `**${name}**`; - }); - sections.push(list(items)); - } - sections.push(separator()); - return sections; -} -// ═══════════════════════════════════════════════════════════════════════════ -// Traceability Builder -// ═══════════════════════════════════════════════════════════════════════════ -function buildTraceabilityDocument(dataset, options) { - const sections = []; - // Get timeline patterns (from Gherkin with phase) - const timelinePatterns = dataset.bySource.gherkin.filter((p) => p.phase !== undefined); - if (timelinePatterns.length === 0) { - sections.push(heading(2, 'No Timeline Patterns'), paragraph('*No Gherkin patterns with phase metadata found.*')); - return document('Timeline → Behavior Traceability', sections, { - purpose: 'Coverage report linking timeline phases to behavioral tests', - }); - } - // Check behavior file coverage - const covered = []; - const gaps = []; - for (const pattern of timelinePatterns) { - const hasBehaviorFile = pattern.behaviorFile !== undefined; - const behaviorVerified = pattern.behaviorFileVerified === true; - if (hasBehaviorFile || behaviorVerified) { - covered.push(pattern); - } - else { - gaps.push(pattern); - } - } - // Statistics - if (options.includeStats) { - const coveragePercent = timelinePatterns.length > 0 - ? Math.round((covered.length / timelinePatterns.length) * 100) - : 0; - sections.push(heading(2, 'Coverage Statistics'), table(['Metric', 'Value'], [ - ['Timeline Phases', String(timelinePatterns.length)], - ['With Behavior Tests', String(covered.length)], - ['Missing Behavior Tests', String(gaps.length)], - ['Coverage', `${coveragePercent}%`], - ]), separator()); - } - // Gaps (missing coverage) - if (options.includeGaps && gaps.length > 0) { - sections.push(heading(2, 'Coverage Gaps')); - sections.push(paragraph(`${gaps.length} phases without behavior test coverage:`)); - const gapRows = gaps.map((p) => { - const name = getDisplayName(p); - const phase = p.phase !== undefined ? String(p.phase) : '-'; - return [name, phase, '❌ Missing']; - }); - sections.push(table(['Pattern', 'Phase', 'Status'], gapRows)); - sections.push(separator()); - } - // Covered phases - if (options.includeCovered && covered.length > 0) { - const coveredContent = []; - const coveredRows = covered.map((p) => { - const name = getDisplayName(p); - const phase = p.phase !== undefined ? String(p.phase) : '-'; - const file = p.behaviorFile ?? '(inferred)'; - return [name, phase, `✅ ${file}`]; - }); - coveredContent.push(table(['Pattern', 'Phase', 'Behavior File'], coveredRows)); - sections.push(collapsible(`✅ Covered Phases (${covered.length})`, coveredContent)); - } - return document('Timeline → Behavior Traceability', sections, { - purpose: 'Coverage report linking timeline phases to behavioral tests', - }); -} -// ═══════════════════════════════════════════════════════════════════════════ -// Overview Builder -// ═══════════════════════════════════════════════════════════════════════════ -function buildOverviewDocument(dataset, options) { - const sections = []; - // Architecture overview from @libar-docs-overview patterns - if (options.includeArchitecture) { - const overviewPatterns = dataset.patterns.filter((p) => p.directive.tags.some((t) => t === 'overview' || t.includes('overview'))); - if (overviewPatterns.length > 0) { - sections.push(heading(2, 'Architecture')); - for (const pattern of overviewPatterns) { - const name = getDisplayName(pattern); - sections.push(heading(3, name)); - if (pattern.directive.description) { - sections.push(paragraph(pattern.directive.description)); - } - } - sections.push(separator()); - } - } - // Patterns summary - if (options.includePatternsSummary) { - const { counts } = dataset; - const progress = completionPercentage(counts); - const progressBar = renderProgressBar(counts.completed, counts.total, 20); - sections.push(heading(2, 'Patterns Summary'), paragraph(`**Progress:** ${progressBar} (${progress}%)`), table(['Category', 'Count'], [...Object.entries(dataset.byCategory)].map(([cat, patterns]) => [ - cat, - String(patterns.length), - ])), separator()); - } - // Timeline summary - if (options.includeTimelineSummary) { - const completedPhases = dataset.byPhase.filter((p) => p.counts.total > 0 && p.counts.completed === p.counts.total).length; - sections.push(heading(2, 'Timeline Summary'), table(['Metric', 'Value'], [ - ['Total Phases', String(dataset.phaseCount)], - ['Completed Phases', String(completedPhases)], - ['Active Phases', String(dataset.byPhase.filter((p) => p.counts.active > 0).length)], - ['Patterns', String(dataset.counts.total)], - ]), separator()); - } - return document('Architecture Overview', sections, { - purpose: 'Project architecture and status overview', - }); -} -//# sourceMappingURL=reporting.js.map \ No newline at end of file diff --git a/dist/renderable/codecs/reporting.js.map b/dist/renderable/codecs/reporting.js.map deleted file mode 100644 index fea35f28..00000000 --- a/dist/renderable/codecs/reporting.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"reporting.js","sourceRoot":"","sources":["../../../src/renderable/codecs/reporting.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,mBAAmB,GAEpB,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAGL,OAAO,EACP,SAAS,EACT,SAAS,EACT,KAAK,EACL,IAAI,EACJ,WAAW,EACX,QAAQ,GACT,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,iBAAiB,GAClB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAyB,oBAAoB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAoB5F;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAoC;IACxE,GAAG,oBAAoB;IACvB,iBAAiB,EAAE,IAAI;IACvB,YAAY,EAAE,IAAI;IAClB,eAAe,EAAE,EAAE;CACpB,CAAC;AAgBF;;GAEG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAuC;IAC9E,GAAG,oBAAoB;IACvB,WAAW,EAAE,IAAI;IACjB,YAAY,EAAE,IAAI;IAClB,cAAc,EAAE,I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,OAAO,CAAC,EACnB;YACE,CAAC,cAAc,EAAE,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;YAC5C,CAAC,kBAAkB,EAAE,MAAM,CAAC,eAAe,CAAC,CAAC;YAC7C,CAAC,eAAe,EAAE,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;YACpF,CAAC,UAAU,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;SAC3C,CACF,EACD,SAAS,EAAE,CACZ,CAAC;IACJ,CAAC;IAED,OAAO,QAAQ,CAAC,uBAAuB,EAAE,QAAQ,EAAE;QACjD,OAAO,EAAE,0CAA0C;KACpD,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/dist/renderable/codecs/requirements.d.ts b/dist/renderable/codecs/requirements.d.ts deleted file mode 100644 index defad315..00000000 --- a/dist/renderable/codecs/requirements.d.ts +++ /dev/null @@ -1,4046 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern RequirementsCodec - * @libar-docs-status completed - * - * ## Requirements Document Codec - * - * Transforms MasterDataset into RenderableDocument for PRD/requirements output. - * Generates PRODUCT-REQUIREMENTS.md and detail files (requirements/*.md). - * - * ### When to Use - * - * - When generating product requirements documentation - * - When creating stakeholder-facing PRD documents - * - When organizing requirements by user role or product area - * - * ### Factory Pattern - * - * Use `createRequirementsCodec(options)` for custom options: - * ```typescript - * const codec = createRequirementsCodec({ groupBy: "user-role" }); - * const doc = codec.decode(dataset); - * ``` - */ -import { z } from 'zod'; -import { MasterDatasetSchema } from '../../validation-schemas/master-dataset.js'; -import { type BaseCodecOptions, type NormalizedStatusFilter } from './types/base.js'; -/** - * Options for RequirementsDocumentCodec - */ -export interface RequirementsCodecOptions extends BaseCodecOptions { - /** Group requirements by (default: "product-area") */ - groupBy?: 'product-area' | 'user-role' | 'phase'; - /** Filter by status (default: all statuses). Uses normalized status values. */ - filterStatus?: NormalizedStatusFilter[]; - /** Include scenario steps (default: true) */ - includeScenarioSteps?: boolean; - /** Include business value (default: true) */ - includeBusinessValue?: boolean; - /** Include Business Rules section from Gherkin Rule: keyword (default: true) */ - includeBusinessRules?: boolean; - /** Render full step details (Given/When/Then) vs just names (default: true) */ - includeStepDetails?: boolean; -} -/** - * Default options for RequirementsDocumentCodec - */ -export declare const DEFAULT_REQUIREMENTS_OPTIONS: Required; -import { RenderableDocumentOutputSchema } from './shared-schema.js'; -/** - * Create a RequirementsDocumentCodec with custom options. - * - * @param options - Codec configuration options - * @returns Configured Zod codec - * - * @example - * ```typescript - * // Group by user role instead of product area - * const codec = createRequirementsCodec({ groupBy: "user-role" }); - * - * // Filter to only completed requirements - * const codec = createRequirementsCodec({ filterStatus: ["completed"] }); - * ``` - */ -export declare function createRequirementsCodec(options?: RequirementsCodecOptions): z.ZodCodec; -/** - * Default Requirements Document Codec - * - * Transforms MasterDataset → RenderableDocument for product requirements. - * Features grouped by product area and user role. - */ -export declare const RequirementsDocumentCodec: z.ZodCodec>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - tagRegistry: z.ZodObject<{ - $schema: z.ZodOptional; - version: z.ZodDefault; - categories: z.ZodArray>>; - }, z.core.$strict>>; - metadataTags: z.ZodArray; - purpose: z.ZodString; - required: z.ZodDefault>; - repeatable: z.ZodDefault>; - values: z.ZodOptional>; - default: z.ZodOptional; - example: z.ZodOptional; - metadataKey: z.ZodOptional; - transform: z.ZodOptional>; - }, z.core.$strict>>; - aggregationTags: z.ZodArray; - purpose: z.ZodString; - }, z.core.$strict>>; - formatOptions: z.ZodDefault>; - tagPrefix: z.ZodDefault; - fileOptInTag: z.ZodDefault; - }, z.core.$strict>; - byStatus: z.ZodObject<{ - completed: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - active: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - planned: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>; - byPhase: z.ZodArray; - patterns: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - counts: z.ZodObject<{ - completed: z.ZodNumber; - active: z.ZodNumber; - planned: z.ZodNumber; - total: z.ZodNumber; - }, z.core.$strip>; - }, z.core.$strip>>; - byQuarter: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byCategory: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - bySource: z.ZodObject<{ - typescript: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - gherkin: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - roadmap: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - prd: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>; - counts: z.ZodObject<{ - completed: z.ZodNumber; - active: z.ZodNumber; - planned: z.ZodNumber; - total: z.ZodNumber; - }, z.core.$strip>; - phaseCount: z.ZodNumber; - categoryCount: z.ZodNumber; - relationshipIndex: z.ZodOptional; - usedBy: z.ZodArray; - dependsOn: z.ZodArray; - enables: z.ZodArray; - implementsPatterns: z.ZodArray; - implementedBy: z.ZodArray; - }, z.core.$strip>>; - extendsPattern: z.ZodOptional; - extendedBy: z.ZodArray; - seeAlso: z.ZodArray; - apiRef: z.ZodArray; - }, z.core.$strip>>>; - archIndex: z.ZodOptional>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byContext: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byLayer: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byView: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - all: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>>; -}, z.core.$strip>, z.ZodObject<{ - title: z.ZodString; - purpose: z.ZodOptional; - detailLevel: z.ZodOptional; - sections: z.ZodArray; - additionalFiles: z.ZodOptional>; -}, z.core.$strip>>; -/** - * Generate URL-safe slug from pattern name with phase prefix - * - * Produces readable slugs with phase ordering: - * - DeciderPattern (phase 14) → "phase-14-decider-pattern" - * - BddTestingInfrastructure (phase 19) → "phase-19-bdd-testing-infrastructure" - * - SomeUnassigned (no phase) → "phase-00-some-unassigned" - * - * @param patternName - The pattern name (typically CamelCase) - * @param phase - Optional phase number (defaults to 0) - * @returns URL-safe slug with phase prefix - * - * @internal Exported for testing - not part of public API - */ -export declare function requirementToSlug(patternName: string, phase: number | undefined): string; -//# sourceMappingURL=requirements.d.ts.map \ No newline at end of file diff --git a/dist/renderable/codecs/requirements.d.ts.map b/dist/renderable/codecs/requirements.d.ts.map deleted file mode 100644 index 8dbeaed3..00000000 --- a/dist/renderable/codecs/requirements.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"requirements.d.ts","sourceRoot":"","sources":["../../../src/renderable/codecs/requirements.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,mBAAmB,EAEpB,MAAM,4CAA4C,CAAC;AA2BpD,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAG5B,MAAM,iBAAiB,CAAC;AA8BzB;;GAEG;AACH,MAAM,WAAW,wBAAyB,SAAQ,gBAAgB;IAChE,sDAAsD;IACtD,OAAO,CAAC,EAAE,c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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAA4B,CAAC;AA8SnE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAIxF"} \ No newline at end of file diff --git a/dist/renderable/codecs/requirements.js b/dist/renderable/codecs/requirements.js deleted file mode 100644 index 6e8a993d..00000000 --- a/dist/renderable/codecs/requirements.js +++ /dev/null @@ -1,413 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern RequirementsCodec - * @libar-docs-status completed - * - * ## Requirements Document Codec - * - * Transforms MasterDataset into RenderableDocument for PRD/requirements output. - * Generates PRODUCT-REQUIREMENTS.md and detail files (requirements/*.md). - * - * ### When to Use - * - * - When generating product requirements documentation - * - When creating stakeholder-facing PRD documents - * - When organizing requirements by user role or product area - * - * ### Factory Pattern - * - * Use `createRequirementsCodec(options)` for custom options: - * ```typescript - * const codec = createRequirementsCodec({ groupBy: "user-role" }); - * const doc = codec.decode(dataset); - * ``` - */ -import { z } from 'zod'; -import { MasterDatasetSchema, } from '../../validation-schemas/master-dataset.js'; -import { heading, paragraph, separator, table, list, collapsible, linkOut, document, } from '../schema.js'; -import { renderScenarioContent, renderBusinessRulesSection } from './helpers.js'; -import { normalizeStatus } from '../../taxonomy/index.js'; -import { getStatusEmoji, getDisplayName, computeStatusCounts, completionPercentage, renderProgressBar, sortByStatusAndName, formatBusinessValue, } from '../utils.js'; -import { toKebabCase, groupBy } from '../../utils/index.js'; -import { getPatternName } from '../../api/pattern-helpers.js'; -import { DEFAULT_BASE_OPTIONS, mergeOptions, } from './types/base.js'; -// ═══════════════════════════════════════════════════════════════════════════ -// Path Normalization Helpers -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Known repository prefixes that should be stripped from implementation paths. - */ -const REPO_PREFIXES = ['libar-platform/', 'monorepo/']; -/** - * Normalize implementation file path by stripping repository prefixes. - * - * @param filePath - The implementation file path (may include repo prefix) - * @returns Path with repo prefix stripped if present - */ -function normalizeImplPath(filePath) { - for (const prefix of REPO_PREFIXES) { - if (filePath.startsWith(prefix)) { - return filePath.slice(prefix.length); - } - } - return filePath; -} -/** - * Default options for RequirementsDocumentCodec - */ -export const DEFAULT_REQUIREMENTS_OPTIONS = { - ...DEFAULT_BASE_OPTIONS, - groupBy: 'product-area', - filterStatus: [], - includeScenarioSteps: true, - includeBusinessValue: true, - includeBusinessRules: true, - includeStepDetails: true, -}; -import { RenderableDocumentOutputSchema } from './shared-schema.js'; -// ═══════════════════════════════════════════════════════════════════════════ -// Requirements Document Codec -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Create a RequirementsDocumentCodec with custom options. - * - * @param options - Codec configuration options - * @returns Configured Zod codec - * - * @example - * ```typescript - * // Group by user role instead of product area - * const codec = createRequirementsCodec({ groupBy: "user-role" }); - * - * // Filter to only completed requirements - * const codec = createRequirementsCodec({ filterStatus: ["completed"] }); - * ``` - */ -export function createRequirementsCodec(options) { - const opts = mergeOptions(DEFAULT_REQUIREMENTS_OPTIONS, options); - return z.codec(MasterDatasetSchema, RenderableDocumentOutputSchema, { - decode: (dataset) => { - return buildRequirementsDocument(dataset, opts); - }, - /** @throws Always - this codec is decode-only. See zod-codecs.md */ - encode: () => { - throw new Error('RequirementsDocumentCodec is decode-only. See zod-codecs.md'); - }, - }); -} -/** - * Default Requirements Document Codec - * - * Transforms MasterDataset → RenderableDocument for product requirements. - * Features grouped by product area and user role. - */ -export const RequirementsDocumentCodec = createRequirementsCodec(); -// ═══════════════════════════════════════════════════════════════════════════ -// Document Builder -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Build requirements document - */ -function buildRequirementsDocument(dataset, options) { - const sections = []; - // Get PRD patterns (patterns with product metadata), excluding ADR/PDR decisions - // (decisions belong to the ADR codec, not requirements) - let prdPatterns = dataset.bySource.prd.filter((p) => p.adr === undefined); - // Apply status filter if specified - if (options.filterStatus.length > 0) { - prdPatterns = prdPatterns.filter((p) => options.filterStatus.includes(normalizeStatus(p.status))); - } - if (prdPatterns.length === 0) { - sections.push(heading(2, 'No Product Requirements'), paragraph('No patterns have product area, user role, or business value metadata.')); - return document('Product Requirements', sections, { - purpose: 'Product requirements documentation', - }); - } - // 1. Summary - sections.push(...buildRequirementsSummary(prdPatterns)); - // 2. Features by primary grouping - if (options.groupBy === 'user-role') { - sections.push(...buildByUserRole(prdPatterns)); - sections.push(...buildByProductArea(prdPatterns, options)); - } - else if (options.groupBy === 'phase') { - sections.push(...buildByPhase(prdPatterns, options)); - sections.push(...buildByProductArea(prdPatterns, options)); - } - else { - // Default: product-area - sections.push(...buildByProductArea(prdPatterns, options)); - sections.push(...buildByUserRole(prdPatterns)); - } - // 4. All Features table - sections.push(...buildAllFeaturesTable(prdPatterns)); - // Build additional files for detailed requirements (if enabled) - const additionalFiles = options.generateDetailFiles - ? buildRequirementsDetailFiles(prdPatterns, options, dataset) - : {}; - const docOpts = { - purpose: 'Product requirements and feature specifications', - detailLevel: options.generateDetailFiles - ? 'Overview with links to detailed requirements' - : 'Compact summary', - }; - if (Object.keys(additionalFiles).length > 0) { - docOpts.additionalFiles = additionalFiles; - } - return document('Product Requirements', sections, docOpts); -} -// ═══════════════════════════════════════════════════════════════════════════ -// Section Builders -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Build requirements summary section - */ -function buildRequirementsSummary(patterns) { - const counts = computeStatusCounts(patterns); - const progress = completionPercentage(counts); - const progressBar = renderProgressBar(counts.completed, counts.total, 20); - // Group by product area - const byArea = groupBy(patterns.filter((p) => p.productArea !== undefined), (p) => p.productArea); - // Group by user role - const byRole = groupBy(patterns.filter((p) => p.userRole !== undefined), (p) => p.userRole); - return [ - heading(2, 'Summary'), - paragraph(`**Overall:** ${progressBar} (${progress}%)`), - table(['Metric', 'Value'], [ - ['Total Features', String(counts.total)], - ['Completed', String(counts.completed)], - ['Active', String(counts.active)], - ['Planned', String(counts.planned)], - ['Product Areas', String(byArea.size)], - ['User Roles', String(byRole.size)], - ]), - separator(), - ]; -} -/** - * Build features by product area section - * Each feature links to its individual detail file when generateDetailFiles is enabled - */ -function buildByProductArea(patterns, options) { - const sections = []; - const byArea = groupBy(patterns.filter((p) => p.productArea), (p) => p.productArea ?? ''); - if (byArea.size === 0) { - return []; - } - sections.push(heading(2, 'By Product Area')); - const sortedAreas = [...byArea.keys()].sort(); - for (const area of sortedAreas) { - const areaPatterns = byArea.get(area) ?? []; - const counts = computeStatusCounts(areaPatterns); - const progress = completionPercentage(counts); - sections.push(heading(3, area)); - sections.push(paragraph(`${counts.completed}/${counts.total} complete (${progress}%)`)); - // Feature list - link each feature to its individual file if enabled - const items = sortByStatusAndName([...areaPatterns]).map((p) => { - const emoji = getStatusEmoji(p.status); - const name = getDisplayName(p); - const businessValue = options.includeBusinessValue - ? formatBusinessValue(p.businessValue) - : null; - const label = businessValue ? `${emoji} ${name} - ${businessValue}` : `${emoji} ${name}`; - if (options.generateDetailFiles) { - const slug = requirementToSlug(getPatternName(p), p.phase); - return `[${label}](requirements/${slug}.md)`; - } - return label; - }); - sections.push(list(items)); - } - sections.push(separator()); - return sections; -} -/** - * Build features by user role section - */ -function buildByUserRole(patterns) { - const sections = []; - const byRole = groupBy(patterns.filter((p) => p.userRole), (p) => p.userRole ?? ''); - if (byRole.size === 0) { - return []; - } - sections.push(heading(2, 'By User Role')); - const sortedRoles = [...byRole.keys()].sort(); - for (const role of sortedRoles) { - const rolePatterns = byRole.get(role) ?? []; - const counts = computeStatusCounts(rolePatterns); - // Use collapsible for user role breakdown - const roleContent = []; - const rows = sortByStatusAndName([...rolePatterns]).map((p) => { - const emoji = getStatusEmoji(p.status); - const name = getDisplayName(p); - const area = p.productArea ?? '-'; - return [`${emoji} ${name}`, area, normalizeStatus(p.status)]; - }); - roleContent.push(table(['Feature', 'Product Area', 'Status'], rows)); - sections.push(collapsible(`${role} (${counts.total} features, ${counts.completed} complete)`, roleContent)); - } - sections.push(separator()); - return sections; -} -/** - * Build features by phase section - * Each feature links to its individual detail file when generateDetailFiles is enabled - */ -function buildByPhase(patterns, options) { - const sections = []; - const byPhase = groupBy(patterns.filter((p) => p.phase !== undefined), (p) => p.phase ?? 0); - if (byPhase.size === 0) { - return []; - } - sections.push(heading(2, 'By Phase')); - const sortedPhases = [...byPhase.keys()].sort((a, b) => a - b); - for (const phase of sortedPhases) { - const phasePatterns = byPhase.get(phase) ?? []; - const counts = computeStatusCounts(phasePatterns); - const progress = completionPercentage(counts); - sections.push(heading(3, `Phase ${phase}`)); - sections.push(paragraph(`${counts.completed}/${counts.total} complete (${progress}%)`)); - // Feature list - link each feature to its individual file if enabled - const items = sortByStatusAndName([...phasePatterns]).map((p) => { - const emoji = getStatusEmoji(p.status); - const name = getDisplayName(p); - const businessValue = options.includeBusinessValue - ? formatBusinessValue(p.businessValue) - : null; - const label = businessValue ? `${emoji} ${name} - ${businessValue}` : `${emoji} ${name}`; - if (options.generateDetailFiles) { - const slug = requirementToSlug(getPatternName(p), p.phase); - return `[${label}](requirements/${slug}.md)`; - } - return label; - }); - sections.push(list(items)); - } - sections.push(separator()); - return sections; -} -/** - * Build all features table - */ -function buildAllFeaturesTable(patterns) { - const sorted = sortByStatusAndName([...patterns]); - const rows = sorted.map((p) => { - const emoji = getStatusEmoji(p.status); - const name = getDisplayName(p); - const area = p.productArea ?? '-'; - const role = p.userRole ?? '-'; - const status = normalizeStatus(p.status); - return [`${emoji} ${name}`, area, role, status]; - }); - return [ - heading(2, 'All Features'), - table(['Feature', 'Product Area', 'User Role', 'Status'], rows), - separator(), - ]; -} -// ═══════════════════════════════════════════════════════════════════════════ -// Individual Detail Files (Progressive Disclosure) -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Generate URL-safe slug from pattern name with phase prefix - * - * Produces readable slugs with phase ordering: - * - DeciderPattern (phase 14) → "phase-14-decider-pattern" - * - BddTestingInfrastructure (phase 19) → "phase-19-bdd-testing-infrastructure" - * - SomeUnassigned (no phase) → "phase-00-some-unassigned" - * - * @param patternName - The pattern name (typically CamelCase) - * @param phase - Optional phase number (defaults to 0) - * @returns URL-safe slug with phase prefix - * - * @internal Exported for testing - not part of public API - */ -export function requirementToSlug(patternName, phase) { - const phaseNum = phase ?? 0; - const paddedPhase = String(phaseNum).padStart(2, '0'); - return `phase-${paddedPhase}-${toKebabCase(patternName)}`; -} -/** - * Build individual requirement files (progressive disclosure) - * Creates one file per requirement instead of grouping by product area - */ -function buildRequirementsDetailFiles(patterns, options, dataset) { - const files = {}; - for (const pattern of patterns) { - const slug = requirementToSlug(getPatternName(pattern), pattern.phase); - files[`requirements/${slug}.md`] = buildSingleRequirementDocument(pattern, options, dataset); - } - return files; -} -/** - * Build a single requirement detail document - */ -function buildSingleRequirementDocument(pattern, options, dataset) { - const sections = []; - const emoji = getStatusEmoji(pattern.status); - const name = getDisplayName(pattern); - // Metadata - const metaRows = [['Status', normalizeStatus(pattern.status)]]; - if (pattern.productArea) { - metaRows.push(['Product Area', pattern.productArea]); - } - if (pattern.userRole) { - metaRows.push(['User Role', pattern.userRole]); - } - if (options.includeBusinessValue && pattern.businessValue) { - metaRows.push(['Business Value', formatBusinessValue(pattern.businessValue)]); - } - if (pattern.phase !== undefined) { - metaRows.push(['Phase', String(pattern.phase)]); - } - sections.push(heading(2, 'Overview'), table(['Property', 'Value'], metaRows)); - // Description - if (pattern.directive.description) { - sections.push(heading(2, 'Description'), paragraph(pattern.directive.description)); - } - // Use cases - if (pattern.useCases && pattern.useCases.length > 0) { - sections.push(heading(2, 'Use Cases'), list([...pattern.useCases])); - } - // Scenarios as acceptance criteria with full steps, DataTables, and DocStrings - if (options.includeScenarioSteps && pattern.scenarios && pattern.scenarios.length > 0) { - sections.push(heading(2, 'Acceptance Criteria')); - for (const scenario of pattern.scenarios) { - sections.push(...renderScenarioContent(scenario)); - } - } - // Business Rules from Gherkin Rule: keyword - // Use H2 to match other top-level sections in detail documents - if (options.includeBusinessRules) { - sections.push(...renderBusinessRulesSection(pattern.rules, { baseHeadingLevel: 2 })); - } - // Deliverables - if (pattern.deliverables && pattern.deliverables.length > 0) { - const deliverableItems = pattern.deliverables.map((d) => { - const status = ` (${d.status})`; - return `${d.name}${status}`; - }); - sections.push(heading(2, 'Deliverables'), list(deliverableItems)); - } - // Implementations (files that implement this pattern via @libar-docs-implements) - const patternKey = getPatternName(pattern); - const rel = dataset.relationshipIndex?.[patternKey]; - if (rel?.implementedBy && rel.implementedBy.length > 0) { - sections.push(heading(2, 'Implementations')); - sections.push(paragraph('Files that implement this pattern:'), list(rel.implementedBy.map((impl) => { - const fileName = impl.file.split('/').pop() ?? impl.file; - // Normalize path to strip repo prefixes (e.g., "libar-platform/packages/..." -> "packages/...") - const normalizedPath = normalizeImplPath(impl.file); - // Link is relative from output/requirements/ directory, go up two levels to project root - const link = `[\`${fileName}\`](../../${normalizedPath})`; - return impl.description ? `${link} - ${impl.description}` : link; - }))); - } - // Back link - sections.push(separator(), linkOut('← Back to Product Requirements', '../PRODUCT-REQUIREMENTS.md')); - return document(`${emoji} ${name}`, sections, { - purpose: `Detailed requirements for the ${name} feature`, - }); -} -//# sourceMappingURL=requirements.js.map \ No newline at end of file diff --git a/dist/renderable/codecs/requirements.js.map b/dist/renderable/codecs/requirements.js.map deleted file mode 100644 index 7bec28de..00000000 --- a/dist/renderable/codecs/requirements.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"requirements.js","sourceRoot":"","sources":["../../../src/renderable/codecs/requirements.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,mBAAmB,GAEpB,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAGL,OAAO,EACP,SAAS,EACT,SAAS,EACT,KAAK,EACL,IAAI,EACJ,WAAW,EACX,OAAO,EACP,QAAQ,GACT,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EACL,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAGL,oBAAoB,EACpB,YAAY,GACb,MAAM,iBAAiB,CAAC;AAEzB,8EAA8E;AAC9E,6BAA6B;AAC7B,8EAA8E;AAE9E;;GAEG;AACH,MAAM,aAAa,GAAG,CAAC,iBAAiB,EAAE,WAAW,CAAC,CAAC;AAEvD;;;;;GAKG;AACH,SAAS,iBAAiB,CAAC,QAAgB;IACzC,KAAK,MAAM,MAAM,IAAI,aAAa,EAAE,CAAC;QACnC,IAAI,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;YAChC,OAAO,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACvC,CAAC;IACH,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;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C,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,IAAI,IAAI,CAAC,IAAI,CAAC;YACzD,gGAAgG;YAChG,MAAM,cAAc,GAAG,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACpD,yFAAyF;YACzF,MAAM,IAAI,GAAG,MAAM,QAAQ,aAAa,cAAc,GAAG,CAAC;YAC1D,OAAO,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,IAAI,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;QACnE,CAAC,CAAC,CACH,CACF,CAAC;IACJ,CAAC;IAED,YAAY;IACZ,QAAQ,CAAC,IAAI,CACX,SAAS,EAAE,EACX,OAAO,CAAC,gCAAgC,EAAE,4BAA4B,CAAC,CACxE,CAAC;IAEF,OAAO,QAAQ,CAAC,GAAG,KAAK,IAAI,IAAI,EAAE,EAAE,QAAQ,EAAE;QAC5C,OAAO,EAAE,iCAAiC,IAAI,UAAU;KACzD,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/dist/renderable/codecs/session.d.ts b/dist/renderable/codecs/session.d.ts deleted file mode 100644 index ddcb3268..00000000 --- a/dist/renderable/codecs/session.d.ts +++ /dev/null @@ -1,8037 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern SessionCodec - * @libar-docs-status completed - * @libar-docs-arch-role projection - * @libar-docs-arch-context renderer - * @libar-docs-arch-layer application - * @libar-docs-include codec-transformation - * - * ## Session Document Codec - * - * Transforms MasterDataset into RenderableDocuments for session/planning outputs: - * - SESSION-CONTEXT.md (current session context) - * - REMAINING-WORK.md (incomplete work aggregation) - * - * ### When to Use - * - * - When generating session context for Claude Code integration - * - When tracking remaining work and incomplete deliverables - * - When building session handoff documentation - * - * ### Factory Pattern - * - * Use factory functions for custom options: - * ```typescript - * const codec = createSessionContextCodec({ includeRelatedPatterns: true }); - * const remainingCodec = createRemainingWorkCodec({ sortBy: "priority" }); - * ``` - */ -import { z } from 'zod'; -import { MasterDatasetSchema } from '../../validation-schemas/master-dataset.js'; -import { type BaseCodecOptions } from './types/base.js'; -/** - * Options for SessionContextCodec - */ -export interface SessionCodecOptions extends BaseCodecOptions { - /** Include acceptance criteria (default: true) */ - includeAcceptanceCriteria?: boolean; - /** Include dependencies (default: true) */ - includeDependencies?: boolean; - /** Include deliverables (default: true) */ - includeDeliverables?: boolean; - /** Include related patterns (default: false) */ - includeRelatedPatterns?: boolean; - /** Include handoff context (default: true) */ - includeHandoffContext?: boolean; -} -/** - * Default options for SessionContextCodec - */ -export declare const DEFAULT_SESSION_OPTIONS: Required; -/** - * Options for RemainingWorkCodec - */ -export interface RemainingWorkCodecOptions extends BaseCodecOptions { - /** Include incomplete items (default: true) */ - includeIncomplete?: boolean; - /** Include blocked items (default: true) */ - includeBlocked?: boolean; - /** Include next actionable items (default: true) */ - includeNextActionable?: boolean; - /** Maximum next actionable items to show (default: 5) */ - maxNextActionable?: number; - /** Include statistics (default: true) */ - includeStats?: boolean; - /** Sort by (default: "phase") */ - sortBy?: 'phase' | 'priority' | 'effort' | 'quarter'; - /** Group planned items by (default: "none") */ - groupPlannedBy?: 'quarter' | 'priority' | 'level' | 'none'; -} -/** - * Default options for RemainingWorkCodec - */ -export declare const DEFAULT_REMAINING_WORK_OPTIONS: Required; -import { RenderableDocumentOutputSchema } from './shared-schema.js'; -/** - * Create a SessionContextCodec with custom options. - * - * @param options - Codec configuration options - * @returns Configured Zod codec - * - * @example - * ```typescript - * // Include related patterns - * const codec = createSessionContextCodec({ includeRelatedPatterns: true }); - * - * // Disable detail files for compact output - * const codec = createSessionContextCodec({ generateDetailFiles: false }); - * ``` - */ -export declare function createSessionContextCodec(options?: SessionCodecOptions): z.ZodCodec; -/** - * Default Session Context Document Codec - * - * Transforms MasterDataset → RenderableDocument for session context. - * Shows current phase focus, active work, and planning context. - */ -export declare const SessionContextCodec: z.ZodCodec>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - tagRegistry: z.ZodObject<{ - $schema: z.ZodOptional; - version: z.ZodDefault; - categories: z.ZodArray>>; - }, z.core.$strict>>; - metadataTags: z.ZodArray; - purpose: z.ZodString; - required: z.ZodDefault>; - repeatable: z.ZodDefault>; - values: z.ZodOptional>; - default: z.ZodOptional; - example: z.ZodOptional; - metadataKey: z.ZodOptional; - transform: z.ZodOptional>; - }, z.core.$strict>>; - aggregationTags: z.ZodArray; - purpose: z.ZodString; - }, z.core.$strict>>; - formatOptions: z.ZodDefault>; - tagPrefix: z.ZodDefault; - fileOptInTag: z.ZodDefault; - }, z.core.$strict>; - byStatus: z.ZodObject<{ - completed: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - active: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - planned: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>; - byPhase: z.ZodArray; - patterns: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - counts: z.ZodObject<{ - completed: z.ZodNumber; - active: z.ZodNumber; - planned: z.ZodNumber; - total: z.ZodNumber; - }, z.core.$strip>; - }, z.core.$strip>>; - byQuarter: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byCategory: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - bySource: z.ZodObject<{ - typescript: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - gherkin: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - roadmap: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - prd: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>; - counts: z.ZodObject<{ - completed: z.ZodNumber; - active: z.ZodNumber; - planned: z.ZodNumber; - total: z.ZodNumber; - }, z.core.$strip>; - phaseCount: z.ZodNumber; - categoryCount: z.ZodNumber; - relationshipIndex: z.ZodOptional; - usedBy: z.ZodArray; - dependsOn: z.ZodArray; - enables: z.ZodArray; - implementsPatterns: z.ZodArray; - implementedBy: z.ZodArray; - }, z.core.$strip>>; - extendsPattern: z.ZodOptional; - extendedBy: z.ZodArray; - seeAlso: z.ZodArray; - apiRef: z.ZodArray; - }, z.core.$strip>>>; - archIndex: z.ZodOptional>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byContext: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byLayer: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byView: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - all: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>>; -}, z.core.$strip>, z.ZodObject<{ - title: z.ZodString; - purpose: z.ZodOptional; - detailLevel: z.ZodOptional; - sections: z.ZodArray; - additionalFiles: z.ZodOptional>; -}, z.core.$strip>>; -/** - * Create a RemainingWorkCodec with custom options. - * - * @param options - Codec configuration options - * @returns Configured Zod codec - * - * @example - * ```typescript - * // Sort by priority instead of phase - * const codec = createRemainingWorkCodec({ sortBy: "priority" }); - * - * // Group planned items by quarter - * const codec = createRemainingWorkCodec({ groupPlannedBy: "quarter" }); - * ``` - */ -export declare function createRemainingWorkCodec(options?: RemainingWorkCodecOptions): z.ZodCodec; -/** - * Default Remaining Work Document Codec - * - * Transforms MasterDataset → RenderableDocument for remaining work. - * Aggregates all incomplete work across phases. - */ -export declare const RemainingWorkCodec: z.ZodCodec>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - tagRegistry: z.ZodObject<{ - $schema: z.ZodOptional; - version: z.ZodDefault; - categories: z.ZodArray>>; - }, z.core.$strict>>; - metadataTags: z.ZodArray; - purpose: z.ZodString; - required: z.ZodDefault>; - repeatable: z.ZodDefault>; - values: z.ZodOptional>; - default: z.ZodOptional; - example: z.ZodOptional; - metadataKey: z.ZodOptional; - transform: z.ZodOptional>; - }, z.core.$strict>>; - aggregationTags: z.ZodArray; - purpose: z.ZodString; - }, z.core.$strict>>; - formatOptions: z.ZodDefault>; - tagPrefix: z.ZodDefault; - fileOptInTag: z.ZodDefault; - }, z.core.$strict>; - byStatus: z.ZodObject<{ - completed: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - active: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - planned: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>; - byPhase: z.ZodArray; - patterns: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - counts: z.ZodObject<{ - completed: z.ZodNumber; - active: z.ZodNumber; - planned: z.ZodNumber; - total: z.ZodNumber; - }, z.core.$strip>; - }, z.core.$strip>>; - byQuarter: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byCategory: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - bySource: z.ZodObject<{ - typescript: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - gherkin: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - roadmap: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - prd: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>; - counts: z.ZodObject<{ - completed: z.ZodNumber; - active: z.ZodNumber; - planned: z.ZodNumber; - total: z.ZodNumber; - }, z.core.$strip>; - phaseCount: z.ZodNumber; - categoryCount: z.ZodNumber; - relationshipIndex: z.ZodOptional; - usedBy: z.ZodArray; - dependsOn: z.ZodArray; - enables: z.ZodArray; - implementsPatterns: z.ZodArray; - implementedBy: z.ZodArray; - }, z.core.$strip>>; - extendsPattern: z.ZodOptional; - extendedBy: z.ZodArray; - seeAlso: z.ZodArray; - apiRef: z.ZodArray; - }, z.core.$strip>>>; - archIndex: z.ZodOptional>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byContext: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byLayer: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byView: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - all: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>>; -}, z.core.$strip>, z.ZodObject<{ - title: z.ZodString; - purpose: z.ZodOptional; - detailLevel: z.ZodOptional; - sections: z.ZodArray; - additionalFiles: z.ZodOptional>; -}, z.core.$strip>>; -//# sourceMappingURL=session.d.ts.map \ No newline at end of file diff --git a/dist/renderable/codecs/session.d.ts.map b/dist/renderable/codecs/session.d.ts.map deleted file mode 100644 index 200d6b8a..00000000 --- a/dist/renderable/codecs/session.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../src/renderable/codecs/session.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,mBAAmB,EAGpB,MAAM,4CAA4C,CAAC;AA8BpD,OAAO,EAAE,KAAK,gBAAgB,EAAsC,MAAM,iBAAiB,CAAC;AA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ist/renderable/codecs/session.js +++ /dev/null @@ -1,839 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern SessionCodec - * @libar-docs-status completed - * @libar-docs-arch-role projection - * @libar-docs-arch-context renderer - * @libar-docs-arch-layer application - * @libar-docs-include codec-transformation - * - * ## Session Document Codec - * - * Transforms MasterDataset into RenderableDocuments for session/planning outputs: - * - SESSION-CONTEXT.md (current session context) - * - REMAINING-WORK.md (incomplete work aggregation) - * - * ### When to Use - * - * - When generating session context for Claude Code integration - * - When tracking remaining work and incomplete deliverables - * - When building session handoff documentation - * - * ### Factory Pattern - * - * Use factory functions for custom options: - * ```typescript - * const codec = createSessionContextCodec({ includeRelatedPatterns: true }); - * const remainingCodec = createRemainingWorkCodec({ sortBy: "priority" }); - * ``` - */ -import { z } from 'zod'; -import { MasterDatasetSchema, } from '../../validation-schemas/master-dataset.js'; -import { heading, paragraph, separator, table, list, collapsible, linkOut, document, } from '../schema.js'; -import { normalizeStatus, isPatternComplete, isPatternActive, isPatternPlanned, } from '../../taxonomy/index.js'; -import { getPhaseStatusEmoji } from '../../validation/types.js'; -import { getStatusEmoji, getDisplayName, extractSummary, completionPercentage, renderProgressBar, sortByPhaseAndName, formatBusinessValue, } from '../utils.js'; -import { DEFAULT_BASE_OPTIONS, mergeOptions } from './types/base.js'; -/** - * Default options for SessionContextCodec - */ -export const DEFAULT_SESSION_OPTIONS = { - ...DEFAULT_BASE_OPTIONS, - includeAcceptanceCriteria: true, - includeDependencies: true, - includeDeliverables: true, - includeRelatedPatterns: false, - includeHandoffContext: true, -}; -/** - * Default options for RemainingWorkCodec - */ -export const DEFAULT_REMAINING_WORK_OPTIONS = { - ...DEFAULT_BASE_OPTIONS, - includeIncomplete: true, - includeBlocked: true, - includeNextActionable: true, - maxNextActionable: 5, - includeStats: true, - sortBy: 'phase', - groupPlannedBy: 'none', -}; -import { RenderableDocumentOutputSchema } from './shared-schema.js'; -import { renderAcceptanceCriteria, renderBusinessRulesSection } from './helpers.js'; -import { toKebabCase } from '../../utils/index.js'; -// ═══════════════════════════════════════════════════════════════════════════ -// Session Context Document Codec -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Create a SessionContextCodec with custom options. - * - * @param options - Codec configuration options - * @returns Configured Zod codec - * - * @example - * ```typescript - * // Include related patterns - * const codec = createSessionContextCodec({ includeRelatedPatterns: true }); - * - * // Disable detail files for compact output - * const codec = createSessionContextCodec({ generateDetailFiles: false }); - * ``` - */ -export function createSessionContextCodec(options) { - const opts = mergeOptions(DEFAULT_SESSION_OPTIONS, options); - return z.codec(MasterDatasetSchema, RenderableDocumentOutputSchema, { - decode: (dataset) => { - return buildSessionContextDocument(dataset, opts); - }, - /** @throws Always - this codec is decode-only. See zod-codecs.md */ - encode: () => { - throw new Error('SessionContextCodec is decode-only. See zod-codecs.md'); - }, - }); -} -/** - * Default Session Context Document Codec - * - * Transforms MasterDataset → RenderableDocument for session context. - * Shows current phase focus, active work, and planning context. - */ -export const SessionContextCodec = createSessionContextCodec(); -/** - * Create a RemainingWorkCodec with custom options. - * - * @param options - Codec configuration options - * @returns Configured Zod codec - * - * @example - * ```typescript - * // Sort by priority instead of phase - * const codec = createRemainingWorkCodec({ sortBy: "priority" }); - * - * // Group planned items by quarter - * const codec = createRemainingWorkCodec({ groupPlannedBy: "quarter" }); - * ``` - */ -export function createRemainingWorkCodec(options) { - const opts = mergeOptions(DEFAULT_REMAINING_WORK_OPTIONS, options); - return z.codec(MasterDatasetSchema, RenderableDocumentOutputSchema, { - decode: (dataset) => { - return buildRemainingWorkDocument(dataset, opts); - }, - /** @throws Always - this codec is decode-only. See zod-codecs.md */ - encode: () => { - throw new Error('RemainingWorkCodec is decode-only. See zod-codecs.md'); - }, - }); -} -/** - * Default Remaining Work Document Codec - * - * Transforms MasterDataset → RenderableDocument for remaining work. - * Aggregates all incomplete work across phases. - */ -export const RemainingWorkCodec = createRemainingWorkCodec(); -// ═══════════════════════════════════════════════════════════════════════════ -// Session Context Document Builder -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Build session context document - */ -function buildSessionContextDocument(dataset, options) { - const sections = []; - // 1. Overall status - sections.push(...buildSessionStatus(dataset)); - // 2. Phase navigation table (links to detail files) - sections.push(...buildSessionPhaseNavigation(dataset, options)); - // 3. Active work (current focus) - sections.push(...buildActiveWork(dataset, options)); - // 4. Current phase context (summary only) - sections.push(...buildCurrentPhaseContextSummary(dataset, options)); - // 5. Blocked items (if any - controlled by includeDependencies) - if (options.includeDependencies) { - sections.push(...buildBlockedItems(dataset)); - } - // 6. Recent completions - sections.push(...buildSessionRecentCompletions(dataset, options)); - // Build phase detail files (if enabled) - const additionalFiles = options.generateDetailFiles - ? buildSessionPhaseFiles(dataset, options) - : {}; - const docOpts = { - purpose: 'Current session context and focus areas', - detailLevel: options.generateDetailFiles - ? 'Summary with links to phase details' - : 'Compact summary', - }; - if (Object.keys(additionalFiles).length > 0) { - docOpts.additionalFiles = additionalFiles; - } - return document('Session Context', sections, docOpts); -} -/** - * Build session status section - */ -function buildSessionStatus(dataset) { - const { counts } = dataset; - const progress = completionPercentage(counts); - const progressBar = renderProgressBar(counts.completed, counts.total, 20); - // Find current phase (first incomplete phase) - const currentPhase = dataset.byPhase.find((p) => p.counts.total > 0 && p.counts.completed < p.counts.total); - const currentPhaseInfo = currentPhase - ? `Phase ${currentPhase.phaseNumber}: ${currentPhase.phaseName ?? 'Unnamed'}` - : 'All phases complete'; - return [ - heading(2, 'Session Status'), - paragraph(`**Overall Progress:** ${progressBar} (${progress}%)`), - paragraph(`**Current Focus:** ${currentPhaseInfo}`), - table(['Metric', 'Value'], [ - ['Active Patterns', String(counts.active)], - ['Completed', String(counts.completed)], - ['Remaining', String(counts.planned + counts.active)], - ]), - separator(), - ]; -} -/** - * Build active work section - */ -function buildActiveWork(dataset, _options) { - const sections = []; - const activePatterns = dataset.byStatus.active; - if (activePatterns.length === 0) { - sections.push(heading(2, 'Active Work'), paragraph('No patterns are currently active.'), separator()); - return sections; - } - sections.push(heading(2, 'Active Work')); - sections.push(paragraph(`${activePatterns.length} patterns in progress:`)); - // Group by phase - const byPhase = new Map(); - for (const p of activePatterns) { - const phase = p.phase ?? 0; - const existing = byPhase.get(phase) ?? []; - existing.push(p); - byPhase.set(phase, existing); - } - // Sort by phase - const sortedPhases = [...byPhase.keys()].sort((a, b) => a - b); - for (const phase of sortedPhases) { - const patterns = byPhase.get(phase) ?? []; - const phaseLabel = phase === 0 ? 'Unphased' : `Phase ${phase}`; - sections.push(heading(3, `🚧 ${phaseLabel}`)); - const rows = patterns.map((p) => { - const name = getDisplayName(p); - const summary = extractSummary(p.directive.description, p.patternName); - const effort = p.effort ?? '-'; - return [name, summary || '-', effort]; - }); - sections.push(table(['Pattern', 'Description', 'Effort'], rows)); - } - sections.push(separator()); - return sections; -} -/** - * Build current phase context summary (links to detail file) - */ -function buildCurrentPhaseContextSummary(dataset, options) { - const sections = []; - // Find current phase (first incomplete) - const currentPhase = dataset.byPhase.find((p) => p.counts.total > 0 && p.counts.completed < p.counts.total); - if (!currentPhase) { - return []; - } - const { phaseNumber, phaseName, counts } = currentPhase; - const displayName = phaseName ?? `Phase ${phaseNumber}`; - const progress = completionPercentage(counts); - const progressBar = renderProgressBar(counts.completed, counts.total, 15); - const slug = getSessionPhaseSlug(phaseNumber, phaseName); - sections.push(heading(2, 'Current Phase Focus')); - sections.push(paragraph(`**${displayName}:** ${progressBar} ${progress}% complete`), paragraph(`${counts.active} active, ${counts.planned} planned, ${counts.completed} completed`)); - // Only show link if generating detail files - if (options.generateDetailFiles) { - sections.push(linkOut(`View ${displayName} details →`, `sessions/${slug}.md`)); - } - sections.push(separator()); - return sections; -} -/** - * Build recent completions section - */ -function buildSessionRecentCompletions(dataset, options) { - const sections = []; - const completed = dataset.byStatus.completed; - if (completed.length === 0) { - return []; - } - // Show most recent completions (use limits from options with safe default) - const recentLimit = options.limits.recentItems ?? 10; - const recent = completed.slice(-recentLimit).reverse(); - const completedContent = []; - const items = recent.map((p) => { - const name = getDisplayName(p); - const phase = p.phase !== undefined ? ` (Phase ${p.phase})` : ''; - return `✅ ${name}${phase}`; - }); - completedContent.push(list(items)); - if (completed.length > recentLimit) { - completedContent.push(paragraph(`...and ${completed.length - recentLimit} more.`)); - } - sections.push(collapsible(`Recent Completions (${completed.length} total)`, completedContent)); - return sections; -} -/** - * Build blocked items section - */ -function buildBlockedItems(dataset) { - const sections = []; - // Find patterns that are blocked (have unmet dependencies) - const blocked = []; - for (const pattern of dataset.patterns) { - if (!pattern.dependsOn || pattern.dependsOn.length === 0) - continue; - if (isPatternComplete(pattern.status)) - continue; - // Check if any dependency is not completed - const hasUnmetDep = pattern.dependsOn.some((depName) => { - const dep = dataset.patterns.find((p) => p.patternName === depName || p.name === depName); - return dep !== undefined && !isPatternComplete(dep.status); - }); - if (hasUnmetDep) { - blocked.push(pattern); - } - } - if (blocked.length === 0) { - return []; - } - sections.push(heading(2, '⚠️ Blocked Items')); - sections.push(paragraph(`${blocked.length} patterns are blocked by incomplete dependencies:`)); - const rows = blocked.map((p) => { - const name = getDisplayName(p); - const deps = (p.dependsOn ?? []).join(', '); - return [name, deps]; - }); - sections.push(table(['Pattern', 'Blocked By'], rows)); - sections.push(separator()); - return sections; -} -// ═══════════════════════════════════════════════════════════════════════════ -// Session Context Progressive Disclosure -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Generate slug for session phase detail file - */ -function getSessionPhaseSlug(phaseNumber, phaseName) { - const paddedPhase = String(phaseNumber).padStart(2, '0'); - const namePart = phaseName ? toKebabCase(phaseName) : 'unnamed'; - return `phase-${paddedPhase}-${namePart}`; -} -/** - * Build session phase navigation table - */ -function buildSessionPhaseNavigation(dataset, options) { - const sections = []; - // Get incomplete phases (the ones relevant for session context) - const incompletePhases = dataset.byPhase.filter((p) => p.counts.total > 0 && p.counts.completed < p.counts.total); - if (incompletePhases.length === 0) { - return []; - } - sections.push(heading(2, 'Phase Navigation')); - const rows = incompletePhases - .sort((a, b) => a.phaseNumber - b.phaseNumber) - .map((phase) => { - const { phaseNumber, phaseName, counts } = phase; - const displayName = phaseName ?? `Phase ${phaseNumber}`; - const progress = completionPercentage(counts); - const remaining = counts.total - counts.completed; - const slug = getSessionPhaseSlug(phaseNumber, phaseName); - const statusEmoji = getPhaseStatusEmoji(false, counts.active > 0); - // Link to detail file only if generating detail files - const nameCell = options.generateDetailFiles - ? `${statusEmoji} [${displayName}](sessions/${slug}.md)` - : `${statusEmoji} ${displayName}`; - return [nameCell, `${remaining} remaining`, `${progress}%`]; - }); - sections.push(table(['Phase', 'Remaining', 'Complete'], rows), separator()); - return sections; -} -/** - * Build session phase detail files (progressive disclosure) - */ -function buildSessionPhaseFiles(dataset, options) { - const files = {}; - // Get incomplete phases - const incompletePhases = dataset.byPhase.filter((p) => p.counts.total > 0 && p.counts.completed < p.counts.total); - for (const phase of incompletePhases) { - const slug = getSessionPhaseSlug(phase.phaseNumber, phase.phaseName); - files[`sessions/${slug}.md`] = buildSessionPhaseDetailDocument(phase, dataset, options); - } - return files; -} -/** - * Build a single session phase detail document - */ -function buildSessionPhaseDetailDocument(phase, dataset, options) { - const sections = []; - const { phaseNumber, phaseName, patterns, counts } = phase; - const displayName = phaseName ?? `Phase ${phaseNumber}`; - // Summary - const progress = completionPercentage(counts); - const progressBar = renderProgressBar(counts.completed, counts.total, 20); - sections.push(heading(2, 'Summary'), paragraph(`**Progress:** ${progressBar} (${progress}%)`), table(['Status', 'Count'], [ - ['🚧 Active', String(counts.active)], - ['📋 Planned', String(counts.planned)], - ['✅ Completed', String(counts.completed)], - ['**Total**', String(counts.total)], - ]), separator()); - // Active patterns (priority) - const active = patterns.filter((p) => isPatternActive(p.status)); - if (active.length > 0) { - sections.push(heading(2, '🚧 Active Work')); - sections.push(...buildSessionPatternList(active, true)); - } - // Planned patterns - const planned = patterns.filter((p) => isPatternPlanned(p.status)); - if (planned.length > 0) { - sections.push(heading(2, '📋 Planned Work')); - // Separate blocked from ready (only if includeDependencies is enabled) - if (options.includeDependencies) { - const blocked = []; - const ready = []; - for (const pattern of planned) { - if (!pattern.dependsOn || pattern.dependsOn.length === 0) { - ready.push(pattern); - continue; - } - const hasUnmetDep = pattern.dependsOn.some((depName) => { - const dep = dataset.patterns.find((p) => p.patternName === depName || p.name === depName); - return dep !== undefined && !isPatternComplete(dep.status); - }); - if (hasUnmetDep) { - blocked.push(pattern); - } - else { - ready.push(pattern); - } - } - if (ready.length > 0) { - sections.push(heading(3, '✅ Ready to Start')); - sections.push(...buildSessionPatternList(ready, false)); - } - if (blocked.length > 0) { - sections.push(heading(3, '⚠️ Blocked')); - sections.push(...buildBlockedPatternList(blocked)); - } - } - else { - // Without dependency checking, show all planned items together - sections.push(...buildSessionPatternList(planned, false)); - } - } - // Completed patterns (collapsible) - const completed = patterns.filter((p) => isPatternComplete(p.status)); - if (completed.length > 0) { - const completedContent = []; - const items = completed.map((p) => `✅ ${getDisplayName(p)}`); - completedContent.push(list(items)); - sections.push(collapsible(`Completed in this phase (${completed.length})`, completedContent)); - } - // Back link - sections.push(linkOut('← Back to Session Context', '../SESSION-CONTEXT.md')); - return document(`${displayName} - Session Focus`, sections, { - purpose: `Detailed session context for ${displayName}`, - }); -} -/** - * Build session pattern list with details - */ -function buildSessionPatternList(patterns, showEffort) { - const sections = []; - for (const pattern of sortByPhaseAndName([...patterns])) { - const emoji = getStatusEmoji(pattern.status); - const name = getDisplayName(pattern); - sections.push(heading(3, `${emoji} ${name}`)); - // Metadata table - const metaRows = [['Status', normalizeStatus(pattern.status)]]; - if (showEffort && pattern.effort) { - metaRows.push(['Effort', pattern.effort]); - } - const businessValue = formatBusinessValue(pattern.businessValue); - if (businessValue) { - metaRows.push(['Business Value', businessValue]); - } - sections.push(table(['Property', 'Value'], metaRows)); - // Description - if (pattern.directive.description) { - sections.push(paragraph(pattern.directive.description)); - } - // Use cases - if (pattern.useCases && pattern.useCases.length > 0) { - sections.push(heading(4, 'Use Cases'), list([...pattern.useCases])); - } - // Acceptance Criteria (scenarios with steps, DataTables, DocStrings) - sections.push(...renderAcceptanceCriteria(pattern.scenarios)); - // Business Rules (from Gherkin Rule: keyword) - sections.push(...renderBusinessRulesSection(pattern.rules)); - } - sections.push(separator()); - return sections; -} -/** - * Build blocked pattern list with dependencies - */ -function buildBlockedPatternList(patterns) { - const rows = sortByPhaseAndName([...patterns]).map((p) => { - const name = getDisplayName(p); - const deps = (p.dependsOn ?? []).join(', '); - const effort = p.effort ?? '-'; - return [name, deps, effort]; - }); - return [table(['Pattern', 'Blocked By', 'Effort'], rows), separator()]; -} -// ═══════════════════════════════════════════════════════════════════════════ -// Remaining Work Document Builder -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Build remaining work document - */ -function buildRemainingWorkDocument(dataset, options) { - const sections = []; - // Get all incomplete patterns based on options - let incomplete = []; - if (options.includeIncomplete) { - incomplete = [...dataset.byStatus.active, ...dataset.byStatus.planned]; - } - else { - incomplete = [...dataset.byStatus.active]; // Only active - } - if (incomplete.length === 0) { - sections.push(heading(2, 'All Work Complete'), paragraph('All patterns have been completed. 🎉')); - return document('Remaining Work', sections, { - purpose: 'Track incomplete work', - }); - } - // 1. Summary (if enabled) - if (options.includeStats) { - sections.push(...buildRemainingWorkSummary(dataset, incomplete)); - } - // 2. Phase navigation table (links to detail files) - sections.push(...buildRemainingPhaseNavigation(dataset, options)); - // 3. By priority (blocked vs not blocked) - summary only (if blocked items enabled) - if (options.includeBlocked) { - sections.push(...buildRemainingByPrioritySummary(dataset, incomplete, options)); - } - // 4. Next actionable items (if enabled) - if (options.includeNextActionable) { - sections.push(...buildNextActionableItems(dataset, incomplete, options)); - } - // Build phase detail files (if enabled) - const additionalFiles = options.generateDetailFiles - ? buildRemainingPhaseFiles(dataset, options) - : {}; - const docOpts = { - purpose: 'Aggregate view of all incomplete work', - detailLevel: options.generateDetailFiles - ? 'Summary with links to phase details' - : 'Compact summary', - }; - if (Object.keys(additionalFiles).length > 0) { - docOpts.additionalFiles = additionalFiles; - } - return document('Remaining Work', sections, docOpts); -} -/** - * Build next actionable items section - */ -function buildNextActionableItems(dataset, incomplete, options) { - const sections = []; - // Find patterns that are not blocked - const actionable = incomplete.filter((pattern) => { - if (!isPatternPlanned(pattern.status)) { - return false; // Active items are already being worked on - } - if (!pattern.dependsOn || pattern.dependsOn.length === 0) { - return true; // No dependencies = actionable - } - // Check if all dependencies are completed - const allDepsComplete = pattern.dependsOn.every((depName) => { - const dep = dataset.patterns.find((p) => p.patternName === depName || p.name === depName); - return dep === undefined || isPatternComplete(dep.status); - }); - return allDepsComplete; - }); - if (actionable.length === 0) { - return []; - } - sections.push(heading(2, 'Next Actionable Items')); - sections.push(paragraph('Items ready to start (no blocking dependencies):')); - const limit = options.maxNextActionable; - const items = sortByPhaseAndName(actionable) - .slice(0, limit) - .map((p) => { - const name = getDisplayName(p); - const phase = p.phase !== undefined ? ` (Phase ${p.phase})` : ''; - const effort = p.effort ? ` - ${p.effort}` : ''; - return `📋 ${name}${phase}${effort}`; - }); - sections.push(list(items)); - if (actionable.length > limit) { - sections.push(paragraph(`Showing ${limit} of ${actionable.length} actionable items.`)); - } - sections.push(separator()); - return sections; -} -/** - * Build remaining work summary - */ -function buildRemainingWorkSummary(dataset, incomplete) { - const active = incomplete.filter((p) => isPatternActive(p.status)); - const planned = incomplete.filter((p) => isPatternPlanned(p.status)); - const progress = completionPercentage(dataset.counts); - const progressBar = renderProgressBar(dataset.counts.completed, dataset.counts.total, 20); - return [ - heading(2, 'Summary'), - paragraph(`**Overall Progress:** ${progressBar} (${progress}%)`), - table(['Status', 'Count'], [ - ['🚧 Active', String(active.length)], - ['📋 Planned', String(planned.length)], - ['**Total Remaining**', String(incomplete.length)], - ]), - separator(), - ]; -} -// ═══════════════════════════════════════════════════════════════════════════ -// Remaining Work Progressive Disclosure -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Generate slug for remaining work phase detail file - */ -function getRemainingPhaseSlug(phaseNumber, phaseName) { - const paddedPhase = String(phaseNumber).padStart(2, '0'); - const namePart = phaseName ? toKebabCase(phaseName) : 'unnamed'; - return `phase-${paddedPhase}-${namePart}`; -} -/** - * Build remaining work phase navigation table - */ -function buildRemainingPhaseNavigation(dataset, options) { - const sections = []; - // Get incomplete phases - const incompletePhases = dataset.byPhase.filter((p) => p.counts.total > 0 && p.counts.completed < p.counts.total); - if (incompletePhases.length === 0) { - return []; - } - sections.push(heading(2, 'By Phase')); - const rows = incompletePhases - .sort((a, b) => a.phaseNumber - b.phaseNumber) - .map((phase) => { - const { phaseNumber, phaseName, counts } = phase; - const displayName = phaseName ?? `Phase ${phaseNumber}`; - const remaining = counts.total - counts.completed; - const progress = completionPercentage(counts); - const slug = getRemainingPhaseSlug(phaseNumber, phaseName); - const statusEmoji = getPhaseStatusEmoji(false, counts.active > 0); - // Link to detail file only if generating detail files - const nameCell = options.generateDetailFiles - ? `${statusEmoji} [${displayName}](remaining/${slug}.md)` - : `${statusEmoji} ${displayName}`; - return [nameCell, String(remaining), String(counts.active), `${progress}%`]; - }); - // Add backlog row for patterns without a phase assignment - // Use pattern.id (always defined) instead of patternName (can be undefined) - // to avoid incorrect filtering when undefined values are added to the Set - const patternsWithPhase = new Set(dataset.byPhase.flatMap((p) => p.patterns.map((pat) => pat.id))); - const incomplete = [...dataset.byStatus.active, ...dataset.byStatus.planned]; - const backlogPatterns = incomplete.filter((p) => !patternsWithPhase.has(p.id)); - if (backlogPatterns.length > 0) { - const backlogActive = backlogPatterns.filter((p) => isPatternActive(p.status)).length; - const statusEmoji = getPhaseStatusEmoji(false, backlogActive > 0); - rows.push([ - `${statusEmoji} Backlog (No Phase)`, - String(backlogPatterns.length), - String(backlogActive), - '0%', - ]); - } - sections.push(table(['Phase', 'Remaining', 'Active', 'Complete'], rows), separator()); - return sections; -} -/** - * Build remaining work by priority (summary only for index) - */ -function buildRemainingByPrioritySummary(dataset, incomplete, options) { - const sections = []; - // Categorize by priority - const unblocked = []; - const blocked = []; - for (const pattern of incomplete) { - if (!pattern.dependsOn || pattern.dependsOn.length === 0) { - unblocked.push(pattern); - continue; - } - const hasUnmetDep = pattern.dependsOn.some((depName) => { - const dep = dataset.patterns.find((p) => p.patternName === depName || p.name === depName); - return dep !== undefined && !isPatternComplete(dep.status); - }); - if (hasUnmetDep) { - blocked.push(pattern); - } - else { - unblocked.push(pattern); - } - } - sections.push(heading(2, 'By Priority')); - // Summary table - const readyCount = unblocked.filter((p) => isPatternPlanned(p.status)).length; - const activeCount = incomplete.filter((p) => isPatternActive(p.status)).length; - sections.push(table(['Priority', 'Count'], [ - ['🚧 In Progress', String(activeCount)], - ['✅ Ready to Start', String(readyCount)], - ['⚠️ Blocked', String(blocked.length)], - ])); - // Show top ready to start (use limits from options with safe default) - const limit = options.limits.recentItems ?? 10; - const readyToStart = unblocked.filter((p) => isPatternPlanned(p.status)); - if (readyToStart.length > 0) { - sections.push(heading(3, 'Top Ready to Start')); - const items = sortByPhaseAndName(readyToStart) - .slice(0, limit) - .map((p) => { - const name = getDisplayName(p); - const phase = p.phase !== undefined ? ` (Phase ${p.phase})` : ''; - return `${name}${phase}`; - }); - sections.push(list(items)); - if (readyToStart.length > limit) { - sections.push(paragraph(`See phase detail files for full list.`)); - } - } - sections.push(separator()); - return sections; -} -/** - * Build remaining work phase detail files (progressive disclosure) - */ -function buildRemainingPhaseFiles(dataset, options) { - const files = {}; - // Get incomplete phases - const incompletePhases = dataset.byPhase.filter((p) => p.counts.total > 0 && p.counts.completed < p.counts.total); - for (const phase of incompletePhases) { - const slug = getRemainingPhaseSlug(phase.phaseNumber, phase.phaseName); - files[`remaining/${slug}.md`] = buildRemainingPhaseDetailDocument(phase, dataset, options); - } - return files; -} -/** - * Build a single remaining work phase detail document - */ -function buildRemainingPhaseDetailDocument(phase, dataset, _options) { - const sections = []; - const { phaseNumber, phaseName, patterns, counts } = phase; - const displayName = phaseName ?? `Phase ${phaseNumber}`; - // Summary - const progress = completionPercentage(counts); - const progressBar = renderProgressBar(counts.completed, counts.total, 20); - const remaining = counts.total - counts.completed; - sections.push(heading(2, 'Summary'), paragraph(`**Progress:** ${progressBar} (${progress}%)`), paragraph(`**Remaining:** ${remaining} patterns (${counts.active} active, ${counts.planned} planned)`), separator()); - // Get incomplete patterns - const incompletePatterns = patterns.filter((p) => !isPatternComplete(p.status)); - // Categorize by priority - const active = []; - const ready = []; - const blocked = []; - for (const pattern of incompletePatterns) { - if (isPatternActive(pattern.status)) { - active.push(pattern); - continue; - } - if (!pattern.dependsOn || pattern.dependsOn.length === 0) { - ready.push(pattern); - continue; - } - const hasUnmetDep = pattern.dependsOn.some((depName) => { - const dep = dataset.patterns.find((p) => p.patternName === depName || p.name === depName); - return dep !== undefined && !isPatternComplete(dep.status); - }); - if (hasUnmetDep) { - blocked.push(pattern); - } - else { - ready.push(pattern); - } - } - // Active patterns - if (active.length > 0) { - sections.push(heading(2, '🚧 In Progress')); - sections.push(...buildRemainingPatternTable(active)); - } - // Ready to start - if (ready.length > 0) { - sections.push(heading(2, '✅ Ready to Start')); - sections.push(paragraph('These patterns can be started immediately:')); - sections.push(...buildRemainingPatternTable(ready)); - } - // Blocked - if (blocked.length > 0) { - sections.push(heading(2, '⚠️ Blocked')); - sections.push(paragraph('These patterns are waiting on dependencies:')); - const rows = sortByPhaseAndName([...blocked]).map((p) => { - const name = getDisplayName(p); - const deps = (p.dependsOn ?? []).join(', '); - const effort = p.effort ?? '-'; - return [name, deps, effort]; - }); - sections.push(table(['Pattern', 'Blocked By', 'Effort'], rows)); - sections.push(separator()); - } - // All remaining patterns (detailed) - sections.push(heading(2, 'All Remaining Patterns')); - for (const pattern of sortByPhaseAndName([...incompletePatterns])) { - const emoji = getStatusEmoji(pattern.status); - const name = getDisplayName(pattern); - sections.push(heading(3, `${emoji} ${name}`)); - // Metadata table - const metaRows = [['Status', normalizeStatus(pattern.status)]]; - if (pattern.effort) { - metaRows.push(['Effort', pattern.effort]); - } - const businessValue = formatBusinessValue(pattern.businessValue); - if (businessValue) { - metaRows.push(['Business Value', businessValue]); - } - if (pattern.dependsOn && pattern.dependsOn.length > 0) { - metaRows.push(['Dependencies', pattern.dependsOn.join(', ')]); - } - sections.push(table(['Property', 'Value'], metaRows)); - // Description - if (pattern.directive.description) { - sections.push(paragraph(pattern.directive.description)); - } - // Use cases - if (pattern.useCases && pattern.useCases.length > 0) { - sections.push(heading(4, 'Use Cases'), list([...pattern.useCases])); - } - // Acceptance Criteria (scenarios with steps, DataTables, DocStrings) - sections.push(...renderAcceptanceCriteria(pattern.scenarios)); - // Business Rules (from Gherkin Rule: keyword) - sections.push(...renderBusinessRulesSection(pattern.rules)); - } - sections.push(separator()); - // Back link - sections.push(linkOut('← Back to Remaining Work', '../REMAINING-WORK.md')); - return document(`${displayName} - Remaining Work`, sections, { - purpose: `Detailed remaining work for ${displayName}`, - }); -} -/** - * Build remaining pattern table - */ -function buildRemainingPatternTable(patterns) { - const rows = sortByPhaseAndName([...patterns]).map((p) => { - const emoji = getStatusEmoji(p.status); - const name = getDisplayName(p); - const effort = p.effort ?? '-'; - const businessValue = formatBusinessValue(p.businessValue) || '-'; - return [`${emoji} ${name}`, effort, businessValue]; - }); - return [table(['Pattern', 'Effort', 'Business Value'], rows), separator()]; -} -//# sourceMappingURL=session.js.map \ No newline at end of file diff --git a/dist/renderable/codecs/session.js.map b/dist/renderable/codecs/session.js.map deleted file mode 100644 index 730fe328..00000000 --- a/dist/renderable/codecs/session.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"session.js","sourceRoot":"","sources":["../../../src/renderable/codecs/session.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,mBAAmB,GAGpB,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAGL,OAAO,EACP,SAAS,EACT,SAAS,EACT,KAAK,EACL,IAAI,EACJ,WAAW,EACX,OAAO,EACP,QAAQ,GACT,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,eAAe,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,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,0BAA0B,EAAE,sBAAsB,CAAC,CAAC,CAAC;IAE3E,OAAO,QAAQ,CAAC,GAAG,WAAW,mBAAmB,EAAE,QAAQ,EAAE;QAC3D,OAAO,EAAE,+BAA+B,WAAW,EAAE;KACtD,CAAC,CAAC;AACL,CAAC;AAED;;GAEG;AACH,SAAS,0BAA0B,CAAC,QAA4B;IAC9D,MAAM,IAAI,GAAG,kBAAkB,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;QACvD,MAAM,KAAK,GAAG,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;QACvC,MAAM,IAAI,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC;QAC/B,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,IAAI,GAAG,CAAC;QAC/B,MAAM,aAAa,GAAG,mBAAmB,CAAC,CAAC,CAAC,aAAa,CAAC,IAAI,GAAG,CAAC;QAClE,OAAO,CAAC,GAAG,KAAK,IAAI,IAAI,EAAE,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC;IACrD,CAAC,CAAC,CAAC;IAEH,OAAO,CAAC,KAAK,CAAC,CAAC,SAAS,EAAE,QAAQ,EAAE,gBAAgB,CAAC,EAAE,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;AAC7E,CAAC"} \ No newline at end of file diff --git a/dist/renderable/codecs/shape-matcher.d.ts b/dist/renderable/codecs/shape-matcher.d.ts deleted file mode 100644 index 883e4b8e..00000000 --- a/dist/renderable/codecs/shape-matcher.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Shape Source Matcher - * - * Resolves `shapeSources` glob patterns against pattern `source.file` paths - * in MasterDataset. Uses in-memory string matching (no filesystem access). - * - * @see CodecDrivenReferenceGeneration AD-6: In-memory glob matching - */ -import type { MasterDataset } from '../../validation-schemas/master-dataset.js'; -import type { ExtractedShape } from '../../validation-schemas/extracted-shape.js'; -/** - * Fine-grained selector for extracted shapes. - * - * Three structural variants (DD-6, no `kind` field): - * - `{ group }` — select all shapes with matching group tag - * - `{ source, names }` — specific shapes from a source file - * - `{ source }` — all tagged shapes from a source file - */ -export type ShapeSelector = { - readonly group: string; -} | { - readonly source: string; - readonly names: readonly string[]; -} | { - readonly source: string; -}; -/** - * Match a file path against a simple glob pattern. - * - * Supports three pattern styles: - * - Exact match: `src/generators/types.ts` - * - Single-level glob: `src/lint/*.ts` (no slashes in wildcard segment) - * - Recursive glob: `src/generators/pipeline/**\/*.ts` or `src/**\/*.ts` - * - * @param filePath - Relative file path from pattern.source.file - * @param pattern - Glob-like pattern from ReferenceDocConfig.shapeSources - */ -export declare function matchesShapePattern(filePath: string, pattern: string): boolean; -/** - * Extract shapes from MasterDataset patterns whose `source.file` - * matches any of the given glob patterns. - * - * Returns a deduplicated list of ExtractedShape objects in dataset - * iteration order. Shapes are deduplicated by name (first occurrence wins). - * - * @param dataset - MasterDataset with all extracted patterns - * @param shapeSources - Glob patterns to match against source.file - * @returns Aggregated ExtractedShape array from matching patterns - */ -export declare function extractShapesFromDataset(dataset: MasterDataset, shapeSources: readonly string[]): readonly ExtractedShape[]; -/** - * Filter shapes from MasterDataset using fine-grained ShapeSelectors. - * - * Three selector modes (DD-6): - * - `{ group }` — all shapes where `shape.group` matches - * - `{ source, names }` — shapes from matching source file with listed names - * - `{ source }` — all shapes from matching source file - * - * Returns a deduplicated list in selector iteration order. - * - * @param dataset - MasterDataset with all extracted patterns - * @param selectors - Fine-grained shape selectors - * @returns Aggregated ExtractedShape array from matching selectors - */ -export declare function filterShapesBySelectors(dataset: MasterDataset, selectors: readonly ShapeSelector[]): readonly ExtractedShape[]; -//# sourceMappingURL=shape-matcher.d.ts.map \ No newline at end of file diff --git a/dist/renderable/codecs/shape-matcher.d.ts.map b/dist/renderable/codecs/shape-matcher.d.ts.map deleted file mode 100644 index 2e2ca90d..00000000 --- a/dist/renderable/codecs/shape-matcher.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"shape-matcher.d.ts","sourceRoot":"","sources":["../../../src/renderable/codecs/shape-matcher.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAChF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAC;AAMlF;;;;;;;GAOG;AACH,MAAM,MAAM,aAAa,GACrB;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAC1B;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,GAC9D;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAahC;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAsB9E;AAMD;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,aAAa,EACtB,YAAY,EAAE,SAAS,MAAM,EAAE,GAC9B,SAAS,cAAc,EAAE,CAwB3B;AAMD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,aAAa,EACtB,SAAS,EAAE,SAAS,aAAa,EAAE,GAClC,SAAS,cAAc,EAAE,CAuC3B"} \ No newline at end of file diff --git a/dist/renderable/codecs/shape-matcher.js b/dist/renderable/codecs/shape-matcher.js deleted file mode 100644 index d9d6c664..00000000 --- a/dist/renderable/codecs/shape-matcher.js +++ /dev/null @@ -1,143 +0,0 @@ -/** - * Shape Source Matcher - * - * Resolves `shapeSources` glob patterns against pattern `source.file` paths - * in MasterDataset. Uses in-memory string matching (no filesystem access). - * - * @see CodecDrivenReferenceGeneration AD-6: In-memory glob matching - */ -/** Type guard: selector has source + names fields */ -function hasNames(selector) { - return 'names' in selector; -} -// ============================================================================ -// Glob Pattern Matching -// ============================================================================ -/** - * Match a file path against a simple glob pattern. - * - * Supports three pattern styles: - * - Exact match: `src/generators/types.ts` - * - Single-level glob: `src/lint/*.ts` (no slashes in wildcard segment) - * - Recursive glob: `src/generators/pipeline/**\/*.ts` or `src/**\/*.ts` - * - * @param filePath - Relative file path from pattern.source.file - * @param pattern - Glob-like pattern from ReferenceDocConfig.shapeSources - */ -export function matchesShapePattern(filePath, pattern) { - const starIndex = pattern.indexOf('*'); - // No wildcard: exact match - if (starIndex === -1) { - return filePath === pattern; - } - const prefix = pattern.substring(0, starIndex); - const suffix = pattern.substring(pattern.lastIndexOf('*') + 1); - if (!filePath.startsWith(prefix)) - return false; - if (suffix && !filePath.endsWith(suffix)) - return false; - // Recursive glob (**): any depth between prefix and suffix - if (pattern.includes('**')) { - return true; - } - // Single-level glob (*): no slashes between prefix and suffix - const middle = filePath.substring(prefix.length, filePath.length - suffix.length); - return !middle.includes('/'); -} -// ============================================================================ -// Shape Extraction from Dataset -// ============================================================================ -/** - * Extract shapes from MasterDataset patterns whose `source.file` - * matches any of the given glob patterns. - * - * Returns a deduplicated list of ExtractedShape objects in dataset - * iteration order. Shapes are deduplicated by name (first occurrence wins). - * - * @param dataset - MasterDataset with all extracted patterns - * @param shapeSources - Glob patterns to match against source.file - * @returns Aggregated ExtractedShape array from matching patterns - */ -export function extractShapesFromDataset(dataset, shapeSources) { - if (shapeSources.length === 0) - return []; - const seenNames = new Set(); - const shapes = []; - for (const pattern of dataset.patterns) { - // Skip patterns without extracted shapes - if (!pattern.extractedShapes || pattern.extractedShapes.length === 0) - continue; - // Check if this pattern's source file matches any shape source glob - const matches = shapeSources.some((glob) => matchesShapePattern(pattern.source.file, glob)); - if (!matches) - continue; - // Collect shapes, deduplicating by name - for (const shape of pattern.extractedShapes) { - if (!seenNames.has(shape.name)) { - seenNames.add(shape.name); - shapes.push(shape); - } - } - } - return shapes; -} -// ============================================================================ -// Selector-Based Shape Filtering -// ============================================================================ -/** - * Filter shapes from MasterDataset using fine-grained ShapeSelectors. - * - * Three selector modes (DD-6): - * - `{ group }` — all shapes where `shape.group` matches - * - `{ source, names }` — shapes from matching source file with listed names - * - `{ source }` — all shapes from matching source file - * - * Returns a deduplicated list in selector iteration order. - * - * @param dataset - MasterDataset with all extracted patterns - * @param selectors - Fine-grained shape selectors - * @returns Aggregated ExtractedShape array from matching selectors - */ -export function filterShapesBySelectors(dataset, selectors) { - if (selectors.length === 0) - return []; - const seenNames = new Set(); - const shapes = []; - for (const selector of selectors) { - if ('group' in selector && !('source' in selector)) { - // Group selector: iterate all patterns' shapes, match by group - for (const pattern of dataset.patterns) { - if (pattern.extractedShapes === undefined || pattern.extractedShapes.length === 0) - continue; - for (const shape of pattern.extractedShapes) { - if (shape.group === selector.group && !seenNames.has(shape.name)) { - seenNames.add(shape.name); - shapes.push(shape); - } - } - } - } - else if ('source' in selector) { - // Source-based selector: match by file path glob - const sourceGlob = String(selector.source); - const nameSet = hasNames(selector) ? new Set(selector.names) : undefined; - for (const pattern of dataset.patterns) { - if (pattern.extractedShapes === undefined || pattern.extractedShapes.length === 0) - continue; - if (!matchesShapePattern(pattern.source.file, sourceGlob)) - continue; - for (const shape of pattern.extractedShapes) { - if (seenNames.has(shape.name)) - continue; - // If names specified, filter by name; otherwise include all - if (nameSet !== undefined && !nameSet.has(shape.name)) - continue; - seenNames.add(shape.name); - shapes.push(shape); - } - } - } - } - return shapes; -} -//# sourceMappingURL=shape-matcher.js.map \ No newline at end of file diff --git a/dist/renderable/codecs/shape-matcher.js.map b/dist/renderable/codecs/shape-matcher.js.map deleted file mode 100644 index 19033448..00000000 --- a/dist/renderable/codecs/shape-matcher.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"shape-matcher.js","sourceRoot":"","sources":["../../../src/renderable/codecs/shape-matcher.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAsBH,qDAAqD;AACrD,SAAS,QAAQ,C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AO,KAAK,SAAS,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC;wBAAE,SAAS;oBAChE,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;oBAC1B,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACrB,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"} \ No newline at end of file diff --git a/dist/renderable/codecs/shared-schema.d.ts b/dist/renderable/codecs/shared-schema.d.ts deleted file mode 100644 index 8f3851dd..00000000 --- a/dist/renderable/codecs/shared-schema.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern SharedCodecSchema - * @libar-docs-status completed - * - * ## Shared Codec Output Schema - * - * Provides a simplified RenderableDocument output schema for use with - * Zod 4 codecs. The simplification (using z.any() for recursive fields) - * avoids complex recursive type issues at the codec boundary while - * maintaining type safety in the rest of the system. - * - * ### When to Use - * - * - When validating codec output in tests - * - When building custom codecs that need output validation - * - When working around Zod recursive schema type inference issues - * - * ### Why z.any() for sections? - * - * Zod's recursive schemas with z.lazy() cause type inference issues - * when used with z.codec(). The full RenderableDocumentSchema from - * schema.ts works fine for validation, but causes the codec's decode() - * return type to become `any`. Using a simplified schema here keeps - * codec return types clean while still validating the structure. - */ -import { z } from 'zod'; -/** - * Simplified output schema for codec decode results. - * - * This schema is intentionally loose for the sections and additionalFiles - * fields to avoid Zod recursive schema type inference issues. The actual - * content is still type-safe via the RenderableDocument interface. - */ -export declare const RenderableDocumentOutputSchema: z.ZodObject<{ - title: z.ZodString; - purpose: z.ZodOptional; - detailLevel: z.ZodOptional; - sections: z.ZodArray; - additionalFiles: z.ZodOptional>; -}, z.core.$strip>; -export type RenderableDocumentOutput = z.infer; -//# sourceMappingURL=shared-schema.d.ts.map \ No newline at end of file diff --git a/dist/renderable/codecs/shared-schema.d.ts.map b/dist/renderable/codecs/shared-schema.d.ts.map deleted file mode 100644 index ce2e2d04..00000000 --- a/dist/renderable/codecs/shared-schema.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"shared-schema.d.ts","sourceRoot":"","sources":["../../../src/renderable/codecs/shared-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;GAMG;AACH,eAAO,MAAM,8BAA8B;;;;;;iBAMzC,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/renderable/codecs/shared-schema.js b/dist/renderable/codecs/shared-schema.js deleted file mode 100644 index 1ca4fbf2..00000000 --- a/dist/renderable/codecs/shared-schema.js +++ /dev/null @@ -1,43 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern SharedCodecSchema - * @libar-docs-status completed - * - * ## Shared Codec Output Schema - * - * Provides a simplified RenderableDocument output schema for use with - * Zod 4 codecs. The simplification (using z.any() for recursive fields) - * avoids complex recursive type issues at the codec boundary while - * maintaining type safety in the rest of the system. - * - * ### When to Use - * - * - When validating codec output in tests - * - When building custom codecs that need output validation - * - When working around Zod recursive schema type inference issues - * - * ### Why z.any() for sections? - * - * Zod's recursive schemas with z.lazy() cause type inference issues - * when used with z.codec(). The full RenderableDocumentSchema from - * schema.ts works fine for validation, but causes the codec's decode() - * return type to become `any`. Using a simplified schema here keeps - * codec return types clean while still validating the structure. - */ -import { z } from 'zod'; -/** - * Simplified output schema for codec decode results. - * - * This schema is intentionally loose for the sections and additionalFiles - * fields to avoid Zod recursive schema type inference issues. The actual - * content is still type-safe via the RenderableDocument interface. - */ -export const RenderableDocumentOutputSchema = z.object({ - title: z.string(), - purpose: z.string().optional(), - detailLevel: z.string().optional(), - sections: z.array(z.any()), - additionalFiles: z.record(z.string(), z.any()).optional(), -}); -//# sourceMappingURL=shared-schema.js.map \ No newline at end of file diff --git a/dist/renderable/codecs/shared-schema.js.map b/dist/renderable/codecs/shared-schema.js.map deleted file mode 100644 index 38ba5670..00000000 --- a/dist/renderable/codecs/shared-schema.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"shared-schema.js","sourceRoot":"","sources":["../../../src/renderable/codecs/shared-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,MAAM,CAAC;IACrD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;IAC1B,eAAe,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC1D,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/renderable/codecs/taxonomy.d.ts b/dist/renderable/codecs/taxonomy.d.ts deleted file mode 100644 index b6f22198..00000000 --- a/dist/renderable/codecs/taxonomy.d.ts +++ /dev/null @@ -1,4038 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern TaxonomyCodec - * @libar-docs-status completed - * - * ## Taxonomy Document Codec - * - * Transforms MasterDataset into a RenderableDocument for taxonomy reference output. - * Generates TAXONOMY.md and detail files (taxonomy/*.md). - * - * ### When to Use - * - * - When generating the taxonomy reference documentation (TAXONOMY.md) - * - When creating tag reference files for progressive disclosure - * - When building taxonomy overview reports - * - * ### Factory Pattern - * - * Use `createTaxonomyCodec(options)` to create a configured codec: - * ```typescript - * const codec = createTaxonomyCodec({ generateDetailFiles: false }); - * const doc = codec.decode(dataset); - * ``` - * - * Or use the default export for standard behavior: - * ```typescript - * const doc = TaxonomyDocumentCodec.decode(dataset); - * ``` - */ -import { z } from 'zod'; -import { MasterDatasetSchema } from '../../validation-schemas/master-dataset.js'; -import { type BaseCodecOptions } from './types/base.js'; -import { RenderableDocumentOutputSchema } from './shared-schema.js'; -/** - * Options for TaxonomyDocumentCodec - */ -export interface TaxonomyCodecOptions extends BaseCodecOptions { - /** Include preset comparison table (default: true) */ - includePresets?: boolean; - /** Include format type reference (default: true) */ - includeFormatTypes?: boolean; - /** Include architecture diagram (default: true) */ - includeArchDiagram?: boolean; - /** Group metadata tags by domain (default: true) */ - groupByDomain?: boolean; -} -/** - * Default options for TaxonomyDocumentCodec - */ -export declare const DEFAULT_TAXONOMY_OPTIONS: Required; -/** - * Create a TaxonomyDocumentCodec with custom options. - * - * @param options - Codec configuration options - * @returns Configured Zod codec - * - * @example - * ```typescript - * // Disable detail files for summary output - * const codec = createTaxonomyCodec({ generateDetailFiles: false }); - * - * // Disable presets section - * const codec = createTaxonomyCodec({ includePresets: false }); - * ``` - */ -export declare function createTaxonomyCodec(options?: TaxonomyCodecOptions): z.ZodCodec; -/** - * Default Taxonomy Document Codec - * - * Transforms MasterDataset → RenderableDocument for taxonomy reference. - * Uses default options with all features enabled. - * - * @example - * ```typescript - * const doc = TaxonomyDocumentCodec.decode(masterDataset); - * const markdown = renderToMarkdown(doc); - * ``` - */ -export declare const TaxonomyDocumentCodec: z.ZodCodec>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - tagRegistry: z.ZodObject<{ - $schema: z.ZodOptional; - version: z.ZodDefault; - categories: z.ZodArray>>; - }, z.core.$strict>>; - metadataTags: z.ZodArray; - purpose: z.ZodString; - required: z.ZodDefault>; - repeatable: z.ZodDefault>; - values: z.ZodOptional>; - default: z.ZodOptional; - example: z.ZodOptional; - metadataKey: z.ZodOptional; - transform: z.ZodOptional>; - }, z.core.$strict>>; - aggregationTags: z.ZodArray; - purpose: z.ZodString; - }, z.core.$strict>>; - formatOptions: z.ZodDefault>; - tagPrefix: z.ZodDefault; - fileOptInTag: z.ZodDefault; - }, z.core.$strict>; - byStatus: z.ZodObject<{ - completed: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - active: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - planned: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>; - byPhase: z.ZodArray; - patterns: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - counts: z.ZodObject<{ - completed: z.ZodNumber; - active: z.ZodNumber; - planned: z.ZodNumber; - total: z.ZodNumber; - }, z.core.$strip>; - }, z.core.$strip>>; - byQuarter: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byCategory: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - bySource: z.ZodObject<{ - typescript: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - gherkin: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - roadmap: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - prd: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>; - counts: z.ZodObject<{ - completed: z.ZodNumber; - active: z.ZodNumber; - planned: z.ZodNumber; - total: z.ZodNumber; - }, z.core.$strip>; - phaseCount: z.ZodNumber; - categoryCount: z.ZodNumber; - relationshipIndex: z.ZodOptional; - usedBy: z.ZodArray; - dependsOn: z.ZodArray; - enables: z.ZodArray; - implementsPatterns: z.ZodArray; - implementedBy: z.ZodArray; - }, z.core.$strip>>; - extendsPattern: z.ZodOptional; - extendedBy: z.ZodArray; - seeAlso: z.ZodArray; - apiRef: z.ZodArray; - }, z.core.$strip>>>; - archIndex: z.ZodOptional>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byContext: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byLayer: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byView: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - all: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>>; -}, z.core.$strip>, z.ZodObject<{ - title: z.ZodString; - purpose: z.ZodOptional; - detailLevel: z.ZodOptional; - sections: z.ZodArray; - additionalFiles: z.ZodOptional>; -}, z.core.$strip>>; -//# sourceMappingURL=taxonomy.d.ts.map \ No newline at end of file diff --git a/dist/renderable/codecs/taxonomy.d.ts.map b/dist/renderable/codecs/taxonomy.d.ts.map deleted file mode 100644 index 8beeaa94..00000000 --- a/dist/renderable/codecs/taxonomy.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"taxonomy.d.ts","sourceRoot":"","sources":["../../../src/renderable/codecs/taxonomy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,mBAAmB,EAEpB,MAAM,4CAA4C,CAAC;AAapD,OAAO,EAAE,KAAK,gBAAgB,EAAsC,MAAM,iBAAiB,CAAC;AAC5F,OAAO,EAAE,8BAA8B,EAAE,MAAM,oBAAoB,CAAC;AASpE;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,gBAAgB;IAC5D,sD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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAwB,CAAC"} \ No newline at end of file diff --git a/dist/renderable/codecs/taxonomy.js b/dist/renderable/codecs/taxonomy.js deleted file mode 100644 index 4a893034..00000000 --- a/dist/renderable/codecs/taxonomy.js +++ /dev/null @@ -1,560 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern TaxonomyCodec - * @libar-docs-status completed - * - * ## Taxonomy Document Codec - * - * Transforms MasterDataset into a RenderableDocument for taxonomy reference output. - * Generates TAXONOMY.md and detail files (taxonomy/*.md). - * - * ### When to Use - * - * - When generating the taxonomy reference documentation (TAXONOMY.md) - * - When creating tag reference files for progressive disclosure - * - When building taxonomy overview reports - * - * ### Factory Pattern - * - * Use `createTaxonomyCodec(options)` to create a configured codec: - * ```typescript - * const codec = createTaxonomyCodec({ generateDetailFiles: false }); - * const doc = codec.decode(dataset); - * ``` - * - * Or use the default export for standard behavior: - * ```typescript - * const doc = TaxonomyDocumentCodec.decode(dataset); - * ``` - */ -import { z } from 'zod'; -import { MasterDatasetSchema, } from '../../validation-schemas/master-dataset.js'; -import { heading, paragraph, separator, table, code, mermaid, linkOut, document, } from '../schema.js'; -import { DEFAULT_BASE_OPTIONS, mergeOptions } from './types/base.js'; -import { RenderableDocumentOutputSchema } from './shared-schema.js'; -import { PRESETS } from '../../config/presets.js'; -import { FORMAT_TYPES } from '../../taxonomy/format-types.js'; -/** - * Default options for TaxonomyDocumentCodec - */ -export const DEFAULT_TAXONOMY_OPTIONS = { - ...DEFAULT_BASE_OPTIONS, - includePresets: true, - includeFormatTypes: true, - includeArchDiagram: true, - groupByDomain: true, -}; -// ═══════════════════════════════════════════════════════════════════════════ -// Taxonomy Document Codec -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Create a TaxonomyDocumentCodec with custom options. - * - * @param options - Codec configuration options - * @returns Configured Zod codec - * - * @example - * ```typescript - * // Disable detail files for summary output - * const codec = createTaxonomyCodec({ generateDetailFiles: false }); - * - * // Disable presets section - * const codec = createTaxonomyCodec({ includePresets: false }); - * ``` - */ -export function createTaxonomyCodec(options) { - const opts = mergeOptions(DEFAULT_TAXONOMY_OPTIONS, options); - return z.codec(MasterDatasetSchema, RenderableDocumentOutputSchema, { - decode: (dataset) => { - return buildTaxonomyDocument(dataset, opts); - }, - /** @throws Always - this codec is decode-only. See zod-codecs.md */ - encode: () => { - throw new Error('TaxonomyDocumentCodec is decode-only. See zod-codecs.md'); - }, - }); -} -/** - * Default Taxonomy Document Codec - * - * Transforms MasterDataset → RenderableDocument for taxonomy reference. - * Uses default options with all features enabled. - * - * @example - * ```typescript - * const doc = TaxonomyDocumentCodec.decode(masterDataset); - * const markdown = renderToMarkdown(doc); - * ``` - */ -export const TaxonomyDocumentCodec = createTaxonomyCodec(); -// ═══════════════════════════════════════════════════════════════════════════ -// Document Builder -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Build the taxonomy document from dataset - */ -function buildTaxonomyDocument(dataset, options) { - const sections = []; - const tagRegistry = dataset.tagRegistry; - // 1. Overview section (always included) - sections.push(...buildOverviewSection(tagRegistry)); - // 2. Categories section - sections.push(...buildCategoriesSection(tagRegistry, options)); - // 3. Metadata Tags section - sections.push(...buildMetadataTagsSection(tagRegistry, options)); - // 4. Aggregation Tags section - sections.push(...buildAggregationTagsSection(tagRegistry)); - // 5. Format Types section (if enabled) - if (options.includeFormatTypes) { - sections.push(...buildFormatTypesSection(options)); - } - // 6. Presets section (if enabled) - if (options.includePresets) { - sections.push(...buildPresetsSection()); - } - // 7. Architecture section (if enabled) - if (options.includeArchDiagram) { - sections.push(...buildArchitectureSection()); - } - // Build additional files for progressive disclosure (if enabled) - const additionalFiles = options.generateDetailFiles - ? buildTaxonomyDetailFiles(tagRegistry, options) - : {}; - const docOpts = { - purpose: 'Tag taxonomy configuration for code-first documentation', - detailLevel: options.generateDetailFiles ? 'Overview with links to details' : 'Compact summary', - }; - if (Object.keys(additionalFiles).length > 0) { - docOpts.additionalFiles = additionalFiles; - } - return document('Taxonomy Reference', sections, docOpts); -} -// ═══════════════════════════════════════════════════════════════════════════ -// Section Builders -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Build overview section with statistics - */ -function buildOverviewSection(tagRegistry) { - const categoryCount = tagRegistry.categories.length; - const metadataTagCount = tagRegistry.metadataTags.length; - const aggregationTagCount = tagRegistry.aggregationTags.length; - return [ - heading(2, 'Overview'), - paragraph(`**${categoryCount} categories** | **${metadataTagCount} metadata tags** | **${aggregationTagCount} aggregation tags**`), - paragraph(`Current configuration uses \`${tagRegistry.tagPrefix}\` prefix with \`${tagRegistry.fileOptInTag}\` file opt-in.`), - table(['Component', 'Count', 'Description'], [ - ['Categories', String(categoryCount), 'Pattern classification by domain'], - ['Metadata Tags', String(metadataTagCount), 'Pattern enrichment and relationships'], - ['Aggregation Tags', String(aggregationTagCount), 'Document routing'], - ]), - separator(), - ]; -} -/** - * Build categories reference section - */ -function buildCategoriesSection(tagRegistry, options) { - // Sort categories by priority - const sortedCategories = [...tagRegistry.categories].sort((a, b) => a.priority - b.priority); - const rows = sortedCategories.map((cat) => [ - `\`${cat.tag}\``, - cat.domain, - String(cat.priority), - cat.description, - ]); - const sections = [ - heading(2, 'Categories'), - paragraph('Domain classifications for organizing patterns by priority.'), - table(['Tag', 'Domain', 'Priority', 'Description'], rows), - ]; - // Add link to detail file if generating detail files - if (options.generateDetailFiles) { - sections.push(linkOut('Full category reference', 'taxonomy/categories.md')); - } - sections.push(separator()); - return sections; -} -/** - * Build metadata tags reference section - */ -function buildMetadataTagsSection(tagRegistry, options) { - const sections = [ - heading(2, 'Metadata Tags'), - paragraph('Tags for enriching patterns with additional metadata.'), - ]; - if (options.groupByDomain) { - // Group tags by domain/purpose - const groups = groupMetadataTagsByDomain(tagRegistry.metadataTags); - for (const [groupName, tags] of Object.entries(groups)) { - sections.push(heading(3, groupName)); - sections.push(...buildMetadataTagTable(tags, tagRegistry.tagPrefix)); - } - } - else { - // Single table with all tags - sections.push(...buildMetadataTagTable([...tagRegistry.metadataTags], tagRegistry.tagPrefix)); - } - // Add link to detail file if generating detail files - if (options.generateDetailFiles) { - sections.push(linkOut('Full metadata tag reference', 'taxonomy/metadata-tags.md')); - } - sections.push(separator()); - return sections; -} -/** - * Build a table of metadata tags - */ -function buildMetadataTagTable(tags, tagPrefix) { - const rows = tags.map((tag) => { - const example = tag.example ?? `${tagPrefix}${tag.tag} ...`; - const required = tag.required ? 'Yes' : 'No'; - return [`\`${tag.tag}\``, tag.format, tag.purpose, required, `\`${example}\``]; - }); - return [table(['Tag', 'Format', 'Purpose', 'Required', 'Example'], rows)]; -} -/** - * Group metadata tags by domain/purpose. - * - * **Design Decision**: Tag domain categorization is intentionally hardcoded rather than - * derived from schema metadata. This provides: - * - * 1. **Stability**: Domain assignments don't change unexpectedly when new tags are added - * 2. **Documentation Focus**: Domains are presentation-oriented, not runtime concerns - * 3. **Explicit Curation**: Human judgment decides which domain best fits each tag - * - * When adding new tags to the taxonomy: - * - Core Tags: Essential identifiers (pattern, status, core, usecase) - * - Relationship Tags: Cross-reference links (uses, used-by, depends-on, etc.) - * - Timeline Tags: Planning/scheduling (phase, quarter, priority, etc.) - * - ADR Tags: Decision records (adr-* prefix) - * - Architecture Tags: System structure (arch-* prefix) - * - Other Tags: Anything that doesn't fit the above categories - */ -function groupMetadataTagsByDomain(tags) { - const coreTags = []; - const relationshipTags = []; - const timelineTags = []; - const adrTags = []; - const archTags = []; - const otherTags = []; - for (const tag of tags) { - if (['pattern', 'status', 'core', 'usecase'].includes(tag.tag)) { - coreTags.push(tag); - } - else if ([ - 'uses', - 'used-by', - 'depends-on', - 'enables', - 'implements', - 'extends', - 'see-also', - 'api-ref', - ].includes(tag.tag)) { - relationshipTags.push(tag); - } - else if ([ - 'phase', - 'release', - 'quarter', - 'completed', - 'effort', - 'effort-actual', - 'team', - 'workflow', - 'priority', - 'risk', - ].includes(tag.tag)) { - timelineTags.push(tag); - } - else if (tag.tag.startsWith('adr')) { - adrTags.push(tag); - } - else if (tag.tag.startsWith('arch')) { - archTags.push(tag); - } - else { - otherTags.push(tag); - } - } - // Build result object, excluding empty groups - const result = {}; - if (coreTags.length > 0) - result['Core Tags'] = coreTags; - if (relationshipTags.length > 0) - result['Relationship Tags'] = relationshipTags; - if (timelineTags.length > 0) - result['Timeline Tags'] = timelineTags; - if (adrTags.length > 0) - result['ADR Tags'] = adrTags; - if (archTags.length > 0) - result['Architecture Tags'] = archTags; - if (otherTags.length > 0) - result['Other Tags'] = otherTags; - return result; -} -/** - * Build aggregation tags reference section - */ -function buildAggregationTagsSection(tagRegistry) { - const rows = tagRegistry.aggregationTags.map((tag) => [ - `\`${tag.tag}\``, - tag.targetDoc ?? 'None', - tag.purpose, - ]); - return [ - heading(2, 'Aggregation Tags'), - paragraph('Tags that route patterns to specific aggregated documents.'), - table(['Tag', 'Target Document', 'Purpose'], rows), - separator(), - ]; -} -/** - * Build format types reference section - */ -function buildFormatTypesSection(options) { - const formatDescriptions = { - value: { description: 'Simple string value', example: '@libar-docs-pattern MyPattern' }, - enum: { - description: 'Constrained to predefined values', - example: '@libar-docs-status roadmap', - }, - 'quoted-value': { - description: 'String in quotes (preserves spaces)', - example: '@libar-docs-usecase "When X happens"', - }, - csv: { description: 'Comma-separated values', example: '@libar-docs-uses A, B, C' }, - number: { description: 'Numeric value', example: '@libar-docs-phase 14' }, - flag: { description: 'Boolean presence (no value)', example: '@libar-docs-core' }, - }; - const rows = FORMAT_TYPES.map((format) => { - const info = formatDescriptions[format]; - return [`\`${format}\``, info.description, `\`${info.example}\``]; - }); - const sections = [ - heading(2, 'Format Types'), - paragraph('How tag values are parsed and validated.'), - table(['Format', 'Description', 'Example'], rows), - ]; - if (options.generateDetailFiles) { - sections.push(linkOut('Format type details', 'taxonomy/format-types.md')); - } - sections.push(separator()); - return sections; -} -/** - * Build presets comparison section - */ -function buildPresetsSection() { - const presetNames = ['generic', 'libar-generic', 'ddd-es-cqrs']; - const rows = presetNames.map((name) => { - const preset = PRESETS[name]; - const categoryCount = preset.categories.length; - let useCase = ''; - switch (name) { - case 'generic': - useCase = 'Simple projects with @docs- prefix'; - break; - case 'libar-generic': - useCase = 'Default preset with @libar-docs- prefix'; - break; - case 'ddd-es-cqrs': - useCase = 'Full DDD/ES/CQRS taxonomy'; - break; - } - return [`\`${name}\``, `\`${preset.tagPrefix}\``, String(categoryCount), useCase]; - }); - return [ - heading(2, 'Presets'), - paragraph('Available configuration presets.'), - table(['Preset', 'Tag Prefix', 'Categories', 'Use Case'], rows), - separator(), - ]; -} -/** - * Build architecture section with directory tree and mermaid diagram - */ -function buildArchitectureSection() { - const directoryTree = `src/taxonomy/ -├── categories.ts # Category definitions (21 DDD-ES-CQRS) -├── format-types.ts # Format type constants -├── registry-builder.ts # Single source of truth builder -├── status-values.ts # Status FSM values -├── generator-options.ts # Generator option values -├── hierarchy-levels.ts # Hierarchy level values -├── risk-levels.ts # Risk level values -└── index.ts # Barrel export`; - const mermaidDiagram = `graph LR - Config[Configuration] --> Scanner[Scanner] - Scanner --> Extractor[Extractor] - Extractor --> Transformer[Transformer] - Transformer --> Codec[Codec] - Codec --> Markdown[Markdown] - - Registry[TagRegistry] --> Scanner - Registry --> Extractor`; - return [ - heading(2, 'Architecture'), - paragraph('Taxonomy source files and pipeline flow.'), - code(directoryTree, 'plaintext'), - mermaid(mermaidDiagram), - separator(), - ]; -} -// ═══════════════════════════════════════════════════════════════════════════ -// Additional Detail Files (Progressive Disclosure) -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Build additional taxonomy detail files - */ -function buildTaxonomyDetailFiles(tagRegistry, _options) { - const files = {}; - // taxonomy/categories.md - Full category reference with aliases - files['taxonomy/categories.md'] = buildCategoriesDetailDocument(tagRegistry); - // taxonomy/metadata-tags.md - Full metadata tag definitions - files['taxonomy/metadata-tags.md'] = buildMetadataTagsDetailDocument(tagRegistry); - // taxonomy/format-types.md - Format type parsing details - files['taxonomy/format-types.md'] = buildFormatTypesDetailDocument(); - return files; -} -/** - * Build categories detail document - */ -function buildCategoriesDetailDocument(tagRegistry) { - const sections = []; - // Sort categories by priority - const sortedCategories = [...tagRegistry.categories].sort((a, b) => a.priority - b.priority); - // Full table with aliases - const rows = sortedCategories.map((cat) => [ - `\`${cat.tag}\``, - cat.domain, - String(cat.priority), - cat.description, - cat.aliases.length > 0 ? cat.aliases.map((a) => `\`${a}\``).join(', ') : '-', - ]); - sections.push(heading(2, 'Category Definitions'), paragraph(`${sortedCategories.length} categories sorted by priority.`), table(['Tag', 'Domain', 'Priority', 'Description', 'Aliases'], rows)); - // Group by domain for additional context - const byDomain = new Map(); - for (const cat of sortedCategories) { - const existing = byDomain.get(cat.domain); - if (existing) { - existing.push(cat); - } - else { - byDomain.set(cat.domain, [cat]); - } - } - sections.push(heading(2, 'Categories by Domain')); - for (const [domain, cats] of byDomain) { - sections.push(heading(3, domain), paragraph(cats.map((c) => `\`${c.tag}\``).join(', '))); - } - // Back link - sections.push(separator(), linkOut('Back to Taxonomy Reference', '../TAXONOMY.md')); - return document('Category Reference', sections, { - purpose: 'Complete category definitions with aliases and domain groupings', - }); -} -/** - * Build metadata tags detail document - */ -function buildMetadataTagsDetailDocument(tagRegistry) { - const sections = []; - sections.push(heading(2, 'Metadata Tag Definitions'), paragraph(`${tagRegistry.metadataTags.length} metadata tags with full details.`)); - // Full table with all fields - const rows = tagRegistry.metadataTags.map((tag) => { - const values = tag.values ? tag.values.join(', ') : '-'; - const defaultVal = tag.default ?? '-'; - const repeatable = tag.repeatable ? 'Yes' : 'No'; - const required = tag.required ? 'Yes' : 'No'; - return [`\`${tag.tag}\``, tag.format, tag.purpose, required, repeatable, values, defaultVal]; - }); - sections.push(table(['Tag', 'Format', 'Purpose', 'Required', 'Repeatable', 'Values', 'Default'], rows)); - // Individual tag details - sections.push(heading(2, 'Tag Details')); - for (const tag of tagRegistry.metadataTags) { - sections.push(heading(3, `\`${tag.tag}\``)); - const detailRows = [ - ['Format', tag.format], - ['Purpose', tag.purpose], - ['Required', tag.required ? 'Yes' : 'No'], - ['Repeatable', tag.repeatable ? 'Yes' : 'No'], - ]; - if (tag.values && tag.values.length > 0) { - detailRows.push(['Valid Values', tag.values.join(', ')]); - } - if (tag.default) { - detailRows.push(['Default', tag.default]); - } - if (tag.example) { - detailRows.push(['Example', `\`${tag.example}\``]); - } - sections.push(table(['Property', 'Value'], detailRows)); - } - // Back link - sections.push(separator(), linkOut('Back to Taxonomy Reference', '../TAXONOMY.md')); - return document('Metadata Tag Reference', sections, { - purpose: 'Complete metadata tag definitions with all fields', - }); -} -/** - * Build format types detail document - */ -function buildFormatTypesDetailDocument() { - const sections = []; - const formatDetails = { - value: { - description: 'Simple string value', - parsingBehavior: 'Captures everything after the tag name as the value', - example: '@libar-docs-pattern CommandOrchestrator', - notes: 'Most common format for single-value tags', - }, - enum: { - description: 'Constrained to predefined values', - parsingBehavior: 'Validates value against allowed list; rejects invalid values', - example: '@libar-docs-status roadmap', - notes: 'Used for FSM states, priority levels, risk levels', - }, - 'quoted-value': { - description: 'String in quotes (preserves spaces)', - parsingBehavior: 'Extracts content between quotes; preserves internal whitespace', - example: '@libar-docs-usecase "When a user submits a form"', - notes: 'Use for human-readable text with spaces', - }, - csv: { - description: 'Comma-separated values', - parsingBehavior: 'Splits on commas; trims whitespace from each value', - example: '@libar-docs-uses CommandBus, EventStore, Projection', - notes: 'Used for relationship tags and multi-value references', - }, - number: { - description: 'Numeric value', - parsingBehavior: 'Parses as integer; NaN if invalid', - example: '@libar-docs-phase 14', - notes: 'Used for phase numbers and ordering', - }, - flag: { - description: 'Boolean presence (no value needed)', - parsingBehavior: 'Presence of tag indicates true; absence indicates false', - example: '@libar-docs-core', - notes: 'Used for boolean markers like core, overview, decision', - }, - }; - sections.push(heading(2, 'Format Type Reference'), paragraph('Detailed parsing behavior for each format type.')); - for (const format of FORMAT_TYPES) { - const info = formatDetails[format]; - sections.push(heading(3, `\`${format}\``), table(['Property', 'Value'], [ - ['Description', info.description], - ['Parsing Behavior', info.parsingBehavior], - ['Example', `\`${info.example}\``], - ['Notes', info.notes], - ])); - } - // Back link - sections.push(separator(), linkOut('Back to Taxonomy Reference', '../TAXONOMY.md')); - return document('Format Type Reference', sections, { - purpose: 'Detailed format type parsing behavior and examples', - }); -} -//# sourceMappingURL=taxonomy.js.map \ No newline at end of file diff --git a/dist/renderable/codecs/taxonomy.js.map b/dist/renderable/codecs/taxonomy.js.map deleted file mode 100644 index 8ca9e632..00000000 --- a/dist/renderable/codecs/taxonomy.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"taxonomy.js","sourceRoot":"","sources":["../../../src/renderable/codecs/taxonomy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,mBAAmB,GAEpB,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAGL,OAAO,EACP,SAAS,EACT,SAAS,EACT,KAAK,EACL,IAAI,EACJ,OAAO,EACP,OAAO,EACP,QAAQ,GACT,MAAM,cAAc,CAAC;AACtB,OAAO,EAAyB,oBAAoB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC5F,OAAO,EAAE,8BAA8B,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,EAAE,OAAO,EAAmB,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,YAAY,EAAmB,MAAM,gCAAgC,CAAC;AAwB/E;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GA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newline at end of file diff --git a/dist/renderable/codecs/timeline.d.ts b/dist/renderable/codecs/timeline.d.ts deleted file mode 100644 index 3b5e5577..00000000 --- a/dist/renderable/codecs/timeline.d.ts +++ /dev/null @@ -1,12028 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern TimelineCodec - * @libar-docs-status completed - * - * ## Timeline Document Codec - * - * Transforms MasterDataset into RenderableDocuments for timeline outputs: - * - ROADMAP.md (phase breakdown with progress) - * - COMPLETED-MILESTONES.md (historical completed phases) - * - * ### When to Use - * - * - When generating roadmap documentation by phase - * - When tracking completed milestones and historical progress - * - When building timeline-based project views - * - * ### Factory Pattern - * - * Use factory functions for custom options: - * ```typescript - * const codec = createRoadmapCodec({ generateDetailFiles: false }); - * const doc = codec.decode(dataset); - * ``` - */ -import { z } from 'zod'; -import { MasterDatasetSchema } from '../../validation-schemas/master-dataset.js'; -import { type BaseCodecOptions, type NormalizedStatusFilter } from './types/base.js'; -/** - * Options for RoadmapDocumentCodec - */ -export interface RoadmapCodecOptions extends BaseCodecOptions { - /** Filter by status (default: all statuses). Uses normalized status values. */ - filterStatus?: NormalizedStatusFilter[]; - /** Include process metadata (quarter, effort, team) (default: true) */ - includeProcess?: boolean; - /** Include deliverables in phase details (default: true) */ - includeDeliverables?: boolean; - /** Filter by specific phases (default: all phases) */ - filterPhases?: number[]; -} -/** - * Default options for RoadmapDocumentCodec - */ -export declare const DEFAULT_ROADMAP_OPTIONS: Required; -/** - * Options for CompletedMilestonesCodec - */ -export interface CompletedMilestonesCodecOptions extends BaseCodecOptions { - /** Filter by quarters (default: all quarters) */ - filterQuarters?: string[]; - /** Include deliverables (default: true) */ - includeDeliverables?: boolean; - /** Show links to related patterns (default: true) */ - includeLinks?: boolean; -} -/** - * Default options for CompletedMilestonesCodec - */ -export declare const DEFAULT_MILESTONES_OPTIONS: Required; -/** - * Options for CurrentWorkCodec - */ -export interface CurrentWorkCodecOptions extends BaseCodecOptions { - /** Include deliverables (default: true) */ - includeDeliverables?: boolean; - /** Include process metadata (default: true) */ - includeProcess?: boolean; -} -/** - * Default options for CurrentWorkCodec - */ -export declare const DEFAULT_CURRENT_WORK_OPTIONS: Required; -import { RenderableDocumentOutputSchema } from './shared-schema.js'; -/** - * Create a RoadmapDocumentCodec with custom options. - * - * @param options - Codec configuration options - * @returns Configured Zod codec - * - * @example - * ```typescript - * // Disable detail files for summary output - * const codec = createRoadmapCodec({ generateDetailFiles: false }); - * - * // Filter to specific phases - * const codec = createRoadmapCodec({ filterPhases: [1, 2, 3] }); - * ``` - */ -export declare function createRoadmapCodec(options?: RoadmapCodecOptions): z.ZodCodec; -/** - * Default Roadmap Document Codec - * - * Transforms MasterDataset → RenderableDocument for roadmap view. - * Shows phases with progress, patterns grouped by phase. - */ -export declare const RoadmapDocumentCodec: z.ZodCodec>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - tagRegistry: z.ZodObject<{ - $schema: z.ZodOptional; - version: z.ZodDefault; - categories: z.ZodArray>>; - }, z.core.$strict>>; - metadataTags: z.ZodArray; - purpose: z.ZodString; - required: z.ZodDefault>; - repeatable: z.ZodDefault>; - values: z.ZodOptional>; - default: z.ZodOptional; - example: z.ZodOptional; - metadataKey: z.ZodOptional; - transform: z.ZodOptional>; - }, z.core.$strict>>; - aggregationTags: z.ZodArray; - purpose: z.ZodString; - }, z.core.$strict>>; - formatOptions: z.ZodDefault>; - tagPrefix: z.ZodDefault; - fileOptInTag: z.ZodDefault; - }, z.core.$strict>; - byStatus: z.ZodObject<{ - completed: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - active: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - planned: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>; - byPhase: z.ZodArray; - patterns: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - counts: z.ZodObject<{ - completed: z.ZodNumber; - active: z.ZodNumber; - planned: z.ZodNumber; - total: z.ZodNumber; - }, z.core.$strip>; - }, z.core.$strip>>; - byQuarter: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byCategory: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - bySource: z.ZodObject<{ - typescript: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - gherkin: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - roadmap: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - prd: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>; - counts: z.ZodObject<{ - completed: z.ZodNumber; - active: z.ZodNumber; - planned: z.ZodNumber; - total: z.ZodNumber; - }, z.core.$strip>; - phaseCount: z.ZodNumber; - categoryCount: z.ZodNumber; - relationshipIndex: z.ZodOptional; - usedBy: z.ZodArray; - dependsOn: z.ZodArray; - enables: z.ZodArray; - implementsPatterns: z.ZodArray; - implementedBy: z.ZodArray; - }, z.core.$strip>>; - extendsPattern: z.ZodOptional; - extendedBy: z.ZodArray; - seeAlso: z.ZodArray; - apiRef: z.ZodArray; - }, z.core.$strip>>>; - archIndex: z.ZodOptional>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byContext: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byLayer: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byView: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - all: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>>; -}, z.core.$strip>, z.ZodObject<{ - title: z.ZodString; - purpose: z.ZodOptional; - detailLevel: z.ZodOptional; - sections: z.ZodArray; - additionalFiles: z.ZodOptional>; -}, z.core.$strip>>; -/** - * Create a CompletedMilestonesCodec with custom options. - * - * @param options - Codec configuration options - * @returns Configured Zod codec - * - * @example - * ```typescript - * // Filter to specific quarters - * const codec = createMilestonesCodec({ filterQuarters: ["Q1-2025"] }); - * ``` - */ -export declare function createMilestonesCodec(options?: CompletedMilestonesCodecOptions): z.ZodCodec; -/** - * Default Completed Milestones Document Codec - * - * Transforms MasterDataset → RenderableDocument for completed milestones. - * Shows historical completed phases and patterns. - */ -export declare const CompletedMilestonesCodec: z.ZodCodec>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - tagRegistry: z.ZodObject<{ - $schema: z.ZodOptional; - version: z.ZodDefault; - categories: z.ZodArray>>; - }, z.core.$strict>>; - metadataTags: z.ZodArray; - purpose: z.ZodString; - required: z.ZodDefault>; - repeatable: z.ZodDefault>; - values: z.ZodOptional>; - default: z.ZodOptional; - example: z.ZodOptional; - metadataKey: z.ZodOptional; - transform: z.ZodOptional>; - }, z.core.$strict>>; - aggregationTags: z.ZodArray; - purpose: z.ZodString; - }, z.core.$strict>>; - formatOptions: z.ZodDefault>; - tagPrefix: z.ZodDefault; - fileOptInTag: z.ZodDefault; - }, z.core.$strict>; - byStatus: z.ZodObject<{ - completed: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - active: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - planned: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>; - byPhase: z.ZodArray; - patterns: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - counts: z.ZodObject<{ - completed: z.ZodNumber; - active: z.ZodNumber; - planned: z.ZodNumber; - total: z.ZodNumber; - }, z.core.$strip>; - }, z.core.$strip>>; - byQuarter: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byCategory: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - bySource: z.ZodObject<{ - typescript: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - gherkin: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - roadmap: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - prd: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>; - counts: z.ZodObject<{ - completed: z.ZodNumber; - active: z.ZodNumber; - planned: z.ZodNumber; - total: z.ZodNumber; - }, z.core.$strip>; - phaseCount: z.ZodNumber; - categoryCount: z.ZodNumber; - relationshipIndex: z.ZodOptional; - usedBy: z.ZodArray; - dependsOn: z.ZodArray; - enables: z.ZodArray; - implementsPatterns: z.ZodArray; - implementedBy: z.ZodArray; - }, z.core.$strip>>; - extendsPattern: z.ZodOptional; - extendedBy: z.ZodArray; - seeAlso: z.ZodArray; - apiRef: z.ZodArray; - }, z.core.$strip>>>; - archIndex: z.ZodOptional>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byContext: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byLayer: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byView: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - all: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>>; -}, z.core.$strip>, z.ZodObject<{ - title: z.ZodString; - purpose: z.ZodOptional; - detailLevel: z.ZodOptional; - sections: z.ZodArray; - additionalFiles: z.ZodOptional>; -}, z.core.$strip>>; -/** - * Create a CurrentWorkCodec with custom options. - * - * @param options - Codec configuration options - * @returns Configured Zod codec - * - * @example - * ```typescript - * // Disable deliverables in output - * const codec = createCurrentWorkCodec({ includeDeliverables: false }); - * - * // Compact output without detail files - * const codec = createCurrentWorkCodec({ generateDetailFiles: false }); - * ``` - */ -export declare function createCurrentWorkCodec(options?: CurrentWorkCodecOptions): z.ZodCodec; -/** - * Default Current Work Document Codec - * - * Transforms MasterDataset → RenderableDocument for current work. - * Shows active phases with deliverables and progress tracking. - */ -export declare const CurrentWorkCodec: z.ZodCodec>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - tagRegistry: z.ZodObject<{ - $schema: z.ZodOptional; - version: z.ZodDefault; - categories: z.ZodArray>>; - }, z.core.$strict>>; - metadataTags: z.ZodArray; - purpose: z.ZodString; - required: z.ZodDefault>; - repeatable: z.ZodDefault>; - values: z.ZodOptional>; - default: z.ZodOptional; - example: z.ZodOptional; - metadataKey: z.ZodOptional; - transform: z.ZodOptional>; - }, z.core.$strict>>; - aggregationTags: z.ZodArray; - purpose: z.ZodString; - }, z.core.$strict>>; - formatOptions: z.ZodDefault>; - tagPrefix: z.ZodDefault; - fileOptInTag: z.ZodDefault; - }, z.core.$strict>; - byStatus: z.ZodObject<{ - completed: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - active: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - planned: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>; - byPhase: z.ZodArray; - patterns: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - counts: z.ZodObject<{ - completed: z.ZodNumber; - active: z.ZodNumber; - planned: z.ZodNumber; - total: z.ZodNumber; - }, z.core.$strip>; - }, z.core.$strip>>; - byQuarter: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byCategory: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - bySource: z.ZodObject<{ - typescript: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - gherkin: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - roadmap: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - prd: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>; - counts: z.ZodObject<{ - completed: z.ZodNumber; - active: z.ZodNumber; - planned: z.ZodNumber; - total: z.ZodNumber; - }, z.core.$strip>; - phaseCount: z.ZodNumber; - categoryCount: z.ZodNumber; - relationshipIndex: z.ZodOptional; - usedBy: z.ZodArray; - dependsOn: z.ZodArray; - enables: z.ZodArray; - implementsPatterns: z.ZodArray; - implementedBy: z.ZodArray; - }, z.core.$strip>>; - extendsPattern: z.ZodOptional; - extendedBy: z.ZodArray; - seeAlso: z.ZodArray; - apiRef: z.ZodArray; - }, z.core.$strip>>>; - archIndex: z.ZodOptional>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byContext: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byLayer: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byView: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - all: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>>; -}, z.core.$strip>, z.ZodObject<{ - title: z.ZodString; - purpose: z.ZodOptional; - detailLevel: z.ZodOptional; - sections: z.ZodArray; - additionalFiles: z.ZodOptional>; -}, z.core.$strip>>; -/** - * Generate slug for phase detail file - * - * Produces readable slugs with proper word separation: - * - Phase 14 "DeciderPattern" → "phase-14-decider-pattern" - * - Phase 19 "BddTestingInfrastructure" → "phase-19-bdd-testing-infrastructure" - * - Phase 5 (no name) → "phase-5-unnamed" - * - * @param phaseNumber - The phase number - * @param phaseName - Optional phase name (typically CamelCase) - * @returns URL-safe slug for the phase - * - * @internal Exported for testing - not part of public API - */ -export declare function getPhaseSlug(phaseNumber: number, phaseName: string | undefined): string; -//# sourceMappingURL=timeline.d.ts.map \ No newline at end of file diff --git a/dist/renderable/codecs/timeline.d.ts.map b/dist/renderable/codecs/timeline.d.ts.map deleted file mode 100644 index 6a82d1b8..00000000 --- a/dist/renderable/codecs/timeline.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"timeline.d.ts","sourceRoot":"","sources":["../../../src/renderable/codecs/timeline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,mBAAmB,EAGpB,MAAM,4CAA4C,CAAC;AAgCpD,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAG5B,MAAM,iBAAiB,CAAC;AAMzB;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,gBAAgB;IAC3D,+EAA+E;IAC/E,YAAY,CAAC,EAAE,sBAAsB,EAAE,CAAC;IAExC,uEAAuE;IACvE,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB,4DAA4D;IAC5D,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B,sDAAsD;IACtD,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AAED;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,mBAAmB,CAMjE,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,+BAAgC,SAAQ,gBAAgB;IACvE,iDAAiD;IACjD,cAAc,CAAC,EAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAA2B,CAAC;AA4MzD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,YAAY,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAIvF"} \ No newline at end of file diff --git a/dist/renderable/codecs/timeline.js b/dist/renderable/codecs/timeline.js deleted file mode 100644 index 1662e515..00000000 --- a/dist/renderable/codecs/timeline.js +++ /dev/null @@ -1,886 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern TimelineCodec - * @libar-docs-status completed - * - * ## Timeline Document Codec - * - * Transforms MasterDataset into RenderableDocuments for timeline outputs: - * - ROADMAP.md (phase breakdown with progress) - * - COMPLETED-MILESTONES.md (historical completed phases) - * - * ### When to Use - * - * - When generating roadmap documentation by phase - * - When tracking completed milestones and historical progress - * - When building timeline-based project views - * - * ### Factory Pattern - * - * Use factory functions for custom options: - * ```typescript - * const codec = createRoadmapCodec({ generateDetailFiles: false }); - * const doc = codec.decode(dataset); - * ``` - */ -import { z } from 'zod'; -import { MasterDatasetSchema, } from '../../validation-schemas/master-dataset.js'; -import { heading, paragraph, separator, table, list, collapsible, linkOut, document, } from '../schema.js'; -import { normalizeStatus, isPatternComplete, isPatternActive, isPatternPlanned, } from '../../taxonomy/index.js'; -import { getDeliverableStatusEmoji } from '../../taxonomy/deliverable-status.js'; -import { getPhaseStatusEmoji } from '../../validation/types.js'; -import { getStatusEmoji, getDisplayName, extractSummary, completionPercentage, renderProgressBar, sortByPhaseAndName, formatBusinessValue, } from '../utils.js'; -import { toKebabCase, groupBy } from '../../utils/index.js'; -import { DEFAULT_BASE_OPTIONS, mergeOptions, } from './types/base.js'; -/** - * Default options for RoadmapDocumentCodec - */ -export const DEFAULT_ROADMAP_OPTIONS = { - ...DEFAULT_BASE_OPTIONS, - filterStatus: [], - includeProcess: true, - includeDeliverables: true, - filterPhases: [], -}; -/** - * Default options for CompletedMilestonesCodec - */ -export const DEFAULT_MILESTONES_OPTIONS = { - ...DEFAULT_BASE_OPTIONS, - filterQuarters: [], - includeDeliverables: true, - includeLinks: true, -}; -/** - * Default options for CurrentWorkCodec - */ -export const DEFAULT_CURRENT_WORK_OPTIONS = { - ...DEFAULT_BASE_OPTIONS, - includeDeliverables: true, - includeProcess: true, -}; -import { RenderableDocumentOutputSchema } from './shared-schema.js'; -import { renderAcceptanceCriteria, renderBusinessRulesSection } from './helpers.js'; -// ═══════════════════════════════════════════════════════════════════════════ -// Roadmap Document Codec -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Create a RoadmapDocumentCodec with custom options. - * - * @param options - Codec configuration options - * @returns Configured Zod codec - * - * @example - * ```typescript - * // Disable detail files for summary output - * const codec = createRoadmapCodec({ generateDetailFiles: false }); - * - * // Filter to specific phases - * const codec = createRoadmapCodec({ filterPhases: [1, 2, 3] }); - * ``` - */ -export function createRoadmapCodec(options) { - const opts = mergeOptions(DEFAULT_ROADMAP_OPTIONS, options); - return z.codec(MasterDatasetSchema, RenderableDocumentOutputSchema, { - decode: (dataset) => { - return buildRoadmapDocument(dataset, opts); - }, - /** @throws Always - this codec is decode-only. See zod-codecs.md */ - encode: () => { - throw new Error('RoadmapDocumentCodec is decode-only. See zod-codecs.md'); - }, - }); -} -/** - * Default Roadmap Document Codec - * - * Transforms MasterDataset → RenderableDocument for roadmap view. - * Shows phases with progress, patterns grouped by phase. - */ -export const RoadmapDocumentCodec = createRoadmapCodec(); -/** - * Create a CompletedMilestonesCodec with custom options. - * - * @param options - Codec configuration options - * @returns Configured Zod codec - * - * @example - * ```typescript - * // Filter to specific quarters - * const codec = createMilestonesCodec({ filterQuarters: ["Q1-2025"] }); - * ``` - */ -export function createMilestonesCodec(options) { - const opts = mergeOptions(DEFAULT_MILESTONES_OPTIONS, options); - return z.codec(MasterDatasetSchema, RenderableDocumentOutputSchema, { - decode: (dataset) => { - return buildCompletedMilestonesDocument(dataset, opts); - }, - /** @throws Always - this codec is decode-only. See zod-codecs.md */ - encode: () => { - throw new Error('CompletedMilestonesCodec is decode-only. See zod-codecs.md'); - }, - }); -} -/** - * Default Completed Milestones Document Codec - * - * Transforms MasterDataset → RenderableDocument for completed milestones. - * Shows historical completed phases and patterns. - */ -export const CompletedMilestonesCodec = createMilestonesCodec(); -/** - * Create a CurrentWorkCodec with custom options. - * - * @param options - Codec configuration options - * @returns Configured Zod codec - * - * @example - * ```typescript - * // Disable deliverables in output - * const codec = createCurrentWorkCodec({ includeDeliverables: false }); - * - * // Compact output without detail files - * const codec = createCurrentWorkCodec({ generateDetailFiles: false }); - * ``` - */ -export function createCurrentWorkCodec(options) { - const opts = mergeOptions(DEFAULT_CURRENT_WORK_OPTIONS, options); - return z.codec(MasterDatasetSchema, RenderableDocumentOutputSchema, { - decode: (dataset) => { - return buildCurrentWorkDocument(dataset, opts); - }, - /** @throws Always - this codec is decode-only. See zod-codecs.md */ - encode: () => { - throw new Error('CurrentWorkCodec is decode-only. See zod-codecs.md'); - }, - }); -} -/** - * Default Current Work Document Codec - * - * Transforms MasterDataset → RenderableDocument for current work. - * Shows active phases with deliverables and progress tracking. - */ -export const CurrentWorkCodec = createCurrentWorkCodec(); -// ═══════════════════════════════════════════════════════════════════════════ -// Roadmap Document Builder -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Build roadmap document - */ -function buildRoadmapDocument(dataset, options) { - const sections = []; - // 1. Overall progress summary - sections.push(...buildOverallProgress(dataset)); - // 2. Phase navigation table (links to detail files) - sections.push(...buildPhaseNavigationTable(dataset, options)); - // 3. Phase summaries (inline) - sections.push(...buildPhaseBreakdown(dataset)); - // 4. Quarterly timeline (if quarters exist) - if (Object.keys(dataset.byQuarter).length > 0) { - sections.push(...buildQuarterlyTimeline(dataset)); - } - // Build phase detail files (if enabled) - const additionalFiles = options.generateDetailFiles - ? buildPhaseDetailFiles(dataset, options) - : {}; - const docOpts = { - purpose: 'Track implementation progress by phase', - detailLevel: options.generateDetailFiles - ? 'Phase summaries with links to details' - : 'Compact summary', - }; - if (Object.keys(additionalFiles).length > 0) { - docOpts.additionalFiles = additionalFiles; - } - return document('Development Roadmap', sections, docOpts); -} -/** - * Build overall progress section - */ -function buildOverallProgress(dataset) { - const { counts, phaseCount } = dataset; - const progress = completionPercentage(counts); - const progressBar = renderProgressBar(counts.completed, counts.total, 20); - // Count completed phases - const completedPhases = dataset.byPhase.filter((p) => p.counts.total > 0 && p.counts.completed === p.counts.total).length; - return [ - heading(2, 'Overall Progress'), - paragraph(`**Patterns:** ${progressBar} (${progress}%)`), - paragraph(`**Phases:** ${completedPhases}/${phaseCount} complete`), - table(['Metric', 'Value'], [ - ['Total Patterns', String(counts.total)], - ['Completed', String(counts.completed)], - ['Active', String(counts.active)], - ['Planned', String(counts.planned)], - ]), - separator(), - ]; -} -/** - * Build phase breakdown section - */ -function buildPhaseBreakdown(dataset) { - const sections = []; - sections.push(heading(2, 'Phases')); - // Sort phases by number - const sortedPhases = [...dataset.byPhase].sort((a, b) => a.phaseNumber - b.phaseNumber); - for (const phase of sortedPhases) { - sections.push(...buildPhaseSection(phase)); - } - return sections; -} -/** - * Build a single phase section - */ -function buildPhaseSection(phase) { - const sections = []; - const { phaseNumber, phaseName, patterns, counts } = phase; - const displayName = phaseName ?? `Phase ${phaseNumber}`; - const progress = completionPercentage(counts); - const progressBar = renderProgressBar(counts.completed, counts.total, 15); - const isComplete = counts.total > 0 && counts.completed === counts.total; - // Phase header with progress - const statusEmoji = getPhaseStatusEmoji(isComplete, counts.active > 0); - sections.push(heading(3, `${statusEmoji} ${displayName}`)); - sections.push(paragraph(`${progressBar} ${progress}% complete`)); - // Pattern table for this phase - const sortedPatterns = sortByPhaseAndName([...patterns]); - const rows = sortedPatterns.map((p) => { - const emoji = getStatusEmoji(p.status); - const name = getDisplayName(p); - const status = normalizeStatus(p.status); - const summary = extractSummary(p.directive.description, p.patternName); - return [`${emoji} ${name}`, status, summary || '-']; - }); - sections.push(table(['Pattern', 'Status', 'Description'], rows), separator()); - return sections; -} -/** - * Build quarterly timeline section - */ -function buildQuarterlyTimeline(dataset) { - const sections = []; - const quarters = Object.keys(dataset.byQuarter).sort(); - if (quarters.length === 0) { - return []; - } - sections.push(heading(2, 'Quarterly Timeline')); - // Current quarter detection - const now = new Date(); - const currentQuarter = `Q${Math.ceil((now.getMonth() + 1) / 3)}-${now.getFullYear()}`; - const rows = quarters.map((quarter) => { - const patterns = dataset.byQuarter[quarter] ?? []; - const completed = patterns.filter((p) => isPatternComplete(p.status)).length; - const isCurrent = quarter === currentQuarter; - const marker = isCurrent ? ' ← Current' : ''; - return [quarter + marker, String(patterns.length), String(completed)]; - }); - sections.push(table(['Quarter', 'Total', 'Completed'], rows), separator()); - return sections; -} -// ═══════════════════════════════════════════════════════════════════════════ -// Roadmap Progressive Disclosure -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Build phase navigation table with links to detail files - */ -function buildPhaseNavigationTable(dataset, options) { - const sections = []; - const sortedPhases = [...dataset.byPhase].sort((a, b) => a.phaseNumber - b.phaseNumber); - if (sortedPhases.length === 0) { - return []; - } - sections.push(heading(2, 'Phase Navigation')); - const rows = sortedPhases.map((phase) => { - const { phaseNumber, phaseName, counts } = phase; - const displayName = phaseName ?? `Phase ${phaseNumber}`; - const progress = completionPercentage(counts); - const isComplete = counts.total > 0 && counts.completed === counts.total; - const statusEmoji = getPhaseStatusEmoji(isComplete, counts.active > 0); - const slug = getPhaseSlug(phaseNumber, phaseName); - // Link to detail file if generating detail files, otherwise just display name - const nameCell = options.generateDetailFiles - ? `${statusEmoji} [${displayName}](phases/${slug}.md)` - : `${statusEmoji} ${displayName}`; - return [nameCell, `${counts.completed}/${counts.total}`, `${progress}%`]; - }); - sections.push(table(['Phase', 'Progress', 'Complete'], rows), separator()); - return sections; -} -/** - * Generate slug for phase detail file - * - * Produces readable slugs with proper word separation: - * - Phase 14 "DeciderPattern" → "phase-14-decider-pattern" - * - Phase 19 "BddTestingInfrastructure" → "phase-19-bdd-testing-infrastructure" - * - Phase 5 (no name) → "phase-5-unnamed" - * - * @param phaseNumber - The phase number - * @param phaseName - Optional phase name (typically CamelCase) - * @returns URL-safe slug for the phase - * - * @internal Exported for testing - not part of public API - */ -export function getPhaseSlug(phaseNumber, phaseName) { - const paddedPhase = String(phaseNumber).padStart(2, '0'); - const namePart = phaseName ? toKebabCase(phaseName) : 'unnamed'; - return `phase-${paddedPhase}-${namePart}`; -} -/** - * Build phase detail files (progressive disclosure) - */ -function buildPhaseDetailFiles(dataset, options) { - const files = {}; - let sortedPhases = [...dataset.byPhase].sort((a, b) => a.phaseNumber - b.phaseNumber); - // Apply phase filter if specified - if (options.filterPhases.length > 0) { - sortedPhases = sortedPhases.filter((p) => options.filterPhases.includes(p.phaseNumber)); - } - for (const phase of sortedPhases) { - if (phase.patterns.length === 0) - continue; - const slug = getPhaseSlug(phase.phaseNumber, phase.phaseName); - files[`phases/${slug}.md`] = buildPhaseDetailDocument(phase, options); - } - return files; -} -/** - * Build a single phase detail document - */ -function buildPhaseDetailDocument(phase, _options) { - const sections = []; - const { phaseNumber, phaseName, patterns, counts } = phase; - const displayName = phaseName ?? `Phase ${phaseNumber}`; - // Summary - const progress = completionPercentage(counts); - const progressBar = renderProgressBar(counts.completed, counts.total, 20); - sections.push(heading(2, 'Summary'), paragraph(`**Progress:** ${progressBar} (${progress}%)`), table(['Status', 'Count'], [ - ['✅ Completed', String(counts.completed)], - ['🚧 Active', String(counts.active)], - ['📋 Planned', String(counts.planned)], - ['**Total**', String(counts.total)], - ]), separator()); - // Patterns by status - const completed = patterns.filter((p) => isPatternComplete(p.status)); - const active = patterns.filter((p) => isPatternActive(p.status)); - const planned = patterns.filter((p) => isPatternPlanned(p.status)); - if (active.length > 0) { - sections.push(heading(2, '🚧 Active Patterns')); - sections.push(...buildPatternDetailList(active)); - } - if (planned.length > 0) { - sections.push(heading(2, '📋 Planned Patterns')); - sections.push(...buildPatternDetailList(planned)); - } - if (completed.length > 0) { - sections.push(heading(2, '✅ Completed Patterns')); - sections.push(...buildPatternDetailList(completed)); - } - // Back link - sections.push(linkOut('← Back to Roadmap', '../ROADMAP.md')); - return document(displayName, sections, { - purpose: `Detailed patterns for ${displayName}`, - }); -} -/** - * Build detailed pattern list for phase detail files - */ -function buildPatternDetailList(patterns) { - const sections = []; - const sorted = sortByPhaseAndName([...patterns]); - for (const pattern of sorted) { - const emoji = getStatusEmoji(pattern.status); - const name = getDisplayName(pattern); - sections.push(heading(3, `${emoji} ${name}`)); - // Metadata table - const metaRows = [['Status', normalizeStatus(pattern.status)]]; - if (pattern.effort) { - metaRows.push(['Effort', pattern.effort]); - } - if (pattern.quarter) { - metaRows.push(['Quarter', pattern.quarter]); - } - const businessValue = formatBusinessValue(pattern.businessValue); - if (businessValue) { - metaRows.push(['Business Value', businessValue]); - } - sections.push(table(['Property', 'Value'], metaRows)); - // Description - if (pattern.directive.description) { - sections.push(paragraph(pattern.directive.description)); - } - // Dependencies - if (pattern.dependsOn && pattern.dependsOn.length > 0) { - sections.push(heading(4, 'Dependencies'), list(pattern.dependsOn.map((d) => `Depends on: ${d}`))); - } - if (pattern.enables && pattern.enables.length > 0) { - sections.push(heading(4, 'Enables'), list(pattern.enables.map((e) => `Enables: ${e}`))); - } - // Use cases - if (pattern.useCases && pattern.useCases.length > 0) { - sections.push(heading(4, 'Use Cases'), list([...pattern.useCases])); - } - // Acceptance Criteria (scenarios with steps, DataTables, DocStrings) - sections.push(...renderAcceptanceCriteria(pattern.scenarios)); - // Business Rules (from Gherkin Rule: keyword) - sections.push(...renderBusinessRulesSection(pattern.rules)); - sections.push(separator()); - } - return sections; -} -// ═══════════════════════════════════════════════════════════════════════════ -// Completed Milestones Document Builder -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Build completed milestones document - */ -function buildCompletedMilestonesDocument(dataset, options) { - const sections = []; - // Get completed patterns - let completedPatterns = dataset.byStatus.completed; - // Apply quarter filter if specified - if (options.filterQuarters.length > 0) { - completedPatterns = completedPatterns.filter((p) => p.quarter !== undefined && options.filterQuarters.includes(p.quarter)); - } - if (completedPatterns.length === 0) { - sections.push(heading(2, 'No Completed Milestones'), paragraph('No patterns have been completed yet.')); - return document('Completed Milestones', sections, { - purpose: 'Historical record of completed work', - }); - } - // 1. Summary - sections.push(...buildCompletedSummary(dataset, completedPatterns)); - // 2. Quarterly navigation table (links to detail files) - sections.push(...buildQuarterlyNavigationTable(dataset, completedPatterns, options)); - // 3. Completed phases - sections.push(...buildCompletedPhases(dataset)); - // 4. Recent completions (limit from options) - const recentLimit = options.limits.recentItems; - sections.push(...buildRecentCompletions(completedPatterns, recentLimit)); - // Build quarterly detail files (if enabled) - const additionalFiles = options.generateDetailFiles - ? buildQuarterlyMilestoneFiles(dataset, completedPatterns, options) - : {}; - const docOpts = { - purpose: 'Historical record of completed work', - detailLevel: options.generateDetailFiles - ? 'Quarterly summaries with links to details' - : 'Compact summary', - }; - if (Object.keys(additionalFiles).length > 0) { - docOpts.additionalFiles = additionalFiles; - } - return document('Completed Milestones', sections, docOpts); -} -/** - * Build completed summary section - */ -function buildCompletedSummary(dataset, completedPatterns) { - const completedPhases = dataset.byPhase.filter((p) => p.counts.total > 0 && p.counts.completed === p.counts.total).length; - return [ - heading(2, 'Summary'), - table(['Metric', 'Value'], [ - ['Completed Patterns', String(completedPatterns.length)], - ['Completed Phases', String(completedPhases)], - ['Total Phases', String(dataset.phaseCount)], - ]), - separator(), - ]; -} -/** - * Build completed phases section - */ -function buildCompletedPhases(dataset) { - const sections = []; - // Filter to fully completed phases - const completedPhases = dataset.byPhase.filter((p) => p.counts.total > 0 && p.counts.completed === p.counts.total); - if (completedPhases.length === 0) { - return []; - } - sections.push(heading(2, 'Completed Phases')); - for (const phase of completedPhases.sort((a, b) => a.phaseNumber - b.phaseNumber)) { - const displayName = phase.phaseName ?? `Phase ${phase.phaseNumber}`; - // Use collapsible for phase details - const phaseContent = []; - const rows = phase.patterns.map((p) => { - const name = getDisplayName(p); - const summary = extractSummary(p.directive.description, p.patternName); - return [name, summary || '-']; - }); - phaseContent.push(table(['Pattern', 'Description'], rows)); - sections.push(collapsible(`✅ ${displayName} (${phase.counts.total} patterns)`, phaseContent)); - } - sections.push(separator()); - return sections; -} -// ═══════════════════════════════════════════════════════════════════════════ -// Completed Milestones Progressive Disclosure -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Build quarterly navigation table with links to detail files - */ -function buildQuarterlyNavigationTable(_dataset, completedPatterns, options) { - const sections = []; - // Group completed patterns by quarter - const byQuarter = groupBy(completedPatterns.filter((p) => p.quarter), (p) => p.quarter ?? ''); - if (byQuarter.size === 0) { - return []; - } - sections.push(heading(2, 'Quarterly Navigation')); - const quarters = [...byQuarter.keys()].sort().reverse(); // Most recent first - const rows = quarters.map((quarter) => { - const patterns = byQuarter.get(quarter) ?? []; - // Link to detail file if generating detail files - const quarterCell = options.generateDetailFiles - ? `[${quarter}](milestones/${quarter}.md)` - : quarter; - return [quarterCell, String(patterns.length)]; - }); - sections.push(table(['Quarter', 'Completed'], rows), separator()); - return sections; -} -/** - * Build recent completions section - */ -function buildRecentCompletions(patterns, limit = 10) { - const sections = []; - // Get most recent patterns (assume last added = most recent) - const recent = [...patterns].slice(-limit).reverse(); - if (recent.length === 0) { - return []; - } - sections.push(heading(2, 'Recent Completions')); - const items = recent.map((p) => { - const name = getDisplayName(p); - const phase = p.phase !== undefined ? ` (Phase ${p.phase})` : ''; - const quarter = p.quarter ? ` - ${p.quarter}` : ''; - return `✅ ${name}${phase}${quarter}`; - }); - sections.push(list(items)); - if (patterns.length > limit) { - sections.push(paragraph(`Showing ${limit} of ${patterns.length} completed patterns. See quarterly files for full history.`)); - } - sections.push(separator()); - return sections; -} -/** - * Build quarterly milestone detail files (progressive disclosure) - */ -function buildQuarterlyMilestoneFiles(dataset, completedPatterns, _options) { - const files = {}; - // Group completed patterns by quarter - const byQuarter = groupBy(completedPatterns.filter((p) => p.quarter), (p) => p.quarter ?? ''); - for (const [quarter, patterns] of byQuarter.entries()) { - if (patterns.length === 0) - continue; - files[`milestones/${quarter}.md`] = buildQuarterDetailDocument(quarter, patterns, dataset); - } - return files; -} -/** - * Build a single quarterly detail document - */ -function buildQuarterDetailDocument(quarter, patterns, dataset) { - const sections = []; - // Summary - sections.push(heading(2, 'Summary'), table(['Metric', 'Value'], [ - ['Completed in Quarter', String(patterns.length)], - ['Quarter', quarter], - ]), separator()); - // Group by phase - const byPhase = groupBy(patterns, (p) => p.phase ?? 0); - const sortedPhases = [...byPhase.keys()].sort((a, b) => a - b); - if (sortedPhases.length > 0) { - sections.push(heading(2, 'By Phase')); - for (const phaseNum of sortedPhases) { - const phasePatterns = byPhase.get(phaseNum) ?? []; - const phaseGroup = dataset.byPhase.find((p) => p.phaseNumber === phaseNum); - const displayName = phaseGroup?.phaseName ?? `Phase ${phaseNum}`; - const phaseContent = []; - const rows = sortByPhaseAndName([...phasePatterns]).map((p) => { - const name = getDisplayName(p); - const summary = extractSummary(p.directive.description, p.patternName); - const businessValue = formatBusinessValue(p.businessValue); - return [name, summary || '-', businessValue || '-']; - }); - phaseContent.push(table(['Pattern', 'Description', 'Business Value'], rows)); - sections.push(collapsible(`✅ ${displayName} (${phasePatterns.length})`, phaseContent)); - } - sections.push(separator()); - } - // All patterns in quarter - sections.push(heading(2, 'All Patterns')); - const rows = sortByPhaseAndName([...patterns]).map((p) => { - const name = getDisplayName(p); - const phase = p.phase !== undefined ? `Phase ${p.phase}` : '-'; - const summary = extractSummary(p.directive.description, p.patternName); - return [`✅ ${name}`, phase, summary || '-']; - }); - sections.push(table(['Pattern', 'Phase', 'Description'], rows), separator()); - // Back link - sections.push(linkOut('← Back to Completed Milestones', '../COMPLETED-MILESTONES.md')); - return document(`${quarter} Milestones`, sections, { - purpose: `Completed patterns for ${quarter}`, - }); -} -// ═══════════════════════════════════════════════════════════════════════════ -// Current Work Document Builder -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Build current work document - * - * Filters to active patterns only and shows: - * - Progress summary for active work - * - Phases with active patterns - * - Deliverables (if configured) - */ -function buildCurrentWorkDocument(dataset, options) { - const sections = []; - // Get active patterns only - const activePatterns = dataset.byStatus.active; - if (activePatterns.length === 0) { - sections.push(heading(2, 'No Active Work'), paragraph('No patterns are currently in progress.')); - return document('Current Work', sections, { - purpose: 'Active development work currently in progress', - }); - } - // 1. Summary of active work - sections.push(...buildCurrentWorkSummary(dataset, activePatterns)); - // 2. Active phases with patterns - sections.push(...buildActivePhases(dataset, options)); - // 3. All active patterns table - sections.push(...buildActivePatternsList(activePatterns, options)); - // Build phase detail files (if enabled and phases have active work) - const additionalFiles = options.generateDetailFiles - ? buildCurrentWorkDetailFiles(dataset, options) - : {}; - const docOpts = { - purpose: 'Active development work currently in progress', - detailLevel: options.generateDetailFiles - ? 'Phase summaries with links to details' - : 'Compact summary', - }; - if (Object.keys(additionalFiles).length > 0) { - docOpts.additionalFiles = additionalFiles; - } - return document('Current Work', sections, docOpts); -} -/** - * Build current work summary section - */ -function buildCurrentWorkSummary(dataset, _activePatterns) { - // Count phases with active work - const activePhasesCount = dataset.byPhase.filter((p) => p.counts.active > 0).length; - // Calculate overall progress (from total dataset) - const { counts } = dataset; - const progress = completionPercentage(counts); - const progressBar = renderProgressBar(counts.completed, counts.total, 20); - return [ - heading(2, 'Summary'), - paragraph(`**Overall Progress:** ${progressBar} (${progress}%)`), - table(['Metric', 'Value'], [ - ['Total Patterns', String(counts.total)], - ['Completed', String(counts.completed)], - ['Active', String(counts.active)], - ['Planned', String(counts.planned)], - ['Active Phases', String(activePhasesCount)], - ]), - separator(), - ]; -} -/** - * Build active phases section - */ -function buildActivePhases(dataset, options) { - const sections = []; - // Filter to phases with active patterns - const activePhasesData = dataset.byPhase - .filter((p) => p.counts.active > 0) - .sort((a, b) => a.phaseNumber - b.phaseNumber); - if (activePhasesData.length === 0) { - return []; - } - sections.push(heading(2, 'Active Phases')); - for (const phase of activePhasesData) { - const { phaseNumber, phaseName, patterns, counts } = phase; - const displayName = phaseName ?? `Phase ${phaseNumber}`; - // Only show active patterns in this phase - const activeInPhase = patterns.filter((p) => isPatternActive(p.status)); - const progress = completionPercentage(counts); - const progressBar = renderProgressBar(counts.completed, counts.total, 15); - sections.push(heading(3, `🚧 ${displayName}`)); - // Build status breakdown with all non-zero categories - const statusParts = [`${counts.completed} done`, `${activeInPhase.length} active`]; - if (counts.planned > 0) - statusParts.push(`${counts.planned} planned`); - const statusText = statusParts.join(', '); - sections.push(paragraph(`${progressBar} ${progress}% complete (${statusText})`)); - // Pattern table for active patterns in this phase - const rows = sortByPhaseAndName([...activeInPhase]).map((p) => { - const name = getDisplayName(p); - const summary = extractSummary(p.directive.description, p.patternName); - return [`🚧 ${name}`, summary || '-']; - }); - sections.push(table(['Pattern', 'Description'], rows)); - // Deliverables for active patterns (if configured) - if (options.includeDeliverables) { - const allDeliverables = activeInPhase.flatMap((p) => p.deliverables ?? []); - if (allDeliverables.length > 0) { - const deliverableItems = allDeliverables.map((d) => { - const statusEmoji = getDeliverableStatusEmoji(d.status); - return `${statusEmoji} ${d.name}`; - }); - sections.push(heading(4, 'Deliverables'), list(deliverableItems)); - } - } - // Link to detail file - if (options.generateDetailFiles) { - const slug = getPhaseSlug(phaseNumber, phaseName); - sections.push(linkOut(`View ${displayName} details →`, `current/${slug}.md`)); - } - sections.push(separator()); - } - return sections; -} -/** - * Build all active patterns list - */ -function buildActivePatternsList(patterns, _options) { - const sorted = sortByPhaseAndName([...patterns]); - const rows = sorted.map((p) => { - const name = getDisplayName(p); - const phase = p.phase !== undefined ? `Phase ${p.phase}` : '-'; - const effort = p.effort ?? '-'; - const summary = extractSummary(p.directive.description, p.patternName); - return [`🚧 ${name}`, phase, effort, summary || '-']; - }); - return [ - heading(2, 'All Active Patterns'), - table(['Pattern', 'Phase', 'Effort', 'Description'], rows), - separator(), - ]; -} -/** - * Build current work detail files (progressive disclosure) - */ -function buildCurrentWorkDetailFiles(dataset, options) { - const files = {}; - // Only create detail files for phases with active patterns - const activePhasesData = dataset.byPhase - .filter((p) => p.counts.active > 0) - .sort((a, b) => a.phaseNumber - b.phaseNumber); - for (const phase of activePhasesData) { - const slug = getPhaseSlug(phase.phaseNumber, phase.phaseName); - files[`current/${slug}.md`] = buildCurrentPhaseDetailDocument(phase, dataset, options); - } - return files; -} -/** - * Build detail document for an active phase - */ -function buildCurrentPhaseDetailDocument(phase, _dataset, options) { - const sections = []; - const { phaseNumber, phaseName, patterns, counts } = phase; - const displayName = phaseName ?? `Phase ${phaseNumber}`; - // Progress summary - const progress = completionPercentage(counts); - const progressBar = renderProgressBar(counts.completed, counts.total, 20); - sections.push(heading(2, 'Progress'), paragraph(`**Progress:** ${progressBar} (${progress}%)`), table(['Status', 'Count'], [ - ['✅ Completed', String(counts.completed)], - ['🚧 Active', String(counts.active)], - ['📋 Planned', String(counts.planned)], - ['**Total**', String(counts.total)], - ]), separator()); - // Active patterns detail - const activePatterns = patterns.filter((p) => isPatternActive(p.status)); - if (activePatterns.length > 0) { - sections.push(heading(2, '🚧 Active Work')); - for (const pattern of sortByPhaseAndName([...activePatterns])) { - sections.push(...buildCurrentWorkPatternDetail(pattern, options)); - } - } - // Recently completed in this phase - const completedPatterns = patterns.filter((p) => isPatternComplete(p.status)); - if (completedPatterns.length > 0) { - sections.push(heading(2, '✅ Recently Completed')); - const rows = sortByPhaseAndName([...completedPatterns]).map((p) => { - const name = getDisplayName(p); - const summary = extractSummary(p.directive.description, p.patternName); - return [`✅ ${name}`, summary || '-']; - }); - sections.push(table(['Pattern', 'Description'], rows)); - sections.push(separator()); - } - // Upcoming in this phase - const plannedPatterns = patterns.filter((p) => isPatternPlanned(p.status)); - if (plannedPatterns.length > 0) { - const plannedContent = []; - const rows = sortByPhaseAndName([...plannedPatterns]).map((p) => { - const name = getDisplayName(p); - const effort = p.effort ?? '-'; - return [`📋 ${name}`, effort]; - }); - plannedContent.push(table(['Pattern', 'Effort'], rows)); - sections.push(collapsible(`📋 Upcoming (${plannedPatterns.length})`, plannedContent)); - sections.push(separator()); - } - // Back link - sections.push(linkOut('← Back to Current Work', '../CURRENT-WORK.md')); - return document(displayName, sections, { - purpose: `Active work details for ${displayName}`, - }); -} -/** - * Build detail section for a single active pattern - */ -function buildCurrentWorkPatternDetail(pattern, options) { - const sections = []; - const name = getDisplayName(pattern); - sections.push(heading(3, `🚧 ${name}`)); - // Metadata table - const metaRows = []; - if (pattern.effort) { - metaRows.push(['Effort', pattern.effort]); - } - if (pattern.quarter) { - metaRows.push(['Quarter', pattern.quarter]); - } - const businessValue = formatBusinessValue(pattern.businessValue); - if (businessValue) { - metaRows.push(['Business Value', businessValue]); - } - if (metaRows.length > 0) { - sections.push(table(['Property', 'Value'], metaRows)); - } - // Description - if (pattern.directive.description) { - sections.push(paragraph(pattern.directive.description)); - } - // Deliverables (if configured) - if (options.includeDeliverables && pattern.deliverables && pattern.deliverables.length > 0) { - const deliverableItems = pattern.deliverables.map((d) => { - const statusEmoji = getDeliverableStatusEmoji(d.status); - const statusText = ` (${d.status})`; - return `${statusEmoji} ${d.name}${statusText}`; - }); - sections.push(heading(4, 'Deliverables'), list(deliverableItems)); - } - // Dependencies - if (pattern.dependsOn && pattern.dependsOn.length > 0) { - sections.push(heading(4, 'Dependencies'), list(pattern.dependsOn.map((d) => `Depends on: ${d}`))); - } - // Use cases - if (pattern.useCases && pattern.useCases.length > 0) { - sections.push(heading(4, 'Use Cases'), list([...pattern.useCases])); - } - // Acceptance Criteria (scenarios with steps, DataTables, DocStrings) - sections.push(...renderAcceptanceCriteria(pattern.scenarios)); - // Business Rules (from Gherkin Rule: keyword) - sections.push(...renderBusinessRulesSection(pattern.rules)); - sections.push(separator()); - return sections; -} -//# sourceMappingURL=timeline.js.map \ No newline at end of file diff --git a/dist/renderable/codecs/timeline.js.map b/dist/renderable/codecs/timeline.js.map deleted file mode 100644 index 27637721..00000000 --- a/dist/renderable/codecs/timeline.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"timeline.js","sourceRoot":"","sources":["../../../src/renderable/codecs/timeline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,mBAAmB,GAGpB,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAGL,OAAO,EACP,SAAS,EACT,SAAS,EACT,KAAK,EACL,IAAI,EACJ,WAAW,EACX,OAAO,EACP,QAAQ,GACT,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,gBAAgB,GACjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EACL,cAAc,EACd,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,sBAAsB,C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AI,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACtD,QAAQ,CAAC,IAAI,CACX,OAAO,CAAC,CAAC,EAAE,cAAc,CAAC,EAC1B,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC,CACvD,CAAC;IACJ,CAAC;IAED,YAAY;IACZ,IAAI,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACpD,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,WAAW,CAAC,EAAE,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IACtE,CAAC;IAED,qEAAqE;IACrE,QAAQ,CAAC,IAAI,CAAC,GAAG,wBAAwB,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC;IAE9D,8CAA8C;IAC9C,QAAQ,CAAC,IAAI,CAAC,GAAG,0BAA0B,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;IAE5D,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;IAE3B,OAAO,QAAQ,CAAC;AAClB,CAAC"} \ No newline at end of file diff --git a/dist/renderable/codecs/types/base.d.ts b/dist/renderable/codecs/types/base.d.ts deleted file mode 100644 index 1acb281e..00000000 --- a/dist/renderable/codecs/types/base.d.ts +++ /dev/null @@ -1,81 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern CodecBaseOptions - * @libar-docs-status completed - * - * ## Base Codec Options - * - * Shared types, interfaces, and utilities for all document codecs. - * Individual codec files define their own specific option types that extend BaseCodecOptions. - * - * ### When to Use - * - * - When creating custom codec options that extend the base - * - When implementing new codecs that need standard configuration - * - When importing shared types like DetailLevel or NormalizedStatusFilter - */ -import type { z } from 'zod'; -import type { NormalizedStatus } from '../../../taxonomy/index.js'; -import type { MasterDatasetSchema } from '../../../validation-schemas/master-dataset.js'; -import type { RenderableDocumentOutputSchema } from '../shared-schema.js'; -/** - * Detail level for progressive disclosure - * - summary: Minimal output, no detail files - * - standard: Default behavior with detail files - * - detailed: Maximum detail, all optional sections included - */ -export type DetailLevel = 'summary' | 'standard' | 'detailed'; -/** - * Normalized status values that match normalizeStatus() output. - * Use this type for filterStatus options to ensure type safety. - * - * @see taxonomy/normalized-status.ts - Single source of truth for normalized values - */ -export type NormalizedStatusFilter = NormalizedStatus; -/** - * Common limits for all codecs - */ -export interface CodecLimits { - /** Maximum recent items to show in summary sections (default: 10) */ - recentItems?: number; - /** Maximum detail files to generate (default: unlimited) */ - maxDetailFiles?: number; - /** Maximum items per section before collapsing (default: varies by codec) */ - collapseThreshold?: number; -} -/** - * Base options shared by all codecs - */ -export interface BaseCodecOptions { - /** Generate additional detail files for progressive disclosure (default: true) */ - generateDetailFiles?: boolean; - /** Level of detail to include (default: "standard") */ - detailLevel?: DetailLevel; - /** Common limits for the codec */ - limits?: CodecLimits; -} -/** - * Default codec limits - */ -export declare const DEFAULT_LIMITS: Required; -/** - * Default base options - */ -export declare const DEFAULT_BASE_OPTIONS: Required; -/** - * Merge user options with defaults - */ -export declare function mergeOptions(defaults: Required, options?: T): Required; -/** - * Type alias for decode-only document codecs. - * - * These codecs transform MasterDataset → RenderableDocument. - * The reverse direction (encode) is not supported and throws at runtime, - * matching Zod's behavior for unidirectional transforms. - * - * @see zod-codecs.md - "encode() throws for unidirectional transforms" - * @see https://zod.dev/codecs - */ -export type DocumentCodec = z.ZodCodec; -//# sourceMappingURL=base.d.ts.map \ No newline at end of file diff --git a/dist/renderable/codecs/types/base.d.ts.map b/dist/renderable/codecs/types/base.d.ts.map deleted file mode 100644 index 8be729f7..00000000 --- a/dist/renderable/codecs/types/base.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"base.d.ts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Aa,GAAG,CAAC,CAAC,QAAQ,CACpC,OAAO,mBAAmB,EAC1B,OAAO,8BAA8B,CACtC,CAAC"} \ No newline at end of file diff --git a/dist/renderable/codecs/types/base.js b/dist/renderable/codecs/types/base.js deleted file mode 100644 index c94ba538..00000000 --- a/dist/renderable/codecs/types/base.js +++ /dev/null @@ -1,56 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern CodecBaseOptions - * @libar-docs-status completed - * - * ## Base Codec Options - * - * Shared types, interfaces, and utilities for all document codecs. - * Individual codec files define their own specific option types that extend BaseCodecOptions. - * - * ### When to Use - * - * - When creating custom codec options that extend the base - * - When implementing new codecs that need standard configuration - * - When importing shared types like DetailLevel or NormalizedStatusFilter - */ -// ═══════════════════════════════════════════════════════════════════════════ -// Default Options -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Default codec limits - */ -export const DEFAULT_LIMITS = { - recentItems: 10, - maxDetailFiles: Number.MAX_SAFE_INTEGER, // Effectively unlimited - collapseThreshold: 5, -}; -/** - * Default base options - */ -export const DEFAULT_BASE_OPTIONS = { - generateDetailFiles: true, - detailLevel: 'standard', - limits: DEFAULT_LIMITS, -}; -// ═══════════════════════════════════════════════════════════════════════════ -// Utility: Merge Options with Defaults -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Merge user options with defaults - */ -export function mergeOptions(defaults, options) { - if (!options) { - return defaults; - } - return { - ...defaults, - ...options, - limits: { - ...defaults.limits, - ...options.limits, - }, - }; -} -//# sourceMappingURL=base.js.map \ No newline at end of file diff --git a/dist/renderable/codecs/types/base.js.map b/dist/renderable/codecs/types/base.js.map deleted file mode 100644 index 19db1054..00000000 --- a/dist/renderable/codecs/types/base.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"base.js","sourceRoot":"","sources":["../../../../src/renderable/codecs/types/base.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAiDH,8EAA8E;AAC9E,kBAAkB;AAClB,8EAA8E;AAE9E;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAA0B;IACnD,WAAW,EAAE,EAAE;IACf,cAAc,EAAE,MAAM,CAAC,gBAAgB,EAAE,wBAAwB;IACjE,iBAAiB,EAAE,CAAC;CACrB,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAA+B;IAC9D,mBAAmB,EAAE,IAAI;IACzB,WAAW,EAAE,UAAU;IACvB,MAAM,EAAE,cAAc;CACvB,CAAC;AAEF,8EAA8E;AAC9E,uCAAuC;AACvC,8EAA8E;AAE9E;;GAEG;AACH,MAAM,UAAU,YAAY,CAC1B,QAAqB,EACrB,OAAW;IAEX,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,OAAO;QACL,GAAG,QAAQ;QACX,GAAG,OAAO;QACV,MAAM,EAAE;YACN,GAAG,QAAQ,CAAC,MAAM;YAClB,GAAG,OAAO,CAAC,MAAM;SAClB;KACa,CAAC;AACnB,CAAC"} \ No newline at end of file diff --git a/dist/renderable/codecs/types/index.d.ts b/dist/renderable/codecs/types/index.d.ts deleted file mode 100644 index bb245b1c..00000000 --- a/dist/renderable/codecs/types/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -/** - * Barrel export for codec base types - */ -export * from './base.js'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/dist/renderable/codecs/types/index.d.ts.map b/dist/renderable/codecs/types/index.d.ts.map deleted file mode 100644 index 32ca6537..00000000 --- a/dist/renderable/codecs/types/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/renderable/codecs/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,WAAW,CAAC"} \ No newline at end of file diff --git a/dist/renderable/codecs/types/index.js b/dist/renderable/codecs/types/index.js deleted file mode 100644 index 96aab500..00000000 --- a/dist/renderable/codecs/types/index.js +++ /dev/null @@ -1,5 +0,0 @@ -/** - * Barrel export for codec base types - */ -export * from './base.js'; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/renderable/codecs/types/index.js.map b/dist/renderable/codecs/types/index.js.map deleted file mode 100644 index d69e341a..00000000 --- a/dist/renderable/codecs/types/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/renderable/codecs/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,WAAW,CAAC"} \ No newline at end of file diff --git a/dist/renderable/codecs/validation-rules.d.ts b/dist/renderable/codecs/validation-rules.d.ts deleted file mode 100644 index 7c214ff9..00000000 --- a/dist/renderable/codecs/validation-rules.d.ts +++ /dev/null @@ -1,4038 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern ValidationRulesCodec - * @libar-docs-status completed - * - * ## Validation Rules Document Codec - * - * Transforms MasterDataset into a RenderableDocument for Process Guard validation - * rules reference. Generates VALIDATION-RULES.md and detail files (validation/*.md). - * - * ### When to Use - * - * - When generating validation rules reference documentation - * - When creating FSM state transition diagrams - * - When building protection level reference files - * - * ### Factory Pattern - * - * Use `createValidationRulesCodec(options)` to create a configured codec: - * ```typescript - * const codec = createValidationRulesCodec({ includeFSMDiagram: false }); - * const doc = codec.decode(dataset); - * ``` - * - * Or use the default export for standard behavior: - * ```typescript - * const doc = ValidationRulesCodec.decode(dataset); - * ``` - */ -import { z } from 'zod'; -import { MasterDatasetSchema } from '../../validation-schemas/master-dataset.js'; -import { type BaseCodecOptions } from './types/base.js'; -import { RenderableDocumentOutputSchema } from './shared-schema.js'; -/** - * Options for ValidationRulesCodec - */ -export interface ValidationRulesCodecOptions extends BaseCodecOptions { - /** Include FSM state diagram (default: true) */ - includeFSMDiagram?: boolean; - /** Include CLI usage section (default: true) */ - includeCLIUsage?: boolean; - /** Include escape hatches section (default: true) */ - includeEscapeHatches?: boolean; - /** Include protection levels matrix (default: true) */ - includeProtectionMatrix?: boolean; -} -/** - * Default options for ValidationRulesCodec - */ -export declare const DEFAULT_VALIDATION_RULES_OPTIONS: Required; -/** - * Create a ValidationRulesCodec with custom options. - * - * @param options - Codec configuration options - * @returns Configured Zod codec - * - * @example - * ```typescript - * // Disable detail files for summary output - * const codec = createValidationRulesCodec({ generateDetailFiles: false }); - * - * // Disable FSM diagram section - * const codec = createValidationRulesCodec({ includeFSMDiagram: false }); - * ``` - */ -export declare function createValidationRulesCodec(options?: ValidationRulesCodecOptions): z.ZodCodec; -/** - * Default ValidationRules Document Codec - * - * Transforms MasterDataset -> RenderableDocument for validation rules reference. - * Uses default options with all features enabled. - * - * @example - * ```typescript - * const doc = ValidationRulesCodec.decode(masterDataset); - * const markdown = renderToMarkdown(doc); - * ``` - */ -export declare const ValidationRulesCodec: z.ZodCodec>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - tagRegistry: z.ZodObject<{ - $schema: z.ZodOptional; - version: z.ZodDefault; - categories: z.ZodArray>>; - }, z.core.$strict>>; - metadataTags: z.ZodArray; - purpose: z.ZodString; - required: z.ZodDefault>; - repeatable: z.ZodDefault>; - values: z.ZodOptional>; - default: z.ZodOptional; - example: z.ZodOptional; - metadataKey: z.ZodOptional; - transform: z.ZodOptional>; - }, z.core.$strict>>; - aggregationTags: z.ZodArray; - purpose: z.ZodString; - }, z.core.$strict>>; - formatOptions: z.ZodDefault>; - tagPrefix: z.ZodDefault; - fileOptInTag: z.ZodDefault; - }, z.core.$strict>; - byStatus: z.ZodObject<{ - completed: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - active: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - planned: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>; - byPhase: z.ZodArray; - patterns: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - counts: z.ZodObject<{ - completed: z.ZodNumber; - active: z.ZodNumber; - planned: z.ZodNumber; - total: z.ZodNumber; - }, z.core.$strip>; - }, z.core.$strip>>; - byQuarter: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byCategory: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - bySource: z.ZodObject<{ - typescript: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - gherkin: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - roadmap: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - prd: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>; - counts: z.ZodObject<{ - completed: z.ZodNumber; - active: z.ZodNumber; - planned: z.ZodNumber; - total: z.ZodNumber; - }, z.core.$strip>; - phaseCount: z.ZodNumber; - categoryCount: z.ZodNumber; - relationshipIndex: z.ZodOptional; - usedBy: z.ZodArray; - dependsOn: z.ZodArray; - enables: z.ZodArray; - implementsPatterns: z.ZodArray; - implementedBy: z.ZodArray; - }, z.core.$strip>>; - extendsPattern: z.ZodOptional; - extendedBy: z.ZodArray; - seeAlso: z.ZodArray; - apiRef: z.ZodArray; - }, z.core.$strip>>>; - archIndex: z.ZodOptional>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byContext: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byLayer: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byView: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - all: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>>; -}, z.core.$strip>, z.ZodObject<{ - title: z.ZodString; - purpose: z.ZodOptional; - detailLevel: z.ZodOptional; - sections: z.ZodArray; - additionalFiles: z.ZodOptional>; -}, z.core.$strip>>; -//# sourceMappingURL=validation-rules.d.ts.map \ No newline at end of file diff --git a/dist/renderable/codecs/validation-rules.d.ts.map b/dist/renderable/codecs/validation-rules.d.ts.map deleted file mode 100644 index 8697aa2f..00000000 --- a/dist/renderable/codecs/validation-rules.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"validation-rules.d.ts","sourceRoot":"","sources":["../../../src/renderable/codecs/validation-rules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,mBAAmB,EAEpB,MAAM,4CAA4C,CAAC;AAapD,OAAO,EAAE,KAAK,gBAAgB,EAAsC,MAAM,iBAAiB,CAAC;AAC5F,OAAO,EAAE,8BAA8B,EAAE,MAAM,oBAAoB,CAAC;AAapE;;GAEG;AACH,MAAM,WAAW,2BAA4B,SAAQ,gBAAgB;IACnE,gDAAgD;IAChD,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B,gDAAgD;IAChD,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B,qDAAqD;IACrD,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B,uDAAuD;IACvD,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACnC;AAED;;GAEG;AACH,eAAO,MAAM,gCAAgC,EAAE,QAAQ,CAAC,2BAA2B,CAMlF,CAAC;AAwEF;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,CAAC,EAAE,2BAA2B,GACpC,CAAC,CAAC,QAAQ,CAAC,OAAO,mBAAmB,EAAE,OAAO,8BAA8B,CAAC,CAe/E;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAA+B,CAAC"} \ No newline at end of file diff --git a/dist/renderable/codecs/validation-rules.js b/dist/renderable/codecs/validation-rules.js deleted file mode 100644 index 99ba3bcf..00000000 --- a/dist/renderable/codecs/validation-rules.js +++ /dev/null @@ -1,492 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern ValidationRulesCodec - * @libar-docs-status completed - * - * ## Validation Rules Document Codec - * - * Transforms MasterDataset into a RenderableDocument for Process Guard validation - * rules reference. Generates VALIDATION-RULES.md and detail files (validation/*.md). - * - * ### When to Use - * - * - When generating validation rules reference documentation - * - When creating FSM state transition diagrams - * - When building protection level reference files - * - * ### Factory Pattern - * - * Use `createValidationRulesCodec(options)` to create a configured codec: - * ```typescript - * const codec = createValidationRulesCodec({ includeFSMDiagram: false }); - * const doc = codec.decode(dataset); - * ``` - * - * Or use the default export for standard behavior: - * ```typescript - * const doc = ValidationRulesCodec.decode(dataset); - * ``` - */ -import { z } from 'zod'; -import { MasterDatasetSchema, } from '../../validation-schemas/master-dataset.js'; -import { heading, paragraph, separator, table, code, mermaid, linkOut, document, } from '../schema.js'; -import { DEFAULT_BASE_OPTIONS, mergeOptions } from './types/base.js'; -import { RenderableDocumentOutputSchema } from './shared-schema.js'; -import { VALID_TRANSITIONS } from '../../validation/fsm/transitions.js'; -import { PROTECTION_LEVELS, } from '../../validation/fsm/states.js'; -/** - * Default options for ValidationRulesCodec - */ -export const DEFAULT_VALIDATION_RULES_OPTIONS = { - ...DEFAULT_BASE_OPTIONS, - includeFSMDiagram: true, - includeCLIUsage: true, - includeEscapeHatches: true, - includeProtectionMatrix: true, -}; -/** - * Process Guard rule definitions for documentation - * - * Centralized definitions ensure consistency between code and docs. - * These match the implementations in src/lint/process-guard/decider.ts - */ -const RULE_DEFINITIONS = [ - { - id: 'completed-protection', - severity: 'error', - description: 'Completed specs require unlock-reason tag to modify', - cause: 'File has `completed` status but no `@libar-docs-unlock-reason` tag', - fix: "Add `@libar-docs-unlock-reason:'your reason'` to proceed", - }, - { - id: 'invalid-status-transition', - severity: 'error', - description: 'Status transitions must follow FSM path', - cause: 'Attempted transition not in VALID_TRANSITIONS matrix', - fix: 'Follow path: roadmap -> active -> completed', - }, - { - id: 'scope-creep', - severity: 'error', - description: 'Active specs cannot add new deliverables', - cause: 'Added deliverable to spec with `active` status', - fix: 'Create new spec OR revert to `roadmap` status first', - }, - { - id: 'session-scope', - severity: 'warning', - description: 'File outside session scope', - cause: "Modified file not in session's scopedSpecs list", - fix: 'Add to session scope OR use `--ignore-session` flag', - }, - { - id: 'session-excluded', - severity: 'error', - description: 'File explicitly excluded from session', - cause: "File in session's excludedSpecs list", - fix: 'Remove from exclusion OR use different session', - }, - { - id: 'deliverable-removed', - severity: 'warning', - description: 'Deliverable was removed from spec', - cause: 'Deliverable removed from Background table', - fix: 'Document reason for removal (completed or descoped)', - }, -]; -// ═══════════════════════════════════════════════════════════════════════════ -// ValidationRules Document Codec -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Create a ValidationRulesCodec with custom options. - * - * @param options - Codec configuration options - * @returns Configured Zod codec - * - * @example - * ```typescript - * // Disable detail files for summary output - * const codec = createValidationRulesCodec({ generateDetailFiles: false }); - * - * // Disable FSM diagram section - * const codec = createValidationRulesCodec({ includeFSMDiagram: false }); - * ``` - */ -export function createValidationRulesCodec(options) { - const opts = mergeOptions(DEFAULT_VALIDATION_RULES_OPTIONS, options); - return z.codec(MasterDatasetSchema, RenderableDocumentOutputSchema, { - // TODO: The _dataset parameter is unused because this codec builds from constants. - // Kept for interface consistency with other codecs that do use dataset. - // Future enhancement: derive validation rules from dataset if rules become dynamic. - decode: (_dataset) => { - return buildValidationRulesDocument(opts); - }, - /** @throws Always - this codec is decode-only. See zod-codecs.md */ - encode: () => { - throw new Error('ValidationRulesCodec is decode-only. See zod-codecs.md'); - }, - }); -} -/** - * Default ValidationRules Document Codec - * - * Transforms MasterDataset -> RenderableDocument for validation rules reference. - * Uses default options with all features enabled. - * - * @example - * ```typescript - * const doc = ValidationRulesCodec.decode(masterDataset); - * const markdown = renderToMarkdown(doc); - * ``` - */ -export const ValidationRulesCodec = createValidationRulesCodec(); -// ═══════════════════════════════════════════════════════════════════════════ -// Document Builder -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Build the validation rules document - */ -function buildValidationRulesDocument(options) { - const sections = []; - // 1. Overview section (always included) - sections.push(...buildOverviewSection()); - // 2. Validation rules table (always included) - sections.push(...buildRulesTableSection(options)); - // 3. FSM diagram (if enabled) - if (options.includeFSMDiagram) { - sections.push(...buildFSMDiagramSection(options)); - } - // 4. Protection matrix (if enabled) - if (options.includeProtectionMatrix) { - sections.push(...buildProtectionMatrixSection(options)); - } - // 5. CLI usage (if enabled) - if (options.includeCLIUsage) { - sections.push(...buildCLISection()); - } - // 6. Escape hatches (if enabled) - if (options.includeEscapeHatches) { - sections.push(...buildEscapeHatchesSection()); - } - // Build additional files for progressive disclosure (if enabled) - const additionalFiles = options.generateDetailFiles ? buildDetailFiles() : {}; - const docOpts = { - purpose: 'Process Guard validation rules and FSM reference', - detailLevel: options.generateDetailFiles ? 'Overview with links to details' : 'Compact summary', - }; - if (Object.keys(additionalFiles).length > 0) { - docOpts.additionalFiles = additionalFiles; - } - return document('Validation Rules', sections, docOpts); -} -// ═══════════════════════════════════════════════════════════════════════════ -// Section Builders -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Build overview section explaining Process Guard - */ -function buildOverviewSection() { - const ruleCount = RULE_DEFINITIONS.length; - const stateCount = Object.keys(VALID_TRANSITIONS).length; - const protectionLevelCount = new Set(Object.values(PROTECTION_LEVELS)).size; - return [ - heading(2, 'Overview'), - paragraph('Process Guard validates delivery workflow changes at commit time using a ' + - 'Decider pattern. It enforces the 4-state FSM defined in PDR-005 and ' + - 'prevents common workflow violations.'), - paragraph(`**${ruleCount} validation rules** | **${stateCount} FSM states** | **${protectionLevelCount} protection levels**`), - separator(), - ]; -} -/** - * Build validation rules table section - */ -function buildRulesTableSection(options) { - const rows = RULE_DEFINITIONS.map((rule) => [`\`${rule.id}\``, rule.severity, rule.description]); - const sections = [ - heading(2, 'Validation Rules'), - paragraph('Rules are checked in order. Errors block commit; warnings are informational.'), - table(['Rule ID', 'Severity', 'Description'], rows), - ]; - if (options.generateDetailFiles) { - sections.push(linkOut('Full error catalog with fix instructions', 'validation/error-catalog.md')); - } - sections.push(separator()); - return sections; -} -/** - * Build FSM state diagram section from VALID_TRANSITIONS - */ -function buildFSMDiagramSection(options) { - // Generate Mermaid diagram from VALID_TRANSITIONS constant - const lines = ['stateDiagram-v2']; - lines.push(' [*] --> roadmap: new pattern'); - // Add transitions from the constant - for (const [from, targets] of Object.entries(VALID_TRANSITIONS)) { - for (const to of targets) { - if (from !== to) { - // Skip self-transitions in diagram for clarity - // Add labels for notable transitions - if (from === 'active' && to === 'roadmap') { - lines.push(` ${from} --> ${to}: blocked/regressed`); - } - else { - lines.push(` ${from} --> ${to}`); - } - } - } - } - lines.push(' completed --> [*]: terminal'); - const sections = [ - heading(2, 'FSM State Diagram'), - paragraph('Valid transitions per PDR-005 MVP Workflow:'), - mermaid(lines.join('\n')), - paragraph('**Valid Transitions:**\n' + - '- `roadmap` -> `active` -> `completed` (normal flow)\n' + - '- `active` -> `roadmap` (blocked/regressed)\n' + - '- `roadmap` <-> `deferred` (parking)'), - ]; - if (options.generateDetailFiles) { - sections.push(linkOut('Detailed transition matrix', 'validation/fsm-transitions.md')); - } - sections.push(separator()); - return sections; -} -/** - * Build protection levels matrix section - */ -function buildProtectionMatrixSection(options) { - const rows = Object.entries(PROTECTION_LEVELS).map(([status, level]) => { - const canAdd = level === 'none' ? 'Yes' : 'No'; - const needsUnlock = level === 'hard' ? 'Yes' : 'No'; - return [`\`${status}\``, level, canAdd, needsUnlock]; - }); - const sections = [ - heading(2, 'Protection Levels'), - paragraph('Protection levels determine what modifications are allowed per status.'), - table(['Status', 'Protection', 'Can Add Deliverables', 'Needs Unlock'], rows), - ]; - if (options.generateDetailFiles) { - sections.push(linkOut('Protection level details', 'validation/protection-levels.md')); - } - sections.push(separator()); - return sections; -} -/** - * Build CLI usage section - */ -function buildCLISection() { - const cliCode = `# Pre-commit (default mode) -lint-process --staged - -# CI pipeline with strict mode -lint-process --all --strict - -# Override session scope checking -lint-process --staged --ignore-session - -# Debug: show derived process state -lint-process --staged --show-state`; - return [ - heading(2, 'CLI Usage'), - code(cliCode, 'bash'), - heading(3, 'Options'), - table(['Flag', 'Description'], [ - ['`--staged`', 'Validate staged files only (pre-commit)'], - ['`--all`', 'Validate all tracked files (CI)'], - ['`--strict`', 'Treat warnings as errors (exit 1)'], - ['`--ignore-session`', 'Skip session scope validation'], - ['`--show-state`', 'Debug: show derived process state'], - ['`--format json`', 'Machine-readable JSON output'], - ]), - heading(3, 'Exit Codes'), - table(['Code', 'Meaning'], [ - ['`0`', 'No errors (warnings allowed unless `--strict`)'], - ['`1`', 'Errors found or warnings with `--strict`'], - ]), - separator(), - ]; -} -/** - * Build escape hatches section - */ -function buildEscapeHatchesSection() { - return [ - heading(2, 'Escape Hatches'), - paragraph('Override mechanisms for exceptional situations.'), - table(['Situation', 'Solution', 'Example'], [ - [ - 'Fix bug in completed spec', - 'Add unlock reason tag', - "`@libar-docs-unlock-reason:'Fix-typo'`", - ], - [ - 'Modify outside session scope', - 'Use ignore flag', - '`lint-process --staged --ignore-session`', - ], - ['CI treats warnings as errors', 'Use strict flag', '`lint-process --all --strict`'], - ]), - separator(), - ]; -} -// ═══════════════════════════════════════════════════════════════════════════ -// Additional Detail Files (Progressive Disclosure) -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Build additional validation detail files - */ -function buildDetailFiles() { - const files = {}; - // validation/fsm-transitions.md - Full transition matrix with descriptions - files['validation/fsm-transitions.md'] = buildFSMTransitionsDetailDocument(); - // validation/error-catalog.md - Full error messages with causes/fixes - files['validation/error-catalog.md'] = buildErrorCatalogDetailDocument(); - // validation/protection-levels.md - Detailed protection explanations - files['validation/protection-levels.md'] = buildProtectionLevelsDetailDocument(); - return files; -} -/** - * Get a description for a specific transition - */ -function getTransitionDescription(from, to) { - const descriptions = { - 'roadmap-active': 'Start implementation work', - 'roadmap-deferred': 'Park work for later', - 'roadmap-roadmap': 'Stay in planning (self-transition)', - 'active-completed': 'Finish implementation', - 'active-roadmap': 'Regress due to blocker or scope change', - 'deferred-roadmap': 'Reactivate deferred work', - }; - return descriptions[`${from}-${to}`] ?? 'Standard transition'; -} -/** - * Build FSM transitions detail document - */ -function buildFSMTransitionsDetailDocument() { - const sections = []; - sections.push(heading(2, 'FSM Transition Matrix'), paragraph('Complete transition matrix showing all valid state changes per PDR-005.')); - // Full table with all transitions - const allRows = []; - for (const [from, targets] of Object.entries(VALID_TRANSITIONS)) { - if (targets.length === 0) { - allRows.push([`\`${from}\``, '(none)', 'Terminal state - no valid transitions']); - } - else { - for (const to of targets) { - allRows.push([`\`${from}\``, `\`${to}\``, getTransitionDescription(from, to)]); - } - } - } - sections.push(table(['From', 'To', 'Description'], allRows)); - // Per-state breakdown - sections.push(heading(2, 'Transitions by State')); - for (const [from, targets] of Object.entries(VALID_TRANSITIONS)) { - sections.push(heading(3, `From \`${from}\``)); - if (targets.length === 0) { - sections.push(paragraph(`**Terminal state** - no valid transitions. Use \`@libar-docs-unlock-reason\` to modify.`)); - } - else { - const rows = targets.map((to) => [ - `\`${to}\``, - getTransitionDescription(from, to), - ]); - sections.push(table(['Target', 'Description'], rows)); - } - } - // Back link - sections.push(separator(), linkOut('Back to Validation Rules', '../VALIDATION-RULES.md')); - return document('FSM Transitions', sections, { - purpose: 'Complete state transition reference for Process Guard FSM', - }); -} -/** - * Build error catalog detail document - */ -function buildErrorCatalogDetailDocument() { - const sections = []; - sections.push(heading(2, 'Error Catalog'), paragraph(`Complete error messages and fix instructions for all ${RULE_DEFINITIONS.length} validation rules.`)); - // Summary table - const summaryRows = RULE_DEFINITIONS.map((rule) => [ - `\`${rule.id}\``, - rule.severity, - rule.description, - ]); - sections.push(table(['Rule ID', 'Severity', 'Description'], summaryRows)); - // Detailed breakdown per rule - sections.push(heading(2, 'Rule Details')); - for (const rule of RULE_DEFINITIONS) { - sections.push(heading(3, `\`${rule.id}\``), table(['Property', 'Value'], [ - ['Severity', rule.severity], - ['Description', rule.description], - ['Cause', rule.cause], - ['Fix', rule.fix], - ])); - } - // Back link - sections.push(separator(), linkOut('Back to Validation Rules', '../VALIDATION-RULES.md')); - return document('Error Catalog', sections, { - purpose: 'Complete error message reference with fix instructions', - }); -} -/** - * Build protection levels detail document - */ -function buildProtectionLevelsDetailDocument() { - const sections = []; - sections.push(heading(2, 'Protection Levels'), paragraph('Detailed explanation of protection levels per PDR-005 MVP Workflow.')); - // Derive statuses per protection level from PROTECTION_LEVELS (single source of truth) - const statusesByLevel = new Map(); - for (const [status, level] of Object.entries(PROTECTION_LEVELS)) { - const existing = statusesByLevel.get(level) ?? []; - existing.push(status); - statusesByLevel.set(level, existing); - } - // Protection level descriptions (meaning, allowed, blocked are static documentation) - const protectionDescriptions = { - none: { - meaning: 'Fully editable, no restrictions', - allowed: 'All modifications including adding new deliverables', - blocked: 'Nothing', - }, - scope: { - meaning: 'Scope-locked, prevents adding new deliverables', - allowed: 'Edit existing deliverables, change status', - blocked: 'Adding new deliverables (scope creep)', - }, - hard: { - meaning: 'Hard-locked, requires explicit unlock to modify', - allowed: 'Nothing (without unlock-reason tag)', - blocked: 'All modifications', - }, - }; - // Combine derived statuses with static descriptions - const protectionDetails = ['none', 'scope', 'hard'].map((level) => ({ - level, - statuses: statusesByLevel.get(level) ?? [], - ...protectionDescriptions[level], - })); - // Summary table - const summaryRows = protectionDetails.map((detail) => [ - `\`${detail.level}\``, - detail.statuses.map((s) => `\`${s}\``).join(', '), - detail.meaning, - ]); - sections.push(table(['Level', 'Applies To', 'Meaning'], summaryRows)); - // Detailed breakdown - sections.push(heading(2, 'Level Details')); - for (const detail of protectionDetails) { - sections.push(heading(3, `\`${detail.level}\` Protection`), paragraph(`**Applies to:** ${detail.statuses.map((s) => `\`${s}\``).join(', ')}`), table(['Aspect', 'Description'], [ - ['Meaning', detail.meaning], - ['Allowed', detail.allowed], - ['Blocked', detail.blocked], - ])); - } - // Back link - sections.push(separator(), linkOut('Back to Validation Rules', '../VALIDATION-RULES.md')); - return document('Protection Levels', sections, { - purpose: 'Detailed protection level reference per PDR-005', - }); -} -//# sourceMappingURL=validation-rules.js.map \ No newline at end of file diff --git a/dist/renderable/codecs/validation-rules.js.map b/dist/renderable/codecs/validation-rules.js.map deleted file mode 100644 index f9fceffd..00000000 --- a/dist/renderable/codecs/validation-rules.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"validation-rules.js","sourceRoot":"","sources":["../../../src/renderable/codecs/validation-rules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,mBAAmB,GAEpB,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAGL,OAAO,EACP,SAAS,EACT,SAAS,EACT,KAAK,EACL,IAAI,EACJ,OAAO,EACP,OAAO,EACP,QAAQ,GACT,MAAM,cAAc,CAAC;AACtB,OAAO,EAAyB,oBAAoB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC5F,OAAO,EAAE,8BAA8B,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EACL,iBAAiB,GAGlB,MAAM,gCAAgC,CAAC;AAwBxC;;GAEG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAA0C;IACrF,GAAG,oBAAoB;IACvB,iBAAiB,EAAE,IAAI;IACvB,eAAe,EAAE,IAAI;IACrB,oBAAoB,EAAE,IAAI;IAC1B,uBAAuB,EAAE,IAAI;CAC9B,CAAC;AAiBF;;;;;GAKG;AACH,MAAM,gBAAgB,GAA8B;IAClD;QACE,EAAE,EAAE,sBAAsB;QAC1B,QAAQ,EAAE,OAAO;QACjB,WAAW,EAAE,qDAAqD;QAClE,KAAK,EAAE,oEAAoE;QAC3E,GAAG,EAAE,0DAA0D;KAChE;IACD;QACE,EAAE,EAAE,2BAA2B;QAC/B,QAAQ,EAAE,OAAO;QACjB,WAAW,EAAE,yCAAyC;QACtD,KAAK,EA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C,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;QACjD,MAAM,CAAC,OAAO;KACf,CAAC,CAAC;IACH,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,YAAY,EAAE,SAAS,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC;IAEtE,qBAAqB;IACrB,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC;IAE3C,KAAK,MAAM,MAAM,IAAI,iBAAiB,EAAE,CAAC;QACvC,QAAQ,CAAC,IAAI,CACX,OAAO,CAAC,CAAC,EAAE,KAAK,MAAM,CAAC,KAAK,eAAe,CAAC,EAC5C,SAAS,CAAC,mBAAmB,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,EACjF,KAAK,CACH,CAAC,QAAQ,EAAE,aAAa,CAAC,EACzB;YACE,CAAC,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC;YAC3B,CAAC,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC;YAC3B,CAAC,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC;SAC5B,CACF,CACF,CAAC;IACJ,CAAC;IAED,YAAY;IACZ,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,OAAO,CAAC,0BAA0B,EAAE,wBAAwB,CAAC,CAAC,CAAC;IAE1F,OAAO,QAAQ,CAAC,mBAAmB,EAAE,QAAQ,EAAE;QAC7C,OAAO,EAAE,iDAAiD;KAC3D,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/dist/renderable/generate.d.ts b/dist/renderable/generate.d.ts deleted file mode 100644 index 8f4a01dc..00000000 --- a/dist/renderable/generate.d.ts +++ /dev/null @@ -1,328 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern DocumentGenerator - * @libar-docs-status completed - * @libar-docs-arch-role service - * @libar-docs-arch-context renderer - * @libar-docs-arch-layer application - * - * ## Document Generation - * - * Simplified document generation using codecs. - * Replaces the complex BuiltInGenerator + SectionRegistry pattern. - * - * ### When to Use - * - * - When generating specific document types from MasterDataset - * - When needing high-level generation API without direct codec usage - * - When building custom documentation workflows - * - * Flow: MasterDataset → Codec → RenderableDocument → Renderer → Markdown - */ -import type { MasterDataset } from '../validation-schemas/master-dataset.js'; -import { type OutputFile } from './render.js'; -import { Result } from '../types/result.js'; -import type { PatternsCodecOptions, RoadmapCodecOptions, CompletedMilestonesCodecOptions, CurrentWorkCodecOptions, RequirementsCodecOptions, SessionCodecOptions, RemainingWorkCodecOptions, PrChangesCodecOptions, AdrCodecOptions, PlanningChecklistCodecOptions, SessionPlanCodecOptions, SessionFindingsCodecOptions, ChangelogCodecOptions, TraceabilityCodecOptions, OverviewCodecOptions, BusinessRulesCodecOptions, ArchitectureCodecOptions, TaxonomyCodecOptions, ValidationRulesCodecOptions } from './codecs/index.js'; -import type { DocumentCodec, BaseCodecOptions } from './codecs/types/base.js'; -/** - * Available document types and their output paths - */ -export declare const DOCUMENT_TYPES: { - readonly patterns: { - readonly outputPath: "PATTERNS.md"; - readonly description: "Pattern registry with category details"; - }; - readonly roadmap: { - readonly outputPath: "ROADMAP.md"; - readonly description: "Development roadmap by phase"; - }; - readonly milestones: { - readonly outputPath: "COMPLETED-MILESTONES.md"; - readonly description: "Historical completed milestones"; - }; - readonly current: { - readonly outputPath: "CURRENT-WORK.md"; - readonly description: "Active development work in progress"; - }; - readonly requirements: { - readonly outputPath: "PRODUCT-REQUIREMENTS.md"; - readonly description: "Product requirements by area/role"; - }; - readonly session: { - readonly outputPath: "SESSION-CONTEXT.md"; - readonly description: "Current session context and focus"; - }; - readonly remaining: { - readonly outputPath: "REMAINING-WORK.md"; - readonly description: "Aggregate view of incomplete work"; - }; - readonly 'pr-changes': { - readonly outputPath: "working/PR-CHANGES.md"; - readonly description: "PR-scoped changes for review"; - }; - readonly adrs: { - readonly outputPath: "DECISIONS.md"; - readonly description: "Architecture Decision Records"; - }; - readonly 'planning-checklist': { - readonly outputPath: "PLANNING-CHECKLIST.md"; - readonly description: "Pre-planning questions and Definition of Done"; - }; - readonly 'session-plan': { - readonly outputPath: "SESSION-PLAN.md"; - readonly description: "Implementation plans for phases"; - }; - readonly 'session-findings': { - readonly outputPath: "SESSION-FINDINGS.md"; - readonly description: "Retrospective discoveries for roadmap refinement"; - }; - readonly changelog: { - readonly outputPath: "CHANGELOG-GENERATED.md"; - readonly description: "Keep a Changelog format changelog"; - }; - readonly traceability: { - readonly outputPath: "TRACEABILITY.md"; - readonly description: "Timeline to behavior file coverage"; - }; - readonly overview: { - readonly outputPath: "OVERVIEW.md"; - readonly description: "Project architecture overview"; - }; - readonly 'business-rules': { - readonly outputPath: "BUSINESS-RULES.md"; - readonly description: "Business rules and invariants by domain"; - }; - readonly architecture: { - readonly outputPath: "ARCHITECTURE.md"; - readonly description: "Architecture diagrams (component and layered views)"; - }; - readonly taxonomy: { - readonly outputPath: "TAXONOMY.md"; - readonly description: "Tag taxonomy configuration reference"; - }; - readonly 'validation-rules': { - readonly outputPath: "VALIDATION-RULES.md"; - readonly description: "Process Guard validation rules reference"; - }; -}; -export type DocumentType = keyof typeof DOCUMENT_TYPES; -/** - * Union type for all codec-specific options. - * Used to pass runtime options (e.g., changedFiles for PR changes) through - * the CLI → Orchestrator → Generator → Codec pipeline. - * - * Each document type can optionally have its own options. - * If options are provided for a document type, the factory function is used - * instead of the default codec instance. - * - * @example - * ```typescript - * const options: CodecOptions = { - * "pr-changes": { changedFiles: ["src/foo.ts"], releaseFilter: "v0.2.0" } - * }; - * generateDocument("pr-changes", dataset, options); - * ``` - */ -export interface CodecOptions { - patterns?: PatternsCodecOptions; - roadmap?: RoadmapCodecOptions; - milestones?: CompletedMilestonesCodecOptions; - current?: CurrentWorkCodecOptions; - requirements?: RequirementsCodecOptions; - session?: SessionCodecOptions; - remaining?: RemainingWorkCodecOptions; - 'pr-changes'?: PrChangesCodecOptions; - adrs?: AdrCodecOptions; - 'planning-checklist'?: PlanningChecklistCodecOptions; - 'session-plan'?: SessionPlanCodecOptions; - 'session-findings'?: SessionFindingsCodecOptions; - changelog?: ChangelogCodecOptions; - traceability?: TraceabilityCodecOptions; - overview?: OverviewCodecOptions; - 'business-rules'?: BusinessRulesCodecOptions; - architecture?: ArchitectureCodecOptions; - taxonomy?: TaxonomyCodecOptions; - 'validation-rules'?: ValidationRulesCodecOptions; -} -/** - * Factory function type for creating codecs with options. - */ -type CodecFactory = (opts?: BaseCodecOptions) => DocumentCodec; -/** - * Registry for document codecs providing a single source of truth. - * - * The CodecRegistry centralizes codec and factory registration, eliminating - * the need to manually synchronize CODEC_MAP and CODEC_FACTORY_MAP. - * - * @example - * ```typescript - * // Register a codec and its factory - * CodecRegistry.register('patterns', PatternsDocumentCodec); - * CodecRegistry.registerFactory('patterns', createPatternsCodec); - * - * // Retrieve codec or factory - * const codec = CodecRegistry.get('patterns'); - * const factory = CodecRegistry.getFactory('patterns'); - * ``` - */ -export declare const CodecRegistry: { - /** - * Register a default codec for a document type. - * - * @param type - The document type to register - * @param codec - The codec instance to use - */ - readonly register: (type: DocumentType, codec: DocumentCodec) => void; - /** - * Register a factory function for a document type. - * - * Factory functions are used when codec options are provided, - * allowing customization of codec behavior at runtime. - * - * @param type - The document type to register - * @param factory - The factory function to create codecs with options - */ - readonly registerFactory: (type: DocumentType, factory: CodecFactory) => void; - /** - * Get the default codec for a document type. - * - * @param type - The document type to retrieve - * @returns The codec instance, or undefined if not registered - */ - readonly get: (type: DocumentType) => DocumentCodec | undefined; - /** - * Get the factory function for a document type. - * - * @param type - The document type to retrieve - * @returns The factory function, or undefined if not registered - */ - readonly getFactory: (type: DocumentType) => CodecFactory | undefined; - /** - * Check if a codec is registered for a document type. - * - * @param type - The document type to check - * @returns True if a codec is registered - */ - readonly has: (type: DocumentType) => boolean; - /** - * Check if a factory is registered for a document type. - * - * @param type - The document type to check - * @returns True if a factory is registered - */ - readonly hasFactory: (type: DocumentType) => boolean; - /** - * Get all registered document types. - * - * @returns Array of registered document types - */ - readonly getRegisteredTypes: () => DocumentType[]; - /** - * Clear all registrations (useful for testing). - */ - readonly clear: () => void; -}; -/** - * Error that occurred during document generation. - * - * Provides structured information about what went wrong during the - * codec decode or render phase. - */ -export interface GenerationError { - /** The document type that failed to generate */ - documentType: DocumentType; - /** Error message describing what went wrong */ - message: string; - /** The original error (if available) */ - cause?: Error | undefined; - /** Phase where the error occurred */ - phase: 'decode' | 'render'; -} -/** - * Generate a single document type with Result-based error handling. - * - * This function wraps codec.decode() and renderDocumentWithFiles() in try/catch, - * returning a Result type instead of throwing exceptions. Use this when you need - * explicit error handling without try/catch at the call site. - * - * @param type - Document type to generate - * @param dataset - MasterDataset with pattern data - * @param options - Optional codec-specific options - * @returns Result containing OutputFile[] on success, or GenerationError on failure - * - * @example - * ```typescript - * const result = generateDocumentSafe("patterns", masterDataset); - * if (Result.isOk(result)) { - * for (const file of result.value) { - * fs.writeFileSync(file.path, file.content); - * } - * } else { - * console.error(`Failed to generate ${result.error.documentType}: ${result.error.message}`); - * } - * ``` - */ -export declare function generateDocumentSafe(type: DocumentType, dataset: MasterDataset, options?: CodecOptions): Result; -/** - * Generate a single document type - * - * @param type - Document type to generate - * @param dataset - MasterDataset with pattern data - * @param options - Optional codec-specific options (e.g., changedFiles for PR changes) - * @returns Array of output files (main + additional for progressive disclosure) - * - * When options are provided for the requested document type, the factory function - * is used to create a codec with custom configuration. Otherwise, the default - * codec instance is used. - * - * **Error Handling:** This function may throw if codec.decode() or rendering fails. - * For explicit error handling without exceptions, use `generateDocumentSafe()` which - * returns a Result type instead. - * - * @example - * ```typescript - * // Without options (uses default codec) - * const files = generateDocument("patterns", masterDataset); - * - * // With options (uses factory function) - * const files = generateDocument("pr-changes", masterDataset, { - * "pr-changes": { changedFiles: ["src/foo.ts"], releaseFilter: "v0.2.0" } - * }); - * ``` - */ -export declare function generateDocument(type: DocumentType, dataset: MasterDataset, options?: CodecOptions): OutputFile[]; -/** - * Generate multiple document types - * - * @param types - Document types to generate - * @param dataset - MasterDataset with pattern data - * @param options - Optional codec-specific options - * @returns Array of all output files - */ -export declare function generateDocuments(types: DocumentType[], dataset: MasterDataset, options?: CodecOptions): OutputFile[]; -/** - * Generate all document types - * - * @param dataset - MasterDataset with pattern data - * @param options - Optional codec-specific options - * @returns Array of all output files - */ -export declare function generateAllDocuments(dataset: MasterDataset, options?: CodecOptions): OutputFile[]; -/** - * Get available document types - */ -export declare function getAvailableDocumentTypes(): DocumentType[]; -/** - * Check if a string is a valid document type - */ -export declare function isValidDocumentType(type: string): type is DocumentType; -/** - * Get document type info - */ -export declare function getDocumentTypeInfo(type: DocumentType): { - outputPath: string; - description: string; -}; -export {}; -//# sourceMappingURL=generate.d.ts.map \ No newline at end of file diff --git a/dist/renderable/generate.d.ts.map b/dist/renderable/generate.d.ts.map deleted file mode 100644 index 69cb101c..00000000 --- a/dist/renderable/generate.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../src/renderable/generate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAE7E,OAAO,EAA2B,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAiD5C,OAAO,KAAK,EACV,oBAAoB,EACpB,mBAAmB,EACnB,+BAA+B,EAC/B,uBAAuB,EACvB,wBAAwB,EACxB,mBAAmB,EACnB,yBAAyB,EACzB,qBAAqB,EACrB,eAAe,EACf,6BAA6B,EAC7B,uBAAuB,EACvB,2BAA2B,EAC3B,qBAAqB,EACrB,wBAAwB,EACxB,oBAAoB,EACpB,yBAAyB,EACzB,wBAAwB,EACxB,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,CAAC,OAAO,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,UAAU,EAAE,CAGjG;AAMD;;GAEG;AACH,wBAAgB,yBAAyB,IAAI,YAAY,EAAE,CAE1D;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,YAAY,CAEtE;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,YAAY,GAAG;IACvD,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACrB,CAEA"} \ No newline at end of file diff --git a/dist/renderable/generate.js b/dist/renderable/generate.js deleted file mode 100644 index c1a6aed1..00000000 --- a/dist/renderable/generate.js +++ /dev/null @@ -1,420 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern DocumentGenerator - * @libar-docs-status completed - * @libar-docs-arch-role service - * @libar-docs-arch-context renderer - * @libar-docs-arch-layer application - * - * ## Document Generation - * - * Simplified document generation using codecs. - * Replaces the complex BuiltInGenerator + SectionRegistry pattern. - * - * ### When to Use - * - * - When generating specific document types from MasterDataset - * - When needing high-level generation API without direct codec usage - * - When building custom documentation workflows - * - * Flow: MasterDataset → Codec → RenderableDocument → Renderer → Markdown - */ -import { renderDocumentWithFiles } from './render.js'; -import { Result } from '../types/result.js'; -// Default codec instances -import { PatternsDocumentCodec, RoadmapDocumentCodec, CompletedMilestonesCodec, CurrentWorkCodec, RequirementsDocumentCodec, SessionContextCodec, RemainingWorkCodec, PrChangesCodec, AdrDocumentCodec, PlanningChecklistCodec, SessionPlanCodec, SessionFindingsCodec, ChangelogCodec, TraceabilityCodec, OverviewCodec, BusinessRulesCodec, ArchitectureDocumentCodec, TaxonomyDocumentCodec, ValidationRulesCodec, } from './codecs/index.js'; -// Factory functions for creating codecs with options -import { createPatternsCodec, createRoadmapCodec, createMilestonesCodec, createCurrentWorkCodec, createRequirementsCodec, createSessionContextCodec, createRemainingWorkCodec, createPrChangesCodec, createAdrCodec, createPlanningChecklistCodec, createSessionPlanCodec, createSessionFindingsCodec, createChangelogCodec, createTraceabilityCodec, createOverviewCodec, createBusinessRulesCodec, createArchitectureCodec, createTaxonomyCodec, createValidationRulesCodec, } from './codecs/index.js'; -// ═══════════════════════════════════════════════════════════════════════════ -// Document Types -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Available document types and their output paths - */ -export const DOCUMENT_TYPES = { - patterns: { - outputPath: 'PATTERNS.md', - description: 'Pattern registry with category details', - }, - roadmap: { - outputPath: 'ROADMAP.md', - description: 'Development roadmap by phase', - }, - milestones: { - outputPath: 'COMPLETED-MILESTONES.md', - description: 'Historical completed milestones', - }, - current: { - outputPath: 'CURRENT-WORK.md', - description: 'Active development work in progress', - }, - requirements: { - outputPath: 'PRODUCT-REQUIREMENTS.md', - description: 'Product requirements by area/role', - }, - session: { - outputPath: 'SESSION-CONTEXT.md', - description: 'Current session context and focus', - }, - remaining: { - outputPath: 'REMAINING-WORK.md', - description: 'Aggregate view of incomplete work', - }, - 'pr-changes': { - outputPath: 'working/PR-CHANGES.md', - description: 'PR-scoped changes for review', - }, - adrs: { - outputPath: 'DECISIONS.md', - description: 'Architecture Decision Records', - }, - 'planning-checklist': { - outputPath: 'PLANNING-CHECKLIST.md', - description: 'Pre-planning questions and Definition of Done', - }, - 'session-plan': { - outputPath: 'SESSION-PLAN.md', - description: 'Implementation plans for phases', - }, - 'session-findings': { - outputPath: 'SESSION-FINDINGS.md', - description: 'Retrospective discoveries for roadmap refinement', - }, - changelog: { - outputPath: 'CHANGELOG-GENERATED.md', - description: 'Keep a Changelog format changelog', - }, - traceability: { - outputPath: 'TRACEABILITY.md', - description: 'Timeline to behavior file coverage', - }, - overview: { - outputPath: 'OVERVIEW.md', - description: 'Project architecture overview', - }, - 'business-rules': { - outputPath: 'BUSINESS-RULES.md', - description: 'Business rules and invariants by domain', - }, - architecture: { - outputPath: 'ARCHITECTURE.md', - description: 'Architecture diagrams (component and layered views)', - }, - taxonomy: { - outputPath: 'TAXONOMY.md', - description: 'Tag taxonomy configuration reference', - }, - 'validation-rules': { - outputPath: 'VALIDATION-RULES.md', - description: 'Process Guard validation rules reference', - }, -}; -// Private storage for the CodecRegistry -const _codecStore = new Map(); -const _factoryStore = new Map(); -/** - * Registry for document codecs providing a single source of truth. - * - * The CodecRegistry centralizes codec and factory registration, eliminating - * the need to manually synchronize CODEC_MAP and CODEC_FACTORY_MAP. - * - * @example - * ```typescript - * // Register a codec and its factory - * CodecRegistry.register('patterns', PatternsDocumentCodec); - * CodecRegistry.registerFactory('patterns', createPatternsCodec); - * - * // Retrieve codec or factory - * const codec = CodecRegistry.get('patterns'); - * const factory = CodecRegistry.getFactory('patterns'); - * ``` - */ -export const CodecRegistry = { - /** - * Register a default codec for a document type. - * - * @param type - The document type to register - * @param codec - The codec instance to use - */ - register(type, codec) { - _codecStore.set(type, codec); - }, - /** - * Register a factory function for a document type. - * - * Factory functions are used when codec options are provided, - * allowing customization of codec behavior at runtime. - * - * @param type - The document type to register - * @param factory - The factory function to create codecs with options - */ - registerFactory(type, factory) { - _factoryStore.set(type, factory); - }, - /** - * Get the default codec for a document type. - * - * @param type - The document type to retrieve - * @returns The codec instance, or undefined if not registered - */ - get(type) { - return _codecStore.get(type); - }, - /** - * Get the factory function for a document type. - * - * @param type - The document type to retrieve - * @returns The factory function, or undefined if not registered - */ - getFactory(type) { - return _factoryStore.get(type); - }, - /** - * Check if a codec is registered for a document type. - * - * @param type - The document type to check - * @returns True if a codec is registered - */ - has(type) { - return _codecStore.has(type); - }, - /** - * Check if a factory is registered for a document type. - * - * @param type - The document type to check - * @returns True if a factory is registered - */ - hasFactory(type) { - return _factoryStore.has(type); - }, - /** - * Get all registered document types. - * - * @returns Array of registered document types - */ - getRegisteredTypes() { - return Array.from(_codecStore.keys()); - }, - /** - * Clear all registrations (useful for testing). - */ - clear() { - _codecStore.clear(); - _factoryStore.clear(); - }, -}; -// ═══════════════════════════════════════════════════════════════════════════ -// Registry Initialization -// ═══════════════════════════════════════════════════════════════════════════ -// Register all default codecs -CodecRegistry.register('patterns', PatternsDocumentCodec); -CodecRegistry.register('roadmap', RoadmapDocumentCodec); -CodecRegistry.register('milestones', CompletedMilestonesCodec); -CodecRegistry.register('current', CurrentWorkCodec); -CodecRegistry.register('requirements', RequirementsDocumentCodec); -CodecRegistry.register('session', SessionContextCodec); -CodecRegistry.register('remaining', RemainingWorkCodec); -CodecRegistry.register('pr-changes', PrChangesCodec); -CodecRegistry.register('adrs', AdrDocumentCodec); -CodecRegistry.register('planning-checklist', PlanningChecklistCodec); -CodecRegistry.register('session-plan', SessionPlanCodec); -CodecRegistry.register('session-findings', SessionFindingsCodec); -CodecRegistry.register('changelog', ChangelogCodec); -CodecRegistry.register('traceability', TraceabilityCodec); -CodecRegistry.register('overview', OverviewCodec); -CodecRegistry.register('business-rules', BusinessRulesCodec); -CodecRegistry.register('architecture', ArchitectureDocumentCodec); -CodecRegistry.register('taxonomy', TaxonomyDocumentCodec); -CodecRegistry.register('validation-rules', ValidationRulesCodec); -// Register all factory functions (used when codec options are provided) -CodecRegistry.registerFactory('patterns', createPatternsCodec); -CodecRegistry.registerFactory('roadmap', createRoadmapCodec); -CodecRegistry.registerFactory('milestones', createMilestonesCodec); -CodecRegistry.registerFactory('current', createCurrentWorkCodec); -CodecRegistry.registerFactory('requirements', createRequirementsCodec); -CodecRegistry.registerFactory('session', createSessionContextCodec); -CodecRegistry.registerFactory('remaining', createRemainingWorkCodec); -CodecRegistry.registerFactory('pr-changes', createPrChangesCodec); -CodecRegistry.registerFactory('adrs', createAdrCodec); -CodecRegistry.registerFactory('planning-checklist', createPlanningChecklistCodec); -CodecRegistry.registerFactory('session-plan', createSessionPlanCodec); -CodecRegistry.registerFactory('session-findings', createSessionFindingsCodec); -CodecRegistry.registerFactory('changelog', createChangelogCodec); -CodecRegistry.registerFactory('traceability', createTraceabilityCodec); -CodecRegistry.registerFactory('overview', createOverviewCodec); -CodecRegistry.registerFactory('business-rules', createBusinessRulesCodec); -CodecRegistry.registerFactory('architecture', createArchitectureCodec); -CodecRegistry.registerFactory('taxonomy', createTaxonomyCodec); -CodecRegistry.registerFactory('validation-rules', createValidationRulesCodec); -// ═══════════════════════════════════════════════════════════════════════════ -// Generation Functions -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Generate a single document type with Result-based error handling. - * - * This function wraps codec.decode() and renderDocumentWithFiles() in try/catch, - * returning a Result type instead of throwing exceptions. Use this when you need - * explicit error handling without try/catch at the call site. - * - * @param type - Document type to generate - * @param dataset - MasterDataset with pattern data - * @param options - Optional codec-specific options - * @returns Result containing OutputFile[] on success, or GenerationError on failure - * - * @example - * ```typescript - * const result = generateDocumentSafe("patterns", masterDataset); - * if (Result.isOk(result)) { - * for (const file of result.value) { - * fs.writeFileSync(file.path, file.content); - * } - * } else { - * console.error(`Failed to generate ${result.error.documentType}: ${result.error.message}`); - * } - * ``` - */ -export function generateDocumentSafe(type, dataset, options) { - const outputPath = DOCUMENT_TYPES[type].outputPath; - // Get options for this specific document type - const typeOptions = options?.[type]; - // Use factory function if options provided, otherwise use default codec - let codec; - if (typeOptions !== undefined) { - const factory = CodecRegistry.getFactory(type); - if (factory !== undefined) { - codec = factory(typeOptions); - } - } - codec ??= CodecRegistry.get(type); - if (codec === undefined) { - return Result.err({ - documentType: type, - message: `No codec registered for document type: ${type}`, - phase: 'decode', - }); - } - // Decode: MasterDataset → RenderableDocument (with error handling) - let doc; - try { - doc = codec.decode(dataset); - } - catch (err) { - return Result.err({ - documentType: type, - message: err instanceof Error ? err.message : String(err), - cause: err instanceof Error ? err : undefined, - phase: 'decode', - }); - } - // Render: RenderableDocument → OutputFile[] (with error handling) - try { - const files = renderDocumentWithFiles(doc, outputPath); - return Result.ok(files); - } - catch (err) { - return Result.err({ - documentType: type, - message: err instanceof Error ? err.message : String(err), - cause: err instanceof Error ? err : undefined, - phase: 'render', - }); - } -} -/** - * Generate a single document type - * - * @param type - Document type to generate - * @param dataset - MasterDataset with pattern data - * @param options - Optional codec-specific options (e.g., changedFiles for PR changes) - * @returns Array of output files (main + additional for progressive disclosure) - * - * When options are provided for the requested document type, the factory function - * is used to create a codec with custom configuration. Otherwise, the default - * codec instance is used. - * - * **Error Handling:** This function may throw if codec.decode() or rendering fails. - * For explicit error handling without exceptions, use `generateDocumentSafe()` which - * returns a Result type instead. - * - * @example - * ```typescript - * // Without options (uses default codec) - * const files = generateDocument("patterns", masterDataset); - * - * // With options (uses factory function) - * const files = generateDocument("pr-changes", masterDataset, { - * "pr-changes": { changedFiles: ["src/foo.ts"], releaseFilter: "v0.2.0" } - * }); - * ``` - */ -export function generateDocument(type, dataset, options) { - const outputPath = DOCUMENT_TYPES[type].outputPath; - // Get options for this specific document type - const typeOptions = options?.[type]; - // Use factory function if options provided, otherwise use default codec - let codec; - if (typeOptions !== undefined) { - const factory = CodecRegistry.getFactory(type); - if (factory !== undefined) { - codec = factory(typeOptions); - } - } - codec ??= CodecRegistry.get(type); - if (codec === undefined) { - throw new Error(`No codec registered for document type: ${type}`); - } - // Decode: MasterDataset → RenderableDocument - const doc = codec.decode(dataset); - // Render: RenderableDocument → OutputFile[] - return renderDocumentWithFiles(doc, outputPath); -} -/** - * Generate multiple document types - * - * @param types - Document types to generate - * @param dataset - MasterDataset with pattern data - * @param options - Optional codec-specific options - * @returns Array of all output files - */ -export function generateDocuments(types, dataset, options) { - const allFiles = []; - for (const type of types) { - const files = generateDocument(type, dataset, options); - allFiles.push(...files); - } - return allFiles; -} -/** - * Generate all document types - * - * @param dataset - MasterDataset with pattern data - * @param options - Optional codec-specific options - * @returns Array of all output files - */ -export function generateAllDocuments(dataset, options) { - const types = Object.keys(DOCUMENT_TYPES); - return generateDocuments(types, dataset, options); -} -// ═══════════════════════════════════════════════════════════════════════════ -// Utility Functions -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Get available document types - */ -export function getAvailableDocumentTypes() { - return Object.keys(DOCUMENT_TYPES); -} -/** - * Check if a string is a valid document type - */ -export function isValidDocumentType(type) { - return type in DOCUMENT_TYPES; -} -/** - * Get document type info - */ -export function getDocumentTypeInfo(type) { - return DOCUMENT_TYPES[type]; -} -//# sourceMappingURL=generate.js.map \ No newline at end of file diff --git a/dist/renderable/generate.js.map b/dist/renderable/generate.js.map deleted file mode 100644 index 38f5f7c8..00000000 --- a/dist/renderable/generate.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../src/renderable/generate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAIH,OAAO,EAAE,uBAAuB,EAAmB,MAAM,aAAa,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,0BAA0B;AAC1B,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,wBAAwB,EACxB,gBAAgB,EAChB,yBAAyB,EACzB,mBAAmB,EACnB,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,sBAAsB,EACtB,gBAAgB,EAChB,oBAAoB,EACpB,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,kBAAkB,EAClB,yBAAyB,EACzB,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,mBAAmB,CAAC;AAE3B,qDAAqD;AACrD,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,qBAAqB,EACrB,sBAAsB,EACtB,uBAAuB,EACvB,yBAAyB,EACzB,wBAAwB,EACxB,oBAAoB,EACpB,cAAc,EACd,4BAA4B,EAC5B,sBAAsB,EACtB,0BAA0B,EAC1B,oBAAoB,EACpB,uBAAuB,EACvB,mBAAmB,EACnB,wBAAwB,EACxB,uBAAuB,EACvB,mBAAmB,EACnB,0BAA0B,GAC3B,MAAM,mBAAmB,CAAC;AA4B3B,8EAA8E;AAC9E,iBAAiB;AACjB,8EAA8E;AAE9E;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,QAAQ,EAAE;QACR,UAAU,EAAE,a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"} \ No newline at end of file diff --git a/dist/renderable/index.d.ts b/dist/renderable/index.d.ts deleted file mode 100644 index 20b298de..00000000 --- a/dist/renderable/index.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern RenderableDocumentModel(RDM) - * @libar-docs-status completed - * - * ## Renderable Document Model (RDM) - * - * Unified document generation using codecs and a universal renderer. - * - * ### When to Use - * - * - When importing RDM types, schemas, or block builders - * - When using codecs for document transformation - * - When rendering RenderableDocuments to markdown - * - * Architecture: - * ``` - * MasterDataset → Document Codecs → RenderableDocument → Universal Renderer → Markdown - * ``` - * - * Key Exports: - * - Schema: `RenderableDocument`, `SectionBlock`, block builders - * - Codecs: `PatternsDocumentCodec`, `TimelineCodec`, etc. - * - Renderer: `renderToMarkdown`, `renderDocumentWithFiles` - * - Generation: `generateDocument`, `generateAllDocuments` - */ -export { RenderableDocumentSchema, HeadingBlockSchema, ParagraphBlockSchema, SeparatorBlockSchema, TableBlockSchema, ListBlockSchema, CodeBlockSchema, MermaidBlockSchema, CollapsibleBlockSchema, LinkOutBlockSchema, SectionBlockSchema, type RenderableDocument, type HeadingBlock, type ParagraphBlock, type SeparatorBlock, type TableBlock, type ListBlock, type CodeBlock, type MermaidBlock, type CollapsibleBlock, type LinkOutBlock, type SectionBlock, type ListItem, heading, paragraph, separator, table, list, code, mermaid, collapsible, linkOut, document, } from './schema.js'; -export { renderToMarkdown, renderDocumentWithFiles, type OutputFile } from './render.js'; -export { PatternsDocumentCodec, RoadmapDocumentCodec, CompletedMilestonesCodec, RequirementsDocumentCodec, SessionContextCodec, RemainingWorkCodec, } from './codecs/index.js'; -export { generateDocument, generateDocuments, generateAllDocuments, getAvailableDocumentTypes, isValidDocumentType, getDocumentTypeInfo, DOCUMENT_TYPES, type DocumentType, } from './generate.js'; -export { normalizeStatus } from '../taxonomy/index.js'; -export { getStatusEmoji, getDisplayName, formatCategoryName, extractSummary, computeStatusCounts, completionPercentage, renderProgressBar, sortByPhaseAndName, sortByStatusAndName, formatBusinessValue, } from './utils.js'; -export { groupBy } from '../utils/index.js'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/dist/renderable/index.d.ts.map b/dist/renderable/index.d.ts.map deleted file mode 100644 index d7cbfde8..00000000 --- a/dist/renderable/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/renderable/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAMH,OAAO,EAEL,wBAAwB,EACxB,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,sBAAsB,EACtB,kBAAkB,EAClB,kBAAkB,EAElB,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,QAAQ,EAEb,OAAO,EACP,SAAS,EACT,SAAS,EACT,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,WAAW,EACX,OAAO,EACP,QAAQ,GACT,MAAM,aAAa,CAAC;AAMrB,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAMzF,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,wBAAwB,EACxB,yBAAyB,EACzB,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,mBAAmB,CAAC;AAM3B,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACpB,yBAAyB,EACzB,mBAAmB,EACnB,mBAAmB,EACnB,cAAc,EACd,KAAK,YAAY,GAClB,MAAM,eAAe,CAAC;AAMvB,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EACL,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC"} \ No newline at end of file diff --git a/dist/renderable/index.js b/dist/renderable/index.js deleted file mode 100644 index 6843e7b3..00000000 --- a/dist/renderable/index.js +++ /dev/null @@ -1,54 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern RenderableDocumentModel(RDM) - * @libar-docs-status completed - * - * ## Renderable Document Model (RDM) - * - * Unified document generation using codecs and a universal renderer. - * - * ### When to Use - * - * - When importing RDM types, schemas, or block builders - * - When using codecs for document transformation - * - When rendering RenderableDocuments to markdown - * - * Architecture: - * ``` - * MasterDataset → Document Codecs → RenderableDocument → Universal Renderer → Markdown - * ``` - * - * Key Exports: - * - Schema: `RenderableDocument`, `SectionBlock`, block builders - * - Codecs: `PatternsDocumentCodec`, `TimelineCodec`, etc. - * - Renderer: `renderToMarkdown`, `renderDocumentWithFiles` - * - Generation: `generateDocument`, `generateAllDocuments` - */ -// ═══════════════════════════════════════════════════════════════════════════ -// Schema Exports -// ═══════════════════════════════════════════════════════════════════════════ -export { -// Schemas -RenderableDocumentSchema, HeadingBlockSchema, ParagraphBlockSchema, SeparatorBlockSchema, TableBlockSchema, ListBlockSchema, CodeBlockSchema, MermaidBlockSchema, CollapsibleBlockSchema, LinkOutBlockSchema, SectionBlockSchema, -// Builders -heading, paragraph, separator, table, list, code, mermaid, collapsible, linkOut, document, } from './schema.js'; -// ═══════════════════════════════════════════════════════════════════════════ -// Renderer Exports -// ═══════════════════════════════════════════════════════════════════════════ -export { renderToMarkdown, renderDocumentWithFiles } from './render.js'; -// ═══════════════════════════════════════════════════════════════════════════ -// Codec Exports -// ═══════════════════════════════════════════════════════════════════════════ -export { PatternsDocumentCodec, RoadmapDocumentCodec, CompletedMilestonesCodec, RequirementsDocumentCodec, SessionContextCodec, RemainingWorkCodec, } from './codecs/index.js'; -// ═══════════════════════════════════════════════════════════════════════════ -// Generation Exports -// ═══════════════════════════════════════════════════════════════════════════ -export { generateDocument, generateDocuments, generateAllDocuments, getAvailableDocumentTypes, isValidDocumentType, getDocumentTypeInfo, DOCUMENT_TYPES, } from './generate.js'; -// ═══════════════════════════════════════════════════════════════════════════ -// Utility Exports -// ═══════════════════════════════════════════════════════════════════════════ -export { normalizeStatus } from '../taxonomy/index.js'; -export { getStatusEmoji, getDisplayName, formatCategoryName, extractSummary, computeStatusCounts, completionPercentage, renderProgressBar, sortByPhaseAndName, sortByStatusAndName, formatBusinessValue, } from './utils.js'; -export { groupBy } from '../utils/index.js'; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/renderable/index.js.map b/dist/renderable/index.js.map deleted file mode 100644 index f0b96ba4..00000000 --- a/dist/renderable/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/renderable/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,8EAA8E;AAC9E,iBAAiB;AACjB,8EAA8E;AAE9E,OAAO;AACL,UAAU;AACV,wBAAwB,EACxB,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,sBAAsB,EACtB,kBAAkB,EAClB,kBAAkB;AAclB,WAAW;AACX,OAAO,EACP,SAAS,EACT,SAAS,EACT,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,WAAW,EACX,OAAO,EACP,QAAQ,GACT,MAAM,aAAa,CAAC;AAErB,8EAA8E;AAC9E,mBAAmB;AACnB,8EAA8E;AAE9E,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAmB,MAAM,aAAa,CAAC;AAEzF,8EAA8E;AAC9E,gBAAgB;AAChB,8EAA8E;AAE9E,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,wBAAwB,EACxB,yBAAyB,EACzB,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,mBAAmB,CAAC;AAE3B,8EAA8E;AAC9E,qBAAqB;AACrB,8EAA8E;AAE9E,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACpB,yBAAyB,EACzB,mBAAmB,EACnB,mBAAmB,EACnB,cAAc,GAEf,MAAM,eAAe,CAAC;AAEvB,8EAA8E;AAC9E,kBAAkB;AAClB,8EAA8E;AAE9E,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EACL,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC"} \ No newline at end of file diff --git a/dist/renderable/render.d.ts b/dist/renderable/render.d.ts deleted file mode 100644 index 9653a7d5..00000000 --- a/dist/renderable/render.d.ts +++ /dev/null @@ -1,61 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern UniversalRenderer - * @libar-docs-status completed - * @libar-docs-arch-role service - * @libar-docs-arch-context renderer - * @libar-docs-arch-layer application - * - * ## Universal Renderer - * - * Converts RenderableDocument to output strings. Two renderers: - * - `renderToMarkdown` — Full markdown for human documentation - * - `renderToClaudeContext` — Token-efficient format for LLM consumption - * - * Both are "dumb printers" — they know nothing about patterns, phases, - * or domain concepts. All logic lives in the codecs; these just render blocks. - * - * ### When to Use - * - * - `renderToMarkdown` for human-readable docs (`docs/` output) - * - `renderToClaudeContext` for AI context (`_claude-md/` output) - * - `renderDocumentWithFiles` for multi-file output with detail files - */ -import type { RenderableDocument } from './schema.js'; -/** - * Render a RenderableDocument to markdown string. - * - * @param doc - The document to render - * @returns Markdown string - */ -export declare function renderToMarkdown(doc: RenderableDocument): string; -/** - * Render a RenderableDocument to token-efficient text for LLM consumption. - * - * Uses `=== SECTION ===` markers instead of markdown headers, omits - * mermaid diagrams (LLMs cannot render them), flattens collapsible blocks, - * and strips link-out URLs. Produces ~20-40% fewer tokens than markdown - * for the same document. - * - * @param doc - The document to render - * @returns Token-efficient string for AI context - */ -export declare function renderToClaudeContext(doc: RenderableDocument): string; -/** - * Output file descriptor - */ -export interface OutputFile { - path: string; - content: string; -} -/** - * Render a document and all its additional files. - * - * @param doc - The document to render - * @param basePath - Base path for the main document - * @param renderer - Render function to use (defaults to renderToMarkdown) - * @returns Array of output files - */ -export declare function renderDocumentWithFiles(doc: RenderableDocument, basePath: string, renderer?: (d: RenderableDocument) => string): OutputFile[]; -//# sourceMappingURL=render.d.ts.map \ No newline at end of file diff --git a/dist/renderable/render.d.ts.map b/dist/renderable/render.d.ts.map deleted file mode 100644 index 4b6dca79..00000000 --- a/dist/renderable/render.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../src/renderable/render.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EACV,kBAAkB,EAMnB,MAAM,aAAa,CAAC;AAyBrB;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,kBAAkB,GAAG,MAAM,CAwBhE;AAwDD;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,kBAAkB,GAAG,MAAM,CAwBrE;AAsMD;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,kBAAkB,EACvB,QAAQ,EAAE,MAAM,EAChB,QAAQ,GAAE,CAAC,CAAC,EAAE,kBAAkB,KAAK,MAAyB,GAC7D,UAAU,EAAE,CAoBd"} \ No newline at end of file diff --git a/dist/renderable/render.js b/dist/renderable/render.js deleted file mode 100644 index 1f6d1b0e..00000000 --- a/dist/renderable/render.js +++ /dev/null @@ -1,330 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern UniversalRenderer - * @libar-docs-status completed - * @libar-docs-arch-role service - * @libar-docs-arch-context renderer - * @libar-docs-arch-layer application - * - * ## Universal Renderer - * - * Converts RenderableDocument to output strings. Two renderers: - * - `renderToMarkdown` — Full markdown for human documentation - * - `renderToClaudeContext` — Token-efficient format for LLM consumption - * - * Both are "dumb printers" — they know nothing about patterns, phases, - * or domain concepts. All logic lives in the codecs; these just render blocks. - * - * ### When to Use - * - * - `renderToMarkdown` for human-readable docs (`docs/` output) - * - `renderToClaudeContext` for AI context (`_claude-md/` output) - * - `renderDocumentWithFiles` for multi-file output with detail files - */ -// ═══════════════════════════════════════════════════════════════════════════ -// Escape Utilities -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Escape HTML entities to prevent injection in generated docs. - */ -function escapeHtml(text) { - return text.replace(/&/g, '&').replace(//g, '>'); -} -/** - * Escape pipe characters and newlines for markdown table cells. - * Newlines are converted to
for proper rendering. - */ -function escapeTableCell(cell) { - return cell.replace(/\|/g, '\\|').replace(/\n/g, '
'); -} -// ═══════════════════════════════════════════════════════════════════════════ -// Main Render Function -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Render a RenderableDocument to markdown string. - * - * @param doc - The document to render - * @returns Markdown string - */ -export function renderToMarkdown(doc) { - const lines = []; - // Title (H1) - lines.push(`# ${doc.title}`, ''); - // Frontmatter (purpose, detail level as plain text) - if (doc.purpose || doc.detailLevel) { - if (doc.purpose) { - lines.push(`**Purpose:** ${doc.purpose}`); - } - if (doc.detailLevel) { - lines.push(`**Detail Level:** ${doc.detailLevel}`); - } - lines.push('', '---', ''); - } - // Sections - for (const block of doc.sections) { - lines.push(...renderBlock(block)); - } - // Ensure single trailing newline - return lines.join('\n').trimEnd() + '\n'; -} -// ═══════════════════════════════════════════════════════════════════════════ -// Block Renderer -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Render a single block to markdown lines. - */ -function renderBlock(block) { - switch (block.type) { - case 'heading': { - // Clamp heading level to valid markdown range (1-6) - const level = Math.max(1, Math.min(6, block.level)); - return [`${'#'.repeat(level)} ${block.text}`, '']; - } - case 'paragraph': - return [block.text, '']; - case 'separator': - return ['---', '']; - case 'table': - return renderTable(block); - case 'list': - return renderList(block); - case 'code': { - // Use 4+ backtick fences when content contains triple backticks - const fence = block.content.includes('```') ? '````' : '```'; - return [`${fence}${block.language ?? ''}`, block.content, fence, '']; - } - case 'mermaid': - return ['\`\`\`mermaid', block.content, '\`\`\`', '']; - case 'collapsible': - return renderCollapsible(block); - case 'link-out': - // URL-encode path for links with spaces or special characters - return [`[${block.text}](${encodeURI(block.path)})`, '']; - default: - // Type-safe exhaustive check - const _exhaustive = block; - return [``]; - } -} -// ═══════════════════════════════════════════════════════════════════════════ -// Claude Context Renderer -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Render a RenderableDocument to token-efficient text for LLM consumption. - * - * Uses `=== SECTION ===` markers instead of markdown headers, omits - * mermaid diagrams (LLMs cannot render them), flattens collapsible blocks, - * and strips link-out URLs. Produces ~20-40% fewer tokens than markdown - * for the same document. - * - * @param doc - The document to render - * @returns Token-efficient string for AI context - */ -export function renderToClaudeContext(doc) { - const lines = []; - // Title as top-level marker - lines.push(`=== ${doc.title.toUpperCase()} ===`, ''); - // Frontmatter as plain lines (no bold markers, no separator) - if (doc.purpose) { - lines.push(`Purpose: ${doc.purpose}`); - } - if (doc.detailLevel) { - lines.push(`Detail Level: ${doc.detailLevel}`); - } - if (doc.purpose || doc.detailLevel) { - lines.push(''); - } - // Sections - for (const block of doc.sections) { - lines.push(...renderBlockClaudeContext(block)); - } - // Ensure single trailing newline - return lines.join('\n').trimEnd() + '\n'; -} -/** - * Render a single block to token-efficient lines for LLM consumption. - */ -function renderBlockClaudeContext(block) { - switch (block.type) { - case 'heading': { - const text = block.text; - // Top-level headings (1-2) use === MARKERS ===, sub-headings use --- markers --- - if (block.level <= 2) { - return [`=== ${text.toUpperCase()} ===`, '']; - } - return [`--- ${text} ---`, '']; - } - case 'paragraph': - return [block.text, '']; - case 'separator': - // Omit horizontal rules — just a blank line saves tokens - return ['']; - case 'table': - // Tables are already compact in pipe-delimited format - return renderTable(block); - case 'list': - // Lists are already compact - return renderList(block); - case 'code': - // Preserve code blocks — LLMs need syntax context - return [`\`\`\`${block.language ?? ''}`, block.content, '\`\`\`', '']; - case 'mermaid': - // Omit mermaid diagrams — LLMs cannot render visual diagrams - return []; - case 'collapsible': - // Flatten: render inner blocks directly without
wrapper - return renderCollapsibleClaudeContext(block); - case 'link-out': - // Plain text reference without URL (LLMs can't follow file links) - return [`-> ${block.text}`, '']; - default: { - // Type-safe exhaustive check - const _exhaustive = block; - return [`[Unknown block type: ${JSON.stringify(_exhaustive)}]`]; - } - } -} -/** - * Flatten a collapsible block — render inner blocks directly. - */ -function renderCollapsibleClaudeContext(block) { - const lines = []; - // Render summary as a sub-heading marker - lines.push(`--- ${block.summary} ---`, ''); - // Render nested content directly - for (const contentBlock of block.content) { - lines.push(...renderBlockClaudeContext(contentBlock)); - } - return lines; -} -// ═══════════════════════════════════════════════════════════════════════════ -// Table Renderer -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Render a table block to markdown. - */ -function renderTable(block) { - if (block.columns.length === 0) { - return []; - } - const lines = []; - // Header row - escape pipes and newlines in column names - const escapedColumns = block.columns.map(escapeTableCell); - lines.push(`| ${escapedColumns.join(' | ')} |`); - // Separator row with alignment - const separators = block.columns.map((_, i) => { - const align = block.alignment?.[i] ?? 'left'; - switch (align) { - case 'center': - return ':---:'; - case 'right': - return '---:'; - default: - return '---'; - } - }); - lines.push(`| ${separators.join(' | ')} |`); - // Data rows - for (const row of block.rows) { - // Pad row to match columns if needed - const paddedRow = [...row]; - while (paddedRow.length < block.columns.length) { - paddedRow.push(''); - } - // Escape pipe characters and newlines in cell content - const escapedRow = paddedRow.map(escapeTableCell); - lines.push(`| ${escapedRow.join(' | ')} |`); - } - lines.push(''); - return lines; -} -// ═══════════════════════════════════════════════════════════════════════════ -// List Renderer -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Render a list block to markdown. - */ -function renderList(block) { - const lines = []; - for (let i = 0; i < block.items.length; i++) { - const item = block.items[i]; - if (item === undefined) - continue; - const prefix = block.ordered ? `${i + 1}.` : '-'; - lines.push(...renderListItem(item, prefix, 0)); - } - lines.push(''); - return lines; -} -/** - * Render a single list item, handling nested items. - */ -function renderListItem(item, prefix, indent) { - const lines = []; - const indentStr = ' '.repeat(indent); - if (typeof item === 'string') { - lines.push(`${indentStr}${prefix} ${item}`); - } - else { - // Structured item with optional checkbox - const checkbox = item.checked !== undefined ? (item.checked ? '[x] ' : '[ ] ') : ''; - lines.push(`${indentStr}${prefix} ${checkbox}${item.text}`); - // Render children - if (item.children) { - for (let i = 0; i < item.children.length; i++) { - const child = item.children[i]; - const childPrefix = /^\d/.exec(prefix) !== null ? `${i + 1}.` : '-'; - lines.push(...renderListItem(child, childPrefix, indent + 1)); - } - } - } - return lines; -} -// ═══════════════════════════════════════════════════════════════════════════ -// Collapsible Renderer -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Render a collapsible block using HTML details/summary. - */ -function renderCollapsible(block) { - const lines = []; - lines.push('
'); - // Escape HTML entities in summary to prevent injection - lines.push(`${escapeHtml(block.summary)}`); - lines.push(''); - // Render nested content - for (const contentBlock of block.content) { - lines.push(...renderBlock(contentBlock)); - } - lines.push('
'); - lines.push(''); - return lines; -} -/** - * Render a document and all its additional files. - * - * @param doc - The document to render - * @param basePath - Base path for the main document - * @param renderer - Render function to use (defaults to renderToMarkdown) - * @returns Array of output files - */ -export function renderDocumentWithFiles(doc, basePath, renderer = renderToMarkdown) { - const files = []; - // Main document - files.push({ - path: basePath, - content: renderer(doc), - }); - // Additional files (progressive disclosure) - if (doc.additionalFiles) { - for (const [relativePath, subDoc] of Object.entries(doc.additionalFiles)) { - files.push({ - path: relativePath, - content: renderer(subDoc), - }); - } - } - return files; -} -//# sourceMappingURL=render.js.map \ No newline at end of file diff --git a/dist/renderable/render.js.map b/dist/renderable/render.js.map deleted file mode 100644 index d98c005a..00000000 --- a/dist/renderable/render.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"render.js","sourceRoot":"","sources":["../../src/renderable/render.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAWH,8EAA8E;AAC9E,mBAAmB;AACnB,8EAA8E;AAE9E;;GAEG;AACH,SAAS,UAAU,CAAC,IAAY;IAC9B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AACjF,CAAC;AAED;;;GAGG;AACH,SAAS,eAAe,CAAC,IAAY;IACnC,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AAC3D,CAAC;AAED,8EAA8E;AAC9E,uBAAuB;AACvB,8EAA8E;AAE9E;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,GAAuB;IACtD,MAAM,KAAK,GAAa,EAAE,CAAC;IAE3B,aAAa;IACb,KAAK,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;IAEjC,oDAAoD;IACpD,IAAI,GAAG,CAAC,OAAO,IAAI,GAAG,CAAC,WAAW,EAAE,CAAC;QACnC,IAAI,GAAG,CAAC,OAAO,EAAE,CAAC;YAChB,KAAK,CAAC,IAA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ChB,WAA8C,gBAAgB;IAE9D,MAAM,KAAK,GAAiB,EAAE,CAAC;IAE/B,gBAAgB;IAChB,KAAK,CAAC,IAAI,CAAC;QACT,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,QAAQ,CAAC,GAAG,CAAC;KACvB,CAAC,CAAC;IAEH,4CAA4C;IAC5C,IAAI,GAAG,CAAC,eAAe,EAAE,CAAC;QACxB,KAAK,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,EAAE,CAAC;YACzE,KAAK,CAAC,IAAI,CAAC;gBACT,IAAI,EAAE,YAAY;gBAClB,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC;aAC1B,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"} \ No newline at end of file diff --git a/dist/renderable/schema.d.ts b/dist/renderable/schema.d.ts deleted file mode 100644 index 8b3fd46f..00000000 --- a/dist/renderable/schema.d.ts +++ /dev/null @@ -1,191 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern RenderableDocument - * @libar-docs-status completed - * @libar-docs-extract-shapes RenderableDocument, SectionBlock, HeadingBlock, TableBlock, ListBlock, CodeBlock, MermaidBlock, CollapsibleBlock - * @libar-docs-arch-role read-model - * @libar-docs-arch-context renderer - * @libar-docs-arch-layer domain - * - * ## RenderableDocument Schema - * - * Universal intermediate format for all generated documentation. - * Document codecs transform MasterDataset into this format, - * then the universal renderer converts it to markdown. - * - * ### When to Use - * - * - When building documents using block builder functions - * - When validating RenderableDocument structures - * - When creating custom codecs that produce document output - * - * ### Block Vocabulary (9 types) - * - * - Structural: heading, paragraph, separator - * - Content: table, list, code, mermaid - * - Progressive: collapsible, link-out - */ -import { z } from 'zod'; -/** Heading block - markdown headers */ -export declare const HeadingBlockSchema: z.ZodObject<{ - type: z.ZodLiteral<"heading">; - level: z.ZodNumber; - text: z.ZodString; -}, z.core.$strip>; -/** Paragraph block - plain text content */ -export declare const ParagraphBlockSchema: z.ZodObject<{ - type: z.ZodLiteral<"paragraph">; - text: z.ZodString; -}, z.core.$strip>; -/** Separator block - horizontal rule */ -export declare const SeparatorBlockSchema: z.ZodObject<{ - type: z.ZodLiteral<"separator">; -}, z.core.$strip>; -/** Table block - markdown tables */ -export declare const TableBlockSchema: z.ZodObject<{ - type: z.ZodLiteral<"table">; - columns: z.ZodArray; - rows: z.ZodArray>; - alignment: z.ZodOptional>>; -}, z.core.$strip>; -/** List item - can be string or structured with checkbox */ -export declare const ListItemSchema: z.ZodUnion; - children: z.ZodOptional>>>>; -}, z.core.$strip>]>; -/** List block - ordered/unordered/checkbox lists */ -export declare const ListBlockSchema: z.ZodObject<{ - type: z.ZodLiteral<"list">; - ordered: z.ZodDefault; - items: z.ZodArray; - children: z.ZodOptional>>>>; - }, z.core.$strip>]>>; -}, z.core.$strip>; -/** Code block - fenced code with language */ -export declare const CodeBlockSchema: z.ZodObject<{ - type: z.ZodLiteral<"code">; - language: z.ZodOptional; - content: z.ZodString; -}, z.core.$strip>; -/** Mermaid block - diagrams */ -export declare const MermaidBlockSchema: z.ZodObject<{ - type: z.ZodLiteral<"mermaid">; - content: z.ZodString; -}, z.core.$strip>; -/** Collapsible block - details/summary for progressive disclosure */ -export declare const CollapsibleBlockSchema: z.ZodType; -/** Link-out block - reference to external file */ -export declare const LinkOutBlockSchema: z.ZodObject<{ - type: z.ZodLiteral<"link-out">; - text: z.ZodString; - path: z.ZodString; -}, z.core.$strip>; -/** - * All block types that can appear in a document section. - * Uses discriminated union on `type` field for type-safe switching. - */ -export declare const SectionBlockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ - type: z.ZodLiteral<"heading">; - level: z.ZodNumber; - text: z.ZodString; -}, z.core.$strip>, z.ZodObject<{ - type: z.ZodLiteral<"paragraph">; - text: z.ZodString; -}, z.core.$strip>, z.ZodObject<{ - type: z.ZodLiteral<"separator">; -}, z.core.$strip>, z.ZodObject<{ - type: z.ZodLiteral<"table">; - columns: z.ZodArray; - rows: z.ZodArray>; - alignment: z.ZodOptional>>; -}, z.core.$strip>, z.ZodObject<{ - type: z.ZodLiteral<"list">; - ordered: z.ZodDefault; - items: z.ZodArray; - children: z.ZodOptional>>>>; - }, z.core.$strip>]>>; -}, z.core.$strip>, z.ZodObject<{ - type: z.ZodLiteral<"code">; - language: z.ZodOptional; - content: z.ZodString; -}, z.core.$strip>, z.ZodObject<{ - type: z.ZodLiteral<"mermaid">; - content: z.ZodString; -}, z.core.$strip>, z.ZodObject<{ - type: z.ZodLiteral<"collapsible">; - summary: z.ZodString; - content: z.ZodArray; -}, z.core.$strip>, z.ZodObject<{ - type: z.ZodLiteral<"link-out">; - text: z.ZodString; - path: z.ZodString; -}, z.core.$strip>], "type">; -/** - * RenderableDocument - The universal intermediate format. - * - * All document codecs output this format. The universal renderer - * converts it to markdown without any domain knowledge. - */ -export declare const RenderableDocumentSchema: z.ZodType; -export type HeadingBlock = z.infer; -export type ParagraphBlock = z.infer; -export type SeparatorBlock = z.infer; -export type TableBlock = z.infer; -export type ListItem = z.infer; -export type ListBlock = z.infer; -export type CodeBlock = z.infer; -export type MermaidBlock = z.infer; -export type CollapsibleBlock = { - type: 'collapsible'; - summary: string; - content: SectionBlock[]; -}; -export type LinkOutBlock = z.infer; -/** @libar-docs-shape reference-sample */ -export type SectionBlock = HeadingBlock | ParagraphBlock | SeparatorBlock | TableBlock | ListBlock | CodeBlock | MermaidBlock | CollapsibleBlock | LinkOutBlock; -export type RenderableDocument = { - title: string; - purpose?: string; - detailLevel?: string; - sections: SectionBlock[]; - additionalFiles?: Record; -}; -/** Create a heading block */ -export declare const heading: (level: 1 | 2 | 3 | 4 | 5 | 6, text: string) => HeadingBlock; -/** Create a paragraph block */ -export declare const paragraph: (text: string) => ParagraphBlock; -/** Create a separator block */ -export declare const separator: () => SeparatorBlock; -/** Create a table block */ -export declare const table: (columns: string[], rows: string[][], alignment?: Array<"left" | "center" | "right">) => TableBlock; -/** Create a list block */ -export declare const list: (items: ListItem[], ordered?: boolean) => ListBlock; -/** Create a code block */ -export declare const code: (content: string, language?: string) => CodeBlock; -/** Create a mermaid diagram block */ -export declare const mermaid: (content: string) => MermaidBlock; -/** Create a collapsible block */ -export declare const collapsible: (summary: string, content: SectionBlock[]) => CollapsibleBlock; -/** Create a link-out block */ -export declare const linkOut: (text: string, path: string) => LinkOutBlock; -/** Create a document */ -export declare const document: (title: string, sections: SectionBlock[], options?: { - purpose?: string; - detailLevel?: string; - additionalFiles?: Record; -}) => RenderableDocument; -//# sourceMappingURL=schema.d.ts.map \ No newline at end of file diff --git a/dist/renderable/schema.d.ts.map b/dist/renderable/schema.d.ts.map deleted file mode 100644 index 5811bd10..00000000 --- a/dist/renderable/schema.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/renderable/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,uCAAuC;AACvC,eAAO,MAAM,kBAAkB;;;;iBAI7B,CAAC;AAEH,2CAA2C;AAC3C,eAAO,MAAM,oBAAoB;;;iBAG/B,CAAC;AAEH,wCAAwC;AACxC,eAAO,MAAM,oBAAoB;;iBAE/B,CAAC;AAEH,oCAAoC;AACpC,eAAO,MAAM,gBAAgB;;;;;;;;;iBAK3B,CAAC;AAEH,4DAA4D;AAC5D,eAAO,MAAM,cAAc;;;;mBAOzB,CAAC;AAEH,oDAAoD;AACpD,eAAO,MAAM,eAAe;;;;;;;;iBAI1B,CAAC;AAEH,6CAA6C;AAC7C,eAAO,MAAM,eAAe;;;;iBAI1B,CAAC;AAEH,+BAA+B;AAC/B,eAAO,MAAM,kBAAkB;;;iBAG7B,CAAC;AAEH,qEAAqE;AACrE,eAAO,MAAM,sBAAsB,EAAE,CAAC,CAAC,OAIrC,CAA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8BAA8B;AAC9B,eAAO,MAAM,OAAO,GAAI,MAAM,MAAM,EAAE,MAAM,MAAM,KAAG,YAInD,CAAC;AAEH,wBAAwB;AACxB,eAAO,MAAM,QAAQ,GACnB,OAAO,MAAM,EACb,UAAU,YAAY,EAAE,EACxB,UAAU;IACR,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;CACtD,KACA,kBAID,CAAC"} \ No newline at end of file diff --git a/dist/renderable/schema.js b/dist/renderable/schema.js deleted file mode 100644 index 9e78ca4e..00000000 --- a/dist/renderable/schema.js +++ /dev/null @@ -1,197 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern RenderableDocument - * @libar-docs-status completed - * @libar-docs-extract-shapes RenderableDocument, SectionBlock, HeadingBlock, TableBlock, ListBlock, CodeBlock, MermaidBlock, CollapsibleBlock - * @libar-docs-arch-role read-model - * @libar-docs-arch-context renderer - * @libar-docs-arch-layer domain - * - * ## RenderableDocument Schema - * - * Universal intermediate format for all generated documentation. - * Document codecs transform MasterDataset into this format, - * then the universal renderer converts it to markdown. - * - * ### When to Use - * - * - When building documents using block builder functions - * - When validating RenderableDocument structures - * - When creating custom codecs that produce document output - * - * ### Block Vocabulary (9 types) - * - * - Structural: heading, paragraph, separator - * - Content: table, list, code, mermaid - * - Progressive: collapsible, link-out - */ -import { z } from 'zod'; -// ═══════════════════════════════════════════════════════════════════════════ -// Block Schemas -// ═══════════════════════════════════════════════════════════════════════════ -/** Heading block - markdown headers */ -export const HeadingBlockSchema = z.object({ - type: z.literal('heading'), - level: z.number().int().min(1).max(6), - text: z.string(), -}); -/** Paragraph block - plain text content */ -export const ParagraphBlockSchema = z.object({ - type: z.literal('paragraph'), - text: z.string(), -}); -/** Separator block - horizontal rule */ -export const SeparatorBlockSchema = z.object({ - type: z.literal('separator'), -}); -/** Table block - markdown tables */ -export const TableBlockSchema = z.object({ - type: z.literal('table'), - columns: z.array(z.string()), - rows: z.array(z.array(z.string())), - alignment: z.array(z.enum(['left', 'center', 'right'])).optional(), -}); -/** List item - can be string or structured with checkbox */ -export const ListItemSchema = z.union([ - z.string(), - z.object({ - text: z.string(), - checked: z.boolean().optional(), - children: z.array(z.lazy(() => ListItemSchema)).optional(), - }), -]); -/** List block - ordered/unordered/checkbox lists */ -export const ListBlockSchema = z.object({ - type: z.literal('list'), - ordered: z.boolean().default(false), - items: z.array(ListItemSchema), -}); -/** Code block - fenced code with language */ -export const CodeBlockSchema = z.object({ - type: z.literal('code'), - language: z.string().optional(), - content: z.string(), -}); -/** Mermaid block - diagrams */ -export const MermaidBlockSchema = z.object({ - type: z.literal('mermaid'), - content: z.string(), -}); -/** Collapsible block - details/summary for progressive disclosure */ -export const CollapsibleBlockSchema = z.object({ - type: z.literal('collapsible'), - summary: z.string(), - content: z.array(z.lazy(() => SectionBlockSchema)), -}); -/** Link-out block - reference to external file */ -export const LinkOutBlockSchema = z.object({ - type: z.literal('link-out'), - text: z.string(), - path: z.string(), -}); -// ═══════════════════════════════════════════════════════════════════════════ -// Section Block (Discriminated Union) -// ═══════════════════════════════════════════════════════════════════════════ -/** - * All block types that can appear in a document section. - * Uses discriminated union on `type` field for type-safe switching. - */ -export const SectionBlockSchema = z.discriminatedUnion('type', [ - // Structural - HeadingBlockSchema, - ParagraphBlockSchema, - SeparatorBlockSchema, - // Content - TableBlockSchema, - ListBlockSchema, - CodeBlockSchema, - MermaidBlockSchema, - // Progressive Disclosure - CollapsibleBlockSchema, - LinkOutBlockSchema, -]); -// ═══════════════════════════════════════════════════════════════════════════ -// Document Schema -// ═══════════════════════════════════════════════════════════════════════════ -/** - * RenderableDocument - The universal intermediate format. - * - * All document codecs output this format. The universal renderer - * converts it to markdown without any domain knowledge. - */ -export const RenderableDocumentSchema = z.object({ - /** Document title (becomes H1) */ - title: z.string(), - /** Optional purpose description (rendered as blockquote) */ - purpose: z.string().optional(), - /** Optional detail level indicator */ - detailLevel: z.string().optional(), - /** Document content blocks */ - sections: z.array(SectionBlockSchema), - /** Additional files for progressive disclosure (path -> document) */ - additionalFiles: z - .record(z.string(), z.lazy(() => RenderableDocumentSchema)) - .optional(), -}); -// ═══════════════════════════════════════════════════════════════════════════ -// Block Builders (Convenience Functions) -// ═══════════════════════════════════════════════════════════════════════════ -/** Create a heading block */ -export const heading = (level, text) => ({ - type: 'heading', - level, - text, -}); -/** Create a paragraph block */ -export const paragraph = (text) => ({ - type: 'paragraph', - text, -}); -/** Create a separator block */ -export const separator = () => ({ - type: 'separator', -}); -/** Create a table block */ -export const table = (columns, rows, alignment) => ({ - type: 'table', - columns, - rows, - ...(alignment && { alignment }), -}); -/** Create a list block */ -export const list = (items, ordered = false) => ({ - type: 'list', - ordered, - items, -}); -/** Create a code block */ -export const code = (content, language) => ({ - type: 'code', - content, - ...(language && { language }), -}); -/** Create a mermaid diagram block */ -export const mermaid = (content) => ({ - type: 'mermaid', - content, -}); -/** Create a collapsible block */ -export const collapsible = (summary, content) => ({ - type: 'collapsible', - summary, - content, -}); -/** Create a link-out block */ -export const linkOut = (text, path) => ({ - type: 'link-out', - text, - path, -}); -/** Create a document */ -export const document = (title, sections, options) => ({ - title, - sections, - ...options, -}); -//# sourceMappingURL=schema.js.map \ No newline at end of file diff --git a/dist/renderable/schema.js.map b/dist/renderable/schema.js.map deleted file mode 100644 index b5c21646..00000000 --- a/dist/renderable/schema.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/renderable/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,8EAA8E;AAC9E,gBAAgB;AAChB,8EAA8E;AAE9E,uCAAuC;AACvC,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACz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GAAG,CACtB,KAAa,EACb,QAAwB,EACxB,OAIC,EACmB,EAAE,CAAC,CAAC;IACxB,KAAK;IACL,QAAQ;IACR,GAAG,OAAO;CACX,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/renderable/utils.d.ts b/dist/renderable/utils.d.ts deleted file mode 100644 index 844303d2..00000000 --- a/dist/renderable/utils.d.ts +++ /dev/null @@ -1,146 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern RenderableUtils - * @libar-docs-status completed - * - * ## Renderable Utilities - * - * Utility functions for document codecs. These are pure functions that - * transform pattern data into display-ready strings. - * - * ### When to Use - * - * - When formatting status values, names, or progress indicators - * - When computing status counts or completion percentages - * - When sorting patterns for display in documents - * - * Ported from the original helpers.ts with the essential functions - * needed by document codecs. - */ -import type { ExtractedPattern, StatusCounts } from '../validation-schemas/index.js'; -import type { LoadedWorkflow } from '../validation-schemas/workflow-config.js'; -/** - * Get status emoji - * - * @param status - Status string - * @param workflow - Optional workflow for custom emojis - * @returns Emoji string - */ -export declare function getStatusEmoji(status: string | undefined, workflow?: LoadedWorkflow): string; -/** - * Get status display text (capitalized) - */ -export declare function getStatusText(status: string | undefined): string; -/** - * Get human-readable display name for a pattern - * - * Priority: title > patternName (CamelCase converted) > name - */ -export declare function getDisplayName(pattern: ExtractedPattern): string; -/** - * Format category name (capitalize words, handle acronyms) - * - * Handles common acronyms like DDD, CQRS, API by rendering them in uppercase. - * Hyphenated names like "event-sourcing" become "Event Sourcing". - */ -export declare function formatCategoryName(category: string): string; -/** - * Format business value (replace hyphens with spaces) - */ -export declare function formatBusinessValue(value: string | undefined): string; -/** - * Strip leading markdown headers from text to avoid duplicate headings. - * - * When directive descriptions start with a markdown header (e.g., "## Topic"), - * rendering under a "## Description" heading creates duplicate/nested headers. - * This function removes leading headers and empty lines to get the actual content. - * - * @param text - Text that may start with markdown headers - * @returns Text with leading headers and empty lines stripped - * - * @example - * ```typescript - * stripLeadingHeaders("## Topic\n\nActual content here") - * // Returns: "Actual content here" - * - * stripLeadingHeaders("Content without header") - * // Returns: "Content without header" - * ``` - */ -export declare function stripLeadingHeaders(text: string): string; -/** - * Strip markdown formatting from text - */ -export declare function stripMarkdown(text: string): string; -/** - * Extract summary for pattern (first complete sentence, truncated if needed) - * - * Combines multiple lines to find a complete sentence, respecting max length. - * If no sentence ending is found within the limit, truncates at word boundary with "..." - */ -export declare function extractSummary(description: string, patternName?: string): string; -/** - * Compute status counts from patterns - */ -export declare function computeStatusCounts(patterns: readonly ExtractedPattern[]): StatusCounts; -/** - * Calculate completion percentage - */ -export declare function completionPercentage(counts: StatusCounts): number; -/** - * Check if all items are completed - */ -export declare function isFullyCompleted(counts: StatusCounts): boolean; -/** - * Render ASCII progress bar - * - * @param completed - Number completed - * @param total - Total number - * @param width - Bar width in characters - * @returns Progress bar string like "[████░░░░] 4/8" - */ -export declare function renderProgressBar(completed: number, total: number, width?: number): string; -/** - * Group patterns by category - */ -export declare function groupByCategory(patterns: readonly ExtractedPattern[]): Map; -/** - * Group patterns by phase number - */ -export declare function groupByPhase(patterns: readonly ExtractedPattern[]): Map; -/** - * Group patterns by quarter - */ -export declare function groupByQuarter(patterns: readonly ExtractedPattern[]): Map; -/** - * Sort patterns by phase number then name - * - * @param patterns - Array of patterns to sort - * @param inPlace - If true, sorts the array in place (mutates input). - * If false (default), creates a copy before sorting. - * Use inPlace=true when you've already created a copy. - * @returns Sorted array (same reference if inPlace=true, new array otherwise) - * - * @example - * ```typescript - * // Safe default - doesn't modify input - * const sorted = sortByPhaseAndName(patterns); - * - * // Performance optimization - when array is already a copy - * const copy = [...patterns]; - * sortByPhaseAndName(copy, true); // Mutates copy - * ``` - */ -export declare function sortByPhaseAndName(patterns: ExtractedPattern[], inPlace?: boolean): ExtractedPattern[]; -/** - * Sort patterns by status (completed first) then name - * - * @param patterns - Array of patterns to sort - * @param inPlace - If true, sorts the array in place (mutates input). - * If false (default), creates a copy before sorting. - * Use inPlace=true when you've already created a copy. - * @returns Sorted array (same reference if inPlace=true, new array otherwise) - */ -export declare function sortByStatusAndName(patterns: ExtractedPattern[], inPlace?: boolean): ExtractedPattern[]; -//# sourceMappingURL=utils.d.ts.map \ No newline at end of file diff --git a/dist/renderable/utils.d.ts.map b/dist/renderable/utils.d.ts.map deleted file mode 100644 index 40b35f9d..00000000 --- a/dist/renderable/utils.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/renderable/utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AACrF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAuB/E;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,EAAE,QAAQ,CAAC,EAAE,cAAc,GAAG,MAAM,CAS5F;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAGhE;AAMD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,gBAAgB,GAAG,MAAM,CAIhE;AAOD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAW3D;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAGrE;AAMD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAwBxD;AAOD;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAOlD;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAyEhF;AASD;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,SAAS,gBAAgB,EAAE,GAAG,YAAY,CASvF;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAGjE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAE9D;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,SAAK,GAAG,MAAM,CAQtF;AAMD;;GAEG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,SAAS,gBAAgB,EAAE,GACpC,GAAG,CAAC,MAAM,EAAE,gBAAgB,EAAE,CAAC,CAEjC;AAED;;GAEG;AACH,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,SAAS,gBAAgB,EAAE,GACpC,GAAG,CAAC,MAAM,EAAE,gBAAgB,EAAE,CAAC,CAKjC;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,SAAS,gBAAgB,EAAE,GACpC,GAAG,CAAC,MAAM,EAAE,gBAAgB,EAAE,CAAC,CAKjC;AAMD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,gBAAgB,EAAE,EAC5B,OAAO,UAAQ,GACd,gBAAgB,EAAE,CAQpB;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,gBAAgB,EAAE,EAC5B,OAAO,UAAQ,GACd,gBAAgB,EAAE,CAcpB"} \ No newline at end of file diff --git a/dist/renderable/utils.js b/dist/renderable/utils.js deleted file mode 100644 index 86410f1e..00000000 --- a/dist/renderable/utils.js +++ /dev/null @@ -1,363 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern RenderableUtils - * @libar-docs-status completed - * - * ## Renderable Utilities - * - * Utility functions for document codecs. These are pure functions that - * transform pattern data into display-ready strings. - * - * ### When to Use - * - * - When formatting status values, names, or progress indicators - * - When computing status counts or completion percentages - * - When sorting patterns for display in documents - * - * Ported from the original helpers.ts with the essential functions - * needed by document codecs. - */ -import { camelCaseToTitleCase, groupBy } from '../utils/index.js'; -import { normalizeStatus as taxonomyNormalizeStatus, } from '../taxonomy/index.js'; -// ═══════════════════════════════════════════════════════════════════════════ -// Status Utilities -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Default status emoji mapping (fallback when no workflow) - * Per PDR-005: roadmap, active, completed, deferred - */ -const STATUS_EMOJI = { - completed: '\u2705', // ✅ - active: '\ud83d\udea7', // 🚧 - roadmap: '\ud83d\udccb', // 📋 - planned: '\ud83d\udccb', // 📋 (normalized) - deferred: '\u23f8\ufe0f', // ⏸️ -}; -/** - * Get status emoji - * - * @param status - Status string - * @param workflow - Optional workflow for custom emojis - * @returns Emoji string - */ -export function getStatusEmoji(status, workflow) { - if (!status) - return ''; - if (workflow) { - const statusDef = workflow.statusMap.get(status.toLowerCase()); - return statusDef?.emoji ?? ''; - } - return STATUS_EMOJI[status.toLowerCase()] ?? ''; -} -/** - * Get status display text (capitalized) - */ -export function getStatusText(status) { - if (!status) - return 'Planned'; - return status.charAt(0).toUpperCase() + status.slice(1); -} -// ═══════════════════════════════════════════════════════════════════════════ -// Display Name & Text Processing -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Get human-readable display name for a pattern - * - * Priority: title > patternName (CamelCase converted) > name - */ -export function getDisplayName(pattern) { - if (pattern.title) - return pattern.title; - if (pattern.patternName) - return camelCaseToTitleCase(pattern.patternName); - return pattern.name; -} -/** - * Common acronyms that should be rendered in uppercase - */ -const ACRONYMS = new Set(['ddd', 'cqrs', 'api', 'cms', 'es', 'occ', 'dcb', 'bc']); -/** - * Format category name (capitalize words, handle acronyms) - * - * Handles common acronyms like DDD, CQRS, API by rendering them in uppercase. - * Hyphenated names like "event-sourcing" become "Event Sourcing". - */ -export function formatCategoryName(category) { - return category - .split('-') - .map((word) => { - const lower = word.toLowerCase(); - if (ACRONYMS.has(lower)) { - return word.toUpperCase(); - } - return word.charAt(0).toUpperCase() + word.slice(1); - }) - .join(' '); -} -/** - * Format business value (replace hyphens with spaces) - */ -export function formatBusinessValue(value) { - if (!value) - return ''; - return value.replace(/-/g, ' '); -} -// ═══════════════════════════════════════════════════════════════════════════ -// Description Extraction -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Strip leading markdown headers from text to avoid duplicate headings. - * - * When directive descriptions start with a markdown header (e.g., "## Topic"), - * rendering under a "## Description" heading creates duplicate/nested headers. - * This function removes leading headers and empty lines to get the actual content. - * - * @param text - Text that may start with markdown headers - * @returns Text with leading headers and empty lines stripped - * - * @example - * ```typescript - * stripLeadingHeaders("## Topic\n\nActual content here") - * // Returns: "Actual content here" - * - * stripLeadingHeaders("Content without header") - * // Returns: "Content without header" - * ``` - */ -export function stripLeadingHeaders(text) { - if (!text) - return text; - const lines = text.split('\n'); - let startIndex = 0; - // Skip leading empty lines and markdown header lines (# to ######) - while (startIndex < lines.length) { - const line = lines[startIndex]?.trim() ?? ''; - if (!line) { - // Skip empty lines - startIndex++; - continue; - } - // Check if line is a markdown header (starts with 1-6 # followed by space) - if (/^#{1,6}\s/.test(line)) { - startIndex++; - continue; - } - // Found non-empty, non-header line - stop here - break; - } - return lines.slice(startIndex).join('\n').trim(); -} -/** Maximum length for summary text */ -const SUMMARY_MAX_LENGTH = 120; -/** Truncation suffix */ -const TRUNCATION_SUFFIX = '...'; -/** - * Strip markdown formatting from text - */ -export function stripMarkdown(text) { - return text - .replace(/^#+\s*/, '') // Remove heading markers - .replace(/\*\*([^*]+)\*\*/g, '$1') // Bold - .replace(/\*([^*]+)\*/g, '$1') // Italic - .replace(/`([^`]+)`/g, '`$1`') // Keep inline code - .replace(/\[([^\]]+)\]\([^)]+\)/g, '$1'); // Links -} -/** - * Extract summary for pattern (first complete sentence, truncated if needed) - * - * Combines multiple lines to find a complete sentence, respecting max length. - * If no sentence ending is found within the limit, truncates at word boundary with "..." - */ -export function extractSummary(description, patternName) { - if (!description) - return ''; - const lines = description.split('\n'); - const nonEmptyLines = []; - for (const line of lines) { - const trimmed = line.trim(); - if (trimmed && !trimmed.startsWith('#')) { - nonEmptyLines.push(trimmed); - } - } - if (nonEmptyLines.length === 0) - return ''; - // Find starting index, skipping tautological first lines and section headers - let startIndex = 0; - const firstCleaned = stripMarkdown(nonEmptyLines[0] ?? ''); - // Skip tautological first line (just the pattern name) - if (firstCleaned.toLowerCase().trim() === patternName?.toLowerCase().trim()) { - startIndex = 1; - } - // Skip section header labels like "Problem:", "Solution:", "Context:" - const startText = stripMarkdown(nonEmptyLines[startIndex] ?? ''); - if (/^[A-Za-z]+:$/.test(startText) && startIndex < nonEmptyLines.length - 1) { - startIndex++; - } - // Combine lines until we find a sentence ending or exceed max length - let summary = ''; - const sentenceEndPattern = /[.!?](?=\s+[A-Z]|\s*$)/; - for (let i = startIndex; i < nonEmptyLines.length && summary.length < SUMMARY_MAX_LENGTH; i++) { - const lineText = stripMarkdown(nonEmptyLines[i] ?? ''); - if (!lineText) - continue; - // Add space between combined lines - if (summary.length > 0) { - summary += ' '; - } - summary += lineText; - // Check if we've found a complete sentence - const sentenceMatch = sentenceEndPattern.exec(summary); - if (sentenceMatch) { - summary = summary.slice(0, sentenceMatch.index + 1); - break; - } - } - // Truncate if too long, preferring sentence boundaries - if (summary.length > SUMMARY_MAX_LENGTH) { - const withinLimit = summary.slice(0, SUMMARY_MAX_LENGTH); - // Try to find the last complete sentence within the limit - const lastSentenceMatch = /.*[.!?](?=\s|$)/.exec(withinLimit); - if (lastSentenceMatch && lastSentenceMatch[0].length > 20) { - // Found a sentence boundary with reasonable length - summary = lastSentenceMatch[0]; - } - else { - // No sentence boundary found - truncate at word boundary - const truncateAt = SUMMARY_MAX_LENGTH - TRUNCATION_SUFFIX.length; - const lastSpace = withinLimit.lastIndexOf(' ', truncateAt); - summary = withinLimit.slice(0, lastSpace > 0 ? lastSpace : truncateAt) + TRUNCATION_SUFFIX; - } - } - else if (summary.length > 0 && !/[.!?]$/.test(summary)) { - // Text is under limit but doesn't end with sentence punctuation - add ellipsis - summary = summary + TRUNCATION_SUFFIX; - } - return summary.trim(); -} -// ═══════════════════════════════════════════════════════════════════════════ -// Progress & Counts -// ═══════════════════════════════════════════════════════════════════════════ -// Note: StatusCounts type is now imported from validation-schemas (canonical source) -// and re-exported above for backward compatibility -/** - * Compute status counts from patterns - */ -export function computeStatusCounts(patterns) { - const counts = { completed: 0, active: 0, planned: 0, total: patterns.length }; - for (const p of patterns) { - const status = taxonomyNormalizeStatus(p.status); - counts[status]++; - } - return counts; -} -/** - * Calculate completion percentage - */ -export function completionPercentage(counts) { - if (counts.total === 0) - return 0; - return Math.round((counts.completed / counts.total) * 100); -} -/** - * Check if all items are completed - */ -export function isFullyCompleted(counts) { - return counts.total > 0 && counts.completed === counts.total; -} -/** - * Render ASCII progress bar - * - * @param completed - Number completed - * @param total - Total number - * @param width - Bar width in characters - * @returns Progress bar string like "[████░░░░] 4/8" - */ -export function renderProgressBar(completed, total, width = 10) { - if (total === 0) - return `[${'░'.repeat(width)}] 0/0`; - const percent = completed / total; - const filled = Math.round(percent * width); - const empty = width - filled; - return `[${'█'.repeat(filled)}${'░'.repeat(empty)}] ${completed}/${total}`; -} -// ═══════════════════════════════════════════════════════════════════════════ -// Pattern Grouping -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Group patterns by category - */ -export function groupByCategory(patterns) { - return groupBy(patterns, (p) => p.category); -} -/** - * Group patterns by phase number - */ -export function groupByPhase(patterns) { - const withPhase = patterns.filter((p) => p.phase !== undefined); - return groupBy(withPhase, (p) => p.phase); -} -/** - * Group patterns by quarter - */ -export function groupByQuarter(patterns) { - const withQuarter = patterns.filter((p) => p.quarter !== undefined); - return groupBy(withQuarter, (p) => p.quarter); -} -// ═══════════════════════════════════════════════════════════════════════════ -// Sorting -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Sort patterns by phase number then name - * - * @param patterns - Array of patterns to sort - * @param inPlace - If true, sorts the array in place (mutates input). - * If false (default), creates a copy before sorting. - * Use inPlace=true when you've already created a copy. - * @returns Sorted array (same reference if inPlace=true, new array otherwise) - * - * @example - * ```typescript - * // Safe default - doesn't modify input - * const sorted = sortByPhaseAndName(patterns); - * - * // Performance optimization - when array is already a copy - * const copy = [...patterns]; - * sortByPhaseAndName(copy, true); // Mutates copy - * ``` - */ -export function sortByPhaseAndName(patterns, inPlace = false) { - const arr = inPlace ? patterns : [...patterns]; - return arr.sort((a, b) => { - const phaseA = a.phase ?? Infinity; - const phaseB = b.phase ?? Infinity; - if (phaseA !== phaseB) - return phaseA - phaseB; - return a.name.localeCompare(b.name); - }); -} -/** - * Sort patterns by status (completed first) then name - * - * @param patterns - Array of patterns to sort - * @param inPlace - If true, sorts the array in place (mutates input). - * If false (default), creates a copy before sorting. - * Use inPlace=true when you've already created a copy. - * @returns Sorted array (same reference if inPlace=true, new array otherwise) - */ -export function sortByStatusAndName(patterns, inPlace = false) { - const statusOrder = { - completed: 0, - active: 1, - planned: 2, - }; - const arr = inPlace ? patterns : [...patterns]; - return arr.sort((a, b) => { - const statusA = statusOrder[taxonomyNormalizeStatus(a.status)]; - const statusB = statusOrder[taxonomyNormalizeStatus(b.status)]; - if (statusA !== statusB) - return statusA - statusB; - return a.name.localeCompare(b.name); - }); -} -//# sourceMappingURL=utils.js.map \ No newline at end of file diff --git a/dist/renderable/utils.js.map b/dist/renderable/utils.js.map deleted file mode 100644 index b6375154..00000000 --- a/dist/renderable/utils.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/renderable/utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAIH,OAAO,EAAE,oBAAoB,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EACL,eAAe,IAAI,uBAAuB,GAE3C,MAAM,sBAAsB,C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CAAC,CAAC,KAAK,IAAI,QAAQ,CAAC;QACnC,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,IAAI,QAAQ,CAAC;QACnC,IAAI,MAAM,KAAK,MAAM;YAAE,OAAO,MAAM,GAAG,MAAM,CAAC;QAC9C,OAAO,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,mBAAmB,CACjC,QAA4B,EAC5B,OAAO,GAAG,KAAK;IAEf,MAAM,WAAW,GAA6C;QAC5D,SAAS,EAAE,CAAC;QACZ,MAAM,EAAE,CAAC;QACT,OAAO,EAAE,CAAC;KACX,CAAC;IAEF,MAAM,GAAG,GAAG,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC;IAC/C,OAAO,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QACvB,MAAM,OAAO,GAAG,WAAW,CAAC,uBAAuB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;QAC/D,MAAM,OAAO,GAAG,WAAW,CAAC,uBAAuB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;QAC/D,IAAI,OAAO,KAAK,OAAO;YAAE,OAAO,OAAO,GAAG,OAAO,CAAC;QAClD,OAAO,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/dist/scanner/ast-parser.d.ts b/dist/scanner/ast-parser.d.ts deleted file mode 100644 index 32e3e4d9..00000000 --- a/dist/scanner/ast-parser.d.ts +++ /dev/null @@ -1,75 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core @libar-docs-scanner - * @libar-docs-pattern TypeScript AST Parser - * @libar-docs-status completed - * @libar-docs-arch-role infrastructure - * @libar-docs-arch-context scanner - * @libar-docs-arch-layer infrastructure - * @libar-docs-uses TagRegistry, DocDirectiveSchema, typescript-estree - * @libar-docs-used-by Pattern Scanner, Doc Extractor - * @libar-docs-usecase "When parsing JSDoc comments for @libar-docs-* directives" - * @libar-docs-usecase "When extracting code blocks following documentation comments" - * - * ## TypeScript AST Parser - JSDoc Directive Extraction - * - * Parses TypeScript source files using @typescript-eslint/typescript-estree - * to extract @libar-docs-* directives with their associated code blocks. - * First stage of the three-stage pipeline: Scanner → Extractor → Generator. - * - * ### When to Use - * - * - Scanning TypeScript files for documentation directives - * - Extracting code snippets following JSDoc comments - * - Building pattern metadata from JSDoc tags - * - * ### Key Concepts - * - * - **Data-Driven Extraction**: Tag formats defined in registry, not hardcoded - * - **Schema-First Validation**: All directives validated against Zod schemas - * - **Result Monad**: Returns Result for explicit error handling - */ -import { Result } from '../types/index.js'; -import type { DocDirective, ExportInfo, DirectiveValidationError, FileParseError } from '../types/index.js'; -import { type TagRegistry } from '../validation-schemas/index.js'; -/** - * Result of parsing a file for directives - */ -export interface ParseDirectivesResult { - readonly directives: ReadonlyArray<{ - directive: DocDirective; - code: string; - exports: readonly ExportInfo[]; - }>; - /** Directive-level validation errors (individual directives that failed) */ - readonly skippedDirectives: readonly DirectiveValidationError[]; -} -/** - * Parses TypeScript content and extracts all @libar-docs-* directives - * with their associated code blocks and exports. - * - * **Error Handling**: Returns Result type to surface parse errors: - * - Ok: Contains successfully parsed directives and any skipped directive errors - * - Err: Contains FileParseError when the entire file fails to parse - * - * @param content - TypeScript file content - * @param filePath - Path to TypeScript file (for error messages) - * @param registry - Tag registry for metadata extraction (optional, defaults to generic registry) - * @returns Result with parsed directives or parse error - * - * @example - * ```typescript - * const content = await fs.readFile(filePath, "utf-8"); - * const result = parseFileDirectives(content, filePath, registry); - * - * if (Result.isOk(result)) { - * const { directives, skippedDirectives } = result.value; - * console.log(`Parsed ${directives.length} directives`); - * console.log(`Skipped ${skippedDirectives.length} invalid directives`); - * } else { - * console.error(`Parse error: ${result.error.message}`); - * } - * ``` - */ -export declare function parseFileDirectives(content: string, filePath: string, registry?: TagRegistry): Result; -//# sourceMappingURL=ast-parser.d.ts.map \ No newline at end of file diff --git a/dist/scanner/ast-parser.d.ts.map b/dist/scanner/ast-parser.d.ts.map deleted file mode 100644 index 74f8c47e..00000000 --- a/dist/scanner/ast-parser.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ast-parser.d.ts","sourceRoot":"","sources":["../../src/scanner/ast-parser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAG3C,OAAO,KAAK,EACV,YAAY,EACZ,UAAU,EACV,wBAAwB,EACxB,cAAc,EACf,MAAM,mBAAmB,CAAC;AAM3B,OAAO,EAGL,KAAK,WAAW,EAEjB,MAAM,gCAAgC,CAAC;AAsCxC;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC;QACjC,SAAS,EAAE,YAAY,CAAC;QACxB,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,SAAS,UAAU,EAAE,CAAC;KAChC,CAAC,CAAC;IACH,4EAA4E;IAC5E,QAAQ,CAAC,iBAAiB,EAAE,SAAS,wBAAwB,EAAE,CAAC;CACjE;AAyPD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,QAAQ,CAAC,EAAE,WAAW,GACrB,MAAM,CAAC,qBAAqB,EAAE,cAAc,CAAC,CAqE/C"} \ No newline at end of file diff --git a/dist/scanner/ast-parser.js b/dist/scanner/ast-parser.js deleted file mode 100644 index 8bd46170..00000000 --- a/dist/scanner/ast-parser.js +++ /dev/null @@ -1,828 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core @libar-docs-scanner - * @libar-docs-pattern TypeScript AST Parser - * @libar-docs-status completed - * @libar-docs-arch-role infrastructure - * @libar-docs-arch-context scanner - * @libar-docs-arch-layer infrastructure - * @libar-docs-uses TagRegistry, DocDirectiveSchema, typescript-estree - * @libar-docs-used-by Pattern Scanner, Doc Extractor - * @libar-docs-usecase "When parsing JSDoc comments for @libar-docs-* directives" - * @libar-docs-usecase "When extracting code blocks following documentation comments" - * - * ## TypeScript AST Parser - JSDoc Directive Extraction - * - * Parses TypeScript source files using @typescript-eslint/typescript-estree - * to extract @libar-docs-* directives with their associated code blocks. - * First stage of the three-stage pipeline: Scanner → Extractor → Generator. - * - * ### When to Use - * - * - Scanning TypeScript files for documentation directives - * - Extracting code snippets following JSDoc comments - * - Building pattern metadata from JSDoc tags - * - * ### Key Concepts - * - * - **Data-Driven Extraction**: Tag formats defined in registry, not hardcoded - * - **Schema-First Validation**: All directives validated against Zod schemas - * - **Result Monad**: Returns Result for explicit error handling - */ -import { Result } from '../types/index.js'; -import { parse } from '@typescript-eslint/typescript-estree'; -import { asDirectiveTag, createDirectiveValidationError, createFileParseError, } from '../types/index.js'; -import { DocDirectiveSchema, createDefaultTagRegistry, } from '../validation-schemas/index.js'; -import { createRegexBuilders } from '../config/regex-builders.js'; -/** - * Module-level regex cache for performance optimization. - * - * Regex compilation is expensive (~50μs per pattern). In hot paths where - * the same patterns are used repeatedly (e.g., extracting metadata tags), - * caching provides ~80x fewer RegExp instantiations. - * - * @internal - */ -const REGEX_CACHE = new Map(); -/** - * Get or create a cached RegExp instance. - * - * @param pattern - Regex pattern string - * @param flags - Optional regex flags (g, i, m, etc.) - * @returns Cached or newly created RegExp - * - * @internal - */ -function getCachedRegex(pattern, flags) { - const key = flags ? `${pattern}|${flags}` : pattern; - let regex = REGEX_CACHE.get(key); - if (!regex) { - regex = new RegExp(pattern, flags); - REGEX_CACHE.set(key, regex); - } - // Reset lastIndex for stateful regexes (those with 'g' flag) - if (regex.global) { - regex.lastIndex = 0; - } - return regex; -} -/** - * Extract single value from comment text for format="value" - * - * @example - * ``` - * @libar-docs-pattern MyPattern - * ``` - */ -function extractSingleValue(commentText, fullTag) { - const regex = getCachedRegex(`(?:^|\\n)\\s*\\*?\\s*${escapeRegex(fullTag)}\\s+(.+?)(?:\\n|\\*|$)`); - const match = regex.exec(commentText); - return match?.[1]?.trim(); -} -/** - * Extract enum value from comment text for format="enum" - * - * @example - * ``` - * @libar-docs-status completed - * ``` - */ -function extractEnumValue(commentText, fullTag, validValues) { - const valuesPattern = validValues.join('|'); - const regex = getCachedRegex(`${escapeRegex(fullTag)}\\s+(${valuesPattern})`); - const match = regex.exec(commentText); - return match?.[1]; -} -/** - * Extract quoted value from comment text for format="quoted-value" - * - * @example - * ``` - * @libar-docs-usecase "When implementing a new command" - * ``` - */ -function extractQuotedValue(commentText, fullTag) { - const regex = getCachedRegex(`${escapeRegex(fullTag)}\\s+(?:"([^"]+)"|([^\\n*]+?)(?:\\n|\\*|$))`, 'g'); - const values = []; - let match; - while ((match = regex.exec(commentText)) !== null) { - const value = (match[1] ?? match[2])?.trim(); - if (value) { - values.push(value); - } - } - return values; -} -/** - * Extract comma-separated values from comment text for format="csv" - * - * @example - * ``` - * @libar-docs-uses PatternA, PatternB, PatternC - * ``` - */ -function extractCsvValue(commentText, fullTag) { - const regex = getCachedRegex(`${escapeRegex(fullTag)}\\s+([^\\n@*]+)`); - const match = regex.exec(commentText); - if (!match?.[1]) - return undefined; - return match[1] - .split(',') - .map((s) => s.trim()) - .filter(Boolean); -} -/** - * Extract number value from comment text for format="number" - * - * @example - * ``` - * @libar-docs-phase 14 - * ``` - */ -function extractNumberValue(commentText, fullTag) { - const regex = getCachedRegex(`${escapeRegex(fullTag)}\\s+(\\d+)`); - const match = regex.exec(commentText); - return match?.[1] ? parseInt(match[1], 10) : undefined; -} -/** - * Check if flag is present in comment text for format="flag" - * - * @example - * ``` - * @libar-docs-core - * ``` - */ -function checkFlagPresent(commentText, fullTag) { - const regex = getCachedRegex(`${escapeRegex(fullTag)}(?:\\s|$|\\*)`); - return regex.test(commentText); -} -/** - * Escape special regex characters - */ -function escapeRegex(str) { - return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); -} -/** - * Build regex patterns for directive parsing from registry configuration. - * - * @param registry - Tag registry with prefix and opt-in tag configuration - * @returns Object with compiled regex patterns for directive parsing - * - * @internal - */ -function buildDirectivePatterns(registry) { - // Extract prefix without @ for pattern construction - const prefixWithoutAt = registry.tagPrefix.startsWith('@') - ? registry.tagPrefix.substring(1) - : registry.tagPrefix; - const escapedPrefixWithoutAt = escapeRegex(prefixWithoutAt); - // Extract opt-in tag without @ for pattern construction - const optInWithoutAt = registry.fileOptInTag.startsWith('@') - ? registry.fileOptInTag.substring(1) - : registry.fileOptInTag; - const escapedOptInWithoutAt = escapeRegex(optInWithoutAt); - return { - // Match directive tags: @prefix-pattern, @prefix-core, etc. (prefix includes trailing -) - tagRegex: new RegExp(`@${escapedPrefixWithoutAt}[\\w-]+`, 'g'), - // Check if line starts with opt-in or directive - // e.g., ^@libar-docs or ^@libar-docs-pattern - startsWithOptInOrDirective: new RegExp(`^@${escapedOptInWithoutAt}(?:-[\\w-]+)?`), - // Match opt-in tag for removal (not followed by -) - // e.g., @libar-docs followed by whitespace or end - optInTagPattern: new RegExp(`@${escapedOptInWithoutAt}(?!-)(\\s|$)?`, 'g'), - // Match any @ tag that is NOT our prefix - // e.g., @param, @returns, @example (not @libar-docs) - nonOptInAtTagPattern: new RegExp(`^@(?!${escapedOptInWithoutAt})`), - }; -} -/** - * Build regex pattern for value-taking tags from registry. - * - * Value-taking tags are all metadata tags except those with format="flag". - * This pattern detects when a line contains a metadata directive whose - * value should NOT be captured as inline description text. - * - * @param registry - Tag registry to extract metadata tags from - * @returns RegExp pattern string (without surrounding slashes) - * - * @internal - */ -function buildValueTakingTagsPattern(registry) { - const valueTakingTags = registry.metadataTags - .filter((tag) => tag.format !== 'flag') - .map((tag) => escapeRegex(tag.tag)); - const tagPrefix = escapeRegex(registry.tagPrefix); - return `${tagPrefix}(?:${valueTakingTags.join('|')})\\s`; -} -/** - * Pre-compiled regex for detecting value-taking metadata directives. - * - * Built at module load time from the default registry to: - * 1. Avoid regex compilation on every parse call - * 2. Eliminate hardcoded tag lists that fall out of sync with registry - * - * Matches lines containing tags like @libar-docs-pattern, @libar-docs-status, etc. - * Does NOT match flag-only tags like @libar-docs-core. - * - * @internal - */ -const _VALUE_TAKING_TAGS_REGEX = (() => { - const defaultRegistry = createDefaultTagRegistry(); - return new RegExp(buildValueTakingTagsPattern(defaultRegistry)); -})(); -/** - * Extract metadata tag value based on format type - * - * Dispatches to the appropriate extraction function based on the tag's format. - * This enables data-driven metadata extraction without hardcoded patterns. - * - * @param commentText - Full JSDoc comment text - * @param tagDef - Metadata tag definition from registry - * @param prefix - Tag prefix (e.g., "@libar-docs-") - * @returns Extracted value in appropriate format, or undefined if not found - */ -function extractMetadataTag(commentText, tagDef, prefix) { - const fullTag = `${prefix}${tagDef.tag}`; - switch (tagDef.format) { - case 'value': - return extractSingleValue(commentText, fullTag); - case 'enum': - return extractEnumValue(commentText, fullTag, tagDef.values ?? []); - case 'quoted-value': - // For repeatable tags, return array; otherwise return single value - if (tagDef.repeatable) { - const values = extractQuotedValue(commentText, fullTag); - return values.length > 0 ? values : undefined; - } - else { - const values = extractQuotedValue(commentText, fullTag); - return values[0]; - } - case 'csv': - return extractCsvValue(commentText, fullTag); - case 'number': - return extractNumberValue(commentText, fullTag); - case 'flag': - return checkFlagPresent(commentText, fullTag); - default: - return undefined; - } -} -/** - * Parses TypeScript content and extracts all @libar-docs-* directives - * with their associated code blocks and exports. - * - * **Error Handling**: Returns Result type to surface parse errors: - * - Ok: Contains successfully parsed directives and any skipped directive errors - * - Err: Contains FileParseError when the entire file fails to parse - * - * @param content - TypeScript file content - * @param filePath - Path to TypeScript file (for error messages) - * @param registry - Tag registry for metadata extraction (optional, defaults to generic registry) - * @returns Result with parsed directives or parse error - * - * @example - * ```typescript - * const content = await fs.readFile(filePath, "utf-8"); - * const result = parseFileDirectives(content, filePath, registry); - * - * if (Result.isOk(result)) { - * const { directives, skippedDirectives } = result.value; - * console.log(`Parsed ${directives.length} directives`); - * console.log(`Skipped ${skippedDirectives.length} invalid directives`); - * } else { - * console.error(`Parse error: ${result.error.message}`); - * } - * ``` - */ -export function parseFileDirectives(content, filePath, registry) { - const effectiveRegistry = registry ?? createDefaultTagRegistry(); - let ast; - try { - ast = parse(content, { - loc: true, - range: true, - comment: true, - tokens: false, - }); - } - catch (error) { - // Surface parse errors instead of silently returning empty - const tsError = error; - const location = 'lineNumber' in tsError && 'column' in tsError - ? { line: tsError.lineNumber, column: tsError.column } - : undefined; - return Result.err(createFileParseError(filePath, tsError.message || 'Unknown parse error', location, error)); - } - const results = []; - const skippedDirectives = []; - const comments = ast.comments ?? []; - // Create regex builders for directive detection using registry configuration - const builders = createRegexBuilders(effectiveRegistry.tagPrefix, effectiveRegistry.fileOptInTag); - for (const comment of comments) { - if (comment.type !== 'Block') - continue; - const commentText = comment.value; - if (!builders.hasDocDirectives(commentText)) - continue; - // Extract directive information (with schema validation) - if (!comment.loc) - continue; // Skip if no location info - const directiveResult = parseDirective(commentText, comment.loc, filePath, effectiveRegistry); - if (Result.isErr(directiveResult)) { - // Collect directive validation errors instead of silently skipping - skippedDirectives.push(directiveResult.error); - continue; - } - const directive = directiveResult.value; - if (directive.tags.length === 0) - continue; - // Find the code block following this comment - const codeBlock = extractCodeBlockAfterComment(content, ast, comment); - if (!codeBlock) - continue; - // Extract exports from the code block (DD-1: thread content for signature slicing) - const exports = extractExportsFromBlock(ast, codeBlock, content); - results.push({ - directive, - code: codeBlock.code, - exports, - }); - } - return Result.ok({ directives: results, skippedDirectives }); -} -/** - * Parse JSDoc comment to extract directive information - * - * **Schema-First Enforcement**: Validates constructed directive against schema - * to ensure data integrity at the boundary. - * - * **Directive-Level Tag Extraction**: Only extracts `@libar-docs-*` tags from - * the directive section (first lines before description content). Tags mentioned - * in descriptions, examples, or other sections are NOT extracted. - * - * JSDoc structure: - * ``` - * /** - * * @libar-docs-core @libar-docs-api <- Directive tags (extracted) - * * - * * Description mentioning @libar-docs-x <- NOT extracted - * * @example - * * hasTag('@libar-docs-y'); <- NOT extracted - * *\/ - * ``` - */ -function parseDirective(commentText, loc, filePath, registry) { - const lines = commentText.split('\n').map((l) => l.trim().replace(/^\*\s?/, '')); - // Build registry-based regex patterns for directive parsing - const patterns = buildDirectivePatterns(registry); - const valueTakingTagsRegex = new RegExp(buildValueTakingTagsPattern(registry)); - // Extract directive tags ONLY from directive section - // Directive section = lines where tags appear at the START (not mentioned in text) - // A directive tag line: "@libar-docs-core @libar-docs-api Some brief description" - // A description line: "This works with @libar-docs-api patterns" (tag not at start) - const tags = []; - let inlineDescription = ''; // Capture description on same line as tags - for (const line of lines) { - const trimmedLine = line.trim(); - // Skip empty lines at the start (before we've found any tags) - if (trimmedLine === '' && tags.length === 0) - continue; - // Stop at empty lines after we've found tags (description section started) - if (trimmedLine === '' && tags.length > 0) - break; - // Check if line starts with a standard JSDoc tag (@param, @returns, @example, etc.) - // but NOT our doc directives - if (patterns.nonOptInAtTagPattern.exec(trimmedLine)) { - break; // Stop at other @ tags - } - // Check if line STARTS with opt-in or directive tag - // e.g., @libar-docs (no suffix) = file opt-in tag - // e.g., @libar-docs-* (with suffix) = section tag to extract - const startsWithDocTag = patterns.startsWithOptInOrDirective.exec(trimmedLine); - if (startsWithDocTag) { - // This is a directive line - extract only directive tags (with suffix) - // Skip opt-in tag (no suffix) which is just the opt-in marker - // e.g., "@libar-docs @libar-docs-core Brief description" extracts only @libar-docs-core - let match; - let lastTagEnd = 0; - patterns.tagRegex.lastIndex = 0; - while ((match = patterns.tagRegex.exec(trimmedLine)) !== null) { - // Only extract tags that are at the start (consecutive, separated by whitespace or opt-in) - const textBefore = trimmedLine.slice(lastTagEnd, match.index).trim(); - // Allow opt-in tag and whitespace between directive tags - const cleanedBefore = textBefore.replace(patterns.optInTagPattern, '').trim(); - if (lastTagEnd > 0 && cleanedBefore !== '') { - // There's non-whitespace content between tags - this tag is in description - break; - } - tags.push(match[0]); - lastTagEnd = match.index + match[0].length; - } - // Capture any description text after the tags on the same line - // e.g., "@libar-docs-core Brief description on same line" -> "Brief description on same line" - // But skip lines with metadata directives that take values (all non-flag tags) - // to prevent their values from leaking into the description - // (e.g., "@libar-docs-phase 01" would incorrectly capture "01") - const hasMetadataDirective = valueTakingTagsRegex.test(trimmedLine); - if (!hasMetadataDirective) { - const textAfterTags = trimmedLine - .slice(lastTagEnd) - .replace(patterns.optInTagPattern, '') // Remove any opt-in markers - .trim(); - if (textAfterTags) { - inlineDescription = textAfterTags; - } - } - // Continue to next line - there might be more directive tags - } - else { - // Line doesn't start with doc tag - it's description content - break; - } - } - // Data-driven metadata extraction using registry - // Build map of metadata tag results: tagName -> extracted value - const metadataResults = new Map(); - for (const tagDef of registry.metadataTags) { - const result = extractMetadataTag(commentText, tagDef, registry.tagPrefix); - if (result !== undefined) { - metadataResults.set(tagDef.tag, result); - } - } - // Map extracted metadata to directive fields - // This mapping translates registry tag names to DocDirective field names - const patternName = metadataResults.get('pattern'); - const status = metadataResults.get('status'); - const isCore = metadataResults.get('core'); - const useCases = metadataResults.get('usecase'); - const uses = metadataResults.get('uses'); - const usedBy = metadataResults.get('used-by'); - const phase = metadataResults.get('phase'); - const brief = metadataResults.get('brief'); - const dependsOn = metadataResults.get('depends-on'); - const enables = metadataResults.get('enables'); - // UML-inspired relationship tags (PatternRelationshipModel) - const implementsPatterns = metadataResults.get('implements'); - const extendsPattern = metadataResults.get('extends'); - // Cross-reference and API navigation tags (PatternRelationshipModel enhancement) - const seeAlso = metadataResults.get('see-also'); - const apiRef = metadataResults.get('api-ref'); - // Architecture diagram generation tags - const archRole = metadataResults.get('arch-role'); - const archContext = metadataResults.get('arch-context'); - const archLayer = metadataResults.get('arch-layer'); - const includeRaw = metadataResults.get('include'); - const include = Array.isArray(includeRaw) ? includeRaw : undefined; - // Design session stub metadata tags - const target = metadataResults.get('target'); - const since = metadataResults.get('since'); - // Shape extraction tags - const extractShapes = metadataResults.get('extract-shapes'); - // PRD metadata tags (product area, user role, business value) - const productArea = metadataResults.get('product-area'); - // Convention tags for reference document generation - const convention = metadataResults.get('convention'); - // Extract "### When to Use" section or "**When to use:**" inline format - // Returns array of bullet points, stopping at section boundaries - // This is a special format that extracts from description, not a metadata tag - const whenToUse = extractWhenToUse(commentText, registry.fileOptInTag); - // Extract description and examples - const descriptionLines = []; - const examples = []; - let inExample = false; - let exampleBuffer = []; - for (const line of lines) { - if (line.startsWith('@example')) { - inExample = true; - if (exampleBuffer.length > 0) { - examples.push(exampleBuffer.join('\n')); - exampleBuffer = []; - } - continue; - } - if (line.startsWith('@param') || line.startsWith('@returns') || line.startsWith('@')) { - if (inExample && exampleBuffer.length > 0) { - examples.push(exampleBuffer.join('\n')); - exampleBuffer = []; - } - inExample = false; - continue; - } - if (inExample) { - // Remove code fence markers - if (!line.startsWith('```')) { - exampleBuffer.push(line); - } - } - else if (!line.startsWith('@')) { - descriptionLines.push(line); - } - } - if (exampleBuffer.length > 0) { - examples.push(exampleBuffer.join('\n')); - } - // Build directive object - // Combine inline description (from same line as tags) with multi-line description - const fullDescription = inlineDescription - ? [inlineDescription, ...descriptionLines].join('\n').trim() - : descriptionLines.join('\n').trim(); - const directive = { - tags: tags.map((tag) => asDirectiveTag(tag)), - description: fullDescription, - examples, - position: { - startLine: loc.start.line, - endLine: loc.end.line, - }, - // Include optional fields only if present - ...(patternName && { patternName }), - ...(status && { status }), - ...(isCore && { isCore }), - ...(useCases && useCases.length > 0 && { useCases }), - ...(whenToUse && { whenToUse }), - ...(uses && uses.length > 0 && { uses }), - ...(usedBy && usedBy.length > 0 && { usedBy }), - ...(phase !== undefined && { phase }), - ...(brief && { brief }), - ...(dependsOn && dependsOn.length > 0 && { dependsOn }), - ...(enables && enables.length > 0 && { enables }), - // UML-inspired relationship fields (PatternRelationshipModel) - ...(implementsPatterns && implementsPatterns.length > 0 && { implements: implementsPatterns }), - ...(extendsPattern && { extends: extendsPattern }), - // Cross-reference and API navigation fields (PatternRelationshipModel enhancement) - ...(seeAlso && seeAlso.length > 0 && { seeAlso }), - ...(apiRef && apiRef.length > 0 && { apiRef }), - // Design session stub metadata fields - ...(target && { target }), - ...(since && { since }), - // Architecture diagram generation fields - ...(archRole && { archRole }), - ...(archContext && { archContext }), - ...(archLayer && { archLayer }), - ...(include && include.length > 0 && { include }), - // Shape extraction fields - ...(extractShapes && extractShapes.length > 0 && { extractShapes }), - // PRD metadata fields - ...(productArea && { productArea }), - // Convention tags for reference document generation - ...(convention && convention.length > 0 && { convention }), - }; - // Validate against schema (schema-first enforcement) - const validation = DocDirectiveSchema.safeParse(directive); - if (!validation.success) { - const error = createDirectiveValidationError(filePath, loc.start.line, 'Invalid directive structure', commentText.substring(0, 100)); - return Result.err(error); - } - return Result.ok(validation.data); -} -/** - * Extract code block immediately following a comment - */ -function extractCodeBlockAfterComment(content, ast, comment) { - if (!comment.range) - return null; - const commentEnd = comment.range[1]; - // Find the first meaningful AST node after this comment - const nextNode = findNextNodeAfterPosition(ast, commentEnd); - if (!nextNode?.range || !nextNode.loc) - return null; - const lines = content.split('\n'); - const startLine = nextNode.loc.start.line; - const endLine = nextNode.loc.end.line; - // Extract the code block - const codeLines = lines.slice(startLine - 1, endLine); - return { - code: codeLines.join('\n'), - startLine, - endLine, - }; -} -/** - * Find the first AST node after a given position - */ -function findNextNodeAfterPosition(ast, position) { - for (const node of ast.body) { - if (node.range && node.range[0] > position) { - return node; - } - } - return null; -} -/** - * Extract export information from a code block - */ -function extractExportsFromBlock(ast, block, sourceCode) { - const exports = []; - for (const node of ast.body) { - if (!node.loc) - continue; - if (node.loc.start.line < block.startLine || node.loc.end.line > block.endLine) - continue; - if (node.type === 'ExportNamedDeclaration') { - if (node.declaration) { - exports.push(...extractFromDeclaration(node.declaration, sourceCode)); - } - // Handle re-exports like: export { foo, bar } from './module' - // or type exports: export type { Foo } from './module' - if (node.specifiers) { - // Check if parent ExportNamedDeclaration is type-only - const isTypeExport = node.exportKind === 'type'; - for (const spec of node.specifiers) { - if (spec.type === 'ExportSpecifier') { - // TypeScript 5.9.0+: exported can be Identifier or Literal (StringLiteral) - // Handles cases like: export { "foo-bar" as baz } from './module' - // Type union exhaustion: only Identifier and Literal are valid types here - const exportedName = spec.exported.type === 'Identifier' - ? spec.exported.name - : spec.exported.value; // Literal type - extract value - exports.push({ - name: exportedName, - type: isTypeExport ? 'type' : 'const', - }); - } - } - } - } - else if (node.type === 'ExportDefaultDeclaration') { - exports.push({ - name: 'default', - type: getExportType(node.declaration), - }); - } - } - return exports; -} -/** - * Build a clean function signature from AST node and source code. - * - * DD-1: Uses AST body range to precisely locate the function body start, - * then slices everything before it as the signature. This avoids flawed - * brace-matching that fails on object parameter types like `{ timeout: number }`. - * Strips `export ` prefix but keeps `async` (semantically meaningful). - */ -function buildFunctionSignature(declaration, sourceCode) { - // Use AST body range for precise body location (no brace-matching needed) - if (declaration.body) { - const bodyStart = declaration.body.range[0]; - const declStart = declaration.range[0]; - const beforeBody = sourceCode.slice(declStart, bodyStart); - // Strip 'export ' prefix for clean display - const withoutExport = beforeBody.startsWith('export ') - ? beforeBody.slice('export '.length) - : beforeBody; - return withoutExport.trim() + ';'; - } - // Fallback for declarations without body (ambient/abstract) - const fullText = sourceCode.slice(declaration.range[0], declaration.range[1]); - return fullText.startsWith('export ') ? fullText.slice('export '.length).trim() : fullText.trim(); -} -/** - * Extract exports from a declaration node - */ -function extractFromDeclaration(declaration, sourceCode) { - const exports = []; - switch (declaration.type) { - case 'FunctionDeclaration': - if (declaration.id) { - exports.push({ - name: declaration.id.name, - type: 'function', - signature: buildFunctionSignature(declaration, sourceCode), - }); - } - break; - case 'VariableDeclaration': - for (const declarator of declaration.declarations) { - if (declarator.id.type === 'Identifier') { - exports.push({ - name: declarator.id.name, - type: 'const', - }); - } - } - break; - case 'TSTypeAliasDeclaration': - exports.push({ - name: declaration.id.name, - type: 'type', - }); - break; - case 'TSInterfaceDeclaration': - exports.push({ - name: declaration.id.name, - type: 'interface', - }); - break; - case 'ClassDeclaration': - if (declaration.id) { - exports.push({ - name: declaration.id.name, - type: 'class', - }); - } - break; - case 'TSEnumDeclaration': - if (declaration.id) { - exports.push({ - name: declaration.id.name, - type: 'enum', - }); - } - break; - } - return exports; -} -/** - * Get export type from declaration - */ -function getExportType(declaration) { - switch (declaration.type) { - case 'FunctionDeclaration': - return 'function'; - case 'ClassDeclaration': - return 'class'; - case 'TSInterfaceDeclaration': - return 'interface'; - case 'TSTypeAliasDeclaration': - return 'type'; - default: - return 'const'; - } -} -/** - * Extract "When to Use" bullet points from JSDoc comment - * - * Handles two formats: - * - Heading format: `### When to Use\n- bullet 1\n- bullet 2` - * - Inline format: `**When to use:** Single line description` - * - * Key improvements over naive regex: - * - Strips JSDoc `* ` markers before matching - * - Only captures actual bullet points (lines starting with `- ` or `* `) - * - Stops at section boundaries (empty lines, headings, tables, JSDoc tags) - * - * **Limitation:** Multi-line bullets (continuation lines) are not supported. - * Each bullet must be a single line. For example: - * ``` - * ### When to Use - * - This works (single line) - * - This is broken because it - * continues on the next line // <-- Not captured - * ``` - * Recommendation: Keep all bullet points as single lines. - * - * @param commentText - Raw JSDoc comment content - * @param fileOptInTag - The file opt-in tag (e.g., "@docs" or "@libar-docs") - * @returns Array of bullet point strings, or undefined if no "When to Use" section - */ -function extractWhenToUse(commentText, fileOptInTag) { - // Strip JSDoc markers and normalize lines - const cleanedLines = commentText.split('\n').map((line) => line - .trim() - .replace(/^\*\s?/, '') - .trim()); - const cleanedText = cleanedLines.join('\n'); - // Try heading format first: ### When to Use - const headingMatch = /###\s*When to Use\s*\n/i.exec(cleanedText); - if (headingMatch) { - const startIndex = headingMatch.index + headingMatch[0].length; - const afterHeading = cleanedText.slice(startIndex); - const lines = afterHeading.split('\n'); - const bullets = []; - for (const line of lines) { - const trimmed = line.trim(); - // Stop conditions: empty line, new heading, table, JSDoc tag (but not doc directives) - if (trimmed === '') - break; - if (trimmed.startsWith('#')) - break; - if (trimmed.startsWith('|')) - break; - if (trimmed.startsWith('@') && !trimmed.startsWith(fileOptInTag)) - break; - // Extract bullet point content (must start with - or * followed by space) - const bulletMatch = /^[-*]\s+(.+)$/.exec(trimmed); - if (bulletMatch?.[1]) { - bullets.push(bulletMatch[1].trim()); - } - else { - // Line doesn't start with bullet - stop extraction - break; - } - } - if (bullets.length > 0) { - return bullets; - } - } - // Try inline format: **When to use:** description - const inlineMatch = /\*\*When to use:\*\*\s*([^\n]+)/i.exec(cleanedText); - if (inlineMatch?.[1]) { - const description = inlineMatch[1].trim(); - if (description) { - return [description]; - } - } - return undefined; -} -//# sourceMappingURL=ast-parser.js.map \ No newline at end of file diff --git a/dist/scanner/ast-parser.js.map b/dist/scanner/ast-parser.js.map deleted file mode 100644 index 3e19c596..00000000 --- a/dist/scanner/ast-parser.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ast-parser.js","sourceRoot":"","sources":["../../src/scanner/ast-parser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAgB,MAAM,sCAAsC,CAAC;AAQ3E,OAAO,EACL,cAAc,EACd,8BAA8B,EAC9B,oBAAoB,GACrB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,kBAAkB,EAClB,wBAAwB,GAGzB,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAElE;;;;;;;;GAQG;AACH,MAAM,WAAW,GAAG,IAAI,GAAG,EAAkB,CAAC;AAE9C;;;;;;;;GAQG;AACH,SAAS,cAAc,CAAC,OAAe,EAAE,KAAc;IACrD,MAAM,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,OAAO,IAAI,KAAK,EAAE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AC,CAAC,EAAE,CAAC;gBACrB,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;YACtC,CAAC;iBAAM,CAAC;gBACN,mDAAmD;gBACnD,MAAM;YACR,CAAC;QACH,CAAC;QAED,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACvB,OAAO,OAAO,CAAC;QACjB,CAAC;IACH,CAAC;IAED,kDAAkD;IAClD,MAAM,WAAW,GAAG,kCAAkC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACzE,IAAI,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACrB,MAAM,WAAW,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QAC1C,IAAI,WAAW,EAAE,CAAC;YAChB,OAAO,CAAC,WAAW,CAAC,CAAC;QACvB,CAAC;IACH,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC"} \ No newline at end of file diff --git a/dist/scanner/gherkin-ast-parser.d.ts b/dist/scanner/gherkin-ast-parser.d.ts deleted file mode 100644 index 4094b117..00000000 --- a/dist/scanner/gherkin-ast-parser.d.ts +++ /dev/null @@ -1,159 +0,0 @@ -/** - * @libar-docs - * @libar-docs-scanner - * @libar-docs-pattern GherkinASTParser - * @libar-docs-status completed - * @libar-docs-implements GherkinRulesSupport - * @libar-docs-uses GherkinTypes - * @libar-docs-used-by GherkinScanner - * @libar-docs-arch-role infrastructure - * @libar-docs-arch-context scanner - * @libar-docs-arch-layer infrastructure - * - * ## GherkinASTParser - Parse Feature Files Using Cucumber Gherkin - * - * Parses Gherkin feature files using @cucumber/gherkin and extracts structured data - * including feature metadata, tags, scenarios, and steps. - * - * ### Supported Formats - * - * - **Classic Gherkin** (`.feature`) - Standard Gherkin syntax - * - **MDG - Markdown with Gherkin** (`.feature.md`) - Rich Markdown with embedded Gherkin - * - * MDG files use Markdown headers for keywords (`# Feature:`, `## Scenario:`) and - * list items for steps (`* Given`, `* When`, `* Then`). They render beautifully - * in GitHub while remaining parseable for documentation generation. - * - * ### Rule Keyword Support - * - * Both formats support the Gherkin v6+ `Rule:` keyword for grouping scenarios - * under business rules. Scenarios inside Rules are extracted with a synthetic - * `rule:Rule-Name` tag for traceability. - * - * ### When to Use - * - * - When parsing Gherkin .feature files for pattern extraction - * - When parsing MDG .feature.md files for PRD generation - * - When converting acceptance criteria to documentation - * - When building multi-source documentation pipelines - */ -import { type GherkinFeature, type GherkinScenario, type GherkinFileError, type GherkinBackground, type GherkinRule } from '../validation-schemas/feature.js'; -import type { Result } from '../types/index.js'; -import { type ProcessStatusValue, type AdrStatusValue, type HierarchyLevel } from '../taxonomy/index.js'; -/** - * Result of parsing a single feature file - */ -export interface ParsedFeatureFile { - readonly feature: GherkinFeature; - readonly background?: GherkinBackground; - /** Rules with their nested scenarios (Gherkin v6+) */ - readonly rules?: readonly GherkinRule[]; - /** All scenarios (including those flattened from Rules for backward compat) */ - readonly scenarios: readonly GherkinScenario[]; -} -/** - * Parse a Gherkin feature file and extract structured data - * - * @param content - Feature file content - * @param filePath - Path to the feature file (for error reporting) - * @returns Result containing parsed feature data or error - * - * @example - * ```typescript - * const content = ` - * @pattern:MyPattern @phase:15 @status:roadmap - * Feature: My Pattern - * A description of the pattern. - * - * @acceptance-criteria - * Scenario: Happy path - * Given initial state - * When action occurs - * Then outcome happens - * `; - * - * const result = parseFeatureFile(content, 'my-pattern.feature'); - * if (result.ok) { - * const { feature, scenarios } = result.value; - * console.log(feature.name); // "My Pattern" - * console.log(feature.tags); // ["pattern:MyPattern", "phase:15", "status:roadmap"] - * console.log(scenarios.length); // 1 - * } - * ``` - */ -export declare function parseFeatureFile(content: string, filePath: string): Result; -/** - * Extract pattern-related tags from feature tags - * - * Maps Gherkin tags like @pattern:Name, @phase:15, @status:roadmap - * to pattern metadata. - * - * @param tags - Array of tag strings (without @ prefix) - * @returns Object with pattern metadata - * - * @example - * ```typescript - * const tags = ["pattern:MyPattern", "phase:15", "status:roadmap", "depends-on:OtherPattern"]; - * const metadata = extractPatternTags(tags); - * // { - * // pattern: "MyPattern", - * // phase: 15, - * // status: "roadmap", - * // dependsOn: ["OtherPattern"] - * // } - * ``` - */ -export declare function extractPatternTags(tags: readonly string[]): { - readonly pattern?: string; - readonly phase?: number; - readonly release?: string; - readonly status?: ProcessStatusValue; - readonly dependsOn?: readonly string[]; - readonly enables?: readonly string[]; - readonly implementsPatterns?: readonly string[]; - readonly extendsPattern?: string; - readonly seeAlso?: readonly string[]; - readonly apiRef?: readonly string[]; - readonly brief?: string; - readonly categories?: readonly string[]; - readonly quarter?: string; - readonly completed?: string; - readonly effort?: string; - readonly effortActual?: string; - readonly team?: string; - readonly workflow?: string; - readonly risk?: string; - readonly priority?: string; - readonly productArea?: string; - readonly userRole?: string; - readonly businessValue?: string; - readonly level?: HierarchyLevel; - readonly parent?: string; - readonly title?: string; - readonly behaviorFile?: string; - readonly discoveredGaps?: readonly string[]; - readonly discoveredImprovements?: readonly string[]; - readonly discoveredRisks?: readonly string[]; - readonly discoveredLearnings?: readonly string[]; - readonly constraints?: readonly string[]; - readonly adr?: string; - readonly adrStatus?: AdrStatusValue; - readonly adrCategory?: string; - readonly adrSupersedes?: string; - readonly adrSupersededBy?: string; - readonly adrTheme?: string; - readonly adrLayer?: string; - readonly target?: string; - readonly since?: string; - readonly convention?: readonly string[]; - readonly executableSpecs?: readonly string[]; - readonly roadmapSpec?: string; - readonly archRole?: string; - readonly archContext?: string; - readonly archLayer?: string; - readonly include?: readonly string[]; - readonly extractShapes?: readonly string[]; - readonly usecase?: string; - readonly [key: string]: unknown; -}; -//# sourceMappingURL=gherkin-ast-parser.d.ts.map \ No newline at end of file diff --git a/dist/scanner/gherkin-ast-parser.d.ts.map b/dist/scanner/gherkin-ast-parser.d.ts.map deleted file mode 100644 index ff79c589..00000000 --- a/dist/scanner/gherkin-ast-parser.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"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G,EAAE,MAAM,GAAG,OAAO,CAAC;CACjC,CAmFA"} \ No newline at end of file diff --git a/dist/scanner/gherkin-ast-parser.js b/dist/scanner/gherkin-ast-parser.js deleted file mode 100644 index 376bf873..00000000 --- a/dist/scanner/gherkin-ast-parser.js +++ /dev/null @@ -1,507 +0,0 @@ -/** - * @libar-docs - * @libar-docs-scanner - * @libar-docs-pattern GherkinASTParser - * @libar-docs-status completed - * @libar-docs-implements GherkinRulesSupport - * @libar-docs-uses GherkinTypes - * @libar-docs-used-by GherkinScanner - * @libar-docs-arch-role infrastructure - * @libar-docs-arch-context scanner - * @libar-docs-arch-layer infrastructure - * - * ## GherkinASTParser - Parse Feature Files Using Cucumber Gherkin - * - * Parses Gherkin feature files using @cucumber/gherkin and extracts structured data - * including feature metadata, tags, scenarios, and steps. - * - * ### Supported Formats - * - * - **Classic Gherkin** (`.feature`) - Standard Gherkin syntax - * - **MDG - Markdown with Gherkin** (`.feature.md`) - Rich Markdown with embedded Gherkin - * - * MDG files use Markdown headers for keywords (`# Feature:`, `## Scenario:`) and - * list items for steps (`* Given`, `* When`, `* Then`). They render beautifully - * in GitHub while remaining parseable for documentation generation. - * - * ### Rule Keyword Support - * - * Both formats support the Gherkin v6+ `Rule:` keyword for grouping scenarios - * under business rules. Scenarios inside Rules are extracted with a synthetic - * `rule:Rule-Name` tag for traceability. - * - * ### When to Use - * - * - When parsing Gherkin .feature files for pattern extraction - * - When parsing MDG .feature.md files for PRD generation - * - When converting acceptance criteria to documentation - * - When building multi-source documentation pipelines - */ -import { Parser, AstBuilder, GherkinClassicTokenMatcher, GherkinInMarkdownTokenMatcher, } from '@cucumber/gherkin'; -import * as Messages from '@cucumber/messages'; -import { GherkinFeatureSchema, GherkinScenarioSchema, GherkinBackgroundSchema, GherkinRuleSchema, } from '../validation-schemas/feature.js'; -import { Result as R } from '../types/index.js'; -import { buildRegistry, } from '../taxonomy/index.js'; -import { createRegexBuilders } from '../config/regex-builders.js'; -import { createDefaultTagRegistry } from '../validation-schemas/tag-registry.js'; -/** - * Default regex builders for tag normalization. - * Uses the default registry configuration. - */ -const DEFAULT_BUILDERS = (() => { - const registry = createDefaultTagRegistry(); - return createRegexBuilders(registry.tagPrefix, registry.fileOptInTag); -})(); -/** - * Module-level lookup map from tag name to its registry definition. - * Built once from the TagRegistry, reused across all extractPatternTags() calls. - */ -const TAG_LOOKUP = new Map(buildRegistry().metadataTags.map((def) => [def.tag, def])); -/** Convert kebab-case to camelCase (e.g., "depends-on" → "dependsOn") */ -function kebabToCamel(s) { - return s.replace(/-([a-z])/g, (_, c) => c.toUpperCase()); -} -/** - * Normalize a Gherkin tag by stripping prefixes - * - * Removes `@` prefix and then the configured tag prefix (from registry) - * to produce a canonical tag name. - * - * @param tag - Tag string to normalize (e.g., "@libar-docs-pattern:MyPattern") - * @param registry - Optional TagRegistry for custom prefix configuration - * @returns Normalized tag name (e.g., "pattern:MyPattern") - * - * @example - * normalizeTag("@libar-docs-pattern:MyPattern") // "pattern:MyPattern" - * normalizeTag("@acceptance-criteria") // "acceptance-criteria" - * - * // With custom registry - * const registry = { tagPrefix: "@docs-", fileOptInTag: "@docs", ... }; - * normalizeTag("@docs-pattern:MyPattern", registry) // "pattern:MyPattern" - */ -function normalizeTag(tag, registry) { - // Use registry-based builders if provided, otherwise use defaults - const builders = registry - ? createRegexBuilders(registry.tagPrefix, registry.fileOptInTag) - : DEFAULT_BUILDERS; - // Normalize using the registry-configured prefix - let normalized = builders.normalizeTag(tag); - // Strip @ prefix if still present after normalization - if (normalized.startsWith('@')) { - normalized = normalized.substring(1); - } - return normalized; -} -/** - * Extract a DataTable from a Cucumber Messages DataTable - * - * Converts the Cucumber AST DataTable format to our simplified structure - * with headers and row objects. - * - * @param dataTable - Cucumber Messages DataTable - * @returns GherkinDataTable with headers and rows - */ -function extractDataTable(dataTable) { - const rows = dataTable.rows; - if (rows.length === 0) { - return { headers: [], rows: [] }; - } - // First row is headers - const headerRow = rows[0]; - const headers = headerRow?.cells.map((cell) => cell.value) ?? []; - // Remaining rows are data - const dataRows = []; - for (let i = 1; i < rows.length; i++) { - const row = rows[i]; - if (!row) - continue; - const rowObj = {}; - for (let j = 0; j < headers.length; j++) { - const header = headers[j]; - const cell = row.cells[j]; - if (header !== undefined) { - rowObj[header] = cell?.value ?? ''; - } - } - dataRows.push(rowObj); - } - return { headers, rows: dataRows }; -} -/** - * Extract steps from Cucumber AST steps, including DataTables and DocStrings - * - * @param steps - Cucumber AST steps - * @returns Array of GherkinStep with optional dataTable and docString - */ -function extractSteps(steps) { - return steps.map((step) => { - const gherkinStep = { - keyword: step.keyword.trim(), - text: step.text, - ...(step.dataTable && { dataTable: extractDataTable(step.dataTable) }), - ...(step.docString && { - docString: { - content: step.docString.content, - ...(step.docString.mediaType && { mediaType: step.docString.mediaType }), - }, - }), - }; - return gherkinStep; - }); -} -/** - * Extract Examples tables from a Scenario Outline - * - * Converts Cucumber AST Examples tables to our simplified structure with - * headers and row objects. Each Examples block can have its own name and tags. - * - * @param examples - Cucumber AST Examples array from a Scenario Outline - * @param registry - Optional TagRegistry for tag normalization - * @returns Array of GherkinExamples with headers and rows - */ -function extractExamples(examples, registry) { - return examples - .filter((ex) => ex.tableHeader) // Only process examples with valid headers - .map((ex) => { - // Extract headers from tableHeader - const headers = ex.tableHeader?.cells.map((c) => c.value) ?? []; - // Extract rows as header->value maps - const rows = ex.tableBody.map((row) => { - const rowObj = {}; - headers.forEach((h, i) => { - rowObj[h] = row.cells[i]?.value ?? ''; - }); - return rowObj; - }); - const desc = ex.description.trim(); - return { - name: ex.name, - ...(desc && { description: desc }), - tags: ex.tags.map((t) => normalizeTag(t.name, registry)), - headers, - rows, - line: ex.location.line, - }; - }); -} -/** - * Parse a Gherkin feature file and extract structured data - * - * @param content - Feature file content - * @param filePath - Path to the feature file (for error reporting) - * @returns Result containing parsed feature data or error - * - * @example - * ```typescript - * const content = ` - * @pattern:MyPattern @phase:15 @status:roadmap - * Feature: My Pattern - * A description of the pattern. - * - * @acceptance-criteria - * Scenario: Happy path - * Given initial state - * When action occurs - * Then outcome happens - * `; - * - * const result = parseFeatureFile(content, 'my-pattern.feature'); - * if (result.ok) { - * const { feature, scenarios } = result.value; - * console.log(feature.name); // "My Pattern" - * console.log(feature.tags); // ["pattern:MyPattern", "phase:15", "status:roadmap"] - * console.log(scenarios.length); // 1 - * } - * ``` - */ -export function parseFeatureFile(content, filePath) { - try { - // Detect MDG (Markdown with Gherkin) format based on file extension - // MDG files use .feature.md extension and require GherkinInMarkdownTokenMatcher - const isMDG = filePath.endsWith('.feature.md'); - const tokenMatcher = isMDG - ? new GherkinInMarkdownTokenMatcher() - : new GherkinClassicTokenMatcher(); - const parser = new Parser(new AstBuilder(Messages.IdGenerator.uuid()), tokenMatcher); - const gherkinDocument = parser.parse(content); - if (!gherkinDocument.feature) { - return R.err({ - file: filePath, - error: { - message: 'No feature found in file', - }, - }); - } - const cucumberFeature = gherkinDocument.feature; - // Extract feature-level data - const feature = { - name: cucumberFeature.name, - description: cucumberFeature.description.trim(), - tags: cucumberFeature.tags.map((tag) => normalizeTag(tag.name)), - language: cucumberFeature.language, - line: cucumberFeature.location.line, - }; - // Extract background (if present) - let background; - // Extract rules (Gherkin v6+ business rule groupings) - const rules = []; - // Extract scenarios (including those nested inside Rules for backward compat) - const scenarios = []; - for (const child of cucumberFeature.children) { - // Handle Background section - if (child.background) { - const bg = child.background; - const desc = bg.description.trim(); - background = { - name: bg.name, - // Use spread to conditionally include description (exactOptionalPropertyTypes) - ...(desc && { description: desc }), - steps: extractSteps(bg.steps), - line: bg.location.line, - }; - } - // Handle Scenario (at feature level) - else if (child.scenario) { - const scenario = child.scenario; - const examples = extractExamples(scenario.examples); - scenarios.push({ - name: scenario.name, - description: scenario.description.trim(), - tags: scenario.tags.map((tag) => normalizeTag(tag.name)), - steps: extractSteps(scenario.steps), - ...(examples.length > 0 && { examples }), - line: scenario.location.line, - }); - } - // Handle Rule keyword (Gherkin v6+) - capture as first-class entity - // Rules group scenarios under business rules with rich descriptions - else if (child.rule) { - const cucumberRule = child.rule; - const ruleTags = cucumberRule.tags.map((tag) => normalizeTag(tag.name)); - const ruleScenarios = []; - // Extract scenarios nested inside the Rule - for (const ruleChild of cucumberRule.children) { - if (ruleChild.scenario) { - const scenario = ruleChild.scenario; - const scenarioTags = scenario.tags.map((tag) => normalizeTag(tag.name)); - const examples = extractExamples(scenario.examples); - const parsedScenario = { - name: scenario.name, - description: scenario.description.trim(), - tags: scenarioTags, - steps: extractSteps(scenario.steps), - ...(examples.length > 0 && { examples }), - line: scenario.location.line, - }; - // Add to rule's scenarios - ruleScenarios.push(parsedScenario); - // Also add to flat scenarios for backward compat - // Include rule context in scenario tags for traceability - const ruleNameTag = `rule:${cucumberRule.name.replace(/\s+/g, '-')}`; - scenarios.push({ - ...parsedScenario, - // Merge rule tags with scenario tags, add rule context - tags: [...ruleTags, ...scenarioTags, ruleNameTag], - }); - } - // Handle Background inside Rule - else if (ruleChild.background && !background) { - const bg = ruleChild.background; - const desc = bg.description.trim(); - background = { - name: bg.name, - ...(desc && { description: desc }), - steps: extractSteps(bg.steps), - line: bg.location.line, - }; - } - } - // Add the rule with its scenarios - rules.push({ - name: cucumberRule.name, - description: cucumberRule.description.trim(), - tags: ruleTags, - scenarios: ruleScenarios, - line: cucumberRule.location.line, - }); - } - } - // Validate parsed data against schemas (schema-first enforcement) - const featureValidation = GherkinFeatureSchema.safeParse(feature); - if (!featureValidation.success) { - return R.err({ - file: filePath, - error: { - message: `Feature validation failed: ${featureValidation.error.issues.map((i) => `${i.path.join('.')}: ${i.message}`).join(', ')}`, - line: feature.line, - }, - }); - } - // Validate background if present - if (background) { - const backgroundValidation = GherkinBackgroundSchema.safeParse(background); - if (!backgroundValidation.success) { - return R.err({ - file: filePath, - error: { - message: `Background validation failed: ${backgroundValidation.error.issues.map((i) => `${i.path.join('.')}: ${i.message}`).join(', ')}`, - line: background.line, - }, - }); - } - } - // Validate scenarios - for (const scenario of scenarios) { - const scenarioValidation = GherkinScenarioSchema.safeParse(scenario); - if (!scenarioValidation.success) { - return R.err({ - file: filePath, - error: { - message: `Scenario "${scenario.name}" validation failed: ${scenarioValidation.error.issues.map((i) => `${i.path.join('.')}: ${i.message}`).join(', ')}`, - line: scenario.line, - }, - }); - } - } - // Validate rules - for (const rule of rules) { - const ruleValidation = GherkinRuleSchema.safeParse(rule); - if (!ruleValidation.success) { - return R.err({ - file: filePath, - error: { - message: `Rule "${rule.name}" validation failed: ${ruleValidation.error.issues.map((i) => `${i.path.join('.')}: ${i.message}`).join(', ')}`, - line: rule.line, - }, - }); - } - } - return R.ok({ - feature: featureValidation.data, - ...(background && { background }), - ...(rules.length > 0 && { rules }), - scenarios, - }); - } - catch (error) { - // Handle Gherkin parse errors - if (error !== null && typeof error === 'object' && 'errors' in error) { - const gherkinError = error; - const firstError = gherkinError.errors[0]; - const errorObj = { - file: filePath, - error: { - message: firstError?.message ?? 'Unknown Gherkin parse error', - ...(firstError?.location?.line !== undefined && { line: firstError.location.line }), - ...(firstError?.location?.column !== undefined && { column: firstError.location.column }), - }, - }; - return R.err(errorObj); - } - // Handle other errors - return R.err({ - file: filePath, - error: { - message: error instanceof Error ? error.message : String(error), - }, - }); - } -} -/** - * Extract pattern-related tags from feature tags - * - * Maps Gherkin tags like @pattern:Name, @phase:15, @status:roadmap - * to pattern metadata. - * - * @param tags - Array of tag strings (without @ prefix) - * @returns Object with pattern metadata - * - * @example - * ```typescript - * const tags = ["pattern:MyPattern", "phase:15", "status:roadmap", "depends-on:OtherPattern"]; - * const metadata = extractPatternTags(tags); - * // { - * // pattern: "MyPattern", - * // phase: 15, - * // status: "roadmap", - * // dependsOn: ["OtherPattern"] - * // } - * ``` - */ -export function extractPatternTags(tags) { - const metadata = {}; - for (const tag of tags) { - const normalized = normalizeTag(tag); - const colonIdx = normalized.indexOf(':'); - if (colonIdx === -1) { - // Check if this is a registered flag-type tag (e.g., 'core') - const flagDef = TAG_LOOKUP.get(normalized); - if (flagDef?.format === 'flag') { - metadata[kebabToCamel(normalized)] = true; - continue; - } - // No colon: category tag (e.g., @ddd, @event-sourcing) - // Skip known non-category tags - if (normalized !== 'acceptance-criteria' && - !normalized.startsWith('happy-path') && - normalized !== 'libar-docs') { - const existing = metadata['categories']; - metadata['categories'] = [...(existing ?? []), normalized]; - } - continue; - } - const tagName = normalized.substring(0, colonIdx); - const rawValue = normalized.substring(colonIdx + 1); - const def = TAG_LOOKUP.get(tagName); - if (def === undefined) - continue; - const key = def.metadataKey ?? kebabToCamel(tagName); - switch (def.format) { - case 'number': { - const num = parseInt(rawValue, 10); - if (!isNaN(num)) { - metadata[key] = num; - } - break; - } - case 'enum': { - if (def.values?.includes(rawValue) === true) { - metadata[key] = rawValue; - } - break; - } - case 'csv': { - const values = rawValue - .split(',') - .map((s) => s.trim()) - .filter((s) => s.length > 0); - const validated = def.values !== undefined - ? values.filter((v) => def.values?.includes(v) === true) - : values; - const transformed = def.transform !== undefined ? validated.map(def.transform) : validated; - const existing = metadata[key]; - metadata[key] = [...(existing ?? []), ...transformed]; - break; - } - case 'flag': { - metadata[key] = true; - break; - } - case 'quoted-value': - case 'value': - default: { - const value = def.transform !== undefined ? def.transform(rawValue) : rawValue; - if (def.repeatable === true) { - const existing = metadata[key]; - metadata[key] = [...(existing ?? []), value]; - } - else { - metadata[key] = value; - } - break; - } - } - } - return metadata; -} -//# sourceMappingURL=gherkin-ast-parser.js.map \ No newline at end of file diff --git a/dist/scanner/gherkin-ast-parser.js.map b/dist/scanner/gherkin-ast-parser.js.map deleted file mode 100644 index fd31adeb..00000000 --- a/dist/scanner/gherkin-ast-parser.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"gherkin-ast-parser.js","sourceRoot":"","sources":["../../src/scanner/gherkin-ast-parser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,OAAO,EACL,MAAM,EACN,UAAU,EACV,0BAA0B,EAC1B,6BAA6B,GAC9B,MAAM,m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anner/gherkin-scanner.d.ts deleted file mode 100644 index cc0e68d7..00000000 --- a/dist/scanner/gherkin-scanner.d.ts +++ /dev/null @@ -1,106 +0,0 @@ -/** - * @libar-docs - * @libar-docs-scanner - * @libar-docs-pattern GherkinScanner - * @libar-docs-status completed - * @libar-docs-implements GherkinRulesSupport - * @libar-docs-uses GherkinASTParser, GherkinTypes - * @libar-docs-used-by DualSourceExtractor, Orchestrator - * @libar-docs-arch-role infrastructure - * @libar-docs-arch-context scanner - * @libar-docs-arch-layer infrastructure - * - * ## GherkinScanner - Multi-Source Pattern Extraction from Feature Files - * - * Scans .feature files for pattern metadata encoded in Gherkin tags. - * Enables roadmap patterns to be defined in acceptance criteria files - * before implementation, supporting specification-first development. - * - * ### When to Use - * - * - When defining roadmap patterns in .feature files - * - When extracting pattern metadata from acceptance criteria - * - When building multi-source documentation (TypeScript + Gherkin) - * - * ### Key Concepts - * - * - **Feature Tags**: @pattern:Name, @phase:N, @status:roadmap map to pattern metadata - * - **Multi-Source**: Patterns can be defined in TypeScript stubs OR Gherkin features - * - **Conflict Detection**: Same pattern name in both sources triggers error - */ -import type { Result } from '../types/index.js'; -import type { GherkinScanResults } from '../validation-schemas/feature.js'; -/** - * Configuration for Gherkin scanner - */ -export interface GherkinScannerConfig { - /** Glob pattern(s) for .feature files */ - readonly patterns: string | readonly string[]; - /** Base directory for resolving patterns (default: cwd) */ - readonly baseDir?: string; - /** Additional glob patterns to exclude */ - readonly exclude?: readonly string[]; -} -/** - * Find all .feature files matching the scanner configuration - * - * @param config - Scanner configuration - * @returns Array of absolute file paths to .feature files - * - * @example - * ```typescript - * const files = await findFeatureFiles({ - * patterns: 'tests/features/**\/*.feature', - * baseDir: '/path/to/project' - * }); - * console.log(files); // ['/path/to/project/tests/features/my-pattern.feature', ...] - * ``` - */ -export declare function findFeatureFiles(config: GherkinScannerConfig): Promise; -/** - * Scan Gherkin feature files and extract pattern metadata - * - * Parses .feature files and extracts: - * - Feature name, description, tags - * - Scenario names, tags, steps - * - Pattern metadata from tags (@pattern:Name, @phase:N, etc.) - * - * **Result Pattern**: Returns Result where: - * - Success contains both successful files AND individual file errors - * - Never fails completely (errors are collected in results) - * - * @param config - Scanner configuration - * @returns Result containing scan results with success and error collections - * - * @example - * ```typescript - * const result = await scanGherkinFiles({ - * patterns: 'tests/features/roadmap/**\/*.feature', - * baseDir: '/path/to/project' - * }); - * - * if (result.ok) { - * const { files, errors } = result.value; - * console.log(`Scanned ${files.length} features successfully`); - * console.log(`Failed to parse ${errors.length} features`); - * - * for (const file of files) { - * console.log(`Feature: ${file.feature.name}`); - * console.log(` Tags: ${file.feature.tags.join(', ')}`); - * console.log(` Scenarios: ${file.scenarios.length}`); - * } - * - * // Handle errors - * for (const { file, error } of errors) { - * console.error(`Failed to parse ${file}: ${error.message}`); - * if (error.line) { - * console.error(` at line ${error.line}${error.column ? `, column ${error.column}` : ''}`); - * } - * } - * } - * ``` - */ -export declare function scanGherkinFiles(config: GherkinScannerConfig): Promise>; -export { parseFeatureFile, extractPatternTags } from './gherkin-ast-parser.js'; -export type { ScannedGherkinFile, GherkinFileError, GherkinScanResults, GherkinBackground, GherkinRule, GherkinStep, GherkinDataTable, GherkinDataTableRow, } from '../validation-schemas/feature.js'; -//# sourceMappingURL=gherkin-scanner.d.ts.map \ No newline at end of file diff --git a/dist/scanner/gherkin-scanner.d.ts.map b/dist/scanner/gherkin-scanner.d.ts.map deleted file mode 100644 index 1a6e5080..00000000 --- a/dist/scanner/gherkin-scanner.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"gherkin-scanner.d.ts","sourceRoot":"","sources":["../../src/scanner/gherkin-scanner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAIH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,KAAK,EAGV,kBAAkB,EACnB,MAAM,kCAAkC,CAAC;AAG1C;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,yCAAyC;IACzC,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAAC;IAC9C,2DAA2D;IAC3D,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,0CAA0C;IAC1C,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACtC;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC,CAc/F;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,oBAAoB,GAC3B,OAAO,CAAC,MAAM,CAAC,kBAAkB,EAAE,KAAK,CAAC,CAAC,CAgD5C;AAED,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC/E,YAAY,EACV,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,kCAAkC,CAAC"} \ No newline at end of file diff --git a/dist/scanner/gherkin-scanner.js b/dist/scanner/gherkin-scanner.js deleted file mode 100644 index b41cf376..00000000 --- a/dist/scanner/gherkin-scanner.js +++ /dev/null @@ -1,149 +0,0 @@ -/** - * @libar-docs - * @libar-docs-scanner - * @libar-docs-pattern GherkinScanner - * @libar-docs-status completed - * @libar-docs-implements GherkinRulesSupport - * @libar-docs-uses GherkinASTParser, GherkinTypes - * @libar-docs-used-by DualSourceExtractor, Orchestrator - * @libar-docs-arch-role infrastructure - * @libar-docs-arch-context scanner - * @libar-docs-arch-layer infrastructure - * - * ## GherkinScanner - Multi-Source Pattern Extraction from Feature Files - * - * Scans .feature files for pattern metadata encoded in Gherkin tags. - * Enables roadmap patterns to be defined in acceptance criteria files - * before implementation, supporting specification-first development. - * - * ### When to Use - * - * - When defining roadmap patterns in .feature files - * - When extracting pattern metadata from acceptance criteria - * - When building multi-source documentation (TypeScript + Gherkin) - * - * ### Key Concepts - * - * - **Feature Tags**: @pattern:Name, @phase:N, @status:roadmap map to pattern metadata - * - **Multi-Source**: Patterns can be defined in TypeScript stubs OR Gherkin features - * - **Conflict Detection**: Same pattern name in both sources triggers error - */ -import * as fs from 'fs/promises'; -import { glob } from 'glob'; -import { Result as R } from '../types/index.js'; -import { parseFeatureFile } from './gherkin-ast-parser.js'; -/** - * Find all .feature files matching the scanner configuration - * - * @param config - Scanner configuration - * @returns Array of absolute file paths to .feature files - * - * @example - * ```typescript - * const files = await findFeatureFiles({ - * patterns: 'tests/features/**\/*.feature', - * baseDir: '/path/to/project' - * }); - * console.log(files); // ['/path/to/project/tests/features/my-pattern.feature', ...] - * ``` - */ -export async function findFeatureFiles(config) { - const defaultExclude = ['node_modules/**', 'dist/**']; - const excludePatterns = config.exclude ? [...defaultExclude, ...config.exclude] : defaultExclude; - const patterns = Array.isArray(config.patterns) ? config.patterns : [config.patterns]; - const files = await glob(patterns, { - cwd: config.baseDir ?? process.cwd(), - ignore: excludePatterns, - absolute: true, - }); - // Filter to only .feature and .feature.md files (MDG format) - return files.filter((file) => file.endsWith('.feature') || file.endsWith('.feature.md')); -} -/** - * Scan Gherkin feature files and extract pattern metadata - * - * Parses .feature files and extracts: - * - Feature name, description, tags - * - Scenario names, tags, steps - * - Pattern metadata from tags (@pattern:Name, @phase:N, etc.) - * - * **Result Pattern**: Returns Result where: - * - Success contains both successful files AND individual file errors - * - Never fails completely (errors are collected in results) - * - * @param config - Scanner configuration - * @returns Result containing scan results with success and error collections - * - * @example - * ```typescript - * const result = await scanGherkinFiles({ - * patterns: 'tests/features/roadmap/**\/*.feature', - * baseDir: '/path/to/project' - * }); - * - * if (result.ok) { - * const { files, errors } = result.value; - * console.log(`Scanned ${files.length} features successfully`); - * console.log(`Failed to parse ${errors.length} features`); - * - * for (const file of files) { - * console.log(`Feature: ${file.feature.name}`); - * console.log(` Tags: ${file.feature.tags.join(', ')}`); - * console.log(` Scenarios: ${file.scenarios.length}`); - * } - * - * // Handle errors - * for (const { file, error } of errors) { - * console.error(`Failed to parse ${file}: ${error.message}`); - * if (error.line) { - * console.error(` at line ${error.line}${error.column ? `, column ${error.column}` : ''}`); - * } - * } - * } - * ``` - */ -export async function scanGherkinFiles(config) { - // Find all feature files to scan - const files = await findFeatureFiles(config); - const scanned = []; - const errors = []; - for (const filePath of files) { - try { - // Read feature file content - const content = await fs.readFile(filePath, 'utf-8'); - // Parse the feature file - const parseResult = parseFeatureFile(content, filePath); - if (R.isErr(parseResult)) { - // Failed to parse - collect error - errors.push(parseResult.error); - continue; - } - const { feature, background, rules, scenarios } = parseResult.value; - // Store scanned file - scanned.push({ - filePath, - feature, - ...(background && { background }), - ...(rules && rules.length > 0 && { rules }), - scenarios, - }); - } - catch (error) { - // Collect filesystem/IO errors - errors.push({ - file: filePath, - error: { - message: error instanceof Error ? error.message : String(error), - }, - }); - continue; - } - } - // Always succeeds - errors are collected in results - return R.ok({ - files: scanned, - errors, - }); -} -export { parseFeatureFile, extractPatternTags } from './gherkin-ast-parser.js'; -//# sourceMappingURL=gherkin-scanner.js.map \ No newline at end of file diff --git a/dist/scanner/gherkin-scanner.js.map b/dist/scanner/gherkin-scanner.js.map deleted file mode 100644 index 64d4e4bf..00000000 --- a/dist/scanner/gherkin-scanner.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"gherkin-scanner.js","sourceRoot":"","sources":["../../src/scanner/gherkin-scanner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,KAAK,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAMhD,OAAO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AM,OAAO,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;YAErD,yBAAyB;YACzB,MAAM,WAAW,GAAG,gBAAgB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;YAExD,IAAI,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,EAAE,CAAC;gBACzB,kCAAkC;gBAClC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;gBAC/B,SAAS;YACX,CAAC;YAED,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,WAAW,CAAC,KAAK,CAAC;YAEpE,qBAAqB;YACrB,OAAO,CAAC,IAAI,CAAC;gBACX,QAAQ;gBACR,OAAO;gBACP,GAAG,CAAC,UAAU,IAAI,EAAE,UAAU,EAAE,CAAC;gBACjC,GAAG,CAAC,KAAK,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC;gBAC3C,SAAS;aACV,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,+BAA+B;YAC/B,MAAM,CAAC,IAAI,CAAC;gBACV,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE;oBACL,OAAO,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;iBAChE;aACF,CAAC,CAAC;YACH,SAAS;QACX,CAAC;IACH,CAAC;IAED,oDAAoD;IACpD,OAAO,CAAC,CAAC,EAAE,CAAC;QACV,KAAK,EAAE,OAAO;QACd,MAAM;KACP,CAAC,CAAC;AACL,CAAC;AAED,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC"} \ No newline at end of file diff --git a/dist/scanner/index.d.ts b/dist/scanner/index.d.ts deleted file mode 100644 index 7a5f2328..00000000 --- a/dist/scanner/index.d.ts +++ /dev/null @@ -1,85 +0,0 @@ -import type { Result, ScannerConfig, DocDirective, ExportInfo, FileParseError, DirectiveValidationError } from '../types/index.js'; -import type { TagRegistry } from '../validation-schemas/tag-registry.js'; -/** - * Result of scanning a single file - */ -export interface ScannedFile { - readonly filePath: string; - readonly directives: ReadonlyArray<{ - readonly directive: DocDirective; - readonly code: string; - readonly exports: readonly ExportInfo[]; - }>; -} -/** - * Information about a file that failed to scan - */ -export interface FileError { - readonly file: string; - readonly error: FileParseError; -} -/** - * Information about a directive that was skipped due to validation errors - */ -export interface SkippedDirective { - readonly file: string; - readonly error: DirectiveValidationError; -} -/** - * Results of scanning multiple files - * - * Contains successfully scanned files, file-level errors, and directive-level errors. - * This provides full visibility into what was processed and what failed. - */ -export interface ScanResults { - /** Successfully scanned files with directives */ - readonly files: readonly ScannedFile[]; - /** Files that failed to parse entirely (syntax errors) */ - readonly errors: readonly FileError[]; - /** Individual directives that failed validation but file parsed successfully */ - readonly skippedDirectives: readonly SkippedDirective[]; -} -/** - * Scans source files for @libar-docs-* directives and extracts them - * with their associated code blocks and export information. - * - * **Result Pattern**: Returns Result where: - * - Success contains both successful files AND individual file errors - * - Never fails completely (errors are collected in results) - * - * @param config - Scanner configuration - * @param registry - Optional tag registry for metadata extraction (uses default if not provided) - * @returns Result containing scan results with success and error collections - * - * @example - * ```typescript - * const config = await loadConfig(); - * const result = await scanPatterns({ - * patterns: ['src/**\/*.ts'], - * baseDir: '/path/to/project' - * }, config.tagRegistry); - * - * if (result.ok) { - * const { files, errors } = result.value; - * console.log(`Scanned ${files.length} files successfully`); - * console.log(`Failed to scan ${errors.length} files`); - * - * for (const file of files) { - * console.log(`File: ${file.filePath}`); - * for (const { directive, code, exports } of file.directives) { - * console.log(` Tags: ${directive.tags.join(', ')}`); - * console.log(` Exports: ${exports.map(e => e.name).join(', ')}`); - * } - * } - * - * // Handle errors - * for (const { file, error } of errors) { - * console.error(`Failed to scan ${file}: ${error.message}`); - * } - * } - * ``` - */ -export declare function scanPatterns(config: ScannerConfig, registry?: TagRegistry): Promise>; -export { findFilesToScan, hasDocDirectives, hasFileOptIn } from './pattern-scanner.js'; -export { parseFileDirectives, type ParseDirectivesResult } from './ast-parser.js'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/dist/scanner/index.d.ts.map b/dist/scanner/index.d.ts.map deleted file mode 100644 index 9a7dfdd5..00000000 --- a/dist/scanner/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/scanner/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,MAAM,EACN,aAAa,EACb,YAAY,EACZ,UAAU,EACV,cAAc,EACd,wBAAwB,EACzB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAIzE;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC;QACjC,QAAQ,CAAC,SAAS,EAAE,YAAY,CAAC;QACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,OAAO,EAAE,SAAS,UAAU,EAAE,CAAC;KACzC,CAAC,CAAC;CACJ;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,wBAAwB,CAAC;CAC1C;AAED;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC1B,iDAAiD;IACjD,QAAQ,CAAC,KAAK,EAAE,SAAS,WAAW,EAAE,CAAC;IACvC,0DAA0D;IAC1D,QAAQ,CAAC,MAAM,EAAE,SAAS,SAAS,EAAE,CAAC;IACtC,gFAAgF;IAChF,QAAQ,CAAC,iBAAiB,EAAE,SAAS,gBAAgB,EAAE,CAAC;CACzD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,aAAa,EACrB,QAAQ,CAAC,EAAE,WAAW,GACrB,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC,CAkErC;AAED,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACvF,OAAO,EAAE,mBAAmB,EAAE,KAAK,qBAAqB,EAAE,MAAM,iBAAiB,CAAC"} \ No newline at end of file diff --git a/dist/scanner/index.js b/dist/scanner/index.js deleted file mode 100644 index ce7f2da5..00000000 --- a/dist/scanner/index.js +++ /dev/null @@ -1,102 +0,0 @@ -import * as fs from 'fs/promises'; -import { Result as R, createFileParseError } from '../types/index.js'; -import { parseFileDirectives } from './ast-parser.js'; -import { findFilesToScan, hasDocDirectives, hasFileOptIn } from './pattern-scanner.js'; -/** - * Scans source files for @libar-docs-* directives and extracts them - * with their associated code blocks and export information. - * - * **Result Pattern**: Returns Result where: - * - Success contains both successful files AND individual file errors - * - Never fails completely (errors are collected in results) - * - * @param config - Scanner configuration - * @param registry - Optional tag registry for metadata extraction (uses default if not provided) - * @returns Result containing scan results with success and error collections - * - * @example - * ```typescript - * const config = await loadConfig(); - * const result = await scanPatterns({ - * patterns: ['src/**\/*.ts'], - * baseDir: '/path/to/project' - * }, config.tagRegistry); - * - * if (result.ok) { - * const { files, errors } = result.value; - * console.log(`Scanned ${files.length} files successfully`); - * console.log(`Failed to scan ${errors.length} files`); - * - * for (const file of files) { - * console.log(`File: ${file.filePath}`); - * for (const { directive, code, exports } of file.directives) { - * console.log(` Tags: ${directive.tags.join(', ')}`); - * console.log(` Exports: ${exports.map(e => e.name).join(', ')}`); - * } - * } - * - * // Handle errors - * for (const { file, error } of errors) { - * console.error(`Failed to scan ${file}: ${error.message}`); - * } - * } - * ``` - */ -export async function scanPatterns(config, registry) { - // Find all files to scan - const files = await findFilesToScan(config); - const scanned = []; - const errors = []; - const skippedDirectives = []; - for (const filePath of files) { - try { - // Read file content once - passed to all functions (no double read!) - const content = await fs.readFile(filePath, 'utf-8'); - // Check for file-level opt-in (requires opt-in tag from registry) - if (!hasFileOptIn(content, registry)) - continue; - // Quick check if file has any section directives - if (!hasDocDirectives(content, registry)) - continue; - // Parse the file for directives (pass content to avoid re-reading) - // Pass registry for metadata tag extraction (uses, usedBy, usecase, etc.) - const parseResult = parseFileDirectives(content, filePath, registry); - if (R.isErr(parseResult)) { - // File-level parse error (syntax error, etc.) - errors.push({ - file: filePath, - error: parseResult.error, - }); - continue; - } - const { directives, skippedDirectives: fileSkipped } = parseResult.value; - // Collect directive-level validation errors - for (const skipped of fileSkipped) { - skippedDirectives.push({ file: filePath, error: skipped }); - } - if (directives.length === 0) - continue; - scanned.push({ - filePath, - directives, - }); - } - catch (error) { - // Collect filesystem/IO errors - errors.push({ - file: filePath, - error: createFileParseError(filePath, error instanceof Error ? error.message : String(error), undefined, error), - }); - continue; - } - } - // Always succeeds - errors are collected in results - return R.ok({ - files: scanned, - errors, - skippedDirectives, - }); -} -export { findFilesToScan, hasDocDirectives, hasFileOptIn } from './pattern-scanner.js'; -export { parseFileDirectives } from './ast-parser.js'; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/scanner/index.js.map b/dist/scanner/index.js.map deleted file mode 100644 index bbbcb2ea..00000000 --- a/dist/scanner/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/scanner/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,aAAa,CAAC;AASlC,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,C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AAM,OAAO,IAAI,WAAW,EAAE,CAAC;gBAClC,iBAAiB,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;YAC7D,CAAC;YAED,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC;gBAAE,SAAS;YAEtC,OAAO,CAAC,IAAI,CAAC;gBACX,QAAQ;gBACR,UAAU;aACX,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,+BAA+B;YAC/B,MAAM,CAAC,IAAI,CAAC;gBACV,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,oBAAoB,CACzB,QAAQ,EACR,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EACtD,SAAS,EACT,KAAK,CACN;aACF,CAAC,CAAC;YACH,SAAS;QACX,CAAC;IACH,CAAC;IAED,oDAAoD;IACpD,OAAO,CAAC,CAAC,EAAE,CAAC;QACV,KAAK,EAAE,OAAO;QACd,MAAM;QACN,iBAAiB;KAClB,CAAC,CAAC;AACL,CAAC;AAED,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACvF,OAAO,EAAE,mBAAmB,EAA8B,MAAM,iBAAiB,CAAC"} \ No newline at end of file diff --git a/dist/scanner/pattern-scanner.d.ts b/dist/scanner/pattern-scanner.d.ts deleted file mode 100644 index 520cb1ac..00000000 --- a/dist/scanner/pattern-scanner.d.ts +++ /dev/null @@ -1,83 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core @libar-docs-scanner - * @libar-docs-pattern Pattern Scanner - * @libar-docs-status completed - * @libar-docs-arch-role infrastructure - * @libar-docs-arch-context scanner - * @libar-docs-arch-layer infrastructure - * @libar-docs-include pipeline-stages - * @libar-docs-uses glob, AST Parser - * @libar-docs-used-by Doc Extractor, Orchestrator - * @libar-docs-usecase "When discovering TypeScript files for documentation extraction" - * @libar-docs-usecase "When filtering files by @libar-docs opt-in marker" - * - * ## Pattern Scanner - File Discovery and Directive Detection - * - * Discovers TypeScript files matching glob patterns and filters to only - * those with `@libar-docs` opt-in. Entry point for the scanning phase. - * - * ### When to Use - * - * - Discovering source files for documentation generation - * - Checking file opt-in status before extraction - * - Building file lists for batch processing - * - * ### Key Concepts - * - * - **Opt-in Model**: Files must explicitly declare `@libar-docs` to be processed - * - **Glob Patterns**: Uses glob for flexible file matching - * - **Exclusion Support**: Configurable exclude patterns for node_modules, tests, etc. - */ -import type { ScannerConfig } from '../types/index.js'; -import type { TagRegistry } from '../validation-schemas/tag-registry.js'; -/** - * Finds all TypeScript files matching the scanner configuration - * - * @param config - Scanner configuration - * @returns Array of file paths to scan - */ -export declare function findFilesToScan(config: ScannerConfig): Promise; -/** - * Checks if file has opted-in to documentation generation - * - * Files must have the file-level opt-in tag (e.g., `@libar-docs` without suffix) - * in a JSDoc block comment to be included in documentation generation. - * This is separate from section tags (e.g., `@libar-docs-*`) which mark - * individual blocks for extraction. - * - * @param content - File content to check - * @param registry - Optional TagRegistry for custom prefix configuration - * @returns True if file has opt-in tag - * - * @example - * ```typescript - * // File with opt-in - * const content1 = ` - * /** @libar-docs This file is documented *\/ - * export function foo() {} - * `; - * hasFileOptIn(content1); // true - * - * // File without opt-in (only has section tags) - * const content2 = ` - * /** @libar-docs-core *\/ - * export function bar() {} - * `; - * hasFileOptIn(content2); // false - * - * // With custom registry - * const registry = { tagPrefix: "@docs-", fileOptInTag: "@docs", ... }; - * hasFileOptIn(content, registry); // Uses @docs pattern - * ``` - */ -export declare function hasFileOptIn(content: string, registry?: TagRegistry): boolean; -/** - * Checks if file content contains doc directives (e.g., @libar-docs-*) - * - * @param content - File content to check - * @param registry - Optional TagRegistry for custom prefix configuration - * @returns True if content contains documentation directives - */ -export declare function hasDocDirectives(content: string, registry?: TagRegistry): boolean; -//# sourceMappingURL=pattern-scanner.d.ts.map \ No newline at end of file diff --git a/dist/scanner/pattern-scanner.d.ts.map b/dist/scanner/pattern-scanner.d.ts.map deleted file mode 100644 index 84574114..00000000 --- a/dist/scanner/pattern-scanner.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pattern-scanner.d.ts","sourceRoot":"","sources":["../../src/scanner/pattern-scanner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAEzE;;;;;GAKG;AACH,wBAAsB,eAAe,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC,CAmBvF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,WAAW,GAAG,OAAO,CAK7E;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,WAAW,GAAG,OAAO,CAKjF"} \ No newline at end of file diff --git a/dist/scanner/pattern-scanner.js b/dist/scanner/pattern-scanner.js deleted file mode 100644 index f13e2c28..00000000 --- a/dist/scanner/pattern-scanner.js +++ /dev/null @@ -1,110 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core @libar-docs-scanner - * @libar-docs-pattern Pattern Scanner - * @libar-docs-status completed - * @libar-docs-arch-role infrastructure - * @libar-docs-arch-context scanner - * @libar-docs-arch-layer infrastructure - * @libar-docs-include pipeline-stages - * @libar-docs-uses glob, AST Parser - * @libar-docs-used-by Doc Extractor, Orchestrator - * @libar-docs-usecase "When discovering TypeScript files for documentation extraction" - * @libar-docs-usecase "When filtering files by @libar-docs opt-in marker" - * - * ## Pattern Scanner - File Discovery and Directive Detection - * - * Discovers TypeScript files matching glob patterns and filters to only - * those with `@libar-docs` opt-in. Entry point for the scanning phase. - * - * ### When to Use - * - * - Discovering source files for documentation generation - * - Checking file opt-in status before extraction - * - Building file lists for batch processing - * - * ### Key Concepts - * - * - **Opt-in Model**: Files must explicitly declare `@libar-docs` to be processed - * - **Glob Patterns**: Uses glob for flexible file matching - * - **Exclusion Support**: Configurable exclude patterns for node_modules, tests, etc. - */ -import { glob } from 'glob'; -import { createRegexBuilders } from '../config/regex-builders.js'; -import { DEFAULT_REGEX_BUILDERS } from '../config/defaults.js'; -/** - * Finds all TypeScript files matching the scanner configuration - * - * @param config - Scanner configuration - * @returns Array of file paths to scan - */ -export async function findFilesToScan(config) { - const defaultExclude = [ - 'node_modules/**', - 'dist/**', - '**/*.test.ts', - '**/*.spec.ts', - '**/*.d.ts', - ]; - const excludePatterns = config.exclude ? [...defaultExclude, ...config.exclude] : defaultExclude; - const files = await glob([...config.patterns], { - cwd: config.baseDir, - ignore: excludePatterns, - absolute: true, - }); - // Filter to only TypeScript source files - return files.filter((file) => file.endsWith('.ts') && !file.endsWith('.d.ts')); -} -/** - * Checks if file has opted-in to documentation generation - * - * Files must have the file-level opt-in tag (e.g., `@libar-docs` without suffix) - * in a JSDoc block comment to be included in documentation generation. - * This is separate from section tags (e.g., `@libar-docs-*`) which mark - * individual blocks for extraction. - * - * @param content - File content to check - * @param registry - Optional TagRegistry for custom prefix configuration - * @returns True if file has opt-in tag - * - * @example - * ```typescript - * // File with opt-in - * const content1 = ` - * /** @libar-docs This file is documented *\/ - * export function foo() {} - * `; - * hasFileOptIn(content1); // true - * - * // File without opt-in (only has section tags) - * const content2 = ` - * /** @libar-docs-core *\/ - * export function bar() {} - * `; - * hasFileOptIn(content2); // false - * - * // With custom registry - * const registry = { tagPrefix: "@docs-", fileOptInTag: "@docs", ... }; - * hasFileOptIn(content, registry); // Uses @docs pattern - * ``` - */ -export function hasFileOptIn(content, registry) { - const builders = registry - ? createRegexBuilders(registry.tagPrefix, registry.fileOptInTag) - : DEFAULT_REGEX_BUILDERS; - return builders.hasFileOptIn(content); -} -/** - * Checks if file content contains doc directives (e.g., @libar-docs-*) - * - * @param content - File content to check - * @param registry - Optional TagRegistry for custom prefix configuration - * @returns True if content contains documentation directives - */ -export function hasDocDirectives(content, registry) { - const builders = registry - ? createRegexBuilders(registry.tagPrefix, registry.fileOptInTag) - : DEFAULT_REGEX_BUILDERS; - return builders.hasDocDirectives(content); -} -//# sourceMappingURL=pattern-scanner.js.map \ No newline at end of file diff --git a/dist/scanner/pattern-scanner.js.map b/dist/scanner/pattern-scanner.js.map deleted file mode 100644 index 7a84cc31..00000000 --- a/dist/scanner/pattern-scanner.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pattern-scanner.js","sourceRoot":"","sources":["../../src/scanner/pattern-scanner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAG/D;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,MAAqB;IACzD,MAAM,cAAc,GAAG;QACrB,iBAAiB;QACjB,SAAS;QACT,cAAc;QACd,cAAc;QACd,WAAW;KACZ,CAAC;IAEF,MAAM,eAAe,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,cAAc,EAAE,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC;IAEjG,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,EAAE;QAC7C,GAAG,EAAE,MAAM,CAAC,OAAO;QACnB,MAAM,EAAE,eAAe;QACvB,QAAQ,EAAE,IAAI;KACf,CAAC,CAAC;IAEH,yCAAyC;IACzC,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;AACjF,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,UAAU,YAAY,CAAC,OAAe,EAAE,QAAsB;IAClE,MAAM,QAAQ,GAAG,QAAQ;QACvB,CAAC,CAAC,mBAAmB,CAAC,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,YAAY,CAAC;QAChE,CAAC,CAAC,sBAAsB,CAAC;IAC3B,OAAO,QAAQ,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;AACxC,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAAe,EAAE,QAAsB;IACtE,MAAM,QAAQ,GAAG,QAAQ;QACvB,CAAC,CAAC,mBAAmB,CAAC,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,YAAY,CAAC;QAChE,CAAC,CAAC,sBAAsB,CAAC;IAC3B,OAAO,QAAQ,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;AAC5C,CAAC"} \ No newline at end of file diff --git a/dist/taxonomy/categories.d.ts b/dist/taxonomy/categories.d.ts deleted file mode 100644 index 5c359068..00000000 --- a/dist/taxonomy/categories.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** - * @libar-docs - * @libar-docs-pattern CategoryDefinitions - * @libar-docs-status completed - * @libar-docs-core - * @libar-docs-arch-role read-model - * @libar-docs-arch-context taxonomy - * @libar-docs-arch-layer domain - * @libar-docs-extract-shapes CategoryDefinition, CATEGORIES, CategoryTag, CATEGORY_TAGS - * - * ## Category Definitions - * - * Categories are used to classify patterns and organize documentation. - * Priority determines display order (lower = higher priority). - * The ddd-es-cqrs preset includes all 21 categories; simpler presets use subsets. - */ -/** @libar-docs-shape reference-sample */ -export interface CategoryDefinition { - /** Category tag name without prefix (e.g., "core", "api", "ddd", "saga") */ - readonly tag: string; - /** Human-readable domain name for display (e.g., "Strategic DDD", "Event Sourcing") */ - readonly domain: string; - /** Display order priority - lower values appear first in sorted output */ - readonly priority: number; - /** Brief description of the category's purpose and typical patterns */ - readonly description: string; - /** Alternative tag names that map to this category (e.g., "es" for "event-sourcing") */ - readonly aliases: readonly string[]; -} -/** - * All category definitions for the monorepo - */ -export declare const CATEGORIES: readonly CategoryDefinition[]; -/** - * Category tags as a union type - */ -export type CategoryTag = (typeof CATEGORIES)[number]['tag']; -/** - * Extract all category tags as an array - */ -export declare const CATEGORY_TAGS: readonly CategoryTag[]; -//# sourceMappingURL=categories.d.ts.map \ No newline at end of file diff --git a/dist/taxonomy/categories.d.ts.map b/dist/taxonomy/categories.d.ts.map deleted file mode 100644 index bfaef3cb..00000000 --- a/dist/taxonomy/categories.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"categories.d.ts","sourceRoot":"","sources":["../../src/taxonomy/categories.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,yCAAyC;AACzC,MAAM,WAAW,kBAAkB;IACjC,4EAA4E;IAC5E,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,uFAAuF;IACvF,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,0EAA0E;IAC1E,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,uEAAuE;IACvE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,wFAAwF;IACxF,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC;AAED;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,SAAS,kBAAkB,EAoJ1C,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC;AAE7D;;GAEG;AACH,eAAO,MAAM,aAAa,EAAmC,SAAS,WAAW,EAAE,CAAC"} \ No newline at end of file diff --git a/dist/taxonomy/categories.js b/dist/taxonomy/categories.js deleted file mode 100644 index dcdc5874..00000000 --- a/dist/taxonomy/categories.js +++ /dev/null @@ -1,173 +0,0 @@ -/** - * @libar-docs - * @libar-docs-pattern CategoryDefinitions - * @libar-docs-status completed - * @libar-docs-core - * @libar-docs-arch-role read-model - * @libar-docs-arch-context taxonomy - * @libar-docs-arch-layer domain - * @libar-docs-extract-shapes CategoryDefinition, CATEGORIES, CategoryTag, CATEGORY_TAGS - * - * ## Category Definitions - * - * Categories are used to classify patterns and organize documentation. - * Priority determines display order (lower = higher priority). - * The ddd-es-cqrs preset includes all 21 categories; simpler presets use subsets. - */ -/** - * All category definitions for the monorepo - */ -export const CATEGORIES = [ - { - tag: 'domain', - domain: 'Strategic DDD', - priority: 1, - description: 'Bounded contexts, aggregates, strategic design', - aliases: [], - }, - { - tag: 'ddd', - domain: 'Domain-Driven Design', - priority: 2, - description: 'DDD tactical patterns', - aliases: [], - }, - { - tag: 'bounded-context', - domain: 'Bounded Context', - priority: 3, - description: 'BC contracts and definitions', - aliases: [], - }, - { - tag: 'event-sourcing', - domain: 'Event Sourcing', - priority: 4, - description: 'Event store, aggregates, replay', - aliases: ['es'], - }, - { - tag: 'decider', - domain: 'Decider', - priority: 5, - description: 'Decider pattern', - aliases: [], - }, - { - tag: 'fsm', - domain: 'FSM', - priority: 5, - description: 'Finite state machine patterns', - aliases: [], - }, - { - tag: 'cqrs', - domain: 'CQRS', - priority: 5, - description: 'Command/query separation', - aliases: [], - }, - { - tag: 'projection', - domain: 'Projection', - priority: 6, - description: 'Read models, checkpoints', - aliases: [], - }, - { - tag: 'saga', - domain: 'Saga', - priority: 7, - description: 'Cross-context coordination, process managers', - aliases: ['process-manager'], - }, - { - tag: 'command', - domain: 'Command', - priority: 8, - description: 'Command handlers, orchestration', - aliases: [], - }, - { - tag: 'arch', - domain: 'Architecture', - priority: 9, - description: 'Architecture patterns, decisions', - aliases: [], - }, - { - tag: 'infra', - domain: 'Infrastructure', - priority: 10, - description: 'Infrastructure, composition root', - aliases: ['infrastructure'], - }, - { - tag: 'validation', - domain: 'Validation', - priority: 11, - description: 'Input validation, schemas', - aliases: [], - }, - { - tag: 'testing', - domain: 'Testing', - priority: 12, - description: 'Test patterns, BDD', - aliases: [], - }, - { - tag: 'performance', - domain: 'Performance', - priority: 13, - description: 'Optimization, caching', - aliases: [], - }, - { - tag: 'security', - domain: 'Security', - priority: 14, - description: 'Auth, authorization', - aliases: [], - }, - { - tag: 'core', - domain: 'Core', - priority: 15, - description: 'Core utilities', - aliases: [], - }, - { - tag: 'api', - domain: 'API', - priority: 16, - description: 'Public APIs', - aliases: [], - }, - { - tag: 'generator', - domain: 'Generator', - priority: 17, - description: 'Code generators', - aliases: [], - }, - { - tag: 'middleware', - domain: 'Middleware', - priority: 18, - description: 'Middleware patterns', - aliases: [], - }, - { - tag: 'correlation', - domain: 'Correlation', - priority: 19, - description: 'Correlation tracking', - aliases: [], - }, -]; -/** - * Extract all category tags as an array - */ -export const CATEGORY_TAGS = CATEGORIES.map((c) => c.tag); -//# sourceMappingURL=categories.js.map \ No newline at end of file diff --git a/dist/taxonomy/categories.js.map b/dist/taxonomy/categories.js.map deleted file mode 100644 index 019143da..00000000 --- a/dist/taxonomy/categories.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"categories.js","sourceRoot":"","sources":["../../src/taxonomy/categories.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAgBH;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAkC;IACvD;QACE,GAAG,EAAE,QAAQ;QACb,MAAM,EAAE,eAAe;QACvB,QAAQ,EAAE,CAAC;QACX,WAAW,EAAE,gDAAgD;QAC7D,OAAO,EAAE,EAAE;KACZ;IACD;QACE,GAAG,EAAE,KAAK;QACV,MAAM,EAAE,sBAA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EAAE;QACZ,WAAW,EAAE,qBAAqB;QAClC,OAAO,EAAE,EAAE;KACZ;IACD;QACE,GAAG,EAAE,aAAa;QAClB,MAAM,EAAE,aAAa;QACrB,QAAQ,EAAE,EAAE;QACZ,WAAW,EAAE,sBAAsB;QACnC,OAAO,EAAE,EAAE;KACZ;CACO,CAAC;AAOX;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAA2B,CAAC"} \ No newline at end of file diff --git a/dist/taxonomy/conventions.d.ts b/dist/taxonomy/conventions.d.ts deleted file mode 100644 index aa0e9c81..00000000 --- a/dist/taxonomy/conventions.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Convention tag values for reference document generation. - * - * Each value maps to a convention domain that can be used to tag - * decision records with `@libar-docs-convention:value1,value2`. - * The 11 values correspond to the 11 convention domains extracted - * from the former recipe .feature files. - * - * @see CodecDrivenReferenceGeneration spec - */ -export declare const CONVENTION_VALUES: readonly ["testing-policy", "fsm-rules", "cli-patterns", "output-format", "pattern-naming", "session-workflow", "config-presets", "annotation-system", "pipeline-architecture", "publishing", "doc-generation", "taxonomy-rules"]; -export type ConventionValue = (typeof CONVENTION_VALUES)[number]; -//# sourceMappingURL=conventions.d.ts.map \ No newline at end of file diff --git a/dist/taxonomy/conventions.d.ts.map b/dist/taxonomy/conventions.d.ts.map deleted file mode 100644 index e676949c..00000000 --- a/dist/taxonomy/conventions.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"conventions.d.ts","sourceRoot":"","sources":["../../src/taxonomy/conventions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,eAAO,MAAM,iBAAiB,mOAapB,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/taxonomy/conventions.js b/dist/taxonomy/conventions.js deleted file mode 100644 index 7d2dfc69..00000000 --- a/dist/taxonomy/conventions.js +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Convention tag values for reference document generation. - * - * Each value maps to a convention domain that can be used to tag - * decision records with `@libar-docs-convention:value1,value2`. - * The 11 values correspond to the 11 convention domains extracted - * from the former recipe .feature files. - * - * @see CodecDrivenReferenceGeneration spec - */ -export const CONVENTION_VALUES = [ - 'testing-policy', - 'fsm-rules', - 'cli-patterns', - 'output-format', - 'pattern-naming', - 'session-workflow', - 'config-presets', - 'annotation-system', - 'pipeline-architecture', - 'publishing', - 'doc-generation', - 'taxonomy-rules', -]; -//# sourceMappingURL=conventions.js.map \ No newline at end of file diff --git a/dist/taxonomy/conventions.js.map b/dist/taxonomy/conventions.js.map deleted file mode 100644 index 7eb8b35c..00000000 --- a/dist/taxonomy/conventions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"conventions.js","sourceRoot":"","sources":["../../src/taxonomy/conventions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,gBAAgB;IAChB,WAAW;IACX,cAAc;IACd,eAAe;IACf,gBAAgB;IAChB,kBAAkB;IAClB,gBAAgB;IAChB,mBAAmB;IACnB,uBAAuB;IACvB,YAAY;IACZ,gBAAgB;IAChB,gBAAgB;CACR,CAAC"} \ No newline at end of file diff --git a/dist/taxonomy/deliverable-status.d.ts b/dist/taxonomy/deliverable-status.d.ts deleted file mode 100644 index 176bd0e6..00000000 --- a/dist/taxonomy/deliverable-status.d.ts +++ /dev/null @@ -1,97 +0,0 @@ -/** - * @libar-docs - * @libar-docs-pattern DeliverableStatusTaxonomy - * @libar-docs-status active - * @libar-docs-core - * @libar-docs-extract-shapes DELIVERABLE_STATUS_VALUES, DeliverableStatus, VALID_DELIVERABLE_STATUS_SET, DEFAULT_DELIVERABLE_STATUS, isDeliverableStatusComplete, isDeliverableStatusInProgress, isDeliverableStatusPending, isDeliverableStatusTerminal, getDeliverableStatusEmoji - * - * ## Deliverable Status Taxonomy - * - * Canonical status values for deliverables in Gherkin Background tables. - * - * The delivery-process system uses two distinct status domains: - * - * 1. Pattern status (FSM-governed, 4 values in status-values.ts): - * roadmap, active, completed, deferred — validated by ProcessStatusSchema - * - * 2. Deliverable status (this file, 6 values): - * complete, in-progress, pending, deferred, superseded, n/a — - * validated by DeliverableSchema via z.enum(DELIVERABLE_STATUS_VALUES) - * - * Previously, deliverable status was z.string() with 29-pattern fuzzy - * matching at read-time. This caused 3 real bugs (drift campaign 10bab44). - * Now enforced at schema level like pattern status. - */ -/** - * Canonical deliverable status values - * - * These are the ONLY accepted values for the Status column in - * Gherkin Background deliverable tables. Values are lowercased - * at extraction time before schema validation. - * - * - complete: Work is done - * - in-progress: Work is ongoing - * - pending: Work hasn't started - * - deferred: Work postponed - * - superseded: Replaced by another deliverable - * - n/a: Not applicable - * - * @libar-docs-shape reference-sample - */ -export declare const DELIVERABLE_STATUS_VALUES: readonly ["complete", "in-progress", "pending", "deferred", "superseded", "n/a"]; -export type DeliverableStatus = (typeof DELIVERABLE_STATUS_VALUES)[number]; -/** - * Default status for new deliverables - */ -export declare const DEFAULT_DELIVERABLE_STATUS: DeliverableStatus; -/** - * Pre-built set of valid deliverable statuses for O(1) membership checks. - */ -export declare const VALID_DELIVERABLE_STATUS_SET: ReadonlySet; -/** - * Check if a deliverable status indicates completion. - * - * Use this for **deliverable-level** status checks (6 canonical values). - * For **pattern-level** FSM status checks, use `isPatternComplete()` - * from `normalized-status.ts` instead. - */ -export declare function isDeliverableStatusComplete(status: DeliverableStatus): boolean; -/** - * Check if a deliverable status indicates work in progress. - * - * Use this for **deliverable-level** status checks. - * For **pattern-level** FSM status checks, use `isPatternActive()` - * from `normalized-status.ts` instead. - */ -export declare function isDeliverableStatusInProgress(status: DeliverableStatus): boolean; -/** - * Check if a deliverable status indicates pending/not-started. - * - * Use this for **deliverable-level** status checks. - * For **pattern-level** FSM status checks, use `isPatternPlanned()` - * from `normalized-status.ts` instead. - */ -export declare function isDeliverableStatusPending(status: DeliverableStatus): boolean; -/** - * Check if a deliverable status is terminal (no further work expected). - * - * Terminal statuses are acceptable for DoD validation on completed patterns: - * - `complete`: Work is done - * - `n/a`: Not applicable — consciously excluded - * - `superseded`: Replaced by another deliverable - * - * Note: `deferred` is NOT terminal — it means "postponed," implying - * unfinished work that should block DoD. - */ -export declare function isDeliverableStatusTerminal(status: DeliverableStatus): boolean; -/** - * Get the appropriate emoji for a deliverable status. - * - * Maps the 6 canonical deliverable statuses to display emojis. - * - * Note: This is for deliverable statuses (6 canonical values), - * NOT for FSM pattern statuses (roadmap/active/completed/deferred) — - * use `getStatusEmoji()` from `renderable/utils.ts` for those. - */ -export declare function getDeliverableStatusEmoji(status: DeliverableStatus): string; -//# sourceMappingURL=deliverable-status.d.ts.map \ No newline at end of file diff --git a/dist/taxonomy/deliverable-status.d.ts.map b/dist/taxonomy/deliverable-status.d.ts.map deleted file mode 100644 index 6f4618cf..00000000 --- a/dist/taxonomy/deliverable-status.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"deliverable-status.d.ts","sourceRoot":"","sources":["../../src/taxonomy/deliverable-status.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,yBAAyB,kFAO5B,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE3E;;GAEG;AACH,eAAO,MAAM,0BAA0B,EAAE,iBAA6B,CAAC;AAEvE;;GAEG;AACH,eAAO,MAAM,4BAA4B,EAAE,WAAW,CAAC,MAAM,CAE5D,CAAC;AAMF;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAE9E;AAED;;;;;;GAMG;AACH,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAEhF;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAE7E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAE9E;AAED;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM,CAe3E"} \ No newline at end of file diff --git a/dist/taxonomy/deliverable-status.js b/dist/taxonomy/deliverable-status.js deleted file mode 100644 index cb18d6c0..00000000 --- a/dist/taxonomy/deliverable-status.js +++ /dev/null @@ -1,129 +0,0 @@ -/** - * @libar-docs - * @libar-docs-pattern DeliverableStatusTaxonomy - * @libar-docs-status active - * @libar-docs-core - * @libar-docs-extract-shapes DELIVERABLE_STATUS_VALUES, DeliverableStatus, VALID_DELIVERABLE_STATUS_SET, DEFAULT_DELIVERABLE_STATUS, isDeliverableStatusComplete, isDeliverableStatusInProgress, isDeliverableStatusPending, isDeliverableStatusTerminal, getDeliverableStatusEmoji - * - * ## Deliverable Status Taxonomy - * - * Canonical status values for deliverables in Gherkin Background tables. - * - * The delivery-process system uses two distinct status domains: - * - * 1. Pattern status (FSM-governed, 4 values in status-values.ts): - * roadmap, active, completed, deferred — validated by ProcessStatusSchema - * - * 2. Deliverable status (this file, 6 values): - * complete, in-progress, pending, deferred, superseded, n/a — - * validated by DeliverableSchema via z.enum(DELIVERABLE_STATUS_VALUES) - * - * Previously, deliverable status was z.string() with 29-pattern fuzzy - * matching at read-time. This caused 3 real bugs (drift campaign 10bab44). - * Now enforced at schema level like pattern status. - */ -/** - * Canonical deliverable status values - * - * These are the ONLY accepted values for the Status column in - * Gherkin Background deliverable tables. Values are lowercased - * at extraction time before schema validation. - * - * - complete: Work is done - * - in-progress: Work is ongoing - * - pending: Work hasn't started - * - deferred: Work postponed - * - superseded: Replaced by another deliverable - * - n/a: Not applicable - * - * @libar-docs-shape reference-sample - */ -export const DELIVERABLE_STATUS_VALUES = [ - 'complete', - 'in-progress', - 'pending', - 'deferred', - 'superseded', - 'n/a', -]; -/** - * Default status for new deliverables - */ -export const DEFAULT_DELIVERABLE_STATUS = 'pending'; -/** - * Pre-built set of valid deliverable statuses for O(1) membership checks. - */ -export const VALID_DELIVERABLE_STATUS_SET = new Set(DELIVERABLE_STATUS_VALUES); -// ============================================================================ -// Deliverable Status Helpers -// ============================================================================ -/** - * Check if a deliverable status indicates completion. - * - * Use this for **deliverable-level** status checks (6 canonical values). - * For **pattern-level** FSM status checks, use `isPatternComplete()` - * from `normalized-status.ts` instead. - */ -export function isDeliverableStatusComplete(status) { - return status === 'complete'; -} -/** - * Check if a deliverable status indicates work in progress. - * - * Use this for **deliverable-level** status checks. - * For **pattern-level** FSM status checks, use `isPatternActive()` - * from `normalized-status.ts` instead. - */ -export function isDeliverableStatusInProgress(status) { - return status === 'in-progress'; -} -/** - * Check if a deliverable status indicates pending/not-started. - * - * Use this for **deliverable-level** status checks. - * For **pattern-level** FSM status checks, use `isPatternPlanned()` - * from `normalized-status.ts` instead. - */ -export function isDeliverableStatusPending(status) { - return status === 'pending'; -} -/** - * Check if a deliverable status is terminal (no further work expected). - * - * Terminal statuses are acceptable for DoD validation on completed patterns: - * - `complete`: Work is done - * - `n/a`: Not applicable — consciously excluded - * - `superseded`: Replaced by another deliverable - * - * Note: `deferred` is NOT terminal — it means "postponed," implying - * unfinished work that should block DoD. - */ -export function isDeliverableStatusTerminal(status) { - return status === 'complete' || status === 'n/a' || status === 'superseded'; -} -/** - * Get the appropriate emoji for a deliverable status. - * - * Maps the 6 canonical deliverable statuses to display emojis. - * - * Note: This is for deliverable statuses (6 canonical values), - * NOT for FSM pattern statuses (roadmap/active/completed/deferred) — - * use `getStatusEmoji()` from `renderable/utils.ts` for those. - */ -export function getDeliverableStatusEmoji(status) { - switch (status) { - case 'complete': - return '✅'; - case 'in-progress': - return '🚧'; - case 'pending': - return '📋'; - case 'deferred': - return '⏸️'; - case 'superseded': - return '🔄'; - case 'n/a': - return '➖'; - } -} -//# sourceMappingURL=deliverable-status.js.map \ No newline at end of file diff --git a/dist/taxonomy/deliverable-status.js.map b/dist/taxonomy/deliverable-status.js.map deleted file mode 100644 index 76bd9ff4..00000000 --- a/dist/taxonomy/deliverable-status.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"deliverable-status.js","sourceRoot":"","sources":["../../src/taxonomy/deliverable-status.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,UAAU;IACV,aAAa;IACb,SAAS;IACT,UAAU;IACV,YAAY;IACZ,KAAK;CACG,CAAC;AAIX;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAsB,SAAS,CAAC;AAEvE;;GAEG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAwB,IAAI,GAAG,CACtE,yBAAyB,CAC1B,CAAC;AAEF,+EAA+E;AAC/E,6BAA6B;AAC7B,+EAA+E;AAE/E;;;;;;GAMG;AACH,MAAM,UAAU,2BAA2B,CAAC,MAAyB;IACnE,OAAO,MAAM,KAAK,UAAU,CAAC;AAC/B,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,6BAA6B,CAAC,MAAyB;IACrE,OAAO,MAAM,KAAK,aAAa,CAAC;AAClC,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,0BAA0B,CAAC,MAAyB;IAClE,OAAO,MAAM,KAAK,SAAS,CAAC;AAC9B,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,2BAA2B,CAAC,MAAyB;IACnE,OAAO,MAAM,KAAK,UAAU,IAAI,MAAM,KAAK,KAAK,IAAI,MAAM,KAAK,YAAY,CAAC;AAC9E,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,yBAAyB,CAAC,MAAyB;IACjE,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,UAAU;YACb,OAAO,GAAG,CAAC;QACb,KAAK,aAAa;YAChB,OAAO,IAAI,CAAC;QACd,KAAK,SAAS;YACZ,OAAO,IAAI,CAAC;QACd,KAAK,UAAU;YACb,OAAO,IAAI,CAAC;QACd,KAAK,YAAY;YACf,OAAO,IAAI,CAAC;QACd,KAAK,KAAK;YACR,OAAO,GAAG,CAAC;IACf,CAAC;AACH,CAAC"} \ No newline at end of file diff --git a/dist/taxonomy/format-types.d.ts b/dist/taxonomy/format-types.d.ts deleted file mode 100644 index 4316cd70..00000000 --- a/dist/taxonomy/format-types.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * @libar-docs - * @libar-docs-pattern FormatTypes - * @libar-docs-status completed - * @libar-docs-core - * @libar-docs-extract-shapes FORMAT_TYPES, FormatType - * - * ## Tag Value Format Types - * - * Defines how tag values are parsed and validated. - * Each format type determines the parsing strategy for tag values. - */ -export declare const FORMAT_TYPES: readonly ["value", "enum", "quoted-value", "csv", "number", "flag"]; -export type FormatType = (typeof FORMAT_TYPES)[number]; -//# sourceMappingURL=format-types.d.ts.map \ No newline at end of file diff --git a/dist/taxonomy/format-types.d.ts.map b/dist/taxonomy/format-types.d.ts.map deleted file mode 100644 index 3d623e2b..00000000 --- a/dist/taxonomy/format-types.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"format-types.d.ts","sourceRoot":"","sources":["../../src/taxonomy/format-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,YAAY,qEAOf,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/taxonomy/format-types.js b/dist/taxonomy/format-types.js deleted file mode 100644 index af48dc65..00000000 --- a/dist/taxonomy/format-types.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * @libar-docs - * @libar-docs-pattern FormatTypes - * @libar-docs-status completed - * @libar-docs-core - * @libar-docs-extract-shapes FORMAT_TYPES, FormatType - * - * ## Tag Value Format Types - * - * Defines how tag values are parsed and validated. - * Each format type determines the parsing strategy for tag values. - */ -export const FORMAT_TYPES = [ - 'value', // Simple string value - 'enum', // Constrained to predefined values - 'quoted-value', // String in quotes (preserves spaces) - 'csv', // Comma-separated values - 'number', // Numeric value - 'flag', // Boolean presence (no value needed) -]; -//# sourceMappingURL=format-types.js.map \ No newline at end of file diff --git a/dist/taxonomy/format-types.js.map b/dist/taxonomy/format-types.js.map deleted file mode 100644 index c9532e95..00000000 --- a/dist/taxonomy/format-types.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"format-types.js","sourceRoot":"","sources":["../../src/taxonomy/format-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,OAAO,EAAE,sBAAsB;IAC/B,MAAM,EAAE,mCAAmC;IAC3C,cAAc,EAAE,sCAAsC;IACtD,KAAK,EAAE,yBAAyB;IAChC,QAAQ,EAAE,gBAAgB;IAC1B,MAAM,EAAE,qCAAqC;CACrC,CAAC"} \ No newline at end of file diff --git a/dist/taxonomy/generator-options.d.ts b/dist/taxonomy/generator-options.d.ts deleted file mode 100644 index 64920338..00000000 --- a/dist/taxonomy/generator-options.d.ts +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Generator section option enums - * - * All format, groupBy, sortBy, and filterBy options used by generator sections. - * Centralized here to eliminate hardcoded strings in generator-config.ts. - */ -/** core-patterns section format */ -export declare const CORE_PATTERNS_FORMAT: readonly ["table", "list"]; -export type CorePatternsFormat = (typeof CORE_PATTERNS_FORMAT)[number]; -/** dependencies section format */ -export declare const DEPENDENCIES_FORMAT: readonly ["mermaid", "table"]; -export type DependenciesFormat = (typeof DEPENDENCIES_FORMAT)[number]; -/** pattern-list section format */ -export declare const PATTERN_LIST_FORMAT: readonly ["full", "list", "summary", "adr"]; -export type PatternListFormat = (typeof PATTERN_LIST_FORMAT)[number]; -/** deliverables-summary section format */ -export declare const DELIVERABLES_FORMAT: readonly ["table", "checklist", "progress-bar"]; -export type DeliverablesFormat = (typeof DELIVERABLES_FORMAT)[number]; -/** acceptance-criteria section format */ -export declare const ACCEPTANCE_CRITERIA_FORMAT: readonly ["gherkin", "bullet-points", "table"]; -export type AcceptanceCriteriaFormat = (typeof ACCEPTANCE_CRITERIA_FORMAT)[number]; -/** timeline-summary section groupBy */ -export declare const TIMELINE_GROUP_BY: readonly ["quarter", "phase"]; -export type TimelineGroupBy = (typeof TIMELINE_GROUP_BY)[number]; -/** deliverables-summary section groupBy */ -export declare const DELIVERABLES_GROUP_BY: readonly ["status", "phase", "location", "none"]; -export type DeliverablesGroupBy = (typeof DELIVERABLES_GROUP_BY)[number]; -/** prd-features section groupBy */ -export declare const PRD_FEATURES_GROUP_BY: readonly ["product-area", "user-role", "phase"]; -export type PrdFeaturesGroupBy = (typeof PRD_FEATURES_GROUP_BY)[number]; -/** session-findings section groupBy */ -export declare const SESSION_FINDINGS_GROUP_BY: readonly ["category", "phase"]; -export type SessionFindingsGroupBy = (typeof SESSION_FINDINGS_GROUP_BY)[number]; -/** constraints-index section groupBy */ -export declare const CONSTRAINTS_GROUP_BY: readonly ["product-area", "constraint"]; -export type ConstraintsGroupBy = (typeof CONSTRAINTS_GROUP_BY)[number]; -/** adr-list section groupBy */ -export declare const ADR_LIST_GROUP_BY: readonly ["status", "category"]; -export type AdrListGroupBy = (typeof ADR_LIST_GROUP_BY)[number]; -/** remaining-work section groupPlannedBy */ -export declare const REMAINING_WORK_GROUP_BY: readonly ["quarter", "priority", "level", "none"]; -export type RemainingWorkGroupBy = (typeof REMAINING_WORK_GROUP_BY)[number]; -/** remaining-work section sortBy */ -export declare const REMAINING_WORK_SORT_BY: readonly ["phase", "priority", "effort", "quarter"]; -export type RemainingWorkSortBy = (typeof REMAINING_WORK_SORT_BY)[number]; -/** pr-changes section sortBy */ -export declare const PR_CHANGES_SORT_BY: readonly ["phase", "priority", "workflow"]; -export type PrChangesSortBy = (typeof PR_CHANGES_SORT_BY)[number]; -/** workflow discipline values */ -export declare const WORKFLOW_VALUES: readonly ["implementation", "planning", "validation", "documentation"]; -export type WorkflowValue = (typeof WORKFLOW_VALUES)[number]; -/** priority level values */ -export declare const PRIORITY_VALUES: readonly ["critical", "high", "medium", "low"]; -export type PriorityValue = (typeof PRIORITY_VALUES)[number]; -/** ADR/PDR status values */ -export declare const ADR_STATUS_VALUES: readonly ["proposed", "accepted", "deprecated", "superseded"]; -export type AdrStatusValue = (typeof ADR_STATUS_VALUES)[number]; -/** ADR theme grouping values */ -export declare const ADR_THEME_VALUES: readonly ["persistence", "isolation", "commands", "projections", "coordination", "taxonomy", "testing"]; -export type AdrThemeValue = (typeof ADR_THEME_VALUES)[number]; -/** ADR evolutionary layer values */ -export declare const ADR_LAYER_VALUES: readonly ["foundation", "infrastructure", "refinement"]; -export type AdrLayerValue = (typeof ADR_LAYER_VALUES)[number]; -/** Global format options for pattern display */ -export declare const GLOBAL_FORMAT_OPTIONS: readonly ["full", "list", "summary"]; -export type GlobalFormatOption = (typeof GLOBAL_FORMAT_OPTIONS)[number]; -//# sourceMappingURL=generator-options.d.ts.map \ No newline at end of file diff --git a/dist/taxonomy/generator-options.d.ts.map b/dist/taxonomy/generator-options.d.ts.map deleted file mode 100644 index 9145dcca..00000000 --- a/dist/taxonomy/generator-options.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"generator-options.d.ts","sourceRoot":"","sources":["../../src/taxonomy/generator-options.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,mCAAmC;AACnC,eAAO,MAAM,oBAAoB,4BAA6B,CAAC;AAC/D,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvE,kCAAkC;AAClC,eAAO,MAAM,mBAAmB,+BAAg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ChD,eAAO,MAAM,qBAAqB,sCAAuC,CAAC;AAC1E,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/taxonomy/generator-options.js b/dist/taxonomy/generator-options.js deleted file mode 100644 index cc85a4f0..00000000 --- a/dist/taxonomy/generator-options.js +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Generator section option enums - * - * All format, groupBy, sortBy, and filterBy options used by generator sections. - * Centralized here to eliminate hardcoded strings in generator-config.ts. - */ -// ───────────────────────────────────────────────────────────────────────────── -// Format Options -// ───────────────────────────────────────────────────────────────────────────── -/** core-patterns section format */ -export const CORE_PATTERNS_FORMAT = ['table', 'list']; -/** dependencies section format */ -export const DEPENDENCIES_FORMAT = ['mermaid', 'table']; -/** pattern-list section format */ -export const PATTERN_LIST_FORMAT = ['full', 'list', 'summary', 'adr']; -/** deliverables-summary section format */ -export const DELIVERABLES_FORMAT = ['table', 'checklist', 'progress-bar']; -/** acceptance-criteria section format */ -export const ACCEPTANCE_CRITERIA_FORMAT = ['gherkin', 'bullet-points', 'table']; -// ───────────────────────────────────────────────────────────────────────────── -// GroupBy Options -// ───────────────────────────────────────────────────────────────────────────── -/** timeline-summary section groupBy */ -export const TIMELINE_GROUP_BY = ['quarter', 'phase']; -/** deliverables-summary section groupBy */ -export const DELIVERABLES_GROUP_BY = ['status', 'phase', 'location', 'none']; -/** prd-features section groupBy */ -export const PRD_FEATURES_GROUP_BY = ['product-area', 'user-role', 'phase']; -/** session-findings section groupBy */ -export const SESSION_FINDINGS_GROUP_BY = ['category', 'phase']; -/** constraints-index section groupBy */ -export const CONSTRAINTS_GROUP_BY = ['product-area', 'constraint']; -/** adr-list section groupBy */ -export const ADR_LIST_GROUP_BY = ['status', 'category']; -/** remaining-work section groupPlannedBy */ -export const REMAINING_WORK_GROUP_BY = ['quarter', 'priority', 'level', 'none']; -// ───────────────────────────────────────────────────────────────────────────── -// SortBy Options -// ───────────────────────────────────────────────────────────────────────────── -/** remaining-work section sortBy */ -export const REMAINING_WORK_SORT_BY = ['phase', 'priority', 'effort', 'quarter']; -/** pr-changes section sortBy */ -export const PR_CHANGES_SORT_BY = ['phase', 'priority', 'workflow']; -// ───────────────────────────────────────────────────────────────────────────── -// Metadata Tag Enums (from tag-registry) -// ───────────────────────────────────────────────────────────────────────────── -/** workflow discipline values */ -export const WORKFLOW_VALUES = [ - 'implementation', - 'planning', - 'validation', - 'documentation', -]; -/** priority level values */ -export const PRIORITY_VALUES = ['critical', 'high', 'medium', 'low']; -/** ADR/PDR status values */ -export const ADR_STATUS_VALUES = ['proposed', 'accepted', 'deprecated', 'superseded']; -/** ADR theme grouping values */ -export const ADR_THEME_VALUES = [ - 'persistence', - 'isolation', - 'commands', - 'projections', - 'coordination', - 'taxonomy', - 'testing', -]; -/** ADR evolutionary layer values */ -export const ADR_LAYER_VALUES = ['foundation', 'infrastructure', 'refinement']; -// ───────────────────────────────────────────────────────────────────────────── -// Format Options (global) -// ───────────────────────────────────────────────────────────────────────────── -/** Global format options for pattern display */ -export const GLOBAL_FORMAT_OPTIONS = ['full', 'list', 'summary']; -//# sourceMappingURL=generator-options.js.map \ No newline at end of file diff --git a/dist/taxonomy/generator-options.js.map b/dist/taxonomy/generator-options.js.map deleted file mode 100644 index d535e962..00000000 --- a/dist/taxonomy/generator-options.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"generator-options.js","sourceRoot":"","sources":["../../src/taxonomy/generator-options.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,gFAAgF;AAChF,iBAAiB;AACjB,gFAAgF;AAEhF,mCAAmC;AACnC,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,OAAO,EAAE,MAAM,CAAU,CAAC;AAG/D,kCAAkC;AAClC,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,SAAS,EAAE,OAAO,CAAU,CAAC;AAGjE,kCAAkC;AAClC,MAAM,CAAC,MA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B,GAAG,CAAC,OAAO,EAAE,UAAU,EAAE,UAAU,CAAU,CAAC;AAG7E,gFAAgF;AAChF,yCAAyC;AACzC,gFAAgF;AAEhF,iCAAiC;AACjC,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,gBAAgB;IAChB,UAAU;IACV,YAAY;IACZ,eAAe;CACP,CAAC;AAGX,4BAA4B;AAC5B,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAU,CAAC;AAG9E,4BAA4B;AAC5B,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,CAAU,CAAC;AAG/F,gCAAgC;AAChC,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,aAAa;IACb,WAAW;IACX,UAAU;IACV,aAAa;IACb,cAAc;IACd,UAAU;IACV,SAAS;CACD,CAAC;AAGX,oCAAoC;AACpC,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,YAAY,EAAE,gBAAgB,EAAE,YAAY,CAAU,CAAC;AAGxF,gFAAgF;AAChF,0BAA0B;AAC1B,gFAAgF;AAEhF,gDAAgD;AAChD,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAU,CAAC"} \ No newline at end of file diff --git a/dist/taxonomy/hierarchy-levels.d.ts b/dist/taxonomy/hierarchy-levels.d.ts deleted file mode 100644 index 7ea56ee8..00000000 --- a/dist/taxonomy/hierarchy-levels.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * @libar-docs - * @libar-docs-pattern HierarchyLevels - * @libar-docs-status completed - * @libar-docs-core - * @libar-docs-extract-shapes HIERARCHY_LEVELS, HierarchyLevel, DEFAULT_HIERARCHY_LEVEL - * - * ## Hierarchy Levels for Work Item Breakdown - * - * Three-level hierarchy for organizing work: - * - epic: Multi-quarter strategic initiatives - * - phase: Standard work units (2-5 days) - * - task: Fine-grained session-level work (1-4 hours) - */ -export declare const HIERARCHY_LEVELS: readonly ["epic", "phase", "task"]; -export type HierarchyLevel = (typeof HIERARCHY_LEVELS)[number]; -/** - * Default hierarchy level (for backward compatibility) - */ -export declare const DEFAULT_HIERARCHY_LEVEL: HierarchyLevel; -//# sourceMappingURL=hierarchy-levels.d.ts.map \ No newline at end of file diff --git a/dist/taxonomy/hierarchy-levels.d.ts.map b/dist/taxonomy/hierarchy-levels.d.ts.map deleted file mode 100644 index 572d7d0d..00000000 --- a/dist/taxonomy/hierarchy-levels.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"hierarchy-levels.d.ts","sourceRoot":"","sources":["../../src/taxonomy/hierarchy-levels.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,gBAAgB,oCAAqC,CAAC;AAEnE,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/D;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,cAAwB,CAAC"} \ No newline at end of file diff --git a/dist/taxonomy/hierarchy-levels.js b/dist/taxonomy/hierarchy-levels.js deleted file mode 100644 index 351f7b26..00000000 --- a/dist/taxonomy/hierarchy-levels.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * @libar-docs - * @libar-docs-pattern HierarchyLevels - * @libar-docs-status completed - * @libar-docs-core - * @libar-docs-extract-shapes HIERARCHY_LEVELS, HierarchyLevel, DEFAULT_HIERARCHY_LEVEL - * - * ## Hierarchy Levels for Work Item Breakdown - * - * Three-level hierarchy for organizing work: - * - epic: Multi-quarter strategic initiatives - * - phase: Standard work units (2-5 days) - * - task: Fine-grained session-level work (1-4 hours) - */ -export const HIERARCHY_LEVELS = ['epic', 'phase', 'task']; -/** - * Default hierarchy level (for backward compatibility) - */ -export const DEFAULT_HIERARCHY_LEVEL = 'phase'; -//# sourceMappingURL=hierarchy-levels.js.map \ No newline at end of file diff --git a/dist/taxonomy/hierarchy-levels.js.map b/dist/taxonomy/hierarchy-levels.js.map deleted file mode 100644 index 6cffdcf5..00000000 --- a/dist/taxonomy/hierarchy-levels.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"hierarchy-levels.js","sourceRoot":"","sources":["../../src/taxonomy/hierarchy-levels.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAU,CAAC;AAInE;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAmB,OAAO,CAAC"} \ No newline at end of file diff --git a/dist/taxonomy/index.d.ts b/dist/taxonomy/index.d.ts deleted file mode 100644 index 6a694183..00000000 --- a/dist/taxonomy/index.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Taxonomy Module - Single Source of Truth - * - * This module provides all taxonomy constants, types, and the registry builder. - * All consumers should import from this module instead of reading JSON files. - * - * @example - * ```typescript - * import { - * PROCESS_STATUS_VALUES, - * type ProcessStatusValue, - * buildRegistry - * } from "@libar/taxonomy"; - * - * // Use constant in Zod schema - * const StatusSchema = z.enum(PROCESS_STATUS_VALUES); - * - * // Get full registry - * const registry = buildRegistry(); - * ``` - */ -export { ACCEPTED_STATUS_VALUES, DEFAULT_STATUS, PROCESS_STATUS_VALUES, VALID_PROCESS_STATUS_SET, type AcceptedStatusValue, type ProcessStatusValue, } from './status-values.js'; -export { DEFAULT_DELIVERABLE_STATUS, DELIVERABLE_STATUS_VALUES, VALID_DELIVERABLE_STATUS_SET, getDeliverableStatusEmoji, isDeliverableStatusComplete, isDeliverableStatusInProgress, isDeliverableStatusPending, isDeliverableStatusTerminal, type DeliverableStatus, } from './deliverable-status.js'; -export { normalizeStatus, isPatternComplete, isPatternActive, isPatternPlanned, NORMALIZED_STATUS_VALUES, STATUS_NORMALIZATION_MAP, type NormalizedStatus, } from './normalized-status.js'; -export { FORMAT_TYPES, type FormatType } from './format-types.js'; -export { DEFAULT_HIERARCHY_LEVEL, HIERARCHY_LEVELS, type HierarchyLevel, } from './hierarchy-levels.js'; -export { RISK_LEVELS, type RiskLevel } from './risk-levels.js'; -export { LAYER_TYPES, type LayerType } from './layer-types.js'; -export { SEVERITY_TYPES, type SeverityType } from './severity-types.js'; -export { CATEGORIES, CATEGORY_TAGS, type CategoryDefinition, type CategoryTag, } from './categories.js'; -export { ACCEPTANCE_CRITERIA_FORMAT, CORE_PATTERNS_FORMAT, DELIVERABLES_FORMAT, DEPENDENCIES_FORMAT, GLOBAL_FORMAT_OPTIONS, PATTERN_LIST_FORMAT, ADR_LIST_GROUP_BY, CONSTRAINTS_GROUP_BY, DELIVERABLES_GROUP_BY, PRD_FEATURES_GROUP_BY, REMAINING_WORK_GROUP_BY, SESSION_FINDINGS_GROUP_BY, TIMELINE_GROUP_BY, PR_CHANGES_SORT_BY, REMAINING_WORK_SORT_BY, ADR_LAYER_VALUES, ADR_STATUS_VALUES, ADR_THEME_VALUES, PRIORITY_VALUES, WORKFLOW_VALUES, type AcceptanceCriteriaFormat, type AdrLayerValue, type AdrListGroupBy, type AdrStatusValue, type AdrThemeValue, type ConstraintsGroupBy, type CorePatternsFormat, type DeliverablesFormat, type DeliverablesGroupBy, type DependenciesFormat, type GlobalFormatOption, type PatternListFormat, type PrChangesSortBy, type PrdFeaturesGroupBy, type PriorityValue, type RemainingWorkGroupBy, type RemainingWorkSortBy, type SessionFindingsGroupBy, type TimelineGroupBy, type WorkflowValue, } from './generator-options.js'; -export { CONVENTION_VALUES, type ConventionValue } from './conventions.js'; -export { buildRegistry, type TagRegistry } from './registry-builder.js'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/dist/taxonomy/index.d.ts.map b/dist/taxonomy/index.d.ts.map deleted file mode 100644 index bfb1e5c6..00000000 --- a/dist/taxonomy/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceR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tB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,eAAe,EAEf,KAAK,wBAAwB,EAC7B,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,eAAe,EACpB,KAAK,aAAa,GACnB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EAAE,iBAAiB,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAG3E,OAAO,EAAE,aAAa,EAAE,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAC"} \ No newline at end of file diff --git a/dist/taxonomy/index.js b/dist/taxonomy/index.js deleted file mode 100644 index ccde9acb..00000000 --- a/dist/taxonomy/index.js +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Taxonomy Module - Single Source of Truth - * - * This module provides all taxonomy constants, types, and the registry builder. - * All consumers should import from this module instead of reading JSON files. - * - * @example - * ```typescript - * import { - * PROCESS_STATUS_VALUES, - * type ProcessStatusValue, - * buildRegistry - * } from "@libar/taxonomy"; - * - * // Use constant in Zod schema - * const StatusSchema = z.enum(PROCESS_STATUS_VALUES); - * - * // Get full registry - * const registry = buildRegistry(); - * ``` - */ -// Status values (PDR-005 FSM) -export { ACCEPTED_STATUS_VALUES, DEFAULT_STATUS, PROCESS_STATUS_VALUES, VALID_PROCESS_STATUS_SET, } from './status-values.js'; -// Deliverable status (6 canonical values for Background table Status column) -export { DEFAULT_DELIVERABLE_STATUS, DELIVERABLE_STATUS_VALUES, VALID_DELIVERABLE_STATUS_SET, getDeliverableStatusEmoji, isDeliverableStatusComplete, isDeliverableStatusInProgress, isDeliverableStatusPending, isDeliverableStatusTerminal, } from './deliverable-status.js'; -// Normalized status (display buckets) and pattern-domain helpers -export { normalizeStatus, isPatternComplete, isPatternActive, isPatternPlanned, NORMALIZED_STATUS_VALUES, STATUS_NORMALIZATION_MAP, } from './normalized-status.js'; -// Format types (tag value formats) -export { FORMAT_TYPES } from './format-types.js'; -// Hierarchy levels -export { DEFAULT_HIERARCHY_LEVEL, HIERARCHY_LEVELS, } from './hierarchy-levels.js'; -// Risk levels -export { RISK_LEVELS } from './risk-levels.js'; -// Layer types (feature layer classification) -export { LAYER_TYPES } from './layer-types.js'; -// Severity types (lint/validation) -export { SEVERITY_TYPES } from './severity-types.js'; -// Categories (DDD/ES/CQRS domain taxonomy) -export { CATEGORIES, CATEGORY_TAGS, } from './categories.js'; -// Generator options (format, groupBy, sortBy enums) -export { -// Format options -ACCEPTANCE_CRITERIA_FORMAT, CORE_PATTERNS_FORMAT, DELIVERABLES_FORMAT, DEPENDENCIES_FORMAT, GLOBAL_FORMAT_OPTIONS, PATTERN_LIST_FORMAT, -// GroupBy options -ADR_LIST_GROUP_BY, CONSTRAINTS_GROUP_BY, DELIVERABLES_GROUP_BY, PRD_FEATURES_GROUP_BY, REMAINING_WORK_GROUP_BY, SESSION_FINDINGS_GROUP_BY, TIMELINE_GROUP_BY, -// SortBy options -PR_CHANGES_SORT_BY, REMAINING_WORK_SORT_BY, -// Metadata tag enums -ADR_LAYER_VALUES, ADR_STATUS_VALUES, ADR_THEME_VALUES, PRIORITY_VALUES, WORKFLOW_VALUES, } from './generator-options.js'; -// Convention values (reference document generation) -export { CONVENTION_VALUES } from './conventions.js'; -// Registry builder -export { buildRegistry } from './registry-builder.js'; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/taxonomy/index.js.map b/dist/taxonomy/index.js.map deleted file mode 100644 index 84ddcaae..00000000 --- a/dist/taxonomy/index.js.map +++ /dev/null @@ -1 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B,sBAAsB;AACtB,qBAAqB;AACrB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,eAAe,GAsBhB,MAAM,wBAAwB,CAAC;AAEhC,oDAAoD;AACpD,OAAO,EAAE,iBAAiB,EAAwB,MAAM,kBAAkB,CAAC;AAE3E,mBAAmB;AACnB,OAAO,EAAE,aAAa,EAAoB,MAAM,uBAAuB,CAAC"} \ No newline at end of file diff --git a/dist/taxonomy/layer-types.d.ts b/dist/taxonomy/layer-types.d.ts deleted file mode 100644 index a4f2cc96..00000000 --- a/dist/taxonomy/layer-types.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * @libar-docs - * @libar-docs-pattern LayerTypes - * @libar-docs-status completed - * @libar-docs-core - * @libar-docs-extract-shapes LAYER_TYPES, LayerType - * - * ## Feature Layer Types for Test Organization - * - * Inferred from feature file directory paths: - * - timeline: Process/workflow features (delivery-process) - * - domain: Business domain features - * - integration: Cross-system integration tests - * - e2e: End-to-end user journey tests - * - component: Unit/component level tests - * - unknown: Cannot determine layer from path - */ -export declare const LAYER_TYPES: readonly ["timeline", "domain", "integration", "e2e", "component", "unknown"]; -export type LayerType = (typeof LAYER_TYPES)[number]; -//# sourceMappingURL=layer-types.d.ts.map \ No newline at end of file diff --git a/dist/taxonomy/layer-types.d.ts.map b/dist/taxonomy/layer-types.d.ts.map deleted file mode 100644 index f5cd47b2..00000000 --- a/dist/taxonomy/layer-types.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"layer-types.d.ts","sourceRoot":"","sources":["../../src/taxonomy/layer-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,WAAW,+EAOd,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/taxonomy/layer-types.js b/dist/taxonomy/layer-types.js deleted file mode 100644 index e30872e7..00000000 --- a/dist/taxonomy/layer-types.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * @libar-docs - * @libar-docs-pattern LayerTypes - * @libar-docs-status completed - * @libar-docs-core - * @libar-docs-extract-shapes LAYER_TYPES, LayerType - * - * ## Feature Layer Types for Test Organization - * - * Inferred from feature file directory paths: - * - timeline: Process/workflow features (delivery-process) - * - domain: Business domain features - * - integration: Cross-system integration tests - * - e2e: End-to-end user journey tests - * - component: Unit/component level tests - * - unknown: Cannot determine layer from path - */ -export const LAYER_TYPES = [ - 'timeline', - 'domain', - 'integration', - 'e2e', - 'component', - 'unknown', -]; -//# sourceMappingURL=layer-types.js.map \ No newline at end of file diff --git a/dist/taxonomy/layer-types.js.map b/dist/taxonomy/layer-types.js.map deleted file mode 100644 index 8b278bfc..00000000 --- a/dist/taxonomy/layer-types.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"layer-types.js","sourceRoot":"","sources":["../../src/taxonomy/layer-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,UAAU;IACV,QAAQ;IACR,aAAa;IACb,KAAK;IACL,WAAW;IACX,SAAS;CACD,CAAC"} \ No newline at end of file diff --git a/dist/taxonomy/normalized-status.d.ts b/dist/taxonomy/normalized-status.d.ts deleted file mode 100644 index 9f3c1606..00000000 --- a/dist/taxonomy/normalized-status.d.ts +++ /dev/null @@ -1,97 +0,0 @@ -/** - * @libar-docs - * @libar-docs-pattern NormalizedStatus - * @libar-docs-status completed - * @libar-docs-core - * @libar-docs-extract-shapes NORMALIZED_STATUS_VALUES, NormalizedStatus, STATUS_NORMALIZATION_MAP, normalizeStatus - * - * ## Normalized Status Values for Display - * - * The delivery-process system uses a two-level status taxonomy: - * - * 1. Raw status (PROCESS_STATUS_VALUES in status-values.ts): - * The 4 FSM states stored in data: roadmap, active, completed, deferred - * - * 2. Normalized status (this file): - * The 3 display buckets for UI presentation - * - * This separation follows DDD principles - the domain model (raw) is - * distinct from the view model (normalized). - */ -/** - * Normalized status values for display - * - * Maps raw FSM states to three presentation buckets: - * - completed: Work is done - * - active: Work in progress - * - planned: Future work (includes roadmap and deferred) - */ -export declare const NORMALIZED_STATUS_VALUES: readonly ["completed", "active", "planned"]; -export type NormalizedStatus = (typeof NORMALIZED_STATUS_VALUES)[number]; -/** - * Maps raw status values → normalized display status - * - * Includes both: - * Canonical taxonomy values (per PDR-005 FSM) - */ -export declare const STATUS_NORMALIZATION_MAP: Readonly>; -/** - * Normalize any status string to a display bucket - * - * Maps status values to three canonical display states: - * - "completed": completed - * - "active": active - * - "planned": roadmap, deferred, planned, or any unknown value - * - * Per PDR-005: deferred items are treated as planned (not actively worked on) - * - * @libar-docs-shape reference-sample - * @param status - Raw status from pattern (case-insensitive) - * @returns "completed" | "active" | "planned" - * - * @example - * ```typescript - * normalizeStatus("completed") // → "completed" - * normalizeStatus("active") // → "active" - * normalizeStatus("roadmap") // → "planned" - * normalizeStatus("deferred") // → "planned" - * normalizeStatus(undefined) // → "planned" - * ``` - */ -export declare function normalizeStatus(status: string | undefined): NormalizedStatus; -/** - * Check if a pattern's FSM status normalizes to "completed" - * - * Use this for **pattern-level** status checks (FSM-governed, 4 values). - * For **deliverable-level** status checks (canonical enum: complete/in-progress/pending/ - * deferred/superseded/n/a), use `isDeliverableStatusComplete()` from - * `taxonomy/deliverable-status.ts` instead. - * - * @param status - Raw pattern status from ExtractedPattern.status - * @returns True if the pattern is completed - */ -export declare function isPatternComplete(status: string | undefined): boolean; -/** - * Check if a pattern's FSM status normalizes to "active" - * - * Use this for **pattern-level** status checks (FSM-governed, 4 values). - * For **deliverable-level** status checks (canonical enum), - * use `isDeliverableStatusInProgress()` from `taxonomy/deliverable-status.ts` instead. - * - * @param status - Raw pattern status from ExtractedPattern.status - * @returns True if the pattern is active - */ -export declare function isPatternActive(status: string | undefined): boolean; -/** - * Check if a pattern's FSM status normalizes to "planned" - * - * Includes both "roadmap" and "deferred" FSM states, as well as - * undefined/unknown statuses. Use this for **pattern-level** status checks. - * For **deliverable-level** status checks, use `isDeliverableStatusPending()` from - * `taxonomy/deliverable-status.ts` instead. - * - * @param status - Raw pattern status from ExtractedPattern.status - * @returns True if the pattern is planned (roadmap, deferred, or unknown) - */ -export declare function isPatternPlanned(status: string | undefined): boolean; -//# sourceMappingURL=normalized-status.d.ts.map \ No newline at end of file diff --git a/dist/taxonomy/normalized-status.d.ts.map b/dist/taxonomy/normalized-status.d.ts.map deleted file mode 100644 index 6abde9fd..00000000 --- a/dist/taxonomy/normalized-status.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"normalized-status.d.ts","sourceRoot":"","sources":["../../src/taxonomy/normalized-status.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB,6CAA8C,CAAC;AAEpF,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzE;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAM/E,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,gBAAgB,CAG5E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAErE;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAEnE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAEpE"} \ No newline at end of file diff --git a/dist/taxonomy/normalized-status.js b/dist/taxonomy/normalized-status.js deleted file mode 100644 index a9ed94f5..00000000 --- a/dist/taxonomy/normalized-status.js +++ /dev/null @@ -1,112 +0,0 @@ -/** - * @libar-docs - * @libar-docs-pattern NormalizedStatus - * @libar-docs-status completed - * @libar-docs-core - * @libar-docs-extract-shapes NORMALIZED_STATUS_VALUES, NormalizedStatus, STATUS_NORMALIZATION_MAP, normalizeStatus - * - * ## Normalized Status Values for Display - * - * The delivery-process system uses a two-level status taxonomy: - * - * 1. Raw status (PROCESS_STATUS_VALUES in status-values.ts): - * The 4 FSM states stored in data: roadmap, active, completed, deferred - * - * 2. Normalized status (this file): - * The 3 display buckets for UI presentation - * - * This separation follows DDD principles - the domain model (raw) is - * distinct from the view model (normalized). - */ -/** - * Normalized status values for display - * - * Maps raw FSM states to three presentation buckets: - * - completed: Work is done - * - active: Work in progress - * - planned: Future work (includes roadmap and deferred) - */ -export const NORMALIZED_STATUS_VALUES = ['completed', 'active', 'planned']; -/** - * Maps raw status values → normalized display status - * - * Includes both: - * Canonical taxonomy values (per PDR-005 FSM) - */ -export const STATUS_NORMALIZATION_MAP = { - completed: 'completed', - active: 'active', - roadmap: 'planned', - deferred: 'planned', - planned: 'planned', -}; -/** - * Normalize any status string to a display bucket - * - * Maps status values to three canonical display states: - * - "completed": completed - * - "active": active - * - "planned": roadmap, deferred, planned, or any unknown value - * - * Per PDR-005: deferred items are treated as planned (not actively worked on) - * - * @libar-docs-shape reference-sample - * @param status - Raw status from pattern (case-insensitive) - * @returns "completed" | "active" | "planned" - * - * @example - * ```typescript - * normalizeStatus("completed") // → "completed" - * normalizeStatus("active") // → "active" - * normalizeStatus("roadmap") // → "planned" - * normalizeStatus("deferred") // → "planned" - * normalizeStatus(undefined) // → "planned" - * ``` - */ -export function normalizeStatus(status) { - if (!status) - return 'planned'; - return STATUS_NORMALIZATION_MAP[status.toLowerCase()] ?? 'planned'; -} -/** - * Check if a pattern's FSM status normalizes to "completed" - * - * Use this for **pattern-level** status checks (FSM-governed, 4 values). - * For **deliverable-level** status checks (canonical enum: complete/in-progress/pending/ - * deferred/superseded/n/a), use `isDeliverableStatusComplete()` from - * `taxonomy/deliverable-status.ts` instead. - * - * @param status - Raw pattern status from ExtractedPattern.status - * @returns True if the pattern is completed - */ -export function isPatternComplete(status) { - return normalizeStatus(status) === 'completed'; -} -/** - * Check if a pattern's FSM status normalizes to "active" - * - * Use this for **pattern-level** status checks (FSM-governed, 4 values). - * For **deliverable-level** status checks (canonical enum), - * use `isDeliverableStatusInProgress()` from `taxonomy/deliverable-status.ts` instead. - * - * @param status - Raw pattern status from ExtractedPattern.status - * @returns True if the pattern is active - */ -export function isPatternActive(status) { - return normalizeStatus(status) === 'active'; -} -/** - * Check if a pattern's FSM status normalizes to "planned" - * - * Includes both "roadmap" and "deferred" FSM states, as well as - * undefined/unknown statuses. Use this for **pattern-level** status checks. - * For **deliverable-level** status checks, use `isDeliverableStatusPending()` from - * `taxonomy/deliverable-status.ts` instead. - * - * @param status - Raw pattern status from ExtractedPattern.status - * @returns True if the pattern is planned (roadmap, deferred, or unknown) - */ -export function isPatternPlanned(status) { - return normalizeStatus(status) === 'planned'; -} -//# sourceMappingURL=normalized-status.js.map \ No newline at end of file diff --git a/dist/taxonomy/normalized-status.js.map b/dist/taxonomy/normalized-status.js.map deleted file mode 100644 index e8838891..00000000 --- a/dist/taxonomy/normalized-status.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"normalized-status.js","sourceRoot":"","sources":["../../src/taxonomy/normalized-status.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,WAAW,EAAE,QAAQ,EAAE,SAAS,CAAU,CAAC;AAIpF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAA+C;IAClF,SAAS,EAAE,WAAW;IACtB,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,SAAS;IACnB,OAAO,EAAE,SAAS;CACnB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,UAAU,eAAe,CAAC,MAA0B;IACxD,IAAI,CAAC,MAAM;QAAE,OAAO,SAAS,CAAC;IAC9B,OAAO,wBAAwB,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,IAAI,SAAS,CAAC;AACrE,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAA0B;IAC1D,OAAO,eAAe,CAAC,MAAM,CAAC,KAAK,WAAW,CAAC;AACjD,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,eAAe,CAAC,MAA0B;IACxD,OAAO,eAAe,CAAC,MAAM,CAAC,KAAK,QAAQ,CAAC;AAC9C,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAA0B;IACzD,OAAO,eAAe,CAAC,MAAM,CAAC,KAAK,SAAS,CAAC;AAC/C,CAAC"} \ No newline at end of file diff --git a/dist/taxonomy/registry-builder.d.ts b/dist/taxonomy/registry-builder.d.ts deleted file mode 100644 index abc68ace..00000000 --- a/dist/taxonomy/registry-builder.d.ts +++ /dev/null @@ -1,103 +0,0 @@ -import { type FormatType } from './format-types.js'; -/** - * TagRegistry interface (matches schema from validation-schemas/tag-registry.ts) - */ -export interface TagRegistry { - /** Schema version for forward/backward compatibility checking */ - version: string; - /** Category definitions for classifying patterns by domain (e.g., core, api, ddd) */ - categories: readonly CategoryDefinitionForRegistry[]; - /** Metadata tag definitions with format, purpose, and validation rules */ - metadataTags: readonly MetadataTagDefinitionForRegistry[]; - /** Aggregation tag definitions for document-level grouping */ - aggregationTags: readonly AggregationTagDefinitionForRegistry[]; - /** Available format options for documentation output */ - formatOptions: readonly string[]; - /** Prefix for all tags (e.g., "@libar-docs-") */ - tagPrefix: string; - /** File-level opt-in marker tag (e.g., "@libar-docs") */ - fileOptInTag: string; -} -interface CategoryDefinitionForRegistry { - /** Category tag name without prefix (e.g., "core", "api", "ddd") */ - tag: string; - /** Human-readable domain name (e.g., "Core Infrastructure", "Strategic DDD") */ - domain: string; - /** Display order priority (lower = higher priority, determines sort order) */ - priority: number; - /** Brief description of the category's purpose and scope */ - description: string; - /** Alternative tag names that map to this category */ - aliases: readonly string[]; -} -export interface MetadataTagDefinitionForRegistry { - /** Tag name without prefix (e.g., "pattern", "status", "phase") */ - tag: string; - /** Value format type determining parsing rules (flag, value, enum, csv, number, quoted-value) */ - format: FormatType; - /** Human-readable description of the tag's purpose and usage */ - purpose: string; - /** Whether this tag must be present for valid patterns */ - required?: boolean; - /** Whether this tag can appear multiple times on a single pattern */ - repeatable?: boolean; - /** Valid values for enum-type tags (undefined for non-enum formats) */ - values?: readonly string[]; - /** Default value applied when tag is not specified */ - default?: string; - /** Example usage showing tag syntax (e.g., "@libar-docs-pattern MyPattern") */ - example?: string; - /** Maps tag name to metadata object property name (defaults to kebab-to-camelCase) */ - metadataKey?: string; - /** Post-parse value transformer applied after format-based parsing */ - transform?: (value: string) => string; -} -export type TagDefinition = MetadataTagDefinitionForRegistry; -interface AggregationTagDefinitionForRegistry { - /** Aggregation tag name (e.g., "overview", "decision", "intro") */ - tag: string; - /** Target document filename this tag aggregates to (null = inline rendering) */ - targetDoc: string | null; - /** Description of what this aggregation collects */ - purpose: string; -} -/** - * Metadata tags organized by functional group. - * Used for documentation generation to create organized sections. - * - * Groups: - * - core: Essential pattern identification (pattern, status, core, usecase, brief) - * - relationship: Pattern dependencies and connections - * - process: Timeline and assignment tracking - * - prd: Product requirements documentation - * - adr: Architecture decision records - * - hierarchy: Epic/phase/task breakdown - * - traceability: Two-tier spec architecture links - * - discovery: Session discovery findings (retrospective tags) - * - architecture: Diagram generation tags - * - extraction: Documentation extraction control - * - stub: Design session stub metadata - */ -export declare const METADATA_TAGS_BY_GROUP: { - readonly core: readonly ["pattern", "status", "core", "usecase", "brief"]; - readonly relationship: readonly ["uses", "used-by", "implements", "extends", "depends-on", "enables", "see-also", "api-ref"]; - readonly process: readonly ["phase", "release", "quarter", "completed", "effort", "effort-actual", "team", "workflow", "risk", "priority"]; - readonly prd: readonly ["product-area", "user-role", "business-value", "constraint"]; - readonly adr: readonly ["adr", "adr-status", "adr-category", "adr-supersedes", "adr-superseded-by", "adr-theme", "adr-layer"]; - readonly hierarchy: readonly ["level", "parent", "title"]; - readonly traceability: readonly ["executable-specs", "roadmap-spec", "behavior-file"]; - readonly discovery: readonly ["discovered-gap", "discovered-improvement", "discovered-risk", "discovered-learning"]; - readonly architecture: readonly ["arch-role", "arch-context", "arch-layer", "include"]; - readonly extraction: readonly ["extract-shapes", "shape"]; - readonly stub: readonly ["target", "since"]; - readonly convention: readonly ["convention"]; -}; -/** - * Build the complete tag registry from TypeScript constants - * - * This is THE single source of truth for the taxonomy. - * All consumers should use this function instead of loading JSON. - */ -export declare function buildRegistry(): TagRegistry; -export {}; -//# sourceMappingURL=registry-builder.d.ts.map \ No newline at end of file diff --git a/dist/taxonomy/registry-builder.d.ts.map b/dist/taxonomy/registry-builder.d.ts.map deleted file mode 100644 index 066c3465..00000000 --- a/dist/taxonomy/registry-builder.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"registry-builder.d.ts","sourceRoot":"","sources":["../../src/taxonomy/registry-builder.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAepD;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,iEAAiE;IACjE,OAAO,EAAE,MAAM,CAAC;IAChB,qFAAqF;IACrF,UAAU,EAAE,SAAS,6BAA6B,EAAE,CAAC;IACrD,0EAA0E;IAC1E,YAAY,EAAE,SAAS,gCAAgC,EAAE,CAAC;IAC1D,8DAA8D;IAC9D,eAAe,EAAE,SAAS,mCAAmC,EAAE,CAAC;IAChE,wDAAwD;IACxD,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,iDAAiD;IACjD,SAAS,EAAE,MA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AI,WAAW,CAuZ3C"} \ No newline at end of file diff --git a/dist/taxonomy/registry-builder.js b/dist/taxonomy/registry-builder.js deleted file mode 100644 index 98e66a65..00000000 --- a/dist/taxonomy/registry-builder.js +++ /dev/null @@ -1,508 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern TagRegistryBuilder - * @libar-docs-status completed - * @libar-docs-arch-role service - * @libar-docs-arch-context taxonomy - * @libar-docs-arch-layer domain - * @libar-docs-implements TypeScriptTaxonomyImplementation - * @libar-docs-extract-shapes TagRegistry, MetadataTagDefinitionForRegistry, TagDefinition, buildRegistry, METADATA_TAGS_BY_GROUP - * - * ## Tag Registry Builder - * - * Constructs a complete TagRegistry from TypeScript constants. - * Provides the default tag definitions for the delivery-process annotation system. - * - * ### When to Use - * - * - When building custom tag registries with modified definitions - * - When accessing tag metadata (format, purpose, values) - * - When initializing the taxonomy for pattern extraction - */ -import { CATEGORIES } from './categories.js'; -import { ADR_LAYER_VALUES, ADR_STATUS_VALUES, ADR_THEME_VALUES, GLOBAL_FORMAT_OPTIONS, PRIORITY_VALUES, WORKFLOW_VALUES, } from './generator-options.js'; -import { DEFAULT_HIERARCHY_LEVEL, HIERARCHY_LEVELS } from './hierarchy-levels.js'; -import { RISK_LEVELS } from './risk-levels.js'; -import { ACCEPTED_STATUS_VALUES, DEFAULT_STATUS } from './status-values.js'; -import { CONVENTION_VALUES } from './conventions.js'; -import { DEFAULT_TAG_PREFIX, DEFAULT_FILE_OPT_IN_TAG } from '../config/defaults.js'; -/** - * Metadata tags organized by functional group. - * Used for documentation generation to create organized sections. - * - * Groups: - * - core: Essential pattern identification (pattern, status, core, usecase, brief) - * - relationship: Pattern dependencies and connections - * - process: Timeline and assignment tracking - * - prd: Product requirements documentation - * - adr: Architecture decision records - * - hierarchy: Epic/phase/task breakdown - * - traceability: Two-tier spec architecture links - * - discovery: Session discovery findings (retrospective tags) - * - architecture: Diagram generation tags - * - extraction: Documentation extraction control - * - stub: Design session stub metadata - */ -export const METADATA_TAGS_BY_GROUP = { - core: ['pattern', 'status', 'core', 'usecase', 'brief'], - relationship: [ - 'uses', - 'used-by', - 'implements', - 'extends', - 'depends-on', - 'enables', - 'see-also', - 'api-ref', - ], - process: [ - 'phase', - 'release', - 'quarter', - 'completed', - 'effort', - 'effort-actual', - 'team', - 'workflow', - 'risk', - 'priority', - ], - prd: ['product-area', 'user-role', 'business-value', 'constraint'], - adr: [ - 'adr', - 'adr-status', - 'adr-category', - 'adr-supersedes', - 'adr-superseded-by', - 'adr-theme', - 'adr-layer', - ], - hierarchy: ['level', 'parent', 'title'], - traceability: ['executable-specs', 'roadmap-spec', 'behavior-file'], - discovery: [ - 'discovered-gap', - 'discovered-improvement', - 'discovered-risk', - 'discovered-learning', - ], - architecture: ['arch-role', 'arch-context', 'arch-layer', 'include'], - extraction: ['extract-shapes', 'shape'], - stub: ['target', 'since'], - convention: ['convention'], -}; -// Transform helpers for data-driven Gherkin tag extraction -const hyphenToSpace = (v) => v.replace(/-/g, ' '); -const padAdr = (v) => v.padStart(3, '0'); -const stripQuotes = (v) => v.replace(/^["']|["']$/g, ''); -/** - * Build the complete tag registry from TypeScript constants - * - * This is THE single source of truth for the taxonomy. - * All consumers should use this function instead of loading JSON. - */ -export function buildRegistry() { - return { - version: '2.0.0', - categories: CATEGORIES, - metadataTags: [ - { - tag: 'pattern', - format: 'value', - purpose: 'Explicit pattern name', - required: true, - example: '@libar-docs-pattern CommandOrchestrator', - }, - { - tag: 'status', - format: 'enum', - purpose: 'Work item lifecycle status (per PDR-005 FSM)', - values: [...ACCEPTED_STATUS_VALUES], // Includes legacy values for extraction - default: DEFAULT_STATUS, - example: '@libar-docs-status roadmap', - }, - { - tag: 'core', - format: 'flag', - purpose: 'Marks as essential/must-know pattern', - example: '@libar-docs-core', - }, - { - tag: 'usecase', - format: 'quoted-value', - purpose: 'Use case association', - repeatable: true, - example: '@libar-docs-usecase "When handling command failures"', - }, - { - tag: 'uses', - format: 'csv', - purpose: 'Patterns this depends on', - example: '@libar-docs-uses CommandBus, EventStore', - }, - { - tag: 'used-by', - format: 'csv', - purpose: 'Patterns that depend on this', - example: '@libar-docs-used-by SagaOrchestrator', - }, - { - tag: 'phase', - format: 'number', - purpose: 'Roadmap phase number (unified across monorepo)', - example: '@libar-docs-phase 14', - }, - { - tag: 'release', - format: 'value', - purpose: 'Target release version (semver or vNEXT for unreleased work)', - example: '@libar-docs-release v0.1.0', - }, - { - tag: 'brief', - format: 'value', - purpose: 'Path to pattern brief markdown', - example: '@libar-docs-brief docs/briefs/decider-pattern.md', - }, - { - tag: 'depends-on', - format: 'csv', - purpose: 'Roadmap dependencies (pattern or phase names)', - example: '@libar-docs-depends-on EventStore, CommandBus', - }, - { - tag: 'enables', - format: 'csv', - purpose: 'Patterns this enables', - example: '@libar-docs-enables SagaOrchestrator, ProjectionBuilder', - }, - // Relationship tags for UML-inspired pattern modeling (PatternRelationshipModel) - { - tag: 'implements', - format: 'csv', - purpose: 'Patterns this code file realizes (realization relationship)', - metadataKey: 'implementsPatterns', - example: '@libar-docs-implements EventStoreDurability, IdempotentAppend', - }, - { - tag: 'extends', - format: 'value', - purpose: 'Base pattern this pattern extends (generalization relationship)', - metadataKey: 'extendsPattern', - example: '@libar-docs-extends ProjectionCategories', - }, - { - tag: 'quarter', - format: 'value', - purpose: 'Delivery quarter for timeline tracking', - example: '@libar-docs-quarter Q1-2026', - }, - { - tag: 'completed', - format: 'value', - purpose: 'Completion date (YYYY-MM-DD format)', - example: '@libar-docs-completed 2026-01-08', - }, - { - tag: 'effort', - format: 'value', - purpose: 'Estimated effort (4h, 2d, 1w format)', - example: '@libar-docs-effort 2d', - }, - { - tag: 'effort-actual', - format: 'value', - purpose: 'Actual effort spent (4h, 2d, 1w format)', - example: '@libar-docs-effort-actual 3d', - }, - { - tag: 'team', - format: 'value', - purpose: 'Responsible team assignment', - example: '@libar-docs-team platform', - }, - { - tag: 'workflow', - format: 'enum', - purpose: 'Workflow discipline for process tracking', - values: [...WORKFLOW_VALUES], - example: '@libar-docs-workflow implementation', - }, - { - tag: 'risk', - format: 'enum', - purpose: 'Risk level for planning', - values: [...RISK_LEVELS], - example: '@libar-docs-risk medium', - }, - { - tag: 'priority', - format: 'enum', - purpose: 'Priority level for roadmap ordering', - values: [...PRIORITY_VALUES], - example: '@libar-docs-priority high', - }, - { - tag: 'product-area', - format: 'value', - purpose: 'Product area for PRD grouping', - example: '@libar-docs-product-area PlatformCore', - }, - { - tag: 'user-role', - format: 'value', - purpose: 'Target user persona for this feature', - example: '@libar-docs-user-role Developer', - }, - { - tag: 'business-value', - format: 'value', - purpose: 'Business value statement (hyphenated for tag format)', - transform: hyphenToSpace, - example: '@libar-docs-business-value eliminates-event-replay-complexity', - }, - { - tag: 'constraint', - format: 'value', - purpose: 'Technical constraint affecting feature implementation', - repeatable: true, - metadataKey: 'constraints', - transform: hyphenToSpace, - example: '@libar-docs-constraint requires-convex-backend', - }, - { - tag: 'adr', - format: 'value', - purpose: 'ADR/PDR number for decision tracking', - transform: padAdr, - example: '@libar-docs-adr 015', - }, - { - tag: 'adr-status', - format: 'enum', - purpose: 'ADR/PDR decision status', - values: [...ADR_STATUS_VALUES], - default: 'proposed', - example: '@libar-docs-adr-status accepted', - }, - { - tag: 'adr-category', - format: 'value', - purpose: 'ADR/PDR category (architecture, process, tooling)', - example: '@libar-docs-adr-category architecture', - }, - { - tag: 'adr-supersedes', - format: 'value', - purpose: 'ADR/PDR number this decision supersedes', - transform: padAdr, - example: '@libar-docs-adr-supersedes 012', - }, - { - tag: 'adr-superseded-by', - format: 'value', - purpose: 'ADR/PDR number that supersedes this decision', - transform: padAdr, - example: '@libar-docs-adr-superseded-by 020', - }, - { - tag: 'adr-theme', - format: 'enum', - purpose: 'Theme grouping for related decisions (from synthesis)', - values: [...ADR_THEME_VALUES], - example: '@libar-docs-adr-theme persistence', - }, - { - tag: 'adr-layer', - format: 'enum', - purpose: 'Evolutionary layer of the decision', - values: [...ADR_LAYER_VALUES], - example: '@libar-docs-adr-layer foundation', - }, - { - tag: 'level', - format: 'enum', - purpose: 'Hierarchy level for epic->phase->task breakdown', - values: [...HIERARCHY_LEVELS], - default: DEFAULT_HIERARCHY_LEVEL, - example: '@libar-docs-level epic', - }, - { - tag: 'parent', - format: 'value', - purpose: 'Parent pattern name in hierarchy (links tasks to phases, phases to epics)', - example: '@libar-docs-parent AggregateArchitecture', - }, - { - tag: 'title', - format: 'quoted-value', - purpose: 'Human-readable display title (supports quoted values with spaces)', - transform: stripQuotes, - example: '@libar-docs-title:"Process Guard Linter"', - }, - // PDR-007: Two-Tier Spec Architecture traceability - { - tag: 'executable-specs', - format: 'csv', - purpose: 'Links roadmap spec to package executable spec locations (PDR-007)', - example: '@libar-docs-executable-specs platform-decider/tests/features/behavior', - }, - { - tag: 'roadmap-spec', - format: 'value', - purpose: 'Links package spec back to roadmap pattern for traceability (PDR-007)', - example: '@libar-docs-roadmap-spec DeciderPattern', - }, - { - tag: 'behavior-file', - format: 'value', - purpose: 'Path to behavior test feature file for traceability', - example: '@libar-docs-behavior-file behavior/my-pattern.feature', - }, - // Session discovery findings (retrospective tags) - { - tag: 'discovered-gap', - format: 'value', - purpose: 'Gap identified during session retrospective', - repeatable: true, - metadataKey: 'discoveredGaps', - transform: hyphenToSpace, - example: '@libar-docs-discovered-gap missing-error-handling', - }, - { - tag: 'discovered-improvement', - format: 'value', - purpose: 'Improvement identified during session retrospective', - repeatable: true, - metadataKey: 'discoveredImprovements', - transform: hyphenToSpace, - example: '@libar-docs-discovered-improvement cache-invalidation', - }, - { - tag: 'discovered-risk', - format: 'value', - purpose: 'Risk identified during session retrospective', - repeatable: true, - metadataKey: 'discoveredRisks', - transform: hyphenToSpace, - example: '@libar-docs-discovered-risk data-loss-on-migration', - }, - { - tag: 'discovered-learning', - format: 'value', - purpose: 'Learning captured during session retrospective', - repeatable: true, - metadataKey: 'discoveredLearnings', - transform: hyphenToSpace, - example: '@libar-docs-discovered-learning convex-mutation-limits', - }, - // Cross-reference and API navigation tags (PatternRelationshipModel enhancement) - { - tag: 'see-also', - format: 'csv', - purpose: 'Related patterns for cross-reference without dependency implication', - example: '@libar-docs-see-also AgentAsBoundedContext, CrossContextIntegration', - }, - { - tag: 'api-ref', - format: 'csv', - purpose: "File paths to implementation APIs (replaces 'See:' Markdown text in Rules)", - example: '@libar-docs-api-ref @libar-dev/platform-core/src/durability/outbox.ts', - }, - // Shape extraction for documentation generation (ADR-021) - { - tag: 'extract-shapes', - format: 'csv', - purpose: 'TypeScript type names to extract from this file for documentation', - example: '@libar-docs-extract-shapes DeciderInput, ValidationResult, ProcessViolation', - }, - // DD-1: Declaration-level shape tagging - { - tag: 'shape', - format: 'value', - purpose: 'Marks declaration as documentable shape, optionally with group name', - example: '@libar-docs-shape api-types', - }, - // Architecture diagram generation tags - { - tag: 'arch-role', - format: 'enum', - purpose: 'Architectural role for diagram generation (component type)', - values: [ - 'bounded-context', - 'command-handler', - 'projection', - 'saga', - 'process-manager', - 'infrastructure', - 'repository', - 'decider', - 'read-model', - 'service', - ], - example: '@libar-docs-arch-role projection', - }, - { - tag: 'arch-context', - format: 'value', - purpose: 'Bounded context this component belongs to (for subgraph grouping)', - example: '@libar-docs-arch-context orders', - }, - { - tag: 'arch-layer', - format: 'enum', - purpose: 'Architectural layer for layered diagrams', - values: ['domain', 'application', 'infrastructure'], - example: '@libar-docs-arch-layer application', - }, - { - tag: 'include', - format: 'csv', - purpose: 'Cross-cutting document inclusion for content routing and diagram scoping', - example: '@libar-docs-include reference-sample,codec-system', - }, - // Design session stub metadata tags (DataAPIStubIntegration Phase B) - { - tag: 'target', - format: 'value', - purpose: 'Target implementation path for stub files', - example: '@libar-docs-target src/api/stub-resolver.ts', - }, - { - tag: 'since', - format: 'value', - purpose: 'Design session that created this pattern', - example: '@libar-docs-since DS-A', - }, - // Convention tags for reference document generation (CodecDrivenReferenceGeneration) - { - tag: 'convention', - format: 'csv', - purpose: 'Convention domains for reference document generation from decision records', - values: [...CONVENTION_VALUES], - example: '@libar-docs-convention fsm-rules, testing-policy', - }, - ], - aggregationTags: [ - { - tag: 'overview', - targetDoc: 'OVERVIEW.md', - purpose: 'Architecture overview patterns', - }, - { - tag: 'decision', - targetDoc: 'DECISIONS.md', - purpose: 'ADR-style decisions (auto-numbered)', - }, - { - tag: 'intro', - targetDoc: null, - purpose: 'Package introduction (template placeholder)', - }, - ], - formatOptions: [...GLOBAL_FORMAT_OPTIONS], - tagPrefix: DEFAULT_TAG_PREFIX, - fileOptInTag: DEFAULT_FILE_OPT_IN_TAG, - }; -} -//# sourceMappingURL=registry-builder.js.map \ No newline at end of file diff --git a/dist/taxonomy/registry-builder.js.map b/dist/taxonomy/registry-builder.js.map deleted file mode 100644 index b4b33948..00000000 --- a/dist/taxonomy/registry-builder.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"registry-builder.js","sourceRoot":"","sources":["../../src/taxonomy/registry-builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,EACrB,eAAe,EACf,eAAe,GAChB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAClF,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,sBAAsB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAsEpF;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,IAAI,EAAE,CAAC,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE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AAE,6CAA6C;aACvD;YACD;gBACE,GAAG,EAAE,OAAO;gBACZ,MAAM,EAAE,OAAO;gBACf,OAAO,EAAE,0CAA0C;gBACnD,OAAO,EAAE,wBAAwB;aAClC;YACD,qFAAqF;YACrF;gBACE,GAAG,EAAE,YAAY;gBACjB,MAAM,EAAE,KAAK;gBACb,OAAO,EAAE,4EAA4E;gBACrF,MAAM,EAAE,CAAC,GAAG,iBAAiB,CAAC;gBAC9B,OAAO,EAAE,kDAAkD;aAC5D;SACF;QAED,eAAe,EAAE;YACf;gBACE,GAAG,EAAE,UAAU;gBACf,SAAS,EAAE,aAAa;gBACxB,OAAO,EAAE,gCAAgC;aAC1C;YACD;gBACE,GAAG,EAAE,UAAU;gBACf,SAAS,EAAE,cAAc;gBACzB,OAAO,EAAE,qCAAqC;aAC/C;YACD;gBACE,GAAG,EAAE,OAAO;gBACZ,SAAS,EAAE,IAAI;gBACf,OAAO,EAAE,6CAA6C;aACvD;SACF;QAED,aAAa,EAAE,CAAC,GAAG,qBAAqB,CAAC;QACzC,SAAS,EAAE,kBAAkB;QAC7B,YAAY,EAAE,uBAAuB;KACtC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/dist/taxonomy/risk-levels.d.ts b/dist/taxonomy/risk-levels.d.ts deleted file mode 100644 index 09edec88..00000000 --- a/dist/taxonomy/risk-levels.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * @libar-docs - * @libar-docs-pattern RiskLevels - * @libar-docs-status completed - * @libar-docs-core - * @libar-docs-extract-shapes RISK_LEVELS, RiskLevel - * - * ## Risk Levels for Planning and Assessment - * - * Three-tier risk classification for roadmap planning. - */ -export declare const RISK_LEVELS: readonly ["low", "medium", "high"]; -export type RiskLevel = (typeof RISK_LEVELS)[number]; -//# sourceMappingURL=risk-levels.d.ts.map \ No newline at end of file diff --git a/dist/taxonomy/risk-levels.d.ts.map b/dist/taxonomy/risk-levels.d.ts.map deleted file mode 100644 index 71cea4bd..00000000 --- a/dist/taxonomy/risk-levels.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"risk-levels.d.ts","sourceRoot":"","sources":["../../src/taxonomy/risk-levels.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,oCAAqC,CAAC;AAE9D,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/taxonomy/risk-levels.js b/dist/taxonomy/risk-levels.js deleted file mode 100644 index 15dc925a..00000000 --- a/dist/taxonomy/risk-levels.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * @libar-docs - * @libar-docs-pattern RiskLevels - * @libar-docs-status completed - * @libar-docs-core - * @libar-docs-extract-shapes RISK_LEVELS, RiskLevel - * - * ## Risk Levels for Planning and Assessment - * - * Three-tier risk classification for roadmap planning. - */ -export const RISK_LEVELS = ['low', 'medium', 'high']; -//# sourceMappingURL=risk-levels.js.map \ No newline at end of file diff --git a/dist/taxonomy/risk-levels.js.map b/dist/taxonomy/risk-levels.js.map deleted file mode 100644 index 166e9465..00000000 --- a/dist/taxonomy/risk-levels.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"risk-levels.js","sourceRoot":"","sources":["../../src/taxonomy/risk-levels.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,CAAU,CAAC"} \ No newline at end of file diff --git a/dist/taxonomy/severity-types.d.ts b/dist/taxonomy/severity-types.d.ts deleted file mode 100644 index fbe15cfe..00000000 --- a/dist/taxonomy/severity-types.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * Severity types for lint violations and validation issues - */ -export declare const SEVERITY_TYPES: readonly ["error", "warning", "info"]; -export type SeverityType = (typeof SEVERITY_TYPES)[number]; -//# sourceMappingURL=severity-types.d.ts.map \ No newline at end of file diff --git a/dist/taxonomy/severity-types.d.ts.map b/dist/taxonomy/severity-types.d.ts.map deleted file mode 100644 index 8666cfc1..00000000 --- a/dist/taxonomy/severity-types.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"severity-types.d.ts","sourceRoot":"","sources":["../../src/taxonomy/severity-types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,cAAc,uCAAwC,CAAC;AAEpE,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/taxonomy/severity-types.js b/dist/taxonomy/severity-types.js deleted file mode 100644 index 66c6d638..00000000 --- a/dist/taxonomy/severity-types.js +++ /dev/null @@ -1,5 +0,0 @@ -/** - * Severity types for lint violations and validation issues - */ -export const SEVERITY_TYPES = ['error', 'warning', 'info']; -//# sourceMappingURL=severity-types.js.map \ No newline at end of file diff --git a/dist/taxonomy/severity-types.js.map b/dist/taxonomy/severity-types.js.map deleted file mode 100644 index fa55080d..00000000 --- a/dist/taxonomy/severity-types.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"severity-types.js","sourceRoot":"","sources":["../../src/taxonomy/severity-types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,SAAS,EAAE,MAAM,CAAU,CAAC"} \ No newline at end of file diff --git a/dist/taxonomy/status-values.d.ts b/dist/taxonomy/status-values.d.ts deleted file mode 100644 index be2e034a..00000000 --- a/dist/taxonomy/status-values.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * @libar-docs - * @libar-docs-pattern StatusValues - * @libar-docs-status completed - * @libar-docs-core - * @libar-docs-extract-shapes PROCESS_STATUS_VALUES, ProcessStatusValue, ACCEPTED_STATUS_VALUES, AcceptedStatusValue, DEFAULT_STATUS, VALID_PROCESS_STATUS_SET - * - * ## Process Workflow Status Values - * - * THE single source of truth for FSM state values in the monorepo (per PDR-005 FSM). - * - * FSM transitions: - * - roadmap to active (start work) - * - roadmap to deferred (pause before start) - * - deferred to roadmap (resume planning) - * - active to completed (finish work) - * - active to deferred (pause work) - * - deferred to active (resume work) - * - active cannot regress to roadmap - */ -export declare const PROCESS_STATUS_VALUES: readonly ["roadmap", "active", "completed", "deferred"]; -/** - * Extended status values accepted for extraction and validation - * - * FSM states that can be used in annotations. - * Use only these canonical values: roadmap, active, completed, deferred. - */ -export declare const ACCEPTED_STATUS_VALUES: readonly ["roadmap", "active", "completed", "deferred"]; -export type AcceptedStatusValue = (typeof ACCEPTED_STATUS_VALUES)[number]; -export type ProcessStatusValue = (typeof PROCESS_STATUS_VALUES)[number]; -/** - * Default status for new items - */ -export declare const DEFAULT_STATUS: ProcessStatusValue; -/** - * Pre-built set of valid process statuses for O(1) membership checks. - */ -export declare const VALID_PROCESS_STATUS_SET: ReadonlySet; -//# sourceMappingURL=status-values.d.ts.map \ No newline at end of file diff --git a/dist/taxonomy/status-values.d.ts.map b/dist/taxonomy/status-values.d.ts.map deleted file mode 100644 index 23721d98..00000000 --- a/dist/taxonomy/status-values.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"status-values.d.ts","sourceRoot":"","sources":["../../src/taxonomy/status-values.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,qBAAqB,yDAKxB,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,yDAAsC,CAAC;AAE1E,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1E,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAExE;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,kBAA8B,CAAC;AAE5D;;GAEG;AACH,eAAO,MAAM,wBAAwB,EAAE,WAAW,CAAC,MAAM,CAA0C,CAAC"} \ No newline at end of file diff --git a/dist/taxonomy/status-values.js b/dist/taxonomy/status-values.js deleted file mode 100644 index fbf7a7dd..00000000 --- a/dist/taxonomy/status-values.js +++ /dev/null @@ -1,42 +0,0 @@ -/** - * @libar-docs - * @libar-docs-pattern StatusValues - * @libar-docs-status completed - * @libar-docs-core - * @libar-docs-extract-shapes PROCESS_STATUS_VALUES, ProcessStatusValue, ACCEPTED_STATUS_VALUES, AcceptedStatusValue, DEFAULT_STATUS, VALID_PROCESS_STATUS_SET - * - * ## Process Workflow Status Values - * - * THE single source of truth for FSM state values in the monorepo (per PDR-005 FSM). - * - * FSM transitions: - * - roadmap to active (start work) - * - roadmap to deferred (pause before start) - * - deferred to roadmap (resume planning) - * - active to completed (finish work) - * - active to deferred (pause work) - * - deferred to active (resume work) - * - active cannot regress to roadmap - */ -export const PROCESS_STATUS_VALUES = [ - 'roadmap', // Planned work, fully editable - 'active', // In progress, scope-locked - 'completed', // Done, hard-locked - 'deferred', // On hold, fully editable -]; -/** - * Extended status values accepted for extraction and validation - * - * FSM states that can be used in annotations. - * Use only these canonical values: roadmap, active, completed, deferred. - */ -export const ACCEPTED_STATUS_VALUES = [...PROCESS_STATUS_VALUES]; -/** - * Default status for new items - */ -export const DEFAULT_STATUS = 'roadmap'; -/** - * Pre-built set of valid process statuses for O(1) membership checks. - */ -export const VALID_PROCESS_STATUS_SET = new Set(PROCESS_STATUS_VALUES); -//# sourceMappingURL=status-values.js.map \ No newline at end of file diff --git a/dist/taxonomy/status-values.js.map b/dist/taxonomy/status-values.js.map deleted file mode 100644 index f18dcbef..00000000 --- a/dist/taxonomy/status-values.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"status-values.js","sourceRoot":"","sources":["../../src/taxonomy/status-values.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,SAAS,EAAE,+BAA+B;IAC1C,QAAQ,EAAE,4BAA4B;IACtC,WAAW,EAAE,oBAAoB;IACjC,UAAU,EAAE,0BAA0B;CAC9B,CAAC;AAEX;;;;;GAKG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,GAAG,qBAAqB,CAAU,CAAC;AAM1E;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAuB,SAAS,CAAC;AAE5D;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAwB,IAAI,GAAG,CAAS,qBAAqB,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/types/branded.d.ts b/dist/types/branded.d.ts deleted file mode 100644 index 979d88ae..00000000 --- a/dist/types/branded.d.ts +++ /dev/null @@ -1,89 +0,0 @@ -/** - * Branded type helper - * Creates nominal types for better compile-time safety - * - * @libar-docs-shape - * @libar-docs-include core-types - */ -type Branded = T & { - readonly __brand: Brand; -}; -/** - * Unique identifier for a documentation pattern - * Format: pattern-{8-char-hex} - */ -export type PatternId = Branded; -/** - * Convert string to PatternId - * @param id - String identifier to brand - * @returns Branded PatternId - */ -export declare function asPatternId(id: string): PatternId; -/** - * Unique identifier for a documentation module - * Currently same as PatternId (one module per pattern) - */ -export type ModuleId = PatternId; -/** - * Convert string to ModuleId - * @param id - String identifier to brand - * @returns Branded ModuleId - */ -export declare function asModuleId(id: string): ModuleId; -/** - * Category name for organizing patterns - * Examples: core, domain, arch, infra, validation - */ -export type CategoryName = Branded; -/** - * Convert string to CategoryName - * @param name - Category name to brand - * @returns Branded CategoryName - */ -export declare function asCategoryName(name: string): CategoryName; -/** - * Source file path relative to base directory - * Examples: src/types/index.ts, packages/core/src/index.ts - */ -export type SourceFilePath = Branded; -/** - * Convert string to SourceFilePath - * @param path - File path to brand - * @returns Branded SourceFilePath - */ -export declare function asSourceFilePath(path: string): SourceFilePath; -/** - * Output file path for generated documentation - * Examples: docs/core/pattern-name.md - */ -export type OutputFilePath = Branded; -/** - * Convert string to OutputFilePath - * @param path - Output path to brand - * @returns Branded OutputFilePath - */ -export declare function asOutputFilePath(path: string): OutputFilePath; -/** - * Registry file path - * Examples: registry.json, docs/registry.json - */ -export type RegistryFilePath = Branded; -/** - * Convert string to RegistryFilePath - * @param path - Registry path to brand - * @returns Branded RegistryFilePath - */ -export declare function asRegistryFilePath(path: string): RegistryFilePath; -/** - * Directive tag name - * Format: @libar-docs-{category} or @libar-docs-{category}-{subcategory} - */ -export type DirectiveTag = Branded; -/** - * Convert string to DirectiveTag - * @param tag - Tag string to brand - * @returns Branded DirectiveTag - */ -export declare function asDirectiveTag(tag: string): DirectiveTag; -export {}; -//# sourceMappingURL=branded.d.ts.map \ No newline at end of file diff --git a/dist/types/branded.d.ts.map b/dist/types/branded.d.ts.map deleted file mode 100644 index 698df936..00000000 --- a/dist/types/branded.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"branded.d.ts","sourceRoot":"","sources":["../../src/types/branded.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,KAAK,OAAO,CAAC,CAAC,EAAE,KAAK,SAAS,MAAM,IAAI,CAAC,GAAG;IAAE,QAAQ,CAAC,OAAO,EAAE,KAAK,CAAA;CAAE,CAAC;AAExE;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG,OAAO,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;AAErD;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS,CAEjD;AAED;;;GAGG;AACH,MAAM,MAAM,QAAQ,GAAG,SAAS,CAAC;AAEjC;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,QAAQ,CAE/C;AAED;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;AAE3D;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,CAEzD;AAED;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;AAE/D;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,CAE7D;AAED;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;AAE/D;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,CAE7D;AAED;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;AAEnE;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB,CAEjE;AAED;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;AAE3D;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,CAExD"} \ No newline at end of file diff --git a/dist/types/branded.js b/dist/types/branded.js deleted file mode 100644 index 33783f13..00000000 --- a/dist/types/branded.js +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Convert string to PatternId - * @param id - String identifier to brand - * @returns Branded PatternId - */ -export function asPatternId(id) { - return id; -} -/** - * Convert string to ModuleId - * @param id - String identifier to brand - * @returns Branded ModuleId - */ -export function asModuleId(id) { - return id; -} -/** - * Convert string to CategoryName - * @param name - Category name to brand - * @returns Branded CategoryName - */ -export function asCategoryName(name) { - return name; -} -/** - * Convert string to SourceFilePath - * @param path - File path to brand - * @returns Branded SourceFilePath - */ -export function asSourceFilePath(path) { - return path; -} -/** - * Convert string to OutputFilePath - * @param path - Output path to brand - * @returns Branded OutputFilePath - */ -export function asOutputFilePath(path) { - return path; -} -/** - * Convert string to RegistryFilePath - * @param path - Registry path to brand - * @returns Branded RegistryFilePath - */ -export function asRegistryFilePath(path) { - return path; -} -/** - * Convert string to DirectiveTag - * @param tag - Tag string to brand - * @returns Branded DirectiveTag - */ -export function asDirectiveTag(tag) { - return tag; -} -//# sourceMappingURL=branded.js.map \ No newline at end of file diff --git a/dist/types/branded.js.map b/dist/types/branded.js.map deleted file mode 100644 index c9781895..00000000 --- a/dist/types/branded.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"branded.js","sourceRoot":"","sources":["../../src/types/branded.ts"],"names":[],"mappings":"AAeA;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,EAAU;IACpC,OAAO,EAAe,CAAC;AACzB,CAAC;AAQD;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,EAAU;IACnC,OAAO,EAAc,CAAC;AACxB,CAAC;AAQD;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,IAAY;IACzC,OAAO,IAAoB,CAAC;AAC9B,CAAC;AAQD;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAY;IAC3C,OAAO,IAAsB,CAAC;AAChC,CAAC;AAQD;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAY;IAC3C,OAAO,IAAsB,CAAC;AAChC,CAAC;AAQD;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAY;IAC7C,OAAO,IAAwB,CAAC;AAClC,CAAC;AAQD;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,GAAW;IACxC,OAAO,GAAmB,CAAC;AAC7B,CAAC"} \ No newline at end of file diff --git a/dist/types/errors.d.ts b/dist/types/errors.d.ts deleted file mode 100644 index 9a45bac5..00000000 --- a/dist/types/errors.d.ts +++ /dev/null @@ -1,340 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern ErrorFactoryTypes - * @libar-docs-status completed - * @libar-docs-implements ErrorFactories - * @libar-docs-product-area CoreTypes - * - * ## Error Factories - Type Definitions - * - * Structured, discriminated error types with factory functions. - * Each error type has a unique `type` discriminator for exhaustive pattern matching. - */ -import type { SourceFilePath } from './branded.js'; -/** - * Base error interface for all documentation errors - * - * @libar-docs-shape - * @libar-docs-include core-types - */ -export interface BaseDocError { - /** Error type discriminator for pattern matching */ - readonly type: string; - /** Human-readable error message */ - readonly message: string; -} -/** - * File system error - file not found, permission denied, etc. - */ -export interface FileSystemError extends BaseDocError { - readonly type: 'FILE_SYSTEM_ERROR'; - readonly file: string; - readonly reason: 'NOT_FOUND' | 'NO_PERMISSION' | 'NOT_A_FILE' | 'OTHER'; - readonly originalError?: unknown; -} -/** - * File parsing error - invalid TypeScript, malformed syntax - */ -export interface FileParseError extends BaseDocError { - readonly type: 'FILE_PARSE_ERROR'; - readonly file: string; - readonly reason: string; - readonly line?: number; - readonly column?: number; - readonly originalError?: unknown; -} -/** - * Directive validation error - invalid @libar-docs-* format - */ -export interface DirectiveValidationError extends BaseDocError { - readonly type: 'DIRECTIVE_VALIDATION_ERROR'; - readonly file: string; - readonly line: number; - readonly reason: string; - readonly directive?: string; -} -/** - * Pattern validation error - pattern doesn't conform to schema - */ -export interface PatternValidationError extends BaseDocError { - readonly type: 'PATTERN_VALIDATION_ERROR'; - readonly file: SourceFilePath; - readonly patternName: string; - readonly reason: string; - readonly validationErrors?: string[]; -} -/** - * Registry validation error - invalid registry format or data - */ -export interface RegistryValidationError extends BaseDocError { - readonly type: 'REGISTRY_VALIDATION_ERROR'; - readonly registryPath: string; - readonly reason: string; - readonly validationErrors?: string[]; -} -/** - * Markdown generation error - failed to generate output - */ -export interface MarkdownGenerationError extends BaseDocError { - readonly type: 'MARKDOWN_GENERATION_ERROR'; - readonly patternId: string; - readonly reason: string; - readonly originalError?: unknown; -} -/** - * File write error - failed to write markdown or registry - */ -export interface FileWriteError extends BaseDocError { - readonly type: 'FILE_WRITE_ERROR'; - readonly file: string; - readonly reason: string; - readonly originalError?: unknown; -} -/** - * Feature file parse error - failed to parse .feature file - */ -export interface FeatureParseError extends BaseDocError { - readonly type: 'FEATURE_PARSE_ERROR'; - readonly file: string; - readonly reason: string; - readonly originalError?: unknown; -} -/** - * Configuration error - invalid scanner or generator config - */ -export interface ConfigError extends BaseDocError { - readonly type: 'CONFIG_ERROR'; - readonly field: string; - readonly reason: string; - readonly value?: unknown; -} -/** - * Process metadata validation error - invalid @libar-docs-* tag values - * - * Raised when extracting process metadata from Gherkin feature tags - * and the values don't conform to ProcessMetadataSchema. - */ -export interface ProcessMetadataValidationError extends BaseDocError { - readonly type: 'PROCESS_METADATA_VALIDATION_ERROR'; - readonly file: string; - readonly reason: string; - readonly validationErrors?: readonly string[]; -} -/** - * Deliverable validation error - invalid deliverable table data - * - * Raised when extracting deliverables from Gherkin Background tables - * and the data doesn't conform to DeliverableSchema. - */ -export interface DeliverableValidationError extends BaseDocError { - readonly type: 'DELIVERABLE_VALIDATION_ERROR'; - readonly file: string; - readonly deliverableName?: string; - readonly reason: string; - readonly validationErrors?: readonly string[]; -} -/** - * Gherkin pattern extraction error - pattern failed schema validation - * - * Raised when building ExtractedPattern from Gherkin features and - * the result doesn't conform to ExtractedPatternSchema. - */ -export interface GherkinPatternValidationError extends BaseDocError { - readonly type: 'GHERKIN_PATTERN_VALIDATION_ERROR'; - readonly file: string; - readonly patternName: string; - readonly reason: string; - readonly validationErrors?: readonly string[]; -} -/** - * Discriminated union of all possible errors - * - * **Benefits**: - * - Exhaustive pattern matching in switch statements - * - Type narrowing based on `type` field - * - Compile-time verification of error handling - * - * @libar-docs-shape - * @libar-docs-include core-types - */ -export type DocError = FileSystemError | FileParseError | DirectiveValidationError | PatternValidationError | RegistryValidationError | MarkdownGenerationError | FileWriteError | FeatureParseError | ConfigError | ProcessMetadataValidationError | DeliverableValidationError | GherkinPatternValidationError; -/** - * Specialized error types for different operations - */ -/** Errors that can occur during scanning */ -export type ScanError = FileSystemError | FileParseError | DirectiveValidationError; -/** Errors that can occur during extraction */ -export type ExtractionError = PatternValidationError | DirectiveValidationError | ProcessMetadataValidationError | DeliverableValidationError | GherkinPatternValidationError; -/** Errors that can occur during generation */ -export type GenerationError = MarkdownGenerationError | FileWriteError | RegistryValidationError; -/** - * Error with collected failures from batch operations - * - * Used when processing multiple files or patterns where some succeed - * and others fail. Preserves all failure information for reporting. - */ -export interface BatchError extends BaseDocError { - readonly type: 'BATCH_ERROR'; - readonly errors: readonly E[]; - readonly successCount: number; - readonly failureCount: number; -} -/** - * Create a FileSystemError - * - * @param file - File path that caused the error - * @param reason - Specific reason for the failure - * @param originalError - Optional underlying error - * @returns Structured FileSystemError - * - * @example - * ```typescript - * const error = createFileSystemError( - * '/path/to/file.ts', - * 'NOT_FOUND', - * new Error('ENOENT') - * ); - * ``` - */ -export declare function createFileSystemError(file: string, reason: FileSystemError['reason'], originalError?: unknown): FileSystemError; -/** - * Create a FileParseError - * - * @param file - File path that failed to parse - * @param reason - Description of parsing failure - * @param location - Optional line/column information - * @param originalError - Optional underlying error - * @returns Structured FileParseError - * - * @example - * ```typescript - * const error = createFileParseError( - * '/path/to/file.ts', - * 'Unexpected token', - * { line: 42, column: 10 }, - * originalError - * ); - * ``` - */ -export declare function createFileParseError(file: string, reason: string, location?: { - line: number; - column: number; -}, originalError?: unknown): FileParseError; -/** - * Create a DirectiveValidationError - * - * @param file - Source file containing invalid directive - * @param line - Line number where directive was found - * @param reason - Why validation failed - * @param directive - Optional directive text snippet - * @returns Structured DirectiveValidationError - * - * @example - * ```typescript - * const error = createDirectiveValidationError( - * 'src/utils.ts', - * 42, - * 'Missing required tags', - * '@libar-docs-' - * ); - * ``` - */ -export declare function createDirectiveValidationError(file: string, line: number, reason: string, directive?: string): DirectiveValidationError; -/** - * Create a PatternValidationError - * - * @param file - Source file containing invalid pattern - * @param patternName - Name of the invalid pattern - * @param reason - Why validation failed - * @param validationErrors - Specific validation errors from schema - * @returns Structured PatternValidationError - * - * @example - * ```typescript - * const error = createPatternValidationError( - * asSourceFilePath('src/types.ts'), - * 'User Schema', - * 'Invalid pattern structure', - * ['tags: Required', 'description: Must be non-empty'] - * ); - * ``` - */ -export declare function createPatternValidationError(file: SourceFilePath, patternName: string, reason: string, validationErrors?: string[]): PatternValidationError; -/** - * Create a FeatureParseError - * - * @param file - Feature file path that failed to parse - * @param reason - Description of parsing failure - * @param originalError - Optional underlying error - * @returns Structured FeatureParseError - * - * @example - * ```typescript - * const error = createFeatureParseError( - * '/path/to/test.feature', - * 'Invalid Gherkin syntax', - * originalError - * ); - * ``` - */ -export declare function createFeatureParseError(file: string, reason: string, originalError?: unknown): FeatureParseError; -/** - * Create a ProcessMetadataValidationError - * - * @param file - Feature file path containing invalid process metadata - * @param reason - Description of validation failure - * @param validationErrors - Specific Zod validation errors - * @returns Structured ProcessMetadataValidationError - * - * @example - * ```typescript - * const error = createProcessMetadataValidationError( - * '/path/to/test.feature', - * 'Schema validation failed', - * ['status: Invalid enum value', 'phase: Expected number'] - * ); - * ``` - */ -export declare function createProcessMetadataValidationError(file: string, reason: string, validationErrors?: readonly string[]): ProcessMetadataValidationError; -/** - * Create a DeliverableValidationError - * - * @param file - Feature file path containing invalid deliverable - * @param reason - Description of validation failure - * @param deliverableName - Optional name of the invalid deliverable - * @param validationErrors - Specific Zod validation errors - * @returns Structured DeliverableValidationError - * - * @example - * ```typescript - * const error = createDeliverableValidationError( - * '/path/to/test.feature', - * 'Invalid deliverable data', - * 'MyDeliverable', - * ['name: Required', 'tests: Expected number'] - * ); - * ``` - */ -export declare function createDeliverableValidationError(file: string, reason: string, deliverableName?: string, validationErrors?: readonly string[]): DeliverableValidationError; -/** - * Create a GherkinPatternValidationError - * - * @param file - Feature file path containing invalid pattern - * @param patternName - Name of the pattern that failed validation - * @param reason - Description of validation failure - * @param validationErrors - Specific Zod validation errors - * @returns Structured GherkinPatternValidationError - * - * @example - * ```typescript - * const error = createGherkinPatternValidationError( - * '/path/to/test.feature', - * 'MyPattern', - * 'Pattern schema validation failed', - * ['id: Required', 'category: Invalid enum'] - * ); - * ``` - */ -export declare function createGherkinPatternValidationError(file: string, patternName: string, reason: string, validationErrors?: readonly string[]): GherkinPatternValidationError; -//# sourceMappingURL=errors.d.ts.map \ No newline at end of file diff --git a/dist/types/errors.d.ts.map b/dist/types/errors.d.ts.map deleted file mode 100644 index 9159ed0c..00000000 --- a/dist/types/errors.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/types/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,oDAAoD;IACpD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,mCAAmC;IACnC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,eAAgB,SAAQ,YAAY;IACnD,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC;IACnC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,WAAW,GAAG,eAAe,GAAG,YAAY,GAAG,OAAO,CAAC;IACxE,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;CAClC;AAED;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,YAAY;IAClD,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;IAClC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;CAClC;AAED;;GAEG;AACH,MAAM,WAAW,wBAAyB,SAAQ,YAAY;IAC5D,QAAQ,CAAC,IAAI,EAAE,4BAA4B,CAAC;IAC5C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB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;;;GAkBG;AACH,wBAAgB,8BAA8B,CAC5C,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,SAAS,CAAC,EAAE,MAAM,GACjB,wBAAwB,CAU1B;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,cAAc,EACpB,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,EACd,gBAAgB,CAAC,EAAE,MAAM,EAAE,GAC1B,sBAAsB,CAUxB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,aAAa,CAAC,EAAE,OAAO,GACtB,iBAAiB,CAQnB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,oCAAoC,CAClD,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,gBAAgB,CAAC,EAAE,SAAS,MAAM,EAAE,GACnC,8BAA8B,CAQhC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,gCAAgC,CAC9C,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,eAAe,CAAC,EAAE,MAAM,EACxB,gBAAgB,CAAC,EAAE,SAAS,MAAM,EAAE,GACnC,0BAA0B,CAU5B;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,mCAAmC,CACjD,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,EACd,gBAAgB,CAAC,EAAE,SAAS,MAAM,EAAE,GACnC,6BAA6B,CAS/B"} \ No newline at end of file diff --git a/dist/types/errors.js b/dist/types/errors.js deleted file mode 100644 index f874a153..00000000 --- a/dist/types/errors.js +++ /dev/null @@ -1,249 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern ErrorFactoryTypes - * @libar-docs-status completed - * @libar-docs-implements ErrorFactories - * @libar-docs-product-area CoreTypes - * - * ## Error Factories - Type Definitions - * - * Structured, discriminated error types with factory functions. - * Each error type has a unique `type` discriminator for exhaustive pattern matching. - */ -/** - * Create a FileSystemError - * - * @param file - File path that caused the error - * @param reason - Specific reason for the failure - * @param originalError - Optional underlying error - * @returns Structured FileSystemError - * - * @example - * ```typescript - * const error = createFileSystemError( - * '/path/to/file.ts', - * 'NOT_FOUND', - * new Error('ENOENT') - * ); - * ``` - */ -export function createFileSystemError(file, reason, originalError) { - const reasonMessages = { - NOT_FOUND: `File not found: ${file}`, - NO_PERMISSION: `Permission denied: ${file}`, - NOT_A_FILE: `Not a file: ${file}`, - OTHER: `File system error: ${file}`, - }; - // Use spread to conditionally include optional fields - return { - type: 'FILE_SYSTEM_ERROR', - message: reasonMessages[reason], - file, - reason, - ...(originalError !== undefined && { originalError }), - }; -} -/** - * Create a FileParseError - * - * @param file - File path that failed to parse - * @param reason - Description of parsing failure - * @param location - Optional line/column information - * @param originalError - Optional underlying error - * @returns Structured FileParseError - * - * @example - * ```typescript - * const error = createFileParseError( - * '/path/to/file.ts', - * 'Unexpected token', - * { line: 42, column: 10 }, - * originalError - * ); - * ``` - */ -export function createFileParseError(file, reason, location, originalError) { - const locationStr = location ? ` at line ${location.line}, column ${location.column}` : ''; - // Use spread to conditionally include optional fields - return { - type: 'FILE_PARSE_ERROR', - message: `Failed to parse ${file}${locationStr}: ${reason}`, - file, - reason, - ...(location && { line: location.line, column: location.column }), - ...(originalError !== undefined && { originalError }), - }; -} -/** - * Create a DirectiveValidationError - * - * @param file - Source file containing invalid directive - * @param line - Line number where directive was found - * @param reason - Why validation failed - * @param directive - Optional directive text snippet - * @returns Structured DirectiveValidationError - * - * @example - * ```typescript - * const error = createDirectiveValidationError( - * 'src/utils.ts', - * 42, - * 'Missing required tags', - * '@libar-docs-' - * ); - * ``` - */ -export function createDirectiveValidationError(file, line, reason, directive) { - // Use spread to conditionally include optional fields - return { - type: 'DIRECTIVE_VALIDATION_ERROR', - message: `Directive validation failed at ${file}:${line}: ${reason}`, - file, - line, - reason, - ...(directive !== undefined && { directive }), - }; -} -/** - * Create a PatternValidationError - * - * @param file - Source file containing invalid pattern - * @param patternName - Name of the invalid pattern - * @param reason - Why validation failed - * @param validationErrors - Specific validation errors from schema - * @returns Structured PatternValidationError - * - * @example - * ```typescript - * const error = createPatternValidationError( - * asSourceFilePath('src/types.ts'), - * 'User Schema', - * 'Invalid pattern structure', - * ['tags: Required', 'description: Must be non-empty'] - * ); - * ``` - */ -export function createPatternValidationError(file, patternName, reason, validationErrors) { - // Use spread to conditionally include optional fields - return { - type: 'PATTERN_VALIDATION_ERROR', - message: `Pattern validation failed for "${patternName}" in ${file}: ${reason}`, - file, - patternName, - reason, - ...(validationErrors !== undefined && { validationErrors }), - }; -} -/** - * Create a FeatureParseError - * - * @param file - Feature file path that failed to parse - * @param reason - Description of parsing failure - * @param originalError - Optional underlying error - * @returns Structured FeatureParseError - * - * @example - * ```typescript - * const error = createFeatureParseError( - * '/path/to/test.feature', - * 'Invalid Gherkin syntax', - * originalError - * ); - * ``` - */ -export function createFeatureParseError(file, reason, originalError) { - return { - type: 'FEATURE_PARSE_ERROR', - message: `Failed to parse feature file ${file}: ${reason}`, - file, - reason, - ...(originalError !== undefined && { originalError }), - }; -} -/** - * Create a ProcessMetadataValidationError - * - * @param file - Feature file path containing invalid process metadata - * @param reason - Description of validation failure - * @param validationErrors - Specific Zod validation errors - * @returns Structured ProcessMetadataValidationError - * - * @example - * ```typescript - * const error = createProcessMetadataValidationError( - * '/path/to/test.feature', - * 'Schema validation failed', - * ['status: Invalid enum value', 'phase: Expected number'] - * ); - * ``` - */ -export function createProcessMetadataValidationError(file, reason, validationErrors) { - return { - type: 'PROCESS_METADATA_VALIDATION_ERROR', - message: `Process metadata validation failed in ${file}: ${reason}`, - file, - reason, - ...(validationErrors !== undefined && { validationErrors }), - }; -} -/** - * Create a DeliverableValidationError - * - * @param file - Feature file path containing invalid deliverable - * @param reason - Description of validation failure - * @param deliverableName - Optional name of the invalid deliverable - * @param validationErrors - Specific Zod validation errors - * @returns Structured DeliverableValidationError - * - * @example - * ```typescript - * const error = createDeliverableValidationError( - * '/path/to/test.feature', - * 'Invalid deliverable data', - * 'MyDeliverable', - * ['name: Required', 'tests: Expected number'] - * ); - * ``` - */ -export function createDeliverableValidationError(file, reason, deliverableName, validationErrors) { - const nameStr = deliverableName ? ` "${deliverableName}"` : ''; - return { - type: 'DELIVERABLE_VALIDATION_ERROR', - message: `Deliverable${nameStr} validation failed in ${file}: ${reason}`, - file, - reason, - ...(deliverableName !== undefined && { deliverableName }), - ...(validationErrors !== undefined && { validationErrors }), - }; -} -/** - * Create a GherkinPatternValidationError - * - * @param file - Feature file path containing invalid pattern - * @param patternName - Name of the pattern that failed validation - * @param reason - Description of validation failure - * @param validationErrors - Specific Zod validation errors - * @returns Structured GherkinPatternValidationError - * - * @example - * ```typescript - * const error = createGherkinPatternValidationError( - * '/path/to/test.feature', - * 'MyPattern', - * 'Pattern schema validation failed', - * ['id: Required', 'category: Invalid enum'] - * ); - * ``` - */ -export function createGherkinPatternValidationError(file, patternName, reason, validationErrors) { - return { - type: 'GHERKIN_PATTERN_VALIDATION_ERROR', - message: `Gherkin pattern "${patternName}" validation failed in ${file}: ${reason}`, - file, - patternName, - reason, - ...(validationErrors !== undefined && { validationErrors }), - }; -} -//# sourceMappingURL=errors.js.map \ No newline at end of file diff --git a/dist/types/errors.js.map b/dist/types/errors.js.map deleted file mode 100644 index f4132dec..00000000 --- a/dist/types/errors.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/types/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAgNH;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,qBAAqB,CACnC,IAAY,EACZ,MAAiC,EACjC,aAAuB;IAEvB,MAAM,cAAc,GAA8C;QAChE,SAAS,EAAE,mBAAmB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QACL,IAAI,EAAE,8BAA8B;QACpC,OAAO,EAAE,cAAc,OAAO,yBAAyB,IAAI,KAAK,MAAM,EAAE;QACxE,IAAI;QACJ,MAAM;QACN,GAAG,CAAC,eAAe,KAAK,SAAS,IAAI,EAAE,eAAe,EAAE,CAAC;QACzD,GAAG,CAAC,gBAAgB,KAAK,SAAS,IAAI,EAAE,gBAAgB,EAAE,CAAC;KAC5D,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,mCAAmC,CACjD,IAAY,EACZ,WAAmB,EACnB,MAAc,EACd,gBAAoC;IAEpC,OAAO;QACL,IAAI,EAAE,kCAAkC;QACxC,OAAO,EAAE,oBAAoB,WAAW,0BAA0B,IAAI,KAAK,MAAM,EAAE;QACnF,IAAI;QACJ,WAAW;QACX,MAAM;QACN,GAAG,CAAC,gBAAgB,KAAK,SAAS,IAAI,EAAE,gBAAgB,EAAE,CAAC;KAC5D,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/dist/types/index.d.ts b/dist/types/index.d.ts deleted file mode 100644 index fda687ec..00000000 --- a/dist/types/index.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -export { Result, type Ok, type Err } from './result.js'; -export type { PatternId, ModuleId, CategoryName, SourceFilePath, OutputFilePath, RegistryFilePath, DirectiveTag, } from './branded.js'; -export { asPatternId, asModuleId, asCategoryName, asSourceFilePath, asOutputFilePath, asRegistryFilePath, asDirectiveTag, } from './branded.js'; -export type { BaseDocError, DocError, ScanError, ExtractionError, GenerationError, BatchError, FileSystemError, FileParseError, DirectiveValidationError, PatternValidationError, RegistryValidationError, MarkdownGenerationError, FileWriteError, ConfigError, } from './errors.js'; -export { createFileSystemError, createFileParseError, createDirectiveValidationError, createPatternValidationError, createFeatureParseError, } from './errors.js'; -/** - * Position information in source file - * Schema: validation-schemas/doc-directive.ts - */ -export type { Position } from '../validation-schemas/doc-directive.js'; -/** - * Parsed @libar-docs-* directive from JSDoc comment - * Schema: validation-schemas/doc-directive.ts - */ -export type { DocDirective } from '../validation-schemas/doc-directive.js'; -/** - * Information about exported symbols (discriminated union) - * Schema: validation-schemas/export-info.ts - */ -export type { ExportInfo } from '../validation-schemas/export-info.js'; -/** - * Source file information - * Schema: validation-schemas/extracted-pattern.ts - */ -export type { SourceInfo } from '../validation-schemas/extracted-pattern.js'; -/** - * Complete extracted pattern with code and metadata - * Schema: validation-schemas/extracted-pattern.ts - */ -export type { ExtractedPattern } from '../validation-schemas/extracted-pattern.js'; -/** - * Scanner configuration - * Schema: validation-schemas/config.ts - */ -export type { ScannerConfig } from '../validation-schemas/config.js'; -/** - * Generator configuration - * Schema: validation-schemas/config.ts - */ -export type { GeneratorConfig } from '../validation-schemas/config.js'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/dist/types/index.d.ts.map b/dist/types/index.d.ts.map deleted file mode 100644 index fddd7b31..00000000 --- a/dist/types/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,KAAK,GAAG,EAAE,MAAM,aAAa,CAAC;AAGxD,YAAY,EACV,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,YAAY,GACb,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,WAAW,EACX,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,GACf,MAAM,cAAc,CAAC;AAGtB,YAAY,EACV,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,eAAe,EACf,eAAe,EACf,UAAU,EACV,eAAe,EACf,cAAc,EACd,wBAAwB,EACxB,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,cAAc,EACd,WAAW,GACZ,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,8BAA8B,EAC9B,4BAA4B,EAC5B,uBAAuB,GACxB,MAAM,aAAa,CAAC;AAKrB;;;GAGG;AACH,YAAY,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAEvE;;;GAGG;AACH,YAAY,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AAE3E;;;GAGG;AACH,YAAY,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAEvE;;;GAGG;AACH,YAAY,EAAE,UAAU,EAAE,MAAM,4CAA4C,CAAC;AAE7E;;;GAGG;AACH,YAAY,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAEnF;;;GAGG;AACH,YAAY,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAErE;;;GAGG;AACH,YAAY,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC"} \ No newline at end of file diff --git a/dist/types/index.js b/dist/types/index.js deleted file mode 100644 index 8947cdde..00000000 --- a/dist/types/index.js +++ /dev/null @@ -1,5 +0,0 @@ -// Export Result monad - value export also provides the type -export { Result } from './result.js'; -export { asPatternId, asModuleId, asCategoryName, asSourceFilePath, asOutputFilePath, asRegistryFilePath, asDirectiveTag, } from './branded.js'; -export { createFileSystemError, createFileParseError, createDirectiveValidationError, createPatternValidationError, createFeatureParseError, } from './errors.js'; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/types/index.js.map b/dist/types/index.js.map deleted file mode 100644 index c0a57fe2..00000000 --- a/dist/types/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,OAAO,EAAE,MAAM,EAAqB,MAAM,aAAa,CAAC;AAaxD,OAAO,EACL,WAAW,EACX,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,GACf,MAAM,cAAc,CAAC;AAoBtB,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,8BAA8B,EAC9B,4BAA4B,EAC5B,uBAAuB,GACxB,MAAM,aAAa,CAAC"} \ No newline at end of file diff --git a/dist/types/result.d.ts b/dist/types/result.d.ts deleted file mode 100644 index 44160042..00000000 --- a/dist/types/result.d.ts +++ /dev/null @@ -1,76 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern ResultMonadTypes - * @libar-docs-status completed - * @libar-docs-implements ResultMonad - * @libar-docs-product-area CoreTypes - * - * ## Result Monad - Type Definitions - * - * Explicit error handling via discriminated union. - * Functions return `Result.ok(value)` or `Result.err(error)` instead of throwing. - */ -/** - * Success result containing a value - */ -export type Ok = { - ok: true; - value: T; -}; -/** - * Error result containing an error - */ -export type Err = { - ok: false; - error: E; -}; -/** - * Result type representing either success (Ok) or failure (Err) - * - * @libar-docs-shape - * @libar-docs-include core-types - * @typeParam T - The success value type - * @typeParam E - The error type (defaults to Error) - */ -export type Result = Ok | Err; -/** - * Result utilities for creating and inspecting Result values - */ -export declare const Result: { - /** - * Create a success result - */ - ok: (value: T) => Result; - /** - * Create an error result - */ - err: (error: E) => Result; - /** - * Type guard for success results - */ - isOk: (result: Result) => result is Ok; - /** - * Type guard for error results - */ - isErr: (result: Result) => result is Err; - /** - * Extract value or throw error. - * If the error is not an Error instance, it will be wrapped in one - * to ensure proper stack traces and error handling. - */ - unwrap: (result: Result) => T; - /** - * Extract value or return default - */ - unwrapOr: (result: Result, defaultValue: T) => T; - /** - * Transform success value - */ - map: (result: Result, fn: (value: T) => U) => Result; - /** - * Transform error value - */ - mapErr: (result: Result, fn: (error: E) => F) => Result; -}; -//# sourceMappingURL=result.d.ts.map \ No newline at end of file diff --git a/dist/types/result.d.ts.map b/dist/types/result.d.ts.map deleted file mode 100644 index d4ac5915..00000000 --- a/dist/types/result.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"result.d.ts","sourceRoot":"","sources":["../../src/types/result.ts"],"names":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EAAE,CAAC,CAAC;IAOvE;;OAEG;aACM,CAAC,EAAE,CAAC,EAAE,CAAC,UAAU,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,KAAG,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC;CAM3E,CAAC"} \ No newline at end of file diff --git a/dist/types/result.js b/dist/types/result.js deleted file mode 100644 index 15bbccbf..00000000 --- a/dist/types/result.js +++ /dev/null @@ -1,76 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern ResultMonadTypes - * @libar-docs-status completed - * @libar-docs-implements ResultMonad - * @libar-docs-product-area CoreTypes - * - * ## Result Monad - Type Definitions - * - * Explicit error handling via discriminated union. - * Functions return `Result.ok(value)` or `Result.err(error)` instead of throwing. - */ -/** - * Result utilities for creating and inspecting Result values - */ -export const Result = { - /** - * Create a success result - */ - ok: (value) => ({ ok: true, value }), - /** - * Create an error result - */ - err: (error) => ({ ok: false, error }), - /** - * Type guard for success results - */ - isOk: (result) => result.ok, - /** - * Type guard for error results - */ - isErr: (result) => !result.ok, - /** - * Extract value or throw error. - * If the error is not an Error instance, it will be wrapped in one - * to ensure proper stack traces and error handling. - */ - unwrap: (result) => { - if (result.ok) { - return result.value; - } - // Ensure we always throw an Error instance for proper stack traces - if (result.error instanceof Error) { - throw result.error; - } - // Wrap non-Error objects to preserve information and provide stack trace - const errorMessage = typeof result.error === 'object' && result.error !== null - ? JSON.stringify(result.error) - : String(result.error); - throw new Error(errorMessage); - }, - /** - * Extract value or return default - */ - unwrapOr: (result, defaultValue) => result.ok ? result.value : defaultValue, - /** - * Transform success value - */ - map: (result, fn) => { - if (result.ok) { - return { ok: true, value: fn(result.value) }; - } - return result; - }, - /** - * Transform error value - */ - mapErr: (result, fn) => { - if (result.ok) { - return result; - } - return { ok: false, error: fn(result.error) }; - }, -}; -//# sourceMappingURL=result.js.map \ No newline at end of file diff --git a/dist/types/result.js.map b/dist/types/result.js.map deleted file mode 100644 index 66d79ac3..00000000 --- a/dist/types/result.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"result.js","sourceRoot":"","sources":["../../src/types/result.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAsBH;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB;;OAEG;IACH,EAAE,EAAE,CAAI,KAAQ,EAAoB,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;IAE5D;;OAEG;IACH,GAAG,EAAE,CAAY,KAAQ,EAAoB,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;IAEtE;;OAEG;IACH,IAAI,EAAE,CAAO,MAAoB,EAAmB,EAAE,CAAC,MAAM,CAAC,EAAE;IAEhE;;OAEG;IACH,KAAK,EAAE,CAAO,MAAoB,EAAoB,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE;IAEnE;;;;OAIG;IACH,MAAM,EAAE,CAAO,MAAoB,EAAK,EAAE;QACxC,IAAI,MAAM,CAAC,EAAE,EAAE,CAAC;YACd,OAAO,MAAM,CAAC,KAAK,CAAC;QACtB,CAAC;QACD,mEAAmE;QACnE,IAAI,MAAM,CAAC,KAAK,YAAY,KAAK,EAAE,CAAC;YAClC,MAAM,MAAM,CAAC,KAAK,CAAC;QACrB,CAAC;QACD,yEAAyE;QACzE,MAAM,YAAY,GAChB,OAAO,MAAM,CAAC,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,KAAK,KAAK,IAAI;YACvD,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC;YAC9B,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC3B,MAAM,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC;IAChC,CAAC;IAED;;OAEG;IACH,QAAQ,EAAE,CAAO,MAAoB,EAAE,YAAe,EAAK,EAAE,CAC3D,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,YAAY;IAEzC;;OAEG;IACH,GAAG,EAAE,CAAU,MAAoB,EAAE,EAAmB,EAAgB,EAAE;QACxE,IAAI,MAAM,CAAC,EAAE,EAAE,CAAC;YACd,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;QAC/C,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;OAEG;IACH,MAAM,EAAE,CAAU,MAAoB,EAAE,EAAmB,EAAgB,EAAE;QAC3E,IAAI,MAAM,CAAC,EAAE,EAAE,CAAC;YACd,OAAO,MAAM,CAAC;QAChB,CAAC;QACD,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;IAChD,CAAC;CACF,CAAC"} \ No newline at end of file diff --git a/dist/utils/collection-utils.d.ts b/dist/utils/collection-utils.d.ts deleted file mode 100644 index 6796c1f5..00000000 --- a/dist/utils/collection-utils.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern CollectionUtilities - * @libar-docs-status completed - * @libar-docs-used-by SectionRenderer, DocExtractor - * - * ## CollectionUtilities - Array and Map Operations - * - * Provides shared utilities for working with arrays and collections, - * such as grouping items by a key function. - * - * ### When to Use - * - * - Use `groupBy()` when categorizing patterns by category, status, or other key - * - Use when aggregating items for section rendering (e.g., patterns by domain) - */ -/** - * Group items by a key function - * - * Creates a Map where each key maps to an array of items that share that key. - * This is a generic utility that replaces duplicate groupByX implementations. - * - * @typeParam T - Type of items in the collection - * @typeParam K - Type of the grouping key (must be usable as Map key) - * @param items - Array of items to group - * @param keyFn - Function to extract the grouping key from each item - * @returns Map from keys to arrays of items - * - * @example - * ```typescript - * interface Pattern { name: string; category: string; status?: string; } - * - * const patterns: Pattern[] = [ - * { name: 'Auth', category: 'core' }, - * { name: 'Logger', category: 'core' }, - * { name: 'Store', category: 'infra' } - * ]; - * - * // Group by category - * const byCategory = groupBy(patterns, p => p.category); - * // Map { 'core' => [Auth, Logger], 'infra' => [Store] } - * - * // Group by status with default - * const byStatus = groupBy(patterns, p => p.status ?? 'implemented'); - * ``` - */ -export declare function groupBy(items: readonly T[], keyFn: (item: T) => K): Map; -//# sourceMappingURL=collection-utils.d.ts.map \ No newline at end of file diff --git a/dist/utils/collection-utils.d.ts.map b/dist/utils/collection-utils.d.ts.map deleted file mode 100644 index 891b02c6..00000000 --- a/dist/utils/collection-utils.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"collection-utils.d.ts","sourceRoot":"","sources":["../../src/utils/collection-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,EAAE,KAAK,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAWrF"} \ No newline at end of file diff --git a/dist/utils/collection-utils.js b/dist/utils/collection-utils.js deleted file mode 100644 index 4eaeeeb2..00000000 --- a/dist/utils/collection-utils.js +++ /dev/null @@ -1,58 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern CollectionUtilities - * @libar-docs-status completed - * @libar-docs-used-by SectionRenderer, DocExtractor - * - * ## CollectionUtilities - Array and Map Operations - * - * Provides shared utilities for working with arrays and collections, - * such as grouping items by a key function. - * - * ### When to Use - * - * - Use `groupBy()` when categorizing patterns by category, status, or other key - * - Use when aggregating items for section rendering (e.g., patterns by domain) - */ -/** - * Group items by a key function - * - * Creates a Map where each key maps to an array of items that share that key. - * This is a generic utility that replaces duplicate groupByX implementations. - * - * @typeParam T - Type of items in the collection - * @typeParam K - Type of the grouping key (must be usable as Map key) - * @param items - Array of items to group - * @param keyFn - Function to extract the grouping key from each item - * @returns Map from keys to arrays of items - * - * @example - * ```typescript - * interface Pattern { name: string; category: string; status?: string; } - * - * const patterns: Pattern[] = [ - * { name: 'Auth', category: 'core' }, - * { name: 'Logger', category: 'core' }, - * { name: 'Store', category: 'infra' } - * ]; - * - * // Group by category - * const byCategory = groupBy(patterns, p => p.category); - * // Map { 'core' => [Auth, Logger], 'infra' => [Store] } - * - * // Group by status with default - * const byStatus = groupBy(patterns, p => p.status ?? 'implemented'); - * ``` - */ -export function groupBy(items, keyFn) { - const groups = new Map(); - for (const item of items) { - const key = keyFn(item); - const existing = groups.get(key) ?? []; - existing.push(item); - groups.set(key, existing); - } - return groups; -} -//# sourceMappingURL=collection-utils.js.map \ No newline at end of file diff --git a/dist/utils/collection-utils.js.map b/dist/utils/collection-utils.js.map deleted file mode 100644 index 40446af7..00000000 --- a/dist/utils/collection-utils.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"collection-utils.js","sourceRoot":"","sources":["../../src/utils/collection-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,UAAU,OAAO,CAAO,KAAmB,EAAE,KAAqB;IACtE,MAAM,MAAM,GAAG,IAAI,GAAG,EAAU,CAAC;IAEjC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,GAAG,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC;QACxB,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;QACvC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpB,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;IAC5B,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"} \ No newline at end of file diff --git a/dist/utils/id-utils.d.ts b/dist/utils/id-utils.d.ts deleted file mode 100644 index 1f7eee50..00000000 --- a/dist/utils/id-utils.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern PatternIdGenerator - * @libar-docs-status completed - * @libar-docs-used-by DocExtractor, GherkinExtractor - * - * ## Pattern ID Generator - Deterministic ID Generation - * - * Generates unique, deterministic pattern IDs based on file path and line number. - * Uses MD5 hashing to produce stable 8-character identifiers. - * - * ### When to Use - * - * - When extracting patterns from TypeScript or Gherkin files - * - When needing stable IDs that survive re-extraction - * - When correlating patterns across multiple extraction runs - * - * ### Key Concepts - * - * - **Deterministic**: Same file + line always produces same ID - * - **Collision-resistant**: MD5 hash provides adequate uniqueness for pattern counts - * - **Human-friendly prefix**: `pattern-` prefix aids debugging and identification - */ -/** - * Generate a deterministic pattern ID from file path and line number - * - * Creates a unique identifier based on the combination of file path and - * starting line number. The same inputs will always produce the same output, - * making pattern IDs stable across multiple extraction runs. - * - * @param filePath - Relative file path (e.g., 'src/utils.ts') - * @param line - Line number where the pattern starts - * @returns Pattern ID in format 'pattern-{8-char-hash}' - * - * @example - * ```typescript - * const id1 = generatePatternId('src/utils.ts', 42); - * const id2 = generatePatternId('src/utils.ts', 42); - * - * console.log(id1 === id2); // true (deterministic) - * console.log(id1); // 'pattern-a1b2c3d4' - * ``` - */ -export declare function generatePatternId(filePath: string, line: number): string; -//# sourceMappingURL=id-utils.d.ts.map \ No newline at end of file diff --git a/dist/utils/id-utils.d.ts.map b/dist/utils/id-utils.d.ts.map deleted file mode 100644 index cf92bc36..00000000 --- a/dist/utils/id-utils.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"id-utils.d.ts","sourceRoot":"","sources":["../../src/utils/id-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAIH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAIxE"} \ No newline at end of file diff --git a/dist/utils/id-utils.js b/dist/utils/id-utils.js deleted file mode 100644 index 66e74478..00000000 --- a/dist/utils/id-utils.js +++ /dev/null @@ -1,51 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern PatternIdGenerator - * @libar-docs-status completed - * @libar-docs-used-by DocExtractor, GherkinExtractor - * - * ## Pattern ID Generator - Deterministic ID Generation - * - * Generates unique, deterministic pattern IDs based on file path and line number. - * Uses MD5 hashing to produce stable 8-character identifiers. - * - * ### When to Use - * - * - When extracting patterns from TypeScript or Gherkin files - * - When needing stable IDs that survive re-extraction - * - When correlating patterns across multiple extraction runs - * - * ### Key Concepts - * - * - **Deterministic**: Same file + line always produces same ID - * - **Collision-resistant**: MD5 hash provides adequate uniqueness for pattern counts - * - **Human-friendly prefix**: `pattern-` prefix aids debugging and identification - */ -import * as crypto from 'crypto'; -/** - * Generate a deterministic pattern ID from file path and line number - * - * Creates a unique identifier based on the combination of file path and - * starting line number. The same inputs will always produce the same output, - * making pattern IDs stable across multiple extraction runs. - * - * @param filePath - Relative file path (e.g., 'src/utils.ts') - * @param line - Line number where the pattern starts - * @returns Pattern ID in format 'pattern-{8-char-hash}' - * - * @example - * ```typescript - * const id1 = generatePatternId('src/utils.ts', 42); - * const id2 = generatePatternId('src/utils.ts', 42); - * - * console.log(id1 === id2); // true (deterministic) - * console.log(id1); // 'pattern-a1b2c3d4' - * ``` - */ -export function generatePatternId(filePath, line) { - const input = `${filePath}:${line}`; - const hash = crypto.createHash('md5').update(input).digest('hex').slice(0, 8); - return `pattern-${hash}`; -} -//# sourceMappingURL=id-utils.js.map \ No newline at end of file diff --git a/dist/utils/id-utils.js.map b/dist/utils/id-utils.js.map deleted file mode 100644 index e5afc427..00000000 --- a/dist/utils/id-utils.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"id-utils.js","sourceRoot":"","sources":["../../src/utils/id-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,iBAAiB,CAAC,QAAgB,EAAE,IAAY;IAC9D,MAAM,KAAK,GAAG,GAAG,QAAQ,IAAI,IAAI,EAAE,CAAC;IACpC,MAAM,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC9E,OAAO,WAAW,IAAI,EAAE,CAAC;AAC3B,CAAC"} \ No newline at end of file diff --git a/dist/utils/index.d.ts b/dist/utils/index.d.ts deleted file mode 100644 index 1d52a093..00000000 --- a/dist/utils/index.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern UtilsModule - * @libar-docs-status completed - * @libar-docs-uses StringUtilities, CollectionUtilities - * - * ## UtilsModule - Shared Utilities Barrel Export - * - * Common helper functions used across the delivery-process package. - * Provides text transformation and collection manipulation utilities. - * - * ### When to Use - * - * - Use when importing utility functions from the package - * - Use for consistent text slugification or collection grouping - */ -export { slugify, toKebabCase, camelCaseToTitleCase, normalizeLineEndings, } from './string-utils.js'; -export { groupBy } from './collection-utils.js'; -export { generatePatternId } from './id-utils.js'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/dist/utils/index.d.ts.map b/dist/utils/index.d.ts.map deleted file mode 100644 index 5ed335af..00000000 --- a/dist/utils/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,OAAO,EACP,WAAW,EACX,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC"} \ No newline at end of file diff --git a/dist/utils/index.js b/dist/utils/index.js deleted file mode 100644 index 7401d513..00000000 --- a/dist/utils/index.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern UtilsModule - * @libar-docs-status completed - * @libar-docs-uses StringUtilities, CollectionUtilities - * - * ## UtilsModule - Shared Utilities Barrel Export - * - * Common helper functions used across the delivery-process package. - * Provides text transformation and collection manipulation utilities. - * - * ### When to Use - * - * - Use when importing utility functions from the package - * - Use for consistent text slugification or collection grouping - */ -export { slugify, toKebabCase, camelCaseToTitleCase, normalizeLineEndings, } from './string-utils.js'; -export { groupBy } from './collection-utils.js'; -export { generatePatternId } from './id-utils.js'; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/utils/index.js.map b/dist/utils/index.js.map deleted file mode 100644 index ba7638b8..00000000 --- a/dist/utils/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,OAAO,EACP,WAAW,EACX,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC"} \ No newline at end of file diff --git a/dist/utils/string-utils.d.ts b/dist/utils/string-utils.d.ts deleted file mode 100644 index e1d20c5d..00000000 --- a/dist/utils/string-utils.d.ts +++ /dev/null @@ -1,150 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern StringUtilities - * @libar-docs-status completed - * @libar-docs-used-by DocExtractor, SectionRenderer - * - * ## StringUtilities - Text Transformation Functions - * - * Provides shared utilities for string manipulation used across the delivery-process package, - * including slugification for URLs/filenames and Markdown formatting cleanup. - * - * ### When to Use - * - * - Use `slugify()` when generating URL-safe identifiers for HTML anchors or filenames - * - Use when normalizing text for consistent formatting across generated docs - */ -/** - * Convert a string to a URL/filename-safe slug (lowercase, alphanumeric, hyphens) - * - * Transforms text into a normalized format suitable for: - * - HTML anchor IDs - * - Filenames - * - URL slugs - * - * **Note:** Non-ASCII characters (including Unicode) are removed, not transliterated. - * For example, `"hello-日本語"` becomes `"hello"`. - * - * @param text - Input text to slugify - * @returns Slug string (lowercase, alphanumeric with hyphens) - * - * @example - * ```typescript - * slugify('User Authentication'); // 'user-authentication' - * slugify('Create User (v2)'); // 'create-user-v2' - * slugify('---test---'); // 'test' - * slugify('Hello World!'); // 'hello-world' - * slugify('UPPER_CASE_TEXT'); // 'upper-case-text' - * ``` - */ -export declare function slugify(text: string): string; -/** - * Convert CamelCase or PascalCase text to kebab-case with proper word separation - * - * Handles various naming conventions: - * - PascalCase: `DeciderPattern` → `decider-pattern` - * - Mixed case: `BddTestingInfrastructure` → `bdd-testing-infrastructure` - * - Consecutive uppercase: `APIEndpoint` → `api-endpoint` - * - Numbers: `OAuth2Flow` → `o-auth-2-flow` - * - Already kebab-case: `already-kebab` → `already-kebab` - * - * **Note:** Unlike `slugify()`, this function properly splits CamelCase words - * instead of just lowercasing them together. - * - * @param text - Input text (CamelCase, PascalCase, or mixed) - * @returns kebab-case string - * - * @example - * ```typescript - * toKebabCase('DeciderPattern'); // 'decider-pattern' - * toKebabCase('BddTestingInfrastructure'); // 'bdd-testing-infrastructure' - * toKebabCase('APIEndpoint'); // 'api-endpoint' - * toKebabCase('OAuth2Flow'); // 'o-auth-2-flow' - * toKebabCase('DCB'); // 'dcb' - * toKebabCase('ProcessGuardLinter'); // 'process-guard-linter' - * toKebabCase('already-kebab'); // 'already-kebab' - * toKebabCase('Pattern (v2)'); // 'pattern-v2' - * ``` - */ -export declare function toKebabCase(text: string): string; -/** - * Convert PascalCase or camelCase text to UPPER-KEBAB-CASE - * - * This is useful for generating constant-style identifiers or - * documentation file names that use uppercase conventions. - * - * @param text - Input text in PascalCase or camelCase - * @returns UPPER-KEBAB-CASE string - * - * @example - * ```typescript - * toUpperKebabCase('ProcessGuard'); // 'PROCESS-GUARD' - * toUpperKebabCase('DecisionDocCodec'); // 'DECISION-DOC-CODEC' - * toUpperKebabCase('OAuth2Flow'); // 'O-AUTH-2-FLOW' - * ``` - */ -export declare function toUpperKebabCase(text: string): string; -/** - * Convert CamelCase or PascalCase text to "Title Case" with spaces - * - * Handles various naming conventions: - * - PascalCase: `RemainingWorkEnhancement` → `Remaining Work Enhancement` - * - Acronyms: `HTTPServer` → `HTTP Server` - * - Mixed: `OAuth2Client` → `OAuth2 Client` - * - kebab-case: `remaining-work` → `remaining work` - * - Known acronyms: `DoDValidator` → `DoD Validator` (not `Do D Validator`) - * - * @param text - Input text in CamelCase, PascalCase, or kebab-case - * @returns Human-readable title case string - * - * @example - * ```typescript - * camelCaseToTitleCase('RemainingWorkEnhancement'); // 'Remaining Work Enhancement' - * camelCaseToTitleCase('HTTPServer'); // 'HTTP Server' - * camelCaseToTitleCase('OAuth2Client'); // 'OAuth2 Client' - * camelCaseToTitleCase('XMLParser'); // 'XML Parser' - * camelCaseToTitleCase('parseJSON'); // 'parse JSON' - * camelCaseToTitleCase('DoDValidator'); // 'DoD Validator' - * camelCaseToTitleCase('TypeScriptAST'); // 'TypeScript AST' - * ``` - */ -export declare function camelCaseToTitleCase(text: string): string; -/** - * Normalize line endings from Windows CRLF to Unix LF. - * - * Used when processing text that may have been created on Windows systems - * or transferred through systems that preserve Windows line endings. - * - * @param text - Text that may contain CRLF line endings - * @returns Text with all CRLF sequences replaced by LF - * - * @example - * ```typescript - * normalizeLineEndings('line1\r\nline2\r\n'); // 'line1\nline2\n' - * normalizeLineEndings('already\nunix\n'); // 'already\nunix\n' - * ``` - */ -export declare function normalizeLineEndings(text: string): string; -/** - * Extract the first sentence from a text string. - * - * Finds sentence-ending punctuation (.!?) followed by whitespace + uppercase - * (new sentence) or end of string. Handles periods in file extensions correctly. - * - * @param text - Input text - * @returns First sentence, or full trimmed text if no sentence boundary found - */ -export declare function extractFirstSentenceRaw(text: string): string; -/** - * Extract a compact description preserving Problem/Solution structure. - * - * If the text uses `**Problem:**` / `**Solution:**` markers, extracts the - * first sentence from each section and combines them. Otherwise falls back - * to extractFirstSentence() behavior. - * - * @param text - Description text, possibly with Problem/Solution structure - * @returns Compact description preserving both halves if structured - */ -export declare function extractDescription(text: string): string; -//# sourceMappingURL=string-utils.d.ts.map \ No newline at end of file diff --git a/dist/utils/string-utils.d.ts.map b/dist/utils/string-utils.d.ts.map deleted file mode 100644 index 352e4195..00000000 --- a/dist/utils/string-utils.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"string-utils.d.ts","sourceRoot":"","sources":["../../src/utils/string-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAK5C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAgBhD;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAErD;AAqDD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAoDzD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAQ5D;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAavD"} \ No newline at end of file diff --git a/dist/utils/string-utils.js b/dist/utils/string-utils.js deleted file mode 100644 index 547cd13b..00000000 --- a/dist/utils/string-utils.js +++ /dev/null @@ -1,281 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core - * @libar-docs-pattern StringUtilities - * @libar-docs-status completed - * @libar-docs-used-by DocExtractor, SectionRenderer - * - * ## StringUtilities - Text Transformation Functions - * - * Provides shared utilities for string manipulation used across the delivery-process package, - * including slugification for URLs/filenames and Markdown formatting cleanup. - * - * ### When to Use - * - * - Use `slugify()` when generating URL-safe identifiers for HTML anchors or filenames - * - Use when normalizing text for consistent formatting across generated docs - */ -/** - * Convert a string to a URL/filename-safe slug (lowercase, alphanumeric, hyphens) - * - * Transforms text into a normalized format suitable for: - * - HTML anchor IDs - * - Filenames - * - URL slugs - * - * **Note:** Non-ASCII characters (including Unicode) are removed, not transliterated. - * For example, `"hello-日本語"` becomes `"hello"`. - * - * @param text - Input text to slugify - * @returns Slug string (lowercase, alphanumeric with hyphens) - * - * @example - * ```typescript - * slugify('User Authentication'); // 'user-authentication' - * slugify('Create User (v2)'); // 'create-user-v2' - * slugify('---test---'); // 'test' - * slugify('Hello World!'); // 'hello-world' - * slugify('UPPER_CASE_TEXT'); // 'upper-case-text' - * ``` - */ -export function slugify(text) { - return text - .toLowerCase() - .replace(/[^a-z0-9]+/g, '-') - .replace(/^-|-$/g, ''); -} -/** - * Convert CamelCase or PascalCase text to kebab-case with proper word separation - * - * Handles various naming conventions: - * - PascalCase: `DeciderPattern` → `decider-pattern` - * - Mixed case: `BddTestingInfrastructure` → `bdd-testing-infrastructure` - * - Consecutive uppercase: `APIEndpoint` → `api-endpoint` - * - Numbers: `OAuth2Flow` → `o-auth-2-flow` - * - Already kebab-case: `already-kebab` → `already-kebab` - * - * **Note:** Unlike `slugify()`, this function properly splits CamelCase words - * instead of just lowercasing them together. - * - * @param text - Input text (CamelCase, PascalCase, or mixed) - * @returns kebab-case string - * - * @example - * ```typescript - * toKebabCase('DeciderPattern'); // 'decider-pattern' - * toKebabCase('BddTestingInfrastructure'); // 'bdd-testing-infrastructure' - * toKebabCase('APIEndpoint'); // 'api-endpoint' - * toKebabCase('OAuth2Flow'); // 'o-auth-2-flow' - * toKebabCase('DCB'); // 'dcb' - * toKebabCase('ProcessGuardLinter'); // 'process-guard-linter' - * toKebabCase('already-kebab'); // 'already-kebab' - * toKebabCase('Pattern (v2)'); // 'pattern-v2' - * ``` - */ -export function toKebabCase(text) { - return (text - // Insert hyphen between lowercase/digit and uppercase: camelCase → camel-Case - .replace(/([a-z\d])([A-Z])/g, '$1-$2') - // Insert hyphen between consecutive uppercase and uppercase+lowercase: HTTPServer → HTTP-Server - .replace(/([A-Z]+)([A-Z][a-z])/g, '$1-$2') - // Insert hyphen between letter and digit: Auth2 → Auth-2 - .replace(/([a-zA-Z])(\d)/g, '$1-$2') - // Convert to lowercase - .toLowerCase() - // Replace any non-alphanumeric characters with hyphens - .replace(/[^a-z0-9]+/g, '-') - // Remove leading/trailing hyphens - .replace(/^-+|-+$/g, '')); -} -/** - * Convert PascalCase or camelCase text to UPPER-KEBAB-CASE - * - * This is useful for generating constant-style identifiers or - * documentation file names that use uppercase conventions. - * - * @param text - Input text in PascalCase or camelCase - * @returns UPPER-KEBAB-CASE string - * - * @example - * ```typescript - * toUpperKebabCase('ProcessGuard'); // 'PROCESS-GUARD' - * toUpperKebabCase('DecisionDocCodec'); // 'DECISION-DOC-CODEC' - * toUpperKebabCase('OAuth2Flow'); // 'O-AUTH-2-FLOW' - * ``` - */ -export function toUpperKebabCase(text) { - return toKebabCase(text).toUpperCase(); -} -/** - * Known acronyms that should not be split during case conversion. - * - * These terms are protected with placeholders before regex processing, - * then restored afterward to preserve their correct formatting. - * - * IMPORTANT: Sorted by length (longest first) to ensure longer acronyms - * are matched before shorter ones they might contain. - * e.g., "TypeScript" must be matched before "AST" in "TypeScriptAST" - */ -const KNOWN_ACRONYMS = [ - // Multi-word technical terms (longest first) - 'JavaScript', // 10 chars - 'TypeScript', // 10 chars - 'WebSocket', // 9 chars - 'GraphQL', // 7 chars - 'Gherkin', // 7 chars - 'RegExp', // 6 chars - 'GitHub', // 6 chars - // 5-char acronyms - 'HTTPS', - 'OAuth', - // 4-char acronyms - 'JSON', - 'HTML', - 'HTTP', - 'UUID', - 'REST', - 'CRUD', - // 3-char acronyms - 'DoD', // Definition of Done - 'PRD', // Product Requirements Document - 'API', - 'CLI', - 'AST', - 'DOM', - 'URL', - 'XML', - 'CSS', - 'SQL', - 'JWT', - 'NPM', - 'ESM', - 'CJS', - 'SSO', - 'MCP', - 'LLM', - 'RAG', - 'ADR', -]; -/** - * Convert CamelCase or PascalCase text to "Title Case" with spaces - * - * Handles various naming conventions: - * - PascalCase: `RemainingWorkEnhancement` → `Remaining Work Enhancement` - * - Acronyms: `HTTPServer` → `HTTP Server` - * - Mixed: `OAuth2Client` → `OAuth2 Client` - * - kebab-case: `remaining-work` → `remaining work` - * - Known acronyms: `DoDValidator` → `DoD Validator` (not `Do D Validator`) - * - * @param text - Input text in CamelCase, PascalCase, or kebab-case - * @returns Human-readable title case string - * - * @example - * ```typescript - * camelCaseToTitleCase('RemainingWorkEnhancement'); // 'Remaining Work Enhancement' - * camelCaseToTitleCase('HTTPServer'); // 'HTTP Server' - * camelCaseToTitleCase('OAuth2Client'); // 'OAuth2 Client' - * camelCaseToTitleCase('XMLParser'); // 'XML Parser' - * camelCaseToTitleCase('parseJSON'); // 'parse JSON' - * camelCaseToTitleCase('DoDValidator'); // 'DoD Validator' - * camelCaseToTitleCase('TypeScriptAST'); // 'TypeScript AST' - * ``` - */ -export function camelCaseToTitleCase(text) { - // Step 1: Protect known acronyms with placeholders - // Add space marker after placeholder when followed by uppercase (word boundary) - let result = text; - const placeholders = []; - for (const acronym of KNOWN_ACRONYMS) { - // Case-sensitive match for acronyms - if (result.includes(acronym)) { - const placeholder = `__ACRONYM_${placeholders.length}__`; - placeholders.push({ placeholder, acronym }); - const escapedAcronym = acronym.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); - // Replace acronym with placeholder: - // 1. When preceded by lowercase and followed by uppercase: add spaces both sides - result = result.replace(new RegExp('([a-z])' + escapedAcronym + '([A-Z])', 'g'), '$1 ' + placeholder + ' $2'); - // 2. When followed by uppercase only: add space after - result = result.replace(new RegExp(escapedAcronym + '([A-Z])', 'g'), placeholder + ' $1'); - // 2b. When followed by digit: add space after (PDR006 → PDR 006) - result = result.replace(new RegExp(escapedAcronym + '(\\d)', 'g'), placeholder + ' $1'); - // 3. When preceded by lowercase only: add space before - result = result.replace(new RegExp('([a-z])' + escapedAcronym + '(?![A-Za-z])', 'g'), '$1 ' + placeholder); - // 4. Standalone occurrences (start of string, or between non-letters) - result = result.replace(new RegExp('(? { - /** - * Parse JSON string to typed object - * - * @param content - JSON string to parse - * @param source - Optional source identifier for error messages - * @returns Result with typed value or error - */ - parse(content: string, source?: string): Result; - /** - * Safely parse JSON, returning undefined on failure - * - * @param content - JSON string to parse - * @returns Typed value or undefined - */ - safeParse(content: string): T | undefined; -} -/** - * JSON Output Codec - validates and serializes objects to JSON - * - * Combines Zod validation and JSON.stringify into a single operation. - */ -export interface JsonOutputCodec { - /** - * Serialize typed object to JSON string - * - * @param data - Object to serialize - * @param source - Optional source identifier for error messages - * @returns Result with JSON string or error - */ - serialize(data: T, source?: string): Result; - /** - * Serialize with options - * - * @param data - Object to serialize - * @param options - Serialization options - * @returns Result with JSON string or error - */ - serializeWithOptions(data: T, options: { - indent?: number | undefined; - source?: string | undefined; - }): Result; -} -/** - * Create a JSON input codec from a Zod schema - * - * The codec handles: - * - JSON parsing with syntax error handling - * - Zod schema validation - * - $schema field stripping (for JSON Schema references) - * - Detailed error messages with source context - * - * @param schema - Zod schema to validate against - * @returns JsonInputCodec instance - * - * @example - * ```typescript - * const WorkflowCodec = createJsonInputCodec(WorkflowConfigSchema); - * - * // Load and validate in one step - * const content = await fs.readFile("workflow.json", "utf-8"); - * const result = WorkflowCodec.parse(content, "workflow.json"); - * - * if (result.ok) { - * // result.value is typed as WorkflowConfig - * console.log(result.value.name); - * } else { - * console.error(result.error.message); - * } - * ``` - */ -export declare function createJsonInputCodec(schema: ZodType): JsonInputCodec; -/** - * Create a JSON output codec from a Zod schema - * - * The codec handles: - * - Zod schema validation before serialization - * - Formatted JSON output with configurable indentation - * - Detailed error messages with source context - * - * @param schema - Zod schema to validate against - * @param defaultIndent - Default indentation spaces (default: 2) - * @returns JsonOutputCodec instance - * - * @example - * ```typescript - * const RegistryCodec = createJsonOutputCodec(PatternRegistrySchema); - * - * const registry = { patterns: [...], metadata: {...} }; - * const result = RegistryCodec.serialize(registry, "registry.json"); - * - * if (result.ok) { - * await fs.writeFile("registry.json", result.value, "utf-8"); - * } - * ``` - */ -export declare function createJsonOutputCodec(schema: ZodType, defaultIndent?: number): JsonOutputCodec; -/** - * Format codec error for console display - * - * @param error - Codec error - * @returns Formatted error message - * - * @example - * ```typescript - * const result = codec.parse(content, "config.json"); - * if (!result.ok) { - * console.error(formatCodecError(result.error)); - * process.exit(1); - * } - * ``` - */ -export declare function formatCodecError(error: CodecError): string; -/** - * Create a file loader that uses a codec for validation - * - * Combines file reading with codec parsing for a complete loading pipeline. - * This is a helper for the common pattern of reading a file and parsing it. - * - * @param codec - JsonInputCodec to use for parsing - * @param readFile - File reading function (e.g., fs.readFile) - * @returns Async function that loads and parses a file - * - * @example - * ```typescript - * import * as fs from "fs/promises"; - * - * const WorkflowCodec = createJsonInputCodec(WorkflowConfigSchema); - * const loadWorkflow = createFileLoader(WorkflowCodec, (p) => fs.readFile(p, "utf-8")); - * - * const result = await loadWorkflow("config/workflow.json"); - * if (result.ok) { - * console.log(result.value.phases); - * } - * ``` - */ -export declare function createFileLoader(codec: JsonInputCodec, readFile: (path: string) => Promise): (path: string) => Promise>; -//# sourceMappingURL=codec-utils.d.ts.map \ No newline at end of file diff --git a/dist/validation-schemas/codec-utils.d.ts.map b/dist/validation-schemas/codec-utils.d.ts.map deleted file mode 100644 index 30eba0b3..00000000 --- a/dist/validation-schemas/codec-utils.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"codec-utils.d.ts","sourceRoot":"","sources":["../../src/validation-schemas/codec-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAY,MAAM,KAAK,CAAC;AAC7C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAGhD;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,4BAA4B;IAC5B,IAAI,EAAE,aAAa,CAAC;IACpB,oDAAoD;IACpD,SAAS,EAAE,OAAO,GAAG,WAAW,CAAC;IACjC,wDAAwD;IACxD,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,mCAAmC;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,6DAA6D;IAC7D,gBAAgB,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;CACzC;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc,CAAC,CAAC;IAC/B;;;;;;OAMG;IACH,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;IAE/D;;;;;OAKG;IACH,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS,CAAC;CAC3C;AAED;;;;GAIG;AACH,MAAM,WAAW,eAAe,CAAC,CAAC;IAChC;;;;;;OAMG;IACH,SAAS,CAAC,IAAI,EAAE,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAEhE;;;;;;OAMG;IACH,oBAAoB,CAClB,IAAI,EAAE,CAAC,EACP,OAAO,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,GACpE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;CAC/B;AAeD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CA6C7E;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,EACrC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAClB,aAAa,SAAI,GAChB,eAAe,CAAC,CAAC,CAAC,CA6CpB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAS1D;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAChC,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,EACxB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,GAC1C,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAqClD"} \ No newline at end of file diff --git a/dist/validation-schemas/codec-utils.js b/dist/validation-schemas/codec-utils.js deleted file mode 100644 index e534a2b3..00000000 --- a/dist/validation-schemas/codec-utils.js +++ /dev/null @@ -1,258 +0,0 @@ -/** - * @libar-docs - * @libar-docs-validation @libar-docs-core - * @libar-docs-pattern CodecUtils - * @libar-docs-status completed - * @libar-docs-uses Zod - * @libar-docs-used-by WorkflowLoader, Orchestrator - * @libar-docs-usecase "When loading JSON config files with type-safe validation" - * @libar-docs-usecase "When serializing typed objects to formatted JSON" - * - * ## CodecUtils - Type-Safe JSON Codec Factories - * - * Provides factory functions for creating type-safe JSON parsing and serialization - * pipelines using Zod schemas. Replaces manual JSON.parse/stringify with single-step - * validated operations. - * - * ### When to Use - * - * - Use when loading JSON configuration files - * - Use when writing JSON output files with schema validation - * - Use when you want better error messages with file path context - * - * ### Key Concepts - * - * - **Input Codec**: Parses JSON string → validates → returns typed object - * - **Output Codec**: Validates object → serializes → returns formatted JSON string - * - **Error Context**: Adds file path and validation details to error messages - */ -import { Result as R } from '../types/index.js'; -/** - * Format Zod validation errors for display - * - * @param error - Zod error object - * @returns Array of formatted error strings - */ -function formatZodErrors(error) { - return error.issues.map((issue) => { - const pathStr = issue.path.length > 0 ? issue.path.join('.') : '(root)'; - return ` - ${pathStr}: ${issue.message}`; - }); -} -/** - * Create a JSON input codec from a Zod schema - * - * The codec handles: - * - JSON parsing with syntax error handling - * - Zod schema validation - * - $schema field stripping (for JSON Schema references) - * - Detailed error messages with source context - * - * @param schema - Zod schema to validate against - * @returns JsonInputCodec instance - * - * @example - * ```typescript - * const WorkflowCodec = createJsonInputCodec(WorkflowConfigSchema); - * - * // Load and validate in one step - * const content = await fs.readFile("workflow.json", "utf-8"); - * const result = WorkflowCodec.parse(content, "workflow.json"); - * - * if (result.ok) { - * // result.value is typed as WorkflowConfig - * console.log(result.value.name); - * } else { - * console.error(result.error.message); - * } - * ``` - */ -export function createJsonInputCodec(schema) { - return { - parse(content, source) { - // Step 1: Parse JSON - let data; - try { - data = JSON.parse(content); - } - catch (e) { - const message = e instanceof Error ? e.message : String(e); - return R.err({ - type: 'codec-error', - operation: 'parse', - source, - message: source ? `Invalid JSON in ${source}: ${message}` : `Invalid JSON: ${message}`, - }); - } - // Step 2: Strip $schema field if present (JSON Schema references) - const configData = typeof data === 'object' && data !== null && '$schema' in data - ? (({ $schema: _, ...rest }) => rest)(data) - : data; - // Step 3: Validate with Zod - const parseResult = schema.safeParse(configData); - if (!parseResult.success) { - const validationErrors = formatZodErrors(parseResult.error); - return R.err({ - type: 'codec-error', - operation: 'parse', - source, - message: source ? `Schema validation failed for ${source}` : 'Schema validation failed', - validationErrors, - }); - } - return R.ok(parseResult.data); - }, - safeParse(content) { - const result = this.parse(content); - return result.ok ? result.value : undefined; - }, - }; -} -/** - * Create a JSON output codec from a Zod schema - * - * The codec handles: - * - Zod schema validation before serialization - * - Formatted JSON output with configurable indentation - * - Detailed error messages with source context - * - * @param schema - Zod schema to validate against - * @param defaultIndent - Default indentation spaces (default: 2) - * @returns JsonOutputCodec instance - * - * @example - * ```typescript - * const RegistryCodec = createJsonOutputCodec(PatternRegistrySchema); - * - * const registry = { patterns: [...], metadata: {...} }; - * const result = RegistryCodec.serialize(registry, "registry.json"); - * - * if (result.ok) { - * await fs.writeFile("registry.json", result.value, "utf-8"); - * } - * ``` - */ -export function createJsonOutputCodec(schema, defaultIndent = 2) { - return { - serialize(data, source) { - return this.serializeWithOptions(data, { source, indent: defaultIndent }); - }, - serializeWithOptions(data, options = {}) { - const { indent = defaultIndent, source } = options; - // Validate before serialization - const parseResult = schema.safeParse(data); - if (!parseResult.success) { - const validationErrors = formatZodErrors(parseResult.error); - return R.err({ - type: 'codec-error', - operation: 'serialize', - source, - message: source - ? `Schema validation failed before serializing ${source}` - : 'Schema validation failed before serialization', - validationErrors, - }); - } - // Serialize to JSON - try { - const jsonString = JSON.stringify(parseResult.data, null, indent); - return R.ok(jsonString); - } - catch (e) { - const message = e instanceof Error ? e.message : String(e); - return R.err({ - type: 'codec-error', - operation: 'serialize', - source, - message: source - ? `JSON serialization failed for ${source}: ${message}` - : `JSON serialization failed: ${message}`, - }); - } - }, - }; -} -/** - * Format codec error for console display - * - * @param error - Codec error - * @returns Formatted error message - * - * @example - * ```typescript - * const result = codec.parse(content, "config.json"); - * if (!result.ok) { - * console.error(formatCodecError(result.error)); - * process.exit(1); - * } - * ``` - */ -export function formatCodecError(error) { - const lines = [`Codec error (${error.operation}): ${error.message}`]; - if (error.validationErrors && error.validationErrors.length > 0) { - lines.push('Validation errors:'); - lines.push(...error.validationErrors); - } - return lines.join('\n'); -} -/** - * Create a file loader that uses a codec for validation - * - * Combines file reading with codec parsing for a complete loading pipeline. - * This is a helper for the common pattern of reading a file and parsing it. - * - * @param codec - JsonInputCodec to use for parsing - * @param readFile - File reading function (e.g., fs.readFile) - * @returns Async function that loads and parses a file - * - * @example - * ```typescript - * import * as fs from "fs/promises"; - * - * const WorkflowCodec = createJsonInputCodec(WorkflowConfigSchema); - * const loadWorkflow = createFileLoader(WorkflowCodec, (p) => fs.readFile(p, "utf-8")); - * - * const result = await loadWorkflow("config/workflow.json"); - * if (result.ok) { - * console.log(result.value.phases); - * } - * ``` - */ -export function createFileLoader(codec, readFile) { - return async (path) => { - try { - const content = await readFile(path); - return codec.parse(content, path); - } - catch (e) { - const message = e instanceof Error ? e.message : String(e); - // Check for common file errors - if (e instanceof Error && 'code' in e) { - const nodeError = e; - if (nodeError.code === 'ENOENT') { - return R.err({ - type: 'codec-error', - operation: 'parse', - source: path, - message: `File not found: ${path}`, - }); - } - if (nodeError.code === 'EACCES') { - return R.err({ - type: 'codec-error', - operation: 'parse', - source: path, - message: `Permission denied: ${path}`, - }); - } - } - return R.err({ - type: 'codec-error', - operation: 'parse', - source: path, - message: `Failed to read file ${path}: ${message}`, - }); - } - }; -} -//# sourceMappingURL=codec-utils.js.map \ No newline at end of file diff --git a/dist/validation-schemas/codec-utils.js.map b/dist/validation-schemas/codec-utils.js.map deleted file mode 100644 index 507b6d21..00000000 --- a/dist/validation-schemas/codec-utils.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"codec-utils.js","sourceRoot":"","sources":["../../src/validation-schemas/codec-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAIH,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAsEhD;;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;wBACZ,OAAO,EAAE,sBAAsB,IAAI,EAAE;qBACtC,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;YAED,OAAO,CAAC,CAAC,GAAG,CAAC;gBACX,IAAI,EAAE,aAAa;gBACnB,SAAS,EAAE,OAAO;gBAClB,MAAM,EAAE,IAAI;gBACZ,OAAO,EAAE,uBAAuB,IAAI,KAAK,OAAO,EAAE;aACnD,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/dist/validation-schemas/config.d.ts b/dist/validation-schemas/config.d.ts deleted file mode 100644 index c215f46e..00000000 --- a/dist/validation-schemas/config.d.ts +++ /dev/null @@ -1,99 +0,0 @@ -import { z } from 'zod'; -import type { RegistryFilePath } from '../types/branded.js'; -/** - * Scanner configuration - * - * Schema enforces: - * - At least one glob pattern - * - No parent directory traversal in patterns - * - Normalized base directory path - * - Strict mode to prevent extra fields - * - * **Transform Chain:** - * 1. Validate pattern non-empty - * 2. Check for security issues (..) - * 3. Normalize baseDir to absolute path - */ -export declare const ScannerConfigSchema: z.ZodObject<{ - patterns: z.ZodReadonly>; - exclude: z.ZodOptional>>; - baseDir: z.ZodPipe>; -}, z.core.$strict>; -/** - * Type alias inferred from schema - * - * **Schema-First Law**: Type automatically derives from Zod schema. - */ -export type ScannerConfig = z.infer; -/** - * Generator configuration type - * - * **Note**: Defined explicitly to break circular dependency with factory function - * while maintaining type safety and TIER 1 compliance. - */ -export interface GeneratorConfig { - outputDir: string; - registryPath: RegistryFilePath; - overwrite: boolean; - readmeOnly: boolean; -} -/** - * Generator configuration factory - * - * **Security**: Requires explicit baseDir to prevent path manipulation attacks. - * - * Schema enforces: - * - Output directory within explicit baseDir (security) - * - Registry file is JSON format - * - Path normalization with symlink prevention - * - Strict mode to prevent extra fields - * - * **Transform Chain:** - * 1. Normalize output directory to absolute path - * 2. Validate within explicit baseDir boundaries - * 3. Prevent parent directory traversal (..) - * 4. Ensure registry is .json file - * 5. Normalize all paths - * - * @param baseDir - Explicit base directory for security validation - * @returns Generator config schema - * - * @example - * ```typescript - * const schema = createGeneratorConfigSchema(process.cwd()); - * const config = schema.parse({ - * outputDir: 'docs', - * registryPath: 'registry.json' - * }); - * ``` - */ -export declare function createGeneratorConfigSchema(baseDir: string): z.ZodType; -/** - * Runtime type guard for ScannerConfig - * - * @param value - Value to check - * @returns True if value conforms to ScannerConfig schema - * - * @example - * ```typescript - * if (isScannerConfig(parsed)) { - * console.log(parsed.patterns); // Type-safe access - * } - * ``` - */ -export declare function isScannerConfig(value: unknown): value is ScannerConfig; -/** - * Runtime type guard for GeneratorConfig - * - * @param value - Value to check - * @returns True if value conforms to GeneratorConfig schema - * - * @example - * ```typescript - * if (isGeneratorConfig(parsed)) { - * console.log(parsed.outputDir); // Type-safe access - * } - * ``` - */ -export declare function isGeneratorConfig(value: unknown): value is GeneratorConfig; -//# sourceMappingURL=config.d.ts.map \ No newline at end of file diff --git a/dist/validation-schemas/config.d.ts.map b/dist/validation-schemas/config.d.ts.map deleted file mode 100644 index 08209507..00000000 --- a/dist/validation-schemas/config.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/validation-schemas/config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAoF5D;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,mBAAmB;;;;kBAWrB,CAAC;AAEZ;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,gBAAgB,CAAC;IAC/B,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,MAAM,GAAG,CAAC,CAAC,OAAO,CAAC,eAAe,CAAC,CAgBvF;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,aAAa,CAEtE;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,eAAe,CAG1E"} \ No newline at end of file diff --git a/dist/validation-schemas/config.js b/dist/validation-schemas/config.js deleted file mode 100644 index f185e0cc..00000000 --- a/dist/validation-schemas/config.js +++ /dev/null @@ -1,178 +0,0 @@ -import * as fs from 'fs'; -import * as path from 'path'; -import { z } from 'zod'; -import { asRegistryFilePath } from '../types/branded.js'; -/** - * Safely resolve a path, following symlinks if possible - * - * Falls back to path.resolve if the path doesn't exist yet - * (which is valid for output directories that will be created) - */ -function safeRealpathSync(filePath) { - try { - return fs.realpathSync(filePath); - } - catch { - // Path doesn't exist yet, use regular resolve - return path.resolve(filePath); - } -} -/** - * Glob pattern validation - * Must be non-empty and not contain parent directory traversal for security - */ -const GlobPatternSchema = z - .string() - .min(1, 'Glob pattern cannot be empty') - .refine((pattern) => !pattern.includes('..'), { - message: 'Glob patterns cannot contain parent directory traversal (..)', -}); -/** - * Base directory validation with normalization - */ -const BaseDirSchema = z - .string() - .min(1, 'Base directory cannot be empty') - .transform((dir) => path.resolve(dir)); // Normalize to absolute path -/** - * Create output directory validator with explicit base directory - * - * **Security**: Uses explicit baseDir parameter instead of process.cwd() - * to prevent manipulation via symlinks or environment changes. - * - * @param baseDir - Explicit base directory for validation - * @returns Output directory schema validator - * - */ -function createOutputDirSchema(baseDir) { - return z - .string() - .min(1, 'Output directory cannot be empty') - .transform((dir) => path.normalize(path.resolve(dir))) - .refine((dir) => { - // Resolve symlinks for the base directory to prevent bypass attacks - const resolvedBase = safeRealpathSync(baseDir); - const resolvedDir = safeRealpathSync(dir); - // Prevent parent directory traversal - if (dir.includes('..')) { - return false; - } - // Must be within resolvedBase or be a relative path - return resolvedDir.startsWith(resolvedBase) || !path.isAbsolute(dir); - }, { - message: 'Output directory must be within project (no parent traversal)', - }); -} -/** - * Registry file path validation - * Must be a JSON file - */ -const RegistryFilePathSchema = z - .string() - .min(1, 'Registry path cannot be empty') - .refine((p) => p.endsWith('.json'), { - message: 'Registry file must be a JSON file (.json)', -}) - .transform((p) => asRegistryFilePath(path.normalize(p))); -/** - * Scanner configuration - * - * Schema enforces: - * - At least one glob pattern - * - No parent directory traversal in patterns - * - Normalized base directory path - * - Strict mode to prevent extra fields - * - * **Transform Chain:** - * 1. Validate pattern non-empty - * 2. Check for security issues (..) - * 3. Normalize baseDir to absolute path - */ -export const ScannerConfigSchema = z - .object({ - /** Glob patterns to scan (e.g., 'src/**\/*.ts') */ - patterns: z.array(GlobPatternSchema).min(1, 'At least one glob pattern required').readonly(), - /** Directories to exclude (optional) */ - exclude: z.array(GlobPatternSchema).readonly().optional(), - /** Base directory for scanning (normalized to absolute path) */ - baseDir: BaseDirSchema, -}) - .strict(); -/** - * Generator configuration factory - * - * **Security**: Requires explicit baseDir to prevent path manipulation attacks. - * - * Schema enforces: - * - Output directory within explicit baseDir (security) - * - Registry file is JSON format - * - Path normalization with symlink prevention - * - Strict mode to prevent extra fields - * - * **Transform Chain:** - * 1. Normalize output directory to absolute path - * 2. Validate within explicit baseDir boundaries - * 3. Prevent parent directory traversal (..) - * 4. Ensure registry is .json file - * 5. Normalize all paths - * - * @param baseDir - Explicit base directory for security validation - * @returns Generator config schema - * - * @example - * ```typescript - * const schema = createGeneratorConfigSchema(process.cwd()); - * const config = schema.parse({ - * outputDir: 'docs', - * registryPath: 'registry.json' - * }); - * ``` - */ -export function createGeneratorConfigSchema(baseDir) { - return z - .object({ - /** Output directory for generated docs (within baseDir) */ - outputDir: createOutputDirSchema(baseDir), - /** Registry file path (must be .json) */ - registryPath: RegistryFilePathSchema, - /** Whether to overwrite existing files */ - overwrite: z.boolean().default(false), - /** When true, only generate OVERVIEW.md, DECISIONS.md, and registry.json */ - readmeOnly: z.boolean().default(false), - }) - .strict(); -} -/** - * Runtime type guard for ScannerConfig - * - * @param value - Value to check - * @returns True if value conforms to ScannerConfig schema - * - * @example - * ```typescript - * if (isScannerConfig(parsed)) { - * console.log(parsed.patterns); // Type-safe access - * } - * ``` - */ -export function isScannerConfig(value) { - return ScannerConfigSchema.safeParse(value).success; -} -/** - * Runtime type guard for GeneratorConfig - * - * @param value - Value to check - * @returns True if value conforms to GeneratorConfig schema - * - * @example - * ```typescript - * if (isGeneratorConfig(parsed)) { - * console.log(parsed.outputDir); // Type-safe access - * } - * ``` - */ -export function isGeneratorConfig(value) { - const schema = createGeneratorConfigSchema(process.cwd()); - return schema.safeParse(value).success; -} -//# sourceMappingURL=config.js.map \ No newline at end of file diff --git a/dist/validation-schemas/config.js.map b/dist/validation-schemas/config.js.map deleted file mode 100644 index 0d788d46..00000000 --- a/dist/validation-schemas/config.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/validation-schemas/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEzD;;;;;GAKG;AACH,SAAS,gBAAgB,CAAC,QAAgB;IACxC,IAAI,CAAC;QACH,OAAO,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;IACnC,CAAC;IAAC,MAAM,CAAC;QACP,8CAA8C;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAChC,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,iBAAiB,GAAG,C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AC,OAAO,CAAC;AACtD,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAAc;IAC9C,MAAM,MAAM,GAAG,2BAA2B,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IAC1D,OAAO,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;AACzC,CAAC"} \ No newline at end of file diff --git a/dist/validation-schemas/doc-directive.d.ts b/dist/validation-schemas/doc-directive.d.ts deleted file mode 100644 index bc77a99b..00000000 --- a/dist/validation-schemas/doc-directive.d.ts +++ /dev/null @@ -1,190 +0,0 @@ -/** - * @libar-docs - * @libar-docs-validation - * @libar-docs-pattern DocDirectiveSchema - * @libar-docs-status completed - * @libar-docs-implements MvpWorkflowImplementation - * @libar-docs-used-by DocExtractor, ExtractedPatternSchema - * - * ## DocDirectiveSchema - Parsed JSDoc Directive Validation - * - * Zod schemas for validating parsed @libar-docs-* directives from JSDoc comments. - * Enforces tag format, position validity, and metadata extraction. - * - * ### When to Use - * - * - Use when parsing JSDoc comments for @libar-docs-* tags - * - Use when validating directive structure at boundaries - */ -import { z } from 'zod'; -import { type AcceptedStatusValue } from '../taxonomy/index.js'; -import type { TagRegistry } from './tag-registry.js'; -/** - * Position information for a directive in source code - */ -export declare const PositionSchema: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; -}, z.core.$strict>; -export type Position = z.infer; -/** - * Creates a DirectiveTag schema for a given tag prefix. - * This factory enables projects to use custom prefixes (e.g., "@docs-" instead of "@libar-docs-"). - * - * @param tagPrefix - The tag prefix to validate against (e.g., "@docs-" or "@libar-docs-") - * @returns Zod schema that validates and transforms tags with the given prefix - * - * @example - * ```typescript - * // Custom prefix - * const customSchema = createDirectiveTagSchema("@docs-"); - * customSchema.parse("@docs-pattern"); // Valid - * - * // Default prefix - * const defaultSchema = createDirectiveTagSchema("@libar-docs-"); - * defaultSchema.parse("@libar-docs-status"); // Valid - * ``` - */ -export declare function createDirectiveTagSchema(tagPrefix: string): z.ZodPipe>; -/** - * Default status values for pattern implementation state - * - * Uses the single source of truth from taxonomy module (PDR-005 FSM). - * For registry-based status validation, use createPatternStatusSchema(). - * - * @see src/taxonomy/status-values.ts - */ -export declare const DefaultPatternStatusSchema: z.ZodEnum<{ - deferred: "deferred"; - roadmap: "roadmap"; - active: "active"; - completed: "completed"; -}>; -/** - * Extended status values accepted for directive validation - * - * Accepts FSM states + legacy values (implemented, partial, in-progress). - * Legacy values are normalized to FSM states via normalizeStatus(). - * - * @see src/taxonomy/status-values.ts - * @see src/taxonomy/normalized-status.ts - */ -export declare const AcceptedPatternStatusSchema: z.ZodEnum<{ - deferred: "deferred"; - roadmap: "roadmap"; - active: "active"; - completed: "completed"; -}>; -/** - * Pattern status schema for directive validation - * - * Uses AcceptedPatternStatusSchema to allow legacy values. - * Legacy values are normalized to display values via normalizeStatus(). - */ -export declare const PatternStatusSchema: z.ZodEnum<{ - deferred: "deferred"; - roadmap: "roadmap"; - active: "active"; - completed: "completed"; -}>; -export type PatternStatus = AcceptedStatusValue; -/** - * Create pattern status schema from tag registry - * - * Builds a Zod enum schema using status values defined in the registry's - * metadata tags. Falls back to default schema if "status" tag not found in registry. - * - * @param registry - Tag registry containing metadata tag definitions - * @returns Zod enum schema for pattern status validation - * - * @example - * ```typescript - * const config = await loadConfig(); - * const statusSchema = createPatternStatusSchema(config.tagRegistry); - * const result = statusSchema.safeParse("completed"); // Validates against registry values - * ``` - */ -export declare function createPatternStatusSchema(registry: TagRegistry): z.ZodType; -/** - * Parsed @libar-docs-* directive from JSDoc comment - * - * Schema enforces: - * - At least one tag - * - Valid position with endLine >= startLine - * - Strict mode to prevent extra fields - * - * Description defaults to empty string to allow tag-only directives: - * ```typescript - * /** - * * @libar-docs-core - * *\/ - * export function myFunction() {} - * ``` - */ -export declare const DocDirectiveSchema: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; -}, z.core.$strict>; -/** - * Type alias inferred from schema - * - * **Schema-First Law**: Always infer types from schemas, - * never define types separately to avoid duplication. - */ -export type DocDirective = z.infer; -/** - * Runtime type guard for DocDirective - * - * @param value - Value to check - * @returns True if value conforms to DocDirective schema - * - * @example - * ```typescript - * if (isDocDirective(parsed)) { - * console.log(parsed.tags); // Type-safe access - * } - * ``` - */ -export declare function isDocDirective(value: unknown): value is DocDirective; -//# sourceMappingURL=doc-directive.d.ts.map \ No newline at end of file diff --git a/dist/validation-schemas/doc-directive.d.ts.map b/dist/validation-schemas/doc-directive.d.ts.map deleted file mode 100644 index a474bb89..00000000 --- a/dist/validation-schemas/doc-directive.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"doc-directive.d.ts","sourceRoot":"","sources":["../../src/validation-schemas/doc-directive.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAGL,KAAK,mBAAmB,EACzB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD;;GAEG;AACH,eAAO,MAAM,cAAc;;;kBAWvB,CAAC;AAEL,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD;;;;;;;;;;;;;;;;;GAiBG;AAEH,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,MAAM,sFAQzD;AAUD;;;;;;;GAOG;AACH,eAAO,MAAM,0BAA0B;;;;;EAAgC,CAAC;AAExE;;;;;;;;GAQG;AACH,eAAO,MAAM,2BAA2B;;;;;EAAiC,CAAC;AAE1E;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB;;;;;EAA8B,CAAC;AAC/D,MAAM,MAAM,aAAa,GAAG,mBAAmB,CAAC;AAEhD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,WAAW,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAalF;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAiHpB,CAAC;AAEZ;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,YAAY,CAEpE"} \ No newline at end of file diff --git a/dist/validation-schemas/doc-directive.js b/dist/validation-schemas/doc-directive.js deleted file mode 100644 index 84cd30ec..00000000 --- a/dist/validation-schemas/doc-directive.js +++ /dev/null @@ -1,234 +0,0 @@ -/** - * @libar-docs - * @libar-docs-validation - * @libar-docs-pattern DocDirectiveSchema - * @libar-docs-status completed - * @libar-docs-implements MvpWorkflowImplementation - * @libar-docs-used-by DocExtractor, ExtractedPatternSchema - * - * ## DocDirectiveSchema - Parsed JSDoc Directive Validation - * - * Zod schemas for validating parsed @libar-docs-* directives from JSDoc comments. - * Enforces tag format, position validity, and metadata extraction. - * - * ### When to Use - * - * - Use when parsing JSDoc comments for @libar-docs-* tags - * - Use when validating directive structure at boundaries - */ -import { z } from 'zod'; -import { ACCEPTED_STATUS_VALUES, PROCESS_STATUS_VALUES, } from '../taxonomy/index.js'; -import { asDirectiveTag } from '../types/branded.js'; -/** - * Position information for a directive in source code - */ -export const PositionSchema = z - .object({ - /** Starting line number (1-indexed) */ - startLine: z.number().int().positive('Line numbers must be positive'), - /** Ending line number (1-indexed) */ - endLine: z.number().int().positive('Line numbers must be positive'), -}) - .strict() - .refine((pos) => pos.endLine >= pos.startLine, { - message: 'End line must be >= start line', -}); -/** - * Creates a DirectiveTag schema for a given tag prefix. - * This factory enables projects to use custom prefixes (e.g., "@docs-" instead of "@libar-docs-"). - * - * @param tagPrefix - The tag prefix to validate against (e.g., "@docs-" or "@libar-docs-") - * @returns Zod schema that validates and transforms tags with the given prefix - * - * @example - * ```typescript - * // Custom prefix - * const customSchema = createDirectiveTagSchema("@docs-"); - * customSchema.parse("@docs-pattern"); // Valid - * - * // Default prefix - * const defaultSchema = createDirectiveTagSchema("@libar-docs-"); - * defaultSchema.parse("@libar-docs-status"); // Valid - * ``` - */ -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type -export function createDirectiveTagSchema(tagPrefix) { - return z - .string() - .min(1, 'Tag cannot be empty') - .refine((tag) => tag.startsWith(tagPrefix), { - message: `Tags must start with ${tagPrefix}`, - }) - .transform((tag) => asDirectiveTag(tag)); -} -/** - * Directive tag validation (default prefix) - * Must start with @libar-docs- - * - * For custom prefixes, use createDirectiveTagSchema(). - */ -const DirectiveTagSchema = createDirectiveTagSchema('@libar-docs-'); -/** - * Default status values for pattern implementation state - * - * Uses the single source of truth from taxonomy module (PDR-005 FSM). - * For registry-based status validation, use createPatternStatusSchema(). - * - * @see src/taxonomy/status-values.ts - */ -export const DefaultPatternStatusSchema = z.enum(PROCESS_STATUS_VALUES); -/** - * Extended status values accepted for directive validation - * - * Accepts FSM states + legacy values (implemented, partial, in-progress). - * Legacy values are normalized to FSM states via normalizeStatus(). - * - * @see src/taxonomy/status-values.ts - * @see src/taxonomy/normalized-status.ts - */ -export const AcceptedPatternStatusSchema = z.enum(ACCEPTED_STATUS_VALUES); -/** - * Pattern status schema for directive validation - * - * Uses AcceptedPatternStatusSchema to allow legacy values. - * Legacy values are normalized to display values via normalizeStatus(). - */ -export const PatternStatusSchema = AcceptedPatternStatusSchema; -/** - * Create pattern status schema from tag registry - * - * Builds a Zod enum schema using status values defined in the registry's - * metadata tags. Falls back to default schema if "status" tag not found in registry. - * - * @param registry - Tag registry containing metadata tag definitions - * @returns Zod enum schema for pattern status validation - * - * @example - * ```typescript - * const config = await loadConfig(); - * const statusSchema = createPatternStatusSchema(config.tagRegistry); - * const result = statusSchema.safeParse("completed"); // Validates against registry values - * ``` - */ -export function createPatternStatusSchema(registry) { - const statusTag = registry.metadataTags.find((t) => t.tag === 'status'); - if (statusTag?.values && statusTag.values.length > 0) { - // Zod enum requires at least one value, and the type is [string, ...string[]] - const [first, ...rest] = statusTag.values; - if (first) { - return z.enum([first, ...rest]); - } - } - // Fallback to default if not found or invalid - return DefaultPatternStatusSchema; -} -/** - * Parsed @libar-docs-* directive from JSDoc comment - * - * Schema enforces: - * - At least one tag - * - Valid position with endLine >= startLine - * - Strict mode to prevent extra fields - * - * Description defaults to empty string to allow tag-only directives: - * ```typescript - * /** - * * @libar-docs-core - * *\/ - * export function myFunction() {} - * ``` - */ -export const DocDirectiveSchema = z - .object({ - /** Tags found in comment (e.g., ['@libar-docs-core', '@libar-docs-types']). Empty allowed for Gherkin-sourced patterns. */ - tags: z.array(DirectiveTagSchema).readonly(), - /** Full description text from JSDoc (defaults to empty for tag-only directives) */ - description: z.string().default(''), - /** Examples found in JSDoc @example tags */ - examples: z.array(z.string()).readonly().default([]), - /** Position in source file */ - position: PositionSchema, - /** Explicit pattern name from @libar-docs-pattern tag */ - patternName: z.string().optional(), - /** Implementation status from @libar-docs-status tag */ - status: PatternStatusSchema.optional(), - /** Whether this is a core/essential pattern from @libar-docs-core tag */ - isCore: z.boolean().optional(), - /** Use cases this pattern applies to from @libar-docs-usecase tags */ - useCases: z.array(z.string()).readonly().optional(), - /** "When to use" bullet points extracted from description (### When to Use or **When to use:**) */ - whenToUse: z.array(z.string()).readonly().optional(), - /** Patterns this pattern uses (from @libar-docs-uses tag) */ - uses: z.array(z.string()).readonly().optional(), - /** Patterns that use this pattern (from @libar-docs-used-by tag) */ - usedBy: z.array(z.string()).readonly().optional(), - /** Roadmap phase number (from @libar-docs-phase tag) */ - phase: z.number().int().positive().optional(), - /** Path to pattern brief markdown file (from @libar-docs-brief tag) */ - brief: z.string().optional(), - /** Patterns this pattern depends on for roadmap planning (from @libar-docs-depends-on tag) */ - dependsOn: z.array(z.string()).readonly().optional(), - /** Patterns this pattern enables/unlocks (from @libar-docs-enables tag) */ - enables: z.array(z.string()).readonly().optional(), - /** Patterns this code realizes (from @libar-docs-implements tag) */ - implements: z.array(z.string()).readonly().optional(), - /** Base pattern this extends (from @libar-docs-extends tag) */ - extends: z.string().optional(), - /** Related patterns for cross-reference without dependency (from @libar-docs-see-also tag) */ - seeAlso: z.array(z.string()).readonly().optional(), - /** File paths to implementation APIs (from @libar-docs-api-ref tag) */ - apiRef: z.array(z.string()).readonly().optional(), - /** Delivery quarter for timeline workflow (from @libar-docs-quarter tag) */ - quarter: z.string().optional(), - /** Completion date for timeline workflow (from @libar-docs-completed tag) */ - completed: z.string().optional(), - /** Effort estimate for timeline workflow (from @libar-docs-effort tag) */ - effort: z.string().optional(), - /** Responsible team for process workflow (from @libar-docs-team tag) */ - team: z.string().optional(), - /** Workflow/discipline for process workflow (from @libar-docs-workflow tag) */ - workflow: z.string().optional(), - /** Risk level for process workflow (from @libar-docs-risk tag) */ - risk: z.string().optional(), - /** Priority level for process workflow (from @libar-docs-priority tag) */ - priority: z.string().optional(), - // Design session stub metadata (from @libar-docs-target, @libar-docs-since tags) - /** Target implementation path for stub files (from @libar-docs-target tag) */ - target: z.string().optional(), - /** Design session that created this pattern (from @libar-docs-since tag) */ - since: z.string().optional(), - // Architecture diagram generation fields (from @libar-docs-arch-* tags) - /** Architectural role for diagram generation (from @libar-docs-arch-role tag) */ - archRole: z.string().optional(), - /** Bounded context this component belongs to (from @libar-docs-arch-context tag) */ - archContext: z.string().optional(), - /** Architectural layer (from @libar-docs-arch-layer tag) */ - archLayer: z.string().optional(), - /** Cross-cutting document inclusion for content routing and diagram scoping (from @libar-docs-include CSV tag) */ - include: z.array(z.string().min(1)).readonly().optional(), - /** Product area for PRD grouping (from @libar-docs-product-area tag) */ - productArea: z.string().optional(), - // Shape extraction fields - /** Shape names to extract from this file (from @libar-docs-extract-shapes tag) */ - extractShapes: z.array(z.string()).readonly().optional(), - /** Convention domains for reference document generation (from @libar-docs-convention CSV tag) */ - convention: z.array(z.string()).readonly().optional(), -}) - .strict(); -/** - * Runtime type guard for DocDirective - * - * @param value - Value to check - * @returns True if value conforms to DocDirective schema - * - * @example - * ```typescript - * if (isDocDirective(parsed)) { - * console.log(parsed.tags); // Type-safe access - * } - * ``` - */ -export function isDocDirective(value) { - return DocDirectiveSchema.safeParse(value).success; -} -//# sourceMappingURL=doc-directive.js.map \ No newline at end of file diff --git a/dist/validation-schemas/doc-directive.js.map b/dist/validation-schemas/doc-directive.js.map deleted file mode 100644 index 183446bb..00000000 --- a/dist/validation-schemas/doc-directive.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"doc-directive.js","sourceRoot":"","sources":["../../src/validation-schemas/doc-directive.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,sBAAsB,EACtB,qBAAqB,GAEtB,MAAM,s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CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAEzD,wEAAwE;IACxE,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAElC,0BAA0B;IAE1B,kFAAkF;IAClF,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAExD,iGAAiG;IACjG,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CACtD,CAAC;KACD,MAAM,EAAE,CAAC;AAUZ;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,cAAc,CAAC,KAAc;IAC3C,OAAO,kBAAkB,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;AACrD,CAAC"} \ No newline at end of file diff --git a/dist/validation-schemas/dual-source.d.ts b/dist/validation-schemas/dual-source.d.ts deleted file mode 100644 index 5fccbe90..00000000 --- a/dist/validation-schemas/dual-source.d.ts +++ /dev/null @@ -1,167 +0,0 @@ -/** - * @libar-docs - * @libar-docs-validation - * @libar-docs-pattern DualSourceSchemas - * @libar-docs-status completed - * @libar-docs-implements MvpWorkflowImplementation - * @libar-docs-used-by DocExtractor, FeatureParser, CrossValidator - * - * ## DualSourceSchemas - Dual-Source Extraction Type Validation - * - * Zod schemas for dual-source extraction types. - * - * Following the project's schema-first pattern, all dual-source types - * are defined as Zod schemas with TypeScript types inferred from them. - * - * ### When to Use - * - * - When validating process metadata from Gherkin feature tags - * - When validating deliverables from Background tables - * - When performing cross-validation between code and feature files - */ -import { z } from 'zod'; -import { type HierarchyLevel as TaxonomyHierarchyLevel, type ProcessStatusValue, type RiskLevel as TaxonomyRiskLevel } from '../taxonomy/index.js'; -/** - * Process status values from Gherkin @libar-docs-status tag - * - * Per PDR-005 MVP Workflow State Machine: - * - roadmap: Planned work, fully editable - * - active: In progress, scope-locked - * - completed: Done, hard-locked - * - deferred: On hold, fully editable - * - * @see delivery-process/src/taxonomy/status-values.ts - */ -export declare const ProcessStatusSchema: z.ZodEnum<{ - deferred: "deferred"; - roadmap: "roadmap"; - active: "active"; - completed: "completed"; -}>; -export type ProcessStatus = ProcessStatusValue; -/** - * Hierarchy level values from Gherkin @libar-docs-level tag - * - * Three-level hierarchy for organizing work: - * - **epic**: Multi-quarter strategic initiatives - * - **phase**: Standard work units (2-5 days) - * - **task**: Fine-grained session-level work (1-4 hours) - * - * Default is "phase" for backward compatibility with existing feature files. - * - * @see delivery-process/src/taxonomy/hierarchy-levels.ts - */ -export declare const HierarchyLevelSchema: z.ZodEnum<{ - phase: "phase"; - epic: "epic"; - task: "task"; -}>; -export type HierarchyLevel = TaxonomyHierarchyLevel; -/** - * Risk level values from Gherkin @libar-docs-risk tag - * - * @see delivery-process/src/taxonomy/risk-levels.ts - */ -export declare const RiskLevelSchema: z.ZodEnum<{ - low: "low"; - medium: "medium"; - high: "high"; -}>; -export type RiskLevel = TaxonomyRiskLevel; -/** - * Process metadata from Gherkin feature tags (@libar-docs-*) - * - * Extracted from timeline feature files to provide temporal process data - * (quarter, effort, team, workflow) that complements the timeless pattern - * graph data from TypeScript code annotations. - */ -export declare const ProcessMetadataSchema: z.ZodObject<{ - pattern: z.ZodString; - phase: z.ZodNumber; - status: z.ZodEnum<{ - deferred: "deferred"; - roadmap: "roadmap"; - active: "active"; - completed: "completed"; - }>; - level: z.ZodDefault>; - parent: z.ZodOptional; - quarter: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - completed: z.ZodOptional; - effortActual: z.ZodOptional; - risk: z.ZodOptional>; - brief: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; -}, z.core.$strict>; -export type ProcessMetadata = z.infer; -/** - * Deliverable from Gherkin Background table - * - * Parsed from Background section tables with format: - * | Deliverable | Status | Tests | Location | - * - * Optional columns for extended tracking: - * | Deliverable | Status | Tests | Location | Finding | Release | - * - * - **Finding**: Review traceability ID (e.g., "CODE-001") - * - **Release**: Semver version for changelog grouping (e.g., "v0.2.0") - */ -export declare const DeliverableSchema: z.ZodObject<{ - name: z.ZodString; - status: z.ZodEnum<{ - complete: "complete"; - "in-progress": "in-progress"; - pending: "pending"; - deferred: "deferred"; - superseded: "superseded"; - "n/a": "n/a"; - }>; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; -}, z.core.$strict>; -export type Deliverable = z.infer; -/** - * Cross-validation error when code and feature don't match - * - * Reports misalignment between TypeScript code annotations and - * Gherkin feature tags (e.g., phase number mismatch). - */ -export declare const CrossValidationErrorSchema: z.ZodObject<{ - codeName: z.ZodString; - featureName: z.ZodString; - codePhase: z.ZodOptional; - featurePhase: z.ZodNumber; - sources: z.ZodObject<{ - code: z.ZodString; - feature: z.ZodString; - }, z.core.$strict>; - message: z.ZodString; -}, z.core.$strict>; -export type CrossValidationError = z.infer; -/** - * Validation summary from dual-source consistency check - * - * Provides boolean validity flag and categorized errors/warnings. - */ -export declare const ValidationSummarySchema: z.ZodObject<{ - isValid: z.ZodBoolean; - errors: z.ZodReadonly>; - warnings: z.ZodReadonly>; -}, z.core.$strict>; -export type ValidationSummary = z.infer; -//# sourceMappingURL=dual-source.d.ts.map \ No newline at end of file diff --git a/dist/validation-schemas/dual-source.d.ts.map b/dist/validation-schemas/dual-source.d.ts.map deleted file mode 100644 index 2dff40ab..00000000 --- a/dist/validation-schemas/dual-source.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"dual-source.d.ts","sourceRoot":"","sources":["../../src/validation-schemas/dual-source.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAKL,KAAK,cAAc,IAAI,sBAAsB,EAC7C,KAAK,kBAAkB,EACvB,KAAK,SAAS,IAAI,iBAAiB,EACpC,MAAM,sBAAsB,CAAC;AAE9B;;;;;;;;;;GAUG;AACH,eAAO,MAAM,mBAAmB;;;;;EAAgC,CAAC;AACjE,MAAM,MAAM,aAAa,GAAG,kBAAkB,CAAC;AAE/C;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,oBAAoB;;;;EAA2B,CAAC;AAC7D,MAAM,MAAM,cAAc,GAAG,sBAAsB,CAAC;AAEpD;;;;GAIG;AACH,eAAO,MAAM,eAAe;;;;EAAsB,CAAC;AACnD,MAAM,MAAM,SAAS,GAAG,iBAAiB,CAAC;AAE1C;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAmCvB,CAAC;AAEZ,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;kBAenB,CAAC;AAEZ,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;kBAoB5B,CAAC;AAEZ,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E;;;;GAIG;AACH,eAAO,MAAM,uBAAuB;;;;kBASzB,CAAC;AAEZ,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/validation-schemas/dual-source.js b/dist/validation-schemas/dual-source.js deleted file mode 100644 index 832db760..00000000 --- a/dist/validation-schemas/dual-source.js +++ /dev/null @@ -1,168 +0,0 @@ -/** - * @libar-docs - * @libar-docs-validation - * @libar-docs-pattern DualSourceSchemas - * @libar-docs-status completed - * @libar-docs-implements MvpWorkflowImplementation - * @libar-docs-used-by DocExtractor, FeatureParser, CrossValidator - * - * ## DualSourceSchemas - Dual-Source Extraction Type Validation - * - * Zod schemas for dual-source extraction types. - * - * Following the project's schema-first pattern, all dual-source types - * are defined as Zod schemas with TypeScript types inferred from them. - * - * ### When to Use - * - * - When validating process metadata from Gherkin feature tags - * - When validating deliverables from Background tables - * - When performing cross-validation between code and feature files - */ -import { z } from 'zod'; -import { DELIVERABLE_STATUS_VALUES, HIERARCHY_LEVELS, PROCESS_STATUS_VALUES, RISK_LEVELS, } from '../taxonomy/index.js'; -/** - * Process status values from Gherkin @libar-docs-status tag - * - * Per PDR-005 MVP Workflow State Machine: - * - roadmap: Planned work, fully editable - * - active: In progress, scope-locked - * - completed: Done, hard-locked - * - deferred: On hold, fully editable - * - * @see delivery-process/src/taxonomy/status-values.ts - */ -export const ProcessStatusSchema = z.enum(PROCESS_STATUS_VALUES); -/** - * Hierarchy level values from Gherkin @libar-docs-level tag - * - * Three-level hierarchy for organizing work: - * - **epic**: Multi-quarter strategic initiatives - * - **phase**: Standard work units (2-5 days) - * - **task**: Fine-grained session-level work (1-4 hours) - * - * Default is "phase" for backward compatibility with existing feature files. - * - * @see delivery-process/src/taxonomy/hierarchy-levels.ts - */ -export const HierarchyLevelSchema = z.enum(HIERARCHY_LEVELS); -/** - * Risk level values from Gherkin @libar-docs-risk tag - * - * @see delivery-process/src/taxonomy/risk-levels.ts - */ -export const RiskLevelSchema = z.enum(RISK_LEVELS); -/** - * Process metadata from Gherkin feature tags (@libar-docs-*) - * - * Extracted from timeline feature files to provide temporal process data - * (quarter, effort, team, workflow) that complements the timeless pattern - * graph data from TypeScript code annotations. - */ -export const ProcessMetadataSchema = z - .object({ - /** Pattern name (must match code) */ - pattern: z.string().min(1), - /** Phase number (must match code) */ - phase: z.number().int().positive(), - /** Process status */ - status: ProcessStatusSchema, - /** Hierarchy level (default: "phase" for backward compatibility) */ - level: HierarchyLevelSchema.default('phase'), - /** Parent pattern name for hierarchy (from @libar-docs-parent tag) */ - parent: z.string().optional(), - /** Quarter assignment (e.g., "Q1-2025") */ - quarter: z.string().optional(), - /** Effort estimate (e.g., "2w", "4d") */ - effort: z.string().optional(), - /** Team assignment */ - team: z.string().optional(), - /** Delivery workflow */ - workflow: z.string().optional(), - /** Completion date (ISO format) */ - completed: z.string().optional(), - /** Actual effort */ - effortActual: z.string().optional(), - /** Risk level */ - risk: RiskLevelSchema.optional(), - /** Pattern brief path */ - brief: z.string().optional(), - /** Product area for PRD grouping */ - productArea: z.string().optional(), - /** Target user persona */ - userRole: z.string().optional(), - /** Business value statement */ - businessValue: z.string().optional(), -}) - .strict(); -/** - * Deliverable from Gherkin Background table - * - * Parsed from Background section tables with format: - * | Deliverable | Status | Tests | Location | - * - * Optional columns for extended tracking: - * | Deliverable | Status | Tests | Location | Finding | Release | - * - * - **Finding**: Review traceability ID (e.g., "CODE-001") - * - **Release**: Semver version for changelog grouping (e.g., "v0.2.0") - */ -export const DeliverableSchema = z - .object({ - /** Deliverable name/description */ - name: z.string().min(1), - /** Canonical deliverable status (validated against DELIVERABLE_STATUS_VALUES) */ - status: z.enum(DELIVERABLE_STATUS_VALUES), - /** Number of tests */ - tests: z.number().int().nonnegative(), - /** Implementation location */ - location: z.string(), - /** Optional finding ID for review traceability (e.g., "CODE-001", "ARCH-005") */ - finding: z.string().optional(), - /** Optional release version for changelog grouping (e.g., "v0.2.0") */ - release: z.string().optional(), -}) - .strict(); -/** - * Cross-validation error when code and feature don't match - * - * Reports misalignment between TypeScript code annotations and - * Gherkin feature tags (e.g., phase number mismatch). - */ -export const CrossValidationErrorSchema = z - .object({ - /** Pattern name from code */ - codeName: z.string(), - /** Pattern name from feature */ - featureName: z.string(), - /** Phase from code (optional) */ - codePhase: z.number().int().positive().optional(), - /** Phase from feature */ - featurePhase: z.number().int().positive(), - /** Source file paths */ - sources: z - .object({ - code: z.string(), - feature: z.string(), - }) - .strict(), - /** Error description */ - message: z.string(), -}) - .strict(); -/** - * Validation summary from dual-source consistency check - * - * Provides boolean validity flag and categorized errors/warnings. - */ -export const ValidationSummarySchema = z - .object({ - /** True if no errors (warnings don't fail validation) */ - isValid: z.boolean(), - /** Critical errors (phase mismatches, etc.) */ - errors: z.array(z.string()).readonly(), - /** Non-critical warnings (orphaned stubs, etc.) */ - warnings: z.array(z.string()).readonly(), -}) - .strict(); -//# sourceMappingURL=dual-source.js.map \ No newline at end of file diff --git a/dist/validation-schemas/dual-source.js.map b/dist/validation-schemas/dual-source.js.map deleted file mode 100644 index 7d2971d8..00000000 --- a/dist/validation-schemas/dual-source.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"dual-source.js","sourceRoot":"","sources":["../../src/validation-schemas/dual-source.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,yBAAyB,EACzB,gBAAgB,EAChB,qBAAqB,EACrB,WAAW,GAIZ,MAAM,sBAAsB,CAAC;AAE9B;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;AAGjE;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;AAG7D;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;AAGnD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC;KACnC,MAAM,CAAC;IACN,qCAAqC;IACrC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1B,qCAAqC;IACrC,KAAK,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AAO,EAAE,CAAC,CAAC,OAAO,EAAE;IACpB,+CAA+C;IAC/C,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACtC,mDAAmD;IACnD,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CACzC,CAAC;KACD,MAAM,EAAE,CAAC"} \ No newline at end of file diff --git a/dist/validation-schemas/export-info.d.ts b/dist/validation-schemas/export-info.d.ts deleted file mode 100644 index 83d399a5..00000000 --- a/dist/validation-schemas/export-info.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { z } from 'zod'; -/** - * Discriminated union of all export types - * - * **Benefits:** - * - Type narrowing based on 'type' discriminant - * - Compile-time exhaustiveness checking - * - Better error messages from Zod - */ -export declare const ExportInfoSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ - type: z.ZodLiteral<"function">; - name: z.ZodString; - signature: z.ZodOptional; -}, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; -}, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; -}, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; -}, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; -}, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; -}, z.core.$strict>], "type">; -/** - * Type alias inferred from discriminated union schema - * - * **Schema-First Law**: Type automatically derives from Zod schema, - * providing both compile-time and runtime type safety. - */ -export type ExportInfo = z.infer; -/** - * Runtime type guard for ExportInfo - * - * @param value - Value to check - * @returns True if value conforms to ExportInfo schema - * - * @example - * ```typescript - * if (isExportInfo(parsed)) { - * console.log(parsed.name); // Type-safe access - * } - * ``` - */ -export declare function isExportInfo(value: unknown): value is ExportInfo; -//# sourceMappingURL=export-info.d.ts.map \ No newline at end of file diff --git a/dist/validation-schemas/export-info.d.ts.map b/dist/validation-schemas/export-info.d.ts.map deleted file mode 100644 index bb484165..00000000 --- a/dist/validation-schemas/export-info.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"export-info.d.ts","sourceRoot":"","sources":["../../src/validation-schemas/export-info.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA2ExB;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;4BAO3B,CAAC;AAEH;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D;;;;;;;;;;;;GAYG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAEhE"} \ No newline at end of file diff --git a/dist/validation-schemas/export-info.js b/dist/validation-schemas/export-info.js deleted file mode 100644 index 9223b983..00000000 --- a/dist/validation-schemas/export-info.js +++ /dev/null @@ -1,101 +0,0 @@ -import { z } from 'zod'; -/** - * Function export with optional signature - */ -const FunctionExportSchema = z - .object({ - type: z.literal('function'), - name: z.string().min(1, 'Export name cannot be empty'), - signature: z.string().optional(), -}) - .strict(); -/** - * Type alias export (no runtime signature) - * - * **Design Decision**: Types are compile-time only, so signature field - * is omitted entirely rather than marked undefined. - */ -const TypeExportSchema = z - .object({ - type: z.literal('type'), - name: z.string().min(1, 'Export name cannot be empty'), -}) - .strict(); -/** - * Const/variable export with optional signature - */ -const ConstExportSchema = z - .object({ - type: z.literal('const'), - name: z.string().min(1, 'Export name cannot be empty'), - signature: z.string().optional(), -}) - .strict(); -/** - * Interface export (no runtime signature) - * - * **Design Decision**: Interfaces are compile-time only, so signature field - * is omitted entirely rather than marked undefined. - */ -const InterfaceExportSchema = z - .object({ - type: z.literal('interface'), - name: z.string().min(1, 'Export name cannot be empty'), -}) - .strict(); -/** - * Class export with optional signature - */ -const ClassExportSchema = z - .object({ - type: z.literal('class'), - name: z.string().min(1, 'Export name cannot be empty'), - signature: z.string().optional(), -}) - .strict(); -/** - * Enum export (runtime values with compile-time type) - * - * **Design Decision**: Enums are a first-class export type separate from const, - * preserving semantic fidelity. Enums have both runtime values and compile-time - * type information, unlike type aliases or interfaces. - */ -const EnumExportSchema = z - .object({ - type: z.literal('enum'), - name: z.string().min(1, 'Export name cannot be empty'), -}) - .strict(); -/** - * Discriminated union of all export types - * - * **Benefits:** - * - Type narrowing based on 'type' discriminant - * - Compile-time exhaustiveness checking - * - Better error messages from Zod - */ -export const ExportInfoSchema = z.discriminatedUnion('type', [ - FunctionExportSchema, - TypeExportSchema, - ConstExportSchema, - InterfaceExportSchema, - ClassExportSchema, - EnumExportSchema, -]); -/** - * Runtime type guard for ExportInfo - * - * @param value - Value to check - * @returns True if value conforms to ExportInfo schema - * - * @example - * ```typescript - * if (isExportInfo(parsed)) { - * console.log(parsed.name); // Type-safe access - * } - * ``` - */ -export function isExportInfo(value) { - return ExportInfoSchema.safeParse(value).success; -} -//# sourceMappingURL=export-info.js.map \ No newline at end of file diff --git a/dist/validation-schemas/export-info.js.map b/dist/validation-schemas/export-info.js.map deleted file mode 100644 index 5647b3a9..00000000 --- a/dist/validation-schemas/export-info.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"export-info.js","sourceRoot":"","sources":["../../src/validation-schemas/export-info.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,MAAM,oBAAoB,GAAG,CAAC;KAC3B,MAAM,CAAC;IACN,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;IAC3B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,6BAA6B,CAAC;IACtD,SAAS,EAAE,CAA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,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;IACvB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,6BAA6B,CAAC;CACvD,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IAC3D,oBAAoB;IACpB,gBAAgB;IAChB,iBAAiB;IACjB,qBAAqB;IACrB,iBAAiB;IACjB,gBAAgB;CACjB,CAAC,CAAC;AAUH;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,YAAY,CAAC,KAAc;IACzC,OAAO,gBAAgB,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;AACnD,CAAC"} \ No newline at end of file diff --git a/dist/validation-schemas/extracted-pattern.d.ts b/dist/validation-schemas/extracted-pattern.d.ts deleted file mode 100644 index 89a9c350..00000000 --- a/dist/validation-schemas/extracted-pattern.d.ts +++ /dev/null @@ -1,324 +0,0 @@ -/** - * @libar-docs - * @libar-docs-validation - * @libar-docs-pattern ExtractedPatternSchema - * @libar-docs-status completed - * @libar-docs-uses DocDirectiveSchema - * @libar-docs-used-by Generators, SectionRenderers - * - * ## ExtractedPatternSchema - Complete Pattern Validation - * - * Zod schema for validating complete extracted patterns with code, - * metadata, relationships, and source information. - * - * ### When to Use - * - * - Use when validating extracted patterns from the extractor - * - Use when serializing/deserializing pattern data - */ -import { z } from 'zod'; -/** - * Business rule extracted from Gherkin Rule: keyword - * - * This is the canonical definition used by: - * - ExtractedPatternSchema.rules (this file) - * - helpers.ts (rich content rendering) - * - adr.ts (ADR document codec) - * - * Rules group scenarios under business rule statements with rich descriptions. - * Used for PRD generation where business rules are more relevant than test scenarios. - */ -export declare const BusinessRuleSchema: z.ZodObject<{ - name: z.ZodString; - description: z.ZodString; - scenarioCount: z.ZodNumber; - scenarioNames: z.ZodReadonly>; -}, z.core.$strip>; -/** - * Business rule type inferred from schema - * - * **Schema-First Law**: Type automatically derives from Zod schema. - */ -export type BusinessRule = z.infer; -/** - * Source information schema - */ -export declare const SourceInfoSchema: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; -}, z.core.$strict>; -export type SourceInfo = z.infer; -/** - * Complete extracted pattern with code and metadata - * - * Schema enforces: - * - Valid pattern ID format (pattern-{8-char-hex}) - * - Non-empty name and code - * - Normalized category names - * - Valid TypeScript source file - * - ISO 8601 timestamp - * - Strict mode to prevent extra fields - */ -export declare const ExtractedPatternSchema: z.ZodObject<{ - id: z.ZodPipe>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; -}, z.core.$strict>; -/** - * Type alias inferred from schema - * - * **Schema-First Law**: Type automatically derives from Zod schema. - */ -export type ExtractedPattern = z.infer; -/** - * Runtime type guard for ExtractedPattern - * - * @param value - Value to check - * @returns True if value conforms to ExtractedPattern schema - * - * @example - * ```typescript - * if (isExtractedPattern(parsed)) { - * console.log(parsed.id); // Type-safe access - * } - * ``` - */ -export declare function isExtractedPattern(value: unknown): value is ExtractedPattern; -//# sourceMappingURL=extracted-pattern.d.ts.map \ No newline at end of file diff --git a/dist/validation-schemas/extracted-pattern.d.ts.map b/dist/validation-schemas/extracted-pattern.d.ts.map deleted file mode 100644 index c07ffb14..00000000 --- a/dist/validation-schemas/extracted-pattern.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"extracted-pattern.d.ts","sourceRoot":"","sources":["../../src/validation-schemas/extracted-pattern.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAcxB;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB;;;;;iBAS7B,CAAC;AAEH;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAwC9D;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;kBAgBlB,CAAC;AAEZ,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAwXxB,CAAC;AAEZ;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,gBAAgB,CAE5E"} \ No newline at end of file diff --git a/dist/validation-schemas/extracted-pattern.js b/dist/validation-schemas/extracted-pattern.js deleted file mode 100644 index 5cd2652b..00000000 --- a/dist/validation-schemas/extracted-pattern.js +++ /dev/null @@ -1,438 +0,0 @@ -/** - * @libar-docs - * @libar-docs-validation - * @libar-docs-pattern ExtractedPatternSchema - * @libar-docs-status completed - * @libar-docs-uses DocDirectiveSchema - * @libar-docs-used-by Generators, SectionRenderers - * - * ## ExtractedPatternSchema - Complete Pattern Validation - * - * Zod schema for validating complete extracted patterns with code, - * metadata, relationships, and source information. - * - * ### When to Use - * - * - Use when validating extracted patterns from the extractor - * - Use when serializing/deserializing pattern data - */ -import { z } from 'zod'; -import { asPatternId, asCategoryName, asSourceFilePath } from '../types/branded.js'; -import { DocDirectiveSchema, PatternStatusSchema } from './doc-directive.js'; -import { ExportInfoSchema } from './export-info.js'; -import { ScenarioRefSchema } from './scenario-ref.js'; -import { DeliverableSchema, HierarchyLevelSchema } from './dual-source.js'; -import { ExtractedShapeSchema } from './extracted-shape.js'; -import { slugify } from '../utils/string-utils.js'; -import { ADR_STATUS_VALUES } from '../taxonomy/index.js'; -// ═══════════════════════════════════════════════════════════════════════════ -// Business Rule Schema (Shared Type) -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Business rule extracted from Gherkin Rule: keyword - * - * This is the canonical definition used by: - * - ExtractedPatternSchema.rules (this file) - * - helpers.ts (rich content rendering) - * - adr.ts (ADR document codec) - * - * Rules group scenarios under business rule statements with rich descriptions. - * Used for PRD generation where business rules are more relevant than test scenarios. - */ -export const BusinessRuleSchema = z.object({ - /** Business rule statement */ - name: z.string(), - /** Rule description with context, rationale, etc. */ - description: z.string(), - /** Number of scenarios that verify this rule */ - scenarioCount: z.number().int().nonnegative(), - /** Scenario names under this rule */ - scenarioNames: z.array(z.string()).readonly(), -}); -/** - * Pattern ID validation with format enforcement - * Format: pattern-{8-char-hex} - */ -const PatternIdSchema = z - .string() - .regex(/^pattern-[a-f0-9]{8}$/, 'Pattern ID must match format: pattern-{8-char-hex}') - .transform((id) => asPatternId(id)); -/** - * Category name validation and normalization - * Automatically lowercases and normalizes category names - */ -const CategoryNameSchema = z - .string() - .min(1, 'Category name cannot be empty') - .transform((name) => name.toLowerCase()) - .refine((name) => /^[a-z0-9-]+$/.test(name), { - message: 'Category must contain only lowercase letters, numbers, and hyphens', -}) - .transform((name) => asCategoryName(name)); -/** - * Source file path validation - * Must be a TypeScript or Gherkin feature file - */ -const SourceFilePathSchema = z - .string() - .min(1, 'File path cannot be empty') - .refine((path) => path.endsWith('.ts') || path.endsWith('.feature') || path.endsWith('.feature.md'), { - message: 'Source file must be a TypeScript file (.ts) or Gherkin feature file (.feature or .feature.md)', -}) - .transform((path) => asSourceFilePath(path)); -/** - * Source information schema - */ -export const SourceInfoSchema = z - .object({ - /** Relative file path */ - file: SourceFilePathSchema, - /** Line range [startLine, endLine] */ - lines: z - .tuple([ - z.number().int().positive('Start line must be positive'), - z.number().int().positive('End line must be positive'), - ]) - .refine(([start, end]) => end >= start, { - message: 'End line must be >= start line', - }) - .readonly(), -}) - .strict(); -/** - * Complete extracted pattern with code and metadata - * - * Schema enforces: - * - Valid pattern ID format (pattern-{8-char-hex}) - * - Non-empty name and code - * - Normalized category names - * - Valid TypeScript source file - * - ISO 8601 timestamp - * - Strict mode to prevent extra fields - */ -export const ExtractedPatternSchema = z - .object({ - /** Unique identifier for this pattern */ - id: PatternIdSchema, - /** Pattern name (inferred from description or code) */ - name: z - .string() - .min(1, 'Pattern name cannot be empty') - .refine((name) => slugify(name).length > 0, { - message: 'Pattern name must produce a non-empty slug (at least one alphanumeric character)', - }), - /** Category inferred from tags (normalized to lowercase) */ - category: CategoryNameSchema, - /** Parsed directive information */ - directive: DocDirectiveSchema, - /** Extracted code snippet (empty string allowed for Gherkin-sourced patterns) */ - code: z.string(), - /** Source file information */ - source: SourceInfoSchema, - /** Exported symbols from this code block */ - exports: z.array(ExportInfoSchema).readonly().default([]), - /** Timestamp of extraction (ISO 8601 format) */ - extractedAt: z.iso.datetime({ error: 'Must be valid ISO 8601 timestamp' }), - /** Explicit pattern name from @libar-docs-pattern tag (overrides inferred name) */ - patternName: z.string().optional(), - /** Implementation status from @libar-docs-status tag */ - status: PatternStatusSchema.optional(), - /** Whether this is a core/essential pattern from @libar-docs-core tag */ - isCore: z.boolean().optional(), - /** Use cases this pattern applies to from @libar-docs-usecase tags */ - useCases: z.array(z.string()).readonly().optional(), - /** "When to use" bullet points extracted from description */ - whenToUse: z.array(z.string()).readonly().optional(), - /** Patterns this pattern uses (from @libar-docs-uses tag) */ - uses: z.array(z.string()).readonly().optional(), - /** Patterns that use this pattern (from @libar-docs-used-by tag) */ - usedBy: z.array(z.string()).readonly().optional(), - /** Related Gherkin scenarios from @pattern:* tags in feature files */ - scenarios: z.array(ScenarioRefSchema).readonly().optional(), - /** Roadmap phase number (from @libar-docs-phase tag) */ - phase: z.number().int().positive().optional(), - /** Release version (from @libar-docs-release tag, e.g., "v0.1.0" or "vNEXT") */ - release: z.string().optional(), - /** Path to pattern brief markdown file (from @libar-docs-brief tag) */ - brief: z.string().optional(), - /** Patterns this pattern depends on for roadmap planning (from @libar-docs-depends-on tag) */ - dependsOn: z.array(z.string()).readonly().optional(), - /** Patterns this pattern enables/unlocks (from @libar-docs-enables tag) */ - enables: z.array(z.string()).readonly().optional(), - /** Patterns this code implements (realization relationship from @libar-docs-implements) */ - implementsPatterns: z.array(z.string()).readonly().optional(), - /** Pattern this extends (generalization relationship from @libar-docs-extends) */ - extendsPattern: z.string().optional(), - /** Target implementation path for stub files (from @libar-docs-target tag) */ - targetPath: z.string().optional(), - /** Design session that created this pattern (from @libar-docs-since tag) */ - since: z.string().optional(), - /** Convention domains for reference document generation (from @libar-docs-convention CSV tag) */ - convention: z.array(z.string()).readonly().optional(), - /** Related patterns for cross-reference without dependency (from @libar-docs-see-also tag) */ - seeAlso: z.array(z.string()).readonly().optional(), - /** File paths to implementation APIs (from @libar-docs-api-ref tag) */ - apiRef: z.array(z.string()).readonly().optional(), - // Process metadata from Gherkin @libar-docs-* tags - /** Quarter assignment (from @libar-docs-quarter tag, e.g., "Q1-2025") */ - quarter: z.string().optional(), - /** Completion date (from @libar-docs-completed tag, ISO format) */ - completed: z.string().optional(), - /** Effort estimate (from @libar-docs-effort tag, e.g., "2w", "4d") */ - effort: z.string().optional(), - /** Team assignment (from @libar-docs-team tag) */ - team: z.string().optional(), - /** Product area for PRD grouping (from @libar-docs-product-area tag) */ - productArea: z.string().optional(), - /** Target user persona (from @libar-docs-user-role tag) */ - userRole: z.string().optional(), - /** Business value statement (from @libar-docs-business-value tag) */ - businessValue: z.string().optional(), - /** - * Deliverables from Gherkin Background tables - * - * Extracted from feature files with Background: Deliverables sections. - * Each deliverable tracks a concrete output with its status and location. - * Uses the canonical DeliverableSchema from dual-source.ts for type consistency. - */ - deliverables: z.array(DeliverableSchema).readonly().optional(), - /** Workflow type for process tracking (from @libar-docs-workflow tag) */ - workflow: z.string().optional(), - /** Risk level for process tracking (from @libar-docs-risk tag) */ - risk: z.string().optional(), - /** Priority level for process tracking (from @libar-docs-priority tag) */ - priority: z.string().optional(), - // NOTE: Release version is tracked at BOTH pattern level (above) AND deliverable level - // (in DeliverableSchema). Pattern-level tracks the pattern's release association, - // while deliverable-level tracks individual deliverables within a pattern. - // Hierarchy support for multi-level organization (epic/phase/task) - /** - * Hierarchy level for this pattern (from @libar-docs-level tag) - * - * Three-level hierarchy: - * - **epic**: Multi-quarter strategic initiatives - * - **phase**: Standard work units (2-5 days) - DEFAULT - * - **task**: Fine-grained session-level work (1-4 hours) - * - * Defaults to "phase" for backward compatibility with existing feature files. - */ - level: HierarchyLevelSchema.optional(), - /** - * Parent pattern name for hierarchy navigation (from @libar-docs-parent tag) - * - * Links this pattern to its parent in the hierarchy, enabling: - * - Epic → Phase → Task navigation - * - Progress aggregation from children to parents - * - Breadcrumb display in session context - */ - parent: z.string().optional(), - /** - * Child pattern names (computed from parent references) - * - * Auto-populated by the extractor from patterns that reference this one - * via their @libar-docs-parent tag. Not set directly in feature files. - */ - children: z.array(z.string()).readonly().optional(), - // Discovery findings from Gherkin @libar-docs-discovered-* tags (Retrospective phase) - /** - * Gaps identified during implementation (from @libar-docs-discovered-gap tags) - * Missing features or capabilities that were not anticipated. - */ - discoveredGaps: z.array(z.string()).readonly().optional(), - /** - * Improvements identified during implementation (from @libar-docs-discovered-improvement tags) - * Better approaches or optimizations discovered while working. - */ - discoveredImprovements: z.array(z.string()).readonly().optional(), - /** - * Risks identified during implementation (from @libar-docs-discovered-risk tags) - * Technical debt, architectural concerns, or potential issues discovered. - */ - discoveredRisks: z.array(z.string()).readonly().optional(), - /** - * Learnings captured during implementation (from @libar-docs-discovered-learning tags) - * Key insights, patterns, or institutional knowledge gained. - */ - discoveredLearnings: z.array(z.string()).readonly().optional(), - /** - * Technical constraints affecting feature implementation (from @libar-docs-constraint tags) - * Documents requirements, assumptions, and boundaries for implementation. - */ - constraints: z.array(z.string()).readonly().optional(), - // ADR (Architecture Decision Record) fields from @libar-docs-adr-* tags - /** - * ADR number (from @libar-docs-adr tag, e.g., "001", "002") - * Used to identify and reference architecture decisions. - */ - adr: z.string().optional(), - /** - * ADR decision status (from @libar-docs-adr-status tag) - * Tracks the lifecycle of architecture decisions (from taxonomy). - */ - adrStatus: z.enum(ADR_STATUS_VALUES).optional(), - /** - * ADR category (from @libar-docs-adr-category tag) - * Groups decisions by domain (architecture, process, testing, tooling). - */ - adrCategory: z.string().optional(), - /** - * ADR number this decision supersedes (from @libar-docs-adr-supersedes tag) - * Links to the previous decision being replaced. - */ - adrSupersedes: z.string().optional(), - /** - * ADR number that supersedes this decision (from @libar-docs-adr-superseded-by tag) - * Links to the newer decision that replaces this one. - */ - adrSupersededBy: z.string().optional(), - // NOTE: ADR content (context, decision, consequences) is now derived from - // Gherkin Rule: keywords instead of parsed markdown in description. - // Rules named "Context - ...", "Decision - ...", "Consequences - ..." are - // semantically detected and rendered by the ADR codec. - // Display and traceability fields (from @libar-docs-title, @libar-docs-behavior-file) - /** - * Explicit human-readable title for display (from @libar-docs-title tag) - * - * Overrides the auto-transformation of CamelCase patternName. - * Use for edge cases like "OAuth 2.0 Integration" where auto-transform - * would produce "OAuth2 Integration". - * - * @example - * ```gherkin - * @libar-docs-title:"OAuth 2.0 Integration" - * ``` - */ - title: z.string().optional(), - /** - * Path to corresponding behavior feature file (from @libar-docs-behavior-file tag) - * - * Enables traceability from timeline phases to their behavioral tests. - * If not specified, convention-based matching is used: - * `timeline/phase-37-name.feature` → `behavior/name.feature` - * - * @example - * ```gherkin - * @libar-docs-behavior-file:tests/features/behavior/remaining-work-enhancement.feature - * ``` - */ - behaviorFile: z.string().optional(), - /** - * Whether the behavior file has been verified to exist on disk - * - * Set during extraction when inferring behavior file from convention: - * - `true` = file was found at inferred path - * - `false` = file not found at inferred path - * - `undefined` = explicit @libar-docs-behavior-file tag used (trust it) - * - * Used by TraceabilitySection to determine coverage without filesystem access. - */ - behaviorFileVerified: z.boolean().optional(), - /** - * Business rules from Gherkin Rule: keyword (Gherkin v6+) - * - * Rules group scenarios under business rule statements with rich descriptions. - * Used for PRD generation where business rules are more relevant than test scenarios. - * - * Each rule contains: - * - name: The business rule statement (e.g., "Tag registry must define all new metadata tags") - * - description: Context, rationale, exceptions, and see-also references - * - scenarioCount: Number of scenarios that verify this rule - * - * @example - * ```gherkin - * Rule: Tag registry must define all new metadata tags - * - * The tag registry is the single source of truth for all process metadata. - * - * # RATIONALE: Centralized tag definitions prevent inconsistent usage - * - * @acceptance-criteria - * Scenario: New tags are defined in tag registry - * Given... - * ``` - */ - rules: z.array(BusinessRuleSchema).readonly().optional(), - // Architecture diagram generation fields (from @libar-docs-arch-* tags) - /** - * Architectural role for diagram generation (from @libar-docs-arch-role tag) - * - * Identifies the component type for architecture diagram visualization: - * - bounded-context: Physical BC isolation (Convex component) - * - command-handler: Handles commands within a BC - * - projection: Read model updater - * - saga: Cross-BC workflow coordinator - * - process-manager: Event-driven coordinator - * - infrastructure: Cross-cutting infrastructure - * - repository: CMS state loader - * - decider: Pure business logic - * - read-model: Query-side table/view - * - service: Application service (orchestration, coordination) - */ - archRole: z - .enum([ - 'bounded-context', - 'command-handler', - 'projection', - 'saga', - 'process-manager', - 'infrastructure', - 'repository', - 'decider', - 'read-model', - 'service', - ]) - .optional(), - /** - * Bounded context this component belongs to (from @libar-docs-arch-context tag) - * - * Used for grouping components into Mermaid subgraphs by BC. - * Components without arch-context are rendered at the top level (shared infrastructure). - * - * @example "@libar-docs-arch-context orders" - */ - archContext: z.string().optional(), - /** - * Architectural layer (from @libar-docs-arch-layer tag) - * - * Identifies which layer in a layered architecture diagram: - * - domain: Pure business logic (deciders, value objects) - * - application: Application services, handlers, projections - * - infrastructure: External interfaces, persistence, messaging - */ - archLayer: z.enum(['domain', 'application', 'infrastructure']).optional(), - /** Cross-cutting document inclusion for content routing and diagram scoping (from @libar-docs-include CSV tag) */ - include: z.array(z.string().min(1)).readonly().optional(), - // Shape extraction for documentation generation (ADR-021) - /** - * TypeScript shapes extracted via @libar-docs-extract-shapes tag - * - * Contains interfaces, type aliases, enums, and function signatures - * extracted from the source file for documentation generation. - * Shapes appear in the order specified in the tag. - * - * @example - * ```typescript - * // @libar-docs-extract-shapes DeciderInput, ValidationResult - * // Results in extractedShapes containing both shapes in that order - * ``` - */ - extractedShapes: z.array(ExtractedShapeSchema).readonly().optional(), -}) - .strict(); -/** - * Runtime type guard for ExtractedPattern - * - * @param value - Value to check - * @returns True if value conforms to ExtractedPattern schema - * - * @example - * ```typescript - * if (isExtractedPattern(parsed)) { - * console.log(parsed.id); // Type-safe access - * } - * ``` - */ -export function isExtractedPattern(value) { - return ExtractedPatternSchema.safeParse(value).success; -} -//# sourceMappingURL=extracted-pattern.js.map \ No newline at end of file diff --git a/dist/validation-schemas/extracted-pattern.js.map b/dist/validation-schemas/extracted-pattern.js.map deleted file mode 100644 index b8642e02..00000000 --- a/dist/validation-schemas/extracted-pattern.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"extracted-pattern.js","sourceRoot":"","sources":["../../src/validation-schemas/extracted-pattern.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;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CAAC,QAAQ,EAAE;IAEzD,0DAA0D;IAE1D;;;;;;;;;;;;OAYG;IACH,eAAe,EAAE,CAAC,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CACrE,CAAC;KACD,MAAM,EAAE,CAAC;AASZ;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAc;IAC/C,OAAO,sBAAsB,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;AACzD,CAAC"} \ No newline at end of file diff --git a/dist/validation-schemas/extracted-shape.d.ts b/dist/validation-schemas/extracted-shape.d.ts deleted file mode 100644 index 18ba69d8..00000000 --- a/dist/validation-schemas/extracted-shape.d.ts +++ /dev/null @@ -1,200 +0,0 @@ -/** - * @libar-docs - * @libar-docs-pattern ExtractedShapeSchema - * @libar-docs-status completed - * @libar-docs-implements ShapeExtraction - * - * ## ExtractedShape Schema - * - * Zod schema for TypeScript type definitions extracted from source files - * via the @libar-docs-extract-shapes tag. - * - * ### When to Use - * - * - When validating shapes extracted by the shape extractor - * - When serializing/deserializing shape data for documentation generation - * - When rendering API types in documentation codecs - */ -import { z } from 'zod'; -/** - * Kind of TypeScript construct that was extracted. - */ -export declare const ShapeKindSchema: z.ZodEnum<{ - function: "function"; - interface: "interface"; - type: "type"; - enum: "enum"; - const: "const"; -}>; -export type ShapeKind = z.infer; -/** - * JSDoc documentation for an interface property. - * - * Used to capture property-level documentation from interfaces, - * enabling generation of description tables alongside code blocks. - */ -export declare const PropertyDocSchema: z.ZodObject<{ - name: z.ZodString; - jsDoc: z.ZodString; -}, z.core.$strip>; -export type PropertyDoc = z.infer; -/** - * JSDoc @param tag documentation for a function parameter. - */ -export declare const ParamDocSchema: z.ZodObject<{ - name: z.ZodString; - type: z.ZodOptional; - description: z.ZodString; -}, z.core.$strip>; -export type ParamDoc = z.infer; -/** - * JSDoc @returns tag documentation. - */ -export declare const ReturnsDocSchema: z.ZodObject<{ - type: z.ZodOptional; - description: z.ZodString; -}, z.core.$strip>; -export type ReturnsDoc = z.infer; -/** - * JSDoc @throws tag documentation. - */ -export declare const ThrowsDocSchema: z.ZodObject<{ - type: z.ZodOptional; - description: z.ZodString; -}, z.core.$strip>; -export type ThrowsDoc = z.infer; -/** - * A single extracted shape from TypeScript source. - * - * Represents an interface, type alias, enum, function signature, or const - * that was extracted via @libar-docs-extract-shapes for documentation. - */ -export declare const ExtractedShapeSchema: z.ZodObject<{ - name: z.ZodString; - kind: z.ZodEnum<{ - function: "function"; - interface: "interface"; - type: "type"; - enum: "enum"; - const: "const"; - }>; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; -}, z.core.$strip>; -/** - * Type alias inferred from schema. - * - * **Schema-First Law**: Type automatically derives from Zod schema. - */ -export type ExtractedShape = z.infer; -/** - * Information about a shape that was re-exported from another file. - * - * Re-exports are treated like imports - not extracted, but tracked - * so we can provide helpful warnings with source module info. - */ -export declare const ReExportedShapeSchema: z.ZodObject<{ - name: z.ZodString; - sourceModule: z.ZodString; - typeOnly: z.ZodDefault; -}, z.core.$strip>; -export type ReExportedShape = z.infer; -/** - * Result of shape extraction from a file. - */ -export declare const ShapeExtractionResultSchema: z.ZodObject<{ - shapes: z.ZodReadonly; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>; - notFound: z.ZodReadonly>; - imported: z.ZodReadonly>; - reExported: z.ZodReadonly; - }, z.core.$strip>>>; - warnings: z.ZodReadonly>; -}, z.core.$strip>; -export type ShapeExtractionResult = z.infer; -/** - * Options for shape extraction. - */ -export declare const ShapeExtractionOptionsSchema: z.ZodObject<{ - includeJsDoc: z.ZodDefault; - functionDetail: z.ZodDefault>; - preserveFormatting: z.ZodDefault; - jsx: z.ZodDefault; -}, z.core.$strip>; -/** Output type with all defaults applied */ -export type ShapeExtractionOptions = z.infer; -/** Input type for function parameters (all fields optional with defaults) */ -export type ShapeExtractionOptionsInput = z.input; -/** - * Runtime type guard for ExtractedShape - */ -export declare function isExtractedShape(value: unknown): value is ExtractedShape; -/** - * Runtime type guard for ShapeExtractionResult - */ -export declare function isShapeExtractionResult(value: unknown): value is ShapeExtractionResult; -//# sourceMappingURL=extracted-shape.d.ts.map \ No newline at end of file diff --git a/dist/validation-schemas/extracted-shape.d.ts.map b/dist/validation-schemas/extracted-shape.d.ts.map deleted file mode 100644 index 9f8d61c7..00000000 --- a/dist/validation-schemas/extracted-shape.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"extracted-shape.d.ts","sourceRoot":"","sources":["../../src/validation-schemas/extracted-shape.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;EAA6D,CAAC;AAE1F,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAMxD;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB;;;iBAM5B,CA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,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAMvF;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,cAAc,CAExE;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,qBAAqB,CAEtF"} \ No newline at end of file diff --git a/dist/validation-schemas/extracted-shape.js b/dist/validation-schemas/extracted-shape.js deleted file mode 100644 index cf65f23b..00000000 --- a/dist/validation-schemas/extracted-shape.js +++ /dev/null @@ -1,182 +0,0 @@ -/** - * @libar-docs - * @libar-docs-pattern ExtractedShapeSchema - * @libar-docs-status completed - * @libar-docs-implements ShapeExtraction - * - * ## ExtractedShape Schema - * - * Zod schema for TypeScript type definitions extracted from source files - * via the @libar-docs-extract-shapes tag. - * - * ### When to Use - * - * - When validating shapes extracted by the shape extractor - * - When serializing/deserializing shape data for documentation generation - * - When rendering API types in documentation codecs - */ -import { z } from 'zod'; -// ============================================================================= -// Shape Kind Enum -// ============================================================================= -/** - * Kind of TypeScript construct that was extracted. - */ -export const ShapeKindSchema = z.enum(['interface', 'type', 'enum', 'function', 'const']); -// ============================================================================= -// Property Documentation Schema -// ============================================================================= -/** - * JSDoc documentation for an interface property. - * - * Used to capture property-level documentation from interfaces, - * enabling generation of description tables alongside code blocks. - */ -export const PropertyDocSchema = z.object({ - /** Property name */ - name: z.string(), - /** JSDoc comment text (without delimiters) */ - jsDoc: z.string(), -}); -// ============================================================================= -// JSDoc Tag Documentation Schemas (DD-3) -// ============================================================================= -/** - * JSDoc @param tag documentation for a function parameter. - */ -export const ParamDocSchema = z.object({ - /** Parameter name */ - name: z.string(), - /** Type annotation from JSDoc {Type} syntax (optional in TypeScript) */ - type: z.string().optional(), - /** Parameter description */ - description: z.string(), -}); -/** - * JSDoc @returns tag documentation. - */ -export const ReturnsDocSchema = z.object({ - /** Return type from JSDoc {Type} syntax (optional in TypeScript) */ - type: z.string().optional(), - /** Return value description */ - description: z.string(), -}); -/** - * JSDoc @throws tag documentation. - */ -export const ThrowsDocSchema = z.object({ - /** Exception type from JSDoc {Type} syntax */ - type: z.string().optional(), - /** Description of when this exception is thrown */ - description: z.string(), -}); -// ============================================================================= -// Extracted Shape Schema -// ============================================================================= -/** - * A single extracted shape from TypeScript source. - * - * Represents an interface, type alias, enum, function signature, or const - * that was extracted via @libar-docs-extract-shapes for documentation. - */ -export const ExtractedShapeSchema = z.object({ - /** Shape name (interface/type/enum/function name) */ - name: z.string().min(1, 'Shape name cannot be empty'), - /** Kind of TypeScript construct */ - kind: ShapeKindSchema, - /** Extracted source text (exact from file) */ - sourceText: z.string(), - /** JSDoc comment above the shape, if present */ - jsDoc: z.string().optional(), - /** Line number in source file */ - lineNumber: z.number().int().positive(), - /** Generic type parameters, if any (e.g., ["T", "E = Error"]) */ - typeParameters: z.array(z.string()).readonly().optional(), - /** For interfaces: what it extends (e.g., ["BaseConfig", "Serializable"]) */ - extends: z.array(z.string()).readonly().optional(), - /** For functions: overload signatures (excludes implementation signature) */ - overloads: z.array(z.string()).readonly().optional(), - /** Whether this is an exported shape */ - exported: z.boolean().default(true), - /** DD-5: Optional group name from @libar-docs-shape tag value */ - group: z.string().optional(), - /** DD-3: Cross-cutting document inclusion tags from @libar-docs-include CSV */ - includes: z.array(z.string().min(1)).readonly().optional(), - /** For interfaces: JSDoc documentation for each property */ - propertyDocs: z.array(PropertyDocSchema).readonly().optional(), - /** DD-3: For functions: documented @param tags from JSDoc */ - params: z.array(ParamDocSchema).readonly().optional(), - /** DD-3: For functions: documented @returns tag from JSDoc */ - returns: ReturnsDocSchema.optional(), - /** DD-3: For functions: documented @throws tags from JSDoc */ - throws: z.array(ThrowsDocSchema).readonly().optional(), -}); -// ============================================================================= -// Re-exported Shape Schema -// ============================================================================= -/** - * Information about a shape that was re-exported from another file. - * - * Re-exports are treated like imports - not extracted, but tracked - * so we can provide helpful warnings with source module info. - */ -export const ReExportedShapeSchema = z.object({ - /** The shape name that was re-exported */ - name: z.string(), - /** The source module path (e.g., './types.js') */ - sourceModule: z.string(), - /** Whether it's a type-only re-export (export type { ... }) */ - typeOnly: z.boolean().default(false), -}); -// ============================================================================= -// Shape Extraction Result Schema -// ============================================================================= -/** - * Result of shape extraction from a file. - */ -export const ShapeExtractionResultSchema = z.object({ - /** Successfully extracted shapes, in requested order */ - shapes: z.array(ExtractedShapeSchema).readonly(), - /** Shape names that were requested but not found */ - notFound: z.array(z.string()).readonly(), - /** Shape names that exist but are imports (not defined in file) */ - imported: z.array(z.string()).readonly(), - /** Shape names that are re-exported from other files */ - reExported: z.array(ReExportedShapeSchema).readonly(), - /** Any warnings generated during extraction */ - warnings: z.array(z.string()).readonly(), -}); -// ============================================================================= -// Shape Extraction Options Schema -// ============================================================================= -/** - * Options for shape extraction. - */ -export const ShapeExtractionOptionsSchema = z.object({ - /** Include JSDoc comments in extraction (default: true) */ - includeJsDoc: z.boolean().default(true), - /** For functions, include full signature or just name+params (default: 'signature') */ - functionDetail: z.enum(['signature', 'name-only']).default('signature'), - /** Preserve original formatting vs normalize (default: true) */ - preserveFormatting: z.boolean().default(true), - /** Enable JSX parsing — only for .tsx files (default: false). - * Enabling for .ts files causes generic arrows like `(v: T)` to be - * mis-parsed as JSX elements. */ - jsx: z.boolean().default(false), -}); -// ============================================================================= -// Type Guards -// ============================================================================= -/** - * Runtime type guard for ExtractedShape - */ -export function isExtractedShape(value) { - return ExtractedShapeSchema.safeParse(value).success; -} -/** - * Runtime type guard for ShapeExtractionResult - */ -export function isShapeExtractionResult(value) { - return ShapeExtractionResultSchema.safeParse(value).success; -} -//# sourceMappingURL=extracted-shape.js.map \ No newline at end of file diff --git a/dist/validation-schemas/extracted-shape.js.map b/dist/validation-schemas/extracted-shape.js.map deleted file mode 100644 index f1b37793..00000000 --- a/dist/validation-schemas/extracted-shape.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"extracted-shape.js","sourceRoot":"","sources":["../../src/validation-schemas/extracted-sh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C,QAAQ,EAAE;IAExC,wDAAwD;IACxD,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,QAAQ,EAAE;IAErD,+CAA+C;IAC/C,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CACzC,CAAC,CAAC;AAIH,gFAAgF;AAChF,kCAAkC;AAClC,gFAAgF;AAEhF;;GAEG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,CAAC;IACnD,2DAA2D;IAC3D,YAAY,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IAEvC,uFAAuF;IACvF,cAAc,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC;IAEvE,gEAAgE;IAChE,kBAAkB,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IAE7C;;sCAEkC;IAClC,GAAG,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;CAChC,CAAC,CAAC;AAQH,gFAAgF;AAChF,cAAc;AACd,gFAAgF;AAEhF;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAc;IAC7C,OAAO,oBAAoB,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;AACvD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,uBAAuB,CAAC,KAAc;IACpD,OAAO,2BAA2B,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;AAC9D,CAAC"} \ No newline at end of file diff --git a/dist/validation-schemas/feature.d.ts b/dist/validation-schemas/feature.d.ts deleted file mode 100644 index e754fe0b..00000000 --- a/dist/validation-schemas/feature.d.ts +++ /dev/null @@ -1,554 +0,0 @@ -import { z } from 'zod'; -/** - * A row in a Gherkin DataTable - maps column headers to cell values - */ -export type GherkinDataTableRow = Readonly>; -/** - * Schema for a Gherkin DataTable attached to a step - * - * DataTables provide structured data for steps, commonly used for: - * - Deliverables lists in Background sections - * - Test data for scenarios - * - Configuration parameters - */ -export declare const GherkinDataTableSchema: z.ZodObject<{ - headers: z.ZodReadonly>; - rows: z.ZodReadonly>>; -}, z.core.$strict>; -/** - * Schema for a DocString attached to a step - * - * DocStrings can have an optional mediaType that specifies the content language - * (e.g., "typescript", "json", "jsdoc") for proper syntax highlighting. - */ -export declare const GherkinDocStringSchema: z.ZodObject<{ - content: z.ZodString; - mediaType: z.ZodOptional; -}, z.core.$strict>; -export type GherkinDocString = z.infer; -/** - * Schema for an Examples table in a Scenario Outline - * - * Examples tables define parameter values for Scenario Outline iterations. - * Each Examples block can have its own name, tags, and data rows. - */ -export declare const GherkinExamplesSchema: z.ZodObject<{ - name: z.ZodString; - description: z.ZodOptional; - tags: z.ZodReadonly>; - headers: z.ZodReadonly>; - rows: z.ZodReadonly>>; - line: z.ZodNumber; -}, z.core.$strict>; -export type GherkinExamples = z.infer; -/** - * Schema for a step within a Background or Scenario - * - * Uses flexible string for keyword to handle any Cucumber parser output. - */ -export declare const GherkinStepSchema: z.ZodObject<{ - keyword: z.ZodString; - text: z.ZodString; - dataTable: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; -}, z.core.$strict>; -/** - * Schema for a Background section that runs before each scenario - * - * Used for shared setup steps and, in our case, deliverables metadata. - */ -export declare const GherkinBackgroundSchema: z.ZodObject<{ - name: z.ZodString; - description: z.ZodOptional; - steps: z.ZodReadonly>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>; - line: z.ZodNumber; -}, z.core.$strict>; -/** - * Schema for a single scenario within a Gherkin feature - * - * For Scenario Outlines, the examples field contains the Examples tables. - * Regular Scenarios have no examples (field is undefined or empty). - */ -export declare const GherkinScenarioSchema: z.ZodObject<{ - name: z.ZodString; - description: z.ZodOptional; - tags: z.ZodReadonly>; - steps: z.ZodReadonly>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>; - examples: z.ZodOptional; - tags: z.ZodReadonly>; - headers: z.ZodReadonly>; - rows: z.ZodReadonly>>; - line: z.ZodNumber; - }, z.core.$strict>>>>; - line: z.ZodNumber; -}, z.core.$strict>; -/** - * Schema for a Gherkin Rule (business rule grouping) - * - * Rules group related scenarios under a business rule name. - * The description often contains rationale, exceptions, and see-also references. - * - * @example - * ```gherkin - * Rule: Tag registry must define all new metadata tags - * - * The tag registry is the single source of truth for all process metadata. - * Each new tag must be fully specified with format, purpose, and examples. - * - * # RATIONALE: Centralized tag definitions prevent inconsistent usage - * # SEE-ALSO: src/taxonomy/, PDR-003 - * - * @acceptance-criteria - * Scenario: New tags are defined in tag registry - * Given the src/taxonomy/ TypeScript module - * Then it should contain metadataTags for risk, effort-actual... - * ``` - */ -export declare const GherkinRuleSchema: z.ZodObject<{ - name: z.ZodString; - description: z.ZodString; - tags: z.ZodReadonly>; - scenarios: z.ZodReadonly; - tags: z.ZodReadonly>; - steps: z.ZodReadonly>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>; - examples: z.ZodOptional; - tags: z.ZodReadonly>; - headers: z.ZodReadonly>; - rows: z.ZodReadonly>>; - line: z.ZodNumber; - }, z.core.$strict>>>>; - line: z.ZodNumber; - }, z.core.$strict>>>; - line: z.ZodNumber; -}, z.core.$strict>; -/** - * Schema for a Gherkin feature file's parsed content - */ -export declare const GherkinFeatureSchema: z.ZodObject<{ - name: z.ZodString; - description: z.ZodString; - tags: z.ZodReadonly>; - language: z.ZodDefault; - line: z.ZodNumber; -}, z.core.$strict>; -/** - * Schema for result of scanning a single .feature file - */ -export declare const ScannedGherkinFileSchema: z.ZodObject<{ - filePath: z.ZodString; - feature: z.ZodObject<{ - name: z.ZodString; - description: z.ZodString; - tags: z.ZodReadonly>; - language: z.ZodDefault; - line: z.ZodNumber; - }, z.core.$strict>; - background: z.ZodOptional; - steps: z.ZodReadonly>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>; - line: z.ZodNumber; - }, z.core.$strict>>; - rules: z.ZodOptional>; - scenarios: z.ZodReadonly; - tags: z.ZodReadonly>; - steps: z.ZodReadonly>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>; - examples: z.ZodOptional; - tags: z.ZodReadonly>; - headers: z.ZodReadonly>; - rows: z.ZodReadonly>>; - line: z.ZodNumber; - }, z.core.$strict>>>>; - line: z.ZodNumber; - }, z.core.$strict>>>; - line: z.ZodNumber; - }, z.core.$strict>>>>; - scenarios: z.ZodReadonly; - tags: z.ZodReadonly>; - steps: z.ZodReadonly>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>; - examples: z.ZodOptional; - tags: z.ZodReadonly>; - headers: z.ZodReadonly>; - rows: z.ZodReadonly>>; - line: z.ZodNumber; - }, z.core.$strict>>>>; - line: z.ZodNumber; - }, z.core.$strict>>>; -}, z.core.$strict>; -/** - * Schema for information about a feature file that failed to parse - */ -export declare const GherkinFileErrorSchema: z.ZodObject<{ - file: z.ZodString; - error: z.ZodObject<{ - message: z.ZodString; - line: z.ZodOptional; - column: z.ZodOptional; - }, z.core.$strict>; -}, z.core.$strict>; -/** - * Schema for results of scanning multiple .feature files - */ -export declare const GherkinScanResultsSchema: z.ZodObject<{ - files: z.ZodReadonly>; - language: z.ZodDefault; - line: z.ZodNumber; - }, z.core.$strict>; - background: z.ZodOptional; - steps: z.ZodReadonly>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>; - line: z.ZodNumber; - }, z.core.$strict>>; - rules: z.ZodOptional>; - scenarios: z.ZodReadonly; - tags: z.ZodReadonly>; - steps: z.ZodReadonly>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>; - examples: z.ZodOptional; - tags: z.ZodReadonly>; - headers: z.ZodReadonly>; - rows: z.ZodReadonly>>; - line: z.ZodNumber; - }, z.core.$strict>>>>; - line: z.ZodNumber; - }, z.core.$strict>>>; - line: z.ZodNumber; - }, z.core.$strict>>>>; - scenarios: z.ZodReadonly; - tags: z.ZodReadonly>; - steps: z.ZodReadonly>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>; - examples: z.ZodOptional; - tags: z.ZodReadonly>; - headers: z.ZodReadonly>; - rows: z.ZodReadonly>>; - line: z.ZodNumber; - }, z.core.$strict>>>>; - line: z.ZodNumber; - }, z.core.$strict>>>; - }, z.core.$strict>>>; - errors: z.ZodReadonly; - column: z.ZodOptional; - }, z.core.$strict>; - }, z.core.$strict>>>; -}, z.core.$strict>; -export type GherkinDataTable = z.infer; -export type GherkinStep = z.infer; -export type GherkinBackground = z.infer; -export type GherkinScenario = z.infer; -export type GherkinRule = z.infer; -export type GherkinFeature = z.infer; -export type ScannedGherkinFile = z.infer; -export type GherkinFileError = z.infer; -export type GherkinScanResults = z.infer; -/** - * Schema for a processed Gherkin step (Given/When/Then/And/But) - * - * Uses enum for keyword to enforce valid step types after processing. - */ -export declare const ParsedStepSchema: z.ZodObject<{ - keyword: z.ZodEnum<{ - Given: "Given"; - When: "When"; - Then: "Then"; - And: "And"; - But: "But"; - }>; - text: z.ZodString; - dataTable: z.ZodOptional>>; - docString: z.ZodOptional; - }, z.core.$strict>>; -}, z.core.$strip>; -/** - * Schema for a processed Gherkin scenario - */ -export declare const ParsedScenarioSchema: z.ZodObject<{ - name: z.ZodString; - tags: z.ZodArray; - steps: z.ZodArray; - text: z.ZodString; - dataTable: z.ZodOptional>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strip>>; -}, z.core.$strip>; -/** - * Schema for processed Gherkin background - * - * Includes full step data (with dataTable/docString) for rich extraction. - */ -export declare const ParsedBackgroundSchema: z.ZodObject<{ - name: z.ZodOptional; - description: z.ZodOptional; - steps: z.ZodArray; - text: z.ZodString; - dataTable: z.ZodOptional>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strip>>; - line: z.ZodOptional; -}, z.core.$strip>; -/** - * Schema for a complete processed Gherkin feature - */ -export declare const ParsedFeatureSchema: z.ZodObject<{ - name: z.ZodString; - description: z.ZodString; - tags: z.ZodArray; - background: z.ZodOptional; - description: z.ZodOptional; - steps: z.ZodArray; - text: z.ZodString; - dataTable: z.ZodOptional>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strip>>; - line: z.ZodOptional; - }, z.core.$strip>>; - scenarios: z.ZodArray; - steps: z.ZodArray; - text: z.ZodString; - dataTable: z.ZodOptional>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strip>>; - }, z.core.$strip>>; -}, z.core.$strip>; -/** - * Schema for a feature file with path - */ -export declare const FeatureFileSchema: z.ZodObject<{ - filePath: z.ZodString; - feature: z.ZodObject<{ - name: z.ZodString; - description: z.ZodString; - tags: z.ZodArray; - background: z.ZodOptional; - description: z.ZodOptional; - steps: z.ZodArray; - text: z.ZodString; - dataTable: z.ZodOptional>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strip>>; - line: z.ZodOptional; - }, z.core.$strip>>; - scenarios: z.ZodArray; - steps: z.ZodArray; - text: z.ZodString; - dataTable: z.ZodOptional>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strip>>; - }, z.core.$strip>>; - }, z.core.$strip>; -}, z.core.$strip>; -export type ParsedStep = z.infer; -export type ParsedScenario = z.infer; -export type ParsedBackground = z.infer; -export type ParsedFeature = z.infer; -export type FeatureFile = z.infer; -//# sourceMappingURL=feature.d.ts.map \ No newline at end of file diff --git a/dist/validation-schemas/feature.d.ts.map b/dist/validation-schemas/feature.d.ts.map deleted file mode 100644 index 6a18a0c1..00000000 --- a/dist/validation-schemas/feature.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"feature.d.ts","sourceRoot":"","sources":["../../src/validation-schemas/feature.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAEnE;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB;;;kBAOxB,CAAC;AAEZ;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB;;;kBAOxB,CAAC;AAEZ,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB;;;;;;;kBAevB,CAAC;AAEZ,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE;;;;GAIG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;kBAWnB,CAAC;AAEZ;;;;GAIG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;kBAWzB,CAAC;AAEZ;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;kBAevB,CAAC;AAEZ;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAanB,CAAC;AAEZ;;GAEG;AACH,eAAO,MAAM,oBA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G;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;iBAI/B,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;iBASjC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAM9B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAG5B,CAAC;AAGH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC1D,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/validation-schemas/feature.js b/dist/validation-schemas/feature.js deleted file mode 100644 index c844c921..00000000 --- a/dist/validation-schemas/feature.js +++ /dev/null @@ -1,262 +0,0 @@ -import { z } from 'zod'; -/** - * Schema for a Gherkin DataTable attached to a step - * - * DataTables provide structured data for steps, commonly used for: - * - Deliverables lists in Background sections - * - Test data for scenarios - * - Configuration parameters - */ -export const GherkinDataTableSchema = z - .object({ - /** Column headers from the first row */ - headers: z.array(z.string()).readonly(), - /** Data rows (excluding header row), each row maps column name to value */ - rows: z.array(z.record(z.string(), z.string())).readonly(), -}) - .strict(); -/** - * Schema for a DocString attached to a step - * - * DocStrings can have an optional mediaType that specifies the content language - * (e.g., "typescript", "json", "jsdoc") for proper syntax highlighting. - */ -export const GherkinDocStringSchema = z - .object({ - /** The DocString content */ - content: z.string(), - /** Optional media type / language hint (e.g., "typescript", "json", "jsdoc") */ - mediaType: z.string().optional(), -}) - .strict(); -/** - * Schema for an Examples table in a Scenario Outline - * - * Examples tables define parameter values for Scenario Outline iterations. - * Each Examples block can have its own name, tags, and data rows. - */ -export const GherkinExamplesSchema = z - .object({ - /** Examples table name (often empty string) */ - name: z.string(), - /** Examples table description */ - description: z.string().optional(), - /** Tags applied to this Examples table */ - tags: z.array(z.string()).readonly(), - /** Column headers from the first row */ - headers: z.array(z.string()).readonly(), - /** Data rows (excluding header row), each row maps column name to value */ - rows: z.array(z.record(z.string(), z.string())).readonly(), - /** Line number where Examples table starts */ - line: z.number().int().positive(), -}) - .strict(); -/** - * Schema for a step within a Background or Scenario - * - * Uses flexible string for keyword to handle any Cucumber parser output. - */ -export const GherkinStepSchema = z - .object({ - /** Step keyword (Given, When, Then, And, But) - flexible string for parser compat */ - keyword: z.string().min(1), - /** Step text */ - text: z.string(), - /** Optional DataTable attached to this step */ - dataTable: GherkinDataTableSchema.optional(), - /** Optional DocString attached to this step (with content and optional mediaType) */ - docString: GherkinDocStringSchema.optional(), -}) - .strict(); -/** - * Schema for a Background section that runs before each scenario - * - * Used for shared setup steps and, in our case, deliverables metadata. - */ -export const GherkinBackgroundSchema = z - .object({ - /** Background name (often empty or "Deliverables") */ - name: z.string(), - /** Background description (if any) */ - description: z.string().optional(), - /** Background steps with potential DataTables */ - steps: z.array(GherkinStepSchema).readonly(), - /** Line number where background starts */ - line: z.number().int().positive(), -}) - .strict(); -/** - * Schema for a single scenario within a Gherkin feature - * - * For Scenario Outlines, the examples field contains the Examples tables. - * Regular Scenarios have no examples (field is undefined or empty). - */ -export const GherkinScenarioSchema = z - .object({ - /** Scenario name */ - name: z.string(), - /** Scenario description (if any) */ - description: z.string().optional(), - /** Tags applied to this scenario */ - tags: z.array(z.string()).readonly(), - /** Scenario steps with full DataTable/DocString support */ - steps: z.array(GherkinStepSchema).readonly(), - /** Examples tables for Scenario Outline (undefined/empty for regular Scenario) */ - examples: z.array(GherkinExamplesSchema).readonly().optional(), - /** Line number where scenario starts */ - line: z.number().int().positive(), -}) - .strict(); -/** - * Schema for a Gherkin Rule (business rule grouping) - * - * Rules group related scenarios under a business rule name. - * The description often contains rationale, exceptions, and see-also references. - * - * @example - * ```gherkin - * Rule: Tag registry must define all new metadata tags - * - * The tag registry is the single source of truth for all process metadata. - * Each new tag must be fully specified with format, purpose, and examples. - * - * # RATIONALE: Centralized tag definitions prevent inconsistent usage - * # SEE-ALSO: src/taxonomy/, PDR-003 - * - * @acceptance-criteria - * Scenario: New tags are defined in tag registry - * Given the src/taxonomy/ TypeScript module - * Then it should contain metadataTags for risk, effort-actual... - * ``` - */ -export const GherkinRuleSchema = z - .object({ - /** Rule name (the business rule statement) */ - name: z.string(), - /** Rule description with context, rationale, exceptions */ - description: z.string(), - /** Tags applied to this rule */ - tags: z.array(z.string()).readonly(), - /** Scenarios that verify this rule */ - scenarios: z.array(GherkinScenarioSchema).readonly(), - /** Line number where rule starts */ - line: z.number().int().positive(), -}) - .strict(); -/** - * Schema for a Gherkin feature file's parsed content - */ -export const GherkinFeatureSchema = z - .object({ - /** Feature name */ - name: z.string(), - /** Feature description */ - description: z.string(), - /** Tags applied to the feature */ - tags: z.array(z.string()).readonly(), - /** Language of the feature file (default: 'en') */ - language: z.string().default('en'), - /** Line number where feature starts */ - line: z.number().int().positive(), -}) - .strict(); -/** - * Schema for result of scanning a single .feature file - */ -export const ScannedGherkinFileSchema = z - .object({ - /** Absolute path to the feature file */ - filePath: z.string(), - /** Parsed feature information */ - feature: GherkinFeatureSchema, - /** Background section (if present) - used for deliverables */ - background: GherkinBackgroundSchema.optional(), - /** Rules in this feature (Gherkin v6+ business rule groupings) */ - rules: z.array(GherkinRuleSchema).readonly().optional(), - /** Scenarios in this feature (includes those flattened from Rules for backward compat) */ - scenarios: z.array(GherkinScenarioSchema).readonly(), -}) - .strict(); -/** - * Schema for information about a feature file that failed to parse - */ -export const GherkinFileErrorSchema = z - .object({ - file: z.string(), - error: z - .object({ - message: z.string(), - line: z.number().optional(), - column: z.number().optional(), - }) - .strict(), -}) - .strict(); -/** - * Schema for results of scanning multiple .feature files - */ -export const GherkinScanResultsSchema = z - .object({ - /** Successfully scanned feature files */ - files: z.array(ScannedGherkinFileSchema).readonly(), - /** Files that failed to parse */ - errors: z.array(GherkinFileErrorSchema).readonly(), -}) - .strict(); -// ============================================================================= -// PROCESSED/VALIDATED FEATURE TYPES (for extraction pipeline) -// ============================================================================= -// These schemas are for processed feature data after transformation. -// They have stricter requirements for validation. -/** - * Schema for a processed Gherkin step (Given/When/Then/And/But) - * - * Uses enum for keyword to enforce valid step types after processing. - */ -export const ParsedStepSchema = z.object({ - keyword: z.enum(['Given', 'When', 'Then', 'And', 'But']), - text: z.string().min(1), - dataTable: z.array(z.record(z.string(), z.string())).optional(), - docString: GherkinDocStringSchema.optional(), -}); -/** - * Schema for a processed Gherkin scenario - */ -export const ParsedScenarioSchema = z.object({ - name: z.string().min(1), - tags: z.array(z.string()), - steps: z.array(ParsedStepSchema), -}); -/** - * Schema for processed Gherkin background - * - * Includes full step data (with dataTable/docString) for rich extraction. - */ -export const ParsedBackgroundSchema = z.object({ - /** Background name (optional, e.g., "Deliverables") */ - name: z.string().optional(), - /** Background description text */ - description: z.string().optional(), - /** Background steps with full Given/When/Then data */ - steps: z.array(ParsedStepSchema), - /** Source line number */ - line: z.number().int().positive().optional(), -}); -/** - * Schema for a complete processed Gherkin feature - */ -export const ParsedFeatureSchema = z.object({ - name: z.string().min(1), - description: z.string(), - tags: z.array(z.string()), - background: ParsedBackgroundSchema.optional(), - scenarios: z.array(ParsedScenarioSchema), -}); -/** - * Schema for a feature file with path - */ -export const FeatureFileSchema = z.object({ - filePath: z.string(), - feature: ParsedFeatureSchema, -}); -//# sourceMappingURL=feature.js.map \ No newline at end of file diff --git a/dist/validation-schemas/feature.js.map b/dist/validation-schemas/feature.js.map deleted file mode 100644 index 315083ed..00000000 --- a/dist/validation-schemas/feature.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"feature.js","sourceRoot":"","sources":["../../src/validation-schemas/feature.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAaxB;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC;KACpC,MAAM,CAAC;IACN,wCAAwC;IACxC,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACvC,2EAA2E;IAC3E,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE;CAC3D,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ;;;;;GAKG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC;KACpC,MAAM,CAAC;IACN,4BAA4B;IAC5B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,gFAAgF;IAChF,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACjC,CAAC;KACD,MAAM,EAAE,CAAC;AAIZ;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC;KACnC,MAAM,CAAC;IACN,+CAA+C;IAC/C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,iCAAiC;IACjC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,0CAA0C;IAC1C,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACpC,wCAAwC;IACxC,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAA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ACvD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,kCAAkC;IAClC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,sDAAsD;IACtD,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC;IAChC,yBAAyB;IACzB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CAC7C,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACzB,UAAU,EAAE,sBAAsB,CAAC,QAAQ,EAAE;IAC7C,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,oBAAoB,CAAC;CACzC,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,OAAO,EAAE,mBAAmB;CAC7B,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/validation-schemas/index.d.ts b/dist/validation-schemas/index.d.ts deleted file mode 100644 index f1069b19..00000000 --- a/dist/validation-schemas/index.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -export { PositionSchema, DocDirectiveSchema, isDocDirective, DefaultPatternStatusSchema, PatternStatusSchema, createPatternStatusSchema, createDirectiveTagSchema, type Position, type DocDirective, type PatternStatus, } from './doc-directive.js'; -export { ExportInfoSchema, isExportInfo, type ExportInfo } from './export-info.js'; -export { SourceInfoSchema, ExtractedPatternSchema, BusinessRuleSchema, isExtractedPattern, type SourceInfo, type ExtractedPattern, type BusinessRule, } from './extracted-pattern.js'; -export { ShapeKindSchema, ExtractedShapeSchema, ReExportedShapeSchema, ShapeExtractionResultSchema, ShapeExtractionOptionsSchema, isExtractedShape, isShapeExtractionResult, type ShapeKind, type ExtractedShape, type ReExportedShape, type ShapeExtractionResult, type ShapeExtractionOptions, } from './extracted-shape.js'; -export { ScenarioRefSchema, type ScenarioRef } from './scenario-ref.js'; -export { ScannerConfigSchema, createGeneratorConfigSchema, isScannerConfig, isGeneratorConfig, type ScannerConfig, type GeneratorConfig, } from './config.js'; -export { GherkinDataTableSchema, GherkinStepSchema, GherkinBackgroundSchema, GherkinScenarioSchema, GherkinFeatureSchema, ScannedGherkinFileSchema, GherkinFileErrorSchema, GherkinScanResultsSchema, type GherkinDataTableRow, type GherkinDataTable, type GherkinStep, type GherkinBackground, type GherkinScenario, type GherkinFeature, type ScannedGherkinFile, type GherkinFileError, type GherkinScanResults, ParsedStepSchema, ParsedScenarioSchema, ParsedBackgroundSchema, ParsedFeatureSchema, FeatureFileSchema, type ParsedStep, type ParsedScenario, type ParsedBackground, type ParsedFeature, type FeatureFile, } from './feature.js'; -export { LintSeveritySchema, LintViolationSchema, isLintViolation, type LintSeverity, type LintViolation, } from './lint.js'; -export { CategoryDefinitionSchema, MetadataTagDefinitionSchema, AggregationTagDefinitionSchema, TagRegistrySchema, createDefaultTagRegistry, mergeTagRegistries, type CategoryDefinition, type MetadataTagDefinition, type AggregationTagDefinition, type TagRegistry, } from './tag-registry.js'; -export { ProcessStatusSchema, RiskLevelSchema, ProcessMetadataSchema, DeliverableSchema, CrossValidationErrorSchema, ValidationSummarySchema, HierarchyLevelSchema, type ProcessStatus, type RiskLevel, type ProcessMetadata, type Deliverable, type CrossValidationError, type ValidationSummary, type HierarchyLevel, } from './dual-source.js'; -export { WorkflowStatusSchema, PhaseArtifactsSchema, WorkflowPhaseSchema, WorkflowConfigSchema, createLoadedWorkflow, isWorkflowConfig, type WorkflowStatus, type PhaseArtifacts, type WorkflowPhase, type WorkflowConfig, type LoadedWorkflow, } from './workflow-config.js'; -export { createJsonInputCodec, createJsonOutputCodec, createFileLoader, formatCodecError, type CodecError, type JsonInputCodec, type JsonOutputCodec, } from './codec-utils.js'; -export { LintViolationOutputSchema, LintResultOutputSchema, LintSummaryStatsSchema, LintOutputSchema, ValidationIssueSeveritySchema, ValidationIssueSourceSchema, ValidationIssueOutputSchema, ValidationStatsSchema, ValidationSummaryOutputSchema, RegistryMetadataOutputSchema, type LintOutput, type ValidationSummaryOutput, type RegistryMetadataOutput, } from './output-schemas.js'; -export { StatusGroupsSchema, StatusCountsSchema, PhaseGroupSchema, SourceViewsSchema, RelationshipEntrySchema, MasterDatasetSchema, type MasterDataset, type StatusGroups, type StatusCounts, type PhaseGroup, type SourceViews, type RelationshipEntry, } from './master-dataset.js'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/dist/validation-schemas/index.d.ts.map b/dist/validation-schemas/index.d.ts.map deleted file mode 100644 index 5ee7a20e..00000000 --- a/dist/validation-schemas/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/validation-schemas/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,0BAA0B,EAC1B,mBAAmB,EACnB,yBAAyB,EACzB,wBAAwB,EACxB,KAAK,QAAQ,EACb,KAAK,YAAY,EACjB,KAAK,aAAa,GACnB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAGnF,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,kBAAkB,EAClB,kBAAkB,EAClB,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,KAAK,YAAY,GAClB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EACL,eAAe,EACf,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,EACL,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,iBAAiB,EACjB,0BAA0B,EAC1B,uBAAuB,EACvB,oBAAoB,EACpB,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,cAAc,GACpB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,EAChB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,cAAc,GACpB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,eAAe,GACrB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACL,yBAAyB,EACzB,sBAAsB,EACtB,sBAAsB,EACtB,gBAAgB,EAChB,6BAA6B,EAC7B,2BAA2B,EAC3B,2BAA2B,EAC3B,qBAAqB,EACrB,6BAA6B,EAC7B,4BAA4B,EAC5B,KAAK,UAAU,EACf,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,GAC5B,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,uBAAuB,EACvB,mBAAmB,EACnB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,iBAAiB,GACvB,MAAM,qBAAqB,CAAC"} \ No newline at end of file diff --git a/dist/validation-schemas/index.js b/dist/validation-schemas/index.js deleted file mode 100644 index b4a2a0ad..00000000 --- a/dist/validation-schemas/index.js +++ /dev/null @@ -1,32 +0,0 @@ -// DocDirective schemas and types -export { PositionSchema, DocDirectiveSchema, isDocDirective, DefaultPatternStatusSchema, PatternStatusSchema, createPatternStatusSchema, createDirectiveTagSchema, } from './doc-directive.js'; -// ExportInfo schemas and types -export { ExportInfoSchema, isExportInfo } from './export-info.js'; -// ExtractedPattern schemas and types -export { SourceInfoSchema, ExtractedPatternSchema, BusinessRuleSchema, isExtractedPattern, } from './extracted-pattern.js'; -// ExtractedShape schemas and types (ADR-021: Shape Extraction) -export { ShapeKindSchema, ExtractedShapeSchema, ReExportedShapeSchema, ShapeExtractionResultSchema, ShapeExtractionOptionsSchema, isExtractedShape, isShapeExtractionResult, } from './extracted-shape.js'; -// ScenarioRef schemas and types -export { ScenarioRefSchema } from './scenario-ref.js'; -// Config schemas and types -export { ScannerConfigSchema, createGeneratorConfigSchema, isScannerConfig, isGeneratorConfig, } from './config.js'; -// Feature schemas and types (Gherkin) -// Runtime types (from Cucumber parser) -export { GherkinDataTableSchema, GherkinStepSchema, GherkinBackgroundSchema, GherkinScenarioSchema, GherkinFeatureSchema, ScannedGherkinFileSchema, GherkinFileErrorSchema, GherkinScanResultsSchema, -// Processed/validated types (for extraction pipeline) -ParsedStepSchema, ParsedScenarioSchema, ParsedBackgroundSchema, ParsedFeatureSchema, FeatureFileSchema, } from './feature.js'; -// Lint schemas and types -export { LintSeveritySchema, LintViolationSchema, isLintViolation, } from './lint.js'; -// Tag Registry schemas and types -export { CategoryDefinitionSchema, MetadataTagDefinitionSchema, AggregationTagDefinitionSchema, TagRegistrySchema, createDefaultTagRegistry, mergeTagRegistries, } from './tag-registry.js'; -// Dual-source extraction schemas and types -export { ProcessStatusSchema, RiskLevelSchema, ProcessMetadataSchema, DeliverableSchema, CrossValidationErrorSchema, ValidationSummarySchema, HierarchyLevelSchema, } from './dual-source.js'; -// Workflow configuration schemas and types -export { WorkflowStatusSchema, PhaseArtifactsSchema, WorkflowPhaseSchema, WorkflowConfigSchema, createLoadedWorkflow, isWorkflowConfig, } from './workflow-config.js'; -// Codec utilities for JSON parsing and serialization -export { createJsonInputCodec, createJsonOutputCodec, createFileLoader, formatCodecError, } from './codec-utils.js'; -// Output schemas for JSON serialization -export { LintViolationOutputSchema, LintResultOutputSchema, LintSummaryStatsSchema, LintOutputSchema, ValidationIssueSeveritySchema, ValidationIssueSourceSchema, ValidationIssueOutputSchema, ValidationStatsSchema, ValidationSummaryOutputSchema, RegistryMetadataOutputSchema, } from './output-schemas.js'; -// Master Dataset schemas and types (unified transformation pipeline) -export { StatusGroupsSchema, StatusCountsSchema, PhaseGroupSchema, SourceViewsSchema, RelationshipEntrySchema, MasterDatasetSchema, } from './master-dataset.js'; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/validation-schemas/index.js.map b/dist/validation-schemas/index.js.map deleted file mode 100644 index 4092cec4..00000000 --- a/dist/validation-schemas/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/validation-schemas/index.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,0BAA0B,EAC1B,mBAAmB,EACnB,yBAAyB,EACzB,wBAAwB,GAIzB,MAAM,oBAAoB,CAAC;AAE5B,+BAA+B;AAC/B,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAmB,MAAM,kBAAkB,CAAC;AAEnF,qCAAqC;AACrC,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,kBAAkB,EAClB,kBAAkB,GAInB,MAAM,wBAAwB,CAAC;AAEhC,+DAA+D;AAC/D,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,qBAAqB,EACrB,2BAA2B,EAC3B,4BAA4B,EAC5B,gBAAgB,EAChB,uBAAuB,GAMxB,MAAM,sBAAsB,CAAC;AAE9B,gCAAgC;AAChC,OAAO,EAAE,iBAAiB,EAAoB,MAAM,mBAAmB,CAAC;AAExE,2BAA2B;AAC3B,OAAO,EACL,mBAAmB,EAC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B,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,uBAAuB,EACvB,mBAAmB,GAOpB,MAAM,qBAAqB,CAAC"} \ No newline at end of file diff --git a/dist/validation-schemas/lint.d.ts b/dist/validation-schemas/lint.d.ts deleted file mode 100644 index 79954f4d..00000000 --- a/dist/validation-schemas/lint.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Zod schemas for lint types - * - * Provides validated schemas for lint severity levels and violations. - * LintRule cannot be fully schematized (has function property) so - * it remains as an interface in rules.ts. - */ -import { z } from 'zod'; -import { type SeverityType } from '../taxonomy/index.js'; -/** - * Lint severity levels schema - * - * - error: Must be fixed before merging (CI fails) - * - warning: Should be fixed (CI fails in strict mode) - * - info: Informational only (CI never fails) - * - * @see src/taxonomy/severity-types.ts - */ -export declare const LintSeveritySchema: z.ZodEnum<{ - error: "error"; - warning: "warning"; - info: "info"; -}>; -export type LintSeverity = SeverityType; -/** - * Lint violation schema - * - * Represents a single lint violation found in a directive. - */ -export declare const LintViolationSchema: z.ZodObject<{ - rule: z.ZodString; - severity: z.ZodEnum<{ - error: "error"; - warning: "warning"; - info: "info"; - }>; - message: z.ZodString; - file: z.ZodString; - line: z.ZodNumber; -}, z.core.$strict>; -export type LintViolation = z.infer; -/** - * Type guard for LintViolation - */ -export declare function isLintViolation(value: unknown): value is LintViolation; -//# sourceMappingURL=lint.d.ts.map \ No newline at end of file diff --git a/dist/validation-schemas/lint.d.ts.map b/dist/validation-schemas/lint.d.ts.map deleted file mode 100644 index 578cfd2a..00000000 --- a/dist/validation-schemas/lint.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"lint.d.ts","sourceRoot":"","sources":["../../src/validation-schemas/lint.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAkB,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEzE;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB;;;;EAAyB,CAAC;AACzD,MAAM,MAAM,YAAY,GAAG,YAAY,CAAC;AAExC;;;;GAIG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;kBAarB,CAAC;AACZ,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,aAAa,CAEtE"} \ No newline at end of file diff --git a/dist/validation-schemas/lint.js b/dist/validation-schemas/lint.js deleted file mode 100644 index 24fb3e01..00000000 --- a/dist/validation-schemas/lint.js +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Zod schemas for lint types - * - * Provides validated schemas for lint severity levels and violations. - * LintRule cannot be fully schematized (has function property) so - * it remains as an interface in rules.ts. - */ -import { z } from 'zod'; -import { SEVERITY_TYPES } from '../taxonomy/index.js'; -/** - * Lint severity levels schema - * - * - error: Must be fixed before merging (CI fails) - * - warning: Should be fixed (CI fails in strict mode) - * - info: Informational only (CI never fails) - * - * @see src/taxonomy/severity-types.ts - */ -export const LintSeveritySchema = z.enum(SEVERITY_TYPES); -/** - * Lint violation schema - * - * Represents a single lint violation found in a directive. - */ -export const LintViolationSchema = z - .object({ - /** Rule ID (e.g., 'missing-pattern-name') */ - rule: z.string(), - /** Severity level */ - severity: LintSeveritySchema, - /** Human-readable message */ - message: z.string(), - /** Source file path */ - file: z.string(), - /** Line number in source file */ - line: z.number(), -}) - .strict(); -/** - * Type guard for LintViolation - */ -export function isLintViolation(value) { - return LintViolationSchema.safeParse(value).success; -} -//# sourceMappingURL=lint.js.map \ No newline at end of file diff --git a/dist/validation-schemas/lint.js.map b/dist/validation-schemas/lint.js.map deleted file mode 100644 index 0efb4fca..00000000 --- a/dist/validation-schemas/lint.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"lint.js","sourceRoot":"","sources":["../../src/validation-schemas/lint.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAqB,MAAM,sBAAsB,CAAC;AAEzE;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;AAGzD;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC;KACjC,MAAM,CAAC;IACN,6CAA6C;IAC7C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,qBAAqB;IACrB,QAAQ,EAAE,kBAAkB;IAC5B,6BAA6B;IAC7B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,uBAAuB;IACvB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,iCAAiC;IACjC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;CACjB,CAAC;KACD,MAAM,EAAE,CAAC;AAGZ;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,KAAc;IAC5C,OAAO,mBAAmB,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;AACtD,CAAC"} \ No newline at end of file diff --git a/dist/validation-schemas/master-dataset.d.ts b/dist/validation-schemas/master-dataset.d.ts deleted file mode 100644 index 577b43f3..00000000 --- a/dist/validation-schemas/master-dataset.d.ts +++ /dev/null @@ -1,7227 +0,0 @@ -/** - * @libar-docs - * @libar-docs-validation @libar-docs-core - * @libar-docs-pattern MasterDataset - * @libar-docs-status completed - * @libar-docs-uses Zod, ExtractedPattern, TagRegistry - * @libar-docs-used-by Orchestrator, SectionRenderer, ReportCodecs - * @libar-docs-usecase "When providing pre-computed views to section renderers" - * @libar-docs-usecase "When eliminating redundant filtering across generators" - * @libar-docs-extract-shapes MasterDatasetSchema, StatusGroupsSchema, StatusCountsSchema, PhaseGroupSchema, SourceViewsSchema, RelationshipEntrySchema, ArchIndexSchema - * @libar-docs-arch-role read-model - * @libar-docs-arch-context api - * @libar-docs-arch-layer domain - * @libar-docs-include codec-transformation - * - * ## MasterDataset - Unified Pattern Views Schema - * - * Defines the schema for a pre-computed dataset that holds all extracted patterns - * along with derived views (by status, phase, quarter, category, source). This enables - * single-pass transformation instead of redundant filtering in each section renderer. - * - * ### When to Use - * - * - Use when sections need filtered/grouped pattern views - * - Use when computing aggregate statistics across patterns - * - Use as input to report-specific codecs (RoadmapReport, TimelineReport, etc.) - * - * ### Key Concepts - * - * - **Single-pass computation**: All views computed in one iteration over patterns - * - **Pre-computed groups**: Status, phase, quarter, category, source groupings - * - **Aggregate statistics**: Counts, completion percentages, phase/category counts - * - **Type-safe views**: All views are typed via Zod schema inference - */ -import { z } from 'zod'; -/** - * Status-based grouping of patterns - * - * Patterns are normalized to three canonical states: - * - completed: implemented, completed - * - active: active, partial, in-progress - * - planned: roadmap, planned, undefined - */ -export declare const StatusGroupsSchema: z.ZodObject<{ - completed: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - active: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - planned: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; -}, z.core.$strip>; -/** - * Status counts for aggregate statistics - */ -export declare const StatusCountsSchema: z.ZodObject<{ - completed: z.ZodNumber; - active: z.ZodNumber; - planned: z.ZodNumber; - total: z.ZodNumber; -}, z.core.$strip>; -/** - * Phase grouping with patterns and counts - * - * Groups patterns by their phase number, with pre-computed - * status counts for each phase. - */ -export declare const PhaseGroupSchema: z.ZodObject<{ - phaseNumber: z.ZodNumber; - phaseName: z.ZodOptional; - patterns: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - counts: z.ZodObject<{ - completed: z.ZodNumber; - active: z.ZodNumber; - planned: z.ZodNumber; - total: z.ZodNumber; - }, z.core.$strip>; -}, z.core.$strip>; -/** - * Source-based views for different data origins - */ -export declare const SourceViewsSchema: z.ZodObject<{ - typescript: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - gherkin: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - roadmap: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - prd: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; -}, z.core.$strip>; -/** - * Implementation reference for structured implementedBy entries - * - * Contains the implementing pattern/module name, source file path, - * and optional description for rendering in pattern documents. - */ -export declare const ImplementationRefSchema: z.ZodObject<{ - name: z.ZodString; - file: z.ZodString; - description: z.ZodOptional; -}, z.core.$strip>; -/** - * Relationship index for dependency tracking - * - * Maps pattern names to their relationship metadata. - */ -export declare const RelationshipEntrySchema: z.ZodObject<{ - uses: z.ZodArray; - usedBy: z.ZodArray; - dependsOn: z.ZodArray; - enables: z.ZodArray; - implementsPatterns: z.ZodArray; - implementedBy: z.ZodArray; - }, z.core.$strip>>; - extendsPattern: z.ZodOptional; - extendedBy: z.ZodArray; - seeAlso: z.ZodArray; - apiRef: z.ZodArray; -}, z.core.$strip>; -/** - * Architecture index for diagram generation - * - * Groups patterns by architectural metadata for rendering component diagrams. - */ -export declare const ArchIndexSchema: z.ZodObject<{ - byRole: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byContext: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byLayer: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byView: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - all: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; -}, z.core.$strip>; -/** - * Master Dataset - Unified view of all extracted patterns - * - * Contains raw patterns plus pre-computed views and statistics. - * This is the primary data structure passed to generators and sections. - */ -export declare const MasterDatasetSchema: z.ZodObject<{ - patterns: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - tagRegistry: z.ZodObject<{ - $schema: z.ZodOptional; - version: z.ZodDefault; - categories: z.ZodArray>>; - }, z.core.$strict>>; - metadataTags: z.ZodArray; - purpose: z.ZodString; - required: z.ZodDefault>; - repeatable: z.ZodDefault>; - values: z.ZodOptional>; - default: z.ZodOptional; - example: z.ZodOptional; - metadataKey: z.ZodOptional; - transform: z.ZodOptional>; - }, z.core.$strict>>; - aggregationTags: z.ZodArray; - purpose: z.ZodString; - }, z.core.$strict>>; - formatOptions: z.ZodDefault>; - tagPrefix: z.ZodDefault; - fileOptInTag: z.ZodDefault; - }, z.core.$strict>; - byStatus: z.ZodObject<{ - completed: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - active: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - planned: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>; - byPhase: z.ZodArray; - patterns: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - counts: z.ZodObject<{ - completed: z.ZodNumber; - active: z.ZodNumber; - planned: z.ZodNumber; - total: z.ZodNumber; - }, z.core.$strip>; - }, z.core.$strip>>; - byQuarter: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byCategory: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - bySource: z.ZodObject<{ - typescript: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - gherkin: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - roadmap: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - prd: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>; - counts: z.ZodObject<{ - completed: z.ZodNumber; - active: z.ZodNumber; - planned: z.ZodNumber; - total: z.ZodNumber; - }, z.core.$strip>; - phaseCount: z.ZodNumber; - categoryCount: z.ZodNumber; - relationshipIndex: z.ZodOptional; - usedBy: z.ZodArray; - dependsOn: z.ZodArray; - enables: z.ZodArray; - implementsPatterns: z.ZodArray; - implementedBy: z.ZodArray; - }, z.core.$strip>>; - extendsPattern: z.ZodOptional; - extendedBy: z.ZodArray; - seeAlso: z.ZodArray; - apiRef: z.ZodArray; - }, z.core.$strip>>>; - archIndex: z.ZodOptional>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byContext: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byLayer: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - byView: z.ZodRecord>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>>; - all: z.ZodArray>; - name: z.ZodString; - category: z.ZodPipe>, z.ZodTransform>; - directive: z.ZodObject<{ - tags: z.ZodReadonly>>>; - description: z.ZodDefault; - examples: z.ZodDefault>>; - position: z.ZodObject<{ - startLine: z.ZodNumber; - endLine: z.ZodNumber; - }, z.core.$strict>; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - phase: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implements: z.ZodOptional>>; - extends: z.ZodOptional; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - target: z.ZodOptional; - since: z.ZodOptional; - archRole: z.ZodOptional; - archContext: z.ZodOptional; - archLayer: z.ZodOptional; - include: z.ZodOptional>>; - productArea: z.ZodOptional; - extractShapes: z.ZodOptional>>; - convention: z.ZodOptional>>; - }, z.core.$strict>; - code: z.ZodString; - source: z.ZodObject<{ - file: z.ZodPipe>; - lines: z.ZodReadonly>; - }, z.core.$strict>; - exports: z.ZodDefault; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"type">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"const">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"interface">; - name: z.ZodString; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"class">; - name: z.ZodString; - signature: z.ZodOptional; - }, z.core.$strict>, z.ZodObject<{ - type: z.ZodLiteral<"enum">; - name: z.ZodString; - }, z.core.$strict>], "type">>>>; - extractedAt: z.ZodISODateTime; - patternName: z.ZodOptional; - status: z.ZodOptional>; - isCore: z.ZodOptional; - useCases: z.ZodOptional>>; - whenToUse: z.ZodOptional>>; - uses: z.ZodOptional>>; - usedBy: z.ZodOptional>>; - scenarios: z.ZodOptional>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; - }, z.core.$strict>>>>; - phase: z.ZodOptional; - release: z.ZodOptional; - brief: z.ZodOptional; - dependsOn: z.ZodOptional>>; - enables: z.ZodOptional>>; - implementsPatterns: z.ZodOptional>>; - extendsPattern: z.ZodOptional; - targetPath: z.ZodOptional; - since: z.ZodOptional; - convention: z.ZodOptional>>; - seeAlso: z.ZodOptional>>; - apiRef: z.ZodOptional>>; - quarter: z.ZodOptional; - completed: z.ZodOptional; - effort: z.ZodOptional; - team: z.ZodOptional; - productArea: z.ZodOptional; - userRole: z.ZodOptional; - businessValue: z.ZodOptional; - deliverables: z.ZodOptional; - tests: z.ZodNumber; - location: z.ZodString; - finding: z.ZodOptional; - release: z.ZodOptional; - }, z.core.$strict>>>>; - workflow: z.ZodOptional; - risk: z.ZodOptional; - priority: z.ZodOptional; - level: z.ZodOptional>; - parent: z.ZodOptional; - children: z.ZodOptional>>; - discoveredGaps: z.ZodOptional>>; - discoveredImprovements: z.ZodOptional>>; - discoveredRisks: z.ZodOptional>>; - discoveredLearnings: z.ZodOptional>>; - constraints: z.ZodOptional>>; - adr: z.ZodOptional; - adrStatus: z.ZodOptional>; - adrCategory: z.ZodOptional; - adrSupersedes: z.ZodOptional; - adrSupersededBy: z.ZodOptional; - title: z.ZodOptional; - behaviorFile: z.ZodOptional; - behaviorFileVerified: z.ZodOptional; - rules: z.ZodOptional>; - }, z.core.$strip>>>>; - archRole: z.ZodOptional>; - archContext: z.ZodOptional; - archLayer: z.ZodOptional>; - include: z.ZodOptional>>; - extractedShapes: z.ZodOptional; - sourceText: z.ZodString; - jsDoc: z.ZodOptional; - lineNumber: z.ZodNumber; - typeParameters: z.ZodOptional>>; - extends: z.ZodOptional>>; - overloads: z.ZodOptional>>; - exported: z.ZodDefault; - group: z.ZodOptional; - includes: z.ZodOptional>>; - propertyDocs: z.ZodOptional>>>; - params: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - returns: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>; - throws: z.ZodOptional; - description: z.ZodString; - }, z.core.$strip>>>>; - }, z.core.$strip>>>>; - }, z.core.$strict>>; - }, z.core.$strip>>; -}, z.core.$strip>; -export type MasterDataset = z.infer; -export type StatusGroups = z.infer; -export type StatusCounts = z.infer; -export type PhaseGroup = z.infer; -export type SourceViews = z.infer; -export type ImplementationRef = z.infer; -export type RelationshipEntry = z.infer; -export type ArchIndex = z.infer; -//# sourceMappingURL=master-dataset.d.ts.map \ No newline at end of file diff --git a/dist/validation-schemas/master-dataset.d.ts.map b/dist/validation-schemas/master-dataset.d.ts.map deleted file mode 100644 index fc06364d..00000000 --- a/dist/validation-schemas/master-dataset.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"master-dataset.d.ts","sourceRoot":"","sources":["../../src/validation-schemas/master-dataset.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/validation-schemas/master-dataset.js b/dist/validation-schemas/master-dataset.js deleted file mode 100644 index 863d9faf..00000000 --- a/dist/validation-schemas/master-dataset.js +++ /dev/null @@ -1,213 +0,0 @@ -/** - * @libar-docs - * @libar-docs-validation @libar-docs-core - * @libar-docs-pattern MasterDataset - * @libar-docs-status completed - * @libar-docs-uses Zod, ExtractedPattern, TagRegistry - * @libar-docs-used-by Orchestrator, SectionRenderer, ReportCodecs - * @libar-docs-usecase "When providing pre-computed views to section renderers" - * @libar-docs-usecase "When eliminating redundant filtering across generators" - * @libar-docs-extract-shapes MasterDatasetSchema, StatusGroupsSchema, StatusCountsSchema, PhaseGroupSchema, SourceViewsSchema, RelationshipEntrySchema, ArchIndexSchema - * @libar-docs-arch-role read-model - * @libar-docs-arch-context api - * @libar-docs-arch-layer domain - * @libar-docs-include codec-transformation - * - * ## MasterDataset - Unified Pattern Views Schema - * - * Defines the schema for a pre-computed dataset that holds all extracted patterns - * along with derived views (by status, phase, quarter, category, source). This enables - * single-pass transformation instead of redundant filtering in each section renderer. - * - * ### When to Use - * - * - Use when sections need filtered/grouped pattern views - * - Use when computing aggregate statistics across patterns - * - Use as input to report-specific codecs (RoadmapReport, TimelineReport, etc.) - * - * ### Key Concepts - * - * - **Single-pass computation**: All views computed in one iteration over patterns - * - **Pre-computed groups**: Status, phase, quarter, category, source groupings - * - **Aggregate statistics**: Counts, completion percentages, phase/category counts - * - **Type-safe views**: All views are typed via Zod schema inference - */ -import { z } from 'zod'; -import { ExtractedPatternSchema } from './extracted-pattern.js'; -import { TagRegistrySchema } from './tag-registry.js'; -// Note: We don't include workflow in the schema because LoadedWorkflow contains Maps -// which aren't JSON-serializable. The workflow is accessed via context, not stored. -// ═══════════════════════════════════════════════════════════════════════════ -// Pre-computed View Schemas -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Status-based grouping of patterns - * - * Patterns are normalized to three canonical states: - * - completed: implemented, completed - * - active: active, partial, in-progress - * - planned: roadmap, planned, undefined - */ -export const StatusGroupsSchema = z.object({ - /** Patterns with status 'completed' or 'implemented' */ - completed: z.array(ExtractedPatternSchema), - /** Patterns with status 'active', 'partial', or 'in-progress' */ - active: z.array(ExtractedPatternSchema), - /** Patterns with status 'roadmap', 'planned', or undefined */ - planned: z.array(ExtractedPatternSchema), -}); -/** - * Status counts for aggregate statistics - */ -export const StatusCountsSchema = z.object({ - /** Number of completed patterns */ - completed: z.number().int().nonnegative(), - /** Number of active patterns */ - active: z.number().int().nonnegative(), - /** Number of planned patterns */ - planned: z.number().int().nonnegative(), - /** Total number of patterns */ - total: z.number().int().nonnegative(), -}); -/** - * Phase grouping with patterns and counts - * - * Groups patterns by their phase number, with pre-computed - * status counts for each phase. - */ -export const PhaseGroupSchema = z.object({ - /** Phase number (e.g., 1, 2, 3, 14, 39) */ - phaseNumber: z.number().int(), - /** Optional phase name from workflow config */ - phaseName: z.string().optional(), - /** Patterns in this phase */ - patterns: z.array(ExtractedPatternSchema), - /** Pre-computed status counts for this phase */ - counts: StatusCountsSchema, -}); -/** - * Source-based views for different data origins - */ -export const SourceViewsSchema = z.object({ - /** Patterns from TypeScript files (.ts) */ - typescript: z.array(ExtractedPatternSchema), - /** Patterns from Gherkin feature files (.feature) */ - gherkin: z.array(ExtractedPatternSchema), - /** Patterns with phase metadata (roadmap items) */ - roadmap: z.array(ExtractedPatternSchema), - /** Patterns with PRD metadata (productArea, userRole, businessValue) */ - prd: z.array(ExtractedPatternSchema), -}); -/** - * Implementation reference for structured implementedBy entries - * - * Contains the implementing pattern/module name, source file path, - * and optional description for rendering in pattern documents. - */ -export const ImplementationRefSchema = z.object({ - /** Pattern/module name (for display) */ - name: z.string(), - /** Source file path (for linking) */ - file: z.string(), - /** Optional description from the implementing file */ - description: z.string().optional(), -}); -/** - * Relationship index for dependency tracking - * - * Maps pattern names to their relationship metadata. - */ -export const RelationshipEntrySchema = z.object({ - /** Patterns this pattern uses (from @libar-docs-uses) */ - uses: z.array(z.string()), - /** Patterns that use this pattern (from @libar-docs-used-by) */ - usedBy: z.array(z.string()), - /** Patterns this pattern depends on (from @libar-docs-depends-on) */ - dependsOn: z.array(z.string()), - /** Patterns this pattern enables (from @libar-docs-enables) */ - enables: z.array(z.string()), - // UML-inspired relationship fields (PatternRelationshipModel) - /** Patterns this item implements (realization relationship) */ - implementsPatterns: z.array(z.string()), - /** Files/patterns that implement this pattern (computed inverse with file paths) */ - implementedBy: z.array(ImplementationRefSchema), - /** Pattern this extends (generalization relationship) */ - extendsPattern: z.string().optional(), - /** Patterns that extend this pattern (computed inverse) */ - extendedBy: z.array(z.string()), - /** Related patterns for cross-reference without dependency (from @libar-docs-see-also tag) */ - seeAlso: z.array(z.string()), - /** File paths to implementation APIs (from @libar-docs-api-ref tag) */ - apiRef: z.array(z.string()), -}); -/** - * Architecture index for diagram generation - * - * Groups patterns by architectural metadata for rendering component diagrams. - */ -export const ArchIndexSchema = z.object({ - /** Patterns grouped by arch-role (bounded-context, projection, saga, etc.) */ - byRole: z.record(z.string(), z.array(ExtractedPatternSchema)), - /** Patterns grouped by arch-context (orders, inventory, etc.) */ - byContext: z.record(z.string(), z.array(ExtractedPatternSchema)), - /** Patterns grouped by arch-layer (domain, application, infrastructure) */ - byLayer: z.record(z.string(), z.array(ExtractedPatternSchema)), - /** Patterns grouped by include tag (cross-cutting content routing and diagram scoping) */ - byView: z.record(z.string(), z.array(ExtractedPatternSchema)), - /** Patterns with any architecture metadata (for diagram generation) */ - all: z.array(ExtractedPatternSchema), -}); -// ═══════════════════════════════════════════════════════════════════════════ -// Master Dataset Schema -// ═══════════════════════════════════════════════════════════════════════════ -/** - * Master Dataset - Unified view of all extracted patterns - * - * Contains raw patterns plus pre-computed views and statistics. - * This is the primary data structure passed to generators and sections. - */ -export const MasterDatasetSchema = z.object({ - // ───────────────────────────────────────────────────────────────────────── - // Raw Data - // ───────────────────────────────────────────────────────────────────────── - /** All extracted patterns (both TypeScript and Gherkin) */ - patterns: z.array(ExtractedPatternSchema), - /** Tag registry for category lookups */ - tagRegistry: TagRegistrySchema, - // Note: workflow is not in the Zod schema because LoadedWorkflow contains Maps - // (statusMap, phaseMap) which are not JSON-serializable. When workflow access - // is needed, get it from SectionContext/GeneratorContext instead. - // ───────────────────────────────────────────────────────────────────────── - // Pre-computed Views - // ───────────────────────────────────────────────────────────────────────── - /** Patterns grouped by normalized status */ - byStatus: StatusGroupsSchema, - /** Patterns grouped by phase number (sorted ascending) */ - byPhase: z.array(PhaseGroupSchema), - /** Patterns grouped by quarter (e.g., "Q4-2024") */ - byQuarter: z.record(z.string(), z.array(ExtractedPatternSchema)), - /** Patterns grouped by category */ - byCategory: z.record(z.string(), z.array(ExtractedPatternSchema)), - /** Patterns grouped by source type */ - bySource: SourceViewsSchema, - // ───────────────────────────────────────────────────────────────────────── - // Aggregate Statistics - // ───────────────────────────────────────────────────────────────────────── - /** Overall status counts */ - counts: StatusCountsSchema, - /** Number of distinct phases */ - phaseCount: z.number().int().nonnegative(), - /** Number of distinct categories */ - categoryCount: z.number().int().nonnegative(), - // ───────────────────────────────────────────────────────────────────────── - // Relationship Data (optional) - // ───────────────────────────────────────────────────────────────────────── - /** Optional relationship index for dependency graph */ - relationshipIndex: z.record(z.string(), RelationshipEntrySchema).optional(), - // ───────────────────────────────────────────────────────────────────────── - // Architecture Data (optional) - // ───────────────────────────────────────────────────────────────────────── - /** Optional architecture index for diagram generation */ - archIndex: ArchIndexSchema.optional(), -}); -//# sourceMappingURL=master-dataset.js.map \ No newline at end of file diff --git a/dist/validation-schemas/master-dataset.js.map b/dist/validation-schemas/master-dataset.js.map deleted file mode 100644 index 0bccca52..00000000 --- a/dist/validation-schemas/master-dataset.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"master-dataset.js","sourceRoot":"","sources":["../../src/validation-schemas/master-dataset.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,qFAAqF;AACrF,oFAAoF;AAEpF,8EAA8E;AAC9E,4BAA4B;AAC5B,8EAA8E;AAE9E;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,wDAAwD;IACxD,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,sBAAsB,CAAC;IAE1C,iEAAiE;IACjE,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,sBAAsB,CAAC;IAEvC,8DAA8D;IAC9D,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,sBAAsB,CAAC;CACzC,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,mCAAmC;IACnC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;IAEzC,gCAAgC;IAChC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;IAEtC,iCAAiC;IACjC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;IAEvC,+BAA+B;IAC/B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;CACtC,CAAC,CAAC;AAEH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,gBAAg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CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;IAE7C,4EAA4E;IAC5E,+BAA+B;IAC/B,4EAA4E;IAE5E,uDAAuD;IACvD,iBAAiB,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,uBAAuB,CAAC,CAAC,QAAQ,EAAE;IAE3E,4EAA4E;IAC5E,+BAA+B;IAC/B,4EAA4E;IAE5E,yDAAyD;IACzD,SAAS,EAAE,eAAe,CAAC,QAAQ,EAAE;CACtC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/validation-schemas/output-schemas.d.ts b/dist/validation-schemas/output-schemas.d.ts deleted file mode 100644 index 89b9ad1d..00000000 --- a/dist/validation-schemas/output-schemas.d.ts +++ /dev/null @@ -1,183 +0,0 @@ -/** - * @libar-docs - * @libar-docs-validation @libar-docs-core - * @libar-docs-pattern OutputSchemas - * @libar-docs-status completed - * @libar-docs-uses Zod, LintSeveritySchema - * @libar-docs-used-by LintEngine, ValidatePatternsCLI, Orchestrator - * @libar-docs-usecase "When serializing lint results to JSON" - * @libar-docs-usecase "When serializing validation results to JSON" - * @libar-docs-usecase "When writing registry metadata to JSON" - * - * ## OutputSchemas - JSON Output Format Schemas - * - * Zod schemas for JSON output formats used by CLI tools. - * These schemas document the contract for JSON consumers (CI tools, IDE integrations) - * and provide pre-serialization validation for type safety. - * - * ### When to Use - * - * - Use with createJsonOutputCodec() for type-safe JSON serialization - * - Reference as documentation for tooling that consumes CLI JSON output - * - * ### Key Concepts - * - * - **Output Schemas**: Define the shape of JSON output for external consumers - * - **Codec Pattern**: Validate before serialize, not just after parse - */ -import { z } from 'zod'; -/** - * Schema for individual lint violation in JSON output - * - * Simplified structure for external consumption (excludes `file` which is - * on the parent result object). - */ -export declare const LintViolationOutputSchema: z.ZodObject<{ - rule: z.ZodString; - severity: z.ZodEnum<{ - error: "error"; - warning: "warning"; - info: "info"; - }>; - message: z.ZodString; - line: z.ZodNumber; -}, z.core.$strip>; -/** - * Schema for lint result per file in JSON output - */ -export declare const LintResultOutputSchema: z.ZodObject<{ - file: z.ZodString; - violations: z.ZodArray; - message: z.ZodString; - line: z.ZodNumber; - }, z.core.$strip>>; -}, z.core.$strip>; -/** - * Schema for lint summary statistics in JSON output - */ -export declare const LintSummaryStatsSchema: z.ZodObject<{ - errors: z.ZodNumber; - warnings: z.ZodNumber; - info: z.ZodNumber; - filesScanned: z.ZodNumber; - directivesChecked: z.ZodNumber; -}, z.core.$strip>; -/** - * Schema for complete lint JSON output - * - * This is the schema for the output of `lint-patterns --format json` - */ -export declare const LintOutputSchema: z.ZodObject<{ - results: z.ZodArray; - message: z.ZodString; - line: z.ZodNumber; - }, z.core.$strip>>; - }, z.core.$strip>>; - summary: z.ZodObject<{ - errors: z.ZodNumber; - warnings: z.ZodNumber; - info: z.ZodNumber; - filesScanned: z.ZodNumber; - directivesChecked: z.ZodNumber; - }, z.core.$strip>; -}, z.core.$strip>; -export type LintOutput = z.infer; -/** - * Schema for validation issue severity - * - * @see src/taxonomy/severity-types.ts - */ -export declare const ValidationIssueSeveritySchema: z.ZodEnum<{ - error: "error"; - warning: "warning"; - info: "info"; -}>; -/** - * Schema for validation issue source - */ -export declare const ValidationIssueSourceSchema: z.ZodEnum<{ - typescript: "typescript"; - gherkin: "gherkin"; - "cross-source": "cross-source"; -}>; -/** - * Schema for individual validation issue in JSON output - */ -export declare const ValidationIssueOutputSchema: z.ZodObject<{ - severity: z.ZodEnum<{ - error: "error"; - warning: "warning"; - info: "info"; - }>; - message: z.ZodString; - source: z.ZodEnum<{ - typescript: "typescript"; - gherkin: "gherkin"; - "cross-source": "cross-source"; - }>; - pattern: z.ZodOptional; - file: z.ZodOptional; -}, z.core.$strip>; -/** - * Schema for validation statistics - */ -export declare const ValidationStatsSchema: z.ZodObject<{ - typescriptPatterns: z.ZodNumber; - gherkinPatterns: z.ZodNumber; - matched: z.ZodNumber; - missingInGherkin: z.ZodNumber; - missingInTypeScript: z.ZodNumber; -}, z.core.$strip>; -/** - * Schema for complete validation JSON output - * - * This is the schema for the output of `validate-patterns --format json` - */ -export declare const ValidationSummaryOutputSchema: z.ZodObject<{ - issues: z.ZodArray; - message: z.ZodString; - source: z.ZodEnum<{ - typescript: "typescript"; - gherkin: "gherkin"; - "cross-source": "cross-source"; - }>; - pattern: z.ZodOptional; - file: z.ZodOptional; - }, z.core.$strip>>; - stats: z.ZodObject<{ - typescriptPatterns: z.ZodNumber; - gherkinPatterns: z.ZodNumber; - matched: z.ZodNumber; - missingInGherkin: z.ZodNumber; - missingInTypeScript: z.ZodNumber; - }, z.core.$strip>; -}, z.core.$strip>; -export type ValidationSummaryOutput = z.infer; -/** - * Schema for registry metadata JSON output - * - * This is intentionally loose since generators can return arbitrary metadata. - * The schema ensures it's a valid JSON-serializable object. - */ -export declare const RegistryMetadataOutputSchema: z.ZodRecord; -export type RegistryMetadataOutput = z.infer; -//# sourceMappingURL=output-schemas.d.ts.map \ No newline at end of file diff --git a/dist/validation-schemas/output-schemas.d.ts.map b/dist/validation-schemas/output-schemas.d.ts.map deleted file mode 100644 index ce72b41c..00000000 --- a/dist/validation-schemas/output-schemas.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"output-schemas.d.ts","sourceRoot":"","sources":["../../src/validation-schemas/output-schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;iBASpC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;iBAKjC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;iBAWjC,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;iBAK3B,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAM1D;;;;GAIG;AACH,eAAO,MAAM,6BAA6B;;;;EAAyB,CAAC;AAEpE;;GAEG;AACH,eAAO,MAAM,2BAA2B;;;;EAAoD,CAAC;AAE7F;;GAEG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;iBAWtC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;;;iBAWhC,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;iBAKxC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAMpF;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B,wCAAoC,CAAC;AAE9E,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/validation-schemas/output-schemas.js b/dist/validation-schemas/output-schemas.js deleted file mode 100644 index ebe0765c..00000000 --- a/dist/validation-schemas/output-schemas.js +++ /dev/null @@ -1,149 +0,0 @@ -/** - * @libar-docs - * @libar-docs-validation @libar-docs-core - * @libar-docs-pattern OutputSchemas - * @libar-docs-status completed - * @libar-docs-uses Zod, LintSeveritySchema - * @libar-docs-used-by LintEngine, ValidatePatternsCLI, Orchestrator - * @libar-docs-usecase "When serializing lint results to JSON" - * @libar-docs-usecase "When serializing validation results to JSON" - * @libar-docs-usecase "When writing registry metadata to JSON" - * - * ## OutputSchemas - JSON Output Format Schemas - * - * Zod schemas for JSON output formats used by CLI tools. - * These schemas document the contract for JSON consumers (CI tools, IDE integrations) - * and provide pre-serialization validation for type safety. - * - * ### When to Use - * - * - Use with createJsonOutputCodec() for type-safe JSON serialization - * - Reference as documentation for tooling that consumes CLI JSON output - * - * ### Key Concepts - * - * - **Output Schemas**: Define the shape of JSON output for external consumers - * - **Codec Pattern**: Validate before serialize, not just after parse - */ -import { z } from 'zod'; -import { SEVERITY_TYPES } from '../taxonomy/index.js'; -import { LintSeveritySchema } from './lint.js'; -// ============================================================================ -// Lint Engine Output (engine.ts formatJson) -// ============================================================================ -/** - * Schema for individual lint violation in JSON output - * - * Simplified structure for external consumption (excludes `file` which is - * on the parent result object). - */ -export const LintViolationOutputSchema = z.object({ - /** Rule ID (e.g., 'missing-pattern-name') */ - rule: z.string(), - /** Severity level */ - severity: LintSeveritySchema, - /** Human-readable message */ - message: z.string(), - /** Line number in source file */ - line: z.number().int().nonnegative(), -}); -/** - * Schema for lint result per file in JSON output - */ -export const LintResultOutputSchema = z.object({ - /** Source file path */ - file: z.string(), - /** Violations found in this file */ - violations: z.array(LintViolationOutputSchema), -}); -/** - * Schema for lint summary statistics in JSON output - */ -export const LintSummaryStatsSchema = z.object({ - /** Total error count */ - errors: z.number().int().nonnegative(), - /** Total warning count */ - warnings: z.number().int().nonnegative(), - /** Total info count */ - info: z.number().int().nonnegative(), - /** Total files scanned */ - filesScanned: z.number().int().nonnegative(), - /** Total directives checked */ - directivesChecked: z.number().int().nonnegative(), -}); -/** - * Schema for complete lint JSON output - * - * This is the schema for the output of `lint-patterns --format json` - */ -export const LintOutputSchema = z.object({ - /** Results per file (only files with violations) */ - results: z.array(LintResultOutputSchema), - /** Summary statistics */ - summary: LintSummaryStatsSchema, -}); -// ============================================================================ -// Validate-Patterns Output (validate-patterns.ts formatJson) -// ============================================================================ -/** - * Schema for validation issue severity - * - * @see src/taxonomy/severity-types.ts - */ -export const ValidationIssueSeveritySchema = z.enum(SEVERITY_TYPES); -/** - * Schema for validation issue source - */ -export const ValidationIssueSourceSchema = z.enum(['typescript', 'gherkin', 'cross-source']); -/** - * Schema for individual validation issue in JSON output - */ -export const ValidationIssueOutputSchema = z.object({ - /** Severity level */ - severity: ValidationIssueSeveritySchema, - /** Human-readable message */ - message: z.string(), - /** Source of the issue */ - source: ValidationIssueSourceSchema, - /** Pattern name (optional) */ - pattern: z.string().optional(), - /** File path (optional) */ - file: z.string().optional(), -}); -/** - * Schema for validation statistics - */ -export const ValidationStatsSchema = z.object({ - /** Number of TypeScript patterns found */ - typescriptPatterns: z.number().int().nonnegative(), - /** Number of Gherkin patterns found */ - gherkinPatterns: z.number().int().nonnegative(), - /** Number of matched patterns */ - matched: z.number().int().nonnegative(), - /** Patterns in TypeScript missing from Gherkin */ - missingInGherkin: z.number().int().nonnegative(), - /** Patterns in Gherkin missing from TypeScript */ - missingInTypeScript: z.number().int().nonnegative(), -}); -/** - * Schema for complete validation JSON output - * - * This is the schema for the output of `validate-patterns --format json` - */ -export const ValidationSummaryOutputSchema = z.object({ - /** All validation issues */ - issues: z.array(ValidationIssueOutputSchema), - /** Validation statistics */ - stats: ValidationStatsSchema, -}); -// ============================================================================ -// Registry Metadata Output (orchestrator.ts registry.json) -// ============================================================================ -/** - * Schema for registry metadata JSON output - * - * This is intentionally loose since generators can return arbitrary metadata. - * The schema ensures it's a valid JSON-serializable object. - */ -export const RegistryMetadataOutputSchema = z.record(z.string(), z.unknown()); -//# sourceMappingURL=output-schemas.js.map \ No newline at end of file diff --git a/dist/validation-schemas/output-schemas.js.map b/dist/validation-schemas/output-schemas.js.map deleted file mode 100644 index eb2ff2da..00000000 --- a/dist/validation-schemas/output-schemas.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"output-schemas.js","sourceRoot":"","sources":["../../src/validation-schemas/output-schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE/C,+EAA+E;AAC/E,4CAA4C;AAC5C,+EAA+E;AAE/E;;;;;GAKG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,6CAA6C;IA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D,CAAC,CAAC;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAAC;IACpD,4BAA4B;IAC5B,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,2BAA2B,CAAC;IAC5C,4BAA4B;IAC5B,KAAK,EAAE,qBAAqB;CAC7B,CAAC,CAAC;AAIH,+EAA+E;AAC/E,2DAA2D;AAC3D,+EAA+E;AAE/E;;;;;GAKG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/validation-schemas/scenario-ref.d.ts b/dist/validation-schemas/scenario-ref.d.ts deleted file mode 100644 index ce36df09..00000000 --- a/dist/validation-schemas/scenario-ref.d.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { z } from 'zod'; -/** - * Schema for DataTable attached to scenario steps - */ -export declare const ScenarioDataTableSchema: z.ZodObject<{ - headers: z.ZodReadonly>; - rows: z.ZodReadonly>>; -}, z.core.$strict>; -export type ScenarioDataTable = z.infer; -/** - * Schema for a DocString attached to a step - * - * DocStrings can have an optional mediaType that specifies the content language - * (e.g., "typescript", "json", "jsdoc") for proper syntax highlighting. - */ -export declare const ScenarioDocStringSchema: z.ZodObject<{ - content: z.ZodString; - mediaType: z.ZodOptional; -}, z.core.$strict>; -export type ScenarioDocString = z.infer; -/** - * Schema for scenario steps with optional DataTable/DocString - * - * Mirrors GherkinStep type but with Zod validation. - */ -export declare const ScenarioStepSchema: z.ZodObject<{ - keyword: z.ZodString; - text: z.ZodString; - dataTable: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; -}, z.core.$strict>; -export type ScenarioStep = z.infer; -/** - * Schema for scenario references from Gherkin feature files - * - * This schema defines the structure for scenario references - * used in ExtractedPattern.scenarios. - */ -export declare const ScenarioRefSchema: z.ZodObject<{ - featureFile: z.ZodString; - featureName: z.ZodString; - featureDescription: z.ZodString; - scenarioName: z.ZodString; - semanticTags: z.ZodReadonly>; - tags: z.ZodReadonly>; - steps: z.ZodOptional>; - rows: z.ZodReadonly>>; - }, z.core.$strict>>; - docString: z.ZodOptional; - }, z.core.$strict>>; - }, z.core.$strict>>>>; - layer: z.ZodOptional>; - line: z.ZodOptional; -}, z.core.$strict>; -/** - * Type alias inferred from schema - * - * **Schema-First Law**: Type automatically derives from Zod schema. - */ -export type ScenarioRef = z.infer; -//# sourceMappingURL=scenario-ref.d.ts.map \ No newline at end of file diff --git a/dist/validation-schemas/scenario-ref.d.ts.map b/dist/validation-schemas/scenario-ref.d.ts.map deleted file mode 100644 index 369178b3..00000000 --- a/dist/validation-schemas/scenario-ref.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scenario-ref.d.ts","sourceRoot":"","sources":["../../src/validation-schemas/scenario-ref.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;kBAOzB,CAAC;AAEZ,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB;;;kBAOzB,CAAC;AAEZ,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE;;;;GAIG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;kBAWpB,CAAC;AAEZ,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAqBnB,CAAC;AAEZ;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/validation-schemas/scenario-ref.js b/dist/validation-schemas/scenario-ref.js deleted file mode 100644 index f88209dc..00000000 --- a/dist/validation-schemas/scenario-ref.js +++ /dev/null @@ -1,73 +0,0 @@ -import { z } from 'zod'; -import { LAYER_TYPES } from '../taxonomy/index.js'; -/** - * Schema for DataTable attached to scenario steps - */ -export const ScenarioDataTableSchema = z - .object({ - /** Column headers from the first row */ - headers: z.array(z.string()).readonly(), - /** Data rows (excluding header row), each row maps column name to value */ - rows: z.array(z.record(z.string(), z.string())).readonly(), -}) - .strict(); -/** - * Schema for a DocString attached to a step - * - * DocStrings can have an optional mediaType that specifies the content language - * (e.g., "typescript", "json", "jsdoc") for proper syntax highlighting. - */ -export const ScenarioDocStringSchema = z - .object({ - /** The DocString content */ - content: z.string(), - /** Optional media type / language hint (e.g., "typescript", "json", "jsdoc") */ - mediaType: z.string().optional(), -}) - .strict(); -/** - * Schema for scenario steps with optional DataTable/DocString - * - * Mirrors GherkinStep type but with Zod validation. - */ -export const ScenarioStepSchema = z - .object({ - /** Step keyword (Given, When, Then, And, But) */ - keyword: z.string(), - /** Step text */ - text: z.string(), - /** Optional DataTable attached to this step */ - dataTable: ScenarioDataTableSchema.optional(), - /** Optional DocString attached to this step (with content and optional mediaType) */ - docString: ScenarioDocStringSchema.optional(), -}) - .strict(); -/** - * Schema for scenario references from Gherkin feature files - * - * This schema defines the structure for scenario references - * used in ExtractedPattern.scenarios. - */ -export const ScenarioRefSchema = z - .object({ - /** Absolute path to the feature file */ - featureFile: z.string(), - /** Name of the feature */ - featureName: z.string(), - /** Description of the feature (from lines between Feature: and Background:/Scenario:) */ - featureDescription: z.string(), - /** Name of the scenario */ - scenarioName: z.string(), - /** Semantic tags on the scenario (e.g., @happy-path, @validation) */ - semanticTags: z.array(z.string()).readonly(), - /** All tags on the scenario (excluding @pattern:*) */ - tags: z.array(z.string()).readonly(), - /** Scenario steps with Given/When/Then (optional for backward compatibility) */ - steps: z.array(ScenarioStepSchema).readonly().optional(), - /** Inferred feature layer based on directory path (timeline, domain, integration, e2e, component) */ - layer: z.enum(LAYER_TYPES).optional(), - /** Line number in feature file (for traceability links) */ - line: z.number().int().positive().optional(), -}) - .strict(); -//# sourceMappingURL=scenario-ref.js.map \ No newline at end of file diff --git a/dist/validation-schemas/scenario-ref.js.map b/dist/validation-schemas/scenario-ref.js.map deleted file mode 100644 index 5efdeeb7..00000000 --- a/dist/validation-schemas/scenario-ref.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scenario-ref.js","sourceRoot":"","sources":["../../src/validation-schemas/scenario-ref.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC;KACrC,MAAM,CAAC;IACN,wCAAwC;IACxC,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACvC,2EAA2E;IAC3E,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE;CAC3D,CAAC;KACD,MAAM,EAAE,CAAC;AAIZ;;;;;GAKG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC;KACrC,MAAM,CAAC;IACN,4BAA4B;IAC5B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,gFAAgF;IAChF,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACjC,CAAC;KACD,MAAM,EAAE,CAAC;AAIZ;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBA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emas/tag-registry.d.ts deleted file mode 100644 index e70c1573..00000000 --- a/dist/validation-schemas/tag-registry.d.ts +++ /dev/null @@ -1,210 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core @libar-docs-infra - * @libar-docs-pattern Tag Registry Configuration - * @libar-docs-status completed - * - * ## Tag Registry Configuration Schema - * - * Defines the structure and validation for tag taxonomy configuration. - * The taxonomy is defined in TypeScript at src/taxonomy/ and built via buildRegistry(). - * - * ### When to Use - * - * - Validating tag registry configuration at runtime - * - Merging custom registry overrides with default registry - * - Creating delivery process instances with custom categories - */ -import { z } from 'zod'; -/** - * Category definition schema - * - * Defines a documentation category (e.g., "core", "ddd", "event-sourcing"). - * Categories organize patterns by domain and determine priority when a pattern - * has multiple category tags. - * - * @example - * ```typescript - * { - * tag: "event-sourcing", - * domain: "Event Sourcing", - * priority: 4, - * description: "Event store, aggregates, replay", - * aliases: ["es"] - * } - * ``` - */ -export declare const CategoryDefinitionSchema: z.ZodObject<{ - tag: z.ZodString; - domain: z.ZodString; - priority: z.ZodNumber; - description: z.ZodString; - aliases: z.ZodDefault>>; -}, z.core.$strict>; -export type CategoryDefinition = z.infer; -/** - * Metadata tag definition schema - * - * Defines a metadata tag (e.g., "pattern", "status", "usecase"). - * Metadata tags provide additional information about patterns beyond categorization. - * - * @example - * ```typescript - * { - * tag: "status", - * format: "enum", - * purpose: "Implementation status", - * required: false, - * values: ["roadmap", "active", "completed"], - * default: "roadmap", - * example: "@libar-docs-status completed" - * } - * ``` - */ -export declare const MetadataTagDefinitionSchema: z.ZodObject<{ - tag: z.ZodString; - format: z.ZodEnum<{ - number: "number"; - value: "value"; - enum: "enum"; - "quoted-value": "quoted-value"; - csv: "csv"; - flag: "flag"; - }>; - purpose: z.ZodString; - required: z.ZodDefault>; - repeatable: z.ZodDefault>; - values: z.ZodOptional>; - default: z.ZodOptional; - example: z.ZodOptional; - metadataKey: z.ZodOptional; - transform: z.ZodOptional>; -}, z.core.$strict>; -export type MetadataTagDefinition = z.infer; -/** - * Aggregation tag definition schema - * - * Defines tags that route patterns to specific aggregated documents - * (e.g., OVERVIEW.md, DECISIONS.md). - * - * @example - * ```typescript - * { - * tag: "overview", - * targetDoc: "OVERVIEW.md", - * purpose: "Architecture overview patterns" - * } - * ``` - */ -export declare const AggregationTagDefinitionSchema: z.ZodObject<{ - tag: z.ZodString; - targetDoc: z.ZodNullable; - purpose: z.ZodString; -}, z.core.$strict>; -export type AggregationTagDefinition = z.infer; -/** - * Complete tag registry schema - * - * Defines the full taxonomy configuration for a project, including all categories, - * metadata tags, aggregation tags, and format options. - * - * @example - * ```typescript - * { - * version: "1.0.0", - * categories: [ - * { tag: "core", domain: "Core", priority: 1, description: "Core utilities", aliases: [] } - * ], - * metadataTags: [ - * { tag: "pattern", format: "value", purpose: "Pattern name", required: true } - * ], - * aggregationTags: [ - * { tag: "overview", targetDoc: "OVERVIEW.md", purpose: "Overview patterns" } - * ], - * formatOptions: ["full", "list", "summary"], - * tagPrefix: "@libar-docs-", - * fileOptInTag: "@libar-docs" - * } - * ``` - */ -export declare const TagRegistrySchema: z.ZodObject<{ - $schema: z.ZodOptional; - version: z.ZodDefault; - categories: z.ZodArray>>; - }, z.core.$strict>>; - metadataTags: z.ZodArray; - purpose: z.ZodString; - required: z.ZodDefault>; - repeatable: z.ZodDefault>; - values: z.ZodOptional>; - default: z.ZodOptional; - example: z.ZodOptional; - metadataKey: z.ZodOptional; - transform: z.ZodOptional>; - }, z.core.$strict>>; - aggregationTags: z.ZodArray; - purpose: z.ZodString; - }, z.core.$strict>>; - formatOptions: z.ZodDefault>; - tagPrefix: z.ZodDefault; - fileOptInTag: z.ZodDefault; -}, z.core.$strict>; -export type TagRegistry = z.infer; -/** - * Create default tag registry - * - * Delegates to the taxonomy module's buildRegistry() function which is - * the single source of truth for all taxonomy definitions. - * - * @returns Default tag registry with all categories and metadata tags - * - * @see src/taxonomy/registry-builder.ts - * - * @example - * ```typescript - * const defaultRegistry = createDefaultTagRegistry(); - * console.log(defaultRegistry.categories); // Full DDD/ES/CQRS taxonomy - * ``` - */ -export declare function createDefaultTagRegistry(): TagRegistry; -/** - * Merge user registry with default registry - * - * Performs deep merge where user registry extends and overrides defaults: - * - Categories: Merged by tag (user overrides default, user additions kept) - * - MetadataTags: Merged by tag (user overrides default, user additions kept) - * - AggregationTags: Merged by tag (user overrides default) - * - FormatOptions: Full replacement if specified - * - TagPrefix: Full replacement if specified - * - FileOptInTag: Full replacement if specified - * - * @param base - Base registry (usually default registry) - * @param override - User registry to merge on top - * @returns Merged registry - * - * @example - * ```typescript - * const base = createDefaultTagRegistry(); - * const user = { categories: [{ tag: "core", domain: "Core", priority: 10, description: "..." }] }; - * const merged = mergeTagRegistries(base, user); - * // merged.categories[0].priority === 10 (user override) - * ``` - */ -export declare function mergeTagRegistries(base: TagRegistry, override: Partial): TagRegistry; -//# sourceMappingURL=tag-registry.d.ts.map \ No newline at end of file diff --git a/dist/validation-schemas/tag-registry.d.ts.map b/dist/validation-schemas/tag-registry.d.ts.map deleted file mode 100644 index 5b61c54f..00000000 --- a/dist/validation-schemas/tag-registry.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"tag-registry.d.ts","sourceRoot":"","sources":["../../src/validation-schemas/tag-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,wBAAwB;;;;;;kBAa1B,CAAC;AAEZ,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;kBAuB7B,CAAC;AAEZ,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,8BAA8B;;;;kBAShC,CAAC;AAEZ,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAEtF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAmBnB,CAAC;AAEZ,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,wBAAwB,IAAI,WAAW,CAiBtD;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,CAAC,WAAW,CAAC,GAAG,WAAW,CA6BjG"} \ No newline at end of file diff --git a/dist/validation-schemas/tag-registry.js b/dist/validation-schemas/tag-registry.js deleted file mode 100644 index a8f7c2f3..00000000 --- a/dist/validation-schemas/tag-registry.js +++ /dev/null @@ -1,248 +0,0 @@ -/** - * @libar-docs - * @libar-docs-core @libar-docs-infra - * @libar-docs-pattern Tag Registry Configuration - * @libar-docs-status completed - * - * ## Tag Registry Configuration Schema - * - * Defines the structure and validation for tag taxonomy configuration. - * The taxonomy is defined in TypeScript at src/taxonomy/ and built via buildRegistry(). - * - * ### When to Use - * - * - Validating tag registry configuration at runtime - * - Merging custom registry overrides with default registry - * - Creating delivery process instances with custom categories - */ -import { z } from 'zod'; -import { buildRegistry, FORMAT_TYPES } from '../taxonomy/index.js'; -/** - * Category definition schema - * - * Defines a documentation category (e.g., "core", "ddd", "event-sourcing"). - * Categories organize patterns by domain and determine priority when a pattern - * has multiple category tags. - * - * @example - * ```typescript - * { - * tag: "event-sourcing", - * domain: "Event Sourcing", - * priority: 4, - * description: "Event store, aggregates, replay", - * aliases: ["es"] - * } - * ``` - */ -export const CategoryDefinitionSchema = z - .object({ - /** Tag name (without prefix), e.g., "event-sourcing" */ - tag: z.string().min(1, 'Category tag cannot be empty').max(100), - /** Display name for the category, e.g., "Event Sourcing" */ - domain: z.string().min(1, 'Category domain cannot be empty').max(200), - /** Priority for category selection (lower number = higher priority) */ - priority: z.number().int().positive('Priority must be a positive integer'), - /** Human-readable description of what this category represents */ - description: z.string().max(1000), - /** Alternative tag names that map to this category */ - aliases: z.array(z.string().max(100)).max(20).optional().default([]), -}) - .strict(); -/** - * Metadata tag definition schema - * - * Defines a metadata tag (e.g., "pattern", "status", "usecase"). - * Metadata tags provide additional information about patterns beyond categorization. - * - * @example - * ```typescript - * { - * tag: "status", - * format: "enum", - * purpose: "Implementation status", - * required: false, - * values: ["roadmap", "active", "completed"], - * default: "roadmap", - * example: "@libar-docs-status completed" - * } - * ``` - */ -export const MetadataTagDefinitionSchema = z - .object({ - /** Tag name (without prefix), e.g., "status" */ - tag: z.string().min(1, 'Metadata tag cannot be empty').max(100), - /** Format specifies how the tag value is parsed (from taxonomy/format-types.ts) */ - format: z.enum(FORMAT_TYPES), - /** Human-readable description of the tag's purpose */ - purpose: z.string().max(1000), - /** Whether this tag is required for all patterns */ - required: z.boolean().optional().default(false), - /** Whether this tag can appear multiple times */ - repeatable: z.boolean().optional().default(false), - /** Valid values for enum format */ - values: z.array(z.string().max(200)).max(50).optional(), - /** Default value if tag is not specified */ - default: z.string().max(200).optional(), - /** Example usage of this tag */ - example: z.string().max(500).optional(), - /** Maps tag name to metadata object property name (defaults to kebab-to-camelCase) */ - metadataKey: z.string().max(100).optional(), - /** Post-parse value transformer (runtime-only, not serializable) */ - transform: z.function().optional(), -}) - .strict(); -/** - * Aggregation tag definition schema - * - * Defines tags that route patterns to specific aggregated documents - * (e.g., OVERVIEW.md, DECISIONS.md). - * - * @example - * ```typescript - * { - * tag: "overview", - * targetDoc: "OVERVIEW.md", - * purpose: "Architecture overview patterns" - * } - * ``` - */ -export const AggregationTagDefinitionSchema = z - .object({ - /** Tag name (without prefix), e.g., "overview" */ - tag: z.string().min(1, 'Aggregation tag cannot be empty').max(100), - /** Target document filename, or null for template placeholders only */ - targetDoc: z.string().max(200).nullable(), - /** Human-readable description of where patterns with this tag appear */ - purpose: z.string().max(1000), -}) - .strict(); -/** - * Complete tag registry schema - * - * Defines the full taxonomy configuration for a project, including all categories, - * metadata tags, aggregation tags, and format options. - * - * @example - * ```typescript - * { - * version: "1.0.0", - * categories: [ - * { tag: "core", domain: "Core", priority: 1, description: "Core utilities", aliases: [] } - * ], - * metadataTags: [ - * { tag: "pattern", format: "value", purpose: "Pattern name", required: true } - * ], - * aggregationTags: [ - * { tag: "overview", targetDoc: "OVERVIEW.md", purpose: "Overview patterns" } - * ], - * formatOptions: ["full", "list", "summary"], - * tagPrefix: "@libar-docs-", - * fileOptInTag: "@libar-docs" - * } - * ``` - */ -export const TagRegistrySchema = z - .object({ - /** JSON Schema reference (standard $schema property, optional) */ - $schema: z.string().max(500).optional(), - /** Schema version for future compatibility */ - version: z.string().max(20).default('1.0.0'), - /** Category definitions for organizing patterns */ - categories: z.array(CategoryDefinitionSchema).max(1000), - /** Metadata tag definitions for pattern enrichment */ - metadataTags: z.array(MetadataTagDefinitionSchema).max(100), - /** Aggregation tag definitions for document routing */ - aggregationTags: z.array(AggregationTagDefinitionSchema).max(50), - /** Valid format options for template placeholders */ - formatOptions: z.array(z.string().max(50)).max(20).default(['full', 'list', 'summary']), - /** Prefix used for all delivery-process tags */ - tagPrefix: z.string().max(50).default('@libar-docs-'), - /** File-level opt-in tag that gates extraction */ - fileOptInTag: z.string().max(50).default('@libar-docs'), -}) - .strict(); -/** - * Create default tag registry - * - * Delegates to the taxonomy module's buildRegistry() function which is - * the single source of truth for all taxonomy definitions. - * - * @returns Default tag registry with all categories and metadata tags - * - * @see src/taxonomy/registry-builder.ts - * - * @example - * ```typescript - * const defaultRegistry = createDefaultTagRegistry(); - * console.log(defaultRegistry.categories); // Full DDD/ES/CQRS taxonomy - * ``` - */ -export function createDefaultTagRegistry() { - const registry = buildRegistry(); - // Convert readonly arrays to mutable for compatibility with TagRegistry type - return { - version: registry.version, - categories: [...registry.categories].map((c) => ({ ...c, aliases: [...c.aliases] })), - metadataTags: [...registry.metadataTags].map((t) => ({ - ...t, - values: t.values ? [...t.values] : undefined, - required: t.required ?? false, - repeatable: t.repeatable ?? false, - })), - aggregationTags: [...registry.aggregationTags], - formatOptions: [...registry.formatOptions], - tagPrefix: registry.tagPrefix, - fileOptInTag: registry.fileOptInTag, - }; -} -/** - * Merge user registry with default registry - * - * Performs deep merge where user registry extends and overrides defaults: - * - Categories: Merged by tag (user overrides default, user additions kept) - * - MetadataTags: Merged by tag (user overrides default, user additions kept) - * - AggregationTags: Merged by tag (user overrides default) - * - FormatOptions: Full replacement if specified - * - TagPrefix: Full replacement if specified - * - FileOptInTag: Full replacement if specified - * - * @param base - Base registry (usually default registry) - * @param override - User registry to merge on top - * @returns Merged registry - * - * @example - * ```typescript - * const base = createDefaultTagRegistry(); - * const user = { categories: [{ tag: "core", domain: "Core", priority: 10, description: "..." }] }; - * const merged = mergeTagRegistries(base, user); - * // merged.categories[0].priority === 10 (user override) - * ``` - */ -export function mergeTagRegistries(base, override) { - // Helper to merge arrays by tag, with user overrides taking precedence - function mergeByTag(baseArr, overrideArr) { - if (!overrideArr) - return baseArr; - const merged = new Map(); - // Add all base items - for (const item of baseArr) { - merged.set(item.tag, item); - } - // Override/add user items - for (const item of overrideArr) { - merged.set(item.tag, item); - } - return Array.from(merged.values()); - } - return { - version: override.version ?? base.version, - categories: mergeByTag(base.categories, override.categories), - metadataTags: mergeByTag(base.metadataTags, override.metadataTags), - aggregationTags: mergeByTag(base.aggregationTags, override.aggregationTags), - formatOptions: override.formatOptions ?? base.formatOptions, - tagPrefix: override.tagPrefix ?? base.tagPrefix, - fileOptInTag: override.fileOptInTag ?? base.fileOptInTag, - }; -} -//# sourceMappingURL=tag-registry.js.map \ No newline at end of file diff --git a/dist/validation-schemas/tag-registry.js.map b/dist/validation-schemas/tag-registry.js.map deleted file mode 100644 index a5b6f4c4..00000000 --- a/dist/validation-schemas/tag-registry.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"tag-registry.js","sourceRoot":"","sources":["../../src/validation-schemas/tag-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEnE;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC;KACtC,MAAM,CAAC;IACN,wDAAwD;IACxD,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,8BAA8B,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IAC/D,4DAA4D;IAC5D,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,iCAAiC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IACrE,uEAAuE;IACvE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,qCAAqC,CAAC;IAC1E,kEAAkE;IAClE,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC;IACjC,sDAAsD;IACtD,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;CACrE,CAAC;KACD,MAAM,EAAE,CAAC;AAIZ;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC;KACzC,MAAM,CAAC;IACN,gDAAgD;IAChD,GAAG,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CAA4B,OAAY,EAAE,WAAiB;QAC5E,IAAI,CAAC,WAAW;YAAE,OAAO,OAAO,CAAC;QAEjC,MAAM,MAAM,GAAG,IAAI,GAAG,EAAa,CAAC;QAEpC,qBAAqB;QACrB,KAAK,MAAM,IAAI,IAAI,OAAO,EAAE,CAAC;YAC3B,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QAC7B,CAAC;QAED,0BAA0B;QAC1B,KAAK,MAAM,IAAI,IAAI,WAAW,EAAE,CAAC;YAC/B,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QAC7B,CAAC;QAED,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;IACrC,CAAC;IAED,OAAO;QACL,OAAO,EAAE,QAAQ,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO;QACzC,UAAU,EAAE,UAAU,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,UAAU,CAAC;QAC5D,YAAY,EAAE,UAAU,CAAC,IAAI,CAAC,YAAY,EAAE,QAAQ,CAAC,YAAY,CAAC;QAClE,eAAe,EAAE,UAAU,CAAC,IAAI,CAAC,eAAe,EAAE,QAAQ,CAAC,eAAe,CAAC;QAC3E,aAAa,EAAE,QAAQ,CAAC,aAAa,IAAI,IAAI,CAAC,aAAa;QAC3D,SAAS,EAAE,QAAQ,CAAC,SAAS,IAAI,IAAI,CAAC,SAAS;QAC/C,YAAY,EAAE,QAAQ,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY;KACzD,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/dist/validation-schemas/workflow-config.d.ts b/dist/validation-schemas/workflow-config.d.ts deleted file mode 100644 index c609deb4..00000000 --- a/dist/validation-schemas/workflow-config.d.ts +++ /dev/null @@ -1,125 +0,0 @@ -/** - * @libar-docs - * @libar-docs-validation @libar-docs-config - * @libar-docs-pattern WorkflowConfigSchema - * @libar-docs-status completed - * @libar-docs-used-by WorkflowLoader, ConfigurableWorkflows - * - * ## WorkflowConfigSchema - Workflow Configuration Validation - * - * Zod schemas for validating workflow configuration files that define - * status models, phase definitions, and artifact mappings. - * - * ### When to Use - * - * - When validating workflow configuration (inline defaults or custom files) - * - When validating custom workflow configurations - * - When creating new workflow definitions - */ -import { z } from 'zod'; -/** - * Status definition within a workflow - * - * Each status has a name, display emoji, and optional transition rules. - */ -export declare const WorkflowStatusSchema: z.ZodObject<{ - name: z.ZodString; - emoji: z.ZodString; - label: z.ZodOptional; - description: z.ZodOptional; - transitionsTo: z.ZodOptional>; - terminal: z.ZodOptional; -}, z.core.$strict>; -export type WorkflowStatus = z.infer; -/** - * Artifact mapping for a workflow phase - * - * Defines which artifacts are read/written during each phase. - */ -export declare const PhaseArtifactsSchema: z.ZodObject<{ - reads: z.ZodOptional>; - writes: z.ZodOptional>; -}, z.core.$strict>; -export type PhaseArtifacts = z.infer; -/** - * Phase definition within a workflow - * - * Phases are the stages of work delivery (e.g., Inception, Construction). - */ -export declare const WorkflowPhaseSchema: z.ZodObject<{ - name: z.ZodString; - description: z.ZodOptional; - statusOnEntry: z.ZodOptional; - artifacts: z.ZodOptional>; - writes: z.ZodOptional>; - }, z.core.$strict>>; - order: z.ZodOptional; -}, z.core.$strict>; -export type WorkflowPhase = z.infer; -/** - * Complete workflow configuration - * - * Defines a delivery workflow with statuses, phases, and metadata. - * Multiple workflows can be defined (e.g., 6-phase-standard, 3-phase-minimal). - */ -export declare const WorkflowConfigSchema: z.ZodObject<{ - name: z.ZodString; - version: z.ZodString; - description: z.ZodOptional; - statuses: z.ZodArray; - description: z.ZodOptional; - transitionsTo: z.ZodOptional>; - terminal: z.ZodOptional; - }, z.core.$strict>>; - phases: z.ZodArray; - statusOnEntry: z.ZodOptional; - artifacts: z.ZodOptional>; - writes: z.ZodOptional>; - }, z.core.$strict>>; - order: z.ZodOptional; - }, z.core.$strict>>; - defaultStatus: z.ZodOptional; - metadata: z.ZodOptional; - lastUpdated: z.ZodOptional; - tags: z.ZodOptional>; - }, z.core.$strip>>; -}, z.core.$strict>; -export type WorkflowConfig = z.infer; -/** - * Loaded workflow with computed lookup maps - * - * Runtime representation that includes fast status/phase lookup. - */ -export interface LoadedWorkflow { - /** Original config */ - readonly config: WorkflowConfig; - /** Status lookup by name (case-insensitive) */ - readonly statusMap: Map; - /** Phase lookup by name (case-insensitive) */ - readonly phaseMap: Map; -} -/** - * Create a LoadedWorkflow from a WorkflowConfig - * - * Builds lookup maps for efficient status/phase resolution. - * - * @param config - Validated workflow configuration - * @returns LoadedWorkflow with lookup maps - */ -export declare function createLoadedWorkflow(config: WorkflowConfig): LoadedWorkflow; -/** - * Runtime type guard for WorkflowConfig - * - * @param value - Value to check - * @returns True if value conforms to WorkflowConfigSchema - */ -export declare function isWorkflowConfig(value: unknown): value is WorkflowConfig; -//# sourceMappingURL=workflow-config.d.ts.map \ No newline at end of file diff --git a/dist/validation-schemas/workflow-config.d.ts.map b/dist/validation-schemas/workflow-config.d.ts.map deleted file mode 100644 index cc7e675a..00000000 --- a/dist/validation-schemas/workflow-config.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"workflow-config.d.ts","sourceRoot":"","sources":["../../src/validation-schemas/workflow-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AACH,eAAO,MAAM,oBAAoB;;;;;;;kBAoBtB,CAAC;AAEZ,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE;;;;GAIG;AACH,eAAO,MAAM,oBAAoB;;;kBAQtB,CAAC;AAEZ,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE;;;;GAIG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;kBAiBrB,CAAC;AAEZ,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAkCtB,CAAC;AAEZ,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,sBAAsB;IACtB,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAEhC,+CAA+C;IAC/C,QAAQ,CAAC,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAEhD,8CAA8C;IAC9C,QAAQ,CAAC,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;CAC/C;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,cAAc,GAAG,cAAc,CAgB3E;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,cAAc,CAExE"} \ No newline at end of file diff --git a/dist/validation-schemas/workflow-config.js b/dist/validation-schemas/workflow-config.js deleted file mode 100644 index 1a57a883..00000000 --- a/dist/validation-schemas/workflow-config.js +++ /dev/null @@ -1,138 +0,0 @@ -/** - * @libar-docs - * @libar-docs-validation @libar-docs-config - * @libar-docs-pattern WorkflowConfigSchema - * @libar-docs-status completed - * @libar-docs-used-by WorkflowLoader, ConfigurableWorkflows - * - * ## WorkflowConfigSchema - Workflow Configuration Validation - * - * Zod schemas for validating workflow configuration files that define - * status models, phase definitions, and artifact mappings. - * - * ### When to Use - * - * - When validating workflow configuration (inline defaults or custom files) - * - When validating custom workflow configurations - * - When creating new workflow definitions - */ -import { z } from 'zod'; -/** - * Status definition within a workflow - * - * Each status has a name, display emoji, and optional transition rules. - */ -export const WorkflowStatusSchema = z - .object({ - /** Status identifier (e.g., "roadmap", "active", "completed") */ - name: z.string().min(1), - /** Display emoji for this status */ - emoji: z.string().min(1), - /** Human-readable label (optional, defaults to capitalized name) */ - label: z.string().optional(), - /** Human-readable description of what this status means */ - description: z.string().optional(), - /** Status IDs this status can transition to (for validation) */ - transitionsTo: z.array(z.string()).optional(), - /** Whether this is a terminal status (no further transitions) */ - terminal: z.boolean().optional(), -}) - .strict(); -/** - * Artifact mapping for a workflow phase - * - * Defines which artifacts are read/written during each phase. - */ -export const PhaseArtifactsSchema = z - .object({ - /** Artifacts read during this phase */ - reads: z.array(z.string()).optional(), - /** Artifacts produced during this phase */ - writes: z.array(z.string()).optional(), -}) - .strict(); -/** - * Phase definition within a workflow - * - * Phases are the stages of work delivery (e.g., Inception, Construction). - */ -export const WorkflowPhaseSchema = z - .object({ - /** Phase name (e.g., "Inception", "Construction") */ - name: z.string().min(1), - /** Human-readable description of this phase */ - description: z.string().optional(), - /** Status assigned when entering this phase */ - statusOnEntry: z.string().optional(), - /** Artifact read/write mappings for this phase */ - artifacts: PhaseArtifactsSchema.optional(), - /** Order index for sorting phases (lower = earlier) */ - order: z.number().int().nonnegative().optional(), -}) - .strict(); -/** - * Complete workflow configuration - * - * Defines a delivery workflow with statuses, phases, and metadata. - * Multiple workflows can be defined (e.g., 6-phase-standard, 3-phase-minimal). - */ -export const WorkflowConfigSchema = z - .object({ - /** Workflow name (e.g., "6-phase-standard") */ - name: z.string().min(1), - /** Semantic version for config compatibility */ - version: z.string().regex(/^\d+\.\d+\.\d+$/, 'Version must be semver format'), - /** Human-readable description */ - description: z.string().optional(), - /** Status definitions for this workflow */ - statuses: z.array(WorkflowStatusSchema).min(1), - /** Phase definitions for this workflow */ - phases: z.array(WorkflowPhaseSchema).min(1), - /** Default status for new items */ - defaultStatus: z.string().optional(), - /** Metadata for this workflow config */ - metadata: z - .object({ - /** Author or team who created this workflow */ - author: z.string().optional(), - /** When this config was last updated */ - lastUpdated: z.string().optional(), - /** Tags for categorization */ - tags: z.array(z.string()).optional(), - }) - .optional(), -}) - .strict(); -/** - * Create a LoadedWorkflow from a WorkflowConfig - * - * Builds lookup maps for efficient status/phase resolution. - * - * @param config - Validated workflow configuration - * @returns LoadedWorkflow with lookup maps - */ -export function createLoadedWorkflow(config) { - const statusMap = new Map(); - for (const status of config.statuses) { - statusMap.set(status.name.toLowerCase(), status); - } - const phaseMap = new Map(); - for (const phase of config.phases) { - phaseMap.set(phase.name.toLowerCase(), phase); - } - return { - config, - statusMap, - phaseMap, - }; -} -/** - * Runtime type guard for WorkflowConfig - * - * @param value - Value to check - * @returns True if value conforms to WorkflowConfigSchema - */ -export function isWorkflowConfig(value) { - return WorkflowConfigSchema.safeParse(value).success; -} -//# sourceMappingURL=workflow-config.js.map \ No newline at end of file diff --git a/dist/validation-schemas/workflow-config.js.map b/dist/validation-schemas/workflow-config.js.map deleted file mode 100644 index db28ee0d..00000000 --- a/dist/validation-schemas/workflow-config.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"workflow-config.js","sourceRoot":"","sources":["../../src/validation-schemas/workflow-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC;KAClC,MAAM,CAAC;IACN,iEAAiE;IACjE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAEvB,oCAAoC;IACpC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAExB,oEAAoE;IACpE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAE5B,2DAA2D;IAC3D,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAElC,gEAAgE;IAChE,aAAa,EAAE,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C,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,KAAK,CAAC,CAAC;IAChD,CAAC;IAED,OAAO;QACL,MAAM;QACN,SAAS;QACT,QAAQ;KACT,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAc;IAC7C,OAAO,oBAAoB,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;AACvD,CAAC"} \ No newline at end of file diff --git a/dist/validation/anti-patterns.d.ts b/dist/validation/anti-patterns.d.ts deleted file mode 100644 index 5b56a07b..00000000 --- a/dist/validation/anti-patterns.d.ts +++ /dev/null @@ -1,134 +0,0 @@ -/** - * @libar-docs - * @libar-docs-validation - * @libar-docs-pattern AntiPatternDetector - * @libar-docs-status completed - * @libar-docs-arch-role service - * @libar-docs-arch-context validation - * @libar-docs-arch-layer application - * @libar-docs-uses DoDValidationTypes, GherkinTypes - * @libar-docs-extract-shapes AntiPatternDetectionOptions, detectAntiPatterns, detectProcessInCode, detectMagicComments, detectScenarioBloat, detectMegaFeature, formatAntiPatternReport, toValidationIssues - * - * ## AntiPatternDetector - Documentation Anti-Pattern Detection - * - * Detects violations of the dual-source documentation architecture and - * process hygiene issues that lead to documentation drift. - * - * ### Anti-Patterns Detected - * - * | ID | Severity | Description | - * |----|----------|-------------| - * | tag-duplication | error | Dependencies in features (should be code-only) | - * | process-in-code | error | Process metadata in code (should be features-only) | - * | magic-comments | warning | Generator hints in features | - * | scenario-bloat | warning | Too many scenarios per feature | - * | mega-feature | warning | Feature file too large | - * - * ### When to Use - * - * - Pre-commit validation to catch architecture violations early - * - CI pipeline to enforce documentation standards - * - Code review checklists for documentation quality - */ -import type { ScannedGherkinFile } from '../validation-schemas/feature.js'; -import type { TagRegistry } from '../validation-schemas/tag-registry.js'; -import type { ScannedFile } from '../scanner/index.js'; -import type { AntiPatternViolation, AntiPatternThresholds, WithTagRegistry } from './types.js'; -export type { AntiPatternViolation, AntiPatternThresholds } from './types.js'; -/** - * Configuration options for anti-pattern detection - */ -export interface AntiPatternDetectionOptions extends WithTagRegistry { - /** Thresholds for warning triggers */ - readonly thresholds?: Partial; -} -/** - * Detect process metadata in code anti-pattern - * - * Finds process tracking annotations (e.g., @docs-quarter, @docs-team, etc.) - * in TypeScript files. Process metadata belongs in feature files. - * - * @param scannedFiles - Array of scanned TypeScript files - * @param registry - Optional tag registry for prefix-aware detection (defaults to @libar-docs-) - * @returns Array of anti-pattern violations - */ -export declare function detectProcessInCode(scannedFiles: readonly ScannedFile[], registry?: TagRegistry): AntiPatternViolation[]; -/** - * Detect magic comments anti-pattern - * - * Finds generator hints like "# GENERATOR:", "# PARSER:" in feature files. - * These create tight coupling between features and generators. - * - * @param features - Array of scanned feature files - * @param threshold - Maximum magic comments before warning (default: 5) - * @returns Array of anti-pattern violations - */ -export declare function detectMagicComments(features: readonly ScannedGherkinFile[], threshold?: number): AntiPatternViolation[]; -/** - * Detect scenario bloat anti-pattern - * - * Finds feature files with too many scenarios, which indicates poor - * organization and slows test suites. - * - * @param features - Array of scanned feature files - * @param threshold - Maximum scenarios before warning (default: 20) - * @returns Array of anti-pattern violations - */ -export declare function detectScenarioBloat(features: readonly ScannedGherkinFile[], threshold?: number): AntiPatternViolation[]; -/** - * Detect mega-feature anti-pattern - * - * Finds feature files that are too large, which makes them hard to - * maintain and review. - * - * @param features - Array of scanned feature files - * @param threshold - Maximum lines before warning (default: 500) - * @returns Array of anti-pattern violations - */ -export declare function detectMegaFeature(features: readonly ScannedGherkinFile[], threshold?: number): AntiPatternViolation[]; -/** - * Detect all anti-patterns - * - * Runs all anti-pattern detectors and returns combined violations. - * - * @param scannedFiles - Array of scanned TypeScript files - * @param features - Array of scanned feature files - * @param options - Optional configuration (registry for prefix, thresholds) - * @returns Array of all detected anti-pattern violations - * - * @example - * ```typescript - * // With default prefix (@libar-docs-) - * const violations = detectAntiPatterns(tsFiles, featureFiles); - * - * // With custom prefix - * const registry = createDefaultTagRegistry(); - * registry.tagPrefix = "@docs-"; - * const customViolations = detectAntiPatterns(tsFiles, featureFiles, { registry }); - * - * for (const v of violations) { - * console.log(`[${v.severity.toUpperCase()}] ${v.id}: ${v.message}`); - * } - * ``` - */ -export declare function detectAntiPatterns(scannedFiles: readonly ScannedFile[], features: readonly ScannedGherkinFile[], options?: AntiPatternDetectionOptions): AntiPatternViolation[]; -/** - * Format anti-pattern violations for console output - * - * @param violations - Array of violations to format - * @returns Multi-line string for pretty printing - */ -export declare function formatAntiPatternReport(violations: AntiPatternViolation[]): string; -/** - * Convert anti-pattern violations to ValidationIssue format - * - * For integration with the existing validate-patterns CLI. - */ -export declare function toValidationIssues(violations: readonly AntiPatternViolation[]): Array<{ - severity: 'error' | 'warning' | 'info'; - message: string; - source: 'typescript' | 'gherkin' | 'cross-source'; - pattern?: string; - file?: string; -}>; -//# sourceMappingURL=anti-patterns.d.ts.map \ No newline at end of file diff --git a/dist/validation/anti-patterns.d.ts.map b/dist/validation/anti-patterns.d.ts.map deleted file mode 100644 index b3186a21..00000000 --- a/dist/validation/anti-patterns.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"anti-patterns.d.ts","sourceRoot":"","sources":["../../src/validation/anti-patterns.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAGH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AACzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAK/F,YAAY,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAoC9E;;GAEG;AACH,MAAM,WAAW,2BAA4B,SAAQ,eAAe;IAClE,sCAAsC;IACtC,QAAQ,CAAC,UAA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terns.js b/dist/validation/anti-patterns.js deleted file mode 100644 index fe165d25..00000000 --- a/dist/validation/anti-patterns.js +++ /dev/null @@ -1,307 +0,0 @@ -/** - * @libar-docs - * @libar-docs-validation - * @libar-docs-pattern AntiPatternDetector - * @libar-docs-status completed - * @libar-docs-arch-role service - * @libar-docs-arch-context validation - * @libar-docs-arch-layer application - * @libar-docs-uses DoDValidationTypes, GherkinTypes - * @libar-docs-extract-shapes AntiPatternDetectionOptions, detectAntiPatterns, detectProcessInCode, detectMagicComments, detectScenarioBloat, detectMegaFeature, formatAntiPatternReport, toValidationIssues - * - * ## AntiPatternDetector - Documentation Anti-Pattern Detection - * - * Detects violations of the dual-source documentation architecture and - * process hygiene issues that lead to documentation drift. - * - * ### Anti-Patterns Detected - * - * | ID | Severity | Description | - * |----|----------|-------------| - * | tag-duplication | error | Dependencies in features (should be code-only) | - * | process-in-code | error | Process metadata in code (should be features-only) | - * | magic-comments | warning | Generator hints in features | - * | scenario-bloat | warning | Too many scenarios per feature | - * | mega-feature | warning | Feature file too large | - * - * ### When to Use - * - * - Pre-commit validation to catch architecture violations early - * - CI pipeline to enforce documentation standards - * - Code review checklists for documentation quality - */ -import { readFileSync } from 'fs'; -import { DEFAULT_THRESHOLDS } from './types.js'; -import { DEFAULT_TAG_PREFIX } from '../config/defaults.js'; -/** - * Tag suffixes that should only appear in feature files, not TypeScript code. - * These are process metadata tags that track delivery workflow state. - */ -const FEATURE_ONLY_TAG_SUFFIXES = [ - 'quarter', - 'team', - 'effort', - 'workflow', - 'completed', - 'effort-actual', -]; -/** - * Builds feature-only annotation list from the tag prefix. - * These tags should appear in feature files, not TypeScript code. - * - * @param tagPrefix - The tag prefix (e.g., "@docs-" or "@libar-docs-") - * @returns Array of full annotation strings (e.g., ["@docs-quarter", "@docs-team", ...]) - */ -function buildFeatureOnlyAnnotations(tagPrefix) { - return FEATURE_ONLY_TAG_SUFFIXES.map((suffix) => `${tagPrefix}${suffix}`); -} -/** - * Magic comment patterns that indicate generator coupling - */ -const MAGIC_COMMENT_PATTERNS = [ - /^#\s*GENERATOR:/i, - /^#\s*PARSER:/i, - /^#\s*AUTO-GEN:/i, - /^#\s*DO NOT EDIT/i, -]; -/** - * Detect process metadata in code anti-pattern - * - * Finds process tracking annotations (e.g., @docs-quarter, @docs-team, etc.) - * in TypeScript files. Process metadata belongs in feature files. - * - * @param scannedFiles - Array of scanned TypeScript files - * @param registry - Optional tag registry for prefix-aware detection (defaults to @libar-docs-) - * @returns Array of anti-pattern violations - */ -export function detectProcessInCode(scannedFiles, registry) { - const violations = []; - const tagPrefix = registry?.tagPrefix ?? DEFAULT_TAG_PREFIX; - const featureOnlyAnnotations = buildFeatureOnlyAnnotations(tagPrefix); - for (const file of scannedFiles) { - for (const { directive } of file.directives) { - // Check tags array for process annotations that shouldn't be in code - for (const tag of directive.tags) { - const normalizedTag = tag.toLowerCase(); - for (const annotation of featureOnlyAnnotations) { - if (normalizedTag === annotation.toLowerCase()) { - // Extract the suffix part after the prefix - const suffix = annotation.slice(tagPrefix.length); - violations.push({ - id: 'process-in-code', - message: `Annotation "${tag}" found in TypeScript code. Process metadata belongs in feature files.`, - file: file.filePath, - line: directive.position.startLine, - severity: 'error', - fix: `Move to corresponding .feature file using @libar-docs-${suffix} tag.`, - }); - } - } - } - } - } - return violations; -} -/** - * Detect magic comments anti-pattern - * - * Finds generator hints like "# GENERATOR:", "# PARSER:" in feature files. - * These create tight coupling between features and generators. - * - * @param features - Array of scanned feature files - * @param threshold - Maximum magic comments before warning (default: 5) - * @returns Array of anti-pattern violations - */ -export function detectMagicComments(features, threshold = DEFAULT_THRESHOLDS.magicCommentThreshold) { - const violations = []; - for (const feature of features) { - try { - const content = readFileSync(feature.filePath, 'utf-8'); - const lines = content.split('\n'); - const magicComments = []; - for (let i = 0; i < lines.length; i++) { - const rawLine = lines[i]; - if (!rawLine) - continue; - const line = rawLine.trim(); - for (const pattern of MAGIC_COMMENT_PATTERNS) { - if (pattern.test(line)) { - magicComments.push({ line: i + 1, text: line }); - break; - } - } - } - if (magicComments.length > threshold) { - violations.push({ - id: 'magic-comments', - message: `Feature file has ${magicComments.length} magic comments (threshold: ${threshold}). This creates tight coupling with generators.`, - file: feature.filePath, - severity: 'warning', - fix: `Reduce generator hints. Use standard Gherkin tags and structured data instead.`, - }); - } - } - catch { - // Ignore read errors - file may have been deleted - } - } - return violations; -} -/** - * Detect scenario bloat anti-pattern - * - * Finds feature files with too many scenarios, which indicates poor - * organization and slows test suites. - * - * @param features - Array of scanned feature files - * @param threshold - Maximum scenarios before warning (default: 20) - * @returns Array of anti-pattern violations - */ -export function detectScenarioBloat(features, threshold = DEFAULT_THRESHOLDS.scenarioBloatThreshold) { - const violations = []; - for (const feature of features) { - const scenarioCount = feature.scenarios.length; - if (scenarioCount > threshold) { - violations.push({ - id: 'scenario-bloat', - message: `Feature file has ${scenarioCount} scenarios (threshold: ${threshold}). Consider splitting by component or domain.`, - file: feature.filePath, - severity: 'warning', - fix: `Split into multiple .feature files organized by component, use case, or business capability.`, - }); - } - } - return violations; -} -/** - * Detect mega-feature anti-pattern - * - * Finds feature files that are too large, which makes them hard to - * maintain and review. - * - * @param features - Array of scanned feature files - * @param threshold - Maximum lines before warning (default: 500) - * @returns Array of anti-pattern violations - */ -export function detectMegaFeature(features, threshold = DEFAULT_THRESHOLDS.megaFeatureLineThreshold) { - const violations = []; - for (const feature of features) { - try { - const content = readFileSync(feature.filePath, 'utf-8'); - const lineCount = content.split('\n').length; - if (lineCount > threshold) { - violations.push({ - id: 'mega-feature', - message: `Feature file has ${lineCount} lines (threshold: ${threshold}). Large files are hard to review and maintain.`, - file: feature.filePath, - severity: 'warning', - fix: `Split into multiple smaller .feature files organized by component or business domain.`, - }); - } - } - catch { - // Ignore read errors - file may have been deleted - } - } - return violations; -} -/** - * Detect all anti-patterns - * - * Runs all anti-pattern detectors and returns combined violations. - * - * @param scannedFiles - Array of scanned TypeScript files - * @param features - Array of scanned feature files - * @param options - Optional configuration (registry for prefix, thresholds) - * @returns Array of all detected anti-pattern violations - * - * @example - * ```typescript - * // With default prefix (@libar-docs-) - * const violations = detectAntiPatterns(tsFiles, featureFiles); - * - * // With custom prefix - * const registry = createDefaultTagRegistry(); - * registry.tagPrefix = "@docs-"; - * const customViolations = detectAntiPatterns(tsFiles, featureFiles, { registry }); - * - * for (const v of violations) { - * console.log(`[${v.severity.toUpperCase()}] ${v.id}: ${v.message}`); - * } - * ``` - */ -export function detectAntiPatterns(scannedFiles, features, options = {}) { - const { registry, thresholds = {} } = options; - const mergedThresholds = { - ...DEFAULT_THRESHOLDS, - ...thresholds, - }; - return [ - // Error-level (architectural violations) - ...detectProcessInCode(scannedFiles, registry), - // Warning-level (hygiene issues) - ...detectMagicComments(features, mergedThresholds.magicCommentThreshold), - ...detectScenarioBloat(features, mergedThresholds.scenarioBloatThreshold), - ...detectMegaFeature(features, mergedThresholds.megaFeatureLineThreshold), - ]; -} -/** - * Format anti-pattern violations for console output - * - * @param violations - Array of violations to format - * @returns Multi-line string for pretty printing - */ -export function formatAntiPatternReport(violations) { - const lines = []; - lines.push(''); - lines.push('Anti-Pattern Detection Report'); - lines.push('============================='); - lines.push(''); - if (violations.length === 0) { - lines.push('No anti-patterns detected.'); - return lines.join('\n'); - } - const errors = violations.filter((v) => v.severity === 'error'); - const warnings = violations.filter((v) => v.severity === 'warning'); - lines.push(`Total: ${violations.length} (${errors.length} errors, ${warnings.length} warnings)`); - lines.push(''); - if (errors.length > 0) { - lines.push('Errors (architectural violations):'); - for (const v of errors) { - lines.push(` [ERROR] ${v.id}`); - lines.push(` ${v.message}`); - lines.push(` at ${v.file}${v.line !== undefined ? `:${v.line}` : ''}`); - if (v.fix) { - lines.push(` Fix: ${v.fix}`); - } - lines.push(''); - } - } - if (warnings.length > 0) { - lines.push('Warnings (hygiene issues):'); - for (const v of warnings) { - lines.push(` [WARN] ${v.id}`); - lines.push(` ${v.message}`); - lines.push(` at ${v.file}${v.line !== undefined ? `:${v.line}` : ''}`); - if (v.fix) { - lines.push(` Fix: ${v.fix}`); - } - lines.push(''); - } - } - return lines.join('\n'); -} -/** - * Convert anti-pattern violations to ValidationIssue format - * - * For integration with the existing validate-patterns CLI. - */ -export function toValidationIssues(violations) { - return violations.map((v) => ({ - severity: v.severity, - message: `[${v.id}] ${v.message}`, - source: v.id === 'process-in-code' ? 'typescript' : 'gherkin', - file: v.file, - })); -} -//# sourceMappingURL=anti-patterns.js.map \ No newline at end of file diff --git a/dist/validation/anti-patterns.js.map b/dist/validation/anti-patterns.js.map deleted file mode 100644 index 8f53bfa3..00000000 --- a/dist/validation/anti-patterns.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"anti-patterns.js","sourceRoot":"","sources":["../../src/validation/anti-patterns.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAKlC,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAK3D;;;GAGG;AACH,MAAM,yBAAyB,GAAG;IAChC,SAAS;IACT,MAAM;IACN,QAAQ;IACR,UAAU;IACV,WAAW;IACX,eAAe;CACP,CAAC;AAEX;;;;;;GAMG;AACH,SAAS,2BAA2B,CAAC,SAAiB;IACpD,OAAO,yBAAyB,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,SAAS,GAAG,MAAM,EAAE,CAAC,CAAC;AAC5E,CAAC;AAED;;GAEG;AACH,MAAM,sBAAsB,GAAG;IAC7B,kBAAkB;IAClB,eAAe;IACf,iBAAiB;IACjB,mBAAmB;CACX,CAAC;AAUX;;;;;;;;;GASG;AACH,MAAM,UAAU,mBAAmB,CACjC,YAAoC,EACpC,QAAsB;IAEtB,MAAM,UAAU,GAA2B,EAAE,CAAC;IAC9C,MAAM,SAAS,GAAG,QAAQ,EAAE,SAAS,IAAI,k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,CAAC,CAAC,GAAG,EAAE,CAAC;gBACV,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;YACxC,CAAC;YACD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACjB,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAAC,UAA2C;IAO5E,OAAO,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QAC5B,QAAQ,EAAE,CAAC,CAAC,QAAQ;QACpB,OAAO,EAAE,IAAI,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,OAAO,EAAE;QACjC,MAAM,EAAE,CAAC,CAAC,EAAE,KAAK,iBAAiB,CAAC,CAAC,CAAE,YAAsB,CAAC,CAAC,CAAE,SAAmB;QACnF,IAAI,EAAE,CAAC,CAAC,IAAI;KACb,CAAC,CAAC,CAAC;AACN,CAAC"} \ No newline at end of file diff --git a/dist/validation/dod-validator.d.ts b/dist/validation/dod-validator.d.ts deleted file mode 100644 index 3bc9e979..00000000 --- a/dist/validation/dod-validator.d.ts +++ /dev/null @@ -1,94 +0,0 @@ -/** - * @libar-docs - * @libar-docs-validation - * @libar-docs-pattern DoDValidator - * @libar-docs-status completed - * @libar-docs-arch-role service - * @libar-docs-arch-context validation - * @libar-docs-arch-layer application - * @libar-docs-uses DoDValidationTypes, GherkinTypes, DualSourceExtractor - * @libar-docs-extract-shapes isDeliverableComplete, hasAcceptanceCriteria, extractAcceptanceCriteriaScenarios, validateDoDForPhase, validateDoD, formatDoDSummary - * - * ## DoDValidator - Definition of Done Validation - * - * Validates that completed phases meet Definition of Done criteria: - * 1. All deliverables must be in a terminal state (complete, n/a, or superseded) - * 2. At least one @acceptance-criteria scenario must exist - * - * ### When to Use - * - * - Pre-release validation to ensure phases are truly complete - * - CI pipeline checks to prevent premature "done" declarations - * - Manual DoD checks during code review - */ -import type { Deliverable, ScannedGherkinFile } from '../validation-schemas/index.js'; -import type { DoDValidationResult, DoDValidationSummary } from './types.js'; -/** - * Check if a deliverable has "complete" status. - * - * This checks for the literal 'complete' status value only. - * For DoD validation (which also accepts 'n/a' and 'superseded'), - * see isDeliverableStatusTerminal(). - * - * @param deliverable - The deliverable to check - * @returns True if the deliverable status is 'complete' - */ -export declare function isDeliverableComplete(deliverable: Deliverable): boolean; -/** - * Check if a feature has @acceptance-criteria scenarios - * - * Scans scenarios for the @acceptance-criteria tag, which indicates - * BDD-driven acceptance tests. - * - * @param feature - The scanned feature file to check - * @returns True if at least one @acceptance-criteria scenario exists - */ -export declare function hasAcceptanceCriteria(feature: ScannedGherkinFile): boolean; -/** - * Extract acceptance criteria scenario names from a feature - * - * @param feature - The scanned feature file - * @returns Array of scenario names with @acceptance-criteria tag - */ -export declare function extractAcceptanceCriteriaScenarios(feature: ScannedGherkinFile): readonly string[]; -/** - * Validate DoD for a single phase/pattern - * - * Checks: - * 1. All deliverables must be in a terminal state (complete, n/a, superseded) - * 2. At least one @acceptance-criteria scenario exists - * - * @param patternName - Name of the pattern being validated - * @param phase - Phase number being validated - * @param feature - The scanned feature file with deliverables and scenarios - * @returns DoD validation result - */ -export declare function validateDoDForPhase(patternName: string, phase: number, feature: ScannedGherkinFile): DoDValidationResult; -/** - * Validate DoD across multiple phases - * - * Filters to completed phases and validates each against DoD criteria. - * Optionally filter to specific phases using phaseFilter. - * - * @param features - Array of scanned feature files - * @param phaseFilter - Optional array of phase numbers to validate (validates all if empty) - * @returns Aggregate DoD validation summary - * - * @example - * ```typescript - * // Validate all completed phases - * const summary = validateDoD(features); - * - * // Validate specific phase - * const summary = validateDoD(features, [14]); - * ``` - */ -export declare function validateDoD(features: readonly ScannedGherkinFile[], phaseFilter?: readonly number[]): DoDValidationSummary; -/** - * Format DoD validation summary for console output - * - * @param summary - DoD validation summary to format - * @returns Multi-line string for pretty printing - */ -export declare function formatDoDSummary(summary: DoDValidationSummary): string; -//# sourceMappingURL=dod-validator.d.ts.map \ No newline at end of file diff --git a/dist/validation/dod-validator.d.ts.map b/dist/validation/dod-validator.d.ts.map deleted file mode 100644 index b53b927a..00000000 --- a/dist/validation/dod-validator.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"dod-validator.d.ts","sourceRoot":"","sources":["../../src/validation/dod-validator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEtF,OAAO,KAAK,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAO5E;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAEvE;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAI1E;AAED;;;;;GAKG;AACH,wBAAgB,kCAAkC,CAAC,OAAO,EAAE,kBAAkB,GAAG,SAAS,MAAM,EAAE,CAIjG;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,kBAAkB,GAC1B,mBAAmB,CAwCrB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,WAAW,CACzB,QAAQ,EAAE,SAAS,kBAAkB,EAAE,EACvC,WAAW,GAAE,SAAS,MAAM,EAAO,GAClC,oBAAoB,CA8BtB;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,oBAAoB,GAAG,MAAM,CA8CtE"} \ No newline at end of file diff --git a/dist/validation/dod-validator.js b/dist/validation/dod-validator.js deleted file mode 100644 index 7a3000e2..00000000 --- a/dist/validation/dod-validator.js +++ /dev/null @@ -1,198 +0,0 @@ -/** - * @libar-docs - * @libar-docs-validation - * @libar-docs-pattern DoDValidator - * @libar-docs-status completed - * @libar-docs-arch-role service - * @libar-docs-arch-context validation - * @libar-docs-arch-layer application - * @libar-docs-uses DoDValidationTypes, GherkinTypes, DualSourceExtractor - * @libar-docs-extract-shapes isDeliverableComplete, hasAcceptanceCriteria, extractAcceptanceCriteriaScenarios, validateDoDForPhase, validateDoD, formatDoDSummary - * - * ## DoDValidator - Definition of Done Validation - * - * Validates that completed phases meet Definition of Done criteria: - * 1. All deliverables must be in a terminal state (complete, n/a, or superseded) - * 2. At least one @acceptance-criteria scenario must exist - * - * ### When to Use - * - * - Pre-release validation to ensure phases are truly complete - * - CI pipeline checks to prevent premature "done" declarations - * - Manual DoD checks during code review - */ -import { extractProcessMetadata, extractDeliverables } from '../extractor/dual-source-extractor.js'; -import { isDeliverableStatusComplete, isDeliverableStatusTerminal, isPatternComplete, } from '../taxonomy/index.js'; -/** - * Check if a deliverable has "complete" status. - * - * This checks for the literal 'complete' status value only. - * For DoD validation (which also accepts 'n/a' and 'superseded'), - * see isDeliverableStatusTerminal(). - * - * @param deliverable - The deliverable to check - * @returns True if the deliverable status is 'complete' - */ -export function isDeliverableComplete(deliverable) { - return isDeliverableStatusComplete(deliverable.status); -} -/** - * Check if a feature has @acceptance-criteria scenarios - * - * Scans scenarios for the @acceptance-criteria tag, which indicates - * BDD-driven acceptance tests. - * - * @param feature - The scanned feature file to check - * @returns True if at least one @acceptance-criteria scenario exists - */ -export function hasAcceptanceCriteria(feature) { - return feature.scenarios.some((scenario) => scenario.tags.some((tag) => tag.toLowerCase() === 'acceptance-criteria')); -} -/** - * Extract acceptance criteria scenario names from a feature - * - * @param feature - The scanned feature file - * @returns Array of scenario names with @acceptance-criteria tag - */ -export function extractAcceptanceCriteriaScenarios(feature) { - return feature.scenarios - .filter((scenario) => scenario.tags.some((tag) => tag.toLowerCase() === 'acceptance-criteria')) - .map((scenario) => scenario.name); -} -/** - * Validate DoD for a single phase/pattern - * - * Checks: - * 1. All deliverables must be in a terminal state (complete, n/a, superseded) - * 2. At least one @acceptance-criteria scenario exists - * - * @param patternName - Name of the pattern being validated - * @param phase - Phase number being validated - * @param feature - The scanned feature file with deliverables and scenarios - * @returns DoD validation result - */ -export function validateDoDForPhase(patternName, phase, feature) { - const deliverables = extractDeliverables(feature); - const messages = []; - // Check deliverables — terminal states (complete, n/a, superseded) pass DoD - const incompleteDeliverables = deliverables.filter((d) => !isDeliverableStatusTerminal(d.status)); - const allDeliverablesComplete = incompleteDeliverables.length === 0; - if (deliverables.length === 0) { - messages.push(`No deliverables defined for phase ${phase}`); - } - else if (!allDeliverablesComplete) { - messages.push(`${incompleteDeliverables.length}/${deliverables.length} deliverables incomplete`); - for (const d of incompleteDeliverables) { - messages.push(` - "${d.name}" (status: ${d.status})`); - } - } - // Check acceptance criteria - const missingAcceptanceCriteria = !hasAcceptanceCriteria(feature); - if (missingAcceptanceCriteria) { - messages.push('No @acceptance-criteria scenarios found'); - } - const isDoDMet = allDeliverablesComplete && !missingAcceptanceCriteria && deliverables.length > 0; - if (isDoDMet) { - messages.push(`DoD met: ${deliverables.length} deliverables complete, AC scenarios present`); - } - return { - patternName, - phase, - isDoDMet, - deliverables, - incompleteDeliverables, - missingAcceptanceCriteria, - messages, - }; -} -/** - * Validate DoD across multiple phases - * - * Filters to completed phases and validates each against DoD criteria. - * Optionally filter to specific phases using phaseFilter. - * - * @param features - Array of scanned feature files - * @param phaseFilter - Optional array of phase numbers to validate (validates all if empty) - * @returns Aggregate DoD validation summary - * - * @example - * ```typescript - * // Validate all completed phases - * const summary = validateDoD(features); - * - * // Validate specific phase - * const summary = validateDoD(features, [14]); - * ``` - */ -export function validateDoD(features, phaseFilter = []) { - const results = []; - const shouldFilterPhases = phaseFilter.length > 0; - for (const feature of features) { - const metadata = extractProcessMetadata(feature); - if (!metadata) - continue; - // Only validate completed phases (or phases matching filter) - const isCompleted = isPatternComplete(metadata.status); - // If phase filter specified, validate those specific phases - // Otherwise, only validate completed phases - const shouldValidate = shouldFilterPhases ? phaseFilter.includes(metadata.phase) : isCompleted; - if (!shouldValidate) - continue; - const result = validateDoDForPhase(metadata.pattern, metadata.phase, feature); - results.push(result); - } - const passedPhases = results.filter((r) => r.isDoDMet).length; - const failedPhases = results.filter((r) => !r.isDoDMet).length; - return { - results, - totalPhases: results.length, - passedPhases, - failedPhases, - }; -} -/** - * Format DoD validation summary for console output - * - * @param summary - DoD validation summary to format - * @returns Multi-line string for pretty printing - */ -export function formatDoDSummary(summary) { - const lines = []; - lines.push(''); - lines.push('DoD Validation Summary'); - lines.push('======================'); - lines.push(''); - lines.push(`Total phases validated: ${summary.totalPhases}`); - lines.push(`Passed: ${summary.passedPhases}`); - lines.push(`Failed: ${summary.failedPhases}`); - lines.push(''); - if (summary.results.length === 0) { - lines.push('No completed phases found to validate.'); - return lines.join('\n'); - } - // Group by pass/fail - const passed = summary.results.filter((r) => r.isDoDMet); - const failed = summary.results.filter((r) => !r.isDoDMet); - if (failed.length > 0) { - lines.push('Failed Phases:'); - for (const result of failed) { - lines.push(` [FAIL] Phase ${result.phase}: ${result.patternName}`); - for (const msg of result.messages) { - if (!msg.startsWith('DoD met')) { - lines.push(` ${msg}`); - } - } - } - lines.push(''); - } - if (passed.length > 0) { - lines.push('Passed Phases:'); - for (const result of passed) { - const deliverableCount = result.deliverables.length; - lines.push(` [PASS] Phase ${result.phase}: ${result.patternName} (${deliverableCount} deliverables)`); - } - lines.push(''); - } - return lines.join('\n'); -} -//# sourceMappingURL=dod-validator.js.map \ No newline at end of file diff --git a/dist/validation/dod-validator.js.map b/dist/validation/dod-validator.js.map deleted file mode 100644 index 1435c618..00000000 --- a/dist/validation/dod-validator.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"dod-validator.js","sourceRoot":"","sources":["../../src/validation/dod-validator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAGH,OAAO,EAAE,sBAAsB,EAAE,m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MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACtB,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QAC7B,KAAK,MAAM,MAAM,IAAI,MAAM,EAAE,CAAC;YAC5B,MAAM,gBAAgB,GAAG,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC;YACpD,KAAK,CAAC,IAAI,CACR,kBAAkB,MAAM,CAAC,KAAK,KAAK,MAAM,CAAC,WAAW,KAAK,gBAAgB,gBAAgB,CAC3F,CAAC;QACJ,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACjB,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"} \ No newline at end of file diff --git a/dist/validation/fsm/index.d.ts b/dist/validation/fsm/index.d.ts deleted file mode 100644 index e2c35d76..00000000 --- a/dist/validation/fsm/index.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -/** - * @libar-docs - * @libar-docs-validation - * @libar-docs-pattern FSMModule - * @libar-docs-status active - * @libar-docs-depends-on:PDR005MvpWorkflow - * - * ## FSM Module - Phase State Machine Implementation - * - * Central export for the 4-state FSM defined in PDR-005: - * - * ``` - * roadmap ──→ active ──→ completed - * │ │ - * │ ↓ - * │ roadmap (blocked/regressed) - * │ - * ↓ - * deferred ──→ roadmap - * ``` - * - * ### When to Use - * - * - When validating status transitions in pre-commit hooks - * - When checking protection levels for completed patterns - * - When implementing workflow enforcement in CI/CD - * - * ### Module Contents - * - * - **states.ts** - Status states and protection levels - * - **transitions.ts** - Valid transition matrix - * - **validator.ts** - Pure validation functions (Decider pattern) - * - * ### Usage Example - * - * ```typescript - * import { - * validateStatus, - * validateTransition, - * getProtectionLevel, - * isValidTransition - * } from "@libar-dev/delivery-process/validation/fsm"; - * - * // Validate a status value - * const result = validateStatus("roadmap"); - * if (result.valid) { - * console.log("Valid status"); - * } - * - * // Check transition validity - * if (isValidTransition("roadmap", "active")) { - * console.log("Can start work"); - * } - * ``` - */ -export { PROTECTION_LEVELS, type ProtectionLevel, getProtectionLevel, isTerminalState, isFullyEditable, isScopeLocked, PROCESS_STATUS_VALUES, type ProcessStatusValue, } from './states.js'; -export { VALID_TRANSITIONS, isValidTransition, getValidTransitionsFrom, getTransitionErrorMessage, type TransitionMessageOptions, } from './transitions.js'; -export { type StatusValidationResult, type TransitionValidationResult, type CompletionMetadataValidationResult, type PatternMetadata, type FSMValidationOptions, validateStatus, validateTransition, validateCompletionMetadata, validatePatternStatus, getProtectionSummary, } from './validator.js'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/dist/validation/fsm/index.d.ts.map b/dist/validation/fsm/index.d.ts.map deleted file mode 100644 index 735ef2ff..00000000 --- a/dist/validation/fsm/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/validation/fsm/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AAGH,OAAO,EACL,iBAAiB,EACjB,KAAK,eAAe,EACpB,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,aAAa,EAEb,qBAAqB,EACrB,KAAK,kBAAkB,GACxB,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,uBAAuB,EACvB,yBAAyB,EACzB,KAAK,wBAAwB,GAC9B,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACL,KAAK,sBAAsB,EAC3B,KAAK,0BAA0B,EAC/B,KAAK,kCAAkC,EACvC,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,cAAc,EACd,kBAAkB,EAClB,0BAA0B,EAC1B,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,gBAAgB,CAAC"} \ No newline at end of file diff --git a/dist/validation/fsm/index.js b/dist/validation/fsm/index.js deleted file mode 100644 index 42e6bab9..00000000 --- a/dist/validation/fsm/index.js +++ /dev/null @@ -1,64 +0,0 @@ -/** - * @libar-docs - * @libar-docs-validation - * @libar-docs-pattern FSMModule - * @libar-docs-status active - * @libar-docs-depends-on:PDR005MvpWorkflow - * - * ## FSM Module - Phase State Machine Implementation - * - * Central export for the 4-state FSM defined in PDR-005: - * - * ``` - * roadmap ──→ active ──→ completed - * │ │ - * │ ↓ - * │ roadmap (blocked/regressed) - * │ - * ↓ - * deferred ──→ roadmap - * ``` - * - * ### When to Use - * - * - When validating status transitions in pre-commit hooks - * - When checking protection levels for completed patterns - * - When implementing workflow enforcement in CI/CD - * - * ### Module Contents - * - * - **states.ts** - Status states and protection levels - * - **transitions.ts** - Valid transition matrix - * - **validator.ts** - Pure validation functions (Decider pattern) - * - * ### Usage Example - * - * ```typescript - * import { - * validateStatus, - * validateTransition, - * getProtectionLevel, - * isValidTransition - * } from "@libar-dev/delivery-process/validation/fsm"; - * - * // Validate a status value - * const result = validateStatus("roadmap"); - * if (result.valid) { - * console.log("Valid status"); - * } - * - * // Check transition validity - * if (isValidTransition("roadmap", "active")) { - * console.log("Can start work"); - * } - * ``` - */ -// States - Protection levels and state queries -export { PROTECTION_LEVELS, getProtectionLevel, isTerminalState, isFullyEditable, isScopeLocked, -// Re-exported from taxonomy for convenience -PROCESS_STATUS_VALUES, } from './states.js'; -// Transitions - Valid transition matrix and queries -export { VALID_TRANSITIONS, isValidTransition, getValidTransitionsFrom, getTransitionErrorMessage, } from './transitions.js'; -// Validator - Pure validation functions -export { validateStatus, validateTransition, validateCompletionMetadata, validatePatternStatus, getProtectionSummary, } from './validator.js'; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/validation/fsm/index.js.map b/dist/validation/fsm/index.js.map deleted file mode 100644 index e602dbfa..00000000 --- a/dist/validation/fsm/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/validation/fsm/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AAEH,+CAA+C;AAC/C,OAAO,EACL,iBAAiB,EAEjB,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,aAAa;AACb,4CAA4C;AAC5C,qBAAqB,GAEtB,MAAM,aAAa,CAAC;AAErB,oDAAoD;AACpD,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,uBAAuB,EACvB,yBAAyB,GAE1B,MAAM,kBAAkB,CAAC;AAE1B,wCAAwC;AACxC,OAAO,EAML,cAAc,EACd,kBAAkB,EAClB,0BAA0B,EAC1B,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,gBAAgB,CAAC"} \ No newline at end of file diff --git a/dist/validation/fsm/states.d.ts b/dist/validation/fsm/states.d.ts deleted file mode 100644 index 741d1dd7..00000000 --- a/dist/validation/fsm/states.d.ts +++ /dev/null @@ -1,93 +0,0 @@ -/** - * @libar-docs - * @libar-docs-extract-shapes PROTECTION_LEVELS, ProtectionLevel, getProtectionLevel, isTerminalState, isFullyEditable, isScopeLocked - * @libar-docs-validation - * @libar-docs-pattern FSMStates - * @libar-docs-status active - * @libar-docs-implements PhaseStateMachineValidation - * @libar-docs-depends-on:PDR005MvpWorkflow - * @libar-docs-arch-role read-model - * @libar-docs-arch-context validation - * @libar-docs-arch-layer domain - * - * ## FSM States - Process Status States and Protection Levels - * - * Defines the 4-state FSM from PDR-005 MVP Workflow: - * - roadmap: Planned work (fully editable) - * - active: Work in progress (scope-locked) - * - completed: Done (hard-locked, requires unlock) - * - deferred: On hold (fully editable) - * - * ### When to Use - * - * - Use `getProtectionLevel()` to determine modification restrictions - * - Use `isTerminalState()` to check if state allows transitions - * - Use `PROTECTION_LEVELS` for direct lookups - */ -import { PROCESS_STATUS_VALUES, type ProcessStatusValue } from '../../taxonomy/index.js'; -/** - * Protection level types for FSM states - * - * - `none`: Fully editable, no restrictions - * - `scope`: Scope-locked, prevents adding new deliverables - * - `hard`: Hard-locked, requires explicit unlock-reason annotation - */ -export type ProtectionLevel = 'none' | 'scope' | 'hard'; -/** - * Protection level mapping per PDR-005 - * - * | State | Protection | Meaning | - * |-----------|------------|----------------------------------| - * | roadmap | none | Planning phase, fully editable | - * | active | scope | In progress, no new deliverables | - * | completed | hard | Done, requires unlock to modify | - * | deferred | none | Parked, fully editable | - */ -export declare const PROTECTION_LEVELS: Readonly>; -/** - * Get the protection level for a status - * - * @param status - Process status value - * @returns Protection level for the status - * - * @example - * ```typescript - * getProtectionLevel("active"); // → "scope" - * getProtectionLevel("completed"); // → "hard" - * ``` - */ -export declare function getProtectionLevel(status: ProcessStatusValue): ProtectionLevel; -/** - * Check if a status is a terminal state (cannot transition out) - * - * Terminal states require explicit unlock to modify. - * - * @param status - Process status value - * @returns true if the status is terminal - * - * @example - * ```typescript - * isTerminalState("completed"); // → true - * isTerminalState("active"); // → false - * ``` - */ -export declare function isTerminalState(status: ProcessStatusValue): boolean; -/** - * Check if a status is fully editable (no protection) - * - * @param status - Process status value - * @returns true if the status has no protection - */ -export declare function isFullyEditable(status: ProcessStatusValue): boolean; -/** - * Check if a status is scope-locked - * - * @param status - Process status value - * @returns true if the status prevents scope changes - */ -export declare function isScopeLocked(status: ProcessStatusValue): boolean; -/** - * Re-export status values for convenience - */ -export { PROCESS_STATUS_VALUES, type ProcessStatusValue }; -//# sourceMappingURL=states.d.ts.map \ No newline at end of file diff --git a/dist/validation/fsm/states.d.ts.map b/dist/validation/fsm/states.d.ts.map deleted file mode 100644 index 2739aeb2..00000000 --- a/dist/validation/fsm/states.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"states.d.ts","sourceRoot":"","sources":["../../../src/validation/fsm/states.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,qBAAqB,EAAE,KAAK,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAEzF;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;AAExD;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,MAAM,CAAC,kBAAkB,EAAE,eAAe,CAAC,CAK1E,CAAC;AAEX;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,kBAAkB,GAAG,eAAe,CAE9E;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAEnE;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAEnE;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAEjE;AAED;;GAEG;AACH,OAAO,EAAE,qBAAqB,EAAE,KAAK,kBAAkB,EAAE,CAAC"} \ No newline at end of file diff --git a/dist/validation/fsm/states.js b/dist/validation/fsm/states.js deleted file mode 100644 index fd9298d7..00000000 --- a/dist/validation/fsm/states.js +++ /dev/null @@ -1,98 +0,0 @@ -/** - * @libar-docs - * @libar-docs-extract-shapes PROTECTION_LEVELS, ProtectionLevel, getProtectionLevel, isTerminalState, isFullyEditable, isScopeLocked - * @libar-docs-validation - * @libar-docs-pattern FSMStates - * @libar-docs-status active - * @libar-docs-implements PhaseStateMachineValidation - * @libar-docs-depends-on:PDR005MvpWorkflow - * @libar-docs-arch-role read-model - * @libar-docs-arch-context validation - * @libar-docs-arch-layer domain - * - * ## FSM States - Process Status States and Protection Levels - * - * Defines the 4-state FSM from PDR-005 MVP Workflow: - * - roadmap: Planned work (fully editable) - * - active: Work in progress (scope-locked) - * - completed: Done (hard-locked, requires unlock) - * - deferred: On hold (fully editable) - * - * ### When to Use - * - * - Use `getProtectionLevel()` to determine modification restrictions - * - Use `isTerminalState()` to check if state allows transitions - * - Use `PROTECTION_LEVELS` for direct lookups - */ -import { PROCESS_STATUS_VALUES } from '../../taxonomy/index.js'; -/** - * Protection level mapping per PDR-005 - * - * | State | Protection | Meaning | - * |-----------|------------|----------------------------------| - * | roadmap | none | Planning phase, fully editable | - * | active | scope | In progress, no new deliverables | - * | completed | hard | Done, requires unlock to modify | - * | deferred | none | Parked, fully editable | - */ -export const PROTECTION_LEVELS = { - roadmap: 'none', - active: 'scope', - completed: 'hard', - deferred: 'none', -}; -/** - * Get the protection level for a status - * - * @param status - Process status value - * @returns Protection level for the status - * - * @example - * ```typescript - * getProtectionLevel("active"); // → "scope" - * getProtectionLevel("completed"); // → "hard" - * ``` - */ -export function getProtectionLevel(status) { - return PROTECTION_LEVELS[status]; -} -/** - * Check if a status is a terminal state (cannot transition out) - * - * Terminal states require explicit unlock to modify. - * - * @param status - Process status value - * @returns true if the status is terminal - * - * @example - * ```typescript - * isTerminalState("completed"); // → true - * isTerminalState("active"); // → false - * ``` - */ -export function isTerminalState(status) { - return status === 'completed'; -} -/** - * Check if a status is fully editable (no protection) - * - * @param status - Process status value - * @returns true if the status has no protection - */ -export function isFullyEditable(status) { - return PROTECTION_LEVELS[status] === 'none'; -} -/** - * Check if a status is scope-locked - * - * @param status - Process status value - * @returns true if the status prevents scope changes - */ -export function isScopeLocked(status) { - return PROTECTION_LEVELS[status] === 'scope'; -} -/** - * Re-export status values for convenience - */ -export { PROCESS_STATUS_VALUES }; -//# sourceMappingURL=states.js.map \ No newline at end of file diff --git a/dist/validation/fsm/states.js.map b/dist/validation/fsm/states.js.map deleted file mode 100644 index c40ac469..00000000 --- a/dist/validation/fsm/states.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"states.js","sourceRoot":"","sources":["../../../src/validation/fsm/states.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,qBAAqB,EAA2B,MAAM,yBAAyB,CAAC;AAWzF;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAA0D;IACtF,OAAO,EAAE,MAAM;IACf,MAAM,EAAE,OAAO;IACf,SAAS,EAAE,MAAM;IACjB,QAAQ,EAAE,MAAM;CACR,CAAC;AAEX;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,kBAAkB,CAAC,MAA0B;IAC3D,OAAO,iBAAiB,CAAC,MAAM,CAAC,CAAC;AACnC,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,eAAe,CAAC,MAA0B;IACxD,OAAO,MAAM,KAAK,WAAW,CAAC;AAChC,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,MAA0B;IACxD,OAAO,iBAAiB,CAAC,MAAM,CAAC,KAAK,MAAM,CAAC;AAC9C,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAAC,MAA0B;IACtD,OAAO,iBAAiB,CAAC,MAAM,CAAC,KAAK,OAAO,CAAC;AAC/C,CAAC;AAED;;GAEG;AACH,OAAO,EAAE,qBAAqB,EAA2B,CAAC"} \ No newline at end of file diff --git a/dist/validation/fsm/transitions.d.ts b/dist/validation/fsm/transitions.d.ts deleted file mode 100644 index 401a000b..00000000 --- a/dist/validation/fsm/transitions.d.ts +++ /dev/null @@ -1,100 +0,0 @@ -/** - * @libar-docs - * @libar-docs-validation - * @libar-docs-pattern FSMTransitions - * @libar-docs-status active - * @libar-docs-implements PhaseStateMachineValidation - * @libar-docs-depends-on:PDR005MvpWorkflow - * @libar-docs-extract-shapes VALID_TRANSITIONS, isValidTransition, getValidTransitionsFrom, getTransitionErrorMessage - * @libar-docs-arch-role read-model - * @libar-docs-arch-context validation - * @libar-docs-arch-layer domain - * - * ## FSM Transitions - Valid State Transition Matrix - * - * Defines valid transitions between FSM states per PDR-005: - * - * ``` - * roadmap ──→ active ──→ completed - * │ │ - * │ ↓ - * │ roadmap (blocked/regressed) - * │ - * ↓ - * deferred ──→ roadmap - * ``` - * - * ### When to Use - * - * - Use `isValidTransition()` to validate proposed status changes - * - Use `getValidTransitionsFrom()` to show available options - */ -import type { ProcessStatusValue } from '../../taxonomy/index.js'; -import type { TagRegistry } from '../../validation-schemas/tag-registry.js'; -/** - * Options for transition functions that generate messages - */ -export interface TransitionMessageOptions { - /** Tag registry providing prefix for error message formatting */ - readonly registry?: TagRegistry; -} -/** - * Valid FSM transitions matrix - * - * Maps each state to the list of states it can transition to. - * - * | From | Valid Targets | Notes | - * |-----------|----------------------------|------------------------------| - * | roadmap | active, deferred, roadmap | Can start, park, or stay | - * | active | completed, roadmap | Can finish or regress | - * | completed | (none) | Terminal state | - * | deferred | roadmap | Must go through roadmap | - */ -export declare const VALID_TRANSITIONS: Readonly>; -/** - * Check if a transition between two states is valid - * - * @param from - Current status - * @param to - Target status - * @returns true if the transition is allowed - * - * @example - * ```typescript - * isValidTransition("roadmap", "active"); // → true - * isValidTransition("roadmap", "completed"); // → false (must go through active) - * isValidTransition("completed", "active"); // → false (terminal state) - * ``` - */ -export declare function isValidTransition(from: ProcessStatusValue, to: ProcessStatusValue): boolean; -/** - * Get all valid transitions from a given state - * - * @param status - Current status - * @returns Array of valid target states (empty for terminal states) - * - * @example - * ```typescript - * getValidTransitionsFrom("roadmap"); // → ["active", "deferred", "roadmap"] - * getValidTransitionsFrom("completed"); // → [] - * ``` - */ -export declare function getValidTransitionsFrom(status: ProcessStatusValue): readonly ProcessStatusValue[]; -/** - * Get a human-readable description of why a transition is invalid - * - * @param from - Current status - * @param to - Attempted target status - * @param options - Optional message options with registry for prefix - * @returns Error message describing the violation - * - * @example - * ```typescript - * getTransitionErrorMessage("roadmap", "completed"); - * // → "Cannot transition from 'roadmap' to 'completed'. Must go through 'active' first." - * - * getTransitionErrorMessage("completed", "active"); - * // → "Cannot transition from 'completed' (terminal state). Use unlock-reason tag to modify." - * ``` - */ -export declare function getTransitionErrorMessage(from: ProcessStatusValue, to: ProcessStatusValue, options?: TransitionMessageOptions): string; -//# sourceMappingURL=transitions.d.ts.map \ No newline at end of file diff --git a/dist/validation/fsm/transitions.d.ts.map b/dist/validation/fsm/transitions.d.ts.map deleted file mode 100644 index cc10ec9b..00000000 --- a/dist/validation/fsm/transitions.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"transitions.d.ts","sourceRoot":"","sources":["../../../src/validation/fsm/transitions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAG5E;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,iEAAiE;IACjE,QAAQ,CAAC,QAAQ,CAAC,EAAE,WAAW,CAAC;CACjC;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CACtC,MAAM,CAAC,kBAAkB,EAAE,SAAS,kBAAkB,EAAE,CAAC,CAMjD,CAAC;AAEX;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,kBAAkB,EAAE,EAAE,EAAE,kBAAkB,GAAG,OAAO,CAG3F;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,kBAAkB,GAAG,SAAS,kBAAkB,EAAE,CAEjG;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,kBAAkB,EACxB,EAAE,EAAE,kBAAkB,EACtB,OAAO,CAAC,EAAE,wBAAwB,GACjC,MAAM,CAyBR"} \ No newline at end of file diff --git a/dist/validation/fsm/transitions.js b/dist/validation/fsm/transitions.js deleted file mode 100644 index e1844abe..00000000 --- a/dist/validation/fsm/transitions.js +++ /dev/null @@ -1,122 +0,0 @@ -/** - * @libar-docs - * @libar-docs-validation - * @libar-docs-pattern FSMTransitions - * @libar-docs-status active - * @libar-docs-implements PhaseStateMachineValidation - * @libar-docs-depends-on:PDR005MvpWorkflow - * @libar-docs-extract-shapes VALID_TRANSITIONS, isValidTransition, getValidTransitionsFrom, getTransitionErrorMessage - * @libar-docs-arch-role read-model - * @libar-docs-arch-context validation - * @libar-docs-arch-layer domain - * - * ## FSM Transitions - Valid State Transition Matrix - * - * Defines valid transitions between FSM states per PDR-005: - * - * ``` - * roadmap ──→ active ──→ completed - * │ │ - * │ ↓ - * │ roadmap (blocked/regressed) - * │ - * ↓ - * deferred ──→ roadmap - * ``` - * - * ### When to Use - * - * - Use `isValidTransition()` to validate proposed status changes - * - Use `getValidTransitionsFrom()` to show available options - */ -import { DEFAULT_TAG_PREFIX } from '../../config/defaults.js'; -/** - * Valid FSM transitions matrix - * - * Maps each state to the list of states it can transition to. - * - * | From | Valid Targets | Notes | - * |-----------|----------------------------|------------------------------| - * | roadmap | active, deferred, roadmap | Can start, park, or stay | - * | active | completed, roadmap | Can finish or regress | - * | completed | (none) | Terminal state | - * | deferred | roadmap | Must go through roadmap | - */ -export const VALID_TRANSITIONS = { - roadmap: ['active', 'deferred', 'roadmap'], // Can start work, park, or stay in planning - active: ['completed', 'roadmap'], // Can finish or regress if blocked - completed: [], // Terminal state - no transitions allowed - deferred: ['roadmap'], // Must reactivate through roadmap first -}; -/** - * Check if a transition between two states is valid - * - * @param from - Current status - * @param to - Target status - * @returns true if the transition is allowed - * - * @example - * ```typescript - * isValidTransition("roadmap", "active"); // → true - * isValidTransition("roadmap", "completed"); // → false (must go through active) - * isValidTransition("completed", "active"); // → false (terminal state) - * ``` - */ -export function isValidTransition(from, to) { - const validTargets = VALID_TRANSITIONS[from]; - return validTargets.includes(to); -} -/** - * Get all valid transitions from a given state - * - * @param status - Current status - * @returns Array of valid target states (empty for terminal states) - * - * @example - * ```typescript - * getValidTransitionsFrom("roadmap"); // → ["active", "deferred", "roadmap"] - * getValidTransitionsFrom("completed"); // → [] - * ``` - */ -export function getValidTransitionsFrom(status) { - return VALID_TRANSITIONS[status]; -} -/** - * Get a human-readable description of why a transition is invalid - * - * @param from - Current status - * @param to - Attempted target status - * @param options - Optional message options with registry for prefix - * @returns Error message describing the violation - * - * @example - * ```typescript - * getTransitionErrorMessage("roadmap", "completed"); - * // → "Cannot transition from 'roadmap' to 'completed'. Must go through 'active' first." - * - * getTransitionErrorMessage("completed", "active"); - * // → "Cannot transition from 'completed' (terminal state). Use unlock-reason tag to modify." - * ``` - */ -export function getTransitionErrorMessage(from, to, options) { - const tagPrefix = options?.registry?.tagPrefix ?? DEFAULT_TAG_PREFIX; - // Handle terminal state - if (from === 'completed') { - return `Cannot transition from 'completed' (terminal state). Use ${tagPrefix}unlock-reason to modify.`; - } - // Handle skipping active (roadmap → completed) - if (from === 'roadmap' && to === 'completed') { - return `Cannot transition from 'roadmap' to 'completed'. Must go through 'active' first.`; - } - // Handle deferred shortcuts - if (from === 'deferred' && (to === 'active' || to === 'completed')) { - return `Cannot transition from 'deferred' to '${to}'. Must reactivate to 'roadmap' first.`; - } - // Generic message - const validTargets = VALID_TRANSITIONS[from]; - if (validTargets.length === 0) { - return `Cannot transition from '${from}' (terminal state).`; - } - return `Invalid transition from '${from}' to '${to}'. Valid targets: ${validTargets.join(', ')}.`; -} -//# sourceMappingURL=transitions.js.map \ No newline at end of file diff --git a/dist/validation/fsm/transitions.js.map b/dist/validation/fsm/transitions.js.map deleted file mode 100644 index 5e6f7481..00000000 --- a/dist/validation/fsm/transitions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"transitions.js","sourceRoot":"","sources":["../../../src/validation/fsm/transitions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAIH,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAU9D;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAE1B;IACF,OAAO,EAAE,CAAC,QAAQ,EAAE,UAAU,EAAE,SAAS,CAAC,EAAE,4CAA4C;IACxF,MAAM,EAAE,CAAC,WAAW,EAAE,SAAS,CAAC,E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AqB,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;AACpG,CAAC"} \ No newline at end of file diff --git a/dist/validation/fsm/validator.d.ts b/dist/validation/fsm/validator.d.ts deleted file mode 100644 index f438c034..00000000 --- a/dist/validation/fsm/validator.d.ts +++ /dev/null @@ -1,162 +0,0 @@ -/** - * @libar-docs - * @libar-docs-validation - * @libar-docs-pattern FSMValidator - * @libar-docs-status active - * @libar-docs-implements PhaseStateMachineValidation - * @libar-docs-depends-on:PDR005MvpWorkflow - * @libar-docs-arch-role decider - * @libar-docs-arch-context validation - * @libar-docs-arch-layer application - * - * ## FSM Validator - Pure Validation Functions - * - * Pure validation functions following the Decider pattern: - * - No I/O, no side effects - * - Return structured results, never throw - * - Composable and testable - * - * ### When to Use - * - * - Use `validateStatus()` to validate status values before processing - * - Use `validateTransition()` to check proposed status changes - * - Use `validateCompletionMetadata()` to enforce completed state requirements - */ -import { type ProcessStatusValue } from '../../taxonomy/index.js'; -import type { TagRegistry } from '../../validation-schemas/tag-registry.js'; -import { type ProtectionLevel } from './states.js'; -/** - * Result of validating a status value - */ -export interface StatusValidationResult { - /** Whether the status is valid */ - valid: boolean; - /** The status that was validated */ - status: string; - /** Error message if invalid */ - error?: string; - /** Warnings (valid but with caveats) */ - warnings?: string[]; -} -/** - * Result of validating a status transition - */ -export interface TransitionValidationResult { - /** Whether the transition is valid */ - valid: boolean; - /** The source status */ - from: ProcessStatusValue; - /** The target status */ - to: ProcessStatusValue; - /** Error message if invalid */ - error?: string; - /** Valid alternatives if transition is invalid */ - validAlternatives?: readonly ProcessStatusValue[]; -} -/** - * Result of validating completion metadata - */ -export interface CompletionMetadataValidationResult { - /** Whether the metadata is valid/complete */ - valid: boolean; - /** Warnings for missing optional metadata */ - warnings: string[]; -} -/** - * Pattern metadata for completion validation - */ -export interface PatternMetadata { - status: string; - completed?: string; - effortActual?: string; - effortPlanned?: string; -} -/** - * Options for FSM validation functions - */ -export interface FSMValidationOptions { - /** Tag registry for prefix-aware error messages (optional) */ - readonly registry?: TagRegistry; -} -/** - * Validate a status value against PDR-005 FSM - * - * @param status - Status value to validate - * @param options - Optional validation options with registry - * @returns Validation result with error/warnings - * - * @example - * ```typescript - * validateStatus("roadmap"); // → { valid: true, status: "roadmap" } - * validateStatus("done"); // → { valid: false, status: "done", error: "Invalid status..." } - * ``` - */ -export declare function validateStatus(status: string, options?: FSMValidationOptions): StatusValidationResult; -/** - * Validate a status transition against FSM rules - * - * @param from - Current status - * @param to - Target status - * @returns Validation result with alternatives if invalid - * - * @example - * ```typescript - * validateTransition("roadmap", "active"); - * // → { valid: true, from: "roadmap", to: "active" } - * - * validateTransition("roadmap", "completed"); - * // → { valid: false, from: "roadmap", to: "completed", - * // error: "Cannot transition...", validAlternatives: ["active", "deferred", "roadmap"] } - * ``` - */ -export declare function validateTransition(from: string, to: string): TransitionValidationResult; -/** - * Validate completion metadata requirements - * - * When a pattern has status "completed", it should have: - * - completed date tag (warning if missing) - * - effort-actual tag (warning if effort-planned exists but actual doesn't) - * - * @param pattern - Pattern metadata to validate - * @param options - Optional validation options with registry - * @returns Validation result with warnings - * - * @example - * ```typescript - * validateCompletionMetadata({ status: "completed" }); - * // → { valid: true, warnings: ["Completed pattern missing completed date tag"] } - * - * validateCompletionMetadata({ status: "completed", completed: "2026-01-09" }); - * // → { valid: true, warnings: [] } - * ``` - */ -export declare function validateCompletionMetadata(pattern: PatternMetadata, options?: FSMValidationOptions): CompletionMetadataValidationResult; -/** - * Full validation of a pattern's status and metadata - * - * Combines status validation with completion metadata checks. - * - * @param pattern - Pattern metadata to validate - * @param options - Optional validation options with registry - * @returns Combined validation result - */ -export declare function validatePatternStatus(pattern: PatternMetadata, options?: FSMValidationOptions): { - valid: boolean; - statusResult: StatusValidationResult; - completionResult: CompletionMetadataValidationResult; - allWarnings: string[]; -}; -/** - * Get a summary of FSM protection for a status - * - * @param status - Status to describe - * @param options - Optional validation options with registry - * @returns Human-readable protection description - */ -export declare function getProtectionSummary(status: ProcessStatusValue, options?: FSMValidationOptions): { - level: ProtectionLevel; - description: string; - canAddDeliverables: boolean; - requiresUnlock: boolean; -}; -//# sourceMappingURL=validator.d.ts.map \ No newline at end of file diff --git a/dist/validation/fsm/validator.d.ts.map b/dist/validation/fsm/validator.d.ts.map deleted file mode 100644 index b4cc4c5f..00000000 --- a/dist/validation/fsm/validator.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"validator.d.ts","sourceRoot":"","sources":["../../../src/validation/fsm/validator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAAyB,KAAK,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AACzF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAM5E,OAAO,EAAuC,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAGxF;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,kCAAkC;IAClC,KAAK,EAAE,OAAO,CAAC;IACf,oCAAoC;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,+BAA+B;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wCAAwC;IACxC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,sCAAsC;IACtC,KAAK,EAAE,OAAO,CAAC;IACf,wBAAwB;IACxB,IAAI,EAAE,kBAAkB,CAAC;IACzB,wBAAwB;IACxB,EAAE,EAAE,kBAAkB,CAAC;IACvB,+BAA+B;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kDAAkD;IAClD,iBAAiB,CAAC,EAAE,SAAS,kBAAkB,EAAE,CAAC;CACnD;AAED;;GAEG;AACH,MAAM,WAAW,kCAAkC;IACjD,6CAA6C;IAC7C,KAAK,EAAE,OAAO,CAAC;IACf,6CAA6C;IAC7C,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AASD;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,8DAA8D;IAC9D,QAAQ,CAAC,QAAQ,CAAC,EAAE,WAAW,CAAC;CACjC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,oBAAoB,GAC7B,sBAAsB,CAyBxB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,0BAA0B,CAsCvF;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,eAAe,EACxB,OAAO,CAAC,EAAE,oBAAoB,GAC7B,kCAAkC,CA0BpC;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,eAAe,EACxB,OAAO,CAAC,EAAE,oBAAoB,GAC7B;IACD,KAAK,EAAE,OAAO,CAAC;IACf,YAAY,EAAE,sBAAsB,CAAC;IACrC,gBAAgB,EAAE,kCAAkC,CAAC;IACrD,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,CAYA;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,kBAAkB,EAC1B,OAAO,CAAC,EAAE,oBAAoB,GAC7B;IACD,KAAK,EAAE,eAAe,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,cAAc,EAAE,OAAO,CAAC;CACzB,CAgBA"} \ No newline at end of file diff --git a/dist/validation/fsm/validator.js b/dist/validation/fsm/validator.js deleted file mode 100644 index 163ee02c..00000000 --- a/dist/validation/fsm/validator.js +++ /dev/null @@ -1,204 +0,0 @@ -/** - * @libar-docs - * @libar-docs-validation - * @libar-docs-pattern FSMValidator - * @libar-docs-status active - * @libar-docs-implements PhaseStateMachineValidation - * @libar-docs-depends-on:PDR005MvpWorkflow - * @libar-docs-arch-role decider - * @libar-docs-arch-context validation - * @libar-docs-arch-layer application - * - * ## FSM Validator - Pure Validation Functions - * - * Pure validation functions following the Decider pattern: - * - No I/O, no side effects - * - Return structured results, never throw - * - Composable and testable - * - * ### When to Use - * - * - Use `validateStatus()` to validate status values before processing - * - Use `validateTransition()` to check proposed status changes - * - Use `validateCompletionMetadata()` to enforce completed state requirements - */ -import { PROCESS_STATUS_VALUES } from '../../taxonomy/index.js'; -import { VALID_TRANSITIONS, getValidTransitionsFrom, getTransitionErrorMessage, } from './transitions.js'; -import { isTerminalState, getProtectionLevel } from './states.js'; -import { DEFAULT_TAG_PREFIX } from '../../config/defaults.js'; -/** - * Check if a string is a valid ProcessStatusValue - */ -function isValidStatusValue(status) { - return PROCESS_STATUS_VALUES.includes(status); -} -/** - * Validate a status value against PDR-005 FSM - * - * @param status - Status value to validate - * @param options - Optional validation options with registry - * @returns Validation result with error/warnings - * - * @example - * ```typescript - * validateStatus("roadmap"); // → { valid: true, status: "roadmap" } - * validateStatus("done"); // → { valid: false, status: "done", error: "Invalid status..." } - * ``` - */ -export function validateStatus(status, options) { - const tagPrefix = options?.registry?.tagPrefix ?? DEFAULT_TAG_PREFIX; - if (!isValidStatusValue(status)) { - return { - valid: false, - status, - error: `Invalid status '${status}'. Valid values: ${PROCESS_STATUS_VALUES.join(', ')}.`, - }; - } - const warnings = []; - // Add contextual warnings for terminal state - if (isTerminalState(status)) { - warnings.push(`Status 'completed' is a terminal state. Use ${tagPrefix}unlock-reason to modify.`); - } - return { - valid: true, - status, - ...(warnings.length > 0 && { warnings }), - }; -} -/** - * Validate a status transition against FSM rules - * - * @param from - Current status - * @param to - Target status - * @returns Validation result with alternatives if invalid - * - * @example - * ```typescript - * validateTransition("roadmap", "active"); - * // → { valid: true, from: "roadmap", to: "active" } - * - * validateTransition("roadmap", "completed"); - * // → { valid: false, from: "roadmap", to: "completed", - * // error: "Cannot transition...", validAlternatives: ["active", "deferred", "roadmap"] } - * ``` - */ -export function validateTransition(from, to) { - // First validate both status values - if (!isValidStatusValue(from)) { - return { - valid: false, - from: from, // Type assertion for interface compliance - to: to, - error: `Invalid source status '${from}'. Valid values: ${PROCESS_STATUS_VALUES.join(', ')}.`, - }; - } - if (!isValidStatusValue(to)) { - return { - valid: false, - from, - to: to, - error: `Invalid target status '${to}'. Valid values: ${PROCESS_STATUS_VALUES.join(', ')}.`, - }; - } - // Check if transition is valid - const validTargets = VALID_TRANSITIONS[from]; - if (validTargets.includes(to)) { - return { - valid: true, - from, - to, - }; - } - // Invalid transition - provide helpful error and alternatives - return { - valid: false, - from, - to, - error: getTransitionErrorMessage(from, to), - validAlternatives: getValidTransitionsFrom(from), - }; -} -/** - * Validate completion metadata requirements - * - * When a pattern has status "completed", it should have: - * - completed date tag (warning if missing) - * - effort-actual tag (warning if effort-planned exists but actual doesn't) - * - * @param pattern - Pattern metadata to validate - * @param options - Optional validation options with registry - * @returns Validation result with warnings - * - * @example - * ```typescript - * validateCompletionMetadata({ status: "completed" }); - * // → { valid: true, warnings: ["Completed pattern missing completed date tag"] } - * - * validateCompletionMetadata({ status: "completed", completed: "2026-01-09" }); - * // → { valid: true, warnings: [] } - * ``` - */ -export function validateCompletionMetadata(pattern, options) { - const tagPrefix = options?.registry?.tagPrefix ?? DEFAULT_TAG_PREFIX; - const warnings = []; - // Only check completion requirements for completed status - if (pattern.status !== 'completed') { - return { valid: true, warnings: [] }; - } - // Check for completion date - if (!pattern.completed) { - warnings.push(`Completed pattern missing ${tagPrefix}completed date.`); - } - // Check for effort tracking consistency - if (pattern.effortPlanned && !pattern.effortActual) { - warnings.push(`Pattern has ${tagPrefix}effort but missing ${tagPrefix}effort-actual. ` + - 'Consider adding actual effort for tracking.'); - } - return { - valid: true, - warnings, - }; -} -/** - * Full validation of a pattern's status and metadata - * - * Combines status validation with completion metadata checks. - * - * @param pattern - Pattern metadata to validate - * @param options - Optional validation options with registry - * @returns Combined validation result - */ -export function validatePatternStatus(pattern, options) { - const statusResult = validateStatus(pattern.status, options); - const completionResult = validateCompletionMetadata(pattern, options); - const allWarnings = [...(statusResult.warnings ?? []), ...completionResult.warnings]; - return { - valid: statusResult.valid && completionResult.valid, - statusResult, - completionResult, - allWarnings, - }; -} -/** - * Get a summary of FSM protection for a status - * - * @param status - Status to describe - * @param options - Optional validation options with registry - * @returns Human-readable protection description - */ -export function getProtectionSummary(status, options) { - const tagPrefix = options?.registry?.tagPrefix ?? DEFAULT_TAG_PREFIX; - const level = getProtectionLevel(status); - const descriptions = { - none: 'Fully editable - no restrictions', - scope: 'Scope-locked - cannot add new deliverables', - hard: `Hard-locked - requires ${tagPrefix}unlock-reason to modify`, - }; - return { - level, - description: descriptions[level], - canAddDeliverables: level === 'none', - requiresUnlock: level === 'hard', - }; -} -//# sourceMappingURL=validator.js.map \ No newline at end of file diff --git a/dist/validation/fsm/validator.js.map b/dist/validation/fsm/validator.js.map deleted file mode 100644 index 8e9fa5d3..00000000 --- a/dist/validation/fsm/validator.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"validator.js","sourceRoot":"","sources":["../../../src/validation/fsm/validator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,qBAAqB,EAA2B,MAAM,yBAAyB,CAAC;AAEzF,OAAO,EACL,iBAAiB,EACjB,uBAAuB,EACvB,yBAAyB,GAC1B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAwB,MAAM,aAAa,CAAC;AACxF,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAoD9D;;GAEG;AACH,SAAS,kBAAkB,CAAC,MAAc;IACxC,O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,OAAO;QACL,KAAK,EAAE,IAAI;QACX,QAAQ;KACT,CAAC;AACJ,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,qBAAqB,CACnC,OAAwB,EACxB,OAA8B;IAO9B,MAAM,YAAY,GAAG,cAAc,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC7D,MAAM,gBAAgB,GAAG,0BAA0B,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAEtE,MAAM,WAAW,GAAG,CAAC,GAAG,CAAC,YAAY,CAAC,QAAQ,IAAI,EAAE,CAAC,EAAE,GAAG,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IAErF,OAAO;QACL,KAAK,EAAE,YAAY,CAAC,KAAK,IAAI,gBAAgB,CAAC,KAAK;QACnD,YAAY;QACZ,gBAAgB;QAChB,WAAW;KACZ,CAAC;AACJ,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAClC,MAA0B,EAC1B,OAA8B;IAO9B,MAAM,SAAS,GAAG,OAAO,EAAE,QAAQ,EAAE,SAAS,IAAI,kBAAkB,CAAC;IACrE,MAAM,KAAK,GAAG,kBAAkB,CAAC,MAAM,CAAC,CAAC;IAEzC,MAAM,YAAY,GAAoC;QACpD,IAAI,EAAE,kCAAkC;QACxC,KAAK,EAAE,4CAA4C;QACnD,IAAI,EAAE,0BAA0B,SAAS,yBAAyB;KACnE,CAAC;IAEF,OAAO;QACL,KAAK;QACL,WAAW,EAAE,YAAY,CAAC,KAAK,CAAC;QAChC,kBAAkB,EAAE,KAAK,KAAK,MAAM;QACpC,cAAc,EAAE,KAAK,KAAK,MAAM;KACjC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/dist/validation/index.d.ts b/dist/validation/index.d.ts deleted file mode 100644 index 486f8bfb..00000000 --- a/dist/validation/index.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * @libar-docs - * @libar-docs-validation - * @libar-docs-pattern ValidationModule - * @libar-docs-status completed - * - * ## ValidationModule - DoD Validation and Anti-Pattern Detection - * - * Barrel export for validation module providing: - * - Definition of Done (DoD) validation for completed phases - * - Anti-pattern detection for documentation architecture violations - * - * ### When to Use - * - * - Import validation functions for CLI integration - * - Import types for extending validation rules - */ -export type { AntiPatternId, AntiPatternThresholds, AntiPatternViolation, DoDValidationResult, DoDValidationSummary, WithTagRegistry, } from './types.js'; -export { AntiPatternThresholdsSchema, DEFAULT_THRESHOLDS, getPhaseStatusEmoji } from './types.js'; -export { isDeliverableComplete, hasAcceptanceCriteria, extractAcceptanceCriteriaScenarios, validateDoDForPhase, validateDoD, formatDoDSummary, } from './dod-validator.js'; -export { type AntiPatternDetectionOptions, detectProcessInCode, detectMagicComments, detectScenarioBloat, detectMegaFeature, detectAntiPatterns, formatAntiPatternReport, toValidationIssues, } from './anti-patterns.js'; -export * from './fsm/index.js'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/dist/validation/index.d.ts.map b/dist/validation/index.d.ts.map deleted file mode 100644 index e7a44646..00000000 --- a/dist/validation/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/validation/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,YAAY,EACV,aAAa,EACb,qBAAqB,EACrB,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,eAAe,GAChB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,2BAA2B,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAGlG,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,kCAAkC,EAClC,mBAAmB,EACnB,WAAW,EACX,gBAAgB,GACjB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EACL,KAAK,2BAA2B,EAChC,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,uBAAuB,EACvB,kBAAkB,GACnB,MAAM,oBAAoB,CAAC;AAG5B,cAAc,gBAAgB,CAAC"} \ No newline at end of file diff --git a/dist/validation/index.js b/dist/validation/index.js deleted file mode 100644 index bee039d0..00000000 --- a/dist/validation/index.js +++ /dev/null @@ -1,25 +0,0 @@ -/** - * @libar-docs - * @libar-docs-validation - * @libar-docs-pattern ValidationModule - * @libar-docs-status completed - * - * ## ValidationModule - DoD Validation and Anti-Pattern Detection - * - * Barrel export for validation module providing: - * - Definition of Done (DoD) validation for completed phases - * - Anti-pattern detection for documentation architecture violations - * - * ### When to Use - * - * - Import validation functions for CLI integration - * - Import types for extending validation rules - */ -export { AntiPatternThresholdsSchema, DEFAULT_THRESHOLDS, getPhaseStatusEmoji } from './types.js'; -// DoD Validator -export { isDeliverableComplete, hasAcceptanceCriteria, extractAcceptanceCriteriaScenarios, validateDoDForPhase, validateDoD, formatDoDSummary, } from './dod-validator.js'; -// Anti-Pattern Detector -export { detectProcessInCode, detectMagicComments, detectScenarioBloat, detectMegaFeature, detectAntiPatterns, formatAntiPatternReport, toValidationIssues, } from './anti-patterns.js'; -// FSM Module - Phase State Machine (PDR-005) -export * from './fsm/index.js'; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/validation/index.js.map b/dist/validation/index.js.map deleted file mode 100644 index 2354a296..00000000 --- a/dist/validation/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/validation/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAYH,OAAO,EAAE,2BAA2B,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAElG,gBAAgB;AAChB,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,kCAAkC,EAClC,mBAAmB,EACnB,WAAW,EACX,gBAAgB,GACjB,MAAM,oBAAoB,CAAC;AAE5B,wBAAwB;AACxB,OAAO,EAEL,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,uBAAuB,EACvB,kBAAkB,GACnB,MAAM,oBAAoB,CAAC;AAE5B,6CAA6C;AAC7C,cAAc,gBAAgB,CAAC"} \ No newline at end of file diff --git a/dist/validation/types.d.ts b/dist/validation/types.d.ts deleted file mode 100644 index 149b1c92..00000000 --- a/dist/validation/types.d.ts +++ /dev/null @@ -1,136 +0,0 @@ -/** - * @libar-docs - * @libar-docs-validation - * @libar-docs-pattern DoDValidationTypes - * @libar-docs-status completed - * @libar-docs-used-by DoDValidator, AntiPatternDetector - * @libar-docs-extract-shapes AntiPatternId, AntiPatternViolation, AntiPatternThresholds, AntiPatternThresholdsSchema, DEFAULT_THRESHOLDS, DoDValidationResult, DoDValidationSummary, getPhaseStatusEmoji, WithTagRegistry - * - * ## DoDValidationTypes - Type Definitions for DoD Validation - * - * Types and schemas for Definition of Done (DoD) validation and anti-pattern detection. - * Follows the project's schema-first pattern with Zod for runtime validation. - * - * ### When to Use - * - * - When implementing DoD validation logic - * - When extending anti-pattern detection rules - * - When consuming validation results in CLI or reports - */ -import { z } from 'zod'; -import type { Deliverable } from '../validation-schemas/dual-source.js'; -import type { TagRegistry } from '../validation-schemas/tag-registry.js'; -/** - * Base interface for options that accept a TagRegistry for prefix-aware behavior. - * - * Many validation functions need to be aware of the configured tag prefix - * (e.g., "@libar-docs-" vs "@docs-"). This interface provides a consistent - * way to pass that configuration. - * - * ### When to Use - * - * Extend this interface when creating options for functions that: - * - Generate error messages referencing tag names - * - Detect tags in source code - * - Validate tag formats - * - * @example - * ```typescript - * export interface MyValidationOptions extends WithTagRegistry { - * readonly strict?: boolean; - * } - * ``` - */ -export interface WithTagRegistry { - /** Tag registry for prefix-aware behavior (defaults to @libar-docs- if not provided) */ - readonly registry?: TagRegistry; -} -/** - * Anti-pattern rule identifiers - * - * Each ID corresponds to a specific violation of the dual-source - * documentation architecture or process hygiene. - */ -export type AntiPatternId = 'tag-duplication' | 'process-in-code' | 'magic-comments' | 'scenario-bloat' | 'mega-feature'; -/** - * Zod schema for anti-pattern thresholds - * - * Configurable limits for detecting anti-patterns. - */ -export declare const AntiPatternThresholdsSchema: z.ZodObject<{ - scenarioBloatThreshold: z.ZodDefault; - megaFeatureLineThreshold: z.ZodDefault; - magicCommentThreshold: z.ZodDefault; -}, z.core.$strip>; -export type AntiPatternThresholds = z.infer; -/** - * Default thresholds for anti-pattern detection - */ -export declare const DEFAULT_THRESHOLDS: AntiPatternThresholds; -/** - * Anti-pattern detection result - * - * Reports a specific anti-pattern violation with context - * for remediation. - */ -export interface AntiPatternViolation { - /** Anti-pattern identifier */ - readonly id: AntiPatternId; - /** Human-readable description */ - readonly message: string; - /** File where violation was found */ - readonly file: string; - /** Line number (if applicable) */ - readonly line?: number; - /** Severity (error = architectural violation, warning = hygiene issue) */ - readonly severity: 'error' | 'warning'; - /** Fix guidance */ - readonly fix?: string; -} -/** - * DoD validation result for a single phase/pattern - * - * Reports whether a completed phase meets Definition of Done criteria: - * 1. All deliverables must have "complete" status - * 2. At least one @acceptance-criteria scenario must exist - */ -export interface DoDValidationResult { - /** Pattern name being validated */ - readonly patternName: string; - /** Phase number being validated */ - readonly phase: number; - /** True if all DoD criteria are met */ - readonly isDoDMet: boolean; - /** All deliverables from Background table */ - readonly deliverables: readonly Deliverable[]; - /** Deliverables that are not yet complete */ - readonly incompleteDeliverables: readonly Deliverable[]; - /** True if no @acceptance-criteria scenarios found */ - readonly missingAcceptanceCriteria: boolean; - /** Human-readable validation messages */ - readonly messages: readonly string[]; -} -/** - * Aggregate DoD validation summary - * - * Summarizes validation across multiple phases for CLI output. - */ -export interface DoDValidationSummary { - /** Per-phase validation results */ - readonly results: readonly DoDValidationResult[]; - /** Total phases validated */ - readonly totalPhases: number; - /** Phases that passed DoD */ - readonly passedPhases: number; - /** Phases that failed DoD */ - readonly failedPhases: number; -} -/** - * Get status emoji for phase-level aggregates. - * - * @param allComplete - Whether all patterns in the phase are complete - * @param anyActive - Whether any patterns in the phase are active/in-progress - * @returns Status emoji: ✅ if all complete, 🚧 if any active, 📋 otherwise - */ -export declare function getPhaseStatusEmoji(allComplete: boolean, anyActive: boolean): string; -//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/dist/validation/types.d.ts.map b/dist/validation/types.d.ts.map deleted file mode 100644 index a7f2643b..00000000 --- a/dist/validation/types.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/validation/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAMzE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,WAAW,eAAe;IAC9B,wFAAwF;IACxF,QAAQ,CAAC,QAAQ,CAAC,EAAE,WAAW,CAAC;CACjC;AAMD;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GACrB,iBAAiB,GACjB,iBAAiB,GACjB,gBAAgB,GAChB,gBAAgB,GAChB,cAAc,CAAC;AAEnB;;;;GAIG;AACH,eAAO,MAAM,2BAA2B;;;;iBAOtC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,qBAIhC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACnC,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,EAAE,aAAa,CAAC;IAC3B,iCAAiC;IACjC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,qCAAqC;IACrC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,kCAAkC;IAClC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,0EAA0E;IAC1E,QAAQ,CAAC,QAAQ,EAAE,OAAO,GAAG,SAAS,CAAC;IACvC,mBAAmB;IACnB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,mBAAmB;IAClC,mCAAmC;IACnC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,mCAAmC;IACnC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,uCAAuC;IACvC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,6CAA6C;IAC7C,QAAQ,CAAC,YAAY,EAAE,SAAS,WAAW,EAAE,CAAC;IAC9C,6CAA6C;IAC7C,QAAQ,CAAC,sBAAsB,EAAE,SAAS,WAAW,EAAE,CAAC;IACxD,sDAAsD;IACtD,QAAQ,CAAC,yBAAyB,EAAE,OAAO,CAAC;IAC5C,yCAAyC;IACzC,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;CACtC;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,mCAAmC;IACnC,QAAQ,CAAC,OAAO,EAAE,SAAS,mBAAmB,EAAE,CAAC;IACjD,6BAA6B;IAC7B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,6BAA6B;IAC7B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,6BAA6B;IAC7B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,GAAG,MAAM,CAIpF"} \ No newline at end of file diff --git a/dist/validation/types.js b/dist/validation/types.js deleted file mode 100644 index 8bb73f8f..00000000 --- a/dist/validation/types.js +++ /dev/null @@ -1,56 +0,0 @@ -/** - * @libar-docs - * @libar-docs-validation - * @libar-docs-pattern DoDValidationTypes - * @libar-docs-status completed - * @libar-docs-used-by DoDValidator, AntiPatternDetector - * @libar-docs-extract-shapes AntiPatternId, AntiPatternViolation, AntiPatternThresholds, AntiPatternThresholdsSchema, DEFAULT_THRESHOLDS, DoDValidationResult, DoDValidationSummary, getPhaseStatusEmoji, WithTagRegistry - * - * ## DoDValidationTypes - Type Definitions for DoD Validation - * - * Types and schemas for Definition of Done (DoD) validation and anti-pattern detection. - * Follows the project's schema-first pattern with Zod for runtime validation. - * - * ### When to Use - * - * - When implementing DoD validation logic - * - When extending anti-pattern detection rules - * - When consuming validation results in CLI or reports - */ -import { z } from 'zod'; -/** - * Zod schema for anti-pattern thresholds - * - * Configurable limits for detecting anti-patterns. - */ -export const AntiPatternThresholdsSchema = z.object({ - /** Maximum scenarios per feature file before warning */ - scenarioBloatThreshold: z.number().int().positive().default(30), - /** Maximum lines per feature file before warning */ - megaFeatureLineThreshold: z.number().int().positive().default(750), - /** Maximum magic comments before warning */ - magicCommentThreshold: z.number().int().positive().default(5), -}); -/** - * Default thresholds for anti-pattern detection - */ -export const DEFAULT_THRESHOLDS = { - scenarioBloatThreshold: 30, - megaFeatureLineThreshold: 750, - magicCommentThreshold: 5, -}; -/** - * Get status emoji for phase-level aggregates. - * - * @param allComplete - Whether all patterns in the phase are complete - * @param anyActive - Whether any patterns in the phase are active/in-progress - * @returns Status emoji: ✅ if all complete, 🚧 if any active, 📋 otherwise - */ -export function getPhaseStatusEmoji(allComplete, anyActive) { - if (allComplete) - return '✅'; - if (anyActive) - return '🚧'; - return '📋'; -} -//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/dist/validation/types.js.map b/dist/validation/types.js.map deleted file mode 100644 index 2bf10b32..00000000 --- a/dist/validation/types.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/validation/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAmDxB;;;;GAIG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IAClD,wDAAwD;IACxD,sBAAsB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC/D,oDAAoD;IACpD,wBAAwB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC;IAClE,4CAA4C;IAC5C,qBAAqB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;CAC9D,CAAC,CAAC;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAA0B;IACvD,sBAAsB,EAAE,EAAE;IAC1B,wBAAwB,EAAE,GAAG;IAC7B,qBAAqB,EAAE,CAAC;CACzB,CAAC;AA+DF;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CAAC,WAAoB,EAAE,SAAkB;IAC1E,IAAI,WAAW;QAAE,OAAO,GAAG,CAAC;IAC5B,IAAI,SAAS;QAAE,OAAO,IAAI,CAAC;IAC3B,OAAO,IAAI,CAAC;AACd,CAAC"} \ No newline at end of file diff --git a/docs-generated/BUSINESS-RULES.md b/docs-generated/BUSINESS-RULES.md index ad5149ce..99d05718 100644 --- a/docs-generated/BUSINESS-RULES.md +++ b/docs-generated/BUSINESS-RULES.md @@ -5,7 +5,7 @@ --- -**Domain constraints and invariants extracted from feature specifications. 553 rules from 120 features across 7 product areas.** +**Domain constraints and invariants extracted from feature specifications. 554 rules from 120 features across 7 product areas.** --- @@ -13,11 +13,11 @@ | Product Area | Features | Rules | With Invariants | | --- | --- | --- | --- | -| [Annotation](business-rules/annotation.md) | 20 | 88 | 74 | +| [Annotation](business-rules/annotation.md) | 20 | 88 | 88 | | [Configuration](business-rules/configuration.md) | 7 | 32 | 32 | | [CoreTypes](business-rules/core-types.md) | 5 | 22 | 22 | -| [DataAPI](business-rules/data-api.md) | 20 | 86 | 72 | -| [Generation](business-rules/generation.md) | 55 | 264 | 230 | +| [DataAPI](business-rules/data-api.md) | 20 | 86 | 86 | +| [Generation](business-rules/generation.md) | 55 | 265 | 265 | | [Process](business-rules/process.md) | 2 | 7 | 7 | | [Validation](business-rules/validation.md) | 11 | 54 | 54 | diff --git a/docs-generated/_claude-md/architecture/reference-sample.md b/docs-generated/_claude-md/architecture/reference-sample.md new file mode 100644 index 00000000..54a3f70f --- /dev/null +++ b/docs-generated/_claude-md/architecture/reference-sample.md @@ -0,0 +1,172 @@ +### Reference Generation Sample + +#### Product area canonical values + +**Invariant:** The product-area tag uses one of 7 canonical values. Each value represents a reader-facing documentation section, not a source module. + +| Value | Reader Question | Covers | +| --- | --- | --- | +| Annotation | How do I annotate code? | Scanning, extraction, tag parsing, dual-source | +| Configuration | How do I configure the tool? | Config loading, presets, resolution | +| Generation | How does code become docs? | Codecs, generators, rendering, diagrams | +| Validation | How is the workflow enforced? | FSM, DoD, anti-patterns, process guard, lint | +| DataAPI | How do I query process state? | Process state API, stubs, context assembly, CLI | +| CoreTypes | What foundational types exist? | Result monad, error factories, string utils | +| Process | How does the session workflow work? | Session lifecycle, handoffs, conventions | + + +#### ADR category canonical values + +**Invariant:** The adr-category tag uses one of 4 values. + +| Value | Purpose | +| --- | --- | +| architecture | System structure, component design, data flow | +| process | Workflow, conventions, annotation rules | +| testing | Test strategy, verification approach | +| documentation | Documentation generation, content structure | + + +#### FSM status values and protection levels + +**Invariant:** Pattern status uses exactly 4 values with defined protection levels. These are enforced by Process Guard at commit time. + +| Status | Protection | Can Add Deliverables | Allowed Actions | +| --- | --- | --- | --- | +| roadmap | None | Yes | Full editing | +| active | Scope-locked | No | Edit existing deliverables only | +| completed | Hard-locked | No | Requires unlock-reason tag | +| deferred | None | Yes | Full editing | + + +#### Valid FSM transitions + +**Invariant:** Only these transitions are valid. All others are rejected by Process Guard. + +| From | To | Trigger | +| --- | --- | --- | +| roadmap | active | Start work | +| roadmap | deferred | Postpone | +| active | completed | All deliverables done | +| active | roadmap | Blocked/regressed | +| deferred | roadmap | Resume planning | + + +#### Tag format types + +**Invariant:** Every tag has one of 6 format types that determines how its value is parsed. + +| Format | Parsing | Example | +| --- | --- | --- | +| flag | Boolean presence, no value | @libar-docs-core | +| value | Simple string | @libar-docs-pattern MyPattern | +| enum | Constrained to predefined list | @libar-docs-status completed | +| csv | Comma-separated values | @libar-docs-uses A, B, C | +| number | Numeric value | @libar-docs-phase 15 | +| quoted-value | Preserves spaces | @libar-docs-brief:'Multi word' | + + +#### Source ownership + +**Invariant:** Relationship tags have defined ownership by source type. Anti-pattern detection enforces these boundaries. + +| Tag | Correct Source | Wrong Source | Rationale | +| --- | --- | --- | --- | +| uses | TypeScript | Feature files | TS owns runtime dependencies | +| depends-on | Feature files | TypeScript | Gherkin owns planning dependencies | +| quarter | Feature files | TypeScript | Gherkin owns timeline metadata | +| team | Feature files | TypeScript | Gherkin owns ownership metadata | + + +#### Quarter format convention + +**Invariant:** The quarter tag uses `YYYY-QN` format (e.g., `2026-Q1`). ISO-year-first sorting works lexicographically. + + +#### Canonical phase definitions (6-phase USDP standard) + +**Invariant:** The default workflow defines exactly 6 phases in fixed order. These are the canonical phase names and ordinals used by all generated documentation. + +| Order | Phase | Purpose | +| --- | --- | --- | +| 1 | Inception | Problem framing, scope definition | +| 2 | Elaboration | Design decisions, architecture exploration | +| 3 | Session | Planning and design session work | +| 4 | Construction | Implementation, testing, integration | +| 5 | Validation | Verification, acceptance criteria confirmation | +| 6 | Retrospective | Review, lessons learned, documentation | + + +#### Deliverable status canonical values + +**Invariant:** Deliverable status (distinct from pattern FSM status) uses exactly 6 values, enforced by Zod schema at parse time. + +| Value | Meaning | +| --- | --- | +| complete | Work is done | +| in-progress | Work is ongoing | +| pending | Work has not started | +| deferred | Work postponed | +| superseded | Replaced by another | +| n/a | Not applicable | + + +#### API Types + +| Type | Kind | +| --- | --- | +| SectionBlock | type | +| normalizeStatus | function | +| DELIVERABLE_STATUS_VALUES | const | +| CategoryDefinition | interface | + + +#### Behavior Specifications + +##### DeliveryProcessFactory + +##### DefineConfig + +##### ADR005CodecBasedMarkdownRendering + +| Rule | Description | +| --- | --- | +| Codecs implement a decode-only contract | **Invariant:** Every codec is a pure function that accepts a MasterDataset
and returns a RenderableDocument.... | +| RenderableDocument is a typed intermediate representation | **Invariant:** RenderableDocument contains a title, an ordered array of
SectionBlock elements, and an optional... | +| CompositeCodec assembles documents from child codecs | **Invariant:** CompositeCodec accepts an array of child codecs and
produces a single RenderableDocument by... | +| ADR content comes from both Feature description and Rule prefixes | **Invariant:** ADR structured content (Context, Decision, Consequences)
can appear in two locations within a... | +| The markdown renderer is codec-agnostic | **Invariant:** The renderer accepts any RenderableDocument regardless of
which codec produced it. Rendering... | + +##### ADR001TaxonomyCanonicalValues + +| Rule | Description | +| --- | --- | +| Product area canonical values | **Invariant:** The product-area tag uses one of 7 canonical values.
Each value represents a reader-facing... | +| ADR category canonical values | **Invariant:** The adr-category tag uses one of 4 values.
**Rationale:** Unbounded category values prevent... | +| FSM status values and protection levels | **Invariant:** Pattern status uses exactly 4 values with defined
protection levels. These are enforced by Process... | +| Valid FSM transitions | **Invariant:** Only these transitions are valid. All others are
rejected by Process Guard.
**Rationale:**... | +| Tag format types | **Invariant:** Every tag has one of 6 format types that determines
how its value is parsed.
**Rationale:**... | +| Source ownership | **Invariant:** Relationship tags have defined ownership by source type.
Anti-pattern detection enforces these... | +| Quarter format convention | **Invariant:** The quarter tag uses `YYYY-QN` format (e.g., `2026-Q1`).
ISO-year-first sorting works... | +| Canonical phase definitions (6-phase USDP standard) | **Invariant:** The default workflow defines exactly 6 phases in fixed
order. These are the canonical phase names... | +| Deliverable status canonical values | **Invariant:** Deliverable status (distinct from pattern FSM status)
uses exactly 6 values, enforced by Zod... | + +##### ConfigBasedWorkflowDefinition + +| Rule | Description | +| --- | --- | +| Default workflow is built from an inline constant | **Invariant:** `loadDefaultWorkflow()` returns a `LoadedWorkflow` without
file system access. It cannot fail. The... | +| Custom workflow files still work via --workflow flag | **Invariant:** `loadWorkflowFromPath()` remains available for projects
that need custom workflow definitions. The... | +| FSM validation and Process Guard are not affected | **Invariant:** The FSM transition matrix, protection levels, and Process
Guard rules remain hardcoded in... | +| Workflow as a configurable preset field is deferred | **Invariant:** The inline default workflow constant is the only workflow source until preset integration is... | + +##### ProcessGuardTesting + +| Rule | Description | +| --- | --- | +| Completed files require unlock-reason to modify | **Invariant:** A completed spec file cannot be modified unless it carries an @libar-docs-unlock-reason tag.... | +| Status transitions must follow PDR-005 FSM | **Invariant:** Status changes must follow the directed graph: roadmap->active->completed, roadmap<->deferred,... | +| Active specs cannot add new deliverables | **Invariant:** A spec in active status cannot have deliverables added that were not present when it entered active.... | +| Files outside active session scope trigger warnings | **Invariant:** Files modified outside the active session's declared scope produce a session-scope warning.... | +| Explicitly excluded files trigger errors | **Invariant:** Files explicitly excluded from a session cannot be modified, producing a session-excluded error.... | +| Multiple rules validate independently | **Invariant:** Each validation rule evaluates independently — a single file can produce violations from multiple... | diff --git a/docs-generated/business-rules/annotation.md b/docs-generated/business-rules/annotation.md index 6946ef0b..d9d0d919 100644 --- a/docs-generated/business-rules/annotation.md +++ b/docs-generated/business-rules/annotation.md @@ -4,7 +4,7 @@ --- -**88 rules** from 20 features. 74 rules have explicit invariants. +**88 rules** from 20 features. 88 rules have explicit invariants. --- @@ -19,6 +19,8 @@ #### Export types are correctly identified from TypeScript declarations > **Invariant:** Every exported TypeScript declaration type (function, type, interface, const, class, enum, abstract class, arrow function, async function, generic function, default export, re-export) is correctly classified. +> +> **Rationale:** Export type classification drives how codecs render API documentation — misclassifying a function as a const (or vice versa) produces incorrect signatures and misleading docs. **Verified by:** - Parse function export with directive @@ -48,6 +50,8 @@ #### Metadata is correctly extracted from JSDoc comments > **Invariant:** Examples, multi-line descriptions, line numbers, function signatures, and standard JSDoc tags are all correctly parsed and separated. +> +> **Rationale:** Downstream codecs render each metadata field independently — incorrect parsing causes examples to leak into descriptions or signatures to be lost in generated documentation. **Verified by:** - Extract examples from directive @@ -61,6 +65,8 @@ #### Tags are extracted only from the directive section, not from description or examples > **Invariant:** Only tags appearing in the directive section (before the description) are extracted. Tags mentioned in description prose or example code blocks are ignored. +> +> **Rationale:** Tags control taxonomy classification and pattern routing — extracting them from prose or examples would create phantom patterns and corrupt the registry. **Verified by:** - Extract multiple tags from directive section @@ -73,6 +79,8 @@ #### When to Use sections are extracted in all supported formats > **Invariant:** When to Use content is extracted from heading format with bullet points, inline bold format, and asterisk bullet format. When no When to Use section exists, the field is undefined. +> +> **Rationale:** Generated pattern documentation includes a When to Use section — failing to recognize any supported format means valid guidance silently disappears from output. **Verified by:** - Extract When to Use heading format with bullet points @@ -91,6 +99,8 @@ #### Relationship tags extract uses and usedBy dependencies > **Invariant:** The uses and usedBy relationship arrays are populated from directive tags, not from description content. When no relationship tags exist, the fields are undefined. +> +> **Rationale:** Relationship data drives dependency diagrams and impact analysis — extracting from prose would produce false edges from incidental mentions. **Verified by:** - Extract @libar-docs-uses with single value @@ -106,6 +116,8 @@ #### Edge cases and malformed input are handled gracefully > **Invariant:** The parser never crashes on invalid input. Files without directives return empty results. Malformed TypeScript returns a structured error with the file path. +> +> **Rationale:** The scanner processes hundreds of files in bulk — a single malformed file must not abort the entire pipeline or produce an undiagnosable crash. **Verified by:** - Skip comments without @libar-docs-* tags @@ -150,6 +162,8 @@ #### matchPattern supports prefix matching > **Invariant:** A trailing slash pattern matches any file whose path starts with that directory prefix. +> +> **Rationale:** Without prefix matching, users would need separate wildcard patterns for each nesting depth, making rule configuration verbose and error-prone. **Verified by:** - Prefix matching behavior @@ -194,6 +208,8 @@ #### Inference works independently of archLayer > **Invariant:** Context inference operates on file path alone; the presence or absence of archLayer does not affect context assignment. +> +> **Rationale:** Coupling context inference to archLayer would prevent context-based queries from finding patterns that lack explicit layer annotations. **Verified by:** - Pattern without archLayer is still added to byContext if context is inferred @@ -220,6 +236,8 @@ #### Declarations opt in via libar-docs-shape tag > **Invariant:** Only declarations with the libar-docs-shape tag in their immediately preceding JSDoc are collected as tagged shapes. +> +> **Rationale:** Extracting shapes without an explicit opt-in tag would surface internal implementation details in generated API documentation, violating information hiding. **Verified by:** - Tagged declaration is extracted as shape @@ -238,6 +256,8 @@ #### Discovery uses existing estree parser with JSDoc comment scanning > **Invariant:** The discoverTaggedShapes function uses the existing typescript-estree parse() and extractPrecedingJsDoc() approach. +> +> **Rationale:** Introducing a second parser would create divergent AST behavior — reusing the established parser ensures consistent JSDoc handling and avoids subtle extraction differences. **Verified by:** - All five declaration kinds are discoverable @@ -261,6 +281,8 @@ #### Depends-on tag is defined in taxonomy registry > **Invariant:** The depends-on and enables tags must exist in the taxonomy registry with CSV format. +> +> **Rationale:** Without registry definitions, the data-driven AST parser cannot discover or extract these planning dependency tags from source files. **Verified by:** - Depends-on tag exists in registry @@ -271,6 +293,8 @@ #### Depends-on tag is extracted from Gherkin files > **Invariant:** The Gherkin parser must extract depends-on values from feature file tags, including CSV multi-value lists. +> +> **Rationale:** Missing dependency extraction causes the dependency tree and blocking-pattern queries to return incomplete results. **Verified by:** - Depends-on extracted from feature file @@ -298,6 +322,8 @@ #### Enables tag is extracted from Gherkin files > **Invariant:** The Gherkin parser must extract enables values from feature file tags, including CSV multi-value lists. +> +> **Rationale:** Missing enables extraction breaks forward-looking dependency queries, hiding which patterns are unblocked when a prerequisite completes. **Verified by:** - Enables extracted from feature file @@ -308,6 +334,8 @@ #### Planning dependencies are stored in relationship index > **Invariant:** The relationship index must store dependsOn and enables relationships extracted from pattern metadata. +> +> **Rationale:** Omitting planning dependencies from the index causes blocking-pattern and critical-path queries to return incomplete results. **Verified by:** - DependsOn relationships stored in relationship index @@ -386,6 +414,8 @@ #### MediaType is used when rendering code blocks > **Invariant:** The rendered code block language must match the DocString mediaType; when mediaType is absent, the renderer falls back to a caller-specified default language. +> +> **Rationale:** Using the wrong language hint causes syntax highlighters to misrender code blocks, and losing mediaType entirely can trigger incorrect escaping (e.g., asterisks in JSDoc). **Verified by:** - TypeScript mediaType renders as typescript code block @@ -472,6 +502,8 @@ #### Include tags are extracted from Gherkin feature tags > **Invariant:** Include tags are parsed as comma-separated values; absence of the tag means the pattern has no includes. +> +> **Rationale:** Include tags control which patterns appear in scoped diagrams — incorrect parsing drops patterns from diagrams or includes unrelated ones. **Verified by:** - Single include tag is extracted @@ -489,6 +521,8 @@ #### Extends tag is defined in taxonomy registry > **Invariant:** The extends tag must exist in the taxonomy registry with single-value format. +> +> **Rationale:** Without a registry definition, the data-driven AST parser cannot discover or extract the extends tag from source files. **Verified by:** - Extends tag exists in registry @@ -514,6 +548,8 @@ #### Transform builds extendedBy reverse lookup > **Invariant:** The transform must compute an extendedBy reverse index so base patterns know which patterns extend them. +> +> **Rationale:** Without the reverse index, base patterns cannot discover their extensions, breaking generalization hierarchy navigation in generated docs. **Verified by:** - Extended pattern knows its extensions @@ -541,6 +577,8 @@ #### Function signatures surface full parameter types in ExportInfo > **Invariant:** ExportInfo.signature shows full parameter types and return type instead of the placeholder value. +> +> **Rationale:** Reference documentation renders signatures verbatim — placeholder values instead of real types make the API docs unusable for consumers. **Verified by:** - Simple function signature is extracted with full types @@ -557,6 +595,8 @@ #### Property-level JSDoc preserves full multi-line content > **Invariant:** Property-level JSDoc preserves full multi-line content without first-line truncation. +> +> **Rationale:** Truncated property descriptions lose important behavioral details (defaults, units, constraints) that consumers rely on when integrating with the API. **Verified by:** - Multi-line property JSDoc is fully preserved @@ -569,6 +609,8 @@ #### Param returns and throws tags are extracted from function JSDoc > **Invariant:** JSDoc param, returns, and throws tags are extracted and stored on ExtractedShape for function-kind shapes. +> +> **Rationale:** Function reference docs require parameter, return, and exception documentation — missing extraction means consumers must read source code instead of generated docs. **Verified by:** - Param tags are extracted from function JSDoc @@ -585,6 +627,8 @@ #### Auto-shape discovery extracts all exported types via wildcard > **Invariant:** When extract-shapes tag value is the wildcard character, all exported declarations are extracted without listing names. +> +> **Rationale:** Requiring explicit names for every export creates maintenance burden and stale annotations — wildcard discovery keeps shape docs in sync as exports are added or removed. **Verified by:** - Wildcard extracts all exported declarations @@ -632,6 +676,8 @@ #### Custom configuration extends discovery behavior > **Invariant:** User-provided exclude patterns must be applied in addition to (not replacing) the default exclusions. +> +> **Rationale:** Replacing defaults with custom patterns would silently re-include node_modules and dist, causing false positives in the pattern registry. **Verified by:** - Respect custom exclude patterns @@ -680,6 +726,8 @@ #### Implements tag is defined in taxonomy registry > **Invariant:** The implements tag must exist in the taxonomy registry with CSV format. +> +> **Rationale:** Without a registry definition, the data-driven AST parser cannot discover or extract the implements tag from source files. **Verified by:** - Implements tag exists in registry @@ -694,6 +742,8 @@ #### Files can implement a single pattern > **Invariant:** The AST parser must extract a single implements value and preserve it through the extraction pipeline. +> +> **Rationale:** Lost implements values sever the link between implementation files and their roadmap specs, breaking traceability. **Verified by:** - Parse implements with single pattern @@ -704,6 +754,8 @@ #### Files can implement multiple patterns using CSV format > **Invariant:** The AST parser must split CSV implements values into individual pattern references with whitespace trimming. +> +> **Rationale:** Unsplit or untrimmed CSV values produce invalid pattern references that fail relationship index lookups. **Verified by:** - Parse implements with multiple patterns @@ -714,6 +766,8 @@ #### Transform builds implementedBy reverse lookup > **Invariant:** The transform must compute an implementedBy reverse index so spec patterns know which files implement them. +> +> **Rationale:** Without the reverse index, roadmap specs cannot discover their implementation files, breaking traceability and DoD validation. **Verified by:** - Single implementation creates reverse lookup @@ -724,6 +778,8 @@ #### Schemas validate implements field correctly > **Invariant:** The Zod schemas must accept implements and implementedBy fields with correct array-of-string types. +> +> **Rationale:** Schema rejection of valid implements/implementedBy values causes runtime parse failures that silently drop traceability links. **Verified by:** - DocDirective schema accepts implements @@ -740,6 +796,8 @@ #### Timeline layer is detected from /timeline/ directory segments > **Invariant:** Any feature file path containing a /timeline/ directory segment is classified as timeline layer. +> +> **Rationale:** Timeline features track phased delivery progress and must be grouped separately for roadmap generation and phase filtering. **Verified by:** - Detect timeline features from /timeline/ path @@ -751,6 +809,8 @@ #### Domain layer is detected from business context directory segments > **Invariant:** Feature files in /deciders/, /orders/, or /inventory/ directories are classified as domain layer. +> +> **Rationale:** Domain features define core business rules and must be distinguished from infrastructure tests for accurate coverage reporting. **Verified by:** - Detect decider features as domain @@ -762,6 +822,8 @@ #### Integration layer is detected and takes priority over domain directories > **Invariant:** Paths containing /integration-features/ or /integration/ are classified as integration, even when they also contain domain directory names. +> +> **Rationale:** Integration tests nested under domain directories (e.g., /integration/orders/) would be misclassified as domain without explicit priority, skewing layer coverage metrics. **Verified by:** - Detect integration-features directory as integration @@ -774,6 +836,8 @@ #### E2E layer is detected from /e2e/ directory segments > **Invariant:** Any feature file path containing an /e2e/ directory segment is classified as e2e layer. +> +> **Rationale:** E2E tests require separate execution infrastructure and longer timeouts; misclassification would mix them into faster test suites. **Verified by:** - Detect e2e features from /e2e/ path @@ -785,6 +849,8 @@ #### Component layer is detected from tool-specific directory segments > **Invariant:** Feature files in /scanner/ or /lint/ directories are classified as component layer. +> +> **Rationale:** Tool-specific features test internal pipeline stages and must be isolated from business domain and integration layers in documentation grouping. **Verified by:** - Detect scanner features as component @@ -795,6 +861,8 @@ #### Unknown layer is the fallback for unclassified paths > **Invariant:** Any feature file path that does not match a known layer pattern is classified as unknown. +> +> **Rationale:** Silently dropping unclassified features would create invisible gaps in test coverage; the unknown fallback ensures every feature is accounted for. **Verified by:** - Return unknown for unclassified paths @@ -806,6 +874,8 @@ #### Path normalization handles cross-platform and case differences > **Invariant:** Layer inference produces correct results regardless of path separators, case, or absolute vs relative paths. +> +> **Rationale:** The consumer monorepo runs on multiple platforms; platform-dependent classification would produce inconsistent documentation across developer machines and CI. **Verified by:** - Handle Windows-style paths with backslashes @@ -821,6 +891,8 @@ #### FEATURE_LAYERS constant provides validated layer enumeration > **Invariant:** FEATURE_LAYERS is a readonly array containing exactly all 6 valid layer values. +> +> **Rationale:** Consumers iterate over FEATURE_LAYERS for exhaustive layer handling; a mutable or incomplete array would cause missed layers at runtime. **Verified by:** - FEATURE_LAYERS contains all valid layer values @@ -838,6 +910,8 @@ #### Single value tags produce scalar metadata fields > **Invariant:** Each single-value tag (pattern, phase, status, brief) maps to exactly one metadata field with the correct type. +> +> **Rationale:** Incorrect type coercion (e.g., phase as string instead of number) causes downstream pipeline failures in filtering and sorting. **Verified by:** - Extract pattern name tag @@ -853,6 +927,8 @@ #### Array value tags accumulate into list metadata fields > **Invariant:** Tags for depends-on and enables split comma-separated values and accumulate across multiple tag occurrences. +> +> **Rationale:** Missing a dependency value silently breaks the dependency graph, causing incorrect build ordering and orphaned pattern references. **Verified by:** - Extract single dependency @@ -864,6 +940,8 @@ #### Category tags are colon-free tags filtered against known non-categories > **Invariant:** Tags without colons become categories, except known non-category tags (acceptance-criteria, happy-path) and the libar-docs opt-in marker. +> +> **Rationale:** Including test-control tags (acceptance-criteria, happy-path) as categories pollutes the pattern taxonomy with non-semantic values. **Verified by:** - Extract category tags (no colon) @@ -874,6 +952,8 @@ #### Complex tag lists produce fully populated metadata > **Invariant:** All tag types (scalar, array, category) are correctly extracted from a single mixed tag list. +> +> **Rationale:** Real feature files combine many tag types; extraction must handle all types simultaneously without interference between parsers. **Verified by:** - Extract all metadata from complex tag list @@ -883,6 +963,8 @@ #### Edge cases produce safe defaults > **Invariant:** Empty or invalid inputs produce empty metadata or omit invalid fields rather than throwing errors. +> +> **Rationale:** Throwing on malformed tags would abort extraction for the entire file, losing valid metadata from well-formed tags. **Verified by:** - Empty tag list returns empty metadata @@ -893,6 +975,8 @@ #### Convention tags support CSV values with whitespace trimming > **Invariant:** Convention tags split comma-separated values and trim whitespace from each value. +> +> **Rationale:** Untrimmed whitespace creates distinct values for the same convention, causing false negatives in convention-based filtering and validation. **Verified by:** - Extract single convention tag @@ -904,6 +988,8 @@ #### Registry-driven extraction handles enums, transforms, and value constraints > **Invariant:** Tags defined in the registry use data-driven extraction with enum validation, CSV accumulation, value transforms, and constraint checking. +> +> **Rationale:** Hard-coded if/else branches for each tag type cannot scale; registry-driven extraction ensures new tags are supported by configuration, not code changes. **Verified by:** - Registry-driven enum tag without prior if/else branch @@ -951,6 +1037,8 @@ #### Pattern matching and exclusion filtering > **Invariant:** Glob patterns control file discovery and exclusion patterns remove matched files before scanning. +> +> **Rationale:** Without exclusion filtering, internal directories and generated files would pollute the pattern registry with false positives and slow down scanning. **Verified by:** - Return empty results when no patterns match @@ -981,6 +1069,10 @@ #### Multiple shapes are extracted in specified order +> **Invariant:** Extracted shapes appear in the order specified by the tag list, not in source file declaration order. +> +> **Rationale:** Documentation consumers rely on tag-specified ordering for consistent, predictable layout regardless of how source files are organized. + **Verified by:** - Shapes appear in tag order not source order - Mixed shape types in specified order @@ -989,6 +1081,10 @@ #### Extracted shapes render as fenced code blocks +> **Invariant:** Every extracted shape renders as a fenced TypeScript code block in the markdown output. +> +> **Rationale:** Fenced code blocks provide syntax highlighting and preserve type definition formatting, which is essential for readable API documentation. + **Verified by:** - Render shapes as markdown @@ -996,6 +1092,10 @@ #### Imported and re-exported shapes are tracked separately +> **Invariant:** Shapes resolved via import or re-export statements are classified distinctly from locally declared shapes. +> +> **Rationale:** Silently extracting imported types as if they were local declarations would produce duplicate or misleading documentation, since the canonical definition lives in another file. + **Verified by:** - Imported shape produces warning - Re-exported shape produces re-export entry @@ -1004,6 +1104,10 @@ #### Invalid TypeScript produces error result +> **Invariant:** Malformed TypeScript source returns an error Result instead of throwing or producing partial shapes. +> +> **Rationale:** Unhandled parse exceptions would crash the pipeline mid-run, preventing all subsequent files from being processed. + **Verified by:** - Malformed TypeScript returns error @@ -1011,6 +1115,10 @@ #### Shape rendering supports grouping options +> **Invariant:** The `groupInSingleBlock` option controls whether shapes render in one combined code fence or in separate per-shape code fences. +> +> **Rationale:** Different documentation layouts require different grouping strategies; a single block provides compact overviews while separate blocks allow per-type commentary. + **Verified by:** - Grouped rendering in single code block - Separate rendering with multiple code blocks @@ -1033,6 +1141,10 @@ #### Large source files are rejected to prevent memory exhaustion +> **Invariant:** Source files exceeding 5MB are rejected before parsing begins. +> +> **Rationale:** Feeding unbounded input to the TypeScript parser risks out-of-memory crashes that would halt the entire extraction pipeline. + **Verified by:** - Source code exceeding 5MB limit returns error @@ -1046,6 +1158,10 @@ #### extract-shapes tag exists in registry with CSV format +> **Invariant:** The `extract-shapes` tag must be registered with CSV format so multiple shape names can be specified in a single annotation. +> +> **Rationale:** Without CSV format registration, the tag parser cannot split comma-separated shape lists, causing only the first shape to be extracted. + **Verified by:** - Tag registry contains extract-shapes with correct format @@ -1053,6 +1169,10 @@ #### Interfaces are extracted from TypeScript AST +> **Invariant:** Every named interface declaration in a TypeScript source file must be extractable as a shape with kind `interface`, including generics, extends clauses, and JSDoc. +> +> **Rationale:** Interfaces are the primary API surface for TypeScript libraries; failing to extract them leaves the most important type contracts undocumented. + **Verified by:** - Extract simple interface - Extract interface with JSDoc @@ -1064,8 +1184,9 @@ #### Property-level JSDoc is extracted for interface properties -The extractor uses strict adjacency (gap = 1 line) to prevent - interface-level JSDoc from being misattributed to the first property. +> **Invariant:** Property-level JSDoc must be attributed only to the immediately adjacent property, never inherited from the parent interface declaration. +> +> **Rationale:** Misattributing interface-level JSDoc to the first property produces incorrect per-field documentation and misleads consumers about individual property semantics. The extractor uses strict adjacency (gap = 1 line) to prevent interface-level JSDoc from being misattributed to the first property. **Verified by:** - Extract properties with adjacent JSDoc @@ -1076,6 +1197,10 @@ The extractor uses strict adjacency (gap = 1 line) to prevent #### Type aliases are extracted from TypeScript AST +> **Invariant:** Union types, mapped types, and conditional types must all be extractable as shapes with kind `type`, preserving their full type expression. +> +> **Rationale:** Type aliases encode domain constraints (e.g., discriminated unions, mapped utilities) that are essential for API documentation; omitting them hides the type-level design. + **Verified by:** - Extract union type alias - Extract mapped type @@ -1085,6 +1210,10 @@ The extractor uses strict adjacency (gap = 1 line) to prevent #### Enums are extracted from TypeScript AST +> **Invariant:** Both regular and const enums must be extractable as shapes with kind `enum`, including their member values. +> +> **Rationale:** Enums define finite value sets used in validation and serialization; missing them from documentation forces consumers to read source code to discover valid values. + **Verified by:** - Extract string enum - Extract const enum @@ -1093,6 +1222,10 @@ The extractor uses strict adjacency (gap = 1 line) to prevent #### Function signatures are extracted with body omitted +> **Invariant:** Extracted function shapes must include the full signature (name, parameters, return type, async modifier) but never the implementation body. +> +> **Rationale:** Including function bodies in documentation exposes implementation details, inflates output size, and creates a maintenance burden when internals change without signature changes. + **Verified by:** - Extract function signature - Extract async function signature @@ -1101,6 +1234,10 @@ The extractor uses strict adjacency (gap = 1 line) to prevent #### Const declarations are extracted from TypeScript AST +> **Invariant:** Const declarations must be extractable as shapes with kind `const`, whether or not they carry an explicit type annotation. +> +> **Rationale:** Constants define configuration defaults, version strings, and sentinel values that consumers depend on; excluding them creates documentation gaps for public API surface. + **Verified by:** - Extract const with type annotation - Extract const without type annotation @@ -1109,6 +1246,10 @@ The extractor uses strict adjacency (gap = 1 line) to prevent #### Non-exported shapes are extractable +> **Invariant:** Shape extraction must succeed for declarations regardless of export status, with the `exported` flag accurately reflecting visibility. +> +> **Rationale:** Internal types often define the core domain model; restricting extraction to exports only would omit types that are essential for understanding module internals. + **Verified by:** - Extract non-exported interface - Re-export marks internal shape as exported @@ -1124,6 +1265,8 @@ The extractor uses strict adjacency (gap = 1 line) to prevent #### Uses tag is defined in taxonomy registry > **Invariant:** The uses and used-by tags must be registered in the taxonomy with CSV format and dependency-related purpose descriptions. +> +> **Rationale:** Without registry definitions, the data-driven AST parser cannot discover or extract these tags from source files. **Verified by:** - Uses tag exists in registry @@ -1134,6 +1277,8 @@ The extractor uses strict adjacency (gap = 1 line) to prevent #### Uses tag is extracted from TypeScript files > **Invariant:** The AST parser must extract single and comma-separated uses values from TypeScript JSDoc annotations. +> +> **Rationale:** Missing or malformed uses extraction breaks runtime dependency tracking and produces incomplete relationship diagrams. **Verified by:** - Single uses value extracted @@ -1144,6 +1289,8 @@ The extractor uses strict adjacency (gap = 1 line) to prevent #### Used-by tag is extracted from TypeScript files > **Invariant:** The AST parser must extract single and comma-separated used-by values from TypeScript JSDoc annotations. +> +> **Rationale:** Missing used-by extraction prevents reverse dependency lookups, leaving consumers unable to discover which patterns depend on them. **Verified by:** - Single used-by value extracted @@ -1154,6 +1301,8 @@ The extractor uses strict adjacency (gap = 1 line) to prevent #### Uses relationships are stored in relationship index > **Invariant:** All declared uses and usedBy relationships must be stored in the relationship index as explicitly declared entries. +> +> **Rationale:** Omitting relationships from the index causes dependency diagrams and impact-analysis queries to silently miss connections. **Verified by:** - Uses relationships stored in relationship index @@ -1169,6 +1318,8 @@ The extractor uses strict adjacency (gap = 1 line) to prevent #### Schemas validate uses field correctly > **Invariant:** DocDirective and RelationshipEntry schemas must accept uses and usedBy fields as valid CSV string values. +> +> **Rationale:** Schema rejection of valid uses/usedBy values causes runtime parse failures that silently drop relationship data. **Verified by:** - DocDirective schema accepts uses diff --git a/docs-generated/business-rules/core-types.md b/docs-generated/business-rules/core-types.md index e12df477..f1db7b7a 100644 --- a/docs-generated/business-rules/core-types.md +++ b/docs-generated/business-rules/core-types.md @@ -19,6 +19,8 @@ #### CamelCase names convert to kebab-case > **Invariant:** CamelCase pattern names must be split at word boundaries and joined with hyphens in lowercase. +> +> **Rationale:** Generated file names and URL fragments must be human-readable and URL-safe; unsplit CamelCase produces opaque slugs that are difficult to scan in directory listings. **Verified by:** - Convert pattern names to readable slugs @@ -28,6 +30,8 @@ #### Edge cases are handled correctly > **Invariant:** Slug generation must handle special characters, consecutive separators, and leading/trailing hyphens without producing invalid slugs. +> +> **Rationale:** Unhandled edge cases produce malformed file names (double hyphens, leading dashes) that break cross-platform path resolution and make generated links inconsistent. **Verified by:** - Handle edge cases in slug generation @@ -37,6 +41,8 @@ #### Requirements include phase prefix > **Invariant:** Requirement slugs must be prefixed with "phase-NN-" where NN is the zero-padded phase number, defaulting to "00" when no phase is assigned. +> +> **Rationale:** Phase prefixes enable lexicographic sorting of requirement files by delivery order, so directory listings naturally reflect the roadmap sequence. **Verified by:** - Requirement slugs include phase number @@ -47,6 +53,8 @@ #### Phase slugs use kebab-case for names > **Invariant:** Phase slugs must combine a zero-padded phase number with the kebab-case name in the format "phase-NN-name", defaulting to "unnamed" when no name is provided. +> +> **Rationale:** A consistent "phase-NN-name" format ensures phase files sort numerically and remain identifiable even when the phase number alone would be ambiguous across roadmap versions. **Verified by:** - Phase slugs combine number and kebab-case name @@ -80,6 +88,8 @@ #### createDirectiveValidationError formats file location with line number > **Invariant:** Every DirectiveValidationError must include the source file path, line number, and reason, with the message formatted as "file:line" for IDE-clickable error output. +> +> **Rationale:** The "file:line" format enables click-to-navigate in IDEs and terminals, turning validation errors into actionable links rather than requiring manual file/line lookup. **Verified by:** - createDirectiveValidationError includes line number in message @@ -91,6 +101,8 @@ #### createPatternValidationError captures pattern identity and validation details > **Invariant:** Every PatternValidationError must include the pattern name, source file path, and reason, with an optional array of specific validation errors for detailed diagnostics. +> +> **Rationale:** Pattern names appear across many source files; without the pattern name and file path in the error, developers cannot locate which annotation triggered the validation failure. **Verified by:** - createPatternValidationError formats pattern name and file @@ -102,6 +114,8 @@ #### createProcessMetadataValidationError validates Gherkin process metadata > **Invariant:** Every ProcessMetadataValidationError must include the feature file path and a reason describing which metadata field failed validation. +> +> **Rationale:** Process metadata (status, phase, deliverables) drives FSM validation and documentation generation; silent metadata errors propagate incorrect state across all downstream consumers. **Verified by:** - createProcessMetadataValidationError formats file and reason @@ -112,6 +126,8 @@ #### createDeliverableValidationError tracks deliverable-specific failures > **Invariant:** Every DeliverableValidationError must include the feature file path and reason, with optional deliverableName for pinpointing which deliverable failed validation. +> +> **Rationale:** Features often contain multiple deliverables; without the deliverable name in the error, developers must manually inspect the entire Background table to find the failing row. **Verified by:** - createDeliverableValidationError formats file and reason @@ -130,6 +146,8 @@ #### isDocError type guard classifies errors correctly > **Invariant:** isDocError must return true for valid DocError instances and false for non-DocError values including null and undefined. +> +> **Rationale:** Without a reliable type guard, error handlers cannot safely narrow unknown caught values to DocError, forcing unsafe casts or redundant field checks at every catch site. **Verified by:** - isDocError detects valid DocError instances @@ -141,6 +159,8 @@ #### formatDocError produces structured human-readable output > **Invariant:** formatDocError must include all context fields (error type, file path, line number) and render validation errors when present on pattern errors. +> +> **Rationale:** Omitting context fields forces developers to cross-reference logs with source files manually; including all fields in a single formatted message makes errors actionable on first read. **Verified by:** - formatDocError includes structured context @@ -164,6 +184,8 @@ #### CLI error handler formats unknown errors gracefully > **Invariant:** Unknown error values (non-DocError, non-Error) must be formatted as "Error: {value}" strings for safe display without crashing. +> +> **Rationale:** CLI commands can receive arbitrary thrown values (strings, numbers, objects); coercing them to a safe string prevents the error handler itself from crashing on unexpected types. **Verified by:** - handleCliError formats unknown errors @@ -179,6 +201,8 @@ #### Result.ok wraps values into success results > **Invariant:** Result.ok always produces a result where isOk is true, regardless of the wrapped value type (primitives, objects, null, undefined). +> +> **Rationale:** Consumers rely on isOk to branch logic; if Result.ok could produce an ambiguous state, every call site would need defensive checks beyond the type guard. **Verified by:** - Result.ok wraps a primitive value @@ -191,6 +215,8 @@ #### Result.err wraps values into error results > **Invariant:** Result.err always produces a result where isErr is true, supporting Error instances, strings, and structured objects as error values. +> +> **Rationale:** Supporting multiple error value types allows callers to propagate rich context (structured objects) or simple messages (strings) without forcing a single error representation. **Verified by:** - Result.err wraps an Error instance @@ -202,6 +228,8 @@ #### Type guards distinguish success from error results > **Invariant:** isOk and isErr are mutually exclusive: exactly one returns true for any Result value. +> +> **Rationale:** If both guards could return true (or both false), TypeScript type narrowing would break, leaving the value/error branch unreachable or unsound. **Verified by:** - Type guards correctly identify success results @@ -212,6 +240,8 @@ #### unwrap extracts the value or throws the error > **Invariant:** unwrap on a success result returns the value; unwrap on an error result always throws an Error instance (wrapping non-Error values for stack trace preservation). +> +> **Rationale:** Wrapping non-Error values in Error instances ensures stack traces are always available for debugging, preventing the loss of call-site context when string or object errors are thrown. **Verified by:** - unwrap extracts value from success result @@ -224,6 +254,8 @@ #### unwrapOr extracts the value or returns a default > **Invariant:** unwrapOr on a success result returns the contained value (ignoring the default); on an error result it returns the provided default value. +> +> **Rationale:** Providing a safe fallback path avoids forcing callers to handle errors explicitly when a sensible default exists, reducing boilerplate in non-critical error recovery. **Verified by:** - unwrapOr returns value from success result @@ -235,6 +267,8 @@ #### map transforms the success value without affecting errors > **Invariant:** map applies the transformation function only to success results; error results pass through unchanged. Multiple maps can be chained. +> +> **Rationale:** Skipping the transformation on error results enables chained pipelines to short-circuit on the first failure without requiring explicit error checks at each step. **Verified by:** - map transforms success value @@ -246,6 +280,8 @@ #### mapErr transforms the error value without affecting successes > **Invariant:** mapErr applies the transformation function only to error results; success results pass through unchanged. Error types can be converted. +> +> **Rationale:** Allowing error-type conversion at boundaries (e.g., low-level I/O errors to domain errors) keeps success paths untouched and preserves the original value through error-handling layers. **Verified by:** - mapErr transforms error value diff --git a/docs-generated/business-rules/data-api.md b/docs-generated/business-rules/data-api.md index 1c0269c8..0b2a83de 100644 --- a/docs-generated/business-rules/data-api.md +++ b/docs-generated/business-rules/data-api.md @@ -4,7 +4,7 @@ --- -**86 rules** from 20 features. 72 rules have explicit invariants. +**86 rules** from 20 features. 86 rules have explicit invariants. --- @@ -713,6 +713,10 @@ #### CLI displays help and version information +> **Invariant:** The CLI must always provide discoverable usage and version information via standard flags. +> +> **Rationale:** Without accessible help and version output, users cannot self-serve CLI usage or report issues with a specific version. + **Verified by:** - Display help with --help flag - Display version with -v flag @@ -722,6 +726,10 @@ #### CLI requires input flag for subcommands +> **Invariant:** Every data-querying subcommand must receive an explicit `--input` glob specifying the source files to scan. +> +> **Rationale:** Without an input source, the pipeline has no files to scan and would produce empty or misleading results instead of a clear error. + **Verified by:** - Fail without --input flag when running status - Reject unknown options @@ -730,6 +738,10 @@ #### CLI status subcommand shows delivery state +> **Invariant:** The status subcommand must return structured JSON containing delivery progress derived from the MasterDataset. +> +> **Rationale:** Consumers depend on machine-readable status output for scripting and CI integration; unstructured output breaks downstream automation. + **Verified by:** - Status shows counts and completion percentage @@ -737,6 +749,10 @@ #### CLI query subcommand executes API methods +> **Invariant:** The query subcommand must dispatch to any public Data API method by name and pass positional arguments through. +> +> **Rationale:** The CLI is the primary interface for ad-hoc queries; failing to resolve a valid method name or its arguments silently drops the user's request. + **Verified by:** - Query getStatusCounts returns count object - Query isValidTransition with arguments @@ -746,6 +762,10 @@ #### CLI pattern subcommand shows pattern detail +> **Invariant:** The pattern subcommand must return the full JSON detail for an exact pattern name match, or a clear error if not found. +> +> **Rationale:** Pattern lookup is the primary debugging tool for annotation issues; ambiguous or silent failures waste investigation time. + **Verified by:** - Pattern lookup returns full detail - Pattern not found shows error @@ -754,6 +774,10 @@ #### CLI arch subcommand queries architecture +> **Invariant:** The arch subcommand must expose role, bounded context, and layer queries over the MasterDataset's architecture metadata. +> +> **Rationale:** Architecture queries replace manual exploration of annotated sources; missing or incorrect results lead to wrong structural assumptions during design sessions. + **Verified by:** - Arch roles lists roles with counts - Arch context filters to bounded context @@ -763,6 +787,10 @@ #### CLI shows errors for missing subcommand arguments +> **Invariant:** Subcommands that require arguments must reject invocations with missing arguments and display usage guidance. +> +> **Rationale:** Silent acceptance of incomplete input would produce confusing pipeline errors instead of actionable feedback at the CLI boundary. + **Verified by:** - Query without method name shows error - Pattern without name shows error @@ -772,6 +800,10 @@ #### CLI handles argument edge cases +> **Invariant:** The CLI must gracefully handle non-standard argument forms including numeric coercion and the `--` pnpm separator. +> +> **Rationale:** Real-world invocations via pnpm pass `--` separators and numeric strings; mishandling these causes silent data loss or crashes in automated workflows. + **Verified by:** - Integer arguments are coerced for phase queries - Double-dash separator is handled gracefully @@ -837,6 +869,10 @@ #### CLI list subcommand filters patterns +> **Invariant:** The list subcommand must return a valid JSON result for valid filters and a non-zero exit code with a descriptive error for invalid filters. +> +> **Rationale:** Consumers parse list output programmatically; malformed JSON or silent failures cause downstream tooling to break without diagnosis. + **Verified by:** - List all patterns returns JSON array - List with invalid phase shows error @@ -845,6 +881,10 @@ #### CLI search subcommand finds patterns by fuzzy match +> **Invariant:** The search subcommand must require a query argument and return only patterns whose names match the query. +> +> **Rationale:** Missing query validation would produce unfiltered result sets, defeating the purpose of search and wasting context budget in AI sessions. + **Verified by:** - Search returns matching patterns - Search without query shows error @@ -853,6 +893,10 @@ #### CLI context assembly subcommands return text output +> **Invariant:** Context assembly subcommands (context, overview, dep-tree) must produce non-empty human-readable text containing the requested pattern or summary, and require a pattern argument where applicable. +> +> **Rationale:** These subcommands replace manual file reads in AI sessions; empty or off-target output forces expensive explore-agent fallbacks that consume 5-10x more context. + **Verified by:** - Context returns curated text bundle - Context without pattern name shows error @@ -863,6 +907,10 @@ #### CLI tags and sources subcommands return JSON +> **Invariant:** The tags and sources subcommands must return valid JSON with the expected top-level structure (data key for tags, array for sources). +> +> **Rationale:** Annotation exploration depends on machine-parseable output; invalid JSON prevents automated enrichment workflows from detecting unannotated files and tag gaps. + **Verified by:** - Tags returns tag usage counts - Sources returns file inventory @@ -871,6 +919,10 @@ #### CLI extended arch subcommands query architecture relationships +> **Invariant:** Extended arch subcommands (neighborhood, compare, coverage) must return valid JSON reflecting the actual architecture relationships present in the scanned sources. +> +> **Rationale:** Architecture queries drive design-session decisions; stale or structurally invalid output leads to incorrect dependency analysis and missed coupling between bounded contexts. + **Verified by:** - Arch neighborhood returns pattern relationships - Arch compare returns context comparison @@ -880,6 +932,10 @@ #### CLI unannotated subcommand finds files without annotations +> **Invariant:** The unannotated subcommand must return valid JSON listing every TypeScript file that lacks the `@libar-docs` opt-in marker. +> +> **Rationale:** Files missing the opt-in marker are invisible to the scanner; without this subcommand, unannotated files silently drop out of generated documentation and validation. + **Verified by:** - Unannotated finds files missing libar-docs marker diff --git a/docs-generated/business-rules/generation.md b/docs-generated/business-rules/generation.md index a6ca0d66..293c17d9 100644 --- a/docs-generated/business-rules/generation.md +++ b/docs-generated/business-rules/generation.md @@ -4,7 +4,7 @@ --- -**264 rules** from 55 features. 230 rules have explicit invariants. +**265 rules** from 55 features. 265 rules have explicit invariants. --- @@ -19,6 +19,8 @@ #### DocString parsing handles edge cases > **Invariant:** DocString parsing must gracefully handle empty input, missing language hints, unclosed delimiters, and non-LF line endings without throwing errors. +> +> **Rationale:** Codecs receive uncontrolled user content from feature file descriptions; unhandled edge cases would crash document generation for the entire pipeline. **Verified by:** - Empty description returns empty array @@ -33,6 +35,8 @@ #### DataTable rendering produces valid markdown > **Invariant:** DataTable rendering must produce a well-formed table block for any number of rows, substituting empty strings for missing cell values. +> +> **Rationale:** Malformed tables break markdown rendering and downstream tooling; missing cells would produce undefined values that corrupt table alignment. **Verified by:** - Single row DataTable renders correctly @@ -44,6 +48,8 @@ #### Scenario content rendering respects options > **Invariant:** Scenario rendering must honor the includeSteps option, producing step lists only when enabled, and must include embedded DataTables when present. +> +> **Rationale:** Ignoring the includeSteps option would bloat summary views with unwanted detail, and dropping embedded DataTables would lose structured test data. **Verified by:** - Render scenario with steps @@ -55,6 +61,8 @@ #### Business rule rendering handles descriptions > **Invariant:** Business rule rendering must always include the rule name as a bold paragraph, and must parse descriptions for embedded DocStrings when present. +> +> **Rationale:** Omitting the rule name makes rendered output unnavigable, and skipping DocString parsing would output raw delimiter syntax instead of formatted code blocks. **Verified by:** - Rule with simple description @@ -66,6 +74,8 @@ #### DocString content is dedented when parsed > **Invariant:** DocString code blocks must be dedented to remove common leading whitespace while preserving internal relative indentation, empty lines, and trimming trailing whitespace from each line. +> +> **Rationale:** Without dedentation, code blocks inherit the Gherkin indentation level, rendering as deeply indented and unreadable in generated markdown. **Verified by:** - Code block preserves internal relative indentation @@ -87,7 +97,9 @@ #### Business rules appear as a separate section -Rule descriptions provide context for why this business rule exists. +> **Invariant:** Every Rule block must produce a distinct Business Rule entry containing its description and associated scenarios. +> +> **Rationale:** Without guaranteed capture, rule descriptions and rich content (DocStrings, DataTables) would be silently dropped from generated documentation. Rule descriptions provide context for why this business rule exists. You can include multiple paragraphs here. This is a second paragraph explaining edge cases or exceptions. **Verified by:** - Scenario with DocString for rich content @@ -97,7 +109,9 @@ Rule descriptions provide context for why this business rule exists. #### Multiple rules create multiple Business Rule entries -Each Rule keyword creates a separate entry in the Business Rules section. +> **Invariant:** Each Rule keyword in a feature file must produce its own independent Business Rule entry in generated output. +> +> **Rationale:** Merging rules into a single entry would collapse distinct business domains, making it impossible to trace scenarios back to their governing constraint. Each Rule keyword creates a separate entry in the Business Rules section. This helps organize complex features into logical business domains. **Verified by:** - Simple scenario under second rule @@ -118,6 +132,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Architecture generator is registered in the registry > **Invariant:** The generator registry must contain an "architecture" generator entry available for CLI invocation. +> +> **Rationale:** Without a registered entry, the CLI cannot discover or invoke architecture diagram generation. **Verified by:** - Generator is available in registry @@ -131,6 +147,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Architecture generator produces component diagram by default > **Invariant:** Running the architecture generator without diagram type options must produce a component diagram with bounded context subgraphs. +> +> **Rationale:** A sensible default prevents users from needing to specify options for the most common use case. **Verified by:** - Default generation produces component diagram @@ -144,6 +162,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Architecture generator supports diagram type options > **Invariant:** The architecture generator must accept a diagram type option that selects between component and layered diagram output. +> +> **Rationale:** Different architectural perspectives (bounded context vs. layer hierarchy) require different diagram types, and the user must be able to select which to generate. **Verified by:** - Generate layered diagram with options @@ -157,6 +177,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Architecture generator supports context filtering > **Invariant:** When context filtering is applied, the generated diagram must include only patterns from the specified bounded contexts and exclude all others. +> +> **Rationale:** Without filtering, large monorepos would produce unreadable diagrams with dozens of bounded contexts; filtering enables focused per-context views. **Verified by:** - Filter to specific contexts @@ -226,6 +248,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### archIndex.all contains all patterns with any arch tag > **Invariant:** archIndex.all must contain exactly the set of patterns that have at least one arch tag (role, context, or layer). +> +> **Rationale:** Consumers iterating over all architectural patterns need a single canonical list; omitting partially-tagged patterns would silently drop them from diagrams. **Verified by:** - archIndex.all includes all annotated patterns @@ -289,6 +313,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### arch-context tag is defined in the registry > **Invariant:** The tag registry must contain an arch-context tag with value format for free-form bounded context names. +> +> **Rationale:** Without a registry-defined arch-context tag, bounded context groupings cannot be validated and diagrams may contain arbitrary context names. **Verified by:** - arch-context tag exists with value format @@ -303,6 +329,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### arch-layer tag is defined in the registry > **Invariant:** The tag registry must contain an arch-layer tag with enum format and exactly three values: domain, application, infrastructure. +> +> **Rationale:** Allowing arbitrary layer values would break the fixed Clean Architecture ordering that layered diagrams depend on. **Verified by:** - arch-layer tag exists with enum format @@ -319,6 +347,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### AST parser extracts arch-role from TypeScript annotations > **Invariant:** The AST parser must extract the arch-role value from JSDoc annotations and populate the directive's archRole field. +> +> **Rationale:** If arch-role is not extracted, patterns cannot be classified by architectural role and diagram node styling is lost. **Verified by:** - Extract arch-role projection @@ -332,6 +362,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### AST parser extracts arch-context from TypeScript annotations > **Invariant:** The AST parser must extract the arch-context value from JSDoc annotations and populate the directive's archContext field. +> +> **Rationale:** If arch-context is not extracted, component diagrams cannot group patterns into bounded context subgraphs. **Verified by:** - Extract arch-context orders @@ -345,6 +377,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### AST parser extracts arch-layer from TypeScript annotations > **Invariant:** The AST parser must extract the arch-layer value from JSDoc annotations and populate the directive's archLayer field. +> +> **Rationale:** If arch-layer is not extracted, layered diagrams cannot group patterns into domain/application/infrastructure subgraphs. **Verified by:** - Extract arch-layer application @@ -358,6 +392,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### AST parser handles multiple arch tags together > **Invariant:** When a JSDoc block contains arch-role, arch-context, and arch-layer tags, all three must be extracted into the directive. +> +> **Rationale:** Partial extraction would cause components to be missing from role, context, or layer groupings depending on which tag was dropped. **Verified by:** - Extract all three arch tags @@ -389,6 +425,10 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Extracts Rule blocks with Invariant and Rationale +> **Invariant:** Annotated Rule blocks must have their Invariant, Rationale, and Verified-by fields faithfully extracted and rendered. +> +> **Rationale:** These structured annotations are the primary content of business rules documentation; losing them silently produces incomplete output. + **Verified by:** - Extracts annotated Rule with Invariant and Rationale - Extracts unannotated Rule without showing not specified @@ -397,6 +437,10 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Organizes rules by product area and phase +> **Invariant:** Rules must be grouped by product area and ordered by phase number within each group. +> +> **Rationale:** Ungrouped or misordered rules make it impossible to find domain-specific constraints or understand their delivery sequence. + **Verified by:** - Groups rules by product area and phase - Orders rules by phase within domain @@ -405,6 +449,10 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Summary mode generates compact output +> **Invariant:** Summary mode must produce only a statistics line and omit all detailed rule headings and content. +> +> **Rationale:** AI context windows have strict token limits; including full detail in summary mode wastes context budget and degrades session quality. + **Verified by:** - Summary mode includes statistics line - Summary mode excludes detailed sections @@ -413,6 +461,10 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Preserves code examples and tables in detailed mode +> **Invariant:** Code examples must appear only in detailed mode and must be excluded from standard mode output. +> +> **Rationale:** Code blocks in standard mode clutter the overview and push important rule summaries out of view; detailed mode is the opt-in path for full content. + **Verified by:** - Code examples included in detailed mode - Code examples excluded in standard mode @@ -421,6 +473,10 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Generates scenario traceability links +> **Invariant:** Verification links must include the source file path so readers can locate the verifying scenario. +> +> **Rationale:** Links without file paths are unresolvable, breaking the traceability chain between business rules and their executable specifications. + **Verified by:** - Verification links include file path @@ -428,6 +484,10 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Progressive disclosure generates detail files per product area +> **Invariant:** Each product area with rules must produce a separate detail file, and the main document must link to all detail files via an index table. +> +> **Rationale:** A single monolithic document becomes unnavigable at scale; progressive disclosure lets readers drill into only the product area they need. + **Verified by:** - Detail files are generated per product area - Main document has product area index table with links @@ -437,6 +497,10 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Empty rules show placeholder instead of blank content +> **Invariant:** Rules with no invariant, description, or scenarios must render a placeholder message; rules with scenarios but no invariant must show the verified-by list instead. +> +> **Rationale:** Blank rule sections are indistinguishable from rendering bugs; explicit placeholders signal intentional incompleteness versus broken extraction. + **Verified by:** - Rule without invariant or description or scenarios shows placeholder - Rule without invariant but with scenarios shows verified-by instead @@ -445,6 +509,10 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Rules always render flat for full visibility +> **Invariant:** Rule output must never use collapsible blocks regardless of rule count; all rule headings must be directly visible. +> +> **Rationale:** Business rules are compliance-critical content; hiding them behind collapsible sections risks rules being overlooked during review. + **Verified by:** - Features with many rules render flat without collapsible blocks @@ -452,6 +520,10 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Source file shown as filename text +> **Invariant:** Source file references must render as plain filename text, not as markdown links. +> +> **Rationale:** Markdown links to local file paths break in every viewer except the local filesystem, producing dead links that erode trust in the documentation. + **Verified by:** - Source file rendered as plain text not link @@ -459,6 +531,10 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Verified-by renders as checkbox list at standard level +> **Invariant:** Verified-by must render as a checkbox list of scenario names, with duplicate names deduplicated. +> +> **Rationale:** Duplicate entries inflate the checklist and mislead reviewers into thinking more verification exists than actually does. + **Verified by:** - Rules with scenarios show verified-by checklist - Duplicate scenario names are deduplicated @@ -467,6 +543,10 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Feature names are humanized from camelCase pattern names +> **Invariant:** CamelCase pattern names must be converted to space-separated headings with trailing "Testing" suffixes stripped. +> +> **Rationale:** Raw camelCase names are unreadable in documentation headings, and "Testing" suffixes leak implementation concerns into user-facing output. + **Verified by:** - CamelCase pattern name becomes spaced heading - Testing suffix is stripped from feature names @@ -501,6 +581,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Component diagrams group patterns by bounded context > **Invariant:** Each distinct arch-context value must produce exactly one Mermaid subgraph containing all patterns with that context. +> +> **Rationale:** Without subgraph grouping, the visual relationship between components and their bounded context is lost, making the diagram structurally meaningless. **Verified by:** - Generate subgraphs for bounded contexts @@ -562,6 +644,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Component diagram includes summary section > **Invariant:** The generated component diagram document must include an Overview section with component count and bounded context count. +> +> **Rationale:** Without summary counts, readers cannot quickly assess diagram scope or detect missing components. **Verified by:** - Summary section with counts @@ -575,6 +659,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Component diagram includes legend when enabled > **Invariant:** When the legend is enabled, the document must include a Legend section explaining relationship arrow styles. +> +> **Rationale:** Without a legend, readers cannot distinguish uses, depends-on, implements, and extends arrows, making relationship semantics ambiguous. **Verified by:** - Legend section with arrow explanations @@ -587,6 +673,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Component diagram includes inventory table when enabled > **Invariant:** When the inventory is enabled, the document must include a Component Inventory table with Component, Context, Role, and Layer columns. +> +> **Rationale:** The inventory provides a searchable, text-based alternative to the visual diagram for tooling and accessibility. **Verified by:** - Inventory table with component details @@ -620,6 +708,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### CompositeCodec concatenates sections in codec array order > **Invariant:** Sections from child codecs appear in the composite output in the same order as the codecs array. +> +> **Rationale:** Non-deterministic section ordering would make generated documents unstable across runs, breaking diff-based review workflows. **Verified by:** - Sections from two codecs appear in order @@ -630,6 +720,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Separators between codec outputs are configurable > **Invariant:** By default, a separator block is inserted between each child codec's sections. When separateSections is false, no separators are added. +> +> **Rationale:** Without configurable separators, consumers cannot control visual grouping — some documents need clear boundaries between codec outputs while others need seamless flow. **Verified by:** - Default separator between sections @@ -640,6 +732,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### additionalFiles merge with last-wins semantics > **Invariant:** additionalFiles from all children are merged into a single record. When keys collide, the later codec's value wins. +> +> **Rationale:** Silently dropping colliding keys would lose content without warning, while throwing on collision would prevent composing codecs that intentionally override shared file paths. **Verified by:** - Non-overlapping files merged @@ -650,6 +744,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### composeDocuments works at document level without codecs > **Invariant:** composeDocuments accepts RenderableDocument array and produces a composed RenderableDocument without requiring codecs. +> +> **Rationale:** Requiring a full codec instance for simple document merging would force unnecessary schema definitions when callers already hold pre-rendered documents. **Verified by:** - Direct document composition @@ -659,6 +755,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Empty codec outputs are handled gracefully > **Invariant:** Codecs producing empty sections arrays contribute nothing to the output. No separator is emitted for empty outputs. +> +> **Rationale:** Emitting separators around empty sections would produce orphaned dividers in the generated markdown, creating visual noise with no content between them. **Verified by:** - Empty codec skipped without separator @@ -746,6 +844,10 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Empty and missing inputs produce empty results +> **Invariant:** Extraction with no tags or no matching patterns always produces an empty result. +> +> **Rationale:** Callers must be able to distinguish "no conventions found" from errors without special-casing nulls or exceptions. + **Verified by:** - Empty convention tags returns empty array - No matching patterns returns empty array @@ -754,6 +856,10 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Convention bundles are extracted from matching patterns +> **Invariant:** Each unique convention tag produces exactly one bundle, and patterns sharing a tag are merged into that bundle. +> +> **Rationale:** Without tag-based grouping and merging, convention content would be fragmented across duplicates, making downstream rendering unreliable. + **Verified by:** - Single pattern with one convention tag produces one bundle - Pattern with CSV conventions contributes to multiple bundles @@ -763,6 +869,10 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Structured content is extracted from rule descriptions +> **Invariant:** Invariant, rationale, and table content embedded in rule descriptions must be extracted as structured metadata, not raw text. +> +> **Rationale:** Downstream renderers depend on structured fields to produce consistent documentation; unstructured text would require re-parsing at every consumption point. + **Verified by:** - Invariant and rationale are extracted from rule description - Tables in rule descriptions are extracted as structured data @@ -771,6 +881,10 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Code examples in rule descriptions are preserved +> **Invariant:** Fenced code blocks (including Mermaid diagrams) in rule descriptions must be extracted as typed code examples and never discarded. +> +> **Rationale:** Losing code examples during extraction would silently degrade generated documentation, removing diagrams and samples authors intended to publish. + **Verified by:** - Mermaid diagram in rule description is extracted as code example - Rule description without code examples has no code examples field @@ -779,6 +893,10 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### TypeScript JSDoc conventions are extracted alongside Gherkin +> **Invariant:** TypeScript JSDoc and Gherkin convention sources sharing the same tag must merge into a single bundle with all rules preserved from both sources. +> +> **Rationale:** Conventions are defined across both TypeScript and Gherkin; failing to merge them would split a single logical convention into incomplete fragments. + **Verified by:** - TypeScript pattern with heading sections produces multiple rules - TypeScript pattern without headings becomes single rule @@ -987,6 +1105,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Empty lines are handled correctly > **Invariant:** Empty lines (including lines with only whitespace) must not affect the minimum indentation calculation and must be preserved in output. +> +> **Rationale:** Counting whitespace-only lines as indented content would inflate the minimum indentation, causing non-empty lines to retain unwanted leading spaces. **Verified by:** - Empty lines with trailing spaces are preserved @@ -997,6 +1117,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Single line input is handled > **Invariant:** Single-line input must have its leading whitespace removed without errors or unexpected transformations. +> +> **Rationale:** Failing or returning empty output on single-line input would break callers that extract individual lines from multi-line DocStrings. **Verified by:** - Single line with indentation is dedented @@ -1007,6 +1129,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Unicode whitespace is handled > **Invariant:** Non-breaking spaces and other Unicode whitespace characters must be treated as content, not as indentation to be removed. +> +> **Rationale:** Stripping Unicode whitespace as indentation would corrupt intentional formatting in source code and documentation content. **Verified by:** - Non-breaking space is treated as content @@ -1016,6 +1140,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Relative indentation is preserved > **Invariant:** After removing the common leading whitespace, the relative indentation between lines must remain unchanged. +> +> **Rationale:** Altering relative indentation would break the syntactic structure of extracted code blocks, making them unparseable or semantically incorrect. **Verified by:** - Nested code blocks preserve relative indentation @@ -1045,6 +1171,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Edge cases are handled correctly > **Invariant:** Header stripping handles degenerate inputs (header-only, whitespace-only, mid-description headers) without data loss or rendering errors. +> +> **Rationale:** Patterns with unusual descriptions (header-only stubs, whitespace padding) are common in early roadmap stages; crashing on these would block documentation generation for the entire dataset. **Verified by:** - Empty description after stripping headers @@ -1056,6 +1184,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### stripLeadingHeaders removes only leading headers > **Invariant:** The helper function strips only headers that appear before any non-header content; headers occurring after body text are preserved. +> +> **Rationale:** Mid-description headers are intentional structural elements authored by the user; stripping them would silently destroy document structure. **Verified by:** - Strips h1 header @@ -1076,6 +1206,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Behavior files are verified during pattern extraction > **Invariant:** Every timeline pattern must report whether its corresponding behavior file exists. +> +> **Rationale:** Without verification at extraction time, traceability reports would silently include broken references to non-existent behavior files. **Verified by:** - Behavior file existence verified during extraction @@ -1088,6 +1220,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Traceability coverage reports verified and unverified behavior files > **Invariant:** Coverage reports must distinguish between patterns with verified behavior files and those without. +> +> **Rationale:** Conflating verified and unverified coverage would overstate test confidence, hiding gaps that should be addressed before release. **Verified by:** - Traceability shows covered phases with verified behavior files @@ -1097,6 +1231,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Pattern names are transformed to human-readable display names > **Invariant:** Display names must convert CamelCase to title case, handle consecutive capitals, and respect explicit title overrides. +> +> **Rationale:** CamelCase identifiers are unreadable in generated documentation; human-readable names are essential for non-developer consumers of pattern registries. **Verified by:** - CamelCase pattern names transformed to title case @@ -1109,6 +1245,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### PRD acceptance criteria are formatted with numbering and bold keywords > **Invariant:** PRD output must number acceptance criteria and bold Given/When/Then keywords when steps are enabled. +> +> **Rationale:** Unnumbered criteria are difficult to reference in reviews; unformatted step keywords blend into prose, making scenarios harder to parse visually. **Verified by:** - PRD shows numbered acceptance criteria with bold keywords @@ -1120,6 +1258,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Business values are formatted for human readability > **Invariant:** Hyphenated business value tags must be converted to space-separated readable text in all output contexts. +> +> **Rationale:** Raw hyphenated tags like "enable-rich-prd" are annotation artifacts; displaying them verbatim in generated docs confuses readers expecting natural language. **Verified by:** - Hyphenated business value converted to spaces @@ -1158,6 +1298,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Single-line descriptions are returned as-is when complete > **Invariant:** A single-line description that ends with sentence-ending punctuation is returned verbatim; one without gets an appended ellipsis. +> +> **Rationale:** Summaries appear in pattern tables where readers expect grammatically complete text; an ellipsis signals intentional truncation rather than a rendering bug. **Verified by:** - Complete sentence on single line @@ -1168,6 +1310,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Multi-line descriptions are combined until sentence ending > **Invariant:** Lines are concatenated until a sentence-ending punctuation mark is found or the character limit is reached, whichever comes first. +> +> **Rationale:** Splitting at arbitrary line breaks produces sentence fragments that lose meaning; combining until a natural boundary preserves semantic completeness. **Verified by:** - Two lines combine into complete sentence @@ -1205,6 +1349,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Edge cases are handled gracefully > **Invariant:** Degenerate inputs (empty strings, markdown-only content, bold markers) produce valid output without errors: empty input yields empty string, formatting is stripped, and multiple sentence endings use the first. +> +> **Rationale:** Summary extraction runs on every pattern in the dataset; an unhandled edge case would crash the entire documentation generation pipeline. **Verified by:** - Empty description returns empty string @@ -1224,6 +1370,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Registry manages generator registration and retrieval > **Invariant:** Each generator name is unique within the registry; duplicate registration is rejected and lookup of unknown names returns undefined. +> +> **Rationale:** Allowing duplicate names would silently overwrite an existing generator, causing previously registered behavior to disappear without warning. **Verified by:** - Register generator with unique name @@ -1256,6 +1404,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### All implementation links in a pattern are normalized > **Invariant:** Every implementation link in a pattern document must have its path normalized, regardless of how many implementations exist. +> +> **Rationale:** A single un-normalized link in a multi-implementation pattern produces a broken reference that undermines trust in the entire generated document. **Verified by:** - Multiple implementations with mixed prefixes @@ -1265,6 +1415,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### normalizeImplPath strips known prefixes > **Invariant:** normalizeImplPath removes only recognized repository prefixes from the start of a path and leaves all other path segments unchanged. +> +> **Rationale:** Over-stripping would corrupt legitimate path segments that happen to match a prefix name, producing silent broken links. **Verified by:** - Strips libar-platform/ prefix @@ -1283,6 +1435,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Layered diagrams group patterns by arch-layer > **Invariant:** Each distinct arch-layer value must produce exactly one Mermaid subgraph containing all patterns with that layer. +> +> **Rationale:** Without layer subgraphs, the Clean Architecture boundary between domain, application, and infrastructure is not visually enforced. **Verified by:** - Generate subgraphs for each layer @@ -1345,6 +1499,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Layered diagram includes summary section > **Invariant:** The generated layered diagram document must include an Overview section with annotated source file count. +> +> **Rationale:** Without summary counts, readers cannot assess diagram completeness or detect missing annotated sources. **Verified by:** - Summary section for layered view @@ -1378,6 +1534,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Pattern names are sanitized for Mermaid node IDs > **Invariant:** Pattern names must be transformed into valid Mermaid node IDs by replacing special characters (dots, hyphens, spaces) with underscores. +> +> **Rationale:** Unsanitized names containing dots, hyphens, or spaces produce invalid Mermaid syntax that fails to render. **Verified by:** - Special characters are replaced @@ -1387,6 +1545,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### All relationship types appear in single graph > **Invariant:** The generated Mermaid graph must combine all relationship types (uses, depends-on, implements, extends) into a single top-down graph. +> +> **Rationale:** Splitting relationship types into separate graphs would fragment the dependency picture and hide cross-type interactions. **Verified by:** - Complete dependency graph with all relationship types @@ -1427,6 +1587,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Category sections group patterns by domain > **Invariant:** Each category in the dataset must produce an H3 section listing its patterns, and the filterCategories option must restrict output to only the specified categories. +> +> **Rationale:** Without category grouping, consumers must scan the entire flat pattern list to find domain-relevant patterns; filtering avoids noise in focused documentation. **Verified by:** - Category sections with pattern lists @@ -1437,6 +1599,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Dependency graph visualizes pattern relationships > **Invariant:** A Mermaid dependency graph must be included when pattern relationships exist and the includeDependencyGraph option is not disabled; it must be omitted when no relationships exist or when explicitly disabled. +> +> **Rationale:** Dependency relationships are invisible in flat pattern lists; the graph reveals implementation ordering and coupling that affects planning decisions. **Verified by:** - Dependency graph included when relationships exist @@ -1645,6 +1809,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### PrChangesCodec generates review checklist when includeReviewChecklist is enabled > **Invariant:** When includeReviewChecklist is enabled, the codec must generate a "Review Checklist" section with standard items and context-sensitive items based on pattern state (completed, active, dependencies, deliverables). When disabled, no checklist appears. +> +> **Rationale:** A context-sensitive checklist prevents reviewers from missing state-specific concerns (e.g., verifying completed patterns still work, or that dependencies are satisfied) that a static checklist would not cover. **Verified by:** - Review checklist generated with standard items @@ -1659,6 +1825,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### PrChangesCodec generates dependencies section when includeDependencies is enabled > **Invariant:** When includeDependencies is enabled and patterns have dependency relationships, the codec must render a "Dependencies" section with "Depends On" and "Enables" subsections. When no dependencies exist or the option is disabled, the section is omitted. +> +> **Rationale:** Dependency visibility in PR reviews prevents merging changes that break upstream or downstream patterns, which would otherwise only surface during integration. **Verified by:** - Dependencies section shows depends on relationships @@ -1671,6 +1839,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### PrChangesCodec filters patterns by changedFiles > **Invariant:** When changedFiles filter is set, only patterns whose source files match (including partial directory path matches) are included in the output. +> +> **Rationale:** Filtering by changed files scopes the PR document to only the patterns actually touched, preventing reviewers from wading through unrelated patterns. **Verified by:** - Patterns filtered by changedFiles match @@ -1681,6 +1851,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### PrChangesCodec filters patterns by releaseFilter > **Invariant:** When releaseFilter is set, only patterns with deliverables matching the specified release version are included. +> +> **Rationale:** Release filtering isolates the patterns scheduled for a specific version, enabling targeted release reviews without noise from other versions' deliverables. **Verified by:** - Patterns filtered by release version @@ -1733,6 +1905,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### PrChangesCodec generates summary with filter information > **Invariant:** Every PR changes document must contain a Summary section with pattern counts and active filter information. +> +> **Rationale:** Without a summary, reviewers must scan the entire document to understand the scope and filtering context of the PR changes. **Verified by:** - Summary section shows pattern counts @@ -1744,6 +1918,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### PrChangesCodec groups changes by phase when sortBy is "phase" > **Invariant:** When sortBy is "phase" (the default), patterns must be grouped under phase headings in ascending phase order. +> +> **Rationale:** Phase grouping aligns PR changes with the delivery roadmap, letting reviewers verify that changes belong to the expected implementation phase. **Verified by:** - Changes grouped by phase with default sortBy @@ -1754,6 +1930,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### PrChangesCodec groups changes by priority when sortBy is "priority" > **Invariant:** When sortBy is "priority", patterns must be grouped under High/Medium/Low priority headings with correct pattern assignment. +> +> **Rationale:** Priority grouping lets reviewers focus on high-impact changes first, ensuring critical patterns receive the most review attention. **Verified by:** - Changes grouped by priority @@ -1775,6 +1953,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### PrChangesCodec renders pattern details with metadata and description > **Invariant:** Each pattern entry must include a metadata table (status, phase, business value when available) and description text. +> +> **Rationale:** Metadata and description provide the context reviewers need to evaluate whether a pattern's implementation aligns with its stated purpose and delivery status. **Verified by:** - Pattern detail shows metadata table @@ -1786,6 +1966,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### PrChangesCodec renders deliverables when includeDeliverables is enabled > **Invariant:** Deliverables are only rendered when includeDeliverables is enabled, and when releaseFilter is set, only deliverables matching that release are shown. +> +> **Rationale:** Deliverables add bulk to the PR document; gating them behind a flag keeps default output concise, while release filtering prevents reviewers from seeing unrelated work items. **Verified by:** - Deliverables shown when patterns have deliverables @@ -1797,6 +1979,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### PrChangesCodec renders acceptance criteria from scenarios > **Invariant:** When patterns have associated scenarios, the codec must render an "Acceptance Criteria" section containing scenario names and step lists. +> +> **Rationale:** Acceptance criteria give reviewers a concrete checklist to verify that the PR's implementation satisfies the behavioral requirements defined in the spec. **Verified by:** - Acceptance criteria rendered when patterns have scenarios @@ -1807,6 +1991,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### PrChangesCodec renders business rules from Gherkin Rule keyword > **Invariant:** When patterns have Gherkin Rule blocks, the codec must render a "Business Rules" section containing rule names and verification information. +> +> **Rationale:** Business rules surface domain invariants directly in the PR review, ensuring reviewers can verify that implementation changes respect the documented constraints. **Verified by:** - Business rules rendered when patterns have rules @@ -1823,6 +2009,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Release version filtering controls which phases appear in output > **Invariant:** Only phases with deliverables matching the releaseFilter are included; roadmap phases are always excluded. +> +> **Rationale:** Including unrelated releases or unstarted roadmap items in a PR description misleads reviewers about the scope of actual changes. **Verified by:** - Filter phases by specific release version @@ -1835,6 +2023,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Patterns are grouped by phase number in the output > **Invariant:** Each phase number produces a separate heading section in the generated output. +> +> **Rationale:** Without phase grouping, reviewers cannot distinguish which changes belong to which delivery phase, making incremental review impossible. **Verified by:** - Patterns grouped by phase number @@ -1844,6 +2034,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Summary statistics provide a high-level overview of the PR > **Invariant:** Summary section always shows pattern counts and release tag when a releaseFilter is active. +> +> **Rationale:** Without a summary, reviewers must read the entire document to understand the PR's scope; the release tag anchors the summary to a specific version. **Verified by:** - Summary shows pattern counts in table format @@ -1854,6 +2046,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Deliverables are displayed inline with their parent patterns > **Invariant:** When includeDeliverables is enabled, each pattern lists its deliverables with name, status, and release tag. +> +> **Rationale:** Hiding deliverables forces reviewers to cross-reference feature files to verify completion; inline display makes review self-contained. **Verified by:** - Deliverables shown inline with patterns @@ -1864,6 +2058,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Review checklist includes standard code quality verification items > **Invariant:** Review checklist always includes code conventions, tests, documentation, and completed pattern verification items. +> +> **Rationale:** Omitting the checklist means quality gates depend on reviewer memory; a consistent checklist ensures no standard verification step is skipped. **Verified by:** - Review checklist includes standard code quality items @@ -1874,6 +2070,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Dependencies section shows inter-pattern relationships > **Invariant:** Dependencies section surfaces both what patterns enable and what they depend on. +> +> **Rationale:** Hidden dependencies cause merge-order mistakes and broken builds; surfacing them in the PR lets reviewers verify prerequisite work is complete. **Verified by:** - Dependencies shows what patterns enable @@ -1884,6 +2082,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Business value can be included or excluded from pattern metadata > **Invariant:** Business value display is controlled by the includeBusinessValue option. +> +> **Rationale:** Not all consumers need business value context; making it opt-in keeps the default output concise for technical reviewers. **Verified by:** - Pattern metadata includes business value when enabled @@ -1894,6 +2094,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Output can be sorted by phase number or priority > **Invariant:** Sorting is deterministic and respects the configured sortBy option. +> +> **Rationale:** Non-deterministic ordering produces diff noise between regenerations, making it impossible to tell if content actually changed. **Verified by:** - Phases sorted by phase number @@ -1904,6 +2106,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Edge cases produce graceful output > **Invariant:** The generator handles missing phases, missing deliverables, and missing phase numbers without errors. +> +> **Rationale:** Crashing on incomplete data prevents PR generation entirely; graceful degradation ensures output is always available even with partial inputs. **Verified by:** - No matching phases produces no changes message @@ -1915,6 +2119,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Deliverable-level filtering shows only matching deliverables within a phase > **Invariant:** When a phase contains deliverables with different release tags, only those matching the releaseFilter are shown. +> +> **Rationale:** Showing all deliverables regardless of release tag pollutes the PR with unrelated work, obscuring what actually shipped in the target release. **Verified by:** - Mixed releases within single phase shows only matching deliverables @@ -1972,6 +2178,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Patterns without implementations omit the section > **Invariant:** The Implementations heading must not appear in pattern documents when no implementing files exist. +> +> **Rationale:** Rendering an empty Implementations section misleads readers into thinking implementations were expected but are missing, rather than simply not applicable. **Verified by:** - No implementations section when none exist @@ -1997,6 +2205,10 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Empty datasets produce fallback content +> **Invariant:** A codec must always produce a valid document, even when no matching content exists in the dataset. +> +> **Rationale:** Consumers rely on a consistent document structure; a missing or null document would cause rendering failures downstream. + **Verified by:** - Codec with no matching content produces fallback message @@ -2004,6 +2216,10 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Convention content is rendered as sections +> **Invariant:** Convention-tagged patterns must render as distinct headed sections with their rule names, invariants, and tables preserved. +> +> **Rationale:** Conventions define project-wide constraints; losing their structure in generated docs would make them unenforceable and undiscoverable. + **Verified by:** - Convention rules appear as H2 headings with content - Convention tables are rendered in the document @@ -2012,6 +2228,10 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Detail level controls output density +> **Invariant:** Each detail level (summary, standard, detailed) must produce a deterministic subset of content, with summary being the most restrictive. +> +> **Rationale:** AI session contexts have strict token budgets; uncontrolled output density wastes context window and degrades session quality. + **Verified by:** - Summary level omits narrative and rationale - Detailed level includes rationale and verified-by @@ -2020,6 +2240,10 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Behavior sections are rendered from category-matching patterns +> **Invariant:** Only patterns whose category matches the configured behavior tags may appear in the Behavior Specifications section. +> +> **Rationale:** Mixing unrelated categories into a single behavior section would produce misleading documentation that conflates distinct concerns. + **Verified by:** - Behavior-tagged patterns appear in a Behavior Specifications section @@ -2027,6 +2251,10 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Shape sources are extracted from matching patterns +> **Invariant:** Only shapes from patterns whose file path matches the configured shapeSources glob may appear in the API Types section. +> +> **Rationale:** Including shapes from unrelated source paths would pollute the API Types section with irrelevant type definitions, breaking the scoped documentation contract. + **Verified by:** - Shapes appear when source file matches shapeSources glob - Summary level shows shapes as a compact table @@ -2036,6 +2264,10 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Convention and behavior content compose in a single document +> **Invariant:** Convention and behavior content must coexist in the same RenderableDocument when both are present in the dataset. +> +> **Rationale:** Splitting conventions and behaviors into separate documents would force consumers to cross-reference multiple files, losing the unified view of a product area. + **Verified by:** - Both convention and behavior sections appear when data exists @@ -2043,6 +2275,10 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Composition order follows AD-5: conventions then shapes then behaviors +> **Invariant:** Document sections must follow the canonical order: conventions, then API types (shapes), then behavior specifications. +> +> **Rationale:** AD-5 establishes a consistent reading flow (rules, then types, then specs); violating this order would confuse readers who expect a stable document structure. + **Verified by:** - Convention headings appear before shapes before behaviors @@ -2050,6 +2286,10 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Convention code examples render as mermaid blocks +> **Invariant:** Mermaid diagram content in conventions must render as fenced mermaid blocks, and must be excluded at summary detail level. +> +> **Rationale:** Mermaid diagrams are visual aids that require rendering support; emitting them as plain text would produce unreadable output, and including them in summaries wastes token budget. + **Verified by:** - Convention with mermaid content produces mermaid block in output - Summary level omits convention code examples @@ -2064,6 +2304,10 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Standard detail level includes narrative but omits rationale +> **Invariant:** Standard detail level renders narrative prose for convention patterns but excludes rationale sections, reserving rationale for the detailed level only. +> +> **Rationale:** Progressive disclosure prevents information overload at the standard level while ensuring readers who need deeper justification can access it at the detailed level. + **Verified by:** - Standard level includes narrative but omits rationale @@ -2071,6 +2315,10 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Deep behavior rendering with structured annotations +> **Invariant:** Behavior patterns render structured rule annotations (invariant, rationale, verified-by) at detailed level, invariant-only at standard level, and a truncated table at summary level. +> +> **Rationale:** Structured annotations are the primary mechanism for surfacing business rules from Gherkin sources; inconsistent rendering across detail levels would produce misleading or incomplete documentation. + **Verified by:** - Detailed level renders structured behavior rules - Standard level renders behavior rules without rationale @@ -2081,6 +2329,10 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Shape JSDoc prose renders at standard and detailed levels +> **Invariant:** Shape patterns with JSDoc prose include that prose in rendered code blocks at standard and detailed levels. Shapes without JSDoc render code blocks only. +> +> **Rationale:** JSDoc prose provides essential context for API types; omitting it would force readers to open source files to understand a shape's purpose, undermining the generated documentation's self-sufficiency. + **Verified by:** - Standard level includes JSDoc in code blocks - Detailed level includes JSDoc in code block and property table @@ -2090,6 +2342,10 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Shape sections render param returns and throws documentation +> **Invariant:** Function shapes render parameter, returns, and throws documentation at detailed level. Standard level renders parameter tables but omits throws. Shapes without param docs skip the parameter table entirely. +> +> **Rationale:** Throws documentation is diagnostic detail that clutters standard output; separating it into detailed level keeps standard output focused on the function's contract while preserving full error documentation for consumers who need it. + **Verified by:** - Detailed level renders param table for function shapes - Detailed level renders returns and throws documentation @@ -2133,6 +2389,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Include tags route cross-cutting content into reference documents > **Invariant:** Patterns with matching include tags appear alongside category-selected patterns in the behavior section. The merging is additive (OR semantics). +> +> **Rationale:** Cross-cutting patterns (e.g., shared utilities, common validators) belong in multiple reference documents; without include-tag routing, these patterns would only appear in their home category, leaving dependent documents incomplete. **Verified by:** - Include-tagged pattern appears in behavior section @@ -2149,6 +2407,10 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Scoped diagrams are generated from diagramScope config +> **Invariant:** Diagram content is determined exclusively by diagramScope filters (archContext, include, archLayer, patterns), and filters compose via OR — a pattern matching any single filter appears in the diagram. +> +> **Rationale:** Without filter-driven scoping, diagrams would include all patterns regardless of relevance, producing unreadable visualizations that obscure architectural boundaries. + **Verified by:** - Config with diagramScope produces mermaid block at detailed level - Neighbor patterns appear in diagram with distinct style @@ -2165,6 +2427,10 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Multiple diagram scopes produce multiple mermaid blocks +> **Invariant:** Each entry in the diagramScopes array produces an independent Mermaid block with its own title and direction, and legacy singular diagramScope remains supported as a fallback. +> +> **Rationale:** Product areas require multiple architectural views (e.g., system overview and data flow) from a single configuration, and breaking backward compatibility with the singular diagramScope would silently remove diagrams from existing consumers. + **Verified by:** - Config with diagramScopes array produces multiple diagrams - Diagram direction is reflected in mermaid output @@ -2276,6 +2542,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Priority-based sorting surfaces critical work first > **Invariant:** Phases with higher priority always appear before lower-priority phases when sorting by priority. +> +> **Rationale:** Without priority sorting, critical work gets buried under low-priority items, delaying urgent deliverables. **Verified by:** - Next Actionable sorted by priority @@ -2287,6 +2555,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Effort parsing converts duration strings to comparable hours > **Invariant:** Effort strings must be parsed to a common unit (hours) for accurate sorting across different time scales. +> +> **Rationale:** Comparing raw strings like "2h" and "3d" lexicographically produces incorrect ordering; normalization to hours ensures consistent comparison. **Verified by:** - Phases sorted by effort ascending @@ -2300,6 +2570,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Quarter grouping organizes planned work into time-based buckets > **Invariant:** Phases with a quarter tag are grouped under their quarter heading; phases without a quarter appear under Unscheduled. +> +> **Rationale:** Flat lists obscure time-based planning; grouping by quarter lets planners see what is committed per period and what remains unscheduled. **Verified by:** - Planned phases grouped by quarter @@ -2310,6 +2582,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Priority grouping organizes phases by urgency level > **Invariant:** Phases are grouped under their priority heading; phases without priority appear under Unprioritized. +> +> **Rationale:** Mixing priority levels in a flat list forces readers to visually scan for urgency; grouping by priority makes triage immediate. **Verified by:** - Planned phases grouped by priority @@ -2319,6 +2593,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Progressive disclosure prevents information overload in large backlogs > **Invariant:** When the backlog exceeds maxNextActionable, only the top N phases are shown with a link or count for the remainder. +> +> **Rationale:** Displaying hundreds of phases in the summary overwhelms planners; progressive disclosure keeps the summary scannable while preserving access to the full backlog. **Verified by:** - Large backlog uses progressive disclosure @@ -2329,6 +2605,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Edge cases are handled gracefully > **Invariant:** Empty or fully-blocked backlogs produce meaningful output instead of errors or blank sections. +> +> **Rationale:** Blank or errored output when the backlog is empty confuses users into thinking the generator is broken rather than reflecting a genuinely empty state. **Verified by:** - Empty backlog handling @@ -2339,6 +2617,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Default behavior preserves backward compatibility > **Invariant:** Without explicit sortBy or groupPlannedBy options, phases are sorted by phase number in a flat list. +> +> **Rationale:** Changing default behavior would break existing consumers that rely on phase-number ordering without specifying options. **Verified by:** - Default sorting is by phase number @@ -2391,6 +2671,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### All phases with incomplete patterns are shown > **Invariant:** The phase table must include every phase that contains at least one incomplete pattern, and phases with only completed patterns must be excluded. +> +> **Rationale:** Showing fully completed phases inflates the remaining work view, while omitting phases with incomplete patterns hides outstanding work. **Verified by:** - Multiple phases shown in order @@ -2407,6 +2689,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Document metadata renders as frontmatter before sections > **Invariant:** Title always renders as H1, purpose and detail level render as bold key-value pairs separated by horizontal rule. +> +> **Rationale:** Consistent frontmatter structure allows downstream tooling and readers to reliably locate the document title and metadata without parsing the full body. **Verified by:** - Render minimal document with title only @@ -2419,6 +2703,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Headings render at correct markdown levels with clamping > **Invariant:** Heading levels are clamped to the valid range 1-6 regardless of input value. +> +> **Rationale:** Markdown only supports heading levels 1-6; unclamped values would produce invalid syntax that renders as plain text in all markdown processors. **Verified by:** - Render headings at different levels @@ -2430,6 +2716,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Paragraphs and separators render as plain text and horizontal rules > **Invariant:** Paragraph content passes through unmodified, including special markdown characters. Separators render as horizontal rules. +> +> **Rationale:** The renderer is a dumb printer; altering paragraph content would break codec-controlled formatting and violate the separation between codec logic and rendering. **Verified by:** - Render paragraph @@ -2441,6 +2729,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Tables render with headers, alignment, and cell escaping > **Invariant:** Tables must escape pipe characters, convert newlines to line breaks, and pad short rows to match column count. +> +> **Rationale:** Unescaped pipes corrupt table column boundaries, raw newlines break row parsing, and short rows cause column misalignment in every markdown renderer. **Verified by:** - Render basic table @@ -2455,6 +2745,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Lists render in unordered, ordered, checkbox, and nested formats > **Invariant:** List type determines prefix: dash for unordered, numbered for ordered, checkbox syntax for checked items. Nesting adds two-space indentation per level. +> +> **Rationale:** Incorrect prefixes or indentation levels cause markdown parsers to break list continuity, rendering nested items as separate top-level lists or plain text. **Verified by:** - Render unordered list @@ -2473,6 +2765,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Code blocks and mermaid diagrams render with fenced syntax > **Invariant:** Code blocks use triple backtick fencing with optional language hint. Mermaid blocks use mermaid as the language hint. +> +> **Rationale:** Inconsistent fencing breaks syntax highlighting in GitHub/IDE markdown previews and prevents Mermaid renderers from detecting diagram blocks. **Verified by:** - Render code block with language @@ -2484,6 +2778,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Collapsible blocks render as HTML details elements > **Invariant:** Summary text is HTML-escaped to prevent injection. Collapsible content renders between details tags. +> +> **Rationale:** Unescaped HTML in summary text enables XSS when generated markdown is rendered in browsers; malformed details tags break progressive disclosure in documentation. **Verified by:** - Render collapsible block @@ -2495,6 +2791,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Link-out blocks render as markdown links with URL encoding > **Invariant:** Link paths with spaces are percent-encoded for valid URLs. +> +> **Rationale:** Unencoded spaces produce broken links in markdown renderers, making cross-document navigation fail silently for files with spaces in their paths. **Verified by:** - Render link-out block @@ -2505,6 +2803,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Multi-file documents produce correct output file collections > **Invariant:** Output file count equals 1 (main) plus additional file count. The first output file always uses the provided base path. +> +> **Rationale:** A mismatch between expected and actual file count causes the orchestrator to write orphaned files or miss outputs, corrupting the generated documentation directory. **Verified by:** - Render document with additional files @@ -2515,6 +2815,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Complex documents render all block types in sequence > **Invariant:** Multiple block types in a single document render in order without interference. +> +> **Rationale:** Block ordering reflects the codec's semantic structure; out-of-order or swallowed blocks would produce misleading documentation that diverges from the source of truth. **Verified by:** - Render complex document with multiple block types @@ -2524,6 +2826,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Claude context renderer produces compact AI-optimized output > **Invariant:** Claude context replaces markdown syntax with section markers, omits visual-only blocks (mermaid, separators), flattens collapsible content, and produces shorter output than markdown. +> +> **Rationale:** LLM context windows are token-limited; visual-only blocks waste tokens without adding semantic value, and verbose markdown syntax inflates context size unnecessarily. **Verified by:** - Claude context renders title and headings as section markers @@ -2534,6 +2838,23 @@ Each Rule keyword creates a separate entry in the Business Rules section. - Claude context omits separator tokens - Claude context produces fewer characters than markdown +--- + +#### Claude MD module renderer produces modular-claude-md compatible output + +> **Invariant:** Title renders as H3 (offset +2), section headings are offset by +2 clamped at H6, frontmatter is omitted, mermaid blocks are omitted, link-out blocks are omitted, and collapsible blocks are flattened to headings. +> +> **Rationale:** The modular-claude-md system manages CLAUDE.md as composable H3-rooted modules. Generating incompatible formats (like section markers) produces orphaned files that are never consumed. + +**Verified by:** +- Module title renders as H3 +- Module section headings offset by plus 2 +- Module frontmatter is omitted +- Module mermaid blocks are omitted +- Module link-out blocks are omitted +- Module collapsible blocks flatten to headings +- Module heading level clamped at H6 + *render-output.feature* ### Reporting Codec @@ -2605,6 +2926,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### RequirementsDocumentCodec generates PRD-style documentation from patterns > **Invariant:** RequirementsDocumentCodec transforms MasterDataset patterns into a PRD-style document with flexible grouping (product area, user role, or phase), optional detail file generation, and business value rendering. +> +> **Rationale:** Flexible grouping lets stakeholders view requirements through their preferred lens (area, role, or phase), and detail files provide deep-dive context without bloating the summary document. **Verified by:** - No patterns with PRD metadata produces empty message @@ -2625,6 +2948,8 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### AdrDocumentCodec documents architecture decisions > **Invariant:** AdrDocumentCodec transforms MasterDataset ADR patterns into an architecture decision record document with status tracking, category/phase/date grouping, supersession relationships, and optional detail file generation. +> +> **Rationale:** Architecture decisions lose value without status tracking and supersession chains; without them, teams act on outdated decisions and cannot trace why a previous approach was abandoned. **Verified by:** - No ADR patterns produces empty message @@ -2743,8 +3068,9 @@ Each Rule keyword creates a separate entry in the Business Rules section. #### Basic arithmetic operations work correctly -The calculator should perform standard math operations - with correct results. +> **Invariant:** Arithmetic operations must return mathematically correct results for all valid inputs. +> +> **Rationale:** Incorrect arithmetic results silently corrupt downstream calculations, making errors undetectable at their source. The calculator should perform standard math operations with correct results. **Verified by:** - Addition of two positive numbers @@ -2754,8 +3080,9 @@ The calculator should perform standard math operations #### Division has special constraints -Division by zero must be handled gracefully to prevent - system errors. +> **Invariant:** Division operations must reject a zero divisor before execution. +> +> **Rationale:** Unguarded division by zero causes runtime exceptions that crash the process instead of returning a recoverable error. Division by zero must be handled gracefully to prevent system errors. **Verified by:** - Division of two numbers @@ -2818,6 +3145,8 @@ Division by zero must be handled gracefully to prevent #### Exact paths match without wildcards > **Invariant:** A pattern without glob characters must match only the exact file path, character for character. +> +> **Rationale:** Loose matching on non-glob patterns would silently include unintended files, causing incorrect shapes to appear in generated documentation. **Verified by:** - Exact path matches identical path @@ -2828,6 +3157,8 @@ Division by zero must be handled gracefully to prevent #### Single-level globs match one directory level > **Invariant:** A single `*` glob must match files only within the specified directory, never crossing directory boundaries. +> +> **Rationale:** Crossing directory boundaries would violate standard glob semantics and pull in shapes from nested modules that belong to different product areas. **Verified by:** - Single glob matches file in target directory @@ -2839,6 +3170,8 @@ Division by zero must be handled gracefully to prevent #### Recursive globs match any depth > **Invariant:** A `**` glob must match files at any nesting depth below the specified prefix, while still respecting extension and prefix constraints. +> +> **Rationale:** Recursive globs enable broad subtree selection for shape extraction; failing to respect prefix and extension constraints would leak unrelated shapes into the output. **Verified by:** - Recursive glob matches file at target depth @@ -2870,6 +3203,8 @@ Division by zero must be handled gracefully to prevent #### Reference doc configs select shapes via shapeSelectors > **Invariant:** shapeSelectors provides three selection modes: by source path + specific names, by group tag, or by source path alone. +> +> **Rationale:** Multiple selection modes let reference docs curate precisely which shapes appear, preventing either over-inclusion of internal types or under-inclusion of public API surfaces. **Verified by:** - Select specific shapes by source and names @@ -3064,6 +3399,8 @@ Division by zero must be handled gracefully to prevent #### Multiple tables in description each render exactly once > **Invariant:** When a rule description contains multiple markdown tables, each table renders as a separate formatted table block with no merging or duplication. +> +> **Rationale:** Merging or dropping tables would lose distinct data structures that the author intentionally separated, corrupting the rendered documentation. **Verified by:** - Two tables in description render as two separate tables @@ -3073,6 +3410,8 @@ Division by zero must be handled gracefully to prevent #### stripMarkdownTables removes table syntax from text > **Invariant:** stripMarkdownTables removes all pipe-delimited table syntax from input text while preserving all surrounding content unchanged. +> +> **Rationale:** If table syntax is not stripped from the raw text, the same table data appears twice in the rendered output -- once from the extracted table block and once as raw pipe characters in the description. **Verified by:** - Strips single table from text @@ -3242,6 +3581,8 @@ Division by zero must be handled gracefully to prevent #### Empty dataset produces valid zero-state views > **Invariant:** An empty input produces a MasterDataset with all counts at zero and no groupings. +> +> **Rationale:** Generators must handle the zero-state gracefully; a missing or malformed empty dataset would cause null-reference errors across all rendering codecs. **Verified by:** - Transform empty dataset @@ -3267,6 +3608,8 @@ Division by zero must be handled gracefully to prevent #### Quarter and category grouping organizes by timeline and domain > **Invariant:** Patterns are grouped by quarter and category, with only patterns bearing the relevant metadata included in each view. +> +> **Rationale:** Timeline and domain views must exclude patterns without the relevant metadata to prevent misleading counts and empty groupings in generated documentation. **Verified by:** - Group patterns by quarter @@ -3278,6 +3621,8 @@ Division by zero must be handled gracefully to prevent #### Source grouping separates TypeScript and Gherkin origins > **Invariant:** Patterns are partitioned by source file type, and patterns with phase metadata appear in the roadmap view. +> +> **Rationale:** Codecs that render TypeScript-specific or Gherkin-specific views depend on pre-partitioned sources; mixing sources would produce incorrect per-origin statistics and broken cross-references. **Verified by:** - Group patterns by source file type @@ -3303,6 +3648,8 @@ Division by zero must be handled gracefully to prevent #### Completion tracking computes project progress > **Invariant:** Completion percentage is rounded to the nearest integer, and fully-completed requires all patterns in completed status with a non-zero total. +> +> **Rationale:** Inconsistent rounding or a false-positive fully-completed signal on an empty dataset would misrepresent project health in dashboards and generated progress reports. **Verified by:** - Calculate completion percentage @@ -3313,6 +3660,8 @@ Division by zero must be handled gracefully to prevent #### Workflow integration conditionally includes delivery process data > **Invariant:** The workflow is included in the MasterDataset only when provided, and phase names are resolved from the workflow configuration. +> +> **Rationale:** Projects without a delivery workflow must still produce valid datasets; unconditionally requiring workflow data would break standalone documentation generation. **Verified by:** - Include workflow in result when provided @@ -3494,6 +3843,8 @@ Division by zero must be handled gracefully to prevent #### Input codec parses and validates JSON in a single step > **Invariant:** Every JSON string parsed through the input codec is both syntactically valid JSON and schema-conformant before returning a typed value. +> +> **Rationale:** Separating parse from validate allows invalid data to leak past the boundary — a single-step codec ensures callers never hold an unvalidated value. **Verified by:** - Input codec parses valid JSON to typed object @@ -3506,6 +3857,8 @@ Division by zero must be handled gracefully to prevent #### Output codec validates before serialization > **Invariant:** Every object serialized through the output codec is schema-validated before JSON.stringify, preventing invalid data from reaching consumers. +> +> **Rationale:** Serializing without validation can produce JSON that downstream consumers cannot parse, causing failures far from the source of the invalid data. **Verified by:** - Output codec serializes valid object to JSON @@ -3517,6 +3870,8 @@ Division by zero must be handled gracefully to prevent #### LintOutputSchema validates CLI lint output structure > **Invariant:** Lint output JSON always conforms to the LintOutputSchema, ensuring consistent structure for downstream tooling. +> +> **Rationale:** Non-conformant lint output breaks CI pipeline parsers and IDE integrations that depend on a stable JSON contract. **Verified by:** - LintOutputSchema validates correct lint output @@ -3527,6 +3882,8 @@ Division by zero must be handled gracefully to prevent #### ValidationSummaryOutputSchema validates cross-source analysis output > **Invariant:** Validation summary JSON always conforms to the ValidationSummaryOutputSchema, ensuring consistent reporting of cross-source pattern analysis. +> +> **Rationale:** Inconsistent validation summaries cause miscounted pattern coverage, leading to false confidence or missed gaps in cross-source analysis. **Verified by:** - ValidationSummaryOutputSchema validates correct validation output @@ -3537,6 +3894,8 @@ Division by zero must be handled gracefully to prevent #### RegistryMetadataOutputSchema accepts arbitrary nested structures > **Invariant:** Registry metadata codec accepts any valid JSON-serializable object without schema constraints on nested structure. +> +> **Rationale:** Registry consumers attach domain-specific metadata whose shape varies per preset — constraining the nested structure would break extensibility across presets. **Verified by:** - RegistryMetadataOutputSchema accepts arbitrary metadata @@ -3546,6 +3905,8 @@ Division by zero must be handled gracefully to prevent #### formatCodecError produces human-readable error output > **Invariant:** Formatted codec errors always include the operation context and all validation error details for debugging. +> +> **Rationale:** Omitting the operation context or individual field errors forces developers to reproduce failures manually instead of diagnosing from the error message alone. **Verified by:** - formatCodecError includes validation errors in output @@ -3555,6 +3916,8 @@ Division by zero must be handled gracefully to prevent #### safeParse returns typed values or undefined without throwing > **Invariant:** safeParse never throws exceptions; it returns the typed value on success or undefined on any failure. +> +> **Rationale:** Throwing on invalid input forces every call site to wrap in try/catch — returning undefined lets callers use simple conditional checks and avoids unhandled exception crashes. **Verified by:** - safeParse returns typed value on valid JSON @@ -3566,6 +3929,8 @@ Division by zero must be handled gracefully to prevent #### createFileLoader handles filesystem operations with typed errors > **Invariant:** File loader converts all filesystem errors (ENOENT, EACCES, generic) into structured CodecError values with appropriate messages and source paths. +> +> **Rationale:** Propagating raw filesystem exceptions leaks Node.js error internals to consumers and prevents consistent error formatting across parse, validate, and I/O failures. **Verified by:** - createFileLoader loads and parses valid JSON file diff --git a/docs-generated/business-rules/process.md b/docs-generated/business-rules/process.md index 6656c862..c494d09f 100644 --- a/docs-generated/business-rules/process.md +++ b/docs-generated/business-rules/process.md @@ -19,6 +19,8 @@ #### Orphaned session files are removed during generation > **Invariant:** Only session files for active phases are preserved; all other phase files must be deleted during cleanup and replaced with fresh content. +> +> **Rationale:** Stale session files for completed or deferred phases mislead LLMs that read the sessions directory for context, causing incorrect planning decisions. **Verified by:** - Orphaned session files are deleted during generation @@ -42,6 +44,8 @@ #### Deleted files are tracked in cleanup results > **Invariant:** The cleanup result must include the relative paths of all deleted session files for transparency and debugging. +> +> **Rationale:** Without deletion tracking, operators cannot audit what the generator removed, making it impossible to diagnose missing file issues after a run. **Verified by:** - Deleted files are tracked in generator output @@ -57,6 +61,8 @@ #### Handoff context generation captures session state > **Invariant:** Active phases with handoff context enabled must include session handoff sections with template and checklist links. +> +> **Rationale:** Without structured handoff sections, LLM sessions lose context between runs and developers waste time re-discovering phase state. **Verified by:** - SESSION-CONTEXT.md includes handoff section for active phases @@ -68,6 +74,8 @@ #### Handoff templates and checklists contain required sections > **Invariant:** Session handoff template and retrospective checklist must exist and contain all required sections for structured knowledge transfer. +> +> **Rationale:** Missing template sections cause incomplete handoffs, leading to lost context and repeated work when a new session resumes. **Verified by:** - Handoff template exists and contains required sections @@ -78,6 +86,8 @@ #### PROCESS_SETUP.md documents handoff and coordination protocols > **Invariant:** PROCESS_SETUP.md must document both session handoff protocol and multi-developer coordination patterns. +> +> **Rationale:** Without a single authoritative coordination reference, parallel developers follow ad-hoc processes that cause merge conflicts and duplicated effort. **Verified by:** - PROCESS_SETUP.md documents handoff protocol @@ -88,6 +98,8 @@ #### Edge cases and acceptance criteria ensure robustness > **Invariant:** Handoff context must degrade gracefully when no discoveries exist and must be disableable. Mid-phase handoffs, multi-developer coordination, and retrospective capture must all preserve context. +> +> **Rationale:** If handoff generation crashes on empty state or cannot be disabled, it blocks unrelated generation workflows and erodes trust in the automation. **Verified by:** - Fresh phase shows no previous context message diff --git a/docs-generated/business-rules/validation.md b/docs-generated/business-rules/validation.md index dd18d7b0..250da05a 100644 --- a/docs-generated/business-rules/validation.md +++ b/docs-generated/business-rules/validation.md @@ -130,6 +130,8 @@ #### isScannerConfig type guard narrows unknown values > **Invariant:** isScannerConfig returns true only for objects that have a non-empty patterns array and a string baseDir. +> +> **Rationale:** Without a reliable type guard, callers cannot safely narrow unknown config objects and risk accessing properties on incompatible types at runtime. **Verified by:** - isScannerConfig returns true for valid config @@ -142,6 +144,8 @@ #### isGeneratorConfig type guard narrows unknown values > **Invariant:** isGeneratorConfig returns true only for objects that have a string outputDir and a .json registryPath. +> +> **Rationale:** Without a reliable type guard, callers cannot safely narrow unknown config objects and risk passing malformed generator configs that bypass schema validation. **Verified by:** - isGeneratorConfig returns true for valid config @@ -381,6 +385,8 @@ #### Single directive linting validates annotations against rules > **Invariant:** Every directive is checked against all provided rules and violations include source location. +> +> **Rationale:** Skipping rules or omitting source locations makes violations unactionable, as developers cannot locate or understand the issue. **Verified by:** - Return empty array when all rules pass @@ -393,6 +399,8 @@ #### Multi-file batch linting aggregates results across files > **Invariant:** All files and directives are scanned, violations are collected per file, and severity counts are accurate. +> +> **Rationale:** Missing files or inaccurate severity counts cause silent rule violations in CI and undermine trust in the linting pipeline. **Verified by:** - Return empty results for clean files @@ -405,6 +413,8 @@ #### Failure detection respects strict mode for severity escalation > **Invariant:** Errors always indicate failure. Warnings only indicate failure in strict mode. Info never indicates failure. +> +> **Rationale:** Without correct severity-to-exit-code mapping, CI pipelines either miss real errors or block on informational messages, eroding developer trust in the linter. **Verified by:** - Return true when there are errors @@ -418,6 +428,8 @@ #### Violation sorting orders by severity then by line number > **Invariant:** Sorted output places errors first, then warnings, then info, with stable line-number ordering within each severity. Sorting does not mutate the original array. +> +> **Rationale:** Unsorted output forces developers to manually scan for critical errors among lower-severity noise, and mutating the original array would break callers that hold a reference to it. **Verified by:** - Sort errors first then warnings then info @@ -429,6 +441,8 @@ #### Pretty formatting produces human-readable output with severity counts > **Invariant:** Pretty output includes file paths, line numbers, severity labels, rule IDs, and summary counts. Quiet mode suppresses non-error violations. +> +> **Rationale:** Incomplete formatting (missing file paths or line numbers) prevents developers from navigating directly to violations, and noisy output in quiet mode defeats its purpose. **Verified by:** - Show success message when no violations @@ -441,6 +455,8 @@ #### JSON formatting produces machine-readable output with full details > **Invariant:** JSON output is valid, includes all summary fields, and preserves violation details including file, line, severity, rule, and message. +> +> **Rationale:** Machine consumers (CI pipelines, IDE integrations) depend on valid JSON with complete fields; missing or malformed output breaks automated tooling downstream. **Verified by:** - Return valid JSON @@ -503,6 +519,8 @@ #### Parent references must be valid > **Invariant:** A pattern's parent reference must point to an existing epic pattern in the registry. +> +> **Rationale:** Dangling parent references break the epic-to-pattern hierarchy, causing patterns to appear orphaned in roadmap views and losing rollup visibility. **Verified by:** - Invalid parent reference detected diff --git a/docs-generated/docs/REFERENCE-SAMPLE.md b/docs-generated/docs/REFERENCE-SAMPLE.md new file mode 100644 index 00000000..4bf0019c --- /dev/null +++ b/docs-generated/docs/REFERENCE-SAMPLE.md @@ -0,0 +1,1098 @@ +# Reference Generation Sample + +**Purpose:** Reference document: Reference Generation Sample +**Detail Level:** Full reference + +--- + +## Product area canonical values + +**Invariant:** The product-area tag uses one of 7 canonical values. Each value represents a reader-facing documentation section, not a source module. + +**Rationale:** Without canonical values, organic drift (e.g., Generator vs Generators) produces inconsistent grouping in generated documentation and fragmented product area pages. + +| Value | Reader Question | Covers | +| --- | --- | --- | +| Annotation | How do I annotate code? | Scanning, extraction, tag parsing, dual-source | +| Configuration | How do I configure the tool? | Config loading, presets, resolution | +| Generation | How does code become docs? | Codecs, generators, rendering, diagrams | +| Validation | How is the workflow enforced? | FSM, DoD, anti-patterns, process guard, lint | +| DataAPI | How do I query process state? | Process state API, stubs, context assembly, CLI | +| CoreTypes | What foundational types exist? | Result monad, error factories, string utils | +| Process | How does the session workflow work? | Session lifecycle, handoffs, conventions | + +--- + +## ADR category canonical values + +**Invariant:** The adr-category tag uses one of 4 values. + +**Rationale:** Unbounded category values prevent meaningful grouping of architecture decisions and make cross-cutting queries unreliable. + +| Value | Purpose | +| --- | --- | +| architecture | System structure, component design, data flow | +| process | Workflow, conventions, annotation rules | +| testing | Test strategy, verification approach | +| documentation | Documentation generation, content structure | + +--- + +## FSM status values and protection levels + +**Invariant:** Pattern status uses exactly 4 values with defined protection levels. These are enforced by Process Guard at commit time. + +**Rationale:** Without protection levels, active specs accumulate scope creep and completed specs get silently modified, undermining delivery process integrity. + +| Status | Protection | Can Add Deliverables | Allowed Actions | +| --- | --- | --- | --- | +| roadmap | None | Yes | Full editing | +| active | Scope-locked | No | Edit existing deliverables only | +| completed | Hard-locked | No | Requires unlock-reason tag | +| deferred | None | Yes | Full editing | + +--- + +## Valid FSM transitions + +**Invariant:** Only these transitions are valid. All others are rejected by Process Guard. + +**Rationale:** Allowing arbitrary transitions (e.g., roadmap to completed) bypasses the active phase where scope-lock and deliverable tracking provide quality assurance. Completed is a terminal state. Modifications require `@libar-docs-unlock-reason` escape hatch. + +| From | To | Trigger | +| --- | --- | --- | +| roadmap | active | Start work | +| roadmap | deferred | Postpone | +| active | completed | All deliverables done | +| active | roadmap | Blocked/regressed | +| deferred | roadmap | Resume planning | + +--- + +## Tag format types + +**Invariant:** Every tag has one of 6 format types that determines how its value is parsed. + +**Rationale:** Without explicit format types, parsers must guess value structure, leading to silent data corruption when CSV values are treated as single strings or numbers are treated as text. + +| Format | Parsing | Example | +| --- | --- | --- | +| flag | Boolean presence, no value | @libar-docs-core | +| value | Simple string | @libar-docs-pattern MyPattern | +| enum | Constrained to predefined list | @libar-docs-status completed | +| csv | Comma-separated values | @libar-docs-uses A, B, C | +| number | Numeric value | @libar-docs-phase 15 | +| quoted-value | Preserves spaces | @libar-docs-brief:'Multi word' | + +--- + +## Source ownership + +**Invariant:** Relationship tags have defined ownership by source type. Anti-pattern detection enforces these boundaries. + +**Rationale:** Cross-domain tag placement (e.g., runtime dependencies in Gherkin) creates conflicting sources of truth and breaks the dual-source architecture ownership model. + +| Tag | Correct Source | Wrong Source | Rationale | +| --- | --- | --- | --- | +| uses | TypeScript | Feature files | TS owns runtime dependencies | +| depends-on | Feature files | TypeScript | Gherkin owns planning dependencies | +| quarter | Feature files | TypeScript | Gherkin owns timeline metadata | +| team | Feature files | TypeScript | Gherkin owns ownership metadata | + +--- + +## Quarter format convention + +**Invariant:** The quarter tag uses `YYYY-QN` format (e.g., `2026-Q1`). ISO-year-first sorting works lexicographically. + +**Rationale:** Non-standard formats (e.g., Q1-2026) break lexicographic sorting, which roadmap generation and timeline queries depend on for correct ordering. + +--- + +## Canonical phase definitions (6-phase USDP standard) + +**Invariant:** The default workflow defines exactly 6 phases in fixed order. These are the canonical phase names and ordinals used by all generated documentation. + +**Rationale:** Ad-hoc phase names and ordering produce inconsistent roadmap grouping across packages and make cross-package progress tracking impossible. + +| Order | Phase | Purpose | +| --- | --- | --- | +| 1 | Inception | Problem framing, scope definition | +| 2 | Elaboration | Design decisions, architecture exploration | +| 3 | Session | Planning and design session work | +| 4 | Construction | Implementation, testing, integration | +| 5 | Validation | Verification, acceptance criteria confirmation | +| 6 | Retrospective | Review, lessons learned, documentation | + +--- + +## Deliverable status canonical values + +**Invariant:** Deliverable status (distinct from pattern FSM status) uses exactly 6 values, enforced by Zod schema at parse time. + +**Rationale:** Freeform status strings bypass Zod validation and break DoD checks, which rely on terminal status classification to determine pattern completeness. + +| Value | Meaning | +| --- | --- | +| complete | Work is done | +| in-progress | Work is ongoing | +| pending | Work has not started | +| deferred | Work postponed | +| superseded | Replaced by another | +| n/a | Not applicable | + +--- + +## Configuration Components + +Scoped architecture diagram showing component relationships: + +```mermaid +graph TB + subgraph config["Config"] + DeliveryProcessFactory("DeliveryProcessFactory") + DefineConfig[/"DefineConfig"/] + end + ConfigBasedWorkflowDefinition["ConfigBasedWorkflowDefinition"] + ProcessGuardTesting["ProcessGuardTesting"] + subgraph related["Related"] + AntiPatternDetector["AntiPatternDetector"]:::neighbor + ConfigurationTypes["ConfigurationTypes"]:::neighbor + RegexBuilders["RegexBuilders"]:::neighbor + ProjectConfigTypes["ProjectConfigTypes"]:::neighbor + ConfigurationPresets["ConfigurationPresets"]:::neighbor + ProcessGuardLinter["ProcessGuardLinter"]:::neighbor + PhaseStateMachineValidation["PhaseStateMachineValidation"]:::neighbor + MvpWorkflowImplementation["MvpWorkflowImplementation"]:::neighbor + end + DeliveryProcessFactory -->|uses| ConfigurationTypes + DeliveryProcessFactory -->|uses| ConfigurationPresets + DeliveryProcessFactory -->|uses| RegexBuilders + DefineConfig -->|uses| ProjectConfigTypes + ConfigBasedWorkflowDefinition -.->|depends on| MvpWorkflowImplementation + ProcessGuardTesting -.->|depends on| PhaseStateMachineValidation + ProcessGuardTesting -.->|depends on| AntiPatternDetector + ProcessGuardTesting ..->|implements| ProcessGuardLinter + RegexBuilders -->|uses| ConfigurationTypes + ProjectConfigTypes -->|uses| ConfigurationTypes + ProjectConfigTypes -->|uses| ConfigurationPresets + ConfigurationPresets -->|uses| ConfigurationTypes + classDef neighbor stroke-dasharray: 5 5 +``` + +--- + +## Generation Pipeline + +Temporal flow of the documentation generation pipeline: + +```mermaid +sequenceDiagram + participant CLI + participant Orchestrator + participant Scanner + participant Extractor + participant Transformer + participant Codec + participant Renderer + CLI ->> Orchestrator: generate(config) + Orchestrator ->> Scanner: scanPatterns(globs) + Scanner -->> Orchestrator: TypeScript ASTs + Orchestrator ->> Scanner: scanGherkinFiles(globs) + Scanner -->> Orchestrator: Gherkin documents + Orchestrator ->> Extractor: extractPatterns(files) + Extractor -->> Orchestrator: ExtractedPattern[] + Orchestrator ->> Extractor: extractFromGherkin(docs) + Extractor -->> Orchestrator: ExtractedPattern[] + Orchestrator ->> Orchestrator: mergePatterns(ts, gherkin) + Orchestrator ->> Transformer: transformToMasterDataset(patterns) + Transformer -->> Orchestrator: MasterDataset + Orchestrator ->> Codec: codec.decode(dataset) + Codec -->> Orchestrator: RenderableDocument + Orchestrator ->> Renderer: render(document) + Renderer -->> Orchestrator: markdown string +``` + +--- + +## Generator Class Model + +Scoped architecture diagram showing component relationships: + +```mermaid +classDiagram + class SourceMapper { + <> + } + class Documentation_Generation_Orchestrator { + <> + } + class TransformDataset { + <> + } + class DecisionDocGenerator { + <> + } + class MasterDataset + class Pattern_Scanner + class GherkinASTParser + class ShapeExtractor + class DecisionDocCodec + class PatternRelationshipModel + SourceMapper ..> DecisionDocCodec : depends on + SourceMapper ..> ShapeExtractor : depends on + SourceMapper ..> GherkinASTParser : depends on + Documentation_Generation_Orchestrator ..> Pattern_Scanner : uses + TransformDataset ..> MasterDataset : uses + TransformDataset ..|> PatternRelationshipModel : implements + DecisionDocGenerator ..> DecisionDocCodec : depends on + DecisionDocGenerator ..> SourceMapper : depends on +``` + +--- + +## Delivery Lifecycle FSM + +FSM lifecycle showing valid state transitions and protection levels: + +```mermaid +stateDiagram-v2 + [*] --> roadmap + roadmap --> active : Start work + roadmap --> deferred : Postpone + roadmap --> roadmap : Stay in planning + active --> completed : All deliverables done + active --> roadmap : Blocked / regressed + completed --> [*] + deferred --> roadmap : Resume planning + note right of roadmap + Protection: none + end note + note right of active + Protection: scope-locked + end note + note right of completed + Protection: hard-locked + end note + note right of deferred + Protection: none + end note +``` + +--- + +## Scanning & Extraction Boundary + +Scoped architecture diagram showing component relationships: + +```mermaid +C4Context + title Scanning & Extraction Boundary + Boundary(extractor, "Extractor") { + System(GherkinExtractor, "GherkinExtractor") + System(DualSourceExtractor, "DualSourceExtractor") + System(Document_Extractor, "Document Extractor") + } + Boundary(scanner, "Scanner") { + System(Pattern_Scanner, "Pattern Scanner") + System(GherkinScanner, "GherkinScanner") + System(GherkinASTParser, "GherkinASTParser") + System(TypeScript_AST_Parser, "TypeScript AST Parser") + } + System_Ext(DocDirectiveSchema, "DocDirectiveSchema") + System_Ext(GherkinRulesSupport, "GherkinRulesSupport") + Rel(GherkinScanner, GherkinASTParser, "uses") + Rel(GherkinScanner, GherkinRulesSupport, "implements") + Rel(GherkinASTParser, GherkinRulesSupport, "implements") + Rel(TypeScript_AST_Parser, DocDirectiveSchema, "uses") + Rel(GherkinExtractor, GherkinASTParser, "uses") + Rel(GherkinExtractor, GherkinRulesSupport, "implements") + Rel(DualSourceExtractor, GherkinExtractor, "uses") + Rel(DualSourceExtractor, GherkinScanner, "uses") + Rel(Document_Extractor, Pattern_Scanner, "uses") +``` + +--- + +## Domain Layer Overview + +Scoped architecture diagram showing component relationships: + +```mermaid +graph LR + subgraph api["Api"] + MasterDataset[/"MasterDataset"/] + PatternHelpers["PatternHelpers"] + ArchQueriesImpl("ArchQueriesImpl") + end + subgraph config["Config"] + ConfigurationTypes["ConfigurationTypes"] + ProjectConfigTypes["ProjectConfigTypes"] + ConfigurationPresets["ConfigurationPresets"] + end + subgraph taxonomy["Taxonomy"] + TagRegistryBuilder("TagRegistryBuilder") + end + subgraph validation["Validation"] + FSMTransitions[/"FSMTransitions"/] + FSMStates[/"FSMStates"/] + end + subgraph related["Related"] + ProcessStateAPI["ProcessStateAPI"]:::neighbor + TypeScriptTaxonomyImplementation["TypeScriptTaxonomyImplementation"]:::neighbor + PhaseStateMachineValidation["PhaseStateMachineValidation"]:::neighbor + DataAPIOutputShaping["DataAPIOutputShaping"]:::neighbor + DataAPIArchitectureQueries["DataAPIArchitectureQueries"]:::neighbor + end + TagRegistryBuilder ..->|implements| TypeScriptTaxonomyImplementation + ProjectConfigTypes -->|uses| ConfigurationTypes + ProjectConfigTypes -->|uses| ConfigurationPresets + ConfigurationPresets -->|uses| ConfigurationTypes + PatternHelpers ..->|implements| DataAPIOutputShaping + ArchQueriesImpl -->|uses| ProcessStateAPI + ArchQueriesImpl -->|uses| MasterDataset + ArchQueriesImpl ..->|implements| DataAPIArchitectureQueries + FSMTransitions ..->|implements| PhaseStateMachineValidation + FSMStates ..->|implements| PhaseStateMachineValidation + ProcessStateAPI -->|uses| MasterDataset + ProcessStateAPI ..->|implements| PhaseStateMachineValidation + DataAPIArchitectureQueries -.->|depends on| DataAPIOutputShaping + classDef neighbor stroke-dasharray: 5 5 +``` + +--- + +## API Types + +### SectionBlock (type) + +```typescript +type SectionBlock = + | HeadingBlock + | ParagraphBlock + | SeparatorBlock + | TableBlock + | ListBlock + | CodeBlock + | MermaidBlock + | CollapsibleBlock + | LinkOutBlock; +``` + +### normalizeStatus (function) + +````typescript +/** + * Normalize any status string to a display bucket + * + * Maps status values to three canonical display states: + * - "completed": completed + * - "active": active + * - "planned": roadmap, deferred, planned, or any unknown value + * + * Per PDR-005: deferred items are treated as planned (not actively worked on) + * + * @param status - Raw status from pattern (case-insensitive) + * @returns "completed" | "active" | "planned" + * + * @example + * ```typescript + * normalizeStatus("completed") // → "completed" + * normalizeStatus("active") // → "active" + * normalizeStatus("roadmap") // → "planned" + * normalizeStatus("deferred") // → "planned" + * normalizeStatus(undefined) // → "planned" + * ``` + */ +```` + +```typescript +function normalizeStatus(status: string | undefined): NormalizedStatus; +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| status | | Raw status from pattern (case-insensitive) | + +**Returns:** "completed" | "active" | "planned" + +### DELIVERABLE_STATUS_VALUES (const) + +```typescript +/** + * Canonical deliverable status values + * + * These are the ONLY accepted values for the Status column in + * Gherkin Background deliverable tables. Values are lowercased + * at extraction time before schema validation. + * + * - complete: Work is done + * - in-progress: Work is ongoing + * - pending: Work hasn't started + * - deferred: Work postponed + * - superseded: Replaced by another deliverable + * - n/a: Not applicable + * + */ +``` + +```typescript +DELIVERABLE_STATUS_VALUES = [ + 'complete', + 'in-progress', + 'pending', + 'deferred', + 'superseded', + 'n/a', +] as const +``` + +### CategoryDefinition (interface) + +```typescript +interface CategoryDefinition { + /** Category tag name without prefix (e.g., "core", "api", "ddd", "saga") */ + readonly tag: string; + /** Human-readable domain name for display (e.g., "Strategic DDD", "Event Sourcing") */ + readonly domain: string; + /** Display order priority - lower values appear first in sorted output */ + readonly priority: number; + /** Brief description of the category's purpose and typical patterns */ + readonly description: string; + /** Alternative tag names that map to this category (e.g., "es" for "event-sourcing") */ + readonly aliases: readonly string[]; +} +``` + +| Property | Description | +| --- | --- | +| tag | Category tag name without prefix (e.g., "core", "api", "ddd", "saga") | +| domain | Human-readable domain name for display (e.g., "Strategic DDD", "Event Sourcing") | +| priority | Display order priority - lower values appear first in sorted output | +| description | Brief description of the category's purpose and typical patterns | +| aliases | Alternative tag names that map to this category (e.g., "es" for "event-sourcing") | + +--- + +## Behavior Specifications + +### DeliveryProcessFactory + +[View DeliveryProcessFactory source](src/config/factory.ts) + +## Delivery Process Factory + +Main factory function for creating configured delivery process instances. +Supports presets, custom configuration, and configuration overrides. + +### When to Use + +- At application startup to create a configured instance +- When switching between different tag prefixes +- When customizing the taxonomy for a specific project + +### DefineConfig + +[View DefineConfig source](src/config/define-config.ts) + +## Define Config + +Identity function for type-safe project configuration. +Follows the Vite/Vitest `defineConfig()` convention: +returns the input unchanged, providing only TypeScript type checking. + +Validation happens later at load time via Zod schema in `loadProjectConfig()`. + +### When to Use + +In `delivery-process.config.ts` at project root: + +```typescript +import { defineConfig } from '@libar-dev/delivery-process/config'; + +export default defineConfig({ + preset: 'ddd-es-cqrs', + sources: { typescript: ['src/** /*.ts'] }, +}); +``` + +### ADR005CodecBasedMarkdownRendering + +[View ADR005CodecBasedMarkdownRendering source](delivery-process/decisions/adr-005-codec-based-markdown-rendering.feature) + +**Context:** + The documentation generator needs to transform structured pattern data + (MasterDataset) into markdown files. The initial approach used direct + string concatenation in generator functions, mixing data selection, + formatting logic, and output assembly in a single pass. This made + generators hard to test, difficult to compose, and impossible to + render the same data in different formats (e.g., full docs vs compact + AI context). + + **Decision:** + Adopt a codec architecture inspired by serialization codecs (encode/decode). + Each document type has a codec that decodes a MasterDataset into a + RenderableDocument — an intermediate representation of sections, headings, + tables, paragraphs, and code blocks. A separate renderer transforms the + RenderableDocument into markdown. This separates data selection (what to + include) from formatting (how it looks) from serialization (markdown syntax). + + **Consequences:** + | Type | Impact | + | Positive | Codecs are pure functions: dataset in, document out -- trivially testable | + | Positive | RenderableDocument is an inspectable IR -- tests assert on structure, not strings | + | Positive | Composable via CompositeCodec -- reference docs assemble from child codecs | + | Positive | Same dataset can produce different outputs (full doc, compact doc, AI context) | + | Negative | Extra abstraction layer between data and output | + | Negative | RenderableDocument vocabulary must cover all needed output patterns | + + **Benefits:** + | Benefit | Before (String Concat) | After (Codec) | + | Testability | Assert on markdown strings | Assert on typed section blocks | + | Composability | Copy-paste between generators | CompositeCodec assembles children | + | Format variants | Duplicate generator logic | Same codec, different renderer | + | Progressive disclosure | Manual heading management | Heading depth auto-calculated | + +
+Codecs implement a decode-only contract (2 scenarios) + +#### Codecs implement a decode-only contract + +**Invariant:** Every codec is a pure function that accepts a MasterDataset and returns a RenderableDocument. Codecs do not perform side effects, do not write files, and do not access the filesystem. The codec contract is decode-only because the transformation is one-directional: structured data becomes a document, never the reverse. + +**Rationale:** Pure functions are deterministic and trivially testable. For the same MasterDataset, a codec always produces the same RenderableDocument. This makes snapshot testing reliable and enables codec output comparison across versions. + +**Codec call signature:** + +```typescript +interface DocumentCodec { + decode(dataset: MasterDataset): RenderableDocument; + } +``` + +**Verified by:** + +- Codec produces deterministic output +- Codec has no side effects + +
+ +
+RenderableDocument is a typed intermediate representation (2 scenarios) + +#### RenderableDocument is a typed intermediate representation + +**Invariant:** RenderableDocument contains a title, an ordered array of SectionBlock elements, and an optional record of additional files. Each SectionBlock is a discriminated union: heading, paragraph, table, code, list, separator, or metaRow. The renderer consumes this IR without needing to know which codec produced it. + +**Rationale:** A typed IR decouples codecs from rendering. Codecs express intent ("this is a table with these rows") and the renderer handles syntax ("pipe-delimited markdown with separator row"). This means switching output format (e.g., HTML instead of markdown) requires only a new renderer, not changes to every codec. + +**Section block types:** + +| Block Type | Purpose | Markdown Output | +| --- | --- | --- | +| heading | Section title with depth | ## Title (depth-adjusted) | +| paragraph | Prose text | Plain text with blank lines | +| table | Structured data | Pipe-delimited table | +| code | Code sample with language | Fenced code block | +| list | Ordered or unordered items | - item or 1. item | +| separator | Visual break between sections | --- | +| metaRow | Key-value metadata | **Key:** Value | + +**Verified by:** + +- All block types render to markdown +- Unknown block type is rejected + +
+ +
+CompositeCodec assembles documents from child codecs (2 scenarios) + +#### CompositeCodec assembles documents from child codecs + +**Invariant:** CompositeCodec accepts an array of child codecs and produces a single RenderableDocument by concatenating their sections. Child codec order determines section order in the output. Separators are inserted between children by default. + +**Rationale:** Reference documents combine content from multiple domains (patterns, conventions, shapes, diagrams). Rather than building a monolithic codec that knows about all content types, CompositeCodec lets each domain own its codec and composes them declaratively. + +**Composition example:** + +```typescript +const referenceDoc = CompositeCodec.create({ + title: 'Architecture Reference', + codecs: [ + behaviorCodec, // patterns with rules + conventionCodec, // decision records + shapeCodec, // type definitions + diagramCodec, // mermaid diagrams + ], + }); +``` + +**Verified by:** + +- Child sections appear in codec array order +- Empty children are skipped without separators + +
+ +
+ADR content comes from both Feature description and Rule prefixes (3 scenarios) + +#### ADR content comes from both Feature description and Rule prefixes + +**Invariant:** ADR structured content (Context, Decision, Consequences) can appear in two locations within a feature file. Both sources must be rendered. Silently dropping either source causes content loss. + +**Rationale:** Early ADRs used name prefixes like "Context - ..." and "Decision - ..." on Rule blocks to structure content. Later ADRs placed Context, Decision, and Consequences as bold-annotated prose in the Feature description, reserving Rule: blocks for invariants and design rules. Both conventions are valid. The ADR codec must handle both because the codebase contains ADRs authored in each style. The Feature description lives in pattern.directive.description. If the codec only renders Rules (via partitionRulesByPrefix), then Feature description content is silently dropped -- no error, no warning. This caused confusion across two repos where ADR content appeared in the feature file but was missing from generated docs. The fix renders pattern.directive.description in buildSingleAdrDocument between the Overview metadata table and the partitioned Rules section, using renderFeatureDescription() which walks content linearly and handles prose, tables, and DocStrings with correct interleaving. + +| Source | Location | Example | Rendered Via | +| --- | --- | --- | --- | +| Rule prefix | Rule: Context - ... | ADR-001 (taxonomy) | partitionRulesByPrefix() | +| Feature description | **Context:** prose in Feature block | ADR-005 (codec rendering) | renderFeatureDescription() | + +**Verified by:** + +- Feature description content is rendered +- Rule prefix content is rendered +- Both sources combine in single ADR + +
+ +
+The markdown renderer is codec-agnostic (2 scenarios) + +#### The markdown renderer is codec-agnostic + +**Invariant:** The renderer accepts any RenderableDocument regardless of which codec produced it. Rendering depends only on block types, not on document origin. This enables testing codecs and renderers independently. + +**Rationale:** If the renderer knew about specific codecs, adding a new codec would require renderer changes. By operating purely on the SectionBlock discriminated union, the renderer is closed for modification but open for extension via new block types. + +**Verified by:** + +- Same renderer handles different codec outputs +- Renderer and codec are tested independently + +
+ +### ADR001TaxonomyCanonicalValues + +[View ADR001TaxonomyCanonicalValues source](delivery-process/decisions/adr-001-taxonomy-canonical-values.feature) + +**Context:** + The annotation system requires well-defined canonical values for taxonomy + tags, FSM status lifecycle, and source ownership rules. Without canonical + values, organic growth produces drift (Generator vs Generators, Process + vs DeliveryProcess) and inconsistent grouping in generated documentation. + + **Decision:** + Define canonical values for all taxonomy enums, FSM states with protection + levels, valid transitions, tag format types, and source ownership rules. + These are the durable constants of the delivery process. + + **Consequences:** + | Type | Impact | + | Positive | Generated docs group into coherent sections | + | Positive | FSM enforcement has clear, auditable state definitions | + | Positive | Source ownership prevents cross-domain tag confusion | + | Negative | Migration effort for existing specs with non-canonical values | + +
+Product area canonical values + +#### Product area canonical values + +**Invariant:** The product-area tag uses one of 7 canonical values. Each value represents a reader-facing documentation section, not a source module. + +**Rationale:** Without canonical values, organic drift (e.g., Generator vs Generators) produces inconsistent grouping in generated documentation and fragmented product area pages. + +| Value | Reader Question | Covers | +| --- | --- | --- | +| Annotation | How do I annotate code? | Scanning, extraction, tag parsing, dual-source | +| Configuration | How do I configure the tool? | Config loading, presets, resolution | +| Generation | How does code become docs? | Codecs, generators, rendering, diagrams | +| Validation | How is the workflow enforced? | FSM, DoD, anti-patterns, process guard, lint | +| DataAPI | How do I query process state? | Process state API, stubs, context assembly, CLI | +| CoreTypes | What foundational types exist? | Result monad, error factories, string utils | +| Process | How does the session workflow work? | Session lifecycle, handoffs, conventions | + +
+ +
+ADR category canonical values + +#### ADR category canonical values + +**Invariant:** The adr-category tag uses one of 4 values. + +**Rationale:** Unbounded category values prevent meaningful grouping of architecture decisions and make cross-cutting queries unreliable. + +| Value | Purpose | +| --- | --- | +| architecture | System structure, component design, data flow | +| process | Workflow, conventions, annotation rules | +| testing | Test strategy, verification approach | +| documentation | Documentation generation, content structure | + +
+ +
+FSM status values and protection levels + +#### FSM status values and protection levels + +**Invariant:** Pattern status uses exactly 4 values with defined protection levels. These are enforced by Process Guard at commit time. + +**Rationale:** Without protection levels, active specs accumulate scope creep and completed specs get silently modified, undermining delivery process integrity. + +| Status | Protection | Can Add Deliverables | Allowed Actions | +| --- | --- | --- | --- | +| roadmap | None | Yes | Full editing | +| active | Scope-locked | No | Edit existing deliverables only | +| completed | Hard-locked | No | Requires unlock-reason tag | +| deferred | None | Yes | Full editing | + +
+ +
+Valid FSM transitions + +#### Valid FSM transitions + +**Invariant:** Only these transitions are valid. All others are rejected by Process Guard. + +**Rationale:** Allowing arbitrary transitions (e.g., roadmap to completed) bypasses the active phase where scope-lock and deliverable tracking provide quality assurance. Completed is a terminal state. Modifications require `@libar-docs-unlock-reason` escape hatch. + +| From | To | Trigger | +| --- | --- | --- | +| roadmap | active | Start work | +| roadmap | deferred | Postpone | +| active | completed | All deliverables done | +| active | roadmap | Blocked/regressed | +| deferred | roadmap | Resume planning | + +
+ +
+Tag format types + +#### Tag format types + +**Invariant:** Every tag has one of 6 format types that determines how its value is parsed. + +**Rationale:** Without explicit format types, parsers must guess value structure, leading to silent data corruption when CSV values are treated as single strings or numbers are treated as text. + +| Format | Parsing | Example | +| --- | --- | --- | +| flag | Boolean presence, no value | @libar-docs-core | +| value | Simple string | @libar-docs-pattern MyPattern | +| enum | Constrained to predefined list | @libar-docs-status completed | +| csv | Comma-separated values | @libar-docs-uses A, B, C | +| number | Numeric value | @libar-docs-phase 15 | +| quoted-value | Preserves spaces | @libar-docs-brief:'Multi word' | + +
+ +
+Source ownership + +#### Source ownership + +**Invariant:** Relationship tags have defined ownership by source type. Anti-pattern detection enforces these boundaries. + +**Rationale:** Cross-domain tag placement (e.g., runtime dependencies in Gherkin) creates conflicting sources of truth and breaks the dual-source architecture ownership model. + +| Tag | Correct Source | Wrong Source | Rationale | +| --- | --- | --- | --- | +| uses | TypeScript | Feature files | TS owns runtime dependencies | +| depends-on | Feature files | TypeScript | Gherkin owns planning dependencies | +| quarter | Feature files | TypeScript | Gherkin owns timeline metadata | +| team | Feature files | TypeScript | Gherkin owns ownership metadata | + +
+ +
+Quarter format convention + +#### Quarter format convention + +**Invariant:** The quarter tag uses `YYYY-QN` format (e.g., `2026-Q1`). ISO-year-first sorting works lexicographically. + +**Rationale:** Non-standard formats (e.g., Q1-2026) break lexicographic sorting, which roadmap generation and timeline queries depend on for correct ordering. + +
+ +
+Canonical phase definitions (6-phase USDP standard) + +#### Canonical phase definitions (6-phase USDP standard) + +**Invariant:** The default workflow defines exactly 6 phases in fixed order. These are the canonical phase names and ordinals used by all generated documentation. + +**Rationale:** Ad-hoc phase names and ordering produce inconsistent roadmap grouping across packages and make cross-package progress tracking impossible. + +| Order | Phase | Purpose | +| --- | --- | --- | +| 1 | Inception | Problem framing, scope definition | +| 2 | Elaboration | Design decisions, architecture exploration | +| 3 | Session | Planning and design session work | +| 4 | Construction | Implementation, testing, integration | +| 5 | Validation | Verification, acceptance criteria confirmation | +| 6 | Retrospective | Review, lessons learned, documentation | + +
+ +
+Deliverable status canonical values (1 scenarios) + +#### Deliverable status canonical values + +**Invariant:** Deliverable status (distinct from pattern FSM status) uses exactly 6 values, enforced by Zod schema at parse time. + +**Rationale:** Freeform status strings bypass Zod validation and break DoD checks, which rely on terminal status classification to determine pattern completeness. + +| Value | Meaning | +| --- | --- | +| complete | Work is done | +| in-progress | Work is ongoing | +| pending | Work has not started | +| deferred | Work postponed | +| superseded | Replaced by another | +| n/a | Not applicable | + +**Verified by:** + +- Canonical values are enforced + +
+ +### ConfigBasedWorkflowDefinition + +[View ConfigBasedWorkflowDefinition source](delivery-process/specs/config-based-workflow-definition.feature) + +**Problem:** + Every `pnpm process:query` and `pnpm docs:*` invocation prints: + `Failed to load default workflow (6-phase-standard): Workflow file not found` + + The `loadDefaultWorkflow()` function resolves to `catalogue/workflows/` + which does not exist. The directory was deleted during monorepo extraction. + The system already degrades gracefully (workflow = undefined), but the + warning is noise for both human CLI use and future hook consumers (HUD). + + The old `6-phase-standard.json` conflated three concerns: + - Taxonomy vocabulary (status names) — already in `src/taxonomy/` + - FSM behavior (transitions) — already in `src/validation/fsm/` + - Workflow structure (phases) — orphaned, no proper home + + **Solution:** + Inline the default workflow as a constant in `workflow-loader.ts`, built + from canonical taxonomy values. Make `loadDefaultWorkflow()` synchronous. + Preserve `loadWorkflowFromPath()` for custom `--workflow ` overrides. + + The workflow definition uses only the 4 canonical statuses from ADR-001 + (roadmap, active, completed, deferred) — not the stale 5-status set from + the deleted JSON (which included non-canonical `implemented` and `partial`). + + Phase definitions (Inception, Elaboration, Session, Construction, + Validation, Retrospective) move from a missing JSON file to an inline + constant, making the default workflow always available without file I/O. + + Design Decisions (DS-1, 2026-02-15): + + | ID | Decision | Rationale | + | DD-1 | Inline constant in workflow-loader.ts, not preset integration | Minimal correct fix, zero type regression risk. Preset integration deferred. | + | DD-2 | Constant satisfies existing WorkflowConfig type | Reuse createLoadedWorkflow() from workflow-config.ts. No new types needed. | + | DD-3 | Remove dead code: getCatalogueWorkflowsPath, loadWorkflowConfig, DEFAULT_WORKFLOW_NAME | Dead since monorepo extraction. Public API break is safe (function always threw). | + | DD-4 | loadDefaultWorkflow() returns LoadedWorkflow synchronously | Infallible constant needs no async or error handling. | + | DD-5 | Amend ADR-001 with canonical phase definitions | Phase names are canonical values; fits existing governance in ADR-001. | + +
+Default workflow is built from an inline constant (2 scenarios) + +#### Default workflow is built from an inline constant + +**Invariant:** `loadDefaultWorkflow()` returns a `LoadedWorkflow` without file system access. It cannot fail. The default workflow constant uses only canonical status values from `src/taxonomy/status-values.ts`. + +**Rationale:** The file-based loading path (`catalogue/workflows/`) has been dead code since monorepo extraction. Both callers (orchestrator, process-api) already handle the failure gracefully, proving the system works without it. Making the function synchronous and infallible removes the try-catch ceremony and the warning noise. + +| Step | Change | Impact | +| --- | --- | --- | +| Add DEFAULT_WORKFLOW_CONFIG constant | WorkflowConfig literal with 4 statuses, 6 phases | New code in workflow-loader.ts | +| Change loadDefaultWorkflow() to sync | Returns createLoadedWorkflow(DEFAULT_WORKFLOW_CONFIG) | Signature: Promise to sync | +| Remove dead code paths | Delete getCatalogueWorkflowsPath, loadWorkflowConfig, DEFAULT_WORKFLOW_NAME, dead imports | workflow-loader.ts cleanup | +| Remove loadWorkflowConfig from public API | Update src/config/index.ts exports | Breaking change (safe: function always threw) | +| Update orchestrator call site | Remove await and try-catch (lines 410-418) | orchestrator.ts | +| Update process-api call site | Remove await and try-catch (lines 549-555) | process-api.ts | + +**Verified by:** + +- Default workflow loads without warning +- Workflow constant uses canonical statuses only +- Workflow constant uses canonical statuses only + + Implementation approach: + +
+ +
+Custom workflow files still work via --workflow flag (1 scenarios) + +#### Custom workflow files still work via --workflow flag + +**Invariant:** `loadWorkflowFromPath()` remains available for projects that need custom workflow definitions. The `--workflow ` CLI flag and `workflowPath` config field continue to work. + +**Rationale:** The inline default replaces file-based *default* loading, not file-based *custom* loading. Projects may define custom phases or additional statuses via JSON files. + +**Verified by:** + +- Custom workflow file overrides default + +
+ +
+FSM validation and Process Guard are not affected + +#### FSM validation and Process Guard are not affected + +**Invariant:** The FSM transition matrix, protection levels, and Process Guard rules remain hardcoded in `src/validation/fsm/` and `src/lint/process-guard/`. They do not read from `LoadedWorkflow`. + +**Rationale:** FSM and workflow are separate concerns. FSM enforces status transitions (4-state model from PDR-005). Workflow defines phase structure (6-phase USDP). The workflow JSON declared `transitionsTo` on its statuses, but no code ever read those values — the FSM uses its own `VALID_TRANSITIONS` constant. This separation is correct and intentional. Blast radius analysis confirmed zero workflow imports in: - src/validation/fsm/ (4 files) - src/lint/process-guard/ (5 files) - src/taxonomy/ (all files) + +
+ +
+Workflow as a configurable preset field is deferred + +#### Workflow as a configurable preset field is deferred + +**Invariant:** The inline default workflow constant is the only workflow source until preset integration is implemented. No preset or project config field exposes workflow customization. + +**Rationale:** Coupling workflow into the preset/config system before the inline fix ships would widen the blast radius and risk type regressions across all config consumers. Adding `workflow` as a field on `DeliveryProcessConfig` (presets) and `DeliveryProcessProjectConfig` (project config) is a natural next step but NOT required for the MVP fix. The inline constant in `workflow-loader.ts` resolves the warning. Moving workflow into the preset/config system enables: - Different presets with different default phases (e.g., 3-phase generic) - Per-project phase customization in delivery-process.config.ts - Phase definitions appearing in generated documentation See ideation artifact for design options: delivery-process/ideations/2026-02-15-workflow-config-and-fsm-extensibility.feature + +
+ +### ProcessGuardTesting + +[View ProcessGuardTesting source](tests/features/validation/process-guard.feature) + +Pure validation functions for enforcing delivery process rules per PDR-005. + All validation follows the Decider pattern: (state, changes, options) => result. + + **Problem:** + - Completed specs modified without explicit unlock reason + - Invalid status transitions bypass FSM rules + - Active specs expand scope unexpectedly with new deliverables + - Changes occur outside session boundaries + + **Solution:** + - checkProtectionLevel() enforces unlock-reason for completed (hard) files + - checkStatusTransitions() validates transitions against FSM matrix + - checkScopeCreep() prevents deliverable addition to active (scope) specs + - checkSessionScope() warns about files outside session scope + - checkSessionExcluded() errors on explicitly excluded files + +
+Completed files require unlock-reason to modify (4 scenarios) + +#### Completed files require unlock-reason to modify + +**Invariant:** A completed spec file cannot be modified unless it carries an @libar-docs-unlock-reason tag. + +**Rationale:** Completed work represents validated, shipped functionality — accidental modification risks regression. + +**Verified by:** + +- Completed file with unlock-reason passes validation +- Completed file without unlock-reason fails validation +- Protection levels and unlock requirement +- File transitioning to completed does not require unlock-reason + +
+ +
+Status transitions must follow PDR-005 FSM (2 scenarios) + +#### Status transitions must follow PDR-005 FSM + +**Invariant:** Status changes must follow the directed graph: roadmap->active->completed, roadmap<->deferred, active->roadmap. + +**Rationale:** The FSM prevents skipping required stages (e.g., roadmap->completed bypasses implementation). + +**Verified by:** + +- Valid transitions pass validation +- Invalid transitions fail validation + +
+ +
+Active specs cannot add new deliverables (6 scenarios) + +#### Active specs cannot add new deliverables + +**Invariant:** A spec in active status cannot have deliverables added that were not present when it entered active. + +**Rationale:** Scope-locking active work prevents mid-sprint scope creep that derails delivery commitments. + +**Verified by:** + +- Active spec with no deliverable changes passes +- Active spec adding deliverable fails validation +- Roadmap spec can add deliverables freely +- Removing deliverable produces warning +- Deliverable status change does not trigger scope-creep +- Multiple deliverable status changes pass validation + +
+ +
+Files outside active session scope trigger warnings (4 scenarios) + +#### Files outside active session scope trigger warnings + +**Invariant:** Files modified outside the active session's declared scope produce a session-scope warning. + +**Rationale:** Session scoping keeps focus on planned work and makes accidental cross-cutting changes visible. + +**Verified by:** + +- File in session scope passes validation +- File outside session scope triggers warning +- No active session means all files in scope +- ignoreSession flag suppresses session warnings + +
+ +
+Explicitly excluded files trigger errors (3 scenarios) + +#### Explicitly excluded files trigger errors + +**Invariant:** Files explicitly excluded from a session cannot be modified, producing a session-excluded error. + +**Rationale:** Exclusion is stronger than scope — it marks files that must NOT be touched during this session. + +**Verified by:** + +- Excluded file triggers error +- Non-excluded file passes validation +- ignoreSession flag suppresses excluded errors + +
+ +
+Multiple rules validate independently (3 scenarios) + +#### Multiple rules validate independently + +**Invariant:** Each validation rule evaluates independently — a single file can produce violations from multiple rules. + +**Rationale:** Independent evaluation ensures no rule masks another, giving complete diagnostic output. + +**Verified by:** + +- Multiple violations from different rules +- Strict mode promotes warnings to errors +- Clean change produces empty violations + +
+ +--- diff --git a/docs-live/PRODUCT-AREAS.md b/docs-live/PRODUCT-AREAS.md index 0b2aa32b..77254d06 100644 --- a/docs-live/PRODUCT-AREAS.md +++ b/docs-live/PRODUCT-AREAS.md @@ -117,9 +117,9 @@ C4Context System(CodecDrivenReferenceGeneration, "CodecDrivenReferenceGeneration") System(ADR003SourceFirstPatternArchitecture, "ADR003SourceFirstPatternArchitecture") System(ADR001TaxonomyCanonicalValues, "ADR001TaxonomyCanonicalValues") - System(StringUtils, "StringUtils") System(ResultMonad, "ResultMonad") System(ErrorFactories, "ErrorFactories") + System(StringUtils, "StringUtils") System(ExtractionPipelineEnhancementsTesting, "ExtractionPipelineEnhancementsTesting") System(KebabCaseSlugs, "KebabCaseSlugs") System(ErrorHandlingUnification, "ErrorHandlingUnification") @@ -192,9 +192,9 @@ graph LR CodecDrivenReferenceGeneration["CodecDrivenReferenceGeneration"] ADR003SourceFirstPatternArchitecture["ADR003SourceFirstPatternArchitecture"] ADR001TaxonomyCanonicalValues["ADR001TaxonomyCanonicalValues"] - StringUtils["StringUtils"] ResultMonad["ResultMonad"] ErrorFactories["ErrorFactories"] + StringUtils["StringUtils"] ExtractionPipelineEnhancementsTesting["ExtractionPipelineEnhancementsTesting"] KebabCaseSlugs["KebabCaseSlugs"] ErrorHandlingUnification["ErrorHandlingUnification"] diff --git a/docs-live/_claude-md/annotation/annotation-overview.md b/docs-live/_claude-md/annotation/annotation-overview.md index e49b042a..2acd5259 100644 --- a/docs-live/_claude-md/annotation/annotation-overview.md +++ b/docs-live/_claude-md/annotation/annotation-overview.md @@ -1,18 +1,17 @@ -=== ANNOTATION OVERVIEW === - -Purpose: Annotation product area overview -Detail Level: Compact summary +### Annotation Overview **How do I annotate code?** The annotation system is the ingestion boundary — it transforms annotated TypeScript and Gherkin files into `ExtractedPattern[]` objects that feed the entire downstream pipeline. Two parallel scanning paths (TypeScript AST + Gherkin parser) converge through dual-source merging. The system is fully data-driven: the `TagRegistry` defines all tags, formats, and categories — adding a new annotation requires only a registry entry, zero parser changes. -=== KEY INVARIANTS === +#### Key Invariants - Source ownership enforced: `uses`/`used-by`/`category` belong in TypeScript only; `depends-on`/`quarter`/`team`/`phase` belong in Gherkin only. Anti-pattern detector validates at lint time - Data-driven tag dispatch: Both AST parser and Gherkin parser use `TagRegistry.metadataTags` to determine extraction. 6 format types (`value`/`enum`/`csv`/`number`/`flag`/`quoted-value`) cover all tag shapes — zero parser changes for new tags - Pipeline data preservation: Gherkin `Rule:` blocks, deliverables, scenarios, and all metadata flow through scanner → extractor → `ExtractedPattern` → generators without data loss - Dual-source merge with conflict detection: Same pattern name in both TypeScript and Gherkin produces a merge conflict error. Phase mismatches between sources produce validation errors -=== API TYPES === +**Components:** Extractor (GherkinExtractor, DualSourceExtractor, Document Extractor), Scanner (Pattern Scanner, GherkinScanner, GherkinASTParser, TypeScript AST Parser) + +#### API Types | Type | Kind | | -------------------------------- | --------- | @@ -25,248 +24,3 @@ Detail Level: Compact summary | METADATA_TAGS_BY_GROUP | const | | CATEGORIES | const | | CATEGORY_TAGS | const | - -=== BEHAVIOR SPECIFICATIONS === - ---- TypeScriptTaxonomyImplementation --- - ---- ShapeExtraction --- - -| Rule | Description | -| ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | -| extract-shapes tag is defined in registry | **Invariant:** The `extract-shapes` tag must exist with CSV format to list
multiple type names for extraction. | -| Interfaces are extracted from TypeScript AST | **Invariant:** When `@libar-docs-extract-shapes` lists an interface name,
the extractor must find and extract the... | -| Type aliases are extracted from TypeScript AST | **Invariant:** Type aliases (including union types, intersection types,
and mapped types) are extracted when... | -| Enums are extracted from TypeScript AST | **Invariant:** Both string and numeric enums are extracted with their
complete member definitions. | -| Function signatures are extracted (body omitted) | **Invariant:** When a function name is listed in extract-shapes, only the
signature (parameters, return type,... | -| Multiple shapes are extracted in specified order | **Invariant:** When multiple shapes are listed, they appear in the
documentation in the order specified in the... | -| Extracted shapes render as fenced code blocks | **Invariant:** Codecs render extracted shapes as TypeScript fenced code
blocks, grouped under an "API Types" or... | -| Shapes can reference types from imports | **Invariant:** Extracted shapes may reference types from imports. The
extractor does NOT resolve imports - it... | -| Overloaded function signatures are all extracted | **Invariant:** When a function has multiple overload signatures, all
signatures are extracted together as they... | -| Shape rendering supports grouping options | **Invariant:** Codecs can render shapes grouped in a single code block
or as separate code blocks, depending on... | - ---- PatternRelationshipModel --- - -| Rule | Description | -| --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| Code files declare pattern realization via implements tag | **Invariant:** Files with `@libar-docs-implements:PatternName,OtherPattern` are linked
to the specified patterns... | -| Pattern inheritance uses extends relationship tag | **Invariant:** Files with `@libar-docs-extends:BasePattern` declare that they extend
another pattern's... | -| Technical dependencies use directed relationship tags | **Invariant:** `@libar-docs-uses` declares outbound dependencies (what this
pattern depends on).... | -| Roadmap sequencing uses ordering relationship tags | **Invariant:** `@libar-docs-depends-on` declares what must be completed first
(roadmap sequencing).... | -| Cross-tier linking uses traceability tags (PDR-007) | **Invariant:** `@libar-docs-executable-specs` on roadmap specs points to test
locations.... | -| Epic/Phase/Task hierarchy uses parent-child relationships | **Invariant:** `@libar-docs-level` declares the hierarchy tier (epic, phase, task).
`@libar-docs-parent` links to... | -| All relationships appear in generated documentation | **Invariant:** The PATTERNS.md dependency graph renders all relationship types
with distinct visual styles.... | -| Linter detects relationship violations | **Invariant:** The pattern linter validates that all relationship targets exist,
implements files don't have... | - ---- GherkinRulesSupport --- - -| Rule | Description | -| -------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | -| Rules flow through the entire pipeline without data loss | The @cucumber/gherkin parser extracts Rules natively. Our pipeline must
preserve this data through scanner,... | -| Generators can render rules as business documentation | Business stakeholders see rule names and descriptions as "Business Rules"
sections, not Given/When/Then syntax.... | -| Custom content blocks render in acceptance criteria | DataTables and DocStrings in steps should appear in generated documentation,
providing structured data and code... | -| vitest-cucumber executes scenarios inside Rules | Test execution must work for scenarios inside Rule blocks.
Use Rule() function with RuleScenario() instead of... | - ---- DeclarationLevelShapeTagging --- - -| Rule | Description | -| ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| Declarations opt in via libar-docs-shape tag | **Invariant:** Only declarations with the libar-docs-shape tag in their
immediately preceding JSDoc are collected... | -| Reference doc configs select shapes via shapeSelectors | **Invariant:** shapeSelectors provides three selection modes: by
source path + specific names (DD-6 source+names... | -| Discovery uses existing estree parser with JSDoc comment scanning | **Invariant:** The discoverTaggedShapes function uses the existing
typescript-estree parse() and... | - ---- CrossSourceValidation --- - -| Rule | Description | -| ----------------------------------------------- | ----------- | -| Pattern names must be consistent across sources | | -| Circular dependencies are detected | | -| Dependency references must resolve | | - ---- GherkinAstParser --- - -| Rule | Description | -| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| Successful feature file parsing extracts complete metadata | **Invariant:** A valid feature file must produce a ParsedFeature with name, description, language, tags, and all... | -| Invalid Gherkin produces structured errors | **Invariant:** Malformed or incomplete Gherkin input must return a Result.err with the source file path and a... | - ---- FileDiscovery --- - -| Rule | Description | -| ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| Glob patterns match TypeScript source files | **Invariant:** findFilesToScan must return absolute paths for all files matching the configured glob patterns.... | -| Default exclusions filter non-source files | **Invariant:** node_modules, dist, .test.ts, .spec.ts, and .d.ts files must be excluded by default without explicit... | -| Custom configuration extends discovery behavior | **Invariant:** User-provided exclude patterns must be applied in addition to (not replacing) the default exclusions.... | - ---- DocStringMediaType --- - -| Rule | Description | -| ------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------- | -| Parser preserves DocString mediaType during extraction | **Invariant:** The Gherkin parser must retain the mediaType annotation from DocString delimiters through to the... | -| MediaType is used when rendering code blocks | **Invariant:** The rendered code block language must match the DocString mediaType; when mediaType is absent, the... | -| renderDocString handles both string and object formats | **Invariant:** renderDocString accepts both plain string and object DocString formats; when an object has a... | - ---- AstParserRelationshipsEdges --- - -| Rule | Description | -| ------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------- | -| Relationship tags extract uses and usedBy dependencies | **Invariant:** The uses and usedBy relationship arrays are populated from directive tags, not from description... | -| Edge cases and malformed input are handled gracefully | **Invariant:** The parser never crashes on invalid input. Files without directives return empty results. Malformed... | - ---- AstParserMetadata --- - -| Rule | Description | -| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | -| Metadata is correctly extracted from JSDoc comments | **Invariant:** Examples, multi-line descriptions, line numbers, function signatures, and standard JSDoc tags are all... | -| Tags are extracted only from the directive section, not from description or examples | **Invariant:** Only tags appearing in the directive section (before the description) are extracted. Tags mentioned in... | -| When to Use sections are extracted in all supported formats | **Invariant:** When to Use content is extracted from heading format with bullet points, inline bold format, and... | - ---- AstParserExports --- - -| Rule | Description | -| ------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------- | -| Export types are correctly identified from TypeScript declarations | **Invariant:** Every exported TypeScript declaration type (function, type, interface, const, class, enum, abstract... | - ---- ShapeExtractionTypesTesting --- - -| Rule | Description | -| ---------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | -| extract-shapes tag exists in registry with CSV format | | -| Interfaces are extracted from TypeScript AST | | -| Property-level JSDoc is extracted for interface properties | The extractor uses strict adjacency (gap = 1 line) to prevent
interface-level JSDoc from being misattributed to... | -| Type aliases are extracted from TypeScript AST | | -| Enums are extracted from TypeScript AST | | -| Function signatures are extracted with body omitted | | -| Const declarations are extracted from TypeScript AST | | -| Non-exported shapes are extractable | | - ---- ShapeExtractionRenderingTesting --- - -| Rule | Description | -| -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | -| Multiple shapes are extracted in specified order | | -| Extracted shapes render as fenced code blocks | | -| Imported and re-exported shapes are tracked separately | | -| Invalid TypeScript produces error result | | -| Shape rendering supports grouping options | | -| Annotation tags are stripped from extracted JSDoc while preserving standard tags | **Invariant:** Extracted shapes never contain @libar-docs-\* annotation lines in their jsDoc field.... | -| Large source files are rejected to prevent memory exhaustion | | - ---- ExtractionPipelineEnhancementsTesting --- - -| Rule | Description | -| --------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| Function signatures surface full parameter types in ExportInfo | **Invariant:** ExportInfo.signature shows full parameter types and
return type instead of the placeholder... | -| Property-level JSDoc preserves full multi-line content | **Invariant:** Property-level JSDoc preserves full multi-line content
without first-line truncation.... | -| Param returns and throws tags are extracted from function JSDoc | **Invariant:** JSDoc param, returns, and throws tags are extracted
and stored on ExtractedShape for function-kind... | -| Auto-shape discovery extracts all exported types via wildcard | **Invariant:** When extract-shapes tag value is the wildcard character,
all exported declarations are extracted... | - ---- DualSourceExtractorTesting --- - -| Rule | Description | -| ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| Process metadata is extracted from feature tags | **Invariant:** A feature file must have both @pattern and @phase tags to produce valid process metadata; missing... | -| Deliverables are extracted from Background tables | **Invariant:** Deliverables are sourced exclusively from Background tables; features without a Background produce an... | -| Code and feature patterns are combined into dual-source patterns | **Invariant:** A combined pattern is produced only when both a code stub and a feature file exist for the same... | -| Dual-source results are validated for consistency | **Invariant:** Cross-source validation reports errors for metadata mismatches and warnings for orphaned patterns that... | -| Include tags are extracted from Gherkin feature tags | **Invariant:** Include tags are parsed as comma-separated values; absence of the tag means the pattern has no... | - ---- DeclarationLevelShapeTaggingTesting --- - -| Rule | Description | -| ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| Declarations opt in via libar-docs-shape tag | **Invariant:** Only declarations with the libar-docs-shape tag in their
immediately preceding JSDoc are collected... | -| Discovery uses existing estree parser with JSDoc comment scanning | **Invariant:** The discoverTaggedShapes function uses the existing
typescript-estree parse() and... | - ---- ScannerCore --- - -| Rule | Description | -| ------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------- | -| scanPatterns extracts directives from TypeScript files | **Invariant:** Every file with a valid opt-in marker and JSDoc directives produces a complete ScannedFile with tags,... | -| scanPatterns collects errors without aborting | **Invariant:** A parse failure in one file never prevents other files from being scanned; the result is always Ok... | -| Pattern matching and exclusion filtering | **Invariant:** Glob patterns control file discovery and exclusion patterns remove matched files before scanning.... | -| File opt-in requirement gates scanning | **Invariant:** Only files containing a standalone @libar-docs marker (not @libar-docs-\*) are eligible for directive... | - ---- PatternTagExtraction --- - -| Rule | Description | -| --------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| Single value tags produce scalar metadata fields | **Invariant:** Each single-value tag (pattern, phase, status, brief) maps to exactly one metadata field with the... | -| Array value tags accumulate into list metadata fields | **Invariant:** Tags for depends-on and enables split comma-separated values and accumulate across multiple tag... | -| Category tags are colon-free tags filtered against known non-categories | **Invariant:** Tags without colons become categories, except known non-category tags (acceptance-criteria,... | -| Complex tag lists produce fully populated metadata | **Invariant:** All tag types (scalar, array, category) are correctly extracted from a single mixed tag list.... | -| Edge cases produce safe defaults | **Invariant:** Empty or invalid inputs produce empty metadata or omit invalid fields rather than throwing errors.... | -| Convention tags support CSV values with whitespace trimming | **Invariant:** Convention tags split comma-separated values and trim whitespace from each value.
\*\*Verified... | -| Registry-driven extraction handles enums, transforms, and value constraints | **Invariant:** Tags defined in the registry use data-driven extraction with enum validation, CSV accumulation, value... | - ---- LayerInferenceTesting --- - -| Rule | Description | -| ------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------- | -| Timeline layer is detected from /timeline/ directory segments | **Invariant:** Any feature file path containing a /timeline/ directory segment is classified as timeline layer.... | -| Domain layer is detected from business context directory segments | **Invariant:** Feature files in /deciders/, /orders/, or /inventory/ directories are classified as domain layer.... | -| Integration layer is detected and takes priority over domain directories | **Invariant:** Paths containing /integration-features/ or /integration/ are classified as integration, even when they... | -| E2E layer is detected from /e2e/ directory segments | **Invariant:** Any feature file path containing an /e2e/ directory segment is classified as e2e layer.
\*\*Verified... | -| Component layer is detected from tool-specific directory segments | **Invariant:** Feature files in /scanner/ or /lint/ directories are classified as component layer.
\*\*Verified... | -| Unknown layer is the fallback for unclassified paths | **Invariant:** Any feature file path that does not match a known layer pattern is classified as unknown.... | -| Path normalization handles cross-platform and case differences | **Invariant:** Layer inference produces correct results regardless of path separators, case, or absolute vs relative... | -| FEATURE_LAYERS constant provides validated layer enumeration | **Invariant:** FEATURE_LAYERS is a readonly array containing exactly all 6 valid layer values.
**Verified by:**... | - ---- DirectiveDetection --- - -| Rule | Description | -| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| hasDocDirectives detects @libar-docs-\* section directives | **Invariant:** hasDocDirectives must return true if and only if the source contains at least one @libar-docs-{suffix}... | -| hasFileOptIn detects file-level @libar-docs marker | **Invariant:** hasFileOptIn must return true if and only if the source contains a bare @libar-docs tag (not followed... | - ---- ContextInference --- - -| Rule | Description | -| -------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -| matchPattern supports recursive wildcard \*\* | **Invariant:** The `**` wildcard matches files at any nesting depth below the specified directory prefix.... | -| matchPattern supports single-level wildcard /\* | **Invariant:** The `/*` wildcard matches only direct children of the specified directory, not deeper nested files.... | -| matchPattern supports prefix matching | **Invariant:** A trailing slash pattern matches any file whose path starts with that directory prefix.
\*\*Verified... | -| inferContext returns undefined when no rules match | **Invariant:** When no inference rule matches a file path, the pattern receives no inferred context and is excluded... | -| inferContext applies first matching rule | **Invariant:** When multiple rules could match a file path, only the first matching rule determines the inferred... | -| Explicit archContext is not overridden | **Invariant:** A pattern with an explicitly annotated archContext retains that value regardless of matching inference... | -| Inference works independently of archLayer | **Invariant:** Context inference operates on file path alone; the presence or absence of archLayer does not affect... | -| Default rules map standard directories | **Invariant:** Each standard source directory (validation, scanner, extractor, etc.) maps to a well-known bounded... | - ---- UsesTagTesting --- - -| Rule | Description | -| --------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| Uses tag is defined in taxonomy registry | **Invariant:** The uses and used-by tags must be registered in the taxonomy with CSV format and dependency-related... | -| Uses tag is extracted from TypeScript files | **Invariant:** The AST parser must extract single and comma-separated uses values from TypeScript JSDoc annotations.... | -| Used-by tag is extracted from TypeScript files | **Invariant:** The AST parser must extract single and comma-separated used-by values from TypeScript JSDoc... | -| Uses relationships are stored in relationship index | **Invariant:** All declared uses and usedBy relationships must be stored in the relationship index as explicitly... | -| Schemas validate uses field correctly | **Invariant:** DocDirective and RelationshipEntry schemas must accept uses and usedBy fields as valid CSV string... | - ---- ImplementsTagProcessing --- - -| Rule | Description | -| ------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------- | -| Implements tag is defined in taxonomy registry | **Invariant:** The implements tag must exist in the taxonomy registry with CSV format.
**Verified by:**... | -| Files can implement a single pattern | **Invariant:** The AST parser must extract a single implements value and preserve it through the extraction... | -| Files can implement multiple patterns using CSV format | **Invariant:** The AST parser must split CSV implements values into individual pattern references with whitespace... | -| Transform builds implementedBy reverse lookup | **Invariant:** The transform must compute an implementedBy reverse index so spec patterns know which files implement... | -| Schemas validate implements field correctly | **Invariant:** The Zod schemas must accept implements and implementedBy fields with correct array-of-string types.... | - ---- ExtendsTagTesting --- - -| Rule | Description | -| -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| Extends tag is defined in taxonomy registry | **Invariant:** The extends tag must exist in the taxonomy registry with single-value format.
**Verified by:**... | -| Patterns can extend exactly one base pattern | **Invariant:** A pattern may extend at most one base pattern, enforced by single-value tag format.
**Rationale:**... | -| Transform builds extendedBy reverse lookup | **Invariant:** The transform must compute an extendedBy reverse index so base patterns know which patterns extend... | -| Linter detects circular inheritance chains | **Invariant:** Circular inheritance chains (direct or transitive) must be detected and reported as errors.... | - ---- DependsOnTagTesting --- - -| Rule | Description | -| ------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------- | -| Depends-on tag is defined in taxonomy registry | **Invariant:** The depends-on and enables tags must exist in the taxonomy registry with CSV format.
\*\*Verified... | -| Depends-on tag is extracted from Gherkin files | **Invariant:** The Gherkin parser must extract depends-on values from feature file tags, including CSV multi-value... | -| Depends-on in TypeScript triggers anti-pattern warning | **Invariant:** The depends-on tag must only appear in Gherkin files; its presence in TypeScript is an anti-pattern.... | -| Enables tag is extracted from Gherkin files | **Invariant:** The Gherkin parser must extract enables values from feature file tags, including CSV multi-value... | -| Planning dependencies are stored in relationship index | **Invariant:** The relationship index must store dependsOn and enables relationships extracted from pattern... | diff --git a/docs-live/_claude-md/configuration/configuration-overview.md b/docs-live/_claude-md/configuration/configuration-overview.md index e6191f22..3c573a63 100644 --- a/docs-live/_claude-md/configuration/configuration-overview.md +++ b/docs-live/_claude-md/configuration/configuration-overview.md @@ -1,18 +1,17 @@ -=== CONFIGURATION OVERVIEW === - -Purpose: Configuration product area overview -Detail Level: Compact summary +### Configuration Overview **How do I configure the tool?** Configuration is the entry boundary — it transforms a user-authored `delivery-process.config.ts` file into a fully resolved `DeliveryProcessInstance` that powers the entire pipeline. The flow is: `defineConfig()` provides type-safe authoring (Vite convention, zero validation), `ConfigLoader` discovers and loads the file, `ProjectConfigSchema` validates via Zod, `ConfigResolver` applies defaults and merges stubs into sources, and `DeliveryProcessFactory` builds the final instance with `TagRegistry` and `RegexBuilders`. Three presets define escalating taxonomy complexity — from 3 categories (`generic`, `libar-generic`) to 21 (`ddd-es-cqrs`). `SourceMerger` computes per-generator source overrides, enabling generators like changelog to pull from different feature sets than the base config. -=== KEY INVARIANTS === +#### Key Invariants - Preset-based taxonomy: `generic` (3 categories, `@docs-`), `libar-generic` (3 categories, `@libar-docs-`), `ddd-es-cqrs` (21 categories, full DDD). Presets replace base categories entirely — they define prefix, categories, and metadata tags as a unit - Resolution pipeline: defineConfig() → ConfigLoader → ProjectConfigSchema (Zod) → ConfigResolver → DeliveryProcessFactory → DeliveryProcessInstance. Each stage has a single responsibility - Stubs merged at resolution time: Stub directory globs are appended to typescript sources, making stubs transparent to the downstream pipeline - Source override composition: SourceMerger applies per-generator overrides (`replaceFeatures`, `additionalFeatures`, `additionalInput`) to base sources. Exclude is always inherited from base -=== API TYPES === +**Components:** Config (WorkflowLoader, ConfigurationTypes, ConfigResolver, RegexBuilders, ProjectConfigTypes, ProjectConfigSchema, ConfigurationPresets, SourceMerger, DeliveryProcessFactory, DefineConfig, ConfigurationDefaults, ConfigLoader) + +#### API Types | Type | Kind | | ---------------------------- | --------- | @@ -36,83 +35,3 @@ Detail Level: Compact summary | findConfigFile | function | | loadConfig | function | | formatConfigError | function | - -=== BEHAVIOR SPECIFICATIONS === - ---- DEFAULT_WORKFLOW_CONFIG — Inline Default Workflow Constant --- - ---- ConfigBasedWorkflowDefinition --- - -| Rule | Description | -| ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| Default workflow is built from an inline constant | **Invariant:** `loadDefaultWorkflow()` returns a `LoadedWorkflow` without
file system access. It cannot fail. The... | -| Custom workflow files still work via --workflow flag | **Invariant:** `loadWorkflowFromPath()` remains available for projects
that need custom workflow definitions. The... | -| FSM validation and Process Guard are not affected | **Invariant:** The FSM transition matrix, protection levels, and Process
Guard rules remain hardcoded in... | -| Workflow as a configurable preset field is deferred | Adding `workflow` as a field on `DeliveryProcessConfig` (presets) and
`DeliveryProcessProjectConfig` (project... | - ---- SourceMerging --- - -| Rule | Description | -| --------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | -| No override returns base unchanged | **Invariant:** When no source overrides are provided, the merged result must be identical to the base source... | -| Feature overrides control feature source selection | **Invariant:** additionalFeatures must append to base feature sources while replaceFeatures must completely replace... | -| TypeScript source overrides append additional input | **Invariant:** additionalInput must append to (not replace) the base TypeScript source paths.
**Rationale:**... | -| Combined overrides apply together | **Invariant:** Feature overrides and TypeScript overrides must compose independently when both are provided... | -| Exclude is always inherited from base | **Invariant:** The exclude patterns must always come from the base configuration, never from overrides.... | - ---- ProjectConfigLoader --- - -| Rule | Description | -| --------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| Missing config returns defaults | **Invariant:** When no config file exists, loadProjectConfig must return a default resolved config with... | -| New-style config is loaded and resolved | **Invariant:** A file exporting defineConfig must be loaded, validated, and resolved with correct preset categories.... | -| Legacy config is loaded with backward compatibility | **Invariant:** A file exporting createDeliveryProcess must be loaded and produce a valid resolved config.... | -| Invalid configs produce clear errors | **Invariant:** Config files without a default export or with invalid data must produce descriptive error messages.... | - ---- PresetSystem --- - -| Rule | Description | -| ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| Generic preset provides minimal taxonomy | **Invariant:** The generic preset must provide exactly 3 categories (core, api, infra) with @docs- prefix.... | -| Libar generic preset provides minimal taxonomy with libar prefix | **Invariant:** The libar-generic preset must provide exactly 3 categories with @libar-docs- prefix.... | -| DDD-ES-CQRS preset provides full taxonomy | **Invariant:** The DDD preset must provide all 21 categories spanning DDD, ES, CQRS, and infrastructure domains.... | -| Presets can be accessed by name | **Invariant:** All preset instances must be accessible via the PRESETS map using their canonical string key.... | - ---- DefineConfigTesting --- - -| Rule | Description | -| --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| defineConfig is an identity function | **Invariant:** The defineConfig helper must return its input unchanged, serving only as a type annotation aid for IDE... | -| Schema validates correct configurations | **Invariant:** Valid configuration objects (both minimal and fully-specified) must pass schema validation without... | -| Schema rejects invalid configurations | **Invariant:** The configuration schema must reject invalid values including empty globs, directory traversal... | -| Type guards distinguish config formats | **Invariant:** The isProjectConfig and isLegacyInstance type guards must correctly distinguish between new-style... | - ---- ConfigurationAPI --- - -| Rule | Description | -| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| Factory creates configured instances with correct defaults | **Invariant:** The configuration factory must produce a fully initialized instance for any supported preset, with the... | -| Custom prefix configuration works correctly | **Invariant:** Custom tag prefix and file opt-in tag overrides must be applied to the configuration instance,... | -| Preset categories replace base categories entirely | **Invariant:** When a preset defines its own category set, it must fully replace (not merge with) the base... | -| Regex builders use configured prefix | **Invariant:** All regex builders (hasFileOptIn, hasDocDirectives, normalizeTag) must use the configured tag prefix,... | - ---- ConfigResolution --- - -| Rule | Description | -| ------------------------------------------ | -------------------------------------------------------------------------------------------------------------------- | -| Default config provides sensible fallbacks | **Invariant:** A config created without user input must have isDefault=true and empty source collections.... | -| Preset creates correct taxonomy instance | **Invariant:** Each preset must produce a taxonomy with the correct number of categories and tag prefix.... | -| Stubs are merged into typescript sources | **Invariant:** Stub glob patterns must appear in resolved typescript sources alongside original globs.... | -| Output defaults are applied | **Invariant:** Missing output configuration must resolve to "docs/architecture" with overwrite=false.... | -| Generator defaults are applied | **Invariant:** A config with no generators specified must default to the "patterns" generator.
**Rationale:**... | -| Context inference rules are prepended | **Invariant:** User-defined inference rules must appear before built-in defaults in the resolved array.... | -| Config path is carried from options | **Invariant:** The configPath from resolution options must be preserved unchanged in resolved config.... | - ---- ConfigLoaderTesting --- - -| Rule | Description | -| ----------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| Config files are discovered by walking up directories | **Invariant:** The config loader must search for configuration files starting from the current directory and walking... | -| Config discovery stops at repo root | **Invariant:** Directory traversal must stop at repository root markers (e.g., .git directory) and not search beyond... | -| Config is loaded and validated | **Invariant:** Loaded config files must have a valid default export matching the expected configuration schema, with... | -| Config errors are formatted for display | **Invariant:** Configuration loading errors must be formatted as human-readable messages including the file path and... | diff --git a/docs-live/_claude-md/core-types/core-types-overview.md b/docs-live/_claude-md/core-types/core-types-overview.md index a17a41f5..8d1ccd04 100644 --- a/docs-live/_claude-md/core-types/core-types-overview.md +++ b/docs-live/_claude-md/core-types/core-types-overview.md @@ -1,74 +1,20 @@ -=== CORETYPES OVERVIEW === - -Purpose: CoreTypes product area overview -Detail Level: Compact summary +### CoreTypes Overview **What foundational types exist?** CoreTypes provides the foundational type system used across all other areas. Three pillars enforce discipline at compile time: the Result monad replaces try/catch with explicit error handling — functions return `Result.ok(value)` or `Result.err(error)` instead of throwing. The DocError discriminated union provides structured error context with type, file, line, and reason fields, enabling exhaustive pattern matching in error handlers. Branded types create nominal typing from structural TypeScript — `PatternId`, `CategoryName`, and `SourceFilePath` are compile-time distinct despite all being strings. String utilities handle slugification and case conversion with acronym-aware title casing. -=== KEY INVARIANTS === +#### Key Invariants - Result over try/catch: All functions return `Result` instead of throwing. Compile-time verification that errors are handled. `isOk`/`isErr` type guards enable safe narrowing - DocError discriminated union: 12 structured error types with `type` discriminator field. `isDocError` type guard for safe classification. Specialized union aliases (`ScanError`, `ExtractionError`) scope error handling per operation - Branded nominal types: `Branded` creates compile-time distinct types from structural TypeScript. Prevents mixing `PatternId` with `CategoryName` even though both are `string` at runtime - String transformation consistency: `slugify` produces URL-safe identifiers, `camelCaseToTitleCase` preserves acronyms (e.g., "APIEndpoint" becomes "API Endpoint"), `toKebabCase` handles consecutive uppercase correctly -=== API TYPES === +**Components:** Other (ResultMonad, ErrorFactories, StringUtils, KebabCaseSlugs, ErrorHandlingUnification) + +#### API Types | Type | Kind | | ------------ | --------- | | BaseDocError | interface | | Result | type | | DocError | type | - -=== BEHAVIOR SPECIFICATIONS === - ---- ResultMonadTypes --- - ---- ErrorFactoryTypes --- - ---- StringUtils --- - -| Rule | Description | -| ---------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| slugify generates URL-safe slugs | **Invariant:** slugify must produce lowercase, alphanumeric, hyphen-only strings with no leading/trailing hyphens.... | -| camelCaseToTitleCase generates readable titles | **Invariant:** camelCaseToTitleCase must insert spaces at camelCase boundaries and preserve known acronyms (HTTP,... | - ---- ResultMonad --- - -| Rule | Description | -| ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| Result.ok wraps values into success results | **Invariant:** Result.ok always produces a result where isOk is true, regardless of the wrapped value type... | -| Result.err wraps values into error results | **Invariant:** Result.err always produces a result where isErr is true, supporting Error instances, strings, and... | -| Type guards distinguish success from error results | **Invariant:** isOk and isErr are mutually exclusive: exactly one returns true for any Result value.
\*\*Verified... | -| unwrap extracts the value or throws the error | **Invariant:** unwrap on a success result returns the value; unwrap on an error result always throws an Error... | -| unwrapOr extracts the value or returns a default | **Invariant:** unwrapOr on a success result returns the contained value (ignoring the default); on an error result it... | -| map transforms the success value without affecting errors | **Invariant:** map applies the transformation function only to success results; error results pass through unchanged.... | -| mapErr transforms the error value without affecting successes | **Invariant:** mapErr applies the transformation function only to error results; success results pass through... | - ---- ErrorFactories --- - -| Rule | Description | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| createFileSystemError produces discriminated FILE_SYSTEM_ERROR types | **Invariant:** Every FileSystemError must have type "FILE_SYSTEM_ERROR", the source file path, a reason enum value,... | -| createDirectiveValidationError formats file location with line number | **Invariant:** Every DirectiveValidationError must include the source file path, line number, and reason, with the... | -| createPatternValidationError captures pattern identity and validation details | **Invariant:** Every PatternValidationError must include the pattern name, source file path, and reason, with an... | -| createProcessMetadataValidationError validates Gherkin process metadata | **Invariant:** Every ProcessMetadataValidationError must include the feature file path and a reason describing which... | -| createDeliverableValidationError tracks deliverable-specific failures | **Invariant:** Every DeliverableValidationError must include the feature file path and reason, with optional... | - ---- KebabCaseSlugs --- - -| Rule | Description | -| ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | -| CamelCase names convert to kebab-case | **Invariant:** CamelCase pattern names must be split at word boundaries and joined with hyphens in lowercase.... | -| Edge cases are handled correctly | **Invariant:** Slug generation must handle special characters, consecutive separators, and leading/trailing hyphens... | -| Requirements include phase prefix | **Invariant:** Requirement slugs must be prefixed with "phase-NN-" where NN is the zero-padded phase number,... | -| Phase slugs use kebab-case for names | **Invariant:** Phase slugs must combine a zero-padded phase number with the kebab-case name in the format... | - ---- ErrorHandlingUnification --- - -| Rule | Description | -| -------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| isDocError type guard classifies errors correctly | **Invariant:** isDocError must return true for valid DocError instances and false for non-DocError values including... | -| formatDocError produces structured human-readable output | **Invariant:** formatDocError must include all context fields (error type, file path, line number) and render... | -| Gherkin extractor collects errors without console side effects | **Invariant:** Extraction errors must include structured context (file path, pattern name, validation errors) and... | -| CLI error handler formats unknown errors gracefully | **Invariant:** Unknown error values (non-DocError, non-Error) must be formatted as "Error: {value}" strings for safe... | diff --git a/docs-live/_claude-md/data-api/data-api-overview.md b/docs-live/_claude-md/data-api/data-api-overview.md index cb5c53ff..31aaaf67 100644 --- a/docs-live/_claude-md/data-api/data-api-overview.md +++ b/docs-live/_claude-md/data-api/data-api-overview.md @@ -1,17 +1,14 @@ -=== DATAAPI OVERVIEW === - -Purpose: DataAPI product area overview -Detail Level: Compact summary +### DataAPI Overview **How do I query process state?** The Data API provides direct terminal access to delivery process state. It replaces reading generated markdown or launching explore agents — targeted queries use 5-10x less context. The `context` command assembles curated bundles tailored to session type (planning, design, implement). -=== KEY INVARIANTS === +#### Key Invariants - One-command context assembly: `context --session ` returns metadata + file paths + dependency status + architecture position in ~1.5KB - Session type tailoring: `planning` (~500B, brief + deps), `design` (~1.5KB, spec + stubs + deps), `implement` (deliverables + FSM + tests) - Direct API queries replace doc reading: JSON output is 5-10x smaller than generated docs -=== API TYPES === +#### API Types | Type | Kind | | ----------------------- | ----- | @@ -22,306 +19,3 @@ Detail Level: Compact summary | SourceViewsSchema | const | | RelationshipEntrySchema | const | | ArchIndexSchema | const | - -=== BEHAVIOR SPECIFICATIONS === - ---- RulesQueryModule --- - ---- PipelineFactory --- - ---- ProcessStateAPIRelationshipQueries --- - -| Rule | Description | -| ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------- | -| API provides implementation relationship queries | **Invariant:** Every pattern with `implementedBy` entries is discoverable via the API.

**Rationale:** Claude... | -| API provides inheritance hierarchy queries | **Invariant:** Pattern inheritance chains are fully navigable in both directions.

**Rationale:** Patterns form... | -| API provides combined relationship views | **Invariant:** All relationship types are accessible through a unified interface.

**Rationale:** Claude Code... | -| API supports bidirectional traceability queries | **Invariant:** Navigation from spec to code and code to spec is symmetric.

**Rationale:** Traceability is... | - ---- ProcessStateAPICLI --- - -| Rule | Description | -| ----------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | -| CLI supports status-based pattern queries | **Invariant:** Every ProcessStateAPI status query method is accessible via CLI.

**Rationale:** The most common... | -| CLI supports phase-based queries | **Invariant:** Patterns can be filtered by phase number.

**Rationale:** Phase 18 (Event Durability) is the... | -| CLI provides progress summary queries | **Invariant:** Overall and per-phase progress is queryable in a single command.

**Rationale:** Planning sessions... | -| CLI supports multiple output formats | **Invariant:** JSON output is parseable by AI agents without transformation.

**Rationale:** Claude Code can... | -| CLI supports individual pattern lookup | **Invariant:** Any pattern can be queried by name with full details.

**Rationale:** During implementation,... | -| CLI provides discoverable help | **Invariant:** All flags are documented via --help with examples.

**Rationale:** Claude Code can read --help... | - ---- ProcessAPILayeredExtraction --- - -| Rule | Description | -| ----------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| CLI file contains only routing, no domain logic | **Invariant:** `process-api.ts` parses arguments, calls the pipeline
factory for the MasterDataset, routes... | -| Pipeline factory is shared across CLI consumers | **Invariant:** The scan-extract-transform sequence is defined once in... | -| Domain logic lives in API modules | **Invariant:** Query logic that operates on MasterDataset lives in
`src/api/` modules. The `rules-query.ts`... | -| Pipeline factory returns Result for consumer-owned error handling | **Invariant:** The factory returns `Result`
rather than throwing or calling... | -| End-to-end verification confirms behavioral equivalence | **Invariant:** After extraction, all CLI commands produce identical output
to pre-refactor behavior with zero... | - ---- DataAPIStubIntegration --- - -| Rule | Description | -| -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| All stubs are visible to the scanner pipeline | **Invariant:** Every stub file in `delivery-process/stubs/` has `@libar-docs`
opt-in and `@libar-docs-implements`... | -| Stubs subcommand lists design stubs with implementation status | **Invariant:** `stubs` returns stub files with their target paths, design
session origins, and whether the target... | -| Decisions and PDR commands surface design rationale | **Invariant:** Design decisions (AD-N items) and PDR references from stub
annotations are queryable by pattern... | - ---- DataAPIDesignSessionSupport --- - -| Rule | Description | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| Scope-validate checks implementation prerequisites before session start | **Invariant:** Scope validation surfaces all blocking conditions before
committing to a session, preventing... | -| Handoff generates compact session state summary for multi-session work | **Invariant:** Handoff documentation captures everything the next session
needs to continue work without context... | - ---- DataAPIRelationshipGraph --- - -| Rule | Description | -| ------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| Graph command traverses relationships recursively with configurable depth | **Invariant:** Graph traversal walks both planning relationships (`dependsOn`,
`enables`) and implementation... | -| Impact analysis shows transitive dependents of a pattern | **Invariant:** Impact analysis answers "if I change X, what else is affected?"
by walking `usedBy` + `enables`... | -| Path finding discovers relationship chains between two patterns | **Invariant:** Path finding returns the shortest chain of relationships
connecting two patterns, or indicates no... | -| Graph health commands detect broken references and isolated patterns | **Invariant:** Dangling references (pattern names in `uses`/`dependsOn` that
don't match any pattern definition)... | - ---- DataAPIPlatformIntegration --- - -| Rule | Description | -| ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| ProcessStateAPI is accessible as an MCP server for Claude Code | **Invariant:** The MCP server exposes all ProcessStateAPI methods as MCP tools
with typed input/output schemas.... | -| Process state can be auto-generated as CLAUDE.md context sections | **Invariant:** Generated CLAUDE.md sections are additive layers that provide
pattern metadata, relationships, and... | -| Cross-package views show dependencies spanning multiple packages | **Invariant:** Cross-package queries aggregate patterns from multiple
input sources and resolve cross-package... | -| Process validation integrates with git hooks and file watching | **Invariant:** Pre-commit hooks validate annotation consistency. Watch mode
re-generates docs on source... | - ---- DataAPIOutputShaping --- - -| Rule | Description | -| ---------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| List queries return compact pattern summaries by default | **Invariant:** List-returning API methods produce summaries, not full ExtractedPattern
objects, unless `--full`... | -| Global output modifier flags apply to any list-returning command | **Invariant:** Output modifiers are composable and apply uniformly across all
list-returning subcommands and... | -| Output format is configurable with typed response envelope | **Invariant:** All CLI output uses the QueryResult envelope for success/error
discrimination. The compact format... | -| List subcommand provides composable filters and fuzzy search | **Invariant:** The `list` subcommand replaces the need to call specific
`getPatternsByX` methods. Filters are... | -| CLI provides ergonomic defaults and helpful error messages | **Invariant:** Common operations require minimal flags. Pattern name typos
produce actionable suggestions. Empty... | - ---- DataAPIContextAssembly --- - -| Rule | Description | -| -------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| Context command assembles curated context for a single pattern | **Invariant:** Given a pattern name, `context` returns everything needed to
start working on that pattern:... | -| Files command returns only file paths organized by relevance | **Invariant:** `files` returns the most token-efficient output possible --
just file paths that Claude Code can... | -| Dep-tree command shows recursive dependency chain with status | **Invariant:** The dependency tree walks both `dependsOn`/`enables` (planning)
and `uses`/`usedBy`... | -| Context command supports multiple patterns with merged output | **Invariant:** Multi-pattern context deduplicates shared dependencies and
highlights overlap between patterns.... | -| Overview provides executive project summary | **Invariant:** `overview` returns project-wide health in one command.

**Rationale:** Planning sessions start... | - ---- DataAPICLIErgonomics --- - -| Rule | Description | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| MasterDataset is cached between invocations with file-change invalidation | **Invariant:** Cache is automatically invalidated when any source file
(TypeScript or Gherkin) has a modification... | -| REPL mode keeps pipeline loaded for interactive multi-query sessions | **Invariant:** REPL mode loads the pipeline once and accepts multiple queries
on stdin, with optional tab... | -| Per-subcommand help and diagnostic modes aid discoverability | **Invariant:** Every subcommand supports `--help` with usage, flags, and
examples. Dry-run shows pipeline scope... | - ---- DataAPIArchitectureQueries --- - -| Rule | Description | -| -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| Arch subcommand provides neighborhood and comparison views | **Invariant:** Architecture queries resolve pattern names to concrete
relationships and file paths, not just... | -| Coverage analysis reports annotation completeness with gaps | **Invariant:** Coverage reports identify unannotated files that should have
the libar-docs opt-in marker based on... | -| Tags and sources commands provide taxonomy and inventory views | **Invariant:** All tag values in use are discoverable without reading
configuration files. Source file inventory... | - ---- PDR001SessionWorkflowCommands --- - -| Rule | Description | -| ---------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | -| DD-1 - Text output with section markers | Both scope-validate and handoff return string from the router, using
=== SECTION === markers. Follows the dual... | -| DD-2 - Git integration is opt-in via --git flag | The handoff command accepts an optional --git flag. The CLI handler
calls git diff and passes file list to the... | -| DD-3 - Session type inferred from FSM status | Handoff infers session type from pattern's current FSM status.
An explicit --session flag overrides inference.... | -| DD-4 - Severity levels match Process Guard model | Scope validation uses three severity levels:

\| Severity \| Meaning \|
\| PASS \| Check passed \|
\| BLOCKED \|... | -| DD-5 - Current date only for handoff | Handoff always uses the current date. No --date flag. | -| DD-6 - Both positional and flag forms for scope type | scope-validate accepts scope type as both positional argument
and --type flag. | -| DD-7 - Co-located formatter functions | Each module (scope-validator.ts, handoff-generator.ts) exports
both the data builder and the text formatter.... | - ---- ValidatePatternsCli --- - -| Rule | Description | -| ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | -| CLI displays help and version information | **Invariant:** The --help/-h and --version/-v flags must produce usage/version output and exit successfully without... | -| CLI requires input and feature patterns | **Invariant:** The validate-patterns CLI must fail with clear errors when either --input or --features flags are... | -| CLI validates patterns across TypeScript and Gherkin sources | **Invariant:** The validator must detect mismatches between TypeScript and Gherkin sources including phase and status... | -| CLI supports multiple output formats | **Invariant:** The CLI must support JSON and pretty (human-readable) output formats, with pretty as the default.... | -| Strict mode treats warnings as errors | **Invariant:** When --strict is enabled, warnings must be promoted to errors causing a non-zero exit code (exit 2);... | -| CLI warns about unknown flags | **Invariant:** Unrecognized CLI flags must produce a warning message but allow execution to continue.... | - ---- ProcessApiCliSubcommands --- - -| Rule | Description | -| -------------------------------------------------------------- | ----------- | -| CLI list subcommand filters patterns | | -| CLI search subcommand finds patterns by fuzzy match | | -| CLI context assembly subcommands return text output | | -| CLI tags and sources subcommands return JSON | | -| CLI extended arch subcommands query architecture relationships | | -| CLI unannotated subcommand finds files without annotations | | - ---- ProcessApiCliModifiersAndRules --- - -| Rule | Description | -| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| Output modifiers work when placed after the subcommand | **Invariant:** Output modifiers (--count, --names-only, --fields) produce identical results regardless of position... | -| CLI arch health subcommands detect graph quality issues | **Invariant:** Health subcommands (dangling, orphans, blocking) operate on the relationship index, not the... | -| CLI rules subcommand queries business rules and invariants | **Invariant:** The rules subcommand returns structured business rules extracted from Gherkin Rule: blocks, grouped by... | - ---- ProcessApiCliCore --- - -| Rule | Description | -| ------------------------------------------------- | ----------- | -| CLI displays help and version information | | -| CLI requires input flag for subcommands | | -| CLI status subcommand shows delivery state | | -| CLI query subcommand executes API methods | | -| CLI pattern subcommand shows pattern detail | | -| CLI arch subcommand queries architecture | | -| CLI shows errors for missing subcommand arguments | | -| CLI handles argument edge cases | | - ---- LintProcessCli --- - -| Rule | Description | -| ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | -| CLI displays help and version information | **Invariant:** The --help/-h and --version/-v flags must produce usage/version output and exit successfully without... | -| CLI requires git repository for validation | **Invariant:** The lint-process CLI must fail with a clear error when run outside a git repository in both staged and... | -| CLI validates file mode input | **Invariant:** In file mode, the CLI must require at least one file path via positional argument or --file flag, and... | -| CLI handles no changes gracefully | **Invariant:** When no relevant changes are detected (empty diff), the CLI must exit successfully with a zero exit... | -| CLI supports multiple output formats | **Invariant:** The CLI must support JSON and pretty (human-readable) output formats, with pretty as the default.... | -| CLI supports debug options | **Invariant:** The --show-state flag must display the derived process state (FSM states, protection levels,... | -| CLI warns about unknown flags | **Invariant:** Unrecognized CLI flags must produce a warning message but allow execution to continue.... | - ---- LintPatternsCli --- - -| Rule | Description | -| ---------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| CLI displays help and version information | **Invariant:** The --help and -v flags must produce usage/version output and exit successfully without requiring... | -| CLI requires input patterns | **Invariant:** The lint-patterns CLI must fail with a clear error when the --input flag is not provided.... | -| Lint passes for valid patterns | **Invariant:** Fully annotated patterns with all required tags must pass linting with zero violations.... | -| Lint detects violations in incomplete patterns | **Invariant:** Patterns with missing or incomplete annotations must produce specific violation reports identifying... | -| CLI supports multiple output formats | **Invariant:** The CLI must support JSON and pretty (human-readable) output formats, with pretty as the default.... | -| Strict mode treats warnings as errors | **Invariant:** When --strict is enabled, warnings must be promoted to errors causing a non-zero exit code; without... | - ---- GenerateTagTaxonomyCli --- - -| Rule | Description | -| ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| CLI displays help and version information | **Invariant:** The --help/-h and --version/-v flags must produce usage/version output and exit successfully without... | -| CLI generates taxonomy at specified output path | **Invariant:** The taxonomy generator must write output to the specified path, creating parent directories if they do... | -| CLI respects overwrite flag for existing files | **Invariant:** The CLI must refuse to overwrite existing output files unless the --overwrite or -f flag is explicitly... | -| Generated taxonomy contains expected sections | **Invariant:** The generated taxonomy file must include category documentation and statistics sections reflecting the... | -| CLI warns about unknown flags | **Invariant:** Unrecognized CLI flags must produce a warning message but allow execution to continue.... | - ---- GenerateDocsCli --- - -| Rule | Description | -| --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| CLI displays help and version information | **Invariant:** The --help and -v flags must produce usage/version output and exit successfully without requiring... | -| CLI requires input patterns | **Invariant:** The generate-docs CLI must fail with a clear error when the --input flag is not provided.... | -| CLI lists available generators | **Invariant:** The --list-generators flag must display all registered generator names without performing any... | -| CLI generates documentation from source files | **Invariant:** Given valid input patterns and a generator name, the CLI must scan sources, extract patterns, and... | -| CLI rejects unknown options | **Invariant:** Unrecognized CLI flags must cause an error with a descriptive message rather than being silently... | - ---- ProcessStateAPITesting --- - -| Rule | Description | -| ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| Status queries return correct patterns | **Invariant:** Status queries must correctly filter by both normalized status (planned = roadmap + deferred) and FSM... | -| Phase queries return correct phase data | **Invariant:** Phase queries must return only patterns in the requested phase, with accurate progress counts and... | -| FSM queries expose transition validation | **Invariant:** FSM queries must validate transitions against the PDR-005 state machine and expose protection levels... | -| Pattern queries find and retrieve pattern data | **Invariant:** Pattern lookup must be case-insensitive by name, and category queries must return only patterns with... | -| Timeline queries group patterns by time | **Invariant:** Quarter queries must correctly filter by quarter string, and recently completed must be sorted by date... | - ---- ScopeValidatorTests --- - -| Rule | Description | -| -------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| Implementation scope validation checks all prerequisites | **Invariant:** Implementation scope validation must check FSM transition validity, dependency completeness, PDR... | -| Design scope validation checks dependency stubs | **Invariant:** Design scope validation must verify that dependencies have corresponding code stubs, producing... | -| Formatter produces structured text output | **Invariant:** The scope validator formatter must produce structured text with ADR-008 markers, showing verdict text... | - ---- HandoffGeneratorTests --- - -| Rule | Description | -| ----------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -| Handoff generates compact session state summary | **Invariant:** The handoff generator must produce a compact session state summary including pattern status,... | -| Formatter produces structured text output | **Invariant:** The handoff formatter must produce structured text output with ADR-008 section markers for... | - ---- PatternSummarizeTests --- - -| Rule | Description | -| -------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| summarizePattern projects to compact summary | **Invariant:** summarizePattern must project a full pattern object to a compact summary containing exactly 6 fields,... | -| summarizePatterns batch processes arrays | **Invariant:** summarizePatterns must batch-process an array of patterns, returning a correctly-sized array of... | - ---- PatternHelpersTests --- - -| Rule | Description | -| -------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| getPatternName uses patternName tag when available | **Invariant:** getPatternName must return the patternName tag value when set, falling back to the pattern's name... | -| findPatternByName performs case-insensitive matching | **Invariant:** findPatternByName must match pattern names case-insensitively, returning undefined when no match... | -| getRelationships looks up with case-insensitive fallback | **Invariant:** getRelationships must first try exact key lookup in the relationship index, then fall back to... | -| suggestPattern provides fuzzy suggestions | **Invariant:** suggestPattern must return fuzzy match suggestions for close pattern names, returning empty results... | - ---- OutputPipelineTests --- - -| Rule | Description | -| ---------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| Output modifiers apply with correct precedence | **Invariant:** Output modifiers (count, names-only, fields, full) must apply to pattern arrays with correct... | -| Modifier conflicts are rejected | **Invariant:** Mutually exclusive modifier combinations (full+names-only, full+count, full+fields) and invalid field... | -| List filters compose via AND logic | **Invariant:** Multiple list filters (status, category) must compose via AND logic, with pagination (limit/offset)... | -| Empty stripping removes noise | **Invariant:** Null and empty values must be stripped from output objects to reduce noise in API responses.... | - ---- FuzzyMatchTests --- - -| Rule | Description | -| --------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| Fuzzy matching uses tiered scoring | **Invariant:** Pattern matching must use a tiered scoring system: exact match (1.0) > prefix match (0.9) > substring... | -| findBestMatch returns single suggestion | **Invariant:** findBestMatch must return the single highest-scoring match above the threshold, or undefined when no... | -| Levenshtein distance computation | **Invariant:** The Levenshtein distance function must correctly compute edit distance between strings, returning 0... | - ---- ArchQueriesTest --- - -| Rule | Description | -| ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| Neighborhood and comparison views | **Invariant:** The architecture query API must provide pattern neighborhood views (direct connections) and... | -| Taxonomy discovery via tags and sources | **Invariant:** The API must aggregate tag values with counts across all patterns and categorize source files by type,... | -| Coverage analysis reports annotation completeness | **Invariant:** Coverage analysis must detect unused taxonomy entries, cross-context integration points, and include... | - ---- StubTaxonomyTagTests --- - -| Rule | Description | -| -------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| Taxonomy tags are registered in the registry | **Invariant:** The target and since stub metadata tags must be registered in the tag registry as recognized taxonomy... | -| Tags are part of the stub metadata group | **Invariant:** The target and since tags must be grouped under the stub metadata domain in the built registry.... | - ---- StubResolverTests --- - -| Rule | Description | -| ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| Stubs are identified by path or target metadata | **Invariant:** A pattern must be identified as a stub if it resides in the stubs directory OR has a targetPath... | -| Stubs are resolved against the filesystem | **Invariant:** Resolved stubs must show whether their target file exists on the filesystem and must be grouped by the... | -| Decision items are extracted from descriptions | **Invariant:** AD-N formatted items must be extracted from pattern description text, with empty descriptions... | -| PDR references are found across patterns | **Invariant:** The resolver must find all patterns that reference a given PDR identifier, returning empty results... | - ---- ContextFormatterTests --- - -| Rule | Description | -| ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| formatContextBundle renders section markers | **Invariant:** The context formatter must render section markers for all populated sections in a context bundle, with... | -| formatDepTree renders indented tree | **Invariant:** The dependency tree formatter must render with indentation arrows and a focal pattern marker to... | -| formatOverview renders progress summary | **Invariant:** The overview formatter must render a progress summary line showing completion metrics for the... | -| formatFileReadingList renders categorized file paths | **Invariant:** The file reading list formatter must categorize paths into primary and dependency sections, producing... | - ---- ContextAssemblerTests --- - -| Rule | Description | -| --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| assembleContext produces session-tailored context bundles | **Invariant:** Each session type (design/planning/implement) must include exactly the context sections defined by its... | -| buildDepTree walks dependency chains with cycle detection | **Invariant:** The dependency tree must walk the full chain up to the depth limit, mark the focal node, and terminate... | -| buildOverview provides executive project summary | **Invariant:** The overview must include progress counts (completed/active/planned), active phase listing, and... | -| buildFileReadingList returns paths by relevance | **Invariant:** Primary files (spec, implementation) must always be included; related files (dependency... | diff --git a/docs-live/_claude-md/generation/generation-overview.md b/docs-live/_claude-md/generation/generation-overview.md index e8554725..0ae14ff3 100644 --- a/docs-live/_claude-md/generation/generation-overview.md +++ b/docs-live/_claude-md/generation/generation-overview.md @@ -1,17 +1,14 @@ -=== GENERATION OVERVIEW === - -Purpose: Generation product area overview -Detail Level: Compact summary +### Generation Overview **How does code become docs?** The generation pipeline transforms annotated source code into markdown documents. It follows a four-stage architecture: Scanner → Extractor → Transformer → Codec. Codecs are pure functions — given a MasterDataset, they produce a RenderableDocument without side effects. CompositeCodec composes multiple codecs into a single document. -=== KEY INVARIANTS === +#### Key Invariants - Codec purity: Every codec is a pure function (dataset in, document out). No side effects, no filesystem access. Same input always produces same output - Config-driven generation: A single `ReferenceDocConfig` produces a complete document. Content sources compose in fixed order: conventions, diagrams, shapes, behaviors - RenderableDocument IR: Codecs express intent ("this is a table"), the renderer handles syntax ("pipe-delimited markdown"). Switching output format requires only a new renderer -=== API TYPES === +#### API Types | Type | Kind | | ------------------------ | --------- | @@ -26,714 +23,3 @@ Detail Level: Compact summary | MermaidBlock | type | | CollapsibleBlock | type | | transformToMasterDataset | function | - -=== BEHAVIOR SPECIFICATIONS === - ---- MergePatterns --- - ---- UniversalDocGeneratorRobustness --- - -| Rule | Description | -| ----------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -| Context - PoC limitations prevent monorepo-scale operation | **The Problem:**

The DecisionDocGenerator PoC (Phase 27) successfully demonstrated code-first
documentation... | -| Decision - Robustness requires four coordinated improvements | **Architecture:**

```
Source Mapping Table


┌─────────────────────────────┐... | -| Duplicate content must be detected and merged | Content fingerprinting identifies duplicate sections extracted from multiple
sources. When duplicates are found,... | -| Invalid source mappings must fail fast with clear errors | Pre-flight validation catches configuration errors before extraction begins.
This prevents silent failures and... | -| Warnings must be collected and reported consistently | The warning collector replaces scattered console.warn calls with a
structured system that aggregates warnings and... | -| Consequence - Improved reliability at cost of stricter validation | **Positive:**

- Duplicate content eliminated from generated docs
- Configuration errors caught before... | - ---- TraceabilityGenerator --- - -| Rule | Description | -| ------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| Parses Verified by annotations to extract scenario references | **Invariant:** Scenario names in `**Verified by:**` are matched against actual
scenarios in feature files.... | -| Generates Rule-to-Scenario traceability matrix | **Invariant:** Every Rule appears in the matrix with its verification status.
Scenarios are linked by name and... | -| Detects and reports coverage gaps | **Invariant:** Orphan scenarios (not referenced by any Rule) and unverified
rules are listed in dedicated... | -| Supports filtering by phase and domain | **Invariant:** CLI flags allow filtering the matrix by phase number or domain
category to generate focused... | - ---- TraceabilityEnhancements --- - ---- ScopedArchitecturalView --- - -| Rule | Description | -| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| Scope filtering selects patterns by context, view, or name | **Invariant:** A pattern matches a DiagramScope if ANY of three conditions hold:
its name is in `scope.patterns`,... | -| Neighbor discovery finds connected patterns outside scope | **Invariant:** Patterns connected to scope patterns via relationship edges
(uses, dependsOn, implementsPatterns,... | -| Multiple diagram scopes compose in sequence | **Invariant:** When `diagramScopes` is an array, each scope produces its own
Mermaid diagram section with... | - ---- ReferenceDocShowcase --- - -| Rule | Description | -| ---------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| Deep behavior rendering replaces shallow truncation | **Invariant:** At standard and detailed levels, behavior sections render full
rule descriptions with parsed... | -| Shape sections include JSDoc prose and property documentation | **Invariant:** At standard level, shape code blocks are preceded by JSDoc
prose when available. At detailed... | -| Diagram scope supports archLayer filtering and multiple diagram types | **Invariant:** DiagramScope gains optional archLayer and diagramType fields.
The archLayer filter selects... | -| Every renderable block type appears in the showcase document | **Invariant:** The generated REFERENCE-SAMPLE.md at detailed level must
contain at least one instance of each of... | -| Edge labels and custom node shapes enrich diagram readability | **Invariant:** Relationship edges in scoped diagrams display labels
describing the relationship semantics (uses,... | -| Extraction pipeline surfaces complete API documentation | **Invariant:** ExportInfo.signature shows full function parameter types and
return type instead of the... | -| Infrastructure enables flexible document composition and AI-optimized output | **Invariant:** CompositeCodec assembles reference documents from multiple
codec outputs by concatenating... | - ---- PrdImplementationSection --- - -| Rule | Description | -| --------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| PRD generator discovers implementations from relationship index | **Invariant:** When generating PRD for pattern X, the generator queries the
relationship index for all files... | -| Implementation metadata appears in dedicated PRD section | **Invariant:** The PRD output includes a "## Implementations" section listing
all files that implement the... | -| Patterns without implementations render cleanly | **Invariant:** If no files have `@libar-docs-implements:X` for pattern X,
the "## Implementations" section is... | - ---- OrchestratorPipelineFactoryMigration --- - -| Rule | Description | -| ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| Orchestrator delegates pipeline to factory | **Invariant:** `generateDocumentation()` calls `buildMasterDataset()`
for the scan-extract-merge-transform... | -| mergePatterns lives in pipeline module | **Invariant:** The `mergePatterns()` function lives in
`src/generators/pipeline/merge-patterns.ts` as a pipeline... | -| Factory provides structured warnings for all consumers | **Invariant:** `PipelineResult.warnings` contains typed warning
objects with `type`, `message`, optional `count`,... | -| Pipeline factory supports partial success mode | **Invariant:** When `failOnScanErrors` is false, the factory captures
scan errors and extraction errors as... | -| End-to-end verification confirms behavioral equivalence | **Invariant:** After migration, all CLI commands and doc generation
produce identical output to pre-refactor... | - ---- GeneratorInfrastructureTesting --- - -| Rule | Description | -| --------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | -| Orchestrator coordinates full documentation generation pipeline | **Invariant:** Orchestrator merges TypeScript and Gherkin patterns,
handles conflicts, and produces requested... | -| Registry manages generator registration and retrieval | **Invariant:** Registry prevents duplicate names, returns undefined for
unknown generators, and lists available... | -| CodecBasedGenerator adapts codecs to generator interface | **Invariant:** Generator delegates to underlying codec for transformation.
Missing MasterDataset produces... | -| Orchestrator supports PR changes generation options | **Invariant:** PR changes can filter by git diff, changed files, or release version.

**API:** See... | - ---- DocGenerationProofOfConcept --- - -| Rule | Description | -| ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | -| Context - Manual documentation maintenance does not scale | **The Problem:**

Common technical documentation is the hardest part to maintain in a repository.
The volume... | -| Decision - Decisions own convention content and durable context, code owns details | **The Pattern:**

Documentation is generated from three source types with different durability:

\| Source... | -| Proof of Concept - Self-documentation validates the pattern | This POC demonstrates the doc-from-decision pattern by generating docs
about ITSELF. The... | -| Expected Output - Compact claude module structure | **File:** `_claude-md/validation/process-guard.md`

The compact module extracts only essential content for AI... | -| Consequences - Durable sources with clear ownership boundaries | **Benefits:**

\| Benefit \| How \|
\| Single source of truth \| Each content type owned by one source \|
\|... | -| Consequences - Design stubs live in stubs, not src | **The Problem:**

Design stubs (pre-implementation API shapes) placed in `src/` cause issues:

\| Issue \|... | -| Decision - Source mapping table parsing and extraction method dispatch | **Invariant:** The source mapping table in a decision document defines how
documentation sections are assembled... | - ---- CrossCuttingDocumentInclusion --- - -| Rule | Description | -| --------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| Include tag routes content to named documents | **Invariant:** A pattern or shape with libar-docs-include:X appears in
any reference document whose includeTags... | -| Include tag scopes diagrams (replaces arch-view) | **Invariant:** DiagramScope.include matches patterns whose
libar-docs-include values contain the specified scope... | -| Shapes use include tag for document routing | **Invariant:** A declaration tagged with both libar-docs-shape and
libar-docs-include has its include values... | -| Conventions use include tag for selective inclusion | **Invariant:** A decision record or convention pattern with
libar-docs-include:X appears in a reference document... | - ---- CodecDrivenReferenceGeneration --- - -| Rule | Description | -| ------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| Config-driven codec replaces per-document recipe features | **Invariant:** A single `ReferenceDocConfig` object is sufficient to produce
a complete reference document. No... | -| Four content sources compose in AD-5 order | **Invariant:** Reference documents always compose content in this order:
conventions, then scoped diagrams, then... | -| Detail level controls output density | **Invariant:** Three detail levels produce progressively more content from the
same config. Summary: type tables... | -| Generator registration produces paired detailed and summary outputs | **Invariant:** Each ReferenceDocConfig produces exactly two generators
(detailed for `docs/`, summary for... | - ---- CodecBehaviorTesting --- - -| Rule | Description | -| -------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | -| Timeline codecs group patterns by phase and status | **Invariant:** Roadmap shows planned work, Milestones shows completed work,
CurrentWork shows active patterns... | -| Session codecs provide working context for AI sessions | **Invariant:** SessionContext shows active patterns with deliverables.
RemainingWork aggregates incomplete work... | -| Requirements codec produces PRD-style documentation | **Invariant:** Features include problem, solution, business value.
Acceptance criteria are formatted with bold... | -| Reporting codecs support release management and auditing | **Invariant:** Changelog follows Keep a Changelog format.
Traceability maps rules to scenarios.

**API:** See... | -| Planning codecs support implementation sessions | **Invariant:** Planning checklist includes DoD items.
Session plan shows implementation steps.

**API:** See... | - ---- ClaudeModuleGeneration --- - -| Rule | Description | -| --------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| Claude module tags exist in the tag registry | **Invariant:** Three claude-specific tags (`claude-module`, `claude-section`,
`claude-tags`) must exist in the... | -| Gherkin parser extracts claude module tags from feature files | **Invariant:** The Gherkin extractor must extract `claude-module`, `claude-section`,
and `claude-tags` from... | -| Module content is extracted from feature file structure | **Invariant:** The codec must extract content from standard feature file elements:
Feature description... | -| ClaudeModuleCodec produces compact markdown modules | **Invariant:** The codec transforms patterns with claude tags into markdown files
suitable for the `_claude-md/`... | -| Claude module generator writes files to correct locations | **Invariant:** The generator must write module files to `{outputDir}/{section}/{module}.md`
based on the... | -| Claude module generator is registered with generator registry | **Invariant:** A "claude-modules" generator must be registered with the generator
registry to enable `pnpm... | -| Same source generates detailed docs with progressive disclosure | **Invariant:** When running with `detailLevel: "detailed"`, the codec produces
expanded documentation including... | - ---- BusinessRulesGenerator --- - -| Rule | Description | -| ------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| Extracts Rule blocks with Invariant and Rationale | **Invariant:** Every `Rule:` block with `**Invariant:**` annotation must be extracted.
Rules without annotations... | -| Organizes rules by domain category and phase | **Invariant:** Rules are grouped first by domain category (from `@libar-docs-*` flags),
then by phase number for... | -| Preserves code examples and comparison tables | **Invariant:** DocStrings (`"""typescript`) and tables in Rule descriptions are
rendered in the business rules... | -| Generates scenario traceability links | **Invariant:** Each rule's `**Verified by:**` section generates links to the
scenarios that verify the rule.... | - ---- ArchitectureDiagramCore --- - -| Rule | Description | -| ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| Architecture tags exist in the tag registry | **Invariant:** Three architecture-specific tags (`arch-role`, `arch-context`,
`arch-layer`) must exist in the tag... | -| AST parser extracts architecture tags from TypeScript | **Invariant:** The AST parser must extract `arch-role`, `arch-context`, and
`arch-layer` tags from TypeScript... | -| MasterDataset builds archIndex during transformation | **Invariant:** The `transformToMasterDataset` function must build an `archIndex`
that groups patterns by role,... | -| Component diagrams group patterns by bounded context | **Invariant:** Component diagrams must render patterns as nodes grouped into
bounded context subgraphs, with... | - ---- ArchitectureDiagramAdvanced --- - -| Rule | Description | -| ------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------- | -| Layered diagrams group patterns by architectural layer | **Invariant:** Layered diagrams must render patterns grouped by architectural
layer (domain, application,... | -| Architecture generator is registered with generator registry | **Invariant:** An "architecture" generator must be registered with the generator
registry to enable `pnpm... | -| Sequence diagrams render interaction flows | **Invariant:** Sequence diagrams must render interaction flows (command flow,
saga flow) showing step-by-step... | - ---- ArchitectureDelta --- - ---- ADR006SingleReadModelArchitecture --- - -| Rule | Description | -| --------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | -| All feature consumers query the read model, not raw state | **Invariant:** Code that needs pattern relationships, status groupings,
cross-source resolution, or dependency... | -| No lossy local types | **Invariant:** Consumers do not define local DTOs that duplicate and
discard fields from ExtractedPattern. If a... | -| Relationship resolution is computed once | **Invariant:** Forward relationships (uses, dependsOn, implementsPatterns)
and reverse lookups (usedBy,... | -| Three named anti-patterns | **Invariant:** These are recognized violations, serving as review criteria
for new code and refactoring targets... | - ---- ADR005CodecBasedMarkdownRendering --- - -| Rule | Description | -| ----------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| Codecs implement a decode-only contract | **Invariant:** Every codec is a pure function that accepts a MasterDataset
and returns a RenderableDocument.... | -| RenderableDocument is a typed intermediate representation | **Invariant:** RenderableDocument contains a title, an ordered array of
SectionBlock elements, and an optional... | -| CompositeCodec assembles documents from child codecs | **Invariant:** CompositeCodec accepts an array of child codecs and
produces a single RenderableDocument by... | -| ADR content comes from both Feature description and Rule prefixes | **Invariant:** ADR structured content (Context, Decision, Consequences)
can appear in two locations within a... | -| The markdown renderer is codec-agnostic | **Invariant:** The renderer accepts any RenderableDocument regardless of
which codec produced it. Rendering... | - ---- TestContentBlocks --- - -| Rule | Description | -| ---------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| Business rules appear as a separate section | Rule descriptions provide context for why this business rule exists.
You can include multiple paragraphs here.... | -| Multiple rules create multiple Business Rule entries | Each Rule keyword creates a separate entry in the Business Rules section.
This helps organize complex features... | - ---- RuleKeywordPoC --- - -| Rule | Description | -| ------------------------------------------ | -------------------------------------------------------------------------------- | -| Basic arithmetic operations work correctly | The calculator should perform standard math operations
with correct results. | -| Division has special constraints | Division by zero must be handled gracefully to prevent
system errors. | - ---- WarningCollectorTesting --- - -| Rule | Description | -| ----------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| Warnings are captured with source context | **Invariant:** Each captured warning must include the source file path, optional line number, and category for... | -| Warnings are categorized for filtering and grouping | **Invariant:** Warnings must support multiple categories and be filterable by both category and source file.... | -| Warnings are aggregated across the pipeline | **Invariant:** Warnings from multiple pipeline stages must be collected into a single aggregated view, groupable by... | -| Warnings integrate with the Result pattern | **Invariant:** Warnings must propagate through the Result monad, being preserved in both successful and failed... | -| Warnings can be formatted for different outputs | **Invariant:** Warnings must be formattable as colored console output, machine-readable JSON, and markdown for... | -| Existing console.warn calls are migrated to collector | **Invariant:** Pipeline components (source mapper, shape extractor) must use the warning collector instead of direct... | - ---- ValidationRulesCodecTesting --- - -| Rule | Description | -| --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| Document metadata is correctly set | **Invariant:** The validation rules document must have the title "Validation Rules", a purpose describing Process... | -| All validation rules are documented in a table | **Invariant:** All 6 Process Guard validation rules must appear in the rules table with their correct severity levels... | -| FSM state diagram is generated from transitions | **Invariant:** When includeFSMDiagram is enabled, a Mermaid state diagram showing all 4 FSM states and their... | -| Protection level matrix shows status protections | **Invariant:** When includeProtectionMatrix is enabled, a matrix showing all 4 statuses with their protection levels... | -| CLI usage is documented with options and exit codes | **Invariant:** When includeCLIUsage is enabled, the document must include CLI example code, all 6 options, and exit... | -| Escape hatches are documented for special cases | **Invariant:** When includeEscapeHatches is enabled, all 3 escape hatch mechanisms must be documented; when disabled,... | - ---- TaxonomyCodecTesting --- - -| Rule | Description | -| ---------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| Document metadata is correctly set | **Invariant:** The taxonomy document must have the title "Taxonomy Reference", a descriptive purpose string, and a... | -| Categories section is generated from TagRegistry | **Invariant:** The categories section must render all categories from the configured TagRegistry as a table, with... | -| Metadata tags can be grouped by domain | **Invariant:** When groupByDomain is enabled, metadata tags must be organized into domain-specific subsections; when... | -| Tags are classified into domains by hardcoded mapping | **Invariant:** Tags must be classified into domains (Core, Relationship, Timeline, etc.) using a hardcoded mapping,... | -| Optional sections can be disabled via codec options | **Invariant:** Format Types, Presets, and Architecture sections must each be independently disableable via their... | -| Detail files are generated for progressive disclosure | **Invariant:** When generateDetailFiles is enabled, the codec must produce additional detail files (one per domain... | -| Format types are documented with descriptions and examples | **Invariant:** All 6 format types must be documented with descriptions and usage examples in the generated taxonomy.... | - ---- SourceMappingValidatorTesting --- - -| Rule | Description | -| --------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| Source files must exist and be readable | **Invariant:** All source file paths in mappings must resolve to existing, readable files.
**Rationale:**... | -| Extraction methods must be valid and supported | **Invariant:** Extraction methods must match a known method from the supported set.
**Rationale:** Invalid... | -| Extraction methods must be compatible with file types | **Invariant:** Method-file combinations must be compatible (e.g., TypeScript methods for .ts files).... | -| Source mapping tables must have required columns | **Invariant:** Tables must contain Section, Source File, and Extraction Method columns.
**Rationale:** Missing... | -| All validation errors are collected and returned together | **Invariant:** Validation collects all errors before returning, not just the first.
**Rationale:** Enables users... | - ---- SourceMapperTesting --- - -| Rule | Description | -| ------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------- | -| Extraction methods dispatch to correct handlers | **Invariant:** Each extraction method type (self-reference, TypeScript, Gherkin) must dispatch to the correct... | -| Self-references extract from current decision document | **Invariant:** THIS DECISION self-references must extract content from the current decision document using rule... | -| Multiple sources are aggregated in mapping order | **Invariant:** When multiple source mappings target the same section, their extracted content must be aggregated in... | -| Missing files produce warnings without failing | **Invariant:** When a referenced source file does not exist, the mapper must produce a warning and continue... | -| Empty extraction results produce info warnings | **Invariant:** When extraction succeeds but produces empty results (no matching shapes, no matching rules), an... | -| Extraction methods are normalized for dispatch | **Invariant:** Extraction method strings must be normalized to canonical forms before dispatch, with unrecognized... | - ---- RobustnessIntegration --- - -| Rule | Description | -| --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| Validation runs before extraction in the pipeline | **Invariant:** Validation must complete and pass before extraction begins.
**Rationale:** Prevents wasted... | -| Deduplication runs after extraction before assembly | **Invariant:** Deduplication processes all extracted content before document assembly.
**Rationale:** All sources... | -| Warnings from all stages are collected and reported | **Invariant:** Warnings from all pipeline stages are aggregated in the result.
**Rationale:** Users need... | -| Pipeline provides actionable error messages | **Invariant:** Error messages include context and fix suggestions.
**Rationale:** Users should fix issues in one... | -| Existing decision documents continue to work | **Invariant:** Valid existing decision documents generate without new errors.
**Rationale:** Robustness... | - ---- PocIntegration --- - -| Rule | Description | -| ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| POC decision document is parsed correctly | **Invariant:** The real POC decision document (Process Guard) must be parseable by the codec, extracting all source... | -| Self-references extract content from POC decision | **Invariant:** THIS DECISION self-references in the POC document must successfully extract Context rules, Decision... | -| TypeScript shapes are extracted from real files | **Invariant:** The source mapper must successfully extract type shapes and patterns from real TypeScript source files... | -| Behavior spec content is extracted correctly | **Invariant:** The source mapper must successfully extract Rule blocks and ScenarioOutline Examples from real Gherkin... | -| JSDoc sections are extracted from CLI files | **Invariant:** The source mapper must successfully extract JSDoc comment sections from real TypeScript CLI files... | -| All source mappings execute successfully | **Invariant:** All source mappings defined in the POC decision document must execute without errors, producing... | -| Compact output generates correctly | **Invariant:** The compact output for the POC document must generate successfully and contain all essential sections... | -| Detailed output generates correctly | **Invariant:** The detailed output for the POC document must generate successfully and contain all sections including... | -| Generated output matches quality expectations | **Invariant:** The generated output structure must match the expected target format, with complete validation rules... | - ---- DecisionDocGeneratorTesting --- - -| Rule | Description | -| ------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| Output paths are determined from pattern metadata | **Invariant:** Output file paths must be derived from pattern metadata using kebab-case conversion of the pattern... | -| Compact output includes only essential content | **Invariant:** Compact output mode must include only essential decision content (type shapes, key constraints) while... | -| Detailed output includes full content | **Invariant:** Detailed output mode must include all decision content including full descriptions, consequences, and... | -| Multi-level generation produces both outputs | **Invariant:** The generator must produce both compact and detailed output files from a single generation run, using... | -| Generator is registered with the registry | **Invariant:** The decision document generator must be registered with the generator registry under a canonical name... | -| Source mappings are executed during generation | **Invariant:** Source mapping tables must be executed during generation to extract content from referenced files,... | - ---- DecisionDocCodecTesting --- - -| Rule | Description | -| ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| Rule blocks are partitioned by semantic prefix | **Invariant:** Decision document rules must be partitioned into ADR sections based on their semantic prefix (e.g.,... | -| DocStrings are extracted with language tags | **Invariant:** DocStrings within rule descriptions must be extracted preserving their language tag (e.g., typescript,... | -| Source mapping tables are parsed from rule descriptions | **Invariant:** Markdown tables in rule descriptions with source mapping columns must be parsed into structured data,... | -| Self-reference markers are correctly detected | **Invariant:** The "THIS DECISION" marker must be recognized as a self-reference to the current decision document,... | -| Extraction methods are normalized to known types | **Invariant:** Extraction method strings from source mapping tables must be normalized to canonical method names for... | -| Complete decision documents are parsed with all content | **Invariant:** A complete decision document must be parseable into its constituent parts including rules, DocStrings,... | -| Rules can be found by name with partial matching | **Invariant:** Rules must be findable by exact name match or partial (substring) name match, returning undefined when... | - ---- ContentDeduplication --- - -| Rule | Description | -| --------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| Duplicate detection uses content fingerprinting | **Invariant:** Content with identical normalized text must produce identical fingerprints.
**Rationale:**... | -| Duplicates are merged based on source priority | **Invariant:** Higher-priority sources take precedence when merging duplicate content.
**Rationale:** TypeScript... | -| Section order is preserved after deduplication | **Invariant:** Section order matches the source mapping table order after deduplication.
**Rationale:**... | -| Deduplicator integrates with source mapper pipeline | **Invariant:** Deduplication runs after extraction and before document assembly.
**Rationale:** All content must... | - ---- TableExtraction --- - -| Rule | Description | -| ------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| Tables in rule descriptions render exactly once | **Invariant:** Each markdown table in a rule description appears exactly once in the rendered output, with no... | -| Multiple tables in description each render exactly once | **Invariant:** When a rule description contains multiple markdown tables, each table renders as a separate formatted... | -| stripMarkdownTables removes table syntax from text | **Invariant:** stripMarkdownTables removes all pipe-delimited table syntax from input text while preserving all... | - ---- GeneratorRegistryTesting --- - -| Rule | Description | -| ----------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| Registry manages generator registration and retrieval | **Invariant:** Each generator name is unique within the registry; duplicate registration is rejected and lookup of... | - ---- PrdImplementationSectionTesting --- - -| Rule | Description | -| ---------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | -| Implementation files appear in pattern docs via @libar-docs-implements | **Invariant:** Any TypeScript file with a matching @libar-docs-implements tag must appear in the pattern document's... | -| Multiple implementations are listed alphabetically | **Invariant:** When multiple files implement the same pattern, they must be listed in ascending file path order.... | -| Patterns without implementations omit the section | **Invariant:** The Implementations heading must not appear in pattern documents when no implementing files exist.... | -| Implementation references use relative file links | **Invariant:** Implementation file links must be relative paths starting from the patterns output directory.... | - ---- PrChangesOptions --- - -| Rule | Description | -| --------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| Orchestrator supports PR changes generation options | **Invariant:** PR changes output includes only patterns matching the changed files list, the release version filter,... | - ---- DocumentationOrchestrator --- - -| Rule | Description | -| --------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | -| Orchestrator coordinates full documentation generation pipeline | **Invariant:** Non-overlapping patterns from TypeScript and Gherkin sources must merge into a unified dataset;... | - ---- CodecBasedGeneratorTesting --- - -| Rule | Description | -| -------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| CodecBasedGenerator adapts codecs to generator interface | **Invariant:** CodecBasedGenerator delegates document generation to the underlying codec and surfaces codec errors... | - ---- BusinessRulesDocumentCodec --- - -| Rule | Description | -| -------------------------------------------------------------- | ----------- | -| Extracts Rule blocks with Invariant and Rationale | | -| Organizes rules by product area and phase | | -| Summary mode generates compact output | | -| Preserves code examples and tables in detailed mode | | -| Generates scenario traceability links | | -| Progressive disclosure generates detail files per product area | | -| Empty rules show placeholder instead of blank content | | -| Rules always render flat for full visibility | | -| Source file shown as filename text | | -| Verified-by renders as checkbox list at standard level | | -| Feature names are humanized from camelCase pattern names | | - ---- TransformDatasetTesting --- - -| Rule | Description | -| ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| Empty dataset produces valid zero-state views | **Invariant:** An empty input produces a MasterDataset with all counts at zero and no groupings.

\*\*Verified... | -| Status and phase grouping creates navigable views | **Invariant:** Patterns are grouped by canonical status and sorted by phase number, with per-phase status counts... | -| Quarter and category grouping organizes by timeline and domain | **Invariant:** Patterns are grouped by quarter and category, with only patterns bearing the relevant metadata... | -| Source grouping separates TypeScript and Gherkin origins | **Invariant:** Patterns are partitioned by source file type, and patterns with phase metadata appear in the roadmap... | -| Relationship index builds bidirectional dependency graph | **Invariant:** The relationship index contains forward and reverse lookups, with reverse lookups merged and... | -| Completion tracking computes project progress | **Invariant:** Completion percentage is rounded to the nearest integer, and fully-completed requires all patterns in... | -| Workflow integration conditionally includes delivery process data | **Invariant:** The workflow is included in the MasterDataset only when provided, and phase names are resolved from... | - ---- RichContentHelpersTesting --- - -| Rule | Description | -| -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| DocString parsing handles edge cases | **Invariant:** DocString parsing must gracefully handle empty input, missing language hints, unclosed delimiters, and... | -| DataTable rendering produces valid markdown | **Invariant:** DataTable rendering must produce a well-formed table block for any number of rows, substituting empty... | -| Scenario content rendering respects options | **Invariant:** Scenario rendering must honor the includeSteps option, producing step lists only when enabled, and... | -| Business rule rendering handles descriptions | **Invariant:** Business rule rendering must always include the rule name as a bold paragraph, and must parse... | -| DocString content is dedented when parsed | **Invariant:** DocString code blocks must be dedented to remove common leading whitespace while preserving internal... | - ---- RendererOutputFormats --- - -| Rule | Description | -| ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | -| Code blocks and mermaid diagrams render with fenced syntax | **Invariant:** Code blocks use triple backtick fencing with optional language hint. Mermaid blocks use mermaid as the... | -| Collapsible blocks render as HTML details elements | **Invariant:** Summary text is HTML-escaped to prevent injection. Collapsible content renders between details tags.... | -| Link-out blocks render as markdown links with URL encoding | **Invariant:** Link paths with spaces are percent-encoded for valid URLs.
**Verified by:** Render link-out... | -| Multi-file documents produce correct output file collections | **Invariant:** Output file count equals 1 (main) plus additional file count. The first output file always uses the... | -| Complex documents render all block types in sequence | **Invariant:** Multiple block types in a single document render in order without interference.
**Verified by:**... | -| Claude context renderer produces compact AI-optimized output | **Invariant:** Claude context replaces markdown syntax with section markers, omits visual-only blocks (mermaid,... | - ---- RendererBlockTypes --- - -| Rule | Description | -| ------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| Document metadata renders as frontmatter before sections | **Invariant:** Title always renders as H1, purpose and detail level render as bold key-value pairs separated by... | -| Headings render at correct markdown levels with clamping | **Invariant:** Heading levels are clamped to the valid range 1-6 regardless of input value.
**Verified by:**... | -| Paragraphs and separators render as plain text and horizontal rules | **Invariant:** Paragraph content passes through unmodified, including special markdown characters. Separators render... | -| Tables render with headers, alignment, and cell escaping | **Invariant:** Tables must escape pipe characters, convert newlines to line breaks, and pad short rows to match... | -| Lists render in unordered, ordered, checkbox, and nested formats | **Invariant:** List type determines prefix: dash for unordered, numbered for ordered, checkbox syntax for checked... | - ---- RemainingWorkSummaryAccuracy --- - -| Rule | Description | -| ------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | -| Summary totals equal sum of phase table rows | **Invariant:** The summary Active and Total Remaining counts must exactly equal the sum of the corresponding counts... | -| Patterns without phases appear in Backlog row | **Invariant:** Patterns that have no assigned phase must be grouped into a "Backlog" row in the phase table rather... | -| Patterns without patternName are counted using id | **Invariant:** Pattern counting must use pattern.id as the identifier, never patternName, so that patterns with... | -| All phases with incomplete patterns are shown | **Invariant:** The phase table must include every phase that contains at least one incomplete pattern, and phases... | - ---- RemainingWorkEnhancement --- - -| Rule | Description | -| ---------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | -| Priority-based sorting surfaces critical work first | **Invariant:** Phases with higher priority always appear before lower-priority phases when sorting by priority.... | -| Effort parsing converts duration strings to comparable hours | **Invariant:** Effort strings must be parsed to a common unit (hours) for accurate sorting across different time... | -| Quarter grouping organizes planned work into time-based buckets | **Invariant:** Phases with a quarter tag are grouped under their quarter heading; phases without a quarter appear... | -| Priority grouping organizes phases by urgency level | **Invariant:** Phases are grouped under their priority heading; phases without priority appear under Unprioritized.... | -| Progressive disclosure prevents information overload in large backlogs | **Invariant:** When the backlog exceeds maxNextActionable, only the top N phases are shown with a link or count for... | -| Edge cases are handled gracefully | **Invariant:** Empty or fully-blocked backlogs produce meaningful output instead of errors or blank sections.... | -| Default behavior preserves backward compatibility | **Invariant:** Without explicit sortBy or groupPlannedBy options, phases are sorted by phase number in a flat list.... | - ---- PrChangesGeneration --- - -| Rule | Description | -| --------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| Release version filtering controls which phases appear in output | **Invariant:** Only phases with deliverables matching the releaseFilter are included; roadmap phases are always... | -| Patterns are grouped by phase number in the output | **Invariant:** Each phase number produces a separate heading section in the generated output.
**Verified by:**... | -| Summary statistics provide a high-level overview of the PR | **Invariant:** Summary section always shows pattern counts and release tag when a releaseFilter is active.... | -| Deliverables are displayed inline with their parent patterns | **Invariant:** When includeDeliverables is enabled, each pattern lists its deliverables with name, status, and... | -| Review checklist includes standard code quality verification items | **Invariant:** Review checklist always includes code conventions, tests, documentation, and completed pattern... | -| Dependencies section shows inter-pattern relationships | **Invariant:** Dependencies section surfaces both what patterns enable and what they depend on.
\*\*Verified... | -| Business value can be included or excluded from pattern metadata | **Invariant:** Business value display is controlled by the includeBusinessValue option.
**Verified by:**... | -| Output can be sorted by phase number or priority | **Invariant:** Sorting is deterministic and respects the configured sortBy option.
**Verified by:** Phases... | -| Edge cases produce graceful output | **Invariant:** The generator handles missing phases, missing deliverables, and missing phase numbers without errors.... | -| Deliverable-level filtering shows only matching deliverables within a phase | **Invariant:** When a phase contains deliverables with different release tags, only those matching the releaseFilter... | - ---- PatternsCodecTesting --- - -| Rule | Description | -| --------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| Document structure includes progress tracking and category navigation | **Invariant:** Every decoded document must contain a title, purpose, Progress section with status counts, and... | -| Pattern table presents all patterns sorted by status then name | **Invariant:** The pattern table must include every pattern in the dataset with columns for Pattern, Category,... | -| Category sections group patterns by domain | **Invariant:** Each category in the dataset must produce an H3 section listing its patterns, and the filterCategories... | -| Dependency graph visualizes pattern relationships | **Invariant:** A Mermaid dependency graph must be included when pattern relationships exist and the... | -| Detail file generation creates per-pattern pages | **Invariant:** When generateDetailFiles is enabled, each pattern must produce an individual markdown file at... | - ---- ImplementationLinkPathNormalization --- - -| Rule | Description | -| ---------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| Repository prefixes are stripped from implementation paths | **Invariant:** Implementation file paths must not contain repository-level prefixes like "libar-platform/" or... | -| All implementation links in a pattern are normalized | **Invariant:** Every implementation link in a pattern document must have its path normalized, regardless of how many... | -| normalizeImplPath strips known prefixes | **Invariant:** normalizeImplPath removes only recognized repository prefixes from the start of a path and leaves all... | - ---- ExtractSummary --- - -| Rule | Description | -| -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| Single-line descriptions are returned as-is when complete | **Invariant:** A single-line description that ends with sentence-ending punctuation is returned verbatim; one without... | -| Multi-line descriptions are combined until sentence ending | **Invariant:** Lines are concatenated until a sentence-ending punctuation mark is found or the character limit is... | -| Long descriptions are truncated at sentence or word boundaries | **Invariant:** Summaries exceeding the character limit are truncated at the nearest sentence boundary if possible,... | -| Tautological and header lines are skipped | **Invariant:** Lines that merely repeat the pattern name or consist only of a section header label (e.g., "Problem:",... | -| Edge cases are handled gracefully | **Invariant:** Degenerate inputs (empty strings, markdown-only content, bold markers) produce valid output without... | - ---- DescriptionQualityFoundation --- - -| Rule | Description | -| ---------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| Behavior files are verified during pattern extraction | **Invariant:** Every timeline pattern must report whether its corresponding behavior file exists.
\*\*Verified... | -| Traceability coverage reports verified and unverified behavior files | **Invariant:** Coverage reports must distinguish between patterns with verified behavior files and those without.... | -| Pattern names are transformed to human-readable display names | **Invariant:** Display names must convert CamelCase to title case, handle consecutive capitals, and respect explicit... | -| PRD acceptance criteria are formatted with numbering and bold keywords | **Invariant:** PRD output must number acceptance criteria and bold Given/When/Then keywords when steps are enabled.... | -| Business values are formatted for human readability | **Invariant:** Hyphenated business value tags must be converted to space-separated readable text in all output... | - ---- DescriptionHeaderNormalization --- - -| Rule | Description | -| ------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------- | -| Leading headers are stripped from pattern descriptions | **Invariant:** Markdown headers at the start of a pattern description are removed before rendering to prevent... | -| Edge cases are handled correctly | **Invariant:** Header stripping handles degenerate inputs (header-only, whitespace-only, mid-description headers)... | -| stripLeadingHeaders removes only leading headers | **Invariant:** The helper function strips only headers that appear before any non-header content; headers occurring... | - ---- ZodCodecMigration --- - -| Rule | Description | -| -------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| Input codec parses and validates JSON in a single step | **Invariant:** Every JSON string parsed through the input codec is both syntactically valid JSON and... | -| Output codec validates before serialization | **Invariant:** Every object serialized through the output codec is schema-validated before JSON.stringify, preventing... | -| LintOutputSchema validates CLI lint output structure | **Invariant:** Lint output JSON always conforms to the LintOutputSchema, ensuring consistent structure for downstream... | -| ValidationSummaryOutputSchema validates cross-source analysis output | **Invariant:** Validation summary JSON always conforms to the ValidationSummaryOutputSchema, ensuring consistent... | -| RegistryMetadataOutputSchema accepts arbitrary nested structures | **Invariant:** Registry metadata codec accepts any valid JSON-serializable object without schema constraints on... | -| formatCodecError produces human-readable error output | **Invariant:** Formatted codec errors always include the operation context and all validation error details for... | -| safeParse returns typed values or undefined without throwing | **Invariant:** safeParse never throws exceptions; it returns the typed value on success or undefined on any... | -| createFileLoader handles filesystem operations with typed errors | **Invariant:** File loader converts all filesystem errors (ENOENT, EACCES, generic) into structured CodecError values... | - ---- MermaidRelationshipRendering --- - -| Rule | Description | -| ------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | -| Each relationship type has a distinct arrow style | **Invariant:** Each relationship type (uses, depends-on, implements, extends) must render with a unique, visually... | -| Pattern names are sanitized for Mermaid node IDs | **Invariant:** Pattern names must be transformed into valid Mermaid node IDs by replacing special characters (dots,... | -| All relationship types appear in single graph | **Invariant:** The generated Mermaid graph must combine all relationship types (uses, depends-on, implements,... | - ---- LayeredDiagramGeneration --- - -| Rule | Description | -| ------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| Layered diagrams group patterns by arch-layer | **Invariant:** Each distinct arch-layer value must produce exactly one Mermaid subgraph containing all patterns with... | -| Layer order is domain to infrastructure (top to bottom) | **Invariant:** Layer subgraphs must be rendered in Clean Architecture order: domain first, then application, then... | -| Context labels included in layered diagram nodes | **Invariant:** Each node in a layered diagram must include its bounded context name as a label, since context is not... | -| Patterns without layer go to Other subgraph | **Invariant:** Patterns that have arch-role or arch-context but no arch-layer must be placed in an "Other" subgraph,... | -| Layered diagram includes summary section | **Invariant:** The generated layered diagram document must include an Overview section with annotated source file... | - ---- ArchGeneratorRegistration --- - -| Rule | Description | -| ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | -| Architecture generator is registered in the registry | **Invariant:** The generator registry must contain an "architecture" generator entry available for CLI invocation.... | -| Architecture generator produces component diagram by default | **Invariant:** Running the architecture generator without diagram type options must produce a component diagram with... | -| Architecture generator supports diagram type options | **Invariant:** The architecture generator must accept a diagram type option that selects between component and... | -| Architecture generator supports context filtering | **Invariant:** When context filtering is applied, the generated diagram must include only patterns from the specified... | - ---- ComponentDiagramGeneration --- - -| Rule | Description | -| ------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | -| Component diagrams group patterns by bounded context | **Invariant:** Each distinct arch-context value must produce exactly one Mermaid subgraph containing all patterns... | -| Context-less patterns go to Shared Infrastructure | **Invariant:** Patterns without an arch-context value must be placed in a "Shared Infrastructure" subgraph, never... | -| Relationship types render with distinct arrow styles | **Invariant:** Each relationship type must render with its designated Mermaid arrow style: uses (-->), depends-on... | -| Arrows only connect annotated components | **Invariant:** Relationship arrows must only be rendered when both source and target patterns exist in the... | -| Component diagram includes summary section | **Invariant:** The generated component diagram document must include an Overview section with component count and... | -| Component diagram includes legend when enabled | **Invariant:** When the legend is enabled, the document must include a Legend section explaining relationship arrow... | -| Component diagram includes inventory table when enabled | **Invariant:** When the inventory is enabled, the document must include a Component Inventory table with Component,... | -| Empty architecture data shows guidance message | **Invariant:** When no patterns have architecture annotations, the document must display a guidance message... | - ---- ArchTagExtraction --- - -| Rule | Description | -| ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | -| arch-role tag is defined in the registry | **Invariant:** The tag registry must contain an arch-role tag with enum format and all valid architectural role... | -| arch-context tag is defined in the registry | **Invariant:** The tag registry must contain an arch-context tag with value format for free-form bounded context... | -| arch-layer tag is defined in the registry | **Invariant:** The tag registry must contain an arch-layer tag with enum format and exactly three values: domain,... | -| AST parser extracts arch-role from TypeScript annotations | **Invariant:** The AST parser must extract the arch-role value from JSDoc annotations and populate the directive's... | -| AST parser extracts arch-context from TypeScript annotations | **Invariant:** The AST parser must extract the arch-context value from JSDoc annotations and populate the directive's... | -| AST parser extracts arch-layer from TypeScript annotations | **Invariant:** The AST parser must extract the arch-layer value from JSDoc annotations and populate the directive's... | -| AST parser handles multiple arch tags together | **Invariant:** When a JSDoc block contains arch-role, arch-context, and arch-layer tags, all three must be extracted... | -| Missing arch tags yield undefined values | **Invariant:** Arch tag fields absent from a JSDoc block must be undefined in the extracted directive, not null or... | - ---- ArchIndexDataset --- - -| Rule | Description | -| ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | -| archIndex groups patterns by arch-role | **Invariant:** Every pattern with an arch-role tag must appear in the archIndex.byRole map under its role key.... | -| archIndex groups patterns by arch-context | **Invariant:** Every pattern with an arch-context tag must appear in the archIndex.byContext map under its context... | -| archIndex groups patterns by arch-layer | **Invariant:** Every pattern with an arch-layer tag must appear in the archIndex.byLayer map under its layer key.... | -| archIndex.all contains all patterns with any arch tag | **Invariant:** archIndex.all must contain exactly the set of patterns that have at least one arch tag (role, context,... | -| Patterns without arch tags are excluded from archIndex | **Invariant:** Patterns lacking all three arch tags (role, context, layer) must not appear in any archIndex view.... | - ---- TimelineCodecTesting --- - -| Rule | Description | -| ------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| RoadmapDocumentCodec groups patterns by phase with progress tracking | **Invariant:** The roadmap must include overall progress with percentage, phase navigation table, and phase sections... | -| CompletedMilestonesCodec shows only completed patterns grouped by quarter | **Invariant:** Only completed patterns appear, grouped by quarter with navigation, recent completions, and... | -| CurrentWorkCodec shows only active patterns with deliverables | **Invariant:** Only active patterns appear with progress bars, deliverable tracking, and an all-active-patterns... | - ---- ShapeSelectorTesting --- - -| Rule | Description | -| ------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------- | -| Reference doc configs select shapes via shapeSelectors | **Invariant:** shapeSelectors provides three selection modes: by
source path + specific names, by group tag, or... | - ---- ShapeMatcherTesting --- - -| Rule | Description | -| --------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | -| Exact paths match without wildcards | **Invariant:** A pattern without glob characters must match only the exact file path, character for character.... | -| Single-level globs match one directory level | **Invariant:** A single `*` glob must match files only within the specified directory, never crossing directory... | -| Recursive globs match any depth | **Invariant:** A `**` glob must match files at any nesting depth below the specified prefix, while still respecting... | -| Dataset shape extraction deduplicates by name | **Invariant:** When multiple patterns match a source glob, the returned shapes must be deduplicated by name so each... | - ---- SessionCodecTesting --- - -| Rule | Description | -| ------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------- | -| SessionContextCodec provides working context for AI sessions | **Invariant:** Session context must include session status with active/completed/remaining counts, phase navigation... | -| RemainingWorkCodec aggregates incomplete work by phase | **Invariant:** Remaining work must show status counts, phase-grouped navigation, priority classification... | - ---- RequirementsAdrCodecTesting --- - -| Rule | Description | -| ------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | -| RequirementsDocumentCodec generates PRD-style documentation from patterns | **Invariant:** RequirementsDocumentCodec transforms MasterDataset patterns into a PRD-style document with flexible... | -| AdrDocumentCodec documents architecture decisions | **Invariant:** AdrDocumentCodec transforms MasterDataset ADR patterns into an architecture decision record document... | - ---- ReportingCodecTesting --- - -| Rule | Description | -| ---------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | -| ChangelogCodec follows Keep a Changelog format | **Invariant:** Releases must be sorted by semver descending, unreleased patterns grouped under "[Unreleased]", and... | -| TraceabilityCodec maps timeline patterns to behavior tests | **Invariant:** Coverage statistics must show total timeline phases, those with behavior tests, those missing, and a... | -| OverviewCodec provides project architecture summary | **Invariant:** The overview must include architecture sections from overview-tagged patterns, pattern summary with... | - ---- ReferenceGeneratorTesting --- - -| Rule | Description | -| ------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------- | -| Registration produces the correct number of generators | **Invariant:** Each reference config produces exactly 2 generators (detailed + summary), plus meta-generators for... | -| Product area configs produce a separate meta-generator | **Invariant:** Configs with productArea set route to "product-area-docs" meta-generator; configs without route to... | -| Generator naming follows kebab-case convention | **Invariant:** Detailed generators end in "-reference" and summary generators end in "-reference-claude".... | -| Generator execution produces markdown output | **Invariant:** Every registered generator must produce at least one non-empty output file when given matching data.... | - ---- ReferenceCodecDiagramTesting --- - -| Rule | Description | -| ------------------------------------------------------- | ----------- | -| Scoped diagrams are generated from diagramScope config | | -| Multiple diagram scopes produce multiple mermaid blocks | | - ---- ReferenceCodecDiagramTypeTesting --- - -| Rule | Description | -| ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| Diagram type controls Mermaid output format | **Invariant:** The diagramType field on DiagramScope selects the Mermaid
output format. Supported types are graph... | -| Edge labels and custom node shapes enrich diagram readability | **Invariant:** Relationship edges display labels describing the relationship
type (uses, depends on, implements,... | - ---- ReferenceCodecDetailRendering --- - -| Rule | Description | -| ----------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | -| Standard detail level includes narrative but omits rationale | | -| Deep behavior rendering with structured annotations | | -| Shape JSDoc prose renders at standard and detailed levels | | -| Shape sections render param returns and throws documentation | | -| Collapsible blocks wrap behavior rules for progressive disclosure | **Invariant:** When a behavior pattern has 3 or more rules and detail level
is not summary, each rule's content... | -| Link-out blocks provide source file cross-references | **Invariant:** At standard and detailed levels, each behavior pattern includes
a link-out block referencing its... | -| Include tags route cross-cutting content into reference documents | **Invariant:** Patterns with matching include tags appear alongside
category-selected patterns in the behavior... | - ---- ReferenceCodecCoreTesting --- - -| Rule | Description | -| ---------------------------------------------------------------------- | ----------- | -| Empty datasets produce fallback content | | -| Convention content is rendered as sections | | -| Detail level controls output density | | -| Behavior sections are rendered from category-matching patterns | | -| Shape sources are extracted from matching patterns | | -| Convention and behavior content compose in a single document | | -| Composition order follows AD-5: conventions then shapes then behaviors | | -| Convention code examples render as mermaid blocks | | - ---- PrChangesCodecRenderingTesting --- - -| Rule | Description | -| ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| PrChangesCodec handles empty results gracefully | **Invariant:** When no patterns match the applied filters, the codec must produce a valid document with a "No... | -| PrChangesCodec generates summary with filter information | **Invariant:** Every PR changes document must contain a Summary section with pattern counts and active filter... | -| PrChangesCodec groups changes by phase when sortBy is "phase" | **Invariant:** When sortBy is "phase" (the default), patterns must be grouped under phase headings in ascending phase... | -| PrChangesCodec groups changes by priority when sortBy is "priority" | **Invariant:** When sortBy is "priority", patterns must be grouped under High/Medium/Low priority headings with... | -| PrChangesCodec shows flat list when sortBy is "workflow" | **Invariant:** When sortBy is "workflow", patterns must be rendered as a flat list without phase or priority... | -| PrChangesCodec renders pattern details with metadata and description | **Invariant:** Each pattern entry must include a metadata table (status, phase, business value when available) and... | -| PrChangesCodec renders deliverables when includeDeliverables is enabled | **Invariant:** Deliverables are only rendered when includeDeliverables is enabled, and when releaseFilter is set,... | -| PrChangesCodec renders acceptance criteria from scenarios | **Invariant:** When patterns have associated scenarios, the codec must render an "Acceptance Criteria" section... | -| PrChangesCodec renders business rules from Gherkin Rule keyword | **Invariant:** When patterns have Gherkin Rule blocks, the codec must render a "Business Rules" section containing... | - ---- PrChangesCodecOptionsTesting --- - -| Rule | Description | -| --------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| PrChangesCodec generates review checklist when includeReviewChecklist is enabled | **Invariant:** When includeReviewChecklist is enabled, the codec must generate a "Review Checklist" section with... | -| PrChangesCodec generates dependencies section when includeDependencies is enabled | **Invariant:** When includeDependencies is enabled and patterns have dependency relationships, the codec must render... | -| PrChangesCodec filters patterns by changedFiles | **Invariant:** When changedFiles filter is set, only patterns whose source files match (including partial directory... | -| PrChangesCodec filters patterns by releaseFilter | **Invariant:** When releaseFilter is set, only patterns with deliverables matching the specified release version are... | -| PrChangesCodec uses OR logic for combined filters | **Invariant:** When both changedFiles and releaseFilter are set, patterns matching either criterion are included (OR... | -| PrChangesCodec only includes active and completed patterns | **Invariant:** The codec must exclude roadmap and deferred patterns, including only active and completed patterns in... | - ---- PlanningCodecTesting --- - -| Rule | Description | -| ----------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| PlanningChecklistCodec prepares for implementation sessions | **Invariant:** The checklist must include pre-planning questions, definition of done with deliverables, and... | -| SessionPlanCodec generates implementation plans | **Invariant:** The plan must include status summary, implementation approach from use cases, deliverables with... | -| SessionFindingsCodec captures retrospective discoveries | **Invariant:** Findings must be categorized into gaps, improvements, risks, and learnings with per-type counts in the... | - ---- DedentHelper --- - -| Rule | Description | -| ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| Tabs are normalized to spaces before dedent | **Invariant:** Tab characters must be converted to spaces before calculating the minimum indentation level.... | -| Empty lines are handled correctly | **Invariant:** Empty lines (including lines with only whitespace) must not affect the minimum indentation calculation... | -| Single line input is handled | **Invariant:** Single-line input must have its leading whitespace removed without errors or unexpected... | -| Unicode whitespace is handled | **Invariant:** Non-breaking spaces and other Unicode whitespace characters must be treated as content, not as... | -| Relative indentation is preserved | **Invariant:** After removing the common leading whitespace, the relative indentation between lines must remain... | - ---- ConventionExtractorTesting --- - -| Rule | Description | -| ------------------------------------------------------------ | ----------- | -| Empty and missing inputs produce empty results | | -| Convention bundles are extracted from matching patterns | | -| Structured content is extracted from rule descriptions | | -| Code examples in rule descriptions are preserved | | -| TypeScript JSDoc conventions are extracted alongside Gherkin | | - ---- CompositeCodecTesting --- - -| Rule | Description | -| --------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | -| CompositeCodec concatenates sections in codec array order | **Invariant:** Sections from child codecs appear in the composite
output in the same order as the codecs array.... | -| Separators between codec outputs are configurable | **Invariant:** By default, a separator block is inserted between
each child codec's sections. When... | -| additionalFiles merge with last-wins semantics | **Invariant:** additionalFiles from all children are merged into
a single record. When keys collide, the later... | -| composeDocuments works at document level without codecs | **Invariant:** composeDocuments accepts RenderableDocument array and
produces a composed RenderableDocument... | -| Empty codec outputs are handled gracefully | **Invariant:** Codecs producing empty sections arrays contribute
nothing to the output. No separator is emitted... | diff --git a/docs-live/_claude-md/process/process-overview.md b/docs-live/_claude-md/process/process-overview.md index 2fd00769..a32dd1f1 100644 --- a/docs-live/_claude-md/process/process-overview.md +++ b/docs-live/_claude-md/process/process-overview.md @@ -1,18 +1,15 @@ -=== PROCESS OVERVIEW === - -Purpose: Process product area overview -Detail Level: Compact summary +### Process Overview **How does the session workflow work?** Process defines the USDP-inspired session workflow that governs how work moves through the delivery lifecycle. Three session types (planning, design, implementation) have fixed input/output contracts: planning creates roadmap specs from pattern briefs, design produces code stubs and decision records, and implementation writes code against scope-locked specs. Git is the event store — documentation artifacts are projections of annotated source code, not hand-maintained files. The FSM enforces state transitions (roadmap → active → completed) with escalating protection levels, while handoff templates preserve context across LLM session boundaries. ADR-003 established that TypeScript source owns pattern identity; tier 1 specs are ephemeral planning documents that lose value after completion. -=== KEY INVARIANTS === +#### Key Invariants - TypeScript source owns pattern identity: `@libar-docs-pattern` in TypeScript defines the pattern. Tier 1 specs are ephemeral working documents - 7 canonical product-area values: Annotation, Configuration, Generation, Validation, DataAPI, CoreTypes, Process — reader-facing sections, not source modules - Two distinct status domains: Pattern FSM status (4 values) vs. deliverable status (6 values). Never cross domains - Session types define capabilities: planning creates specs, design creates stubs, implementation writes code. Each session type has a fixed input/output contract enforced by convention -=== PRODUCT AREA CANONICAL VALUES === +#### Product area canonical values **Invariant:** The product-area tag uses one of 7 canonical values. Each value represents a reader-facing documentation section, not a source module. @@ -26,7 +23,7 @@ Detail Level: Compact summary | CoreTypes | What foundational types exist? | Result monad, error factories, string utils | | Process | How does the session workflow work? | Session lifecycle, handoffs, conventions | -=== ADR CATEGORY CANONICAL VALUES === +#### ADR category canonical values **Invariant:** The adr-category tag uses one of 4 values. @@ -37,7 +34,7 @@ Detail Level: Compact summary | testing | Test strategy, verification approach | | documentation | Documentation generation, content structure | -=== FSM STATUS VALUES AND PROTECTION LEVELS === +#### FSM status values and protection levels **Invariant:** Pattern status uses exactly 4 values with defined protection levels. These are enforced by Process Guard at commit time. @@ -48,9 +45,9 @@ Detail Level: Compact summary | completed | Hard-locked | No | Requires unlock-reason tag | | deferred | None | Yes | Full editing | -=== VALID FSM TRANSITIONS === +#### Valid FSM transitions -**Invariant:** Only these transitions are valid. All others are rejected by Process Guard. Completed is a terminal state. Modifications require `@libar-docs-unlock-reason` escape hatch. +**Invariant:** Only these transitions are valid. All others are rejected by Process Guard. | From | To | Trigger | | -------- | --------- | --------------------- | @@ -60,7 +57,7 @@ Detail Level: Compact summary | active | roadmap | Blocked/regressed | | deferred | roadmap | Resume planning | -=== TAG FORMAT TYPES === +#### Tag format types **Invariant:** Every tag has one of 6 format types that determines how its value is parsed. @@ -73,7 +70,7 @@ Detail Level: Compact summary | number | Numeric value | @libar-docs-phase 15 | | quoted-value | Preserves spaces | @libar-docs-brief:'Multi word' | -=== SOURCE OWNERSHIP === +#### Source ownership **Invariant:** Relationship tags have defined ownership by source type. Anti-pattern detection enforces these boundaries. @@ -84,11 +81,11 @@ Detail Level: Compact summary | quarter | Feature files | TypeScript | Gherkin owns timeline metadata | | team | Feature files | TypeScript | Gherkin owns ownership metadata | -=== QUARTER FORMAT CONVENTION === +#### Quarter format convention **Invariant:** The quarter tag uses `YYYY-QN` format (e.g., `2026-Q1`). ISO-year-first sorting works lexicographically. -=== CANONICAL PHASE DEFINITIONS (6-PHASE USDP STANDARD) === +#### Canonical phase definitions (6-phase USDP standard) **Invariant:** The default workflow defines exactly 6 phases in fixed order. These are the canonical phase names and ordinals used by all generated documentation. @@ -101,7 +98,7 @@ Detail Level: Compact summary | 5 | Validation | Verification, acceptance criteria confirmation | | 6 | Retrospective | Review, lessons learned, documentation | -=== DELIVERABLE STATUS CANONICAL VALUES === +#### Deliverable status canonical values **Invariant:** Deliverable status (distinct from pattern FSM status) uses exactly 6 values, enforced by Zod schema at parse time. @@ -114,89 +111,4 @@ Detail Level: Compact summary | superseded | Replaced by another | | n/a | Not applicable | -=== BEHAVIOR SPECIFICATIONS === - ---- StepDefinitionCompletion --- - -| Rule | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | -| Generator-related specs need step definitions for output validation | **Invariant:** Step definitions test actual codec output against expected structure.
Factory functions from... | -| Renderable helper specs need step definitions for utility functions | **Invariant:** Helper functions are pure and easy to unit test.
Step definitions should test edge cases... | -| Remaining specs in other directories need step definitions | **Existing Specs:**
- `tests/features/generators/table-extraction.feature`
-... | -| Step definition implementation follows project patterns | **Pattern:** All step definitions should follow the established patterns in
existing .steps.ts files for... | - ---- SessionFileCleanup --- - -| Rule | Description | -| -------------------------------------------------- | ----------- | -| Cleanup triggers during session-context generation | | -| Only phase-\*.md files are candidates for cleanup | | -| Cleanup failures are non-fatal | | - ---- MvpWorkflowImplementation --- - -| Rule | Description | -| ------------------------------------ | ----------- | -| PDR-005 status values are recognized | | -| Generators map statuses to documents | | - ---- LivingRoadmapCLI --- - ---- EffortVarianceTracking --- - ---- CliBehaviorTesting --- - -| Rule | Description | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| generate-docs handles all argument combinations correctly | **Invariant:** Invalid arguments produce clear error messages with usage hints.
Valid arguments produce expected... | -| lint-patterns validates annotation quality with configurable strictness | **Invariant:** Lint violations are reported with file, line, and severity.
Exit codes reflect violation presence... | -| validate-patterns performs cross-source validation with DoD checks | **Invariant:** DoD and anti-pattern violations are reported per phase.
Exit codes reflect validation state.... | -| All CLIs handle errors consistently with DocError pattern | **Invariant:** Errors include type, file, line (when applicable), and reason.
Unknown errors are caught and... | - ---- ADR003SourceFirstPatternArchitecture --- - -| Rule | Description | -| -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| TypeScript source owns pattern identity | **Invariant:** A pattern is defined by `@libar-docs-pattern` in a TypeScript
file — either a stub... | -| Tier 1 specs are ephemeral working documents | **Invariant:** Tier 1 roadmap specs serve planning and delivery tracking.
They are not the source of truth for... | -| Three durable artifact types | **Invariant:** The delivery process produces three artifact types with
long-term value. All other artifacts are... | -| Implements is UML Realization (many-to-one) | **Invariant:** `@libar-docs-implements` declares a realization relationship.
Multiple files can implement the... | -| Single-definition constraint | **Invariant:** `@libar-docs-pattern:X` may appear in exactly one file
across the entire codebase. The... | -| Reverse links preferred over forward links | **Invariant:** `@libar-docs-implements` (reverse: "I verify this pattern")
is the primary traceability mechanism.... | - ---- ADR002GherkinOnlyTesting --- - -| Rule | Description | -| ----------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| Source-driven process benefit | **Invariant:** Feature files serve as both executable specs and
documentation source. This dual purpose is the... | - ---- ADR001TaxonomyCanonicalValues --- - -| Rule | Description | -| --------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -| Product area canonical values | **Invariant:** The product-area tag uses one of 7 canonical values.
Each value represents a reader-facing... | -| ADR category canonical values | **Invariant:** The adr-category tag uses one of 4 values.

\| Value \| Purpose \|
\| architecture \| System... | -| FSM status values and protection levels | **Invariant:** Pattern status uses exactly 4 values with defined
protection levels. These are enforced by Process... | -| Valid FSM transitions | **Invariant:** Only these transitions are valid. All others are
rejected by Process Guard.

\| From \| To \|... | -| Tag format types | **Invariant:** Every tag has one of 6 format types that determines
how its value is parsed.

\| Format \|... | -| Source ownership | **Invariant:** Relationship tags have defined ownership by source type.
Anti-pattern detection enforces these... | -| Quarter format convention | **Invariant:** The quarter tag uses `YYYY-QN` format (e.g., `2026-Q1`).
ISO-year-first sorting works... | -| Canonical phase definitions (6-phase USDP standard) | **Invariant:** The default workflow defines exactly 6 phases in fixed
order. These are the canonical phase names... | -| Deliverable status canonical values | **Invariant:** Deliverable status (distinct from pattern FSM status)
uses exactly 6 values, enforced by Zod... | - ---- SessionHandoffs --- - -| Rule | Description | -| ------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| Handoff context generation captures session state | **Invariant:** Active phases with handoff context enabled must include session handoff sections with template and... | -| Handoff templates and checklists contain required sections | **Invariant:** Session handoff template and retrospective checklist must exist and contain all required sections for... | -| PROCESS_SETUP.md documents handoff and coordination protocols | **Invariant:** PROCESS_SETUP.md must document both session handoff protocol and multi-developer coordination... | -| Edge cases and acceptance criteria ensure robustness | **Invariant:** Handoff context must degrade gracefully when no discoveries exist and must be disableable. Mid-phase... | - ---- SessionFileLifecycle --- - -| Rule | Description | -| ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| Orphaned session files are removed during generation | **Invariant:** Only session files for active phases are preserved; all other phase files must be deleted during... | -| Cleanup handles edge cases without errors | **Invariant:** Cleanup must be idempotent, tolerate missing directories, and produce empty results when no phases are... | -| Deleted files are tracked in cleanup results | **Invariant:** The cleanup result must include the relative paths of all deleted session files for transparency and... | +**Components:** Other (ValidatorReadModelConsolidation, StepDefinitionCompletion, SessionFileCleanup, ProcessAPILayeredExtraction, OrchestratorPipelineFactoryMigration, MvpWorkflowImplementation, LivingRoadmapCLI, EffortVarianceTracking, ConfigBasedWorkflowDefinition, CliBehaviorTesting, ADR006SingleReadModelArchitecture, ADR003SourceFirstPatternArchitecture, ADR002GherkinOnlyTesting, ADR001TaxonomyCanonicalValues, SessionHandoffs, SessionFileLifecycle) diff --git a/docs-live/_claude-md/validation/validation-overview.md b/docs-live/_claude-md/validation/validation-overview.md index c108efe3..b927aa87 100644 --- a/docs-live/_claude-md/validation/validation-overview.md +++ b/docs-live/_claude-md/validation/validation-overview.md @@ -1,18 +1,17 @@ -=== VALIDATION OVERVIEW === - -Purpose: Validation product area overview -Detail Level: Compact summary +### Validation Overview **How is the workflow enforced?** Validation is the enforcement boundary — it ensures that every change to annotated source files respects the delivery lifecycle rules defined by the FSM, protection levels, and scope constraints. The system operates in three layers: the FSM validator checks status transitions against a 4-state directed graph, the Process Guard orchestrates commit-time validation using a Decider pattern (state derived from annotations, not stored separately), and the lint engine provides pluggable rule execution with pretty and JSON output. Anti-pattern detection enforces dual-source ownership boundaries — `@libar-docs-uses` belongs on TypeScript, `@libar-docs-depends-on` belongs on Gherkin — preventing cross-domain tag confusion that causes documentation drift. Definition of Done validation ensures completed patterns have all deliverables marked done and at least one acceptance-criteria scenario. -=== KEY INVARIANTS === +#### Key Invariants - Protection levels: `roadmap`/`deferred` = none (fully editable), `active` = scope-locked (no new deliverables), `completed` = hard-locked (requires `@libar-docs-unlock-reason`) - Valid FSM transitions: Only roadmap→active, roadmap→deferred, active→completed, active→roadmap, deferred→roadmap. Completed is terminal - Decider pattern: All validation is (state, changes, options) → result. State is derived from annotations, not maintained separately - Dual-source ownership: Anti-pattern detection enforces tag boundaries — `uses` on TypeScript (runtime deps), `depends-on`/`quarter`/`team` on Gherkin (planning metadata). Violations are flagged before they cause documentation drift -=== API TYPES === +**Components:** Lint (LintRules, LintEngine, ProcessGuardDecider), Validation (DoDValidator, AntiPatternDetector, FSMValidator, FSMTransitions, FSMStates) + +#### API Types | Type | Kind | | ---------------------------------- | --------- | @@ -36,204 +35,3 @@ Detail Level: Compact summary | filterRulesBySeverity | function | | isValidTransition | function | | getValidTransitionsFrom | function | - -=== BEHAVIOR SPECIFICATIONS === - ---- ValidatorReadModelConsolidation --- - -| Rule | Description | -| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| Validator queries the read model for cross-source matching | **Invariant:** Pattern identity resolution — including implements
relationships in both directions — uses... | -| No lossy local types in the validator | **Invariant:** The validator operates on `ExtractedPattern` from the
MasterDataset, not a consumer-local DTO that... | -| Utility patterns without specs are not false positives | **Invariant:** Internal utility patterns that have a `@libar-docs-phase`
but will never have a Gherkin spec... | - ---- StreamingGitDiff --- - -| Rule | Description | -| ----------------------------------------------- | ----------- | -| Git commands stream output instead of buffering | | -| Diff content is parsed as it streams | | -| Streaming errors are handled gracefully | | - ---- StepLintVitestCucumber --- - -| Rule | Description | -| ---------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| Hash comments inside description pseudo-code-blocks are detected | **Invariant:** A # at the start of a line inside a """ block within a
Feature or Rule description terminates the... | -| Duplicate And steps in the same scenario are detected | **Invariant:** Multiple And steps with identical text in the same
scenario cause vitest-cucumber step matching... | -| Dollar sign in step text is detected | **Invariant:** The $ character in step text causes matching issues
in vitest-cucumber's expression parser.... | -| Regex step patterns are detected | **Invariant:** vitest-cucumber only supports string patterns with
{string} and {int}. Regex patterns throw... | -| Unsupported phrase type is detected | **Invariant:** vitest-cucumber does not support {phrase}. Use {string}
with quoted values in the feature file.... | -| ScenarioOutline function params are detected | **Invariant:** ScenarioOutline step callbacks must use the variables
object, not function params. Using (\_ctx,... | -| Missing And destructuring is detected | **Invariant:** If a feature file has And steps, the step definition
must destructure And from the scenario... | -| Missing Rule wrapper is detected | **Invariant:** If a feature file has Rule: blocks, the step definition
must destructure Rule from... | -| Feature-to-step pairing resolves both loadFeature patterns | **Invariant:** Step files use two loadFeature patterns: simple string
paths and resolve(\_\_dirname, relative)... | - ---- StepLintExtendedRules --- - -| Rule | Description | -| -------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| Hash in step text is detected | **Invariant:** A hash character in the middle of a Gherkin step line
can be interpreted as a comment by some... | -| Gherkin keywords in description text are detected | **Invariant:** A Feature or Rule description line that starts with
Given, When, Then, And, or But breaks the... | -| Scenario Outline steps with quoted values are detected | **Invariant:** When a feature file has a Scenario Outline and its
steps use quoted values instead of... | -| Repeated step patterns in the same scenario are detected | **Invariant:** Registering the same step pattern twice in one
Scenario block causes vitest-cucumber to overwrite... | - ---- StatusAwareEslintSuppression --- - -| Rule | Description | -| ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| File status determines unused-vars enforcement | **Invariant:** Files with `@libar-docs-status roadmap` or `deferred` have relaxed
unused-vars rules. Files with... | -| Reuses deriveProcessState for status extraction | **Invariant:** Status extraction logic must be shared with Process Guard Linter.
No duplicate parsing or... | -| ESLint Processor filters messages based on status | **Invariant:** The processor uses ESLint's postprocess hook to filter or downgrade
messages. Source code is never... | -| CLI can generate static ESLint ignore list | **Invariant:** Running `pnpm lint:process --eslint-ignores` outputs a list of files
that should have relaxed... | -| Replaces directory-based ESLint exclusions | **Invariant:** After implementation, the directory-based exclusions in eslint.config.js
(lines 30-57) are... | -| Rule relaxation is configurable | **Invariant:** The set of rules relaxed for roadmap/deferred files is configurable,
defaulting to... | - ---- ReleaseAssociationRules --- - -| Rule | Description | -| ----------------------------------------------------- | ----------- | -| Spec files must not contain release columns | | -| TypeScript phase files must have required annotations | | -| Release version follows semantic versioning | | - ---- ProgressiveGovernance --- - ---- ProcessGuardLinter --- - -| Rule | Description | -| ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| Protection levels determine modification restrictions | Files inherit protection from their `@libar-docs-status` tag. Higher
protection levels require explicit unlock to... | -| Session definition files scope what can be modified | Optional session files (`delivery-process/sessions/*.feature`) explicitly
declare which specs are in-scope for... | -| Status transitions follow PDR-005 FSM | Status changes in a file must follow a valid transition per PDR-005.
This extends phase-state-machine.feature to... | -| Active specs cannot add new deliverables | Once a spec transitions to `active`, its deliverables table is
considered scope-locked. Adding new rows indicates... | -| CLI provides flexible validation modes | | -| Integrates with existing lint infrastructure | | -| New tags support process guard functionality | The following tags are defined in the TypeScript taxonomy to support process guard: | - ---- PhaseStateMachineValidation --- - -| Rule | Description | -| --------------------------------------------- | ----------- | -| Valid status values are enforced | | -| Status transitions follow state machine rules | | -| Terminal states require completion metadata | | - ---- PhaseNumberingConventions --- - -| Rule | Description | -| --------------------------------------------- | ----------- | -| Phase numbers must be unique within a release | | -| Phase number gaps are detected | | -| CLI suggests next available phase number | | - ---- DoDValidation --- - ---- LintRuleIndividualTesting --- - -| Rule | Description | -| --------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | -| Files must declare an explicit pattern name | **Invariant:** Every annotated file must have a non-empty patternName to be identifiable in the registry.... | -| Files should declare a lifecycle status | **Invariant:** Every annotated file should have a status tag to track its position in the delivery lifecycle.... | -| Files should document when to use the pattern | **Invariant:** Annotated files should include whenToUse guidance so consumers know when to apply the pattern.... | -| Files should declare relationship tags | **Invariant:** Annotated files should declare uses or usedBy relationships to enable dependency tracking and... | - ---- LintRuleAdvancedTesting --- - -| Rule | Description | -| ----------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| Descriptions must not repeat the pattern name | **Invariant:** A description that merely echoes the pattern name adds no value and must be rejected.... | -| Default rules collection is complete and well-ordered | **Invariant:** The default rules collection must contain all defined rules with unique IDs, ordered by severity... | -| Rules can be filtered by minimum severity | **Invariant:** Filtering by severity must return only rules at or above the specified level.
**Rationale:** CI... | - ---- LintEngineTesting --- - -| Rule | Description | -| --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| Single directive linting validates annotations against rules | **Invariant:** Every directive is checked against all provided rules and violations include source location.... | -| Multi-file batch linting aggregates results across files | **Invariant:** All files and directives are scanned, violations are collected per file, and severity counts are... | -| Failure detection respects strict mode for severity escalation | **Invariant:** Errors always indicate failure. Warnings only indicate failure in strict mode. Info never indicates... | -| Violation sorting orders by severity then by line number | **Invariant:** Sorted output places errors first, then warnings, then info, with stable line-number ordering within... | -| Pretty formatting produces human-readable output with severity counts | **Invariant:** Pretty output includes file paths, line numbers, severity labels, rule IDs, and summary counts. Quiet... | -| JSON formatting produces machine-readable output with full details | **Invariant:** JSON output is valid, includes all summary fields, and preserves violation details including file,... | - ---- StatusTransitionDetectionTesting --- - -| Rule | Description | -| ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| Status transitions are detected from file-level tags | **Invariant:** Status transitions must be detected by comparing @libar-docs-status tags at the file level between the... | -| Status tags inside docstrings are ignored | **Invariant:** Status tags appearing inside Gherkin docstring blocks (between triple-quote delimiters) must not be... | -| First valid status tag outside docstrings is used | **Invariant:** When multiple status tags appear outside docstrings, only the first one determines the file's status.... | -| Line numbers are tracked from hunk headers | **Invariant:** Detected status transitions must include the line number where the status tag appears, derived from... | -| Generated documentation directories are excluded | **Invariant:** Files in generated documentation directories (docs-generated/, docs-living/) must be excluded from... | - ---- ProcessGuardTesting --- - -| Rule | Description | -| --------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | -| Completed files require unlock-reason to modify | **Invariant:** A completed spec file cannot be modified unless it carries an @libar-docs-unlock-reason tag.... | -| Status transitions must follow PDR-005 FSM | **Invariant:** Status changes must follow the directed graph: roadmap->active->completed, roadmap<->deferred,... | -| Active specs cannot add new deliverables | **Invariant:** A spec in active status cannot have deliverables added that were not present when it entered active.... | -| Files outside active session scope trigger warnings | **Invariant:** Files modified outside the active session's declared scope produce a session-scope warning.... | -| Explicitly excluded files trigger errors | **Invariant:** Files explicitly excluded from a session cannot be modified, producing a session-excluded error.... | -| Multiple rules validate independently | **Invariant:** Each validation rule evaluates independently — a single file can produce violations from multiple... | - ---- FSMValidatorTesting --- - -| Rule | Description | -| ---------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| Status values must be valid PDR-005 FSM states | **Invariant:** Every pattern status value must be one of the states defined in the PDR-005 finite state machine... | -| Status transitions must follow FSM rules | **Invariant:** Every status change must follow a valid edge in the PDR-005 state machine graph — no skipping states... | -| Completed patterns should have proper metadata | **Invariant:** Patterns in completed status must carry completion date and actual effort metadata to pass validation... | -| Protection levels match FSM state definitions | **Invariant:** Each FSM state must map to exactly one protection level (none, scope-locked, or hard-locked) as... | -| Combined validation provides complete results | **Invariant:** The FSM validator must return a combined result including status validity, transition validity,... | - ---- DoDValidatorTesting --- - -| Rule | Description | -| ------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------- | -| Deliverable completion uses canonical status taxonomy | **Invariant:** Deliverable completion status must be determined exclusively using the 6 canonical values from the... | -| Acceptance criteria must be tagged with @acceptance-criteria | **Invariant:** Every completed pattern must have at least one scenario tagged with @acceptance-criteria in its... | -| Acceptance criteria scenarios can be extracted by name | **Invariant:** The validator must be able to extract scenario names from @acceptance-criteria-tagged scenarios for... | -| DoD requires all deliverables complete and AC present | **Invariant:** A pattern passes Definition of Done only when ALL deliverables have complete status AND at least one... | -| DoD can be validated across multiple completed phases | **Invariant:** DoD validation must evaluate all completed phases independently and report per-phase pass/fail... | -| Summary can be formatted for console output | **Invariant:** DoD validation results must be renderable as structured console output showing phase-level pass/fail... | - ---- DetectChangesTesting --- - -| Rule | Description | -| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| Status changes are detected as modifications not additions | **Invariant:** When a deliverable's status value changes between versions, the change detector must classify it as a... | -| New deliverables are detected as additions | **Invariant:** Deliverables present in the new version but absent in the old version must be classified as... | -| Removed deliverables are detected as removals | **Invariant:** Deliverables present in the old version but absent in the new version must be classified as removals.... | -| Mixed changes are correctly categorized | **Invariant:** When a single diff contains additions, removals, and modifications simultaneously, each change must be... | -| Non-deliverable tables are ignored | **Invariant:** Changes to non-deliverable tables (e.g., ScenarioOutline Examples tables) must not be detected as... | - ---- ConfigSchemaValidation --- - -| Rule | Description | -| ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| ScannerConfigSchema validates scanner configuration | **Invariant:** Scanner configuration must contain at least one valid glob pattern with no parent directory traversal,... | -| GeneratorConfigSchema validates generator configuration | **Invariant:** Generator configuration must use a .json registry file and an output directory that does not escape... | -| isScannerConfig type guard narrows unknown values | **Invariant:** isScannerConfig returns true only for objects that have a non-empty patterns array and a string... | -| isGeneratorConfig type guard narrows unknown values | **Invariant:** isGeneratorConfig returns true only for objects that have a string outputDir and a .json... | - ---- AntiPatternDetectorTesting --- - -| Rule | Description | -| ----------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| Process metadata should not appear in TypeScript code | **Invariant:** Process metadata tags (@libar-docs-status, @libar-docs-phase, etc.) must only appear in Gherkin... | -| Generator hints should not appear in feature files | **Invariant:** Feature files must not contain generator magic comments beyond a configurable threshold.... | -| Feature files should not have excessive scenarios | **Invariant:** A single feature file must not exceed the configured maximum scenario count.
**Rationale:**... | -| Feature files should not exceed size thresholds | **Invariant:** A single feature file must not exceed the configured maximum line count.
**Rationale:**... | -| All anti-patterns can be detected in one pass | **Invariant:** The anti-pattern detector must evaluate all registered rules in a single scan pass over the source... | -| Violations can be formatted for console output | **Invariant:** Anti-pattern violations must be renderable as grouped, human-readable console output.... | - ---- LinterValidationTesting --- - -| Rule | Description | -| ----------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| Pattern cannot implement itself (circular reference) | **Invariant:** A pattern's implements tag must reference a different pattern than its own pattern tag.... | -| Relationship targets should exist (strict mode) | **Invariant:** Every relationship target must reference a pattern that exists in the known pattern registry when... | -| Bidirectional traceability links should be consistent | **Invariant:** Every forward traceability link (executable-specs, roadmap-spec) must have a corresponding back-link... | -| Parent references must be valid | **Invariant:** A pattern's parent reference must point to an existing epic pattern in the registry.
\*\*Verified... | diff --git a/docs-live/decisions/adr-001-taxonomy-canonical-values.md b/docs-live/decisions/adr-001-taxonomy-canonical-values.md index ebdc98c6..3544b6b8 100644 --- a/docs-live/decisions/adr-001-taxonomy-canonical-values.md +++ b/docs-live/decisions/adr-001-taxonomy-canonical-values.md @@ -37,6 +37,8 @@ These are the durable constants of the delivery process. **Invariant:** The product-area tag uses one of 7 canonical values. Each value represents a reader-facing documentation section, not a source module. +**Rationale:** Without canonical values, organic drift (e.g., Generator vs Generators) produces inconsistent grouping in generated documentation and fragmented product area pages. + | Value | Reader Question | Covers | | ------------- | ----------------------------------- | ----------------------------------------------- | | Annotation | How do I annotate code? | Scanning, extraction, tag parsing, dual-source | @@ -51,6 +53,8 @@ These are the durable constants of the delivery process. **Invariant:** The adr-category tag uses one of 4 values. +**Rationale:** Unbounded category values prevent meaningful grouping of architecture decisions and make cross-cutting queries unreliable. + | Value | Purpose | | ------------- | --------------------------------------------- | | architecture | System structure, component design, data flow | @@ -62,6 +66,8 @@ These are the durable constants of the delivery process. **Invariant:** Pattern status uses exactly 4 values with defined protection levels. These are enforced by Process Guard at commit time. +**Rationale:** Without protection levels, active specs accumulate scope creep and completed specs get silently modified, undermining delivery process integrity. + | Status | Protection | Can Add Deliverables | Allowed Actions | | --------- | ------------ | -------------------- | ------------------------------- | | roadmap | None | Yes | Full editing | @@ -71,7 +77,9 @@ These are the durable constants of the delivery process. ### Valid FSM transitions -**Invariant:** Only these transitions are valid. All others are rejected by Process Guard. Completed is a terminal state. Modifications require `@libar-docs-unlock-reason` escape hatch. +**Invariant:** Only these transitions are valid. All others are rejected by Process Guard. + +**Rationale:** Allowing arbitrary transitions (e.g., roadmap to completed) bypasses the active phase where scope-lock and deliverable tracking provide quality assurance. Completed is a terminal state. Modifications require `@libar-docs-unlock-reason` escape hatch. | From | To | Trigger | | -------- | --------- | --------------------- | @@ -85,6 +93,8 @@ These are the durable constants of the delivery process. **Invariant:** Every tag has one of 6 format types that determines how its value is parsed. +**Rationale:** Without explicit format types, parsers must guess value structure, leading to silent data corruption when CSV values are treated as single strings or numbers are treated as text. + | Format | Parsing | Example | | ------------ | ------------------------------ | ------------------------------ | | flag | Boolean presence, no value | @libar-docs-core | @@ -98,6 +108,8 @@ These are the durable constants of the delivery process. **Invariant:** Relationship tags have defined ownership by source type. Anti-pattern detection enforces these boundaries. +**Rationale:** Cross-domain tag placement (e.g., runtime dependencies in Gherkin) creates conflicting sources of truth and breaks the dual-source architecture ownership model. + | Tag | Correct Source | Wrong Source | Rationale | | ---------- | -------------- | ------------- | ---------------------------------- | | uses | TypeScript | Feature files | TS owns runtime dependencies | @@ -109,10 +121,14 @@ These are the durable constants of the delivery process. **Invariant:** The quarter tag uses `YYYY-QN` format (e.g., `2026-Q1`). ISO-year-first sorting works lexicographically. +**Rationale:** Non-standard formats (e.g., Q1-2026) break lexicographic sorting, which roadmap generation and timeline queries depend on for correct ordering. + ### Canonical phase definitions (6-phase USDP standard) **Invariant:** The default workflow defines exactly 6 phases in fixed order. These are the canonical phase names and ordinals used by all generated documentation. +**Rationale:** Ad-hoc phase names and ordering produce inconsistent roadmap grouping across packages and make cross-package progress tracking impossible. + | Order | Phase | Purpose | | ----- | ------------- | ---------------------------------------------- | | 1 | Inception | Problem framing, scope definition | @@ -126,6 +142,8 @@ These are the durable constants of the delivery process. **Invariant:** Deliverable status (distinct from pattern FSM status) uses exactly 6 values, enforced by Zod schema at parse time. +**Rationale:** Freeform status strings bypass Zod validation and break DoD checks, which rely on terminal status classification to determine pattern completeness. + | Value | Meaning | | ----------- | -------------------- | | complete | Work is done | diff --git a/docs-live/decisions/adr-002-gherkin-only-testing.md b/docs-live/decisions/adr-002-gherkin-only-testing.md index 8cde14d6..d1291ba9 100644 --- a/docs-live/decisions/adr-002-gherkin-only-testing.md +++ b/docs-live/decisions/adr-002-gherkin-only-testing.md @@ -39,6 +39,8 @@ Enforce strict Gherkin-only testing for the delivery-process package: **Invariant:** Feature files serve as both executable specs and documentation source. This dual purpose is the primary benefit of Gherkin-only testing for this package. +**Rationale:** Parallel `.test.ts` files create a hidden test layer invisible to the documentation pipeline, undermining the single source of truth principle this package enforces. + | Artifact | Without Gherkin-Only | With Gherkin-Only | | ------------------- | --------------------------- | ---------------------------------- | | Tests | .test.ts (hidden from docs) | .feature (visible in docs) | diff --git a/docs-live/decisions/adr-003-source-first-pattern-architecture.md b/docs-live/decisions/adr-003-source-first-pattern-architecture.md index cb5e3e73..0d1a462a 100644 --- a/docs-live/decisions/adr-003-source-first-pattern-architecture.md +++ b/docs-live/decisions/adr-003-source-first-pattern-architecture.md @@ -41,6 +41,8 @@ artifacts are annotated source code, executable specs, and decision specs. **Invariant:** A pattern is defined by `@libar-docs-pattern` in a TypeScript file — either a stub (pre-implementation) or source code (post-implementation). +**Rationale:** If pattern identity lives in tier 1 specs, it becomes stale after implementation and diverges from the code that actually realizes the pattern. + | Phase | Location | Status | | -------------- | -------------------------------------- | --------- | | Design | `delivery-process/stubs/pattern-name/` | roadmap | @@ -57,6 +59,8 @@ artifacts are annotated source code, executable specs, and decision specs. **Invariant:** Tier 1 roadmap specs serve planning and delivery tracking. They are not the source of truth for pattern identity, invariants, or acceptance criteria. After completion, they may be archived. +**Rationale:** Treating tier 1 specs as durable creates a maintenance burden — at scale only 39% maintain traceability, and duplicated Rules/Scenarios average 200-400 stale lines. + | Phase | Planning Value | Documentation Value | | --------- | ----------------------------- | ---------------------------------- | | roadmap | High | None (not yet built) | @@ -69,6 +73,8 @@ artifacts are annotated source code, executable specs, and decision specs. **Invariant:** The delivery process produces three artifact types with long-term value. All other artifacts are projections or ephemeral. +**Rationale:** Without a clear boundary between durable and ephemeral artifacts, teams maintain redundant documents that inevitably drift from the source of truth. + | Artifact | Purpose | Owns | | ------------------------ | ------------------------------------ | ------------------------------------- | | Annotated TypeScript | Pattern identity, architecture graph | Name, status, uses, categories | @@ -79,6 +85,8 @@ artifacts are annotated source code, executable specs, and decision specs. **Invariant:** `@libar-docs-implements` declares a realization relationship. Multiple files can implement the same pattern. One file can implement multiple patterns (CSV format). +**Rationale:** Without many-to-one realization, cross-cutting patterns that span multiple files cannot be traced back to a single canonical definition. + | Relationship | Tag | Cardinality | | ------------ | ------------------------ | ----------------------- | | Definition | `@libar-docs-pattern` | Exactly one per pattern | @@ -88,6 +96,8 @@ artifacts are annotated source code, executable specs, and decision specs. **Invariant:** `@libar-docs-pattern:X` may appear in exactly one file across the entire codebase. The `mergePatterns()` conflict check in `orchestrator.ts` correctly enforces this. +**Rationale:** Duplicate pattern definitions cause merge conflicts in the MasterDataset and produce ambiguous ownership in generated documentation. + | Current State | Resolution | | ------------------------------- | ----------------------------------------------- | | Pattern in both TS and feature | Keep TS definition, feature uses `@implements` | @@ -101,6 +111,8 @@ artifacts are annotated source code, executable specs, and decision specs. **Invariant:** `@libar-docs-implements` (reverse: "I verify this pattern") is the primary traceability mechanism. `@libar-docs-executable-specs` (forward: "my tests live here") is retained but not required. +**Rationale:** Forward links in tier 1 specs go stale when specs are archived, while reverse links in test files are self-maintaining because the test cannot run without the implementation. + | Mechanism | Usage | Reliability | | ----------------------------- | ----------------- | -------------------------------- | | `@implements` (reverse) | 14 patterns (32%) | Self-maintaining, lives in test | diff --git a/docs-live/decisions/adr-004-session-workflow-commands.md b/docs-live/decisions/adr-004-session-workflow-commands.md index ee0d43cf..2c79a77c 100644 --- a/docs-live/decisions/adr-004-session-workflow-commands.md +++ b/docs-live/decisions/adr-004-session-workflow-commands.md @@ -23,18 +23,22 @@ Seven design decisions (DD-1 through DD-7) captured as Rules below. ### DD-1 - Text output with section markers -Both scope-validate and handoff return string from the router, using -=== SECTION === markers. Follows the dual output path where text -commands bypass JSON.stringify. +**Invariant:** scope-validate and handoff must return plain text with === SECTION === markers, never JSON. + +**Rationale:** Inconsistent output formats force consumers to detect and branch on format type, breaking the dual output path contract. Both scope-validate and handoff return string from the router, using === SECTION === markers. Follows the dual output path where text commands bypass JSON.stringify. ### DD-2 - Git integration is opt-in via --git flag -The handoff command accepts an optional --git flag. The CLI handler -calls git diff and passes file list to the pure generator function. -No shell dependency in domain logic. +**Invariant:** Domain logic must never invoke shell commands or depend on git directly. + +**Rationale:** Shell dependencies in domain logic make functions untestable without git fixtures and break deterministic behavior. The handoff command accepts an optional --git flag. The CLI handler calls git diff and passes file list to the pure generator function. No shell dependency in domain logic. ### DD-3 - Session type inferred from FSM status +**Invariant:** Every FSM status must map to exactly one default session type, overridable by an explicit --session flag. + +**Rationale:** Ambiguous or missing inference forces users to always specify --session manually, defeating the ergonomic benefit of status-based defaults. Handoff infers session type from pattern's current FSM status. An explicit --session flag overrides inference. + | Status | Inferred Session | | --------- | ---------------- | | roadmap | design | @@ -42,35 +46,35 @@ No shell dependency in domain logic. | completed | review | | deferred | design | -Handoff infers session type from pattern's current FSM status. -An explicit --session flag overrides inference. - ### DD-4 - Severity levels match Process Guard model +**Invariant:** Scope validation must use exactly three severity levels (PASS, BLOCKED, WARN) consistent with Process Guard. + +**Rationale:** Divergent severity models cause confusion when the same violation appears in both systems with different severity classifications. Scope validation uses three severity levels: The --strict flag promotes WARN to BLOCKED. + | Severity | Meaning | | -------- | ------------------------- | | PASS | Check passed | | BLOCKED | Hard prerequisite missing | | WARN | Recommendation not met | -Scope validation uses three severity levels: - - The --strict flag promotes WARN to BLOCKED. - ### DD-5 - Current date only for handoff -Handoff always uses the current date. No --date flag. +**Invariant:** Handoff must always use the current system date with no override mechanism. + +**Rationale:** A --date flag enables backdating handoff timestamps, which breaks audit trail integrity for multi-session work. Handoff always uses the current date. No --date flag. ### DD-6 - Both positional and flag forms for scope type -scope-validate accepts scope type as both positional argument -and --type flag. +**Invariant:** scope-validate must accept scope type as both a positional argument and a --type flag. + +**Rationale:** Supporting only one form creates inconsistency with CLI conventions and forces users to remember which form each subcommand uses. scope-validate accepts scope type as both positional argument and --type flag. ### DD-7 - Co-located formatter functions -Each module (scope-validator.ts, handoff-generator.ts) exports -both the data builder and the text formatter. Simpler than the -context-assembler/context-formatter split. +**Invariant:** Each module must export both its data builder and text formatter as co-located functions. + +**Rationale:** Splitting builder and formatter across files increases coupling surface and makes it harder to trace data flow through the module. Each module (scope-validator.ts, handoff-generator.ts) exports both the data builder and the text formatter. Simpler than the context-assembler/context-formatter split. --- diff --git a/docs-live/decisions/adr-006-single-read-model-architecture.md b/docs-live/decisions/adr-006-single-read-model-architecture.md index 08a6db9e..871457db 100644 --- a/docs-live/decisions/adr-006-single-read-model-architecture.md +++ b/docs-live/decisions/adr-006-single-read-model-architecture.md @@ -51,7 +51,9 @@ consume the same pre-computed read model. ### All feature consumers query the read model, not raw state -**Invariant:** Code that needs pattern relationships, status groupings, cross-source resolution, or dependency information consumes the MasterDataset. Direct scanner/extractor imports are permitted only in pipeline orchestration code that builds the MasterDataset. Exception: `lint-patterns.ts` is a pure stage-1 consumer. It validates annotation syntax on scanned files. No relationships, no cross-source resolution. Direct scanner consumption is correct for that use case. +**Invariant:** Code that needs pattern relationships, status groupings, cross-source resolution, or dependency information consumes the MasterDataset. Direct scanner/extractor imports are permitted only in pipeline orchestration code that builds the MasterDataset. + +**Rationale:** Bypassing the read model forces consumers to re-derive data that the MasterDataset already computes, creating duplicate logic and divergent behavior when the pipeline evolves. Exception: `lint-patterns.ts` is a pure stage-1 consumer. It validates annotation syntax on scanned files. No relationships, no cross-source resolution. Direct scanner consumption is correct for that use case. | Layer | May Import | Examples | | ---------------------- | -------------------------------- | --------------------------------------------------- | @@ -62,13 +64,19 @@ consume the same pre-computed read model. **Invariant:** Consumers do not define local DTOs that duplicate and discard fields from ExtractedPattern. If a consumer needs a subset, the type system provides the projection — not a hand-written extraction function that becomes a barrier between the consumer and canonical data. +**Rationale:** Lossy local types silently drop fields that later become needed, causing bugs that only surface when new MasterDataset capabilities are added and the local type lacks them. + ### Relationship resolution is computed once **Invariant:** Forward relationships (uses, dependsOn, implementsPatterns) and reverse lookups (usedBy, implementedBy, extendedBy) are computed in `transformToMasterDataset()`. No consumer re-derives these from raw pattern arrays or scanned file tags. +**Rationale:** Re-deriving relationships in consumers duplicates the resolution logic and risks inconsistency when different consumers implement subtly different traversal or filtering rules. + ### Three named anti-patterns -**Invariant:** These are recognized violations, serving as review criteria for new code and refactoring targets for existing code: Naming them makes them visible in code review — including AI-assisted sessions where the default proposal is often "add a helper function." +**Invariant:** These are recognized violations, serving as review criteria for new code and refactoring targets for existing code. + +**Rationale:** Without named anti-patterns, violations appear as one-off style issues rather than systematic architectural drift, making them harder to detect and communicate in code review. Naming them makes them visible in code review — including AI-assisted sessions where the default proposal is often "add a helper function." | Anti-Pattern | Detection Signal | | ----------------------- | ---------------------------------------------------------------------------------------- | diff --git a/docs-live/decisions/adr-021-doc-generation-proof-of-concept.md b/docs-live/decisions/adr-021-doc-generation-proof-of-concept.md index e9cce7f5..158930c4 100644 --- a/docs-live/decisions/adr-021-doc-generation-proof-of-concept.md +++ b/docs-live/decisions/adr-021-doc-generation-proof-of-concept.md @@ -23,6 +23,10 @@ the PROOF OF CONCEPT (demonstrating the pattern works). ## Context +**Invariant:** Documentation must be generated from annotated source code, never manually maintained as a separate artifact. + +**Rationale:** Manual documentation drifts from source as the codebase evolves, creating stale references that mislead both humans and AI coding sessions. + | Document | Lines | Maintenance Burden | | ---------------------------- | -------- | --------------------------------- | | docs/PROCESS-GUARD.md | ~300 | High - duplicates code behavior | @@ -68,6 +72,10 @@ the PROOF OF CONCEPT (demonstrating the pattern works). ## Decision +**Invariant:** Each content type (intro/rationale, rules/examples, API types) is owned by exactly one source type (decision, behavior spec, or code). + +**Rationale:** Shared ownership leads to conflicting updates and ambiguous authority over what the "correct" version is. + | Source Type | Durability | Content Ownership | | ---------------------------- | ---------- | -------------------------------------- | | Decision documents (ADR/PDR) | Permanent | Intro, context, rationale, conventions | @@ -145,6 +153,8 @@ generate-docs --decisions 'specs/**/*.feature' --features 'tests/**/*.feature' - **Invariant:** The source mapping table in a decision document defines how documentation sections are assembled from multiple source files. +**Rationale:** Without a declarative mapping, generators must hard-code source-to-section relationships, making the system brittle to new document types. + | Column | Purpose | Example | | ----------------- | -------------------------------------------- | -------------------------------- | | Section | Target section heading in generated doc | "Intro & Context", "API Types" | @@ -183,6 +193,10 @@ generate-docs --decisions 'specs/**/*.feature' --features 'tests/**/*.feature' - ## Consequences +**Invariant:** Decision documents remain the authoritative source for intro, rationale, and convention content until explicitly superseded. + +**Rationale:** Without durable ownership, documentation sections lose their authoritative source and degrade into unattributed prose that no one updates. + | Benefit | How | | ---------------------- | ----------------------------------------- | | Single source of truth | Each content type owned by one source | @@ -213,6 +227,10 @@ generate-docs --decisions 'specs/**/*.feature' --features 'tests/**/*.feature' - **Ownership Boundaries:** +**Invariant:** Pre-implementation design stubs must reside in `delivery-process/stubs/`, never in `src/`. + +**Rationale:** Stubs in `src/` require ESLint exceptions, create confusion between production and design code, and risk accidental imports of unimplemented functions. + | Issue | Impact | | ------------------------ | ------------------------------------------- | | ESLint exceptions needed | Rules relaxed for "not-yet-real" code | @@ -313,6 +331,10 @@ export function extractShapes( ### Proof of Concept - Self-documentation validates the pattern +**Invariant:** The documentation generation pattern must be validated by generating documentation about itself from its own annotated sources. + +**Rationale:** A self-referential proof of concept exposes extraction gaps and source mapping issues that synthetic test data would miss. This POC demonstrates the doc-from-decision pattern by generating docs about ITSELF. The DocGenerationProofOfConcept pattern produces: + | Output | Purpose | Detail Level | | -------------------------------------------------------- | ------------------ | ------------ | | docs/DOC-GENERATION-PROOF-OF-CONCEPT.md | Detailed reference | detailed | @@ -339,10 +361,7 @@ export function extractShapes( | CI treats warnings as errors | Use strict flag | `lint-process --all --strict` | | Skip workflow (legacy import) | Multiple transitions | Set roadmap then completed in same commit | -This POC demonstrates the doc-from-decision pattern by generating docs -about ITSELF. The DocGenerationProofOfConcept pattern produces: - - **Process Guard docs are generated separately from `adr-006-process-guard.feature`.** +**Process Guard docs are generated separately from `adr-006-process-guard.feature`.** **Source Mapping for POC Self-Documentation:** @@ -404,6 +423,10 @@ if (hasErrors(result)) { ### Expected Output - Compact claude module structure +**Invariant:** Compact output must contain only essential tables and type names, with no JSDoc comments or implementation details. + +**Rationale:** AI context windows are finite; including non-essential content displaces actionable information and degrades session effectiveness. + | Section | Content | | ------------------ | ----------------------------------------------------------- | | Header + Intro | Pattern name, problem/solution summary | diff --git a/docs-live/product-areas/ANNOTATION.md b/docs-live/product-areas/ANNOTATION.md index 238c7861..87319997 100644 --- a/docs-live/product-areas/ANNOTATION.md +++ b/docs-live/product-areas/ANNOTATION.md @@ -319,2347 +319,249 @@ CATEGORY_TAGS = CATEGORIES.map((c) => c.tag) as readonly CategoryTag[]; --- -## Behavior Specifications - -### TypeScriptTaxonomyImplementation - -[View TypeScriptTaxonomyImplementation source](delivery-process/specs/typescript-taxonomy-implementation.feature) - -As a delivery-process developer -I want taxonomy defined in TypeScript with Zod integration -So that I get compile-time safety and runtime validation - -**Note (D12):** Implementation uses TypeScript as the single source of truth, -with consumers importing directly rather than generating intermediate JSON files. - -### ShapeExtraction - -[View ShapeExtraction source](delivery-process/specs/shape-extraction.feature) - -**Problem:** -Documentation comments duplicate type definitions that exist in the same file. -As interfaces change, the JSDoc examples drift. Maintaining two copies of the -same type information violates DRY and creates documentation rot. - -**Relationship to Documentation Generation:** -This capability is a critical enabler for ADR-021 (DocGenerationProofOfConcept). -Shape extraction allows code to own API type documentation while decisions own -intro/context and behavior specs own rules/examples. See the source mapping -pattern in doc-generation-proof-of-concept.feature. - -Current pattern (duplication): -"""typescript -/\*\* - -- @libar-docs -- -- ## API -- -- ```typescript - - ``` -- // DUPLICATED from actual interface below -- interface DeciderInput { -- state: ProcessState; -- changes: ChangeDetection; -- } -- ``` - */ - ``` - -// The actual source of truth -export interface DeciderInput { -state: ProcessState; -changes: ChangeDetection; -} -""" - -**Solution:** -New tag `@libar-docs-extract-shapes` lists type names to extract from the same file. -The extractor pulls actual TypeScript definitions from AST and inserts them into -generated documentation as fenced code blocks. - -Target pattern (single source): -"""typescript -/\*\* - -- @libar-docs -- @libar-docs-extract-shapes DeciderInput, ValidationResult -- -- ## API -- -- (shapes inserted at generation time) - \*/ - -export interface DeciderInput { -state: ProcessState; -changes: ChangeDetection; -} -""" - -**Why It Matters:** -| Benefit | How | -| Single source of truth | Types defined once, extracted for docs | -| Always-current docs | Generated from actual code definitions | -| Reduced maintenance | Change type once, docs update automatically | -| API documentation | Public interfaces documented without duplication | - -
-extract-shapes tag is defined in registry (1 scenarios) - -#### extract-shapes tag is defined in registry - -**Invariant:** The `extract-shapes` tag must exist with CSV format to list multiple type names for extraction. - -**Verified by:** - -- Tag registry contains extract-shapes - -
- -
-Interfaces are extracted from TypeScript AST (5 scenarios) - -#### Interfaces are extracted from TypeScript AST - -**Invariant:** When `@libar-docs-extract-shapes` lists an interface name, the extractor must find and extract the complete interface definition including JSDoc comments, generics, and extends clauses. - -**Verified by:** - -- Extract simple interface -- Extract interface with JSDoc -- Extract interface with generics -- Extract interface with extends -- Non-existent shape produces warning - -
- -
-Type aliases are extracted from TypeScript AST (3 scenarios) - -#### Type aliases are extracted from TypeScript AST - -**Invariant:** Type aliases (including union types, intersection types, and mapped types) are extracted when listed in extract-shapes. - -**Verified by:** - -- Extract union type alias -- Extract mapped type -- Extract conditional type - -
- -
-Enums are extracted from TypeScript AST (2 scenarios) - -#### Enums are extracted from TypeScript AST - -**Invariant:** Both string and numeric enums are extracted with their complete member definitions. - -**Verified by:** - -- Extract string enum -- Extract const enum - -
- -
-Function signatures are extracted (body omitted) (3 scenarios) - -#### Function signatures are extracted (body omitted) - -**Invariant:** When a function name is listed in extract-shapes, only the signature (parameters, return type, generics) is extracted. The function body is replaced with ellipsis for documentation purposes. - -**Verified by:** - -- Extract function signature -- Extract async function signature -- Extract arrow function with type annotation - -
- -
-Multiple shapes are extracted in specified order (2 scenarios) - -#### Multiple shapes are extracted in specified order - -**Invariant:** When multiple shapes are listed, they appear in the documentation in the order specified in the tag, not source order. - -**Verified by:** - -- Shapes appear in tag order -- Mixed shape types in specified order - -
- -
-Extracted shapes render as fenced code blocks (2 scenarios) - -#### Extracted shapes render as fenced code blocks - -**Invariant:** Codecs render extracted shapes as TypeScript fenced code blocks, grouped under an "API Types" or similar section. - -**Verified by:** - -- Shapes render in claude module -- Shapes render in detailed docs - -
- -
-Shapes can reference types from imports (3 scenarios) - -#### Shapes can reference types from imports - -**Invariant:** Extracted shapes may reference types from imports. The extractor does NOT resolve imports - it extracts the shape as-is. Consumers understand that referenced types are defined elsewhere. - -**Verified by:** - -- Shape with imported type reference -- Shape extraction does not follow imports -- Re-exported type produces same warning as import - -
- -
-Overloaded function signatures are all extracted (2 scenarios) - -#### Overloaded function signatures are all extracted - -**Invariant:** When a function has multiple overload signatures, all signatures are extracted together as they represent the complete API. - -**Verified by:** - -- Extract overloaded function signatures -- Extract method overloads in interface - -
- -
-Shape rendering supports grouping options (2 scenarios) - -#### Shape rendering supports grouping options - -**Invariant:** Codecs can render shapes grouped in a single code block or as separate code blocks, depending on detail level. - -**Verified by:** - -- Grouped rendering for compact output -- Separate rendering for detailed output - -
- -### PatternRelationshipModel - -[View PatternRelationshipModel source](delivery-process/specs/pattern-relationship-model.feature) - -**Problem:** The delivery process lacks a comprehensive relationship model between artifacts. -Code files, roadmap specs, executable specs, and patterns exist but their relationships -are implicit or limited to basic dependency tracking (`uses`, `depends-on`). - -**Solution:** Implement a relationship taxonomy inspired by UML/TML modeling practices: - -- **Realization** (`implements`) - Code realizes a pattern specification -- **Generalization** (`extends`) - Pattern extends another pattern's capabilities -- **Dependency** (`uses`, `used-by`) - Technical dependencies between patterns -- **Composition** (`parent`, `level`) - Hierarchical pattern organization -- **Traceability** (`roadmap-spec`, `executable-specs`) - Cross-tier linking - -**Business Value:** -| Benefit | How | -| Complete dependency graphs | All relationships rendered in Mermaid with distinct arrow styles | -| Implementation tracking | `implements` links code stubs to roadmap specs | -| Code-sourced documentation | Generated docs pull from both .feature files AND code stubs | -| Impact analysis | Know what code breaks when pattern spec changes | -| Agentic workflows | Claude can navigate from pattern to implementations and back | -| UML-grade modeling | Professional relationship semantics enable rich tooling | - -
-Code files declare pattern realization via implements tag (4 scenarios) - -#### Code files declare pattern realization via implements tag - -**Invariant:** Files with `@libar-docs-implements:PatternName,OtherPattern` are linked to the specified patterns without causing conflicts. Pattern definitions remain in roadmap specs; implementation files provide supplementary metadata. Multiple files can implement the same pattern, and one file can implement multiple patterns. - -**Rationale:** This mirrors UML's "realization" relationship where a class implements an interface. Code realizes the specification. Direction is code→spec (backward link). CSV format allows a single implementation file to realize multiple patterns when implementing a pattern family (e.g., durability primitives). - -**Verified by:** - -- Implements tag parsed from TypeScript -- Multiple patterns implemented by one file -- No conflict with pattern definition -- Multiple files implement same pattern -- Implements tag parsed -- Multiple patterns supported -- Multiple implementations of same pattern - -
- -
-Pattern inheritance uses extends relationship tag (3 scenarios) - -#### Pattern inheritance uses extends relationship tag - -**Invariant:** Files with `@libar-docs-extends:BasePattern` declare that they extend another pattern's capabilities. This is a generalization relationship where the extending pattern is a specialization of the base pattern. - -**Rationale:** Pattern families exist where specialized patterns build on base patterns. For example, `ReactiveProjections` extends `ProjectionCategories`. The extends relationship enables inheritance-based documentation and validates pattern hierarchy. - -**Verified by:** - -- Extends tag parsed from feature file -- Extended-by reverse lookup computed -- Circular inheritance detected -- Extends tag parsed -- Extended-by computed -- Inheritance chain validated - -
- -
-Technical dependencies use directed relationship tags (2 scenarios) - -#### Technical dependencies use directed relationship tags - -**Invariant:** `@libar-docs-uses` declares outbound dependencies (what this pattern depends on). `@libar-docs-used-by` declares inbound dependencies (what depends on this pattern). Both are CSV format. - -**Rationale:** These represent technical coupling between patterns. The distinction matters for impact analysis: changing a pattern affects its `used-by` consumers but not its `uses` dependencies. - -**Verified by:** - -- Uses rendered as solid arrows in graph -- Used-by aggregated in pattern detail -- Uses rendered as solid arrows -- Used-by aggregated correctly - -
- -
-Roadmap sequencing uses ordering relationship tags (2 scenarios) - -#### Roadmap sequencing uses ordering relationship tags - -**Invariant:** `@libar-docs-depends-on` declares what must be completed first (roadmap sequencing). `@libar-docs-enables` declares what this unlocks when completed. These are planning relationships, not technical dependencies. - -**Rationale:** Sequencing is about order of work, not runtime coupling. A pattern may depend on another being complete without using its code. - -**Verified by:** - -- Depends-on rendered as dashed arrows -- Enables is inverse of depends-on -- Enables is inverse - -
- -
-Cross-tier linking uses traceability tags (PDR-007) (2 scenarios) - -#### Cross-tier linking uses traceability tags (PDR-007) - -**Invariant:** `@libar-docs-executable-specs` on roadmap specs points to test locations. `@libar-docs-roadmap-spec` on package specs points back to the pattern. These create bidirectional traceability. - -**Rationale:** Two-tier architecture (PDR-007) separates planning specs from executable tests. Traceability tags maintain the connection for navigation and completeness checking. - -**Verified by:** - -- Bidirectional links established -- Orphan executable spec detected -- Orphan detection - -
- -
-Epic/Phase/Task hierarchy uses parent-child relationships (2 scenarios) - -#### Epic/Phase/Task hierarchy uses parent-child relationships - -**Invariant:** `@libar-docs-level` declares the hierarchy tier (epic, phase, task). `@libar-docs-parent` links to the containing pattern. This enables rollup progress tracking. - -**Rationale:** Large initiatives decompose into phases and tasks. The hierarchy allows progress aggregation (e.g., "Epic 80% complete based on child phases"). - -**Verified by:** - -- Parent link validated -- Invalid parent detected -- Progress rollup calculated - -
- -
-All relationships appear in generated documentation (2 scenarios) - -#### All relationships appear in generated documentation - -**Invariant:** The PATTERNS.md dependency graph renders all relationship types with distinct visual styles. Pattern detail pages list all related artifacts grouped by relationship type. - -**Rationale:** Visualization makes the relationship model accessible. Different arrow styles distinguish relationship semantics at a glance. - -| Relationship | Arrow Style | Direction | Description | -| ------------ | ----------------- | ------------ | -------------------- | -| uses | --> (solid) | OUT | Technical dependency | -| depends-on | -.-> (dashed) | OUT | Roadmap sequencing | -| implements | ..-> (dotted) | CODE→SPEC | Realization | -| extends | -->> (solid open) | CHILD→PARENT | Generalization | - -**Verified by:** - -- Graph uses distinct arrow styles -- Pattern detail page shows all relationships -- Graph uses distinct styles -- Detail page sections - -
- -
-Linter detects relationship violations (3 scenarios) - -#### Linter detects relationship violations - -**Invariant:** The pattern linter validates that all relationship targets exist, implements files don't have pattern tags, and bidirectional links are consistent. - -**Rationale:** Broken relationships cause confusion and incorrect generated docs. Early detection during linting prevents propagation of errors. - -**Verified by:** - -- Missing relationship target detected -- Pattern tag in implements file causes error -- Asymmetric traceability detected -- Missing target detected -- Pattern conflict detected -- Asymmetric link detected - -
- -### GherkinRulesSupport - -[View GherkinRulesSupport source](delivery-process/specs/gherkin-rules-support.feature) - -**Problem:** -Feature files were limited to flat scenario lists. Business rules, rationale, -and rich descriptions could not be captured in a way that: - -- Tests ignore (vitest-cucumber skips descriptions) -- Generators render (PRD shows business context) -- Maintains single source of truth (one file, two purposes) - -The Gherkin `Rule:` keyword was parsed by @cucumber/gherkin but our pipeline -dropped the data at scanner/extractor stages. - -**Solution:** -Extended the documentation pipeline to capture and render: - -- `Rule:` keyword as Business Rules sections -- Rule descriptions (rationale, exceptions, context) -- DataTables in steps as Markdown tables -- DocStrings in steps as code blocks - -Infrastructure changes (schema, scanner, extractor) are shared by all generators. -Rendering was added to PRD generator as reference implementation. - -Confirmed vitest-cucumber supports Rules via `Rule()` + `RuleScenario()` syntax. -No migration to alternative frameworks needed. - -
-Rules flow through the entire pipeline without data loss (3 scenarios) - -#### Rules flow through the entire pipeline without data loss - -The @cucumber/gherkin parser extracts Rules natively. Our pipeline must -preserve this data through scanner, extractor, and into ExtractedPattern -so generators can access rule names, descriptions, and nested scenarios. - -**Verified by:** - -- Rules are captured by AST parser -- Rules pass through scanner -- Rules are mapped to ExtractedPattern - -
- -
-Generators can render rules as business documentation (1 scenarios) - -#### Generators can render rules as business documentation - -Business stakeholders see rule names and descriptions as "Business Rules" -sections, not Given/When/Then syntax. This enables human-readable PRDs -from the same files used for test execution. - -**Verified by:** - -- PRD generator renders Business Rules section - -
- -
-Custom content blocks render in acceptance criteria (2 scenarios) - -#### Custom content blocks render in acceptance criteria - -DataTables and DocStrings in steps should appear in generated documentation, -providing structured data and code examples alongside step descriptions. - -**Verified by:** - -- DataTables render as Markdown tables -- DocStrings render as code blocks - -
- -
-vitest-cucumber executes scenarios inside Rules (1 scenarios) - -#### vitest-cucumber executes scenarios inside Rules - -Test execution must work for scenarios inside Rule blocks. -Use Rule() function with RuleScenario() instead of Scenario(). - -**Verified by:** - -- Rule scenarios execute with vitest-cucumber - -
- -### DeclarationLevelShapeTagging - -[View DeclarationLevelShapeTagging source](delivery-process/specs/declaration-level-shape-tagging.feature) - -**Problem:** -The current shape extraction system operates at file granularity. The -libar-docs-extract-shapes tag on a pattern block extracts named declarations -from the entire file, and the reference doc config shapeSources field selects -shapes by file glob only. There is no way for a reference document to request -"only RiskLevel and RISK_LEVELS from risk-levels.ts" -- it gets every shape -the file exports. This produces noisy reference documents that include -irrelevant types alongside the focused content the document is trying to -present. - -The reference doc system is designed for composing focused documents from -cherry-picked content: conventionTags filters by tag, behaviorCategories -filters by category, diagramScope filters by arch metadata. But shapeSources -is the one axis with no content-level filter -- only file-level. - -**Solution:** -Introduce a lightweight libar-docs-shape annotation tag on individual -TypeScript declarations. Each tagged declaration self-identifies as a -documentable shape, optionally belonging to a named group. On the consumer -side, add shapeSelectors to ReferenceDocConfig for fine-grained selection -by name or group. - -This follows how real API doc generators work: they build a symbol graph -from annotated declarations, not from whole-file text dumps. The tag lives -next to the code it describes, so refactoring (rename/move) does not break -extraction. Code remains the single source of truth with one line of -annotation overhead per declaration. - -**Design Decisions:** - -DD-1: Tag format is value (not flag) -The libar-docs-shape tag works bare (no value) for simple opt-in, but -also accepts an optional group name like libar-docs-shape api-types. -This enables group-based selection in shapeSelectors without a second -tag. Using format: value means undefined when bare, string when -provided. Registry entry: tag: 'shape', format: 'value', with example -'libar-docs-shape api-types'. Placed in metadataTags array in -buildRegistry() at src/taxonomy/registry-builder.ts. - -DD-2: Stay on typescript-estree parser (no TS compiler API switch) -The existing extractPrecedingJsDoc() in shape-extractor.ts already finds -JSDoc above declarations by scanning the AST comments array. Checking -that JSDoc text for the libar-docs-shape tag is a string search on -already-extracted content -- zero parser changes needed. The TS compiler -APIs node.jsDoc property is not available on estree nodes, but the -comment-based approach is equivalent for declaration-level tag detection. -Cross-file resolution via parseAndGenerateServices or ts.createProgram -is deferred to a future pattern when barrel file re-exports become a -problem. - -DD-3: shapeSelectors subsumes shapeSources for new configs -shapeSources remains for backward compatibility (glob-in, everything-out). -shapeSelectors provides three selection modes: by source + names, by -group tag, or by source alone (all tagged shapes from a file). Both -fields compose -- shapeSources is the coarse filter, shapeSelectors -adds precision. New configs should prefer shapeSelectors. - -DD-4: Top-level declarations only in v1 -Only interface, type, enum, function, and const declarations at the -module top level are eligible. No namespace-internal, class-internal, -or function-local declarations. The codebase does not use namespaces -or nested type declarations, so this constraint matches reality. -Const must be identifier-based (const X = ...), no destructuring. - -DD-5: Group stored on ExtractedShape schema -The ExtractedShapeSchema gains an optional group: string field from -the libar-docs-shape tag value. This enables downstream filtering -by shapeSelectors without re-parsing source files. - -DD-6: ShapeSelector is a structural discriminated union -ShapeSelector is not a tagged union with an explicit kind field. -Discrimination uses structural key presence: - group key present: group selector (select all shapes with this group) - source key present, names key present: source+names selector - source key present, no names key: source-only selector (all tagged -shapes from that source file) -Zod schema uses z.union() with three z.object() variants. The source -field uses the same glob syntax as shapeSources (exact path, single -wildcard, or recursive glob). The names field is a readonly string -array of declaration names to include. The group field is a string -matching the libar-docs-shape tag value. -This lives on ReferenceDocConfig as: -readonly shapeSelectors?: readonly ShapeSelector[] - -DD-7: Tagged non-exported declarations are included -The existing findDeclarations() in shape-extractor.ts discovers all -top-level declarations regardless of export status. When a declaration -has the libar-docs-shape tag in its JSDoc, it is extracted even if not -exported. This is intentional: the tag is an explicit documentation -opt-in that overrides the export-based filtering used by the -extractAllExportedShapes() auto-discovery mode. A module-internal -type tagged for documentation is a valid use case (documenting -internal architecture in reference docs). - -**Pragmatic Constraints:** -| Constraint | Rationale | -| Top-level declarations only | Codebase convention, avoids namespace recursion | -| 5 declaration kinds | interface, type, enum, function, const -- matches existing shape extractor | -| No cross-file resolution | Deferred to future pattern using parseAndGenerateServices | -| JSDoc must be within MAX_JSDOC_LINE_DISTANCE (3 lines) | Matches existing extractPrecedingJsDoc logic | -| const must be identifier-based | No destructuring support -- rare in type documentation | -| Group names are single tokens | No spaces in tag values (hyphen-separated convention) | - -**Implementation Path:** -| Layer | Change | Effort | -| registry-builder.ts | Add shape tag to metadataTags array | ~5 lines | -| extracted-shape.ts | Add optional group field to ExtractedShapeSchema | ~2 lines | -| shape-extractor.ts | Add discoverTaggedShapes() and extractShapeTag() | ~50 lines | -| doc-extractor.ts | Call discoverTaggedShapes() alongside processExtractShapesTag() | ~15 lines | -| reference.ts | Add ShapeSelectorSchema + shapeSelectors to ReferenceDocConfig | ~20 lines | -| shape-matcher.ts | Add filterShapesBySelectors() function | ~30 lines | -| delivery-process.config.ts | Update showcase config to use shapeSelectors | ~5 lines | - -**Integration Wiring (doc-extractor.ts):** -The existing shape extraction at doc-extractor.ts lines 167-178 handles -libar-docs-extract-shapes (pattern-level tag, names shapes by name). -The new discoverTaggedShapes() is called in addition to that path: -after parsing the source file, scan all declarations for libar-docs-shape -JSDoc tags and merge any found shapes into the patterns extractedShapes -array. Both paths contribute to the same ExtractedPattern.extractedShapes -field. Deduplication by shape name (existing behavior in shape-matcher.ts -line 86) prevents duplicates when both paths find the same declaration. - -**Explored Alternatives:** -| Alternative | Why not (for v1) | -| TypeScript compiler API (ts.createProgram) | Full type resolution but requires tsconfig, slower, overkill for tag detection | -| ts-morph wrapper | Additional 2MB dependency for nicer API, same capabilities as compiler API | -| parseAndGenerateServices | Zero new deps, same package, but cross-file resolution not needed yet | -| Custom ESLint rule | ESLint infrastructure already has type checker, but rules are for linting not extraction | -| LSP protocol | Designed for IDE interactions, overkill for batch extraction | -| Name filter only (no tag) | shapeNames on config without source-side tag -- works but loses explicitness | -| Tagged union for ShapeSelector | kind field adds noise; structural discrimination is idiomatic for Zod unions | - -**Future Upgrade Path:** -When cross-file resolution is needed (barrel file re-exports in monorepo), -switch shape-extractor.ts from parse() to parseAndGenerateServices() -- -same typescript-eslint/typescript-estree dependency, different function -call. This gives full TypeScript type checker access: resolve re-exports -via checker.getAliasedSymbol(), expand type aliases, follow import chains. -The libar-docs-shape tag and shapeSelectors config remain unchanged. - -
-Declarations opt in via libar-docs-shape tag (5 scenarios) - -#### Declarations opt in via libar-docs-shape tag - -**Invariant:** Only declarations with the libar-docs-shape tag in their immediately preceding JSDoc are collected as tagged shapes. Declarations without the tag are ignored even if they are exported. The tag value is optional -- bare libar-docs-shape opts in without a group, while libar-docs-shape group-name assigns the declaration to a named group. Tagged non-exported declarations are included (DD-7). - -**Rationale:** Explicit opt-in prevents over-extraction of internal helpers. Unlike auto-discovery mode (extract-shapes \*) which grabs all exports, declaration-level tagging gives precise control. This matches how TypeDoc uses public/internal tags -- the annotation lives next to the code it describes, surviving refactors without breaking extraction. - -**Verified by:** - -- Tagged declaration is extracted as shape -- Untagged exported declaration is not extracted -- Group name is captured from tag value -- Bare tag works without group name -- Non-exported tagged declaration is extracted -- Tagged declaration is extracted -- Untagged export is ignored -- Bare tag works without group - -
- -
-Reference doc configs select shapes via shapeSelectors (4 scenarios) - -#### Reference doc configs select shapes via shapeSelectors - -**Invariant:** shapeSelectors provides three selection modes: by source path + specific names (DD-6 source+names variant), by group tag (DD-6 group variant), or by source path alone (DD-6 source-only variant). shapeSources remains for backward compatibility. When both are present, shapeSources provides the coarse file-level filter and shapeSelectors adds fine-grained name/group filtering on top. - -**Rationale:** The reference doc system composes focused documents from cherry-picked content. Every other content axis (conventions, behaviors, diagrams) has content-level filtering. shapeSources was the only axis limited to file-level granularity. shapeSelectors closes this gap with the same explicitness as conventionTags. - -**Verified by:** - -- Select specific shapes by source and names -- Select all shapes in a group -- Select all tagged shapes from a source file -- shapeSources without shapeSelectors returns all shapes -- Select by source and names -- Select by group -- Select by source alone -- shapeSources backward compatibility preserved - -
- -
-Discovery uses existing estree parser with JSDoc comment scanning (3 scenarios) - -#### Discovery uses existing estree parser with JSDoc comment scanning - -**Invariant:** The discoverTaggedShapes function uses the existing typescript-estree parse() and extractPrecedingJsDoc() approach. It does not require the TypeScript compiler API, ts-morph, or parseAndGenerateServices. Tag detection is a regex match on the JSDoc comment text already extracted by the existing infrastructure. The tag regex pattern is: /libar-docs-shape(?:\s+(\S+))?/ where capture group 1 is the optional group name. - -**Rationale:** The shape extractor already traverses declarations and extracts their JSDoc. Adding libar-docs-shape detection is a string search on content that is already available -- approximately 15 lines of new logic. Switching parsers would introduce churn with no benefit for the v1 use case of tag detection on top-level declarations. - -**Verified by:** - -- All five declaration kinds are discoverable -- JSDoc with gap larger than MAX_JSDOC_LINE_DISTANCE is not matched -- Tag coexists with other JSDoc content -- All 5 declaration kinds supported -- JSDoc gap enforcement -- Tag with other JSDoc content - -
- -### CrossSourceValidation - -[View CrossSourceValidation source](delivery-process/specs/cross-source-validation.feature) - -**Problem:** -The delivery process uses dual sources (TypeScript phase files and Gherkin -feature files) that must remain consistent. Currently there's no validation -to detect: - -- Pattern name mismatches -- Missing spec file references -- Circular dependency chains -- Orphaned deliverables (not linked to any phase) - -**Solution:** -Implement cross-source validation that scans both source types and -detects inconsistencies, broken references, and logical errors. - -
-Pattern names must be consistent across sources (2 scenarios) - -#### Pattern names must be consistent across sources - -**Verified by:** - -- Pattern name mismatch detected -- Pattern names match across sources - -
- -
-Circular dependencies are detected (2 scenarios) - -#### Circular dependencies are detected - -**Verified by:** - -- Direct circular dependency -- Transitive circular dependency - -
- -
-Dependency references must resolve (2 scenarios) - -#### Dependency references must resolve - -**Verified by:** - -- Dependency references non-existent pattern -- All dependencies resolve - -
- -### GherkinAstParser - -[View GherkinAstParser source](tests/features/scanner/gherkin-parser.feature) - -The Gherkin AST parser extracts feature metadata, scenarios, and steps -from .feature files for timeline generation and process documentation. - -#### Successful feature file parsing extracts complete metadata - -**Invariant:** A valid feature file must produce a ParsedFeature with name, description, language, tags, and all nested scenarios with their steps. - -**Rationale:** Downstream generators (timeline, business rules) depend on complete AST extraction; missing fields cause silent gaps in generated documentation. - -**Verified by:** - -- Parse valid feature file with pattern metadata -- Parse multiple scenarios -- Handle feature without tags - -#### Invalid Gherkin produces structured errors - -**Invariant:** Malformed or incomplete Gherkin input must return a Result.err with the source file path and a descriptive error message. - -**Rationale:** The scanner processes many feature files in batch; structured errors allow graceful degradation and per-file error reporting rather than aborting the entire scan. - -**Verified by:** - -- Return error for malformed Gherkin -- Return error for file without feature - -### FileDiscovery - -[View FileDiscovery source](tests/features/scanner/file-discovery.feature) - -The file discovery system uses glob patterns to find TypeScript files -for documentation extraction. It applies sensible defaults to exclude -common non-source directories like node_modules, dist, and test files. - -
-Glob patterns match TypeScript source files (3 scenarios) - -#### Glob patterns match TypeScript source files - -**Invariant:** findFilesToScan must return absolute paths for all files matching the configured glob patterns. - -**Rationale:** Downstream pipeline stages (AST parser, extractor) require absolute paths to read file contents; relative paths would break when baseDir differs from cwd. - -**Verified by:** - -- Find TypeScript files matching glob patterns -- Return absolute paths -- Support multiple glob patterns - -
- -
-Default exclusions filter non-source files (4 scenarios) - -#### Default exclusions filter non-source files - -**Invariant:** node_modules, dist, .test.ts, .spec.ts, and .d.ts files must be excluded by default without explicit configuration. - -**Rationale:** Scanning generated output (dist), third-party code (node_modules), or test files would produce false positives in the pattern registry and waste processing time. - -**Verified by:** - -- Exclude node_modules by default -- Exclude dist directory by default -- Exclude test files by default -- Exclude .d.ts declaration files - -
- -
-Custom configuration extends discovery behavior (3 scenarios) - -#### Custom configuration extends discovery behavior - -**Invariant:** User-provided exclude patterns must be applied in addition to (not replacing) the default exclusions. - -**Verified by:** - -- Respect custom exclude patterns -- Return empty array when no files match -- Handle nested directory structures - -
- -### DocStringMediaType - -[View DocStringMediaType source](tests/features/scanner/docstring-mediatype.feature) - -DocString language hints (mediaType) should be preserved through the parsing -pipeline from feature files to rendered output. This prevents code blocks -from being incorrectly escaped when the language hint is lost. - -
-Parser preserves DocString mediaType during extraction (4 scenarios) - -#### Parser preserves DocString mediaType during extraction - -**Invariant:** The Gherkin parser must retain the mediaType annotation from DocString delimiters through to the parsed AST; DocStrings without a mediaType have undefined mediaType. - -**Rationale:** Losing the mediaType causes downstream renderers to apply incorrect escaping or default language hints, corrupting code block output. - -**Verified by:** - -- Parse DocString with typescript mediaType -- Parse DocString with json mediaType -- Parse DocString with jsdoc mediaType -- DocString without mediaType has undefined mediaType - -
- -
-MediaType is used when rendering code blocks (3 scenarios) - -#### MediaType is used when rendering code blocks - -**Invariant:** The rendered code block language must match the DocString mediaType; when mediaType is absent, the renderer falls back to a caller-specified default language. - -**Verified by:** - -- TypeScript mediaType renders as typescript code block -- JSDoc mediaType prevents asterisk escaping -- Missing mediaType falls back to default language - -
- -
-renderDocString handles both string and object formats (2 scenarios) - -#### renderDocString handles both string and object formats - -**Invariant:** renderDocString accepts both plain string and object DocString formats; when an object has a mediaType, it takes precedence over the caller-supplied language parameter. - -**Rationale:** Legacy callers pass raw strings while newer code passes structured objects — the renderer must handle both without breaking existing usage. - -**Verified by:** - -- String docString renders correctly (legacy format) -- Object docString with mediaType takes precedence - -
- -### AstParserRelationshipsEdges - -[View AstParserRelationshipsEdges source](tests/features/scanner/ast-parser-relationships-edges.feature) - -The AST Parser extracts @libar-docs-\* directives from TypeScript source files -using the TypeScript compiler API. It identifies exports, extracts metadata, -and validates directive structure. - -#### Relationship tags extract uses and usedBy dependencies - -**Invariant:** The uses and usedBy relationship arrays are populated from directive tags, not from description content. When no relationship tags exist, the fields are undefined. - -**Verified by:** - -- Extract @libar-docs-uses with single value -- Extract @libar-docs-uses with comma-separated values -- Extract @libar-docs-used-by with single value -- Extract @libar-docs-used-by with comma-separated values -- Extract both uses and usedBy from same directive -- NOT capture uses/usedBy values in description -- Not set uses/usedBy when no relationship tags exist - -#### Edge cases and malformed input are handled gracefully - -**Invariant:** The parser never crashes on invalid input. Files without directives return empty results. Malformed TypeScript returns a structured error with the file path. - -**Verified by:** - -- Skip comments without @libar-docs-\* tags -- Skip invalid directive with incomplete tag -- Handle malformed TypeScript gracefully -- Handle empty file gracefully -- Handle whitespace-only file -- Handle file with only comments and no exports -- Skip inline comments (non-block) -- Handle unicode characters in descriptions - -### AstParserMetadata - -[View AstParserMetadata source](tests/features/scanner/ast-parser-metadata.feature) - -The AST Parser extracts @libar-docs-\* directives from TypeScript source files -using the TypeScript compiler API. It identifies exports, extracts metadata, -and validates directive structure. - -
-Metadata is correctly extracted from JSDoc comments (5 scenarios) - -#### Metadata is correctly extracted from JSDoc comments - -**Invariant:** Examples, multi-line descriptions, line numbers, function signatures, and standard JSDoc tags are all correctly parsed and separated. - -**Verified by:** - -- Extract examples from directive -- Extract multi-line description -- Track line numbers correctly -- Extract function signature information -- Ignore @param and @returns in description - -
- -
-Tags are extracted only from the directive section, not from description or examples (4 scenarios) - -#### Tags are extracted only from the directive section, not from description or examples - -**Invariant:** Only tags appearing in the directive section (before the description) are extracted. Tags mentioned in description prose or example code blocks are ignored. - -**Verified by:** - -- Extract multiple tags from directive section -- Extract tag with description on same line -- NOT extract tags mentioned in description -- NOT extract tags mentioned in @example sections - -
- -
-When to Use sections are extracted in all supported formats (4 scenarios) - -#### When to Use sections are extracted in all supported formats - -**Invariant:** When to Use content is extracted from heading format with bullet points, inline bold format, and asterisk bullet format. When no When to Use section exists, the field is undefined. - -**Verified by:** - -- Extract When to Use heading format with bullet points -- Extract When to use inline format -- Extract asterisk bullets in When to Use section -- Not set whenToUse when section is missing - -
- -### AstParserExports - -[View AstParserExports source](tests/features/scanner/ast-parser-exports.feature) - -The AST Parser extracts @libar-docs-\* directives from TypeScript source files -using the TypeScript compiler API. It identifies exports, extracts metadata, -and validates directive structure. - -#### Export types are correctly identified from TypeScript declarations - -**Invariant:** Every exported TypeScript declaration type (function, type, interface, const, class, enum, abstract class, arrow function, async function, generic function, default export, re-export) is correctly classified. - -**Verified by:** - -- Parse function export with directive -- Parse type export with directive -- Parse interface export with directive -- Parse const export with directive -- Parse class export with directive -- Parse enum export with directive -- Parse const enum export with directive -- Parse abstract class export with directive -- Parse arrow function export with directive -- Parse async function export with directive -- Parse generic function export with directive -- Parse default export with directive -- Parse re-exports with directive -- Parse multiple exports in single statement -- Parse multiple directives in same file - -### ShapeExtractionTypesTesting - -[View ShapeExtractionTypesTesting source](tests/features/extractor/shape-extraction-types.feature) - -Validates the shape extraction system that extracts TypeScript type -definitions (interfaces, type aliases, enums, function signatures) -from source files for documentation generation. - -
-extract-shapes tag exists in registry with CSV format (1 scenarios) - -#### extract-shapes tag exists in registry with CSV format - -**Verified by:** - -- Tag registry contains extract-shapes with correct format - -
- -
-Interfaces are extracted from TypeScript AST (5 scenarios) - -#### Interfaces are extracted from TypeScript AST - -**Verified by:** - -- Extract simple interface -- Extract interface with JSDoc -- Extract interface with generics -- Extract interface with extends -- Non-existent shape produces not-found entry - -
- -
-Property-level JSDoc is extracted for interface properties (3 scenarios) - -#### Property-level JSDoc is extracted for interface properties - -The extractor uses strict adjacency (gap = 1 line) to prevent -interface-level JSDoc from being misattributed to the first property. - -**Verified by:** - -- Extract properties with adjacent JSDoc -- Interface JSDoc not attributed to first property -- Mixed documented and undocumented properties - -
- -
-Type aliases are extracted from TypeScript AST (3 scenarios) - -#### Type aliases are extracted from TypeScript AST - -**Verified by:** - -- Extract union type alias -- Extract mapped type -- Extract conditional type - -
- -
-Enums are extracted from TypeScript AST (2 scenarios) - -#### Enums are extracted from TypeScript AST - -**Verified by:** - -- Extract string enum -- Extract const enum - -
- -
-Function signatures are extracted with body omitted (2 scenarios) - -#### Function signatures are extracted with body omitted - -**Verified by:** - -- Extract function signature -- Extract async function signature - -
- -
-Const declarations are extracted from TypeScript AST (2 scenarios) - -#### Const declarations are extracted from TypeScript AST - -**Verified by:** - -- Extract const with type annotation -- Extract const without type annotation - -
- -
-Non-exported shapes are extractable (2 scenarios) - -#### Non-exported shapes are extractable - -**Verified by:** - -- Extract non-exported interface -- Re-export marks internal shape as exported - -
- -### ShapeExtractionRenderingTesting - -[View ShapeExtractionRenderingTesting source](tests/features/extractor/shape-extraction-rendering.feature) - -Validates the shape extraction system that extracts TypeScript type -definitions (interfaces, type aliases, enums, function signatures) -from source files for documentation generation. - -
-Multiple shapes are extracted in specified order (2 scenarios) - -#### Multiple shapes are extracted in specified order - -**Verified by:** - -- Shapes appear in tag order not source order -- Mixed shape types in specified order - -
- -
-Extracted shapes render as fenced code blocks (1 scenarios) - -#### Extracted shapes render as fenced code blocks - -**Verified by:** - -- Render shapes as markdown - -
- -
-Imported and re-exported shapes are tracked separately (2 scenarios) - -#### Imported and re-exported shapes are tracked separately - -**Verified by:** - -- Imported shape produces warning -- Re-exported shape produces re-export entry - -
- -
-Invalid TypeScript produces error result (1 scenarios) - -#### Invalid TypeScript produces error result - -**Verified by:** - -- Malformed TypeScript returns error - -
- -
-Shape rendering supports grouping options (2 scenarios) - -#### Shape rendering supports grouping options - -**Verified by:** - -- Grouped rendering in single code block -- Separate rendering with multiple code blocks - -
- -
-Annotation tags are stripped from extracted JSDoc while preserving standard tags (4 scenarios) - -#### Annotation tags are stripped from extracted JSDoc while preserving standard tags - -**Invariant:** Extracted shapes never contain @libar-docs-\* annotation lines in their jsDoc field. - -**Rationale:** Shape JSDoc is rendered in documentation output. Annotation tags are metadata for the extraction pipeline, not user-visible documentation content. - -**Verified by:** - -- JSDoc with only annotation tags produces no jsDoc -- Mixed JSDoc preserves standard tags and strips annotation tags -- Single-line annotation-only JSDoc produces no jsDoc -- Consecutive empty lines after tag removal are collapsed - -
- -
-Large source files are rejected to prevent memory exhaustion (1 scenarios) - -#### Large source files are rejected to prevent memory exhaustion - -**Verified by:** - -- Source code exceeding 5MB limit returns error - -
- -### ExtractionPipelineEnhancementsTesting - -[View ExtractionPipelineEnhancementsTesting source](tests/features/extractor/extraction-pipeline-enhancements.feature) - -Validates extraction pipeline capabilities for ReferenceDocShowcase: -function signature surfacing, full property-level JSDoc, -param/returns/throws extraction, and auto-shape discovery mode. - -
-Function signatures surface full parameter types in ExportInfo (4 scenarios) - -#### Function signatures surface full parameter types in ExportInfo - -**Invariant:** ExportInfo.signature shows full parameter types and return type instead of the placeholder value. - -**Verified by:** - -- Simple function signature is extracted with full types -- Async function keeps async prefix in signature -- Multi-parameter function has all types in signature -- Function with object parameter type preserves braces -- Simple function signature -- Async function keeps async prefix -- Multi-parameter function -- Function with object parameter type - -
- -
-Property-level JSDoc preserves full multi-line content (2 scenarios) - -#### Property-level JSDoc preserves full multi-line content - -**Invariant:** Property-level JSDoc preserves full multi-line content without first-line truncation. - -**Verified by:** - -- Multi-line property JSDoc is fully preserved -- Single-line property JSDoc still works -- Multi-line property JSDoc preserved -- Single-line property JSDoc unchanged - -
- -
-Param returns and throws tags are extracted from function JSDoc (4 scenarios) - -#### Param returns and throws tags are extracted from function JSDoc - -**Invariant:** JSDoc param, returns, and throws tags are extracted and stored on ExtractedShape for function-kind shapes. - -**Verified by:** - -- Param tags are extracted from function JSDoc -- Returns tag is extracted from function JSDoc -- Throws tags are extracted from function JSDoc -- JSDoc params with braces type syntax are parsed -- Param tags extracted -- Returns tag extracted -- Throws tags extracted -- TypeScript-style params without braces - -
- -
-Auto-shape discovery extracts all exported types via wildcard (3 scenarios) - -#### Auto-shape discovery extracts all exported types via wildcard - -**Invariant:** When extract-shapes tag value is the wildcard character, all exported declarations are extracted without listing names. - -**Verified by:** - -- Wildcard extracts all exported declarations -- Mixed wildcard and names produces warning -- Same-name type and const exports produce one shape -- Wildcard extracts all exports -- Non-exported declarations excluded -- Mixed wildcard and names rejected - -
- -### DualSourceExtractorTesting - -[View DualSourceExtractorTesting source](tests/features/extractor/dual-source-extraction.feature) - -Extracts and combines pattern metadata from both TypeScript code stubs -(@libar-docs-_) and Gherkin feature files (@libar-process-_), validates -consistency, and composes unified pattern data for documentation. - -**Problem:** - -- Pattern data split across code stubs and feature files -- Need to validate consistency between sources -- Deliverables defined in Background tables need extraction -- Pattern name collisions need handling - -**Solution:** - -- extractProcessMetadata() extracts tags from features -- extractDeliverables() parses Background tables -- combineSources() merges code + features into dual-source patterns -- validateDualSource() checks cross-source consistency - -
-Process metadata is extracted from feature tags (4 scenarios) - -#### Process metadata is extracted from feature tags - -**Invariant:** A feature file must have both @pattern and @phase tags to produce valid process metadata; missing either yields null. - -**Rationale:** Pattern name and phase are the minimum identifiers for placing a pattern in the roadmap — without both, the pattern cannot be tracked. - -**Verified by:** - -- Complete process metadata extraction -- Minimal required tags extraction -- Missing pattern tag returns null -- Missing phase tag returns null - -
- -
-Deliverables are extracted from Background tables (4 scenarios) - -#### Deliverables are extracted from Background tables - -**Invariant:** Deliverables are sourced exclusively from Background tables; features without a Background produce an empty deliverable list. - -**Rationale:** The Background table is the single source of truth for deliverable tracking — extracting from other locations would create ambiguity. - -**Verified by:** - -- Standard deliverables table extraction -- Extended deliverables with Finding and Release -- Feature without background returns empty -- Tests column handles various formats - -
- -
-Code and feature patterns are combined into dual-source patterns (5 scenarios) - -#### Code and feature patterns are combined into dual-source patterns - -**Invariant:** A combined pattern is produced only when both a code stub and a feature file exist for the same pattern name; unmatched sources are tracked separately as code-only or feature-only. - -**Rationale:** Dual-source combination ensures documentation reflects both implementation intent (code) and specification (Gherkin) — mismatches signal inconsistency. - -**Verified by:** - -- Matching code and feature are combined -- Code-only pattern has no matching feature -- Feature-only pattern has no matching code -- Phase mismatch creates validation error -- Pattern name collision merges sources - -
- -
-Dual-source results are validated for consistency (4 scenarios) - -#### Dual-source results are validated for consistency - -**Invariant:** Cross-source validation reports errors for metadata mismatches and warnings for orphaned patterns that are still in roadmap status. - -**Rationale:** Inconsistencies between code stubs and feature files indicate drift — errors catch conflicts while warnings surface missing counterparts that may be intentional. - -**Verified by:** - -- Clean results have no errors -- Cross-validation errors are reported -- Orphaned roadmap code stubs produce warnings -- Feature-only roadmap patterns produce warnings - -
- -
-Include tags are extracted from Gherkin feature tags (3 scenarios) - -#### Include tags are extracted from Gherkin feature tags - -**Invariant:** Include tags are parsed as comma-separated values; absence of the tag means the pattern has no includes. - -**Verified by:** - -- Single include tag is extracted -- CSV include tag produces multiple values -- Feature without include tag has no include field - -
- -### DeclarationLevelShapeTaggingTesting - -[View DeclarationLevelShapeTaggingTesting source](tests/features/extractor/declaration-level-shape-tagging.feature) - -Tests the discoverTaggedShapes function that scans TypeScript source -code for declarations annotated with the libar-docs-shape JSDoc tag. - -#### Declarations opt in via libar-docs-shape tag - -**Invariant:** Only declarations with the libar-docs-shape tag in their immediately preceding JSDoc are collected as tagged shapes. - -**Verified by:** - -- Tagged declaration is extracted as shape -- Untagged exported declaration is not extracted -- Group name is captured from tag value -- Bare tag works without group name -- Non-exported tagged declaration is extracted -- Tagged type is found despite same-name const declaration -- Both same-name declarations tagged produces shapes for each -- Tagged declaration is extracted -- Untagged export is ignored -- Bare tag works without group - -#### Discovery uses existing estree parser with JSDoc comment scanning - -**Invariant:** The discoverTaggedShapes function uses the existing typescript-estree parse() and extractPrecedingJsDoc() approach. - -**Verified by:** - -- All five declaration kinds are discoverable -- JSDoc with gap larger than MAX_JSDOC_LINE_DISTANCE is not matched -- Tag as last line before closing JSDoc delimiter -- Hypothetical libar-docs-shape-extended tag is not matched -- Tag coexists with other JSDoc content -- Generic arrow function in non-JSX context parses correctly -- All 5 declaration kinds supported -- JSDoc gap enforcement -- Tag with other JSDoc content - -### ScannerCore - -[View ScannerCore source](tests/features/behavior/scanner-core.feature) - -The scanPatterns function orchestrates file discovery, directive detection, -and AST parsing to extract documentation directives from TypeScript files. - -**Problem:** - -- Need to scan entire codebases for documentation directives efficiently -- Files without @libar-docs opt-in should be skipped to save processing time -- Parse errors in one file shouldn't prevent scanning of other files -- Must support exclusion patterns for node_modules, tests, and custom paths - -**Solution:** - -- scanPatterns uses glob patterns for flexible file discovery -- Two-phase filtering: quick regex check, then file opt-in validation -- Result monad pattern captures errors without failing entire scan -- Configurable exclude patterns with sensible defaults -- Extracts complete directive information (tags, description, examples, exports) - -
-scanPatterns extracts directives from TypeScript files (3 scenarios) - -#### scanPatterns extracts directives from TypeScript files - -**Invariant:** Every file with a valid opt-in marker and JSDoc directives produces a complete ScannedFile with tags, description, examples, and exports. - -**Rationale:** Downstream generators depend on complete directive data; partial extraction causes silent documentation gaps across the monorepo. - -**Verified by:** - -- Scan files and extract directives -- Skip files without directives -- Extract complete directive information - -
- -
-scanPatterns collects errors without aborting (2 scenarios) - -#### scanPatterns collects errors without aborting - -**Invariant:** A parse failure in one file never prevents other files from being scanned; the result is always Ok with errors collected separately. - -**Rationale:** In a monorepo with hundreds of files, a single syntax error must not block the entire documentation pipeline. - -**Verified by:** - -- Collect errors for files that fail to parse -- Always return Ok result even with broken files - -
- -
-Pattern matching and exclusion filtering (3 scenarios) - -#### Pattern matching and exclusion filtering - -**Invariant:** Glob patterns control file discovery and exclusion patterns remove matched files before scanning. - -**Verified by:** - -- Return empty results when no patterns match -- Respect exclusion patterns -- Handle multiple files with multiple directives each - -
- -
-File opt-in requirement gates scanning (4 scenarios) - -#### File opt-in requirement gates scanning - -**Invariant:** Only files containing a standalone @libar-docs marker (not @libar-docs-\*) are eligible for directive extraction. - -**Rationale:** Without opt-in gating, every TypeScript file in the monorepo would be parsed, wasting processing time on files that have no documentation directives. - -**Verified by:** - -- Handle files with quick directive check optimization -- Skip files without @libar-docs file-level opt-in -- Not confuse @libar-docs-\* with @libar-docs opt-in -- Detect @libar-docs opt-in combined with section tags - -
- -### PatternTagExtraction - -[View PatternTagExtraction source](tests/features/behavior/pattern-tag-extraction.feature) - -The extractPatternTags function parses Gherkin feature tags -into structured metadata objects for pattern processing. - -**Problem:** - -- Gherkin tags are flat strings needing semantic interpretation -- Multiple tag formats exist: @tag:value, @libar-process-tag:value -- Dependencies and enables can have comma-separated values -- Category tags have no colon and must be distinguished from other tags - -**Solution:** - -- extractPatternTags parses tag strings into structured metadata -- Normalizes both @tag:value and @libar-process-tag:value formats -- Splits comma-separated values for dependencies and enables -- Filters non-category tags (acceptance-criteria, happy-path, etc.) - -
-Single value tags produce scalar metadata fields (7 scenarios) - -#### Single value tags produce scalar metadata fields - -**Invariant:** Each single-value tag (pattern, phase, status, brief) maps to exactly one metadata field with the correct type. - -**Verified by:** - -- Extract pattern name tag -- Extract phase number tag -- Extract status roadmap tag -- Extract status deferred tag -- Extract status completed tag -- Extract status active tag -- Extract brief path tag - -
- -
-Array value tags accumulate into list metadata fields (3 scenarios) - -#### Array value tags accumulate into list metadata fields - -**Invariant:** Tags for depends-on and enables split comma-separated values and accumulate across multiple tag occurrences. - -**Verified by:** - -- Extract single dependency -- Extract comma-separated dependencies -- Extract comma-separated enables - -
- -
-Category tags are colon-free tags filtered against known non-categories (2 scenarios) - -#### Category tags are colon-free tags filtered against known non-categories - -**Invariant:** Tags without colons become categories, except known non-category tags (acceptance-criteria, happy-path) and the libar-docs opt-in marker. - -**Verified by:** - -- Extract category tags (no colon) -- libar-docs opt-in marker is NOT a category - -
- -
-Complex tag lists produce fully populated metadata (1 scenarios) - -#### Complex tag lists produce fully populated metadata - -**Invariant:** All tag types (scalar, array, category) are correctly extracted from a single mixed tag list. - -**Verified by:** - -- Extract all metadata from complex tag list - -
- -
-Edge cases produce safe defaults (2 scenarios) - -#### Edge cases produce safe defaults - -**Invariant:** Empty or invalid inputs produce empty metadata or omit invalid fields rather than throwing errors. - -**Verified by:** - -- Empty tag list returns empty metadata -- Invalid phase number is ignored - -
- -
-Convention tags support CSV values with whitespace trimming (3 scenarios) - -#### Convention tags support CSV values with whitespace trimming - -**Invariant:** Convention tags split comma-separated values and trim whitespace from each value. - -**Verified by:** - -- Extract single convention tag -- Extract CSV convention tags -- Convention tag trims whitespace in CSV values - -
- -
-Registry-driven extraction handles enums, transforms, and value constraints (8 scenarios) - -#### Registry-driven extraction handles enums, transforms, and value constraints - -**Invariant:** Tags defined in the registry use data-driven extraction with enum validation, CSV accumulation, value transforms, and constraint checking. - -**Verified by:** - -- Registry-driven enum tag without prior if/else branch -- Registry-driven enum rejects invalid value -- Registry-driven CSV tag accumulates values -- Transform applies hyphen-to-space on business value -- Transform applies ADR number padding -- Transform strips quotes from title tag -- Repeatable value tag accumulates multiple occurrences -- CSV with values constraint rejects invalid values - -
- -### LayerInferenceTesting - -[View LayerInferenceTesting source](tests/features/behavior/layer-inference.feature) - -The layer inference module classifies feature files into testing layers -(timeline, domain, integration, e2e, component) based on directory path patterns. -This enables automatic filtering and documentation grouping without explicit annotations. - -**Problem:** - -- Manual layer annotation in every feature file is tedious and error-prone -- Inconsistent classification across projects makes filtering unreliable -- Cross-platform path differences (Windows backslashes) cause classification failures -- No fallback for unclassified features leads to missing test coverage - -**Solution:** - -- Directory-based inference using path pattern matching -- Priority-based pattern matching (integration checked before domain) -- Path normalization handles Windows, mixed separators, and case differences -- "unknown" fallback layer ensures all features are captured -- FEATURE_LAYERS constant provides validated layer enumeration - -
-Timeline layer is detected from /timeline/ directory segments (3 scenarios) - -#### Timeline layer is detected from /timeline/ directory segments - -**Invariant:** Any feature file path containing a /timeline/ directory segment is classified as timeline layer. - -**Verified by:** - -- Detect timeline features from /timeline/ path -- Detect timeline features regardless of parent directories -- Detect timeline features in delivery-process package - -
- -
-Domain layer is detected from business context directory segments (3 scenarios) - -#### Domain layer is detected from business context directory segments - -**Invariant:** Feature files in /deciders/, /orders/, or /inventory/ directories are classified as domain layer. - -**Verified by:** - -- Detect decider features as domain -- Detect orders features as domain -- Detect inventory features as domain - -
- -
-Integration layer is detected and takes priority over domain directories (4 scenarios) - -#### Integration layer is detected and takes priority over domain directories - -**Invariant:** Paths containing /integration-features/ or /integration/ are classified as integration, even when they also contain domain directory names. - -**Verified by:** - -- Detect integration-features directory as integration -- Detect /integration/ directory as integration -- Integration takes priority over orders subdirectory -- Integration takes priority over inventory subdirectory - -
- -
-E2E layer is detected from /e2e/ directory segments (3 scenarios) - -#### E2E layer is detected from /e2e/ directory segments - -**Invariant:** Any feature file path containing an /e2e/ directory segment is classified as e2e layer. - -**Verified by:** - -- Detect e2e features from /e2e/ path -- Detect e2e features in frontend app -- Detect e2e-journeys as e2e - -
- -
-Component layer is detected from tool-specific directory segments (2 scenarios) - -#### Component layer is detected from tool-specific directory segments - -**Invariant:** Feature files in /scanner/ or /lint/ directories are classified as component layer. - -**Verified by:** - -- Detect scanner features as component -- Detect lint features as component - -
- -
-Unknown layer is the fallback for unclassified paths (3 scenarios) - -#### Unknown layer is the fallback for unclassified paths - -**Invariant:** Any feature file path that does not match a known layer pattern is classified as unknown. - -**Verified by:** - -- Return unknown for unclassified paths -- Return unknown for root-level features -- Return unknown for generic test paths - -
- -
-Path normalization handles cross-platform and case differences (7 scenarios) - -#### Path normalization handles cross-platform and case differences - -**Invariant:** Layer inference produces correct results regardless of path separators, case, or absolute vs relative paths. - -**Verified by:** - -- Handle Windows-style paths with backslashes -- Be case-insensitive -- Handle mixed path separators -- Handle absolute Unix paths -- Handle Windows absolute paths -- Timeline in filename only should not match -- Timeline detected even with deep nesting - -
- -
-FEATURE_LAYERS constant provides validated layer enumeration (3 scenarios) - -#### FEATURE_LAYERS constant provides validated layer enumeration - -**Invariant:** FEATURE_LAYERS is a readonly array containing exactly all 6 valid layer values. - -**Verified by:** - -- FEATURE_LAYERS contains all valid layer values -- FEATURE_LAYERS has exactly 6 layers -- FEATURE_LAYERS is a readonly array - -
- -### DirectiveDetection - -[View DirectiveDetection source](tests/features/behavior/directive-detection.feature) - -Pure functions that detect @libar-docs directives in TypeScript source code. -These functions enable quick file filtering before full AST parsing. - -**Problem:** - -- Full AST parsing of every TypeScript file is expensive and slow -- Files without documentation directives waste processing time -- Need to distinguish file-level opt-in (@libar-docs) from section tags (@libar-docs-\*) -- Similar patterns like @libar-doc-core could cause false positives - -**Solution:** - -- hasDocDirectives: Fast regex check for any @libar-docs-\* directive -- hasFileOptIn: Validates explicit @libar-docs opt-in (not @libar-docs-\*) -- Both use regex patterns optimized for quick filtering before AST parsing -- Negative lookahead ensures @libar-docs doesn't match @libar-docs-\* - -#### hasDocDirectives detects @libar-docs-\* section directives - -**Invariant:** hasDocDirectives must return true if and only if the source contains at least one @libar-docs-{suffix} directive (case-sensitive, @ required, suffix required). - -**Rationale:** This is the first-pass filter in the scanner pipeline; false negatives cause patterns to be silently missed, while false positives only waste AST parsing time. - -**Verified by:** - -- Detect @libar-docs-core directive in JSDoc block -- Detect various @libar-docs-\* directives -- Detect directive anywhere in file content -- Detect multiple directives on same line -- Detect directive in inline comment -- Return false for content without directives -- Return false for empty content in hasDocDirectives -- Reject similar but non-matching patterns - -#### hasFileOptIn detects file-level @libar-docs marker - -**Invariant:** hasFileOptIn must return true if and only if the source contains a bare @libar-docs tag (not followed by a hyphen) inside a JSDoc block comment; line comments and @libar-docs-\* suffixed tags must not match. - -**Rationale:** File-level opt-in is the gate for including a file in the scanner pipeline; confusing @libar-docs-core (a section tag) with @libar-docs (file opt-in) would either miss files or over-include them. - -**Verified by:** - -- Detect @libar-docs in JSDoc block comment -- Detect @libar-docs with description on same line -- Detect @libar-docs in multi-line JSDoc -- Detect @libar-docs anywhere in file -- Detect @libar-docs combined with section tags -- Return false when only section tags present -- Return false for multiple section tags without opt-in -- Return false for empty content in hasFileOptIn -- Return false for @libar-docs in line comment -- Not confuse @libar-docs-\* with @libar-docs opt-in - -### ContextInference - -[View ContextInference source](tests/features/behavior/context-inference.feature) - -**Problem:** -Patterns in standard directories (src/validation/, src/scanner/) should -automatically receive architecture context without explicit annotation. - -**Solution:** -Implement configurable inference rules that map file path patterns to -bounded contexts using wildcard matching. - -
-matchPattern supports recursive wildcard ** (1 scenarios) - -#### matchPattern supports recursive wildcard \*\* - -**Invariant:** The `**` wildcard matches files at any nesting depth below the specified directory prefix. - -**Rationale:** Directory hierarchies vary in depth; recursive matching ensures all nested files inherit context. - -**Verified by:** - -- Recursive wildcard matches nested paths - -
- -
-matchPattern supports single-level wildcard /* (1 scenarios) - -#### matchPattern supports single-level wildcard /\* - -**Invariant:** The `/*` wildcard matches only direct children of the specified directory, not deeper nested files. - -**Rationale:** Some contexts apply only to a specific directory level, not its entire subtree. - -**Verified by:** - -- Single-level wildcard matches direct children only - -
- -
-matchPattern supports prefix matching (1 scenarios) - -#### matchPattern supports prefix matching - -**Invariant:** A trailing slash pattern matches any file whose path starts with that directory prefix. - -**Verified by:** - -- Prefix matching behavior - -
- -
-inferContext returns undefined when no rules match (2 scenarios) - -#### inferContext returns undefined when no rules match - -**Invariant:** When no inference rule matches a file path, the pattern receives no inferred context and is excluded from the byContext index. - -**Rationale:** Unmatched files must not receive a spurious context assignment; absence of context is a valid state. - -**Verified by:** - -- Empty rules array returns undefined -- File path does not match any rule - -
- -
-inferContext applies first matching rule (2 scenarios) - -#### inferContext applies first matching rule - -**Invariant:** When multiple rules could match a file path, only the first matching rule determines the inferred context. - -**Rationale:** Deterministic ordering prevents ambiguous context assignment when rules overlap. - -**Verified by:** - -- Single matching rule infers context -- First matching rule wins when multiple could match - -
- -
-Explicit archContext is not overridden (1 scenarios) - -#### Explicit archContext is not overridden - -**Invariant:** A pattern with an explicitly annotated archContext retains that value regardless of matching inference rules. - -**Rationale:** Explicit annotations represent intentional developer decisions that must not be silently overwritten by automation. - -**Verified by:** - -- Explicit context takes precedence over inference - -
- -
-Inference works independently of archLayer (1 scenarios) - -#### Inference works independently of archLayer - -**Invariant:** Context inference operates on file path alone; the presence or absence of archLayer does not affect context assignment. - -**Verified by:** - -- Pattern without archLayer is still added to byContext if context is inferred - -
- -
-Default rules map standard directories (1 scenarios) - -#### Default rules map standard directories - -**Invariant:** Each standard source directory (validation, scanner, extractor, etc.) maps to a well-known bounded context name via the default rule set. - -**Rationale:** Convention-based mapping eliminates the need for explicit context annotations on every file in standard directories. - -**Verified by:** - -- Default directory mappings - -
- -### UsesTagTesting - -[View UsesTagTesting source](tests/features/behavior/pattern-relationships/uses-tag.feature) - -Tests extraction and processing of @libar-docs-uses and @libar-docs-used-by -relationship tags from TypeScript files. - -
-Uses tag is defined in taxonomy registry (2 scenarios) - -#### Uses tag is defined in taxonomy registry - -**Invariant:** The uses and used-by tags must be registered in the taxonomy with CSV format and dependency-related purpose descriptions. - -**Verified by:** - -- Uses tag exists in registry -- Used-by tag exists in registry - -
- -
-Uses tag is extracted from TypeScript files (2 scenarios) - -#### Uses tag is extracted from TypeScript files - -**Invariant:** The AST parser must extract single and comma-separated uses values from TypeScript JSDoc annotations. - -**Verified by:** - -- Single uses value extracted -- Multiple uses values extracted as CSV - -
- -
-Used-by tag is extracted from TypeScript files (2 scenarios) - -#### Used-by tag is extracted from TypeScript files - -**Invariant:** The AST parser must extract single and comma-separated used-by values from TypeScript JSDoc annotations. - -**Verified by:** - -- Single used-by value extracted -- Multiple used-by values extracted as CSV - -
- -
-Uses relationships are stored in relationship index (2 scenarios) - -#### Uses relationships are stored in relationship index - -**Invariant:** All declared uses and usedBy relationships must be stored in the relationship index as explicitly declared entries. - -**Verified by:** - -- Uses relationships stored in relationship index -- UsedBy relationships stored explicitly -- UsedBy relationships stored explicitly - - The relationship index stores uses and usedBy relationships directly - from pattern metadata. Unlike implements - -- these are explicit declarations. - -
- -
-Schemas validate uses field correctly (2 scenarios) - -#### Schemas validate uses field correctly - -**Invariant:** DocDirective and RelationshipEntry schemas must accept uses and usedBy fields as valid CSV string values. - -**Verified by:** - -- DocDirective schema accepts uses -- RelationshipEntry schema accepts usedBy - -
- -### ImplementsTagProcessing - -[View ImplementsTagProcessing source](tests/features/behavior/pattern-relationships/implements-tag.feature) - -Tests for the @libar-docs-implements tag which links implementation files -to their corresponding roadmap pattern specifications. - -
-Implements tag is defined in taxonomy registry (1 scenarios) - -#### Implements tag is defined in taxonomy registry - -**Invariant:** The implements tag must exist in the taxonomy registry with CSV format. - -**Verified by:** - -- Implements tag exists in registry -- Implements tag exists in registry - - The tag registry defines `implements` with CSV format - -- enabling the - data-driven AST parser to automatically extract it. - -
- -
-Files can implement a single pattern (2 scenarios) - -#### Files can implement a single pattern - -**Invariant:** The AST parser must extract a single implements value and preserve it through the extraction pipeline. - -**Verified by:** - -- Parse implements with single pattern -- Implements preserved through extraction pipeline - -
- -
-Files can implement multiple patterns using CSV format (2 scenarios) - -#### Files can implement multiple patterns using CSV format - -**Invariant:** The AST parser must split CSV implements values into individual pattern references with whitespace trimming. - -**Verified by:** - -- Parse implements with multiple patterns -- CSV values are trimmed - -
- -
-Transform builds implementedBy reverse lookup (2 scenarios) - -#### Transform builds implementedBy reverse lookup - -**Invariant:** The transform must compute an implementedBy reverse index so spec patterns know which files implement them. - -**Verified by:** - -- Single implementation creates reverse lookup -- Multiple implementations aggregate - -
- -
-Schemas validate implements field correctly (2 scenarios) - -#### Schemas validate implements field correctly - -**Invariant:** The Zod schemas must accept implements and implementedBy fields with correct array-of-string types. - -**Verified by:** - -- DocDirective schema accepts implements -- RelationshipEntry schema accepts implementedBy - -
- -### ExtendsTagTesting - -[View ExtendsTagTesting source](tests/features/behavior/pattern-relationships/extends-tag.feature) - -Tests for the @libar-docs-extends tag which establishes generalization -relationships between patterns (pattern inheritance). - -
-Extends tag is defined in taxonomy registry (1 scenarios) - -#### Extends tag is defined in taxonomy registry - -**Invariant:** The extends tag must exist in the taxonomy registry with single-value format. - -**Verified by:** - -- Extends tag exists in registry - -
- -
-Patterns can extend exactly one base pattern (2 scenarios) - -#### Patterns can extend exactly one base pattern - -**Invariant:** A pattern may extend at most one base pattern, enforced by single-value tag format. - -**Rationale:** Single inheritance avoids diamond-problem ambiguity in pattern generalization hierarchies. - -**Verified by:** - -- Parse extends from feature file -- Extends preserved through extraction pipeline -- Extends preserved through extraction pipeline - - Extends uses single-value format because pattern inheritance should be - single-inheritance to avoid diamond problems. - -
- -
-Transform builds extendedBy reverse lookup (1 scenarios) - -#### Transform builds extendedBy reverse lookup - -**Invariant:** The transform must compute an extendedBy reverse index so base patterns know which patterns extend them. - -**Verified by:** - -- Extended pattern knows its extensions - -
- -
-Linter detects circular inheritance chains (2 scenarios) - -#### Linter detects circular inheritance chains - -**Invariant:** Circular inheritance chains (direct or transitive) must be detected and reported as errors. - -**Rationale:** Circular extends relationships create infinite resolution loops and undefined behavior. - -**Verified by:** - -- Direct circular inheritance detected -- Transitive circular inheritance detected - -
- -### DependsOnTagTesting - -[View DependsOnTagTesting source](tests/features/behavior/pattern-relationships/depends-on-tag.feature) - -Tests extraction of @libar-docs-depends-on and @libar-docs-enables -relationship tags from Gherkin files. - -
-Depends-on tag is defined in taxonomy registry (2 scenarios) - -#### Depends-on tag is defined in taxonomy registry - -**Invariant:** The depends-on and enables tags must exist in the taxonomy registry with CSV format. - -**Verified by:** - -- Depends-on tag exists in registry -- Enables tag exists in registry - -
- -
-Depends-on tag is extracted from Gherkin files (2 scenarios) - -#### Depends-on tag is extracted from Gherkin files - -**Invariant:** The Gherkin parser must extract depends-on values from feature file tags, including CSV multi-value lists. - -**Verified by:** - -- Depends-on extracted from feature file -- Multiple depends-on values extracted as CSV - -
- -
-Depends-on in TypeScript triggers anti-pattern warning (1 scenarios) - -#### Depends-on in TypeScript triggers anti-pattern warning - -**Invariant:** The depends-on tag must only appear in Gherkin files; its presence in TypeScript is an anti-pattern. - -**Rationale:** Depends-on represents planning dependencies owned by Gherkin specs, not runtime dependencies owned by TypeScript. - -**Verified by:** - -- Depends-on in TypeScript is detected by lint rule -- Depends-on in TypeScript is detected by lint rule - - The depends-on tag is for planning dependencies and belongs in feature - files - -- not TypeScript code. TypeScript files should use "uses" for - runtime dependencies. - -
- -
-Enables tag is extracted from Gherkin files (2 scenarios) - -#### Enables tag is extracted from Gherkin files - -**Invariant:** The Gherkin parser must extract enables values from feature file tags, including CSV multi-value lists. - -**Verified by:** - -- Enables extracted from feature file -- Multiple enables values extracted as CSV +## Business Rules -
+25 patterns, 116 rules with invariants (116 total) + +### Ast Parser Exports -
-Planning dependencies are stored in relationship index (2 scenarios) +| Rule | Invariant | Rationale | +| ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Export types are correctly identified from TypeScript declarations | Every exported TypeScript declaration type (function, type, interface, const, class, enum, abstract class, arrow function, async function, generic function, default export, re-export) is correctly classified. | Export type classification drives how codecs render API documentation — misclassifying a function as a const (or vice versa) produces incorrect signatures and misleading docs. | -#### Planning dependencies are stored in relationship index +### Ast Parser Metadata + +| Rule | Invariant | Rationale | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Metadata is correctly extracted from JSDoc comments | Examples, multi-line descriptions, line numbers, function signatures, and standard JSDoc tags are all correctly parsed and separated. | Downstream codecs render each metadata field independently — incorrect parsing causes examples to leak into descriptions or signatures to be lost in generated documentation. | +| Tags are extracted only from the directive section, not from description or examples | Only tags appearing in the directive section (before the description) are extracted. Tags mentioned in description prose or example code blocks are ignored. | Tags control taxonomy classification and pattern routing — extracting them from prose or examples would create phantom patterns and corrupt the registry. | +| When to Use sections are extracted in all supported formats | When to Use content is extracted from heading format with bullet points, inline bold format, and asterisk bullet format. When no When to Use section exists, the field is undefined. | Generated pattern documentation includes a When to Use section — failing to recognize any supported format means valid guidance silently disappears from output. | -**Invariant:** The relationship index must store dependsOn and enables relationships extracted from pattern metadata. +### Ast Parser Relationships Edges + +| Rule | Invariant | Rationale | +| ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | +| Relationship tags extract uses and usedBy dependencies | The uses and usedBy relationship arrays are populated from directive tags, not from description content. When no relationship tags exist, the fields are undefined. | Relationship data drives dependency diagrams and impact analysis — extracting from prose would produce false edges from incidental mentions. | +| Edge cases and malformed input are handled gracefully | The parser never crashes on invalid input. Files without directives return empty results. Malformed TypeScript returns a structured error with the file path. | The scanner processes hundreds of files in bulk — a single malformed file must not abort the entire pipeline or produce an undiagnosable crash. | -**Verified by:** +### Context Inference -- DependsOn relationships stored in relationship index -- Enables relationships stored explicitly -- Enables relationships stored explicitly +| Rule | Invariant | Rationale | +| -------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | +| matchPattern supports recursive wildcard \*\* | The `**` wildcard matches files at any nesting depth below the specified directory prefix. | Directory hierarchies vary in depth; recursive matching ensures all nested files inherit context. | +| matchPattern supports single-level wildcard /\* | The `/*` wildcard matches only direct children of the specified directory, not deeper nested files. | Some contexts apply only to a specific directory level, not its entire subtree. | +| matchPattern supports prefix matching | A trailing slash pattern matches any file whose path starts with that directory prefix. | Without prefix matching, users would need separate wildcard patterns for each nesting depth, making rule configuration verbose and error-prone. | +| inferContext returns undefined when no rules match | When no inference rule matches a file path, the pattern receives no inferred context and is excluded from the byContext index. | Unmatched files must not receive a spurious context assignment; absence of context is a valid state. | +| inferContext applies first matching rule | When multiple rules could match a file path, only the first matching rule determines the inferred context. | Deterministic ordering prevents ambiguous context assignment when rules overlap. | +| Explicit archContext is not overridden | A pattern with an explicitly annotated archContext retains that value regardless of matching inference rules. | Explicit annotations represent intentional developer decisions that must not be silently overwritten by automation. | +| Inference works independently of archLayer | Context inference operates on file path alone; the presence or absence of archLayer does not affect context assignment. | Coupling context inference to archLayer would prevent context-based queries from finding patterns that lack explicit layer annotations. | +| Default rules map standard directories | Each standard source directory (validation, scanner, extractor, etc.) maps to a well-known bounded context name via the default rule set. | Convention-based mapping eliminates the need for explicit context annotations on every file in standard directories. | - The relationship index stores dependsOn and enables relationships - directly from pattern metadata. These are explicit declarations. +### Cross Source Validation -
+| Rule | Invariant | Rationale | +| ----------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Pattern names must be consistent across sources | A pattern name referenced in one source must resolve to the same canonical name in all other sources. | Typos or inconsistencies between TypeScript and Gherkin pattern names cause silent data loss — the pattern appears as two unrelated entries instead of a unified cross-source record. | +| Circular dependencies are detected | The dependency graph must be a directed acyclic graph (DAG) with no cycles. | Circular dependencies create unresolvable ordering — no pattern in the cycle can be completed first, blocking the entire chain from progressing. | +| Dependency references must resolve | Every `@depends-on` reference must resolve to an existing pattern in the registry. | Dangling dependency references produce incomplete ordering and missing relationship edges in generated documentation, hiding actual inter-pattern constraints. | + +### Declaration Level Shape Tagging + +| Rule | Invariant | Rationale | +| ----------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Declarations opt in via libar-docs-shape tag | Only declarations with the libar-docs-shape tag in their immediately preceding JSDoc are collected as tagged shapes. Declarations without the tag are ignored even if they are exported. The tag value is optional -- bare libar-docs-shape opts in without a group, while libar-docs-shape group-name assigns the declaration to a named group. Tagged non-exported declarations are included (DD-7). | Explicit opt-in prevents over-extraction of internal helpers. Unlike auto-discovery mode (extract-shapes \*) which grabs all exports, declaration-level tagging gives precise control. This matches how TypeDoc uses public/internal tags -- the annotation lives next to the code it describes, surviving refactors without breaking extraction. | +| Reference doc configs select shapes via shapeSelectors | shapeSelectors provides three selection modes: by source path + specific names (DD-6 source+names variant), by group tag (DD-6 group variant), or by source path alone (DD-6 source-only variant). shapeSources remains for backward compatibility. When both are present, shapeSources provides the coarse file-level filter and shapeSelectors adds fine-grained name/group filtering on top. | The reference doc system composes focused documents from cherry-picked content. Every other content axis (conventions, behaviors, diagrams) has content-level filtering. shapeSources was the only axis limited to file-level granularity. shapeSelectors closes this gap with the same explicitness as conventionTags. | +| Discovery uses existing estree parser with JSDoc comment scanning | The discoverTaggedShapes function uses the existing typescript-estree parse() and extractPrecedingJsDoc() approach. It does not require the TypeScript compiler API, ts-morph, or parseAndGenerateServices. Tag detection is a regex match on the JSDoc comment text already extracted by the existing infrastructure. The tag regex pattern is: /libar-docs-shape(?:\s+(\S+))?/ where capture group 1 is the optional group name. | The shape extractor already traverses declarations and extracts their JSDoc. Adding libar-docs-shape detection is a string search on content that is already available -- approximately 15 lines of new logic. Switching parsers would introduce churn with no benefit for the v1 use case of tag detection on top-level declarations. | + +### Declaration Level Shape Tagging Testing + +| Rule | Invariant | Rationale | +| ----------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Declarations opt in via libar-docs-shape tag | Only declarations with the libar-docs-shape tag in their immediately preceding JSDoc are collected as tagged shapes. | Extracting shapes without an explicit opt-in tag would surface internal implementation details in generated API documentation, violating information hiding. | +| Discovery uses existing estree parser with JSDoc comment scanning | The discoverTaggedShapes function uses the existing typescript-estree parse() and extractPrecedingJsDoc() approach. | Introducing a second parser would create divergent AST behavior — reusing the established parser ensures consistent JSDoc handling and avoids subtle extraction differences. | + +### Depends On Tag Testing + +| Rule | Invariant | Rationale | +| ------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| Depends-on tag is defined in taxonomy registry | The depends-on and enables tags must exist in the taxonomy registry with CSV format. | Without registry definitions, the data-driven AST parser cannot discover or extract these planning dependency tags from source files. | +| Depends-on tag is extracted from Gherkin files | The Gherkin parser must extract depends-on values from feature file tags, including CSV multi-value lists. | Missing dependency extraction causes the dependency tree and blocking-pattern queries to return incomplete results. | +| Depends-on in TypeScript triggers anti-pattern warning | The depends-on tag must only appear in Gherkin files; its presence in TypeScript is an anti-pattern. | Depends-on represents planning dependencies owned by Gherkin specs, not runtime dependencies owned by TypeScript. | +| Enables tag is extracted from Gherkin files | The Gherkin parser must extract enables values from feature file tags, including CSV multi-value lists. | Missing enables extraction breaks forward-looking dependency queries, hiding which patterns are unblocked when a prerequisite completes. | +| Planning dependencies are stored in relationship index | The relationship index must store dependsOn and enables relationships extracted from pattern metadata. | Omitting planning dependencies from the index causes blocking-pattern and critical-path queries to return incomplete results. | + +### Directive Detection + +| Rule | Invariant | Rationale | +| ---------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| hasDocDirectives detects @libar-docs-\* section directives | hasDocDirectives must return true if and only if the source contains at least one @libar-docs-{suffix} directive (case-sensitive, @ required, suffix required). | This is the first-pass filter in the scanner pipeline; false negatives cause patterns to be silently missed, while false positives only waste AST parsing time. | +| hasFileOptIn detects file-level @libar-docs marker | hasFileOptIn must return true if and only if the source contains a bare @libar-docs tag (not followed by a hyphen) inside a JSDoc block comment; line comments and @libar-docs-\* suffixed tags must not match. | File-level opt-in is the gate for including a file in the scanner pipeline; confusing @libar-docs-core (a section tag) with @libar-docs (file opt-in) would either miss files or over-include them. | + +### Doc String Media Type + +| Rule | Invariant | Rationale | +| ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Parser preserves DocString mediaType during extraction | The Gherkin parser must retain the mediaType annotation from DocString delimiters through to the parsed AST; DocStrings without a mediaType have undefined mediaType. | Losing the mediaType causes downstream renderers to apply incorrect escaping or default language hints, corrupting code block output. | +| MediaType is used when rendering code blocks | The rendered code block language must match the DocString mediaType; when mediaType is absent, the renderer falls back to a caller-specified default language. | Using the wrong language hint causes syntax highlighters to misrender code blocks, and losing mediaType entirely can trigger incorrect escaping (e.g., asterisks in JSDoc). | +| renderDocString handles both string and object formats | renderDocString accepts both plain string and object DocString formats; when an object has a mediaType, it takes precedence over the caller-supplied language parameter. | Legacy callers pass raw strings while newer code passes structured objects — the renderer must handle both without breaking existing usage. | + +### Dual Source Extractor Testing + +| Rule | Invariant | Rationale | +| ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Process metadata is extracted from feature tags | A feature file must have both @pattern and @phase tags to produce valid process metadata; missing either yields null. | Pattern name and phase are the minimum identifiers for placing a pattern in the roadmap — without both, the pattern cannot be tracked. | +| Deliverables are extracted from Background tables | Deliverables are sourced exclusively from Background tables; features without a Background produce an empty deliverable list. | The Background table is the single source of truth for deliverable tracking — extracting from other locations would create ambiguity. | +| Code and feature patterns are combined into dual-source patterns | A combined pattern is produced only when both a code stub and a feature file exist for the same pattern name; unmatched sources are tracked separately as code-only or feature-only. | Dual-source combination ensures documentation reflects both implementation intent (code) and specification (Gherkin) — mismatches signal inconsistency. | +| Dual-source results are validated for consistency | Cross-source validation reports errors for metadata mismatches and warnings for orphaned patterns that are still in roadmap status. | Inconsistencies between code stubs and feature files indicate drift — errors catch conflicts while warnings surface missing counterparts that may be intentional. | +| Include tags are extracted from Gherkin feature tags | Include tags are parsed as comma-separated values; absence of the tag means the pattern has no includes. | Include tags control which patterns appear in scoped diagrams — incorrect parsing drops patterns from diagrams or includes unrelated ones. | + +### Extends Tag Testing + +| Rule | Invariant | Rationale | +| -------------------------------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | +| Extends tag is defined in taxonomy registry | The extends tag must exist in the taxonomy registry with single-value format. | Without a registry definition, the data-driven AST parser cannot discover or extract the extends tag from source files. | +| Patterns can extend exactly one base pattern | A pattern may extend at most one base pattern, enforced by single-value tag format. | Single inheritance avoids diamond-problem ambiguity in pattern generalization hierarchies. | +| Transform builds extendedBy reverse lookup | The transform must compute an extendedBy reverse index so base patterns know which patterns extend them. | Without the reverse index, base patterns cannot discover their extensions, breaking generalization hierarchy navigation in generated docs. | +| Linter detects circular inheritance chains | Circular inheritance chains (direct or transitive) must be detected and reported as errors. | Circular extends relationships create infinite resolution loops and undefined behavior. | + +### Extraction Pipeline Enhancements Testing + +| Rule | Invariant | Rationale | +| --------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Function signatures surface full parameter types in ExportInfo | ExportInfo.signature shows full parameter types and return type instead of the placeholder value. | Reference documentation renders signatures verbatim — placeholder values instead of real types make the API docs unusable for consumers. | +| Property-level JSDoc preserves full multi-line content | Property-level JSDoc preserves full multi-line content without first-line truncation. | Truncated property descriptions lose important behavioral details (defaults, units, constraints) that consumers rely on when integrating with the API. | +| Param returns and throws tags are extracted from function JSDoc | JSDoc param, returns, and throws tags are extracted and stored on ExtractedShape for function-kind shapes. | Function reference docs require parameter, return, and exception documentation — missing extraction means consumers must read source code instead of generated docs. | +| Auto-shape discovery extracts all exported types via wildcard | When extract-shapes tag value is the wildcard character, all exported declarations are extracted without listing names. | Requiring explicit names for every export creates maintenance burden and stale annotations — wildcard discovery keeps shape docs in sync as exports are added or removed. | + +### File Discovery + +| Rule | Invariant | Rationale | +| ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Glob patterns match TypeScript source files | findFilesToScan must return absolute paths for all files matching the configured glob patterns. | Downstream pipeline stages (AST parser, extractor) require absolute paths to read file contents; relative paths would break when baseDir differs from cwd. | +| Default exclusions filter non-source files | node_modules, dist, .test.ts, .spec.ts, and .d.ts files must be excluded by default without explicit configuration. | Scanning generated output (dist), third-party code (node_modules), or test files would produce false positives in the pattern registry and waste processing time. | +| Custom configuration extends discovery behavior | User-provided exclude patterns must be applied in addition to (not replacing) the default exclusions. | Replacing defaults with custom patterns would silently re-include node_modules and dist, causing false positives in the pattern registry. | + +### Gherkin Ast Parser + +| Rule | Invariant | Rationale | +| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| Successful feature file parsing extracts complete metadata | A valid feature file must produce a ParsedFeature with name, description, language, tags, and all nested scenarios with their steps. | Downstream generators (timeline, business rules) depend on complete AST extraction; missing fields cause silent gaps in generated documentation. | +| Invalid Gherkin produces structured errors | Malformed or incomplete Gherkin input must return a Result.err with the source file path and a descriptive error message. | The scanner processes many feature files in batch; structured errors allow graceful degradation and per-file error reporting rather than aborting the entire scan. | + +### Gherkin Rules Support + +| Rule | Invariant | Rationale | +| -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| Rules flow through the entire pipeline without data loss | Rule data (name, description, tags, scenarios) must be preserved through every pipeline stage from parser to ExtractedPattern. | Any data loss at an intermediate stage makes rule content invisible to all downstream generators, silently producing incomplete documentation. The @cucumber/gherkin parser extracts Rules natively. Our pipeline must preserve this data through scanner, extractor, and into ExtractedPattern so generators can access rule names, descriptions, and nested scenarios. | +| Generators can render rules as business documentation | Rules must render as human-readable Business Rules sections, not as raw Given/When/Then syntax. | Business stakeholders cannot interpret Gherkin step definitions; without rendering transformation, feature files remain developer-only artifacts. Business stakeholders see rule names and descriptions as "Business Rules" sections, not Given/When/Then syntax. This enables human-readable PRDs from the same files used for test execution. | +| Custom content blocks render in acceptance criteria | DataTables and DocStrings attached to steps must appear in generated documentation as Markdown tables and fenced code blocks respectively. | Without rendering custom content blocks, acceptance criteria lose the structured data and code examples that make them self-contained and verifiable. DataTables and DocStrings in steps should appear in generated documentation, providing structured data and code examples alongside step descriptions. | +| vitest-cucumber executes scenarios inside Rules | Scenarios nested inside Rule blocks must be executable by vitest-cucumber using the Rule() and RuleScenario() API. | If Rule-scoped scenarios cannot execute, adding Rule blocks to feature files would break the test suite, forcing a choice between documentation structure and test coverage. Test execution must work for scenarios inside Rule blocks. Use Rule() function with RuleScenario() instead of Scenario(). | + +### Implements Tag Processing + +| Rule | Invariant | Rationale | +| ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| Implements tag is defined in taxonomy registry | The implements tag must exist in the taxonomy registry with CSV format. | Without a registry definition, the data-driven AST parser cannot discover or extract the implements tag from source files. | +| Files can implement a single pattern | The AST parser must extract a single implements value and preserve it through the extraction pipeline. | Lost implements values sever the link between implementation files and their roadmap specs, breaking traceability. | +| Files can implement multiple patterns using CSV format | The AST parser must split CSV implements values into individual pattern references with whitespace trimming. | Unsplit or untrimmed CSV values produce invalid pattern references that fail relationship index lookups. | +| Transform builds implementedBy reverse lookup | The transform must compute an implementedBy reverse index so spec patterns know which files implement them. | Without the reverse index, roadmap specs cannot discover their implementation files, breaking traceability and DoD validation. | +| Schemas validate implements field correctly | The Zod schemas must accept implements and implementedBy fields with correct array-of-string types. | Schema rejection of valid implements/implementedBy values causes runtime parse failures that silently drop traceability links. | + +### Layer Inference Testing + +| Rule | Invariant | Rationale | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Timeline layer is detected from /timeline/ directory segments | Any feature file path containing a /timeline/ directory segment is classified as timeline layer. | Timeline features track phased delivery progress and must be grouped separately for roadmap generation and phase filtering. | +| Domain layer is detected from business context directory segments | Feature files in /deciders/, /orders/, or /inventory/ directories are classified as domain layer. | Domain features define core business rules and must be distinguished from infrastructure tests for accurate coverage reporting. | +| Integration layer is detected and takes priority over domain directories | Paths containing /integration-features/ or /integration/ are classified as integration, even when they also contain domain directory names. | Integration tests nested under domain directories (e.g., /integration/orders/) would be misclassified as domain without explicit priority, skewing layer coverage metrics. | +| E2E layer is detected from /e2e/ directory segments | Any feature file path containing an /e2e/ directory segment is classified as e2e layer. | E2E tests require separate execution infrastructure and longer timeouts; misclassification would mix them into faster test suites. | +| Component layer is detected from tool-specific directory segments | Feature files in /scanner/ or /lint/ directories are classified as component layer. | Tool-specific features test internal pipeline stages and must be isolated from business domain and integration layers in documentation grouping. | +| Unknown layer is the fallback for unclassified paths | Any feature file path that does not match a known layer pattern is classified as unknown. | Silently dropping unclassified features would create invisible gaps in test coverage; the unknown fallback ensures every feature is accounted for. | +| Path normalization handles cross-platform and case differences | Layer inference produces correct results regardless of path separators, case, or absolute vs relative paths. | The consumer monorepo runs on multiple platforms; platform-dependent classification would produce inconsistent documentation across developer machines and CI. | +| FEATURE_LAYERS constant provides validated layer enumeration | FEATURE_LAYERS is a readonly array containing exactly all 6 valid layer values. | Consumers iterate over FEATURE_LAYERS for exhaustive layer handling; a mutable or incomplete array would cause missed layers at runtime. | + +### Pattern Relationship Model + +| Rule | Invariant | Rationale | +| --------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Code files declare pattern realization via implements tag | Files with `@libar-docs-implements:PatternName,OtherPattern` are linked to the specified patterns without causing conflicts. Pattern definitions remain in roadmap specs; implementation files provide supplementary metadata. Multiple files can implement the same pattern, and one file can implement multiple patterns. | This mirrors UML's "realization" relationship where a class implements an interface. Code realizes the specification. Direction is code→spec (backward link). CSV format allows a single implementation file to realize multiple patterns when implementing a pattern family (e.g., durability primitives). | +| Pattern inheritance uses extends relationship tag | Files with `@libar-docs-extends:BasePattern` declare that they extend another pattern's capabilities. This is a generalization relationship where the extending pattern is a specialization of the base pattern. | Pattern families exist where specialized patterns build on base patterns. For example, `ReactiveProjections` extends `ProjectionCategories`. The extends relationship enables inheritance-based documentation and validates pattern hierarchy. | +| Technical dependencies use directed relationship tags | `@libar-docs-uses` declares outbound dependencies (what this pattern depends on). `@libar-docs-used-by` declares inbound dependencies (what depends on this pattern). Both are CSV format. | These represent technical coupling between patterns. The distinction matters for impact analysis: changing a pattern affects its `used-by` consumers but not its `uses` dependencies. | +| Roadmap sequencing uses ordering relationship tags | `@libar-docs-depends-on` declares what must be completed first (roadmap sequencing). `@libar-docs-enables` declares what this unlocks when completed. These are planning relationships, not technical dependencies. | Sequencing is about order of work, not runtime coupling. A pattern may depend on another being complete without using its code. | +| Cross-tier linking uses traceability tags (PDR-007) | `@libar-docs-executable-specs` on roadmap specs points to test locations. `@libar-docs-roadmap-spec` on package specs points back to the pattern. These create bidirectional traceability. | Two-tier architecture (PDR-007) separates planning specs from executable tests. Traceability tags maintain the connection for navigation and completeness checking. | +| Epic/Phase/Task hierarchy uses parent-child relationships | `@libar-docs-level` declares the hierarchy tier (epic, phase, task). `@libar-docs-parent` links to the containing pattern. This enables rollup progress tracking. | Large initiatives decompose into phases and tasks. The hierarchy allows progress aggregation (e.g., "Epic 80% complete based on child phases"). | +| All relationships appear in generated documentation | The PATTERNS.md dependency graph renders all relationship types with distinct visual styles. Pattern detail pages list all related artifacts grouped by relationship type. | Visualization makes the relationship model accessible. Different arrow styles distinguish relationship semantics at a glance. | +| Linter detects relationship violations | The pattern linter validates that all relationship targets exist, implements files don't have pattern tags, and bidirectional links are consistent. | Broken relationships cause confusion and incorrect generated docs. Early detection during linting prevents propagation of errors. | + +### Pattern Tag Extraction + +| Rule | Invariant | Rationale | +| --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Single value tags produce scalar metadata fields | Each single-value tag (pattern, phase, status, brief) maps to exactly one metadata field with the correct type. | Incorrect type coercion (e.g., phase as string instead of number) causes downstream pipeline failures in filtering and sorting. | +| Array value tags accumulate into list metadata fields | Tags for depends-on and enables split comma-separated values and accumulate across multiple tag occurrences. | Missing a dependency value silently breaks the dependency graph, causing incorrect build ordering and orphaned pattern references. | +| Category tags are colon-free tags filtered against known non-categories | Tags without colons become categories, except known non-category tags (acceptance-criteria, happy-path) and the libar-docs opt-in marker. | Including test-control tags (acceptance-criteria, happy-path) as categories pollutes the pattern taxonomy with non-semantic values. | +| Complex tag lists produce fully populated metadata | All tag types (scalar, array, category) are correctly extracted from a single mixed tag list. | Real feature files combine many tag types; extraction must handle all types simultaneously without interference between parsers. | +| Edge cases produce safe defaults | Empty or invalid inputs produce empty metadata or omit invalid fields rather than throwing errors. | Throwing on malformed tags would abort extraction for the entire file, losing valid metadata from well-formed tags. | +| Convention tags support CSV values with whitespace trimming | Convention tags split comma-separated values and trim whitespace from each value. | Untrimmed whitespace creates distinct values for the same convention, causing false negatives in convention-based filtering and validation. | +| Registry-driven extraction handles enums, transforms, and value constraints | Tags defined in the registry use data-driven extraction with enum validation, CSV accumulation, value transforms, and constraint checking. | Hard-coded if/else branches for each tag type cannot scale; registry-driven extraction ensures new tags are supported by configuration, not code changes. | + +### Scanner Core + +| Rule | Invariant | Rationale | +| ------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | +| scanPatterns extracts directives from TypeScript files | Every file with a valid opt-in marker and JSDoc directives produces a complete ScannedFile with tags, description, examples, and exports. | Downstream generators depend on complete directive data; partial extraction causes silent documentation gaps across the monorepo. | +| scanPatterns collects errors without aborting | A parse failure in one file never prevents other files from being scanned; the result is always Ok with errors collected separately. | In a monorepo with hundreds of files, a single syntax error must not block the entire documentation pipeline. | +| Pattern matching and exclusion filtering | Glob patterns control file discovery and exclusion patterns remove matched files before scanning. | Without exclusion filtering, internal directories and generated files would pollute the pattern registry with false positives and slow down scanning. | +| File opt-in requirement gates scanning | Only files containing a standalone @libar-docs marker (not @libar-docs-\*) are eligible for directive extraction. | Without opt-in gating, every TypeScript file in the monorepo would be parsed, wasting processing time on files that have no documentation directives. | + +### Shape Extraction + +| Rule | Invariant | Rationale | +| ------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| extract-shapes tag is defined in registry | The `extract-shapes` tag must exist with CSV format to list multiple type names for extraction. | Without a CSV-format tag, there is no mechanism to specify which type names to extract, and the extractor cannot discover shapes from source files. | +| Interfaces are extracted from TypeScript AST | When `@libar-docs-extract-shapes` lists an interface name, the extractor must find and extract the complete interface definition including JSDoc comments, generics, and extends clauses. | Partial extraction (missing generics, JSDoc, or extends clauses) produces incomplete API documentation that misleads consumers about a type's actual contract. | +| Type aliases are extracted from TypeScript AST | Type aliases (including union types, intersection types, and mapped types) are extracted when listed in extract-shapes. | Type aliases define domain vocabulary (status enums, branded types, utility types) that consumers need to understand API signatures; omitting them leaves gaps in generated documentation. | +| Enums are extracted from TypeScript AST | Both string and numeric enums are extracted with their complete member definitions. | Enum members define the closed set of valid values for a type; extracting only the enum name without its members provides no useful information to documentation consumers. | +| Function signatures are extracted (body omitted) | When a function name is listed in extract-shapes, only the signature (parameters, return type, generics) is extracted. The function body is replaced with ellipsis for documentation purposes. | Including implementation bodies in generated documentation exposes internal logic, bloats output size, and creates a maintenance burden when internals change without API changes. | +| Multiple shapes are extracted in specified order | When multiple shapes are listed, they appear in the documentation in the order specified in the tag, not source order. | Authors intentionally order shapes for progressive disclosure (e.g., output before input); using source order would break the author's intended documentation narrative. | +| Extracted shapes render as fenced code blocks | Codecs render extracted shapes as TypeScript fenced code blocks, grouped under an "API Types" or similar section. | Rendering shapes as plain text or without language hints prevents syntax highlighting and makes API types unreadable in generated markdown documentation. | +| Shapes can reference types from imports | Extracted shapes may reference types from imports. The extractor does NOT resolve imports - it extracts the shape as-is. Consumers understand that referenced types are defined elsewhere. | Resolving imports would require full dependency graph traversal across the codebase, dramatically increasing complexity and coupling the extractor to the project's module structure. | +| Overloaded function signatures are all extracted | When a function has multiple overload signatures, all signatures are extracted together as they represent the complete API. | Extracting only one overload signature hides valid call patterns from consumers, leading to incorrect usage assumptions about the function's capabilities. | +| Shape rendering supports grouping options | Codecs can render shapes grouped in a single code block or as separate code blocks, depending on detail level. | Compact claude-md modules need grouped blocks to minimize token usage, while detailed human docs benefit from separate blocks with individual JSDoc annotations. | + +### Shape Extraction Rendering Testing + +| Rule | Invariant | Rationale | +| -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Multiple shapes are extracted in specified order | Extracted shapes appear in the order specified by the tag list, not in source file declaration order. | Documentation consumers rely on tag-specified ordering for consistent, predictable layout regardless of how source files are organized. | +| Extracted shapes render as fenced code blocks | Every extracted shape renders as a fenced TypeScript code block in the markdown output. | Fenced code blocks provide syntax highlighting and preserve type definition formatting, which is essential for readable API documentation. | +| Imported and re-exported shapes are tracked separately | Shapes resolved via import or re-export statements are classified distinctly from locally declared shapes. | Silently extracting imported types as if they were local declarations would produce duplicate or misleading documentation, since the canonical definition lives in another file. | +| Invalid TypeScript produces error result | Malformed TypeScript source returns an error Result instead of throwing or producing partial shapes. | Unhandled parse exceptions would crash the pipeline mid-run, preventing all subsequent files from being processed. | +| Shape rendering supports grouping options | The `groupInSingleBlock` option controls whether shapes render in one combined code fence or in separate per-shape code fences. | Different documentation layouts require different grouping strategies; a single block provides compact overviews while separate blocks allow per-type commentary. | +| Annotation tags are stripped from extracted JSDoc while preserving standard tags | Extracted shapes never contain @libar-docs-\* annotation lines in their jsDoc field. | Shape JSDoc is rendered in documentation output. Annotation tags are metadata for the extraction pipeline, not user-visible documentation content. | +| Large source files are rejected to prevent memory exhaustion | Source files exceeding 5MB are rejected before parsing begins. | Feeding unbounded input to the TypeScript parser risks out-of-memory crashes that would halt the entire extraction pipeline. | + +### Shape Extraction Types Testing + +| Rule | Invariant | Rationale | +| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| extract-shapes tag exists in registry with CSV format | The `extract-shapes` tag must be registered with CSV format so multiple shape names can be specified in a single annotation. | Without CSV format registration, the tag parser cannot split comma-separated shape lists, causing only the first shape to be extracted. | +| Interfaces are extracted from TypeScript AST | Every named interface declaration in a TypeScript source file must be extractable as a shape with kind `interface`, including generics, extends clauses, and JSDoc. | Interfaces are the primary API surface for TypeScript libraries; failing to extract them leaves the most important type contracts undocumented. | +| Property-level JSDoc is extracted for interface properties | Property-level JSDoc must be attributed only to the immediately adjacent property, never inherited from the parent interface declaration. | Misattributing interface-level JSDoc to the first property produces incorrect per-field documentation and misleads consumers about individual property semantics. The extractor uses strict adjacency (gap = 1 line) to prevent interface-level JSDoc from being misattributed to the first property. | +| Type aliases are extracted from TypeScript AST | Union types, mapped types, and conditional types must all be extractable as shapes with kind `type`, preserving their full type expression. | Type aliases encode domain constraints (e.g., discriminated unions, mapped utilities) that are essential for API documentation; omitting them hides the type-level design. | +| Enums are extracted from TypeScript AST | Both regular and const enums must be extractable as shapes with kind `enum`, including their member values. | Enums define finite value sets used in validation and serialization; missing them from documentation forces consumers to read source code to discover valid values. | +| Function signatures are extracted with body omitted | Extracted function shapes must include the full signature (name, parameters, return type, async modifier) but never the implementation body. | Including function bodies in documentation exposes implementation details, inflates output size, and creates a maintenance burden when internals change without signature changes. | +| Const declarations are extracted from TypeScript AST | Const declarations must be extractable as shapes with kind `const`, whether or not they carry an explicit type annotation. | Constants define configuration defaults, version strings, and sentinel values that consumers depend on; excluding them creates documentation gaps for public API surface. | +| Non-exported shapes are extractable | Shape extraction must succeed for declarations regardless of export status, with the `exported` flag accurately reflecting visibility. | Internal types often define the core domain model; restricting extraction to exports only would omit types that are essential for understanding module internals. | + +### Uses Tag Testing + +| Rule | Invariant | Rationale | +| --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | +| Uses tag is defined in taxonomy registry | The uses and used-by tags must be registered in the taxonomy with CSV format and dependency-related purpose descriptions. | Without registry definitions, the data-driven AST parser cannot discover or extract these tags from source files. | +| Uses tag is extracted from TypeScript files | The AST parser must extract single and comma-separated uses values from TypeScript JSDoc annotations. | Missing or malformed uses extraction breaks runtime dependency tracking and produces incomplete relationship diagrams. | +| Used-by tag is extracted from TypeScript files | The AST parser must extract single and comma-separated used-by values from TypeScript JSDoc annotations. | Missing used-by extraction prevents reverse dependency lookups, leaving consumers unable to discover which patterns depend on them. | +| Uses relationships are stored in relationship index | All declared uses and usedBy relationships must be stored in the relationship index as explicitly declared entries. | Omitting relationships from the index causes dependency diagrams and impact-analysis queries to silently miss connections. | +| Schemas validate uses field correctly | DocDirective and RelationshipEntry schemas must accept uses and usedBy fields as valid CSV string values. | Schema rejection of valid uses/usedBy values causes runtime parse failures that silently drop relationship data. | --- diff --git a/docs-live/product-areas/CONFIGURATION.md b/docs-live/product-areas/CONFIGURATION.md index e043081e..a8145ceb 100644 --- a/docs-live/product-areas/CONFIGURATION.md +++ b/docs-live/product-areas/CONFIGURATION.md @@ -987,788 +987,84 @@ const PRESETS: Record; --- -## Behavior Specifications - -### DEFAULT_WORKFLOW_CONFIG — Inline Default Workflow Constant - -[View DEFAULT_WORKFLOW_CONFIG — Inline Default Workflow Constant source](delivery-process/stubs/config-based-workflow-definition/default-workflow-config.ts) - -## DEFAULT_WORKFLOW_CONFIG — Inline Default Workflow Constant - -Replaces the dead file-based loading path (`catalogue/workflows/6-phase-standard.json`) -with an inline constant that satisfies the existing `WorkflowConfig` type. - -The constant uses only the 4 canonical statuses from `PROCESS_STATUS_VALUES` -(roadmap, active, completed, deferred) — not the stale 5-status set from -the deleted JSON (which included non-canonical `implemented` and `partial`). - -DD-1: Inline constant in workflow-loader.ts, not preset integration. -DD-2: Constant satisfies existing WorkflowConfig type from workflow-config.ts. -DD-4: loadDefaultWorkflow() returns LoadedWorkflow synchronously (not Promise). - -### ConfigBasedWorkflowDefinition - -[View ConfigBasedWorkflowDefinition source](delivery-process/specs/config-based-workflow-definition.feature) - -**Problem:** -Every `pnpm process:query` and `pnpm docs:*` invocation prints: -`Failed to load default workflow (6-phase-standard): Workflow file not found` - -The `loadDefaultWorkflow()` function resolves to `catalogue/workflows/` -which does not exist. The directory was deleted during monorepo extraction. -The system already degrades gracefully (workflow = undefined), but the -warning is noise for both human CLI use and future hook consumers (HUD). - -The old `6-phase-standard.json` conflated three concerns: - -- Taxonomy vocabulary (status names) — already in `src/taxonomy/` -- FSM behavior (transitions) — already in `src/validation/fsm/` -- Workflow structure (phases) — orphaned, no proper home - -**Solution:** -Inline the default workflow as a constant in `workflow-loader.ts`, built -from canonical taxonomy values. Make `loadDefaultWorkflow()` synchronous. -Preserve `loadWorkflowFromPath()` for custom `--workflow ` overrides. - -The workflow definition uses only the 4 canonical statuses from ADR-001 -(roadmap, active, completed, deferred) — not the stale 5-status set from -the deleted JSON (which included non-canonical `implemented` and `partial`). - -Phase definitions (Inception, Elaboration, Session, Construction, -Validation, Retrospective) move from a missing JSON file to an inline -constant, making the default workflow always available without file I/O. - -Design Decisions (DS-1, 2026-02-15): - -| ID | Decision | Rationale | -| DD-1 | Inline constant in workflow-loader.ts, not preset integration | Minimal correct fix, zero type regression risk. Preset integration deferred. | -| DD-2 | Constant satisfies existing WorkflowConfig type | Reuse createLoadedWorkflow() from workflow-config.ts. No new types needed. | -| DD-3 | Remove dead code: getCatalogueWorkflowsPath, loadWorkflowConfig, DEFAULT_WORKFLOW_NAME | Dead since monorepo extraction. Public API break is safe (function always threw). | -| DD-4 | loadDefaultWorkflow() returns LoadedWorkflow synchronously | Infallible constant needs no async or error handling. | -| DD-5 | Amend ADR-001 with canonical phase definitions | Phase names are canonical values; fits existing governance in ADR-001. | - -
-Default workflow is built from an inline constant (2 scenarios) - -#### Default workflow is built from an inline constant - -**Invariant:** `loadDefaultWorkflow()` returns a `LoadedWorkflow` without file system access. It cannot fail. The default workflow constant uses only canonical status values from `src/taxonomy/status-values.ts`. - -**Rationale:** The file-based loading path (`catalogue/workflows/`) has been dead code since monorepo extraction. Both callers (orchestrator, process-api) already handle the failure gracefully, proving the system works without it. Making the function synchronous and infallible removes the try-catch ceremony and the warning noise. - -| Step | Change | Impact | -| ----------------------------------------- | ----------------------------------------------------------------------------------------- | --------------------------------------------- | -| Add DEFAULT_WORKFLOW_CONFIG constant | WorkflowConfig literal with 4 statuses, 6 phases | New code in workflow-loader.ts | -| Change loadDefaultWorkflow() to sync | Returns createLoadedWorkflow(DEFAULT_WORKFLOW_CONFIG) | Signature: Promise to sync | -| Remove dead code paths | Delete getCatalogueWorkflowsPath, loadWorkflowConfig, DEFAULT_WORKFLOW_NAME, dead imports | workflow-loader.ts cleanup | -| Remove loadWorkflowConfig from public API | Update src/config/index.ts exports | Breaking change (safe: function always threw) | -| Update orchestrator call site | Remove await and try-catch (lines 410-418) | orchestrator.ts | -| Update process-api call site | Remove await and try-catch (lines 549-555) | process-api.ts | - -**Verified by:** - -- Default workflow loads without warning -- Workflow constant uses canonical statuses only -- Workflow constant uses canonical statuses only - - Implementation approach: - -
- -
-Custom workflow files still work via --workflow flag (1 scenarios) - -#### Custom workflow files still work via --workflow flag - -**Invariant:** `loadWorkflowFromPath()` remains available for projects that need custom workflow definitions. The `--workflow ` CLI flag and `workflowPath` config field continue to work. - -**Rationale:** The inline default replaces file-based _default_ loading, not file-based _custom_ loading. Projects may define custom phases or additional statuses via JSON files. - -**Verified by:** - -- Custom workflow file overrides default - -
- -
-FSM validation and Process Guard are not affected - -#### FSM validation and Process Guard are not affected - -**Invariant:** The FSM transition matrix, protection levels, and Process Guard rules remain hardcoded in `src/validation/fsm/` and `src/lint/process-guard/`. They do not read from `LoadedWorkflow`. - -**Rationale:** FSM and workflow are separate concerns. FSM enforces status transitions (4-state model from PDR-005). Workflow defines phase structure (6-phase USDP). The workflow JSON declared `transitionsTo` on its statuses, but no code ever read those values — the FSM uses its own `VALID_TRANSITIONS` constant. This separation is correct and intentional. Blast radius analysis confirmed zero workflow imports in: - src/validation/fsm/ (4 files) - src/lint/process-guard/ (5 files) - src/taxonomy/ (all files) - -
- -
-Workflow as a configurable preset field is deferred - -#### Workflow as a configurable preset field is deferred - -Adding `workflow` as a field on `DeliveryProcessConfig` (presets) and -`DeliveryProcessProjectConfig` (project config) is a natural next step -but NOT required for the MVP fix. - - The inline constant in `workflow-loader.ts` resolves the warning. Moving - workflow into the preset/config system enables: - - Different presets with different default phases (e.g., 3-phase generic) - - Per-project phase customization in delivery-process.config.ts - - Phase definitions appearing in generated documentation - - See ideation artifact for design options: - delivery-process/ideations/2026-02-15-workflow-config-and-fsm-extensibility.feature - -
- -### SourceMerging - -[View SourceMerging source](tests/features/config/source-merging.feature) - -mergeSourcesForGenerator computes effective sources for a specific -generator by applying per-generator overrides to base resolved sources. - -**Problem:** - -- Different generators may need different feature or input sources -- Override semantics must be predictable and well-defined -- Base exclude patterns must always be inherited - -**Solution:** - -- replaceFeatures (non-empty) replaces base features entirely -- additionalFeatures appends to base features -- additionalInput appends to base typescript sources -- exclude is always inherited from base (no override mechanism) - -
-No override returns base unchanged (1 scenarios) - -#### No override returns base unchanged - -**Invariant:** When no source overrides are provided, the merged result must be identical to the base source configuration. - -**Rationale:** The merge function must be safe to call unconditionally — returning modified results without overrides would corrupt default source paths. - -**Verified by:** - -- No override returns base sources - -
- -
-Feature overrides control feature source selection (3 scenarios) - -#### Feature overrides control feature source selection - -**Invariant:** additionalFeatures must append to base feature sources while replaceFeatures must completely replace them, and these two options are mutually exclusive. - -**Rationale:** Projects need both additive and replacement strategies — additive for extending (monorepo packages), replacement for narrowing (focused generation runs). - -**Verified by:** - -- additionalFeatures appended to base features -- replaceFeatures replaces base features entirely -- Empty replaceFeatures does NOT replace - -
- -
-TypeScript source overrides append additional input (1 scenarios) - -#### TypeScript source overrides append additional input - -**Invariant:** additionalInput must append to (not replace) the base TypeScript source paths. - -**Rationale:** TypeScript sources are always additive — the base sources contain core patterns that must always be included alongside project-specific additions. - -**Verified by:** - -- additionalInput appended to typescript sources - -
- -
-Combined overrides apply together (1 scenarios) - -#### Combined overrides apply together - -**Invariant:** Feature overrides and TypeScript overrides must compose independently when both are provided simultaneously. - -**Rationale:** Real configs often specify both feature and TypeScript overrides — they must not interfere with each other or produce order-dependent results. - -**Verified by:** - -- additionalFeatures and additionalInput combined - -
- -
-Exclude is always inherited from base (1 scenarios) - -#### Exclude is always inherited from base - -**Invariant:** The exclude patterns must always come from the base configuration, never from overrides. - -**Rationale:** Exclude patterns are a safety mechanism — allowing overrides to modify excludes could accidentally include sensitive or generated files in the scan. - -**Verified by:** - -- Exclude always inherited - -
- -### ProjectConfigLoader - -[View ProjectConfigLoader source](tests/features/config/project-config-loader.feature) - -loadProjectConfig loads and resolves configuration from file, -supporting both new-style defineConfig and legacy createDeliveryProcess formats. - -**Problem:** - -- Two config formats exist (new-style and legacy) that need unified loading -- Invalid configs must produce actionable error messages -- Missing config files should gracefully fall back to defaults - -**Solution:** - -- loadProjectConfig returns ResolvedConfig for both formats -- Zod validation errors are formatted with field paths -- No config file returns default resolved config with isDefault=true - -
-Missing config returns defaults (1 scenarios) - -#### Missing config returns defaults - -**Invariant:** When no config file exists, loadProjectConfig must return a default resolved config with isDefault=true. - -**Rationale:** Graceful fallback enables zero-config usage — new projects work without requiring config file creation. - -**Verified by:** - -- No config file returns default resolved config - -
- -
-New-style config is loaded and resolved (1 scenarios) - -#### New-style config is loaded and resolved - -**Invariant:** A file exporting defineConfig must be loaded, validated, and resolved with correct preset categories. - -**Rationale:** defineConfig is the primary config format — correct loading is the critical path for all documentation generation. - -**Verified by:** - -- defineConfig export loads and resolves correctly - -
- -
-Legacy config is loaded with backward compatibility (1 scenarios) - -#### Legacy config is loaded with backward compatibility - -**Invariant:** A file exporting createDeliveryProcess must be loaded and produce a valid resolved config. - -**Rationale:** Backward compatibility prevents breaking existing consumers during migration to the new config format. - -**Verified by:** - -- Legacy createDeliveryProcess export loads correctly - -
- -
-Invalid configs produce clear errors (2 scenarios) - -#### Invalid configs produce clear errors - -**Invariant:** Config files without a default export or with invalid data must produce descriptive error messages. - -**Rationale:** Actionable error messages reduce debugging time — users need to know what to fix, not just that something failed. - -**Verified by:** - -- Config without default export returns error -- Config with invalid project config returns Zod error - -
- -### PresetSystem - -[View PresetSystem source](tests/features/config/preset-system.feature) - -Presets provide pre-configured taxonomies for different project types. - -**Problem:** - -- New users need sensible defaults for their project type -- DDD projects need full taxonomy -- Simple projects need minimal configuration - -**Solution:** - -- GENERIC_PRESET for non-DDD projects -- DDD_ES_CQRS_PRESET for full DDD/ES/CQRS taxonomy -- PRESETS lookup map for programmatic access - -
-Generic preset provides minimal taxonomy (2 scenarios) - -#### Generic preset provides minimal taxonomy - -**Invariant:** The generic preset must provide exactly 3 categories (core, api, infra) with @docs- prefix. - -**Rationale:** Simple projects need minimal configuration without DDD-specific categories cluttering the taxonomy. - -**Verified by:** - -- Generic preset has correct prefix configuration -- Generic preset has core categories only - -
- -
-Libar generic preset provides minimal taxonomy with libar prefix (2 scenarios) - -#### Libar generic preset provides minimal taxonomy with libar prefix - -**Invariant:** The libar-generic preset must provide exactly 3 categories with @libar-docs- prefix. - -**Rationale:** This package uses @libar-docs- prefix to avoid collisions with consumer projects' annotations. - -**Verified by:** - -- Libar generic preset has correct prefix configuration -- Libar generic preset has core categories only - -
- -
-DDD-ES-CQRS preset provides full taxonomy (4 scenarios) - -#### DDD-ES-CQRS preset provides full taxonomy - -**Invariant:** The DDD preset must provide all 21 categories spanning DDD, ES, CQRS, and infrastructure domains. - -**Rationale:** DDD architectures require fine-grained categorization to distinguish bounded contexts, aggregates, and projections. - -**Verified by:** - -- Full preset has correct prefix configuration -- Full preset has all DDD categories -- Full preset has infrastructure categories -- Full preset has all 21 categories - -
- -
-Presets can be accessed by name (3 scenarios) - -#### Presets can be accessed by name - -**Invariant:** All preset instances must be accessible via the PRESETS map using their canonical string key. - -**Rationale:** Programmatic access enables config files to reference presets by name instead of importing instances. - -**Verified by:** - -- Generic preset accessible via PRESETS map -- DDD preset accessible via PRESETS map -- Libar generic preset accessible via PRESETS map - -
- -### DefineConfigTesting - -[View DefineConfigTesting source](tests/features/config/define-config.feature) - -The defineConfig identity function and DeliveryProcessProjectConfigSchema -provide type-safe configuration authoring with runtime validation. - -**Problem:** - -- Users need type-safe config authoring without runtime overhead -- Invalid configs must be caught at load time, not at usage time -- New-style vs legacy config must be distinguishable programmatically - -**Solution:** - -- defineConfig() is a zero-cost identity function for TypeScript autocompletion -- Zod schema validates at load time with precise error messages -- isProjectConfig() and isLegacyInstance() type guards disambiguate config formats - -
-defineConfig is an identity function (1 scenarios) - -#### defineConfig is an identity function - -**Invariant:** The defineConfig helper must return its input unchanged, serving only as a type annotation aid for IDE autocomplete. - -**Rationale:** defineConfig exists for TypeScript type inference in config files — any transformation would surprise users who expect their config object to pass through unmodified. - -**Verified by:** - -- defineConfig returns input unchanged - -
- -
-Schema validates correct configurations (2 scenarios) - -#### Schema validates correct configurations - -**Invariant:** Valid configuration objects (both minimal and fully-specified) must pass schema validation without errors. - -**Rationale:** The schema must accept all legitimate configuration shapes — rejecting valid configs would block users from using supported features. - -**Verified by:** - -- Valid minimal config passes validation -- Valid full config passes validation - -
- -
-Schema rejects invalid configurations (5 scenarios) - -#### Schema rejects invalid configurations - -**Invariant:** The configuration schema must reject invalid values including empty globs, directory traversal patterns, mutually exclusive options, invalid preset names, and unknown fields. - -**Rationale:** Schema validation is the first line of defense against misconfiguration — permissive validation lets invalid configs produce confusing downstream errors. - -**Verified by:** - -- Empty glob pattern rejected -- Parent directory traversal rejected in globs -- replaceFeatures and additionalFeatures mutually exclusive -- Invalid preset name rejected -- Unknown fields rejected in strict mode - -
- -
-Type guards distinguish config formats (4 scenarios) - -#### Type guards distinguish config formats - -**Invariant:** The isProjectConfig and isLegacyInstance type guards must correctly distinguish between new-style project configs and legacy configuration instances. - -**Rationale:** The codebase supports both config formats during migration — incorrect type detection would apply the wrong loading path and produce runtime errors. - -**Verified by:** - -- isProjectConfig returns true for new-style config -- isProjectConfig returns false for legacy instance -- isLegacyInstance returns true for legacy objects -- isLegacyInstance returns false for new-style config - -
- -### ConfigurationAPI - -[View ConfigurationAPI source](tests/features/config/configuration-api.feature) - -The createDeliveryProcess factory provides a type-safe way to configure -the delivery process with custom tag prefixes and presets. - -**Problem:** - -- Different projects need different tag prefixes -- Default taxonomy may not fit all use cases -- Configuration should be type-safe and validated - -**Solution:** - -- createDeliveryProcess() factory with preset support -- Custom tagPrefix and fileOptInTag overrides -- Type-safe configuration with generics - -
-Factory creates configured instances with correct defaults (4 scenarios) - -#### Factory creates configured instances with correct defaults - -**Invariant:** The configuration factory must produce a fully initialized instance for any supported preset, with the libar-generic preset as the default when no arguments are provided. - -**Rationale:** A sensible default preset eliminates boilerplate for the common case while still supporting specialized presets (ddd-es-cqrs) for advanced monorepo configurations. - -**Verified by:** - -- Create with no arguments uses libar-generic preset -- Create with generic preset -- Create with libar-generic preset -- Create with ddd-es-cqrs preset explicitly - -
- -
-Custom prefix configuration works correctly (3 scenarios) - -#### Custom prefix configuration works correctly - -**Invariant:** Custom tag prefix and file opt-in tag overrides must be applied to the configuration instance, replacing the preset defaults. - -**Rationale:** Consuming projects may use different annotation prefixes — custom prefixes enable the toolkit to work with any tag convention without forking presets. - -**Verified by:** - -- Custom tag prefix overrides preset -- Custom file opt-in tag overrides preset -- Both prefix and opt-in tag can be customized together - -
- -
-Preset categories replace base categories entirely (2 scenarios) - -#### Preset categories replace base categories entirely - -**Invariant:** When a preset defines its own category set, it must fully replace (not merge with) the base categories. - -**Rationale:** Category sets are curated per-preset — merging would include irrelevant categories (e.g., DDD categories in a generic project) that pollute taxonomy reports. - -**Verified by:** - -- Generic preset excludes DDD categories -- Libar-generic preset excludes DDD categories - -
- -
-Regex builders use configured prefix (6 scenarios) - -#### Regex builders use configured prefix - -**Invariant:** All regex builders (hasFileOptIn, hasDocDirectives, normalizeTag) must use the configured tag prefix, not a hardcoded one. - -**Rationale:** Regex patterns that ignore the configured prefix would miss annotations in projects using custom prefixes, silently skipping source files. - -**Verified by:** - -- hasFileOptIn detects configured opt-in tag -- hasFileOptIn rejects wrong opt-in tag -- hasDocDirectives detects configured prefix -- hasDocDirectives rejects wrong prefix -- normalizeTag removes configured prefix -- normalizeTag handles tag without prefix - -
- -### ConfigResolution - -[View ConfigResolution source](tests/features/config/config-resolution.feature) - -resolveProjectConfig transforms a raw DeliveryProcessProjectConfig into -a fully resolved ResolvedConfig with all defaults applied. - -**Problem:** - -- Raw user config is partial with many optional fields -- Stubs need to be merged into typescript sources transparently -- Defaults must be applied consistently across all consumers - -**Solution:** - -- resolveProjectConfig applies defaults in a predictable order -- createDefaultResolvedConfig provides a complete fallback -- Stubs are merged into typescript sources at resolution time - -
-Default config provides sensible fallbacks (1 scenarios) - -#### Default config provides sensible fallbacks - -**Invariant:** A config created without user input must have isDefault=true and empty source collections. - -**Rationale:** Downstream consumers need a safe starting point when no config file exists. - -**Verified by:** - -- Default config has empty sources and isDefault flag - -
- -
-Preset creates correct taxonomy instance (1 scenarios) - -#### Preset creates correct taxonomy instance - -**Invariant:** Each preset must produce a taxonomy with the correct number of categories and tag prefix. - -**Rationale:** Presets are the primary user-facing configuration — wrong category counts break downstream scanning. - -**Verified by:** - -- libar-generic preset creates 3 categories - -
- -
-Stubs are merged into typescript sources (1 scenarios) - -#### Stubs are merged into typescript sources - -**Invariant:** Stub glob patterns must appear in resolved typescript sources alongside original globs. - -**Rationale:** Stubs extend the scanner's source set without requiring users to manually list them. - -**Verified by:** - -- Stubs appended to typescript sources - -
- -
-Output defaults are applied (2 scenarios) - -#### Output defaults are applied - -**Invariant:** Missing output configuration must resolve to "docs/architecture" with overwrite=false. - -**Rationale:** Consistent defaults prevent accidental overwrites and establish a predictable output location. - -**Verified by:** - -- Default output directory and overwrite -- Explicit output overrides defaults - -
- -
-Generator defaults are applied (1 scenarios) - -#### Generator defaults are applied - -**Invariant:** A config with no generators specified must default to the "patterns" generator. - -**Rationale:** Patterns is the most commonly needed output — defaulting to it reduces boilerplate. - -**Verified by:** - -- Generators default to patterns - -
- -
-Context inference rules are prepended (1 scenarios) - -#### Context inference rules are prepended - -**Invariant:** User-defined inference rules must appear before built-in defaults in the resolved array. - -**Rationale:** Prepending gives user rules priority during context matching without losing defaults. - -**Verified by:** - -- User rules prepended to defaults - -
- -
-Config path is carried from options (1 scenarios) - -#### Config path is carried from options - -**Invariant:** The configPath from resolution options must be preserved unchanged in resolved config. - -**Rationale:** Downstream tools need the original config file location for error reporting and relative path resolution. - -**Verified by:** - -- configPath carried from resolution options - -
- -### ConfigLoaderTesting - -[View ConfigLoaderTesting source](tests/features/config/config-loader.feature) - -The config loader discovers and loads `delivery-process.config.ts` files -for hierarchical configuration, enabling package-level and repo-level -taxonomy customization. - -**Problem:** - -- Different directories need different taxonomies -- Package-level config should override repo-level -- CLI tools need automatic config discovery - -**Solution:** - -- Walk up directories looking for `delivery-process.config.ts` -- Stop at repo root (.git marker) -- Fall back to libar-generic preset (3 categories) if no config found - -
-Config files are discovered by walking up directories (4 scenarios) - -#### Config files are discovered by walking up directories - -**Invariant:** The config loader must search for configuration files starting from the current directory and walking up parent directories until a match is found or the filesystem root is reached. - -**Rationale:** Projects may run CLI commands from subdirectories — upward traversal ensures the nearest config file is always found regardless of working directory. - -**Verified by:** - -- Find config file in current directory -- Find config file in parent directory -- Prefer TypeScript config over JavaScript -- Return null when no config file exists - -
- -
-Config discovery stops at repo root (1 scenarios) - -#### Config discovery stops at repo root - -**Invariant:** Directory traversal must stop at repository root markers (e.g., .git directory) and not search beyond them. - -**Rationale:** Searching beyond the repo root could find unrelated config files from parent projects, producing confusing cross-project behavior. - -**Verified by:** - -- Stop at .git directory marker - -
- -
-Config is loaded and validated (4 scenarios) - -#### Config is loaded and validated - -**Invariant:** Loaded config files must have a valid default export matching the expected configuration schema, with appropriate error messages for invalid formats. - -**Rationale:** Invalid configurations produce cryptic downstream errors — early validation with clear messages prevents debugging wasted on malformed config. - -**Verified by:** - -- Load valid config with default fallback -- Load valid config file -- Error on config without default export -- Error on config with wrong type - -
- -
-Config errors are formatted for display (1 scenarios) - -#### Config errors are formatted for display - -**Invariant:** Configuration loading errors must be formatted as human-readable messages including the file path and specific error description. - -**Rationale:** Raw error objects are not actionable — developers need the config file path and a clear description to diagnose and fix configuration issues. - -**Verified by:** - -- Format error with path and message - -
+## Business Rules + +8 patterns, 36 rules with invariants (36 total) + +### Config Based Workflow Definition + +| Rule | Invariant | Rationale | +| ---------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Default workflow is built from an inline constant | `loadDefaultWorkflow()` returns a `LoadedWorkflow` without file system access. It cannot fail. The default workflow constant uses only canonical status values from `src/taxonomy/status-values.ts`. | The file-based loading path (`catalogue/workflows/`) has been dead code since monorepo extraction. Both callers (orchestrator, process-api) already handle the failure gracefully, proving the system works without it. Making the function synchronous and infallible removes the try-catch ceremony and the warning noise. | +| Custom workflow files still work via --workflow flag | `loadWorkflowFromPath()` remains available for projects that need custom workflow definitions. The `--workflow ` CLI flag and `workflowPath` config field continue to work. | The inline default replaces file-based _default_ loading, not file-based _custom_ loading. Projects may define custom phases or additional statuses via JSON files. | +| FSM validation and Process Guard are not affected | The FSM transition matrix, protection levels, and Process Guard rules remain hardcoded in `src/validation/fsm/` and `src/lint/process-guard/`. They do not read from `LoadedWorkflow`. | FSM and workflow are separate concerns. FSM enforces status transitions (4-state model from PDR-005). Workflow defines phase structure (6-phase USDP). The workflow JSON declared `transitionsTo` on its statuses, but no code ever read those values — the FSM uses its own `VALID_TRANSITIONS` constant. This separation is correct and intentional. Blast radius analysis confirmed zero workflow imports in: - src/validation/fsm/ (4 files) - src/lint/process-guard/ (5 files) - src/taxonomy/ (all files) | +| Workflow as a configurable preset field is deferred | The inline default workflow constant is the only workflow source until preset integration is implemented. No preset or project config field exposes workflow customization. | Coupling workflow into the preset/config system before the inline fix ships would widen the blast radius and risk type regressions across all config consumers. Adding `workflow` as a field on `DeliveryProcessConfig` (presets) and `DeliveryProcessProjectConfig` (project config) is a natural next step but NOT required for the MVP fix. The inline constant in `workflow-loader.ts` resolves the warning. Moving workflow into the preset/config system enables: - Different presets with different default phases (e.g., 3-phase generic) - Per-project phase customization in delivery-process.config.ts - Phase definitions appearing in generated documentation See ideation artifact for design options: delivery-process/ideations/2026-02-15-workflow-config-and-fsm-extensibility.feature | + +### Config Loader Testing + +| Rule | Invariant | Rationale | +| ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | +| Config files are discovered by walking up directories | The config loader must search for configuration files starting from the current directory and walking up parent directories until a match is found or the filesystem root is reached. | Projects may run CLI commands from subdirectories — upward traversal ensures the nearest config file is always found regardless of working directory. | +| Config discovery stops at repo root | Directory traversal must stop at repository root markers (e.g., .git directory) and not search beyond them. | Searching beyond the repo root could find unrelated config files from parent projects, producing confusing cross-project behavior. | +| Config is loaded and validated | Loaded config files must have a valid default export matching the expected configuration schema, with appropriate error messages for invalid formats. | Invalid configurations produce cryptic downstream errors — early validation with clear messages prevents debugging wasted on malformed config. | +| Config errors are formatted for display | Configuration loading errors must be formatted as human-readable messages including the file path and specific error description. | Raw error objects are not actionable — developers need the config file path and a clear description to diagnose and fix configuration issues. | + +### Config Resolution + +| Rule | Invariant | Rationale | +| ------------------------------------------ | ------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------- | +| Default config provides sensible fallbacks | A config created without user input must have isDefault=true and empty source collections. | Downstream consumers need a safe starting point when no config file exists. | +| Preset creates correct taxonomy instance | Each preset must produce a taxonomy with the correct number of categories and tag prefix. | Presets are the primary user-facing configuration — wrong category counts break downstream scanning. | +| Stubs are merged into typescript sources | Stub glob patterns must appear in resolved typescript sources alongside original globs. | Stubs extend the scanner's source set without requiring users to manually list them. | +| Output defaults are applied | Missing output configuration must resolve to "docs/architecture" with overwrite=false. | Consistent defaults prevent accidental overwrites and establish a predictable output location. | +| Generator defaults are applied | A config with no generators specified must default to the "patterns" generator. | Patterns is the most commonly needed output — defaulting to it reduces boilerplate. | +| Context inference rules are prepended | User-defined inference rules must appear before built-in defaults in the resolved array. | Prepending gives user rules priority during context matching without losing defaults. | +| Config path is carried from options | The configPath from resolution options must be preserved unchanged in resolved config. | Downstream tools need the original config file location for error reporting and relative path resolution. | + +### Configuration API + +| Rule | Invariant | Rationale | +| ---------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Factory creates configured instances with correct defaults | The configuration factory must produce a fully initialized instance for any supported preset, with the libar-generic preset as the default when no arguments are provided. | A sensible default preset eliminates boilerplate for the common case while still supporting specialized presets (ddd-es-cqrs) for advanced monorepo configurations. | +| Custom prefix configuration works correctly | Custom tag prefix and file opt-in tag overrides must be applied to the configuration instance, replacing the preset defaults. | Consuming projects may use different annotation prefixes — custom prefixes enable the toolkit to work with any tag convention without forking presets. | +| Preset categories replace base categories entirely | When a preset defines its own category set, it must fully replace (not merge with) the base categories. | Category sets are curated per-preset — merging would include irrelevant categories (e.g., DDD categories in a generic project) that pollute taxonomy reports. | +| Regex builders use configured prefix | All regex builders (hasFileOptIn, hasDocDirectives, normalizeTag) must use the configured tag prefix, not a hardcoded one. | Regex patterns that ignore the configured prefix would miss annotations in projects using custom prefixes, silently skipping source files. | + +### Define Config Testing + +| Rule | Invariant | Rationale | +| --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| defineConfig is an identity function | The defineConfig helper must return its input unchanged, serving only as a type annotation aid for IDE autocomplete. | defineConfig exists for TypeScript type inference in config files — any transformation would surprise users who expect their config object to pass through unmodified. | +| Schema validates correct configurations | Valid configuration objects (both minimal and fully-specified) must pass schema validation without errors. | The schema must accept all legitimate configuration shapes — rejecting valid configs would block users from using supported features. | +| Schema rejects invalid configurations | The configuration schema must reject invalid values including empty globs, directory traversal patterns, mutually exclusive options, invalid preset names, and unknown fields. | Schema validation is the first line of defense against misconfiguration — permissive validation lets invalid configs produce confusing downstream errors. | +| Type guards distinguish config formats | The isProjectConfig and isLegacyInstance type guards must correctly distinguish between new-style project configs and legacy configuration instances. | The codebase supports both config formats during migration — incorrect type detection would apply the wrong loading path and produce runtime errors. | + +### Preset System + +| Rule | Invariant | Rationale | +| ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | +| Generic preset provides minimal taxonomy | The generic preset must provide exactly 3 categories (core, api, infra) with @docs- prefix. | Simple projects need minimal configuration without DDD-specific categories cluttering the taxonomy. | +| Libar generic preset provides minimal taxonomy with libar prefix | The libar-generic preset must provide exactly 3 categories with @libar-docs- prefix. | This package uses @libar-docs- prefix to avoid collisions with consumer projects' annotations. | +| DDD-ES-CQRS preset provides full taxonomy | The DDD preset must provide all 21 categories spanning DDD, ES, CQRS, and infrastructure domains. | DDD architectures require fine-grained categorization to distinguish bounded contexts, aggregates, and projections. | +| Presets can be accessed by name | All preset instances must be accessible via the PRESETS map using their canonical string key. | Programmatic access enables config files to reference presets by name instead of importing instances. | + +### Project Config Loader + +| Rule | Invariant | Rationale | +| --------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | +| Missing config returns defaults | When no config file exists, loadProjectConfig must return a default resolved config with isDefault=true. | Graceful fallback enables zero-config usage — new projects work without requiring config file creation. | +| New-style config is loaded and resolved | A file exporting defineConfig must be loaded, validated, and resolved with correct preset categories. | defineConfig is the primary config format — correct loading is the critical path for all documentation generation. | +| Legacy config is loaded with backward compatibility | A file exporting createDeliveryProcess must be loaded and produce a valid resolved config. | Backward compatibility prevents breaking existing consumers during migration to the new config format. | +| Invalid configs produce clear errors | Config files without a default export or with invalid data must produce descriptive error messages. | Actionable error messages reduce debugging time — users need to know what to fix, not just that something failed. | + +### Source Merging + +| Rule | Invariant | Rationale | +| --------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| No override returns base unchanged | When no source overrides are provided, the merged result must be identical to the base source configuration. | The merge function must be safe to call unconditionally — returning modified results without overrides would corrupt default source paths. | +| Feature overrides control feature source selection | additionalFeatures must append to base feature sources while replaceFeatures must completely replace them, and these two options are mutually exclusive. | Projects need both additive and replacement strategies — additive for extending (monorepo packages), replacement for narrowing (focused generation runs). | +| TypeScript source overrides append additional input | additionalInput must append to (not replace) the base TypeScript source paths. | TypeScript sources are always additive — the base sources contain core patterns that must always be included alongside project-specific additions. | +| Combined overrides apply together | Feature overrides and TypeScript overrides must compose independently when both are provided simultaneously. | Real configs often specify both feature and TypeScript overrides — they must not interfere with each other or produce order-dependent results. | +| Exclude is always inherited from base | The exclude patterns must always come from the base configuration, never from overrides. | Exclude patterns are a safety mechanism — allowing overrides to modify excludes could accidentally include sensitive or generated files in the scan. | --- diff --git a/docs-live/product-areas/CORE-TYPES.md b/docs-live/product-areas/CORE-TYPES.md index 9dbc6b9d..bd33333a 100644 --- a/docs-live/product-areas/CORE-TYPES.md +++ b/docs-live/product-areas/CORE-TYPES.md @@ -23,9 +23,9 @@ Scoped architecture diagram showing component relationships: ```mermaid C4Context title Core Type System - System(StringUtils, "StringUtils") System(ResultMonad, "ResultMonad") System(ErrorFactories, "ErrorFactories") + System(StringUtils, "StringUtils") System(KebabCaseSlugs, "KebabCaseSlugs") System(ErrorHandlingUnification, "ErrorHandlingUnification") Rel(KebabCaseSlugs, StringUtils, "depends on") @@ -41,9 +41,9 @@ Scoped architecture diagram showing component relationships: ```mermaid graph LR - StringUtils["StringUtils"] ResultMonad["ResultMonad"] ErrorFactories["ErrorFactories"] + StringUtils["StringUtils"] KebabCaseSlugs["KebabCaseSlugs"] ErrorHandlingUnification["ErrorHandlingUnification"] KebabCaseSlugs -.->|depends on| StringUtils @@ -125,425 +125,55 @@ type DocError = --- -## Behavior Specifications - -### ResultMonadTypes - -[View ResultMonadTypes source](src/types/result.ts) - -## Result Monad - Type Definitions - -Explicit error handling via discriminated union. -Functions return `Result.ok(value)` or `Result.err(error)` instead of throwing. - -### ErrorFactoryTypes - -[View ErrorFactoryTypes source](src/types/errors.ts) - -## Error Factories - Type Definitions - -Structured, discriminated error types with factory functions. -Each error type has a unique `type` discriminator for exhaustive pattern matching. - -### StringUtils - -[View StringUtils source](tests/features/utils/string-utils.feature) - -String utilities provide consistent text transformations across the codebase. -These functions handle URL slugification and case conversion with proper -handling of edge cases like acronyms and special characters. - -**Covered functions:** - -- `slugify` - Convert text to URL-safe slugs (lowercase, alphanumeric, hyphens) -- `camelCaseToTitleCase` - Convert CamelCase to "Title Case" with spaces - -**Note:** `toKebabCase` is already tested in kebab-case-slugs.feature - -#### slugify generates URL-safe slugs - -**Invariant:** slugify must produce lowercase, alphanumeric, hyphen-only strings with no leading/trailing hyphens. - -**Rationale:** URL slugs appear in file paths and links across all generated documentation; inconsistent slugification would break cross-references. - -**Verified by:** - -- slugify converts text to URL-safe format -- slugify handles empty-ish input -- slugify handles single word - -#### camelCaseToTitleCase generates readable titles - -**Invariant:** camelCaseToTitleCase must insert spaces at camelCase boundaries and preserve known acronyms (HTTP, XML, API, DoD, AST, GraphQL). - -**Rationale:** Pattern names stored as PascalCase identifiers appear as human-readable titles in generated documentation; incorrect splitting would produce unreadable headings. - -**Verified by:** - -- camelCaseToTitleCase converts to title case -- camelCaseToTitleCase handles all-uppercase acronym -- camelCaseToTitleCase handles lowercase word - -### ResultMonad - -[View ResultMonad source](tests/features/types/result-monad.feature) - -The Result type provides explicit error handling via a discriminated union. -This eliminates thrown exceptions in favor of type-safe error propagation. - -**Why Result over try/catch:** - -- Compile-time verification that errors are handled -- Type narrowing via isOk/isErr guards -- Chainable transformations via map/mapErr -- No hidden control flow from thrown exceptions - -
-Result.ok wraps values into success results (4 scenarios) - -#### Result.ok wraps values into success results - -**Invariant:** Result.ok always produces a result where isOk is true, regardless of the wrapped value type (primitives, objects, null, undefined). - -**Verified by:** - -- Result.ok wraps a primitive value -- Result.ok wraps an object value -- Result.ok wraps null value -- Result.ok wraps undefined value - -
- -
-Result.err wraps values into error results (3 scenarios) - -#### Result.err wraps values into error results - -**Invariant:** Result.err always produces a result where isErr is true, supporting Error instances, strings, and structured objects as error values. - -**Verified by:** - -- Result.err wraps an Error instance -- Result.err wraps a string error -- Result.err wraps a structured error object - -
- -
-Type guards distinguish success from error results (2 scenarios) - -#### Type guards distinguish success from error results - -**Invariant:** isOk and isErr are mutually exclusive: exactly one returns true for any Result value. - -**Verified by:** - -- Type guards correctly identify success results -- Type guards correctly identify error results - -
- -
-unwrap extracts the value or throws the error (4 scenarios) - -#### unwrap extracts the value or throws the error - -**Invariant:** unwrap on a success result returns the value; unwrap on an error result always throws an Error instance (wrapping non-Error values for stack trace preservation). - -**Verified by:** - -- unwrap extracts value from success result -- unwrap throws the Error from error result -- unwrap wraps non-Error in Error for proper stack trace -- unwrap serializes object error to JSON in message - -
- -
-unwrapOr extracts the value or returns a default (3 scenarios) - -#### unwrapOr extracts the value or returns a default - -**Invariant:** unwrapOr on a success result returns the contained value (ignoring the default); on an error result it returns the provided default value. - -**Verified by:** - -- unwrapOr returns value from success result -- unwrapOr returns default from error result -- unwrapOr returns numeric default from error result - -
- -
-map transforms the success value without affecting errors (3 scenarios) - -#### map transforms the success value without affecting errors - -**Invariant:** map applies the transformation function only to success results; error results pass through unchanged. Multiple maps can be chained. - -**Verified by:** - -- map transforms success value -- map passes through error unchanged -- map chains multiple transformations - -
- -
-mapErr transforms the error value without affecting successes (3 scenarios) - -#### mapErr transforms the error value without affecting successes - -**Invariant:** mapErr applies the transformation function only to error results; success results pass through unchanged. Error types can be converted. - -**Verified by:** - -- mapErr transforms error value -- mapErr passes through success unchanged -- mapErr converts error type - -
- -### ErrorFactories - -[View ErrorFactories source](tests/features/types/error-factories.feature) - -Error factories create structured, discriminated error types with consistent -message formatting. Each error type has a unique discriminator for exhaustive -pattern matching in switch statements. - -**Why typed errors matter:** - -- Compile-time exhaustiveness checking in error handlers -- Consistent message formatting across the codebase -- Structured data for logging and reporting -- Type narrowing via discriminator field - -
-createFileSystemError produces discriminated FILE_SYSTEM_ERROR types (3 scenarios) - -#### createFileSystemError produces discriminated FILE_SYSTEM_ERROR types - -**Invariant:** Every FileSystemError must have type "FILE_SYSTEM_ERROR", the source file path, a reason enum value, and a human-readable message derived from the reason. - -**Rationale:** File system errors are the most common failure mode in the scanner; discriminated types enable exhaustive switch/case handling in error recovery paths. - -**Verified by:** - -- createFileSystemError generates correct message for each reason -- createFileSystemError includes optional originalError -- createFileSystemError omits originalError when not provided - -
- -
-createDirectiveValidationError formats file location with line number (3 scenarios) - -#### createDirectiveValidationError formats file location with line number - -**Invariant:** Every DirectiveValidationError must include the source file path, line number, and reason, with the message formatted as "file:line" for IDE-clickable error output. - -**Verified by:** - -- createDirectiveValidationError includes line number in message -- createDirectiveValidationError includes optional directive snippet -- createDirectiveValidationError omits directive when not provided - -
- -
-createPatternValidationError captures pattern identity and validation details (3 scenarios) - -#### createPatternValidationError captures pattern identity and validation details - -**Invariant:** Every PatternValidationError must include the pattern name, source file path, and reason, with an optional array of specific validation errors for detailed diagnostics. - -**Verified by:** - -- createPatternValidationError formats pattern name and file -- createPatternValidationError includes validation errors array -- createPatternValidationError omits validationErrors when not provided - -
- -
-createProcessMetadataValidationError validates Gherkin process metadata (2 scenarios) - -#### createProcessMetadataValidationError validates Gherkin process metadata - -**Invariant:** Every ProcessMetadataValidationError must include the feature file path and a reason describing which metadata field failed validation. - -**Verified by:** - -- createProcessMetadataValidationError formats file and reason -- createProcessMetadataValidationError includes readonly validation errors - -
- -
-createDeliverableValidationError tracks deliverable-specific failures (4 scenarios) - -#### createDeliverableValidationError tracks deliverable-specific failures - -**Invariant:** Every DeliverableValidationError must include the feature file path and reason, with optional deliverableName for pinpointing which deliverable failed validation. - -**Verified by:** - -- createDeliverableValidationError formats file and reason -- createDeliverableValidationError includes optional deliverableName -- createDeliverableValidationError omits deliverableName when not provided -- createDeliverableValidationError includes validation errors - -
- -### KebabCaseSlugs - -[View KebabCaseSlugs source](tests/features/behavior/kebab-case-slugs.feature) - -As a documentation generator -I need to generate readable, URL-safe slugs from pattern names -So that generated file names are discoverable and human-friendly - -The slug generation must handle: - -- CamelCase patterns like "DeciderPattern" → "decider-pattern" -- Consecutive uppercase like "APIEndpoint" → "api-endpoint" -- Numbers in names like "OAuth2Flow" → "o-auth-2-flow" -- Special characters removal -- Proper phase prefixing for requirements - -
-CamelCase names convert to kebab-case (1 scenarios) - -#### CamelCase names convert to kebab-case - -**Invariant:** CamelCase pattern names must be split at word boundaries and joined with hyphens in lowercase. - -**Verified by:** - -- Convert pattern names to readable slugs - -
- -
-Edge cases are handled correctly (1 scenarios) - -#### Edge cases are handled correctly - -**Invariant:** Slug generation must handle special characters, consecutive separators, and leading/trailing hyphens without producing invalid slugs. - -**Verified by:** - -- Handle edge cases in slug generation - -
- -
-Requirements include phase prefix (2 scenarios) - -#### Requirements include phase prefix - -**Invariant:** Requirement slugs must be prefixed with "phase-NN-" where NN is the zero-padded phase number, defaulting to "00" when no phase is assigned. - -**Verified by:** - -- Requirement slugs include phase number -- Requirement without phase uses phase 00 - -
- -
-Phase slugs use kebab-case for names (2 scenarios) - -#### Phase slugs use kebab-case for names - -**Invariant:** Phase slugs must combine a zero-padded phase number with the kebab-case name in the format "phase-NN-name", defaulting to "unnamed" when no name is provided. - -**Verified by:** - -- Phase slugs combine number and kebab-case name -- Phase without name uses "unnamed" - -
- -### ErrorHandlingUnification - -[View ErrorHandlingUnification source](tests/features/behavior/error-handling.feature) - -All CLI commands and extractors should use the DocError discriminated -union pattern for consistent, structured error handling. - -**Problem:** - -- Raw errors lack context (no file path, line number, or pattern name) -- Inconsistent error formats across CLI, scanner, and extractor -- console.warn bypasses error collection, losing validation warnings -- Unknown errors produce unhelpful messages - -**Solution:** - -- DocError discriminated union with structured context (type, file, line, reason) -- isDocError type guard for safe error classification -- formatDocError for human-readable output with all context fields -- Error collection pattern that captures warnings without console output - -
-isDocError type guard classifies errors correctly (3 scenarios) - -#### isDocError type guard classifies errors correctly - -**Invariant:** isDocError must return true for valid DocError instances and false for non-DocError values including null and undefined. - -**Verified by:** - -- isDocError detects valid DocError instances -- isDocError rejects non-DocError objects -- isDocError rejects null and undefined - -
- -
-formatDocError produces structured human-readable output (2 scenarios) - -#### formatDocError produces structured human-readable output - -**Invariant:** formatDocError must include all context fields (error type, file path, line number) and render validation errors when present on pattern errors. - -**Verified by:** - -- formatDocError includes structured context -- formatDocError includes validation errors for pattern errors - -
- -
-Gherkin extractor collects errors without console side effects (3 scenarios) - -#### Gherkin extractor collects errors without console side effects +## Business Rules -**Invariant:** Extraction errors must include structured context (file path, pattern name, validation errors) and must never use console.warn to report warnings. +5 patterns, 22 rules with invariants (22 total) -**Rationale:** console.warn bypasses error collection, making warnings invisible to callers and untestable. Structured error objects enable programmatic handling across all consumers. +### Error Factories -**Verified by:** +| Rule | Invariant | Rationale | +| ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| createFileSystemError produces discriminated FILE_SYSTEM_ERROR types | Every FileSystemError must have type "FILE_SYSTEM_ERROR", the source file path, a reason enum value, and a human-readable message derived from the reason. | File system errors are the most common failure mode in the scanner; discriminated types enable exhaustive switch/case handling in error recovery paths. | +| createDirectiveValidationError formats file location with line number | Every DirectiveValidationError must include the source file path, line number, and reason, with the message formatted as "file:line" for IDE-clickable error output. | The "file:line" format enables click-to-navigate in IDEs and terminals, turning validation errors into actionable links rather than requiring manual file/line lookup. | +| createPatternValidationError captures pattern identity and validation details | Every PatternValidationError must include the pattern name, source file path, and reason, with an optional array of specific validation errors for detailed diagnostics. | Pattern names appear across many source files; without the pattern name and file path in the error, developers cannot locate which annotation triggered the validation failure. | +| createProcessMetadataValidationError validates Gherkin process metadata | Every ProcessMetadataValidationError must include the feature file path and a reason describing which metadata field failed validation. | Process metadata (status, phase, deliverables) drives FSM validation and documentation generation; silent metadata errors propagate incorrect state across all downstream consumers. | +| createDeliverableValidationError tracks deliverable-specific failures | Every DeliverableValidationError must include the feature file path and reason, with optional deliverableName for pinpointing which deliverable failed validation. | Features often contain multiple deliverables; without the deliverable name in the error, developers must manually inspect the entire Background table to find the failing row. | -- Errors include structured context -- No console.warn bypasses error collection -- Skip feature files without @libar-docs opt-in +### Error Handling Unification -
+| Rule | Invariant | Rationale | +| -------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| isDocError type guard classifies errors correctly | isDocError must return true for valid DocError instances and false for non-DocError values including null and undefined. | Without a reliable type guard, error handlers cannot safely narrow unknown caught values to DocError, forcing unsafe casts or redundant field checks at every catch site. | +| formatDocError produces structured human-readable output | formatDocError must include all context fields (error type, file path, line number) and render validation errors when present on pattern errors. | Omitting context fields forces developers to cross-reference logs with source files manually; including all fields in a single formatted message makes errors actionable on first read. | +| Gherkin extractor collects errors without console side effects | Extraction errors must include structured context (file path, pattern name, validation errors) and must never use console.warn to report warnings. | console.warn bypasses error collection, making warnings invisible to callers and untestable. Structured error objects enable programmatic handling across all consumers. | +| CLI error handler formats unknown errors gracefully | Unknown error values (non-DocError, non-Error) must be formatted as "Error: {value}" strings for safe display without crashing. | CLI commands can receive arbitrary thrown values (strings, numbers, objects); coercing them to a safe string prevents the error handler itself from crashing on unexpected types. | -
-CLI error handler formats unknown errors gracefully (1 scenarios) +### Kebab Case Slugs -#### CLI error handler formats unknown errors gracefully +| Rule | Invariant | Rationale | +| ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| CamelCase names convert to kebab-case | CamelCase pattern names must be split at word boundaries and joined with hyphens in lowercase. | Generated file names and URL fragments must be human-readable and URL-safe; unsplit CamelCase produces opaque slugs that are difficult to scan in directory listings. | +| Edge cases are handled correctly | Slug generation must handle special characters, consecutive separators, and leading/trailing hyphens without producing invalid slugs. | Unhandled edge cases produce malformed file names (double hyphens, leading dashes) that break cross-platform path resolution and make generated links inconsistent. | +| Requirements include phase prefix | Requirement slugs must be prefixed with "phase-NN-" where NN is the zero-padded phase number, defaulting to "00" when no phase is assigned. | Phase prefixes enable lexicographic sorting of requirement files by delivery order, so directory listings naturally reflect the roadmap sequence. | +| Phase slugs use kebab-case for names | Phase slugs must combine a zero-padded phase number with the kebab-case name in the format "phase-NN-name", defaulting to "unnamed" when no name is provided. | A consistent "phase-NN-name" format ensures phase files sort numerically and remain identifiable even when the phase number alone would be ambiguous across roadmap versions. | -**Invariant:** Unknown error values (non-DocError, non-Error) must be formatted as "Error: {value}" strings for safe display without crashing. +### Result Monad -**Verified by:** +| Rule | Invariant | Rationale | +| ------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Result.ok wraps values into success results | Result.ok always produces a result where isOk is true, regardless of the wrapped value type (primitives, objects, null, undefined). | Consumers rely on isOk to branch logic; if Result.ok could produce an ambiguous state, every call site would need defensive checks beyond the type guard. | +| Result.err wraps values into error results | Result.err always produces a result where isErr is true, supporting Error instances, strings, and structured objects as error values. | Supporting multiple error value types allows callers to propagate rich context (structured objects) or simple messages (strings) without forcing a single error representation. | +| Type guards distinguish success from error results | isOk and isErr are mutually exclusive: exactly one returns true for any Result value. | If both guards could return true (or both false), TypeScript type narrowing would break, leaving the value/error branch unreachable or unsound. | +| unwrap extracts the value or throws the error | unwrap on a success result returns the value; unwrap on an error result always throws an Error instance (wrapping non-Error values for stack trace preservation). | Wrapping non-Error values in Error instances ensures stack traces are always available for debugging, preventing the loss of call-site context when string or object errors are thrown. | +| unwrapOr extracts the value or returns a default | unwrapOr on a success result returns the contained value (ignoring the default); on an error result it returns the provided default value. | Providing a safe fallback path avoids forcing callers to handle errors explicitly when a sensible default exists, reducing boilerplate in non-critical error recovery. | +| map transforms the success value without affecting errors | map applies the transformation function only to success results; error results pass through unchanged. Multiple maps can be chained. | Skipping the transformation on error results enables chained pipelines to short-circuit on the first failure without requiring explicit error checks at each step. | +| mapErr transforms the error value without affecting successes | mapErr applies the transformation function only to error results; success results pass through unchanged. Error types can be converted. | Allowing error-type conversion at boundaries (e.g., low-level I/O errors to domain errors) keeps success paths untouched and preserves the original value through error-handling layers. | -- handleCliError formats unknown errors +### String Utils -
+| Rule | Invariant | Rationale | +| ---------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| slugify generates URL-safe slugs | slugify must produce lowercase, alphanumeric, hyphen-only strings with no leading/trailing hyphens. | URL slugs appear in file paths and links across all generated documentation; inconsistent slugification would break cross-references. | +| camelCaseToTitleCase generates readable titles | camelCaseToTitleCase must insert spaces at camelCase boundaries and preserve known acronyms (HTTP, XML, API, DoD, AST, GraphQL). | Pattern names stored as PascalCase identifiers appear as human-readable titles in generated documentation; incorrect splitting would produce unreadable headings. | --- diff --git a/docs-live/product-areas/DATA-API.md b/docs-live/product-areas/DATA-API.md index 68371e14..15e042ba 100644 --- a/docs-live/product-areas/DATA-API.md +++ b/docs-live/product-areas/DATA-API.md @@ -355,3156 +355,305 @@ ArchIndexSchema = z.object({ --- -## Behavior Specifications +## Business Rules -### RulesQueryModule - -[View RulesQueryModule source](src/api/rules-query.ts) - -## RulesQueryModule - Business Rules Domain Query - -Pure query function for business rules extracted from Gherkin Rule: blocks. -Groups rules by product area, phase, and feature pattern. - -Target: src/api/rules-query.ts -See: DD-4 (ProcessAPILayeredExtraction) - -### PipelineFactory - -[View PipelineFactory source](src/generators/pipeline/build-pipeline.ts) - -## PipelineFactory - Shared Pipeline Orchestration - -Shared factory that executes the 8-step scan-extract-merge-transform pipeline. -Replaces inline pipeline orchestration in CLI consumers. - -Target: src/generators/pipeline/build-pipeline.ts -See: ADR-006 (Single Read Model Architecture) -See: DD-1, DD-2 (ProcessAPILayeredExtraction) - -### ProcessStateAPIRelationshipQueries - -[View ProcessStateAPIRelationshipQueries source](delivery-process/specs/process-state-api-relationship-queries.feature) - -**Problem:** ProcessStateAPI currently supports dependency queries (`uses`, `usedBy`, `dependsOn`, -`enables`) but lacks implementation relationship queries. Claude Code cannot ask "what code -implements this pattern?" or "what pattern does this file implement?" - -**Solution:** Extend ProcessStateAPI with relationship query methods that leverage the new -`implements`/`extends` tags from PatternRelationshipModel: - -- Bidirectional traceability: spec → code and code → spec -- Inheritance hierarchy navigation: base → specializations -- Implementation discovery: pattern → implementing files - -**Business Value:** -| Benefit | How | -| Reduced context usage | Query exact relationships vs reading multiple files | -| Faster exploration | "Show implementations" in one call vs grep + read | -| Accurate traceability | Real-time from source annotations, not stale docs | - -
-API provides implementation relationship queries (3 scenarios) - -#### API provides implementation relationship queries - -**Invariant:** Every pattern with `implementedBy` entries is discoverable via the API. - -**Rationale:** Claude Code needs to navigate from abstract patterns to concrete code. Without this, exploration requires manual grep + file reading, wasting context tokens. - -| Query | Returns | Use Case | -| ---------------------------- | ----------------------------------- | -------------------------------------------- | -| getImplementations(pattern) | File paths implementing the pattern | "Show me the code for EventStoreDurability" | -| getImplementedPatterns(file) | Patterns the file implements | "What patterns does outbox.ts implement?" | -| hasImplementations(pattern) | boolean | Filter patterns with/without implementations | - -**Verified by:** - -- Query implementations for a pattern -- Query implemented patterns for a file -- Query implementations for pattern with none -- Query implementations for pattern -- Query implemented patterns for file - -
- -
-API provides inheritance hierarchy queries (3 scenarios) - -#### API provides inheritance hierarchy queries - -**Invariant:** Pattern inheritance chains are fully navigable in both directions. - -**Rationale:** Patterns form specialization hierarchies (e.g., ReactiveProjections extends ProjectionCategories). Claude Code needs to understand what specializes a base pattern and what a specialized pattern inherits from. - -| Query | Returns | Use Case | -| ---------------------------- | ------------------------------ | --------------------------------------------- | -| getExtensions(pattern) | Patterns extending this one | "What specializes ProjectionCategories?" | -| getBasePattern(pattern) | Pattern this extends (or null) | "What does ReactiveProjections inherit from?" | -| getInheritanceChain(pattern) | Full chain to root | "Show full hierarchy for CachedProjections" | - -**Verified by:** - -- Query extensions for a base pattern -- Query base pattern -- Full inheritance chain -- Query extensions - -
- -
-API provides combined relationship views (2 scenarios) - -#### API provides combined relationship views - -**Invariant:** All relationship types are accessible through a unified interface. - -**Rationale:** Claude Code often needs the complete picture: dependencies AND implementations AND inheritance. A single call reduces round-trips and context switching. - -**Verified by:** - -- Get all relationships for a pattern -- Filter patterns by relationship existence -- Get all relationships -- Filter by relationship type - -
- -
-API supports bidirectional traceability queries (2 scenarios) - -#### API supports bidirectional traceability queries - -**Invariant:** Navigation from spec to code and code to spec is symmetric. - -**Rationale:** Traceability is bidirectional by definition. If a spec links to code, the code should link back to the spec. The API should surface broken links. - -| Query | Returns | Use Case | -| ------------------------------ | ------------------------------------------- | ------------------------------- | -| getTraceabilityStatus(pattern) | {hasSpecs, hasImplementations, isSymmetric} | Audit traceability completeness | -| getBrokenLinks() | Patterns with asymmetric traceability | Find missing back-links | - -**Verified by:** - -- Check traceability status for well-linked pattern -- Detect broken traceability links -- Check traceability status -- Detect broken links - -
- -### ProcessStateAPICLI - -[View ProcessStateAPICLI source](delivery-process/specs/process-state-api-cli.feature) - -**Problem:** -The ProcessStateAPI provides 27 typed query methods for efficient state queries, but -Claude Code sessions cannot use it directly: - -- Import paths require built packages with correct ESM resolution -- No CLI command exposes the API for shell invocation -- Current workaround requires regenerating markdown docs and reading them -- Documentation claims API is "directly usable" but practical usage is blocked - -**Solution:** -Add a CLI command `pnpm process:query` that exposes key ProcessStateAPI methods: - -- `--status active|roadmap|completed` - Filter patterns by status -- `--phase N` - Get patterns in specific phase -- `--progress` - Show completion percentage and counts -- `--current-work` - Show active patterns (shorthand for --status active) -- `--roadmap-items` - Show available items (roadmap + deferred) -- `--format text|json` - Output format (default: text, json for AI parsing) - -**Business Value:** -| Benefit | Impact | -| AI-native planning | Claude Code can query state in one command vs reading markdown | -| Reduced context usage | JSON output is 5-10x smaller than generated docs | -| Real-time accuracy | Queries source directly, no stale documentation | -| Session efficiency | "What's next?" answered in 100ms vs 10s regeneration | -| Completes API promise | Makes CLAUDE.md documentation accurate | - -
-CLI supports status-based pattern queries (3 scenarios) - -#### CLI supports status-based pattern queries - -**Invariant:** Every ProcessStateAPI status query method is accessible via CLI. - -**Rationale:** The most common planning question is "what's the current state?" Status queries (active, roadmap, completed) answer this directly without reading docs. Without CLI access, Claude Code must regenerate markdown and parse unstructured text. - -| Flag | API Method | Use Case | -| ------------------ | ---------------------- | ------------------------ | -| --status active | getCurrentWork() | "What am I working on?" | -| --status roadmap | getRoadmapItems() | "What can I start next?" | -| --status completed | getRecentlyCompleted() | "What's done recently?" | -| --current-work | getCurrentWork() | Shorthand for active | -| --roadmap-items | getRoadmapItems() | Shorthand for roadmap | - -**Verified by:** - -- Query active patterns -- Query roadmap items -- Query completed patterns with limit - -
- -
-CLI supports phase-based queries (3 scenarios) - -#### CLI supports phase-based queries - -**Invariant:** Patterns can be filtered by phase number. - -**Rationale:** Phase 18 (Event Durability) is the current focus per roadmap priorities. Quick phase queries help assess progress and remaining work within a phase. Phase-based planning is the primary organization method for roadmap work. - -| Flag | API Method | Use Case | -| -------------------- | --------------------- | ----------------------------- | -| --phase N | getPatternsByPhase(N) | "What's in Phase 18?" | -| --phase N --progress | getPhaseProgress(N) | "How complete is Phase 18?" | -| --phases | getAllPhases() | "List all phases with counts" | - -**Verified by:** - -- Query patterns in a specific phase -- Query phase progress -- List all phases - -
- -
-CLI provides progress summary queries (2 scenarios) - -#### CLI provides progress summary queries - -**Invariant:** Overall and per-phase progress is queryable in a single command. - -**Rationale:** Planning sessions need quick answers to "where are we?" without reading the full PATTERNS.md generated file. Progress metrics drive prioritization and help identify where to focus effort. - -| Flag | API Method | Use Case | -| -------------- | --------------------------------------------- | ------------------------- | -| --progress | getStatusCounts() + getCompletionPercentage() | Overall progress | -| --distribution | getStatusDistribution() | Detailed status breakdown | - -**Verified by:** - -- Overall progress summary -- Status distribution with percentages - -
- -
-CLI supports multiple output formats (3 scenarios) - -#### CLI supports multiple output formats - -**Invariant:** JSON output is parseable by AI agents without transformation. - -**Rationale:** Claude Code can parse JSON directly. Text format is for human reading. JSON format enables scripting and integration with other tools. The primary use case is AI agent parsing where structured output reduces context and errors. - -| Flag | Output | Use Case | -| ------------- | --------------------- | --------------------------- | -| --format text | Human-readable tables | Terminal usage | -| --format json | Structured JSON | AI agent parsing, scripting | - -**Verified by:** - -- JSON output format -- Text output format (default) -- Invalid format flag - -
- -
-CLI supports individual pattern lookup (3 scenarios) - -#### CLI supports individual pattern lookup - -**Invariant:** Any pattern can be queried by name with full details. - -**Rationale:** During implementation, Claude Code needs to check specific pattern status, deliverables, and dependencies without reading the full spec file. Pattern lookup is essential for focused implementation work. - -| Flag | API Method | Use Case | -| ----------------------------- | ---------------------------- | --------------------------- | -| --pattern NAME | getPattern(name) | "Show DCB pattern details" | -| --pattern NAME --deliverables | getPatternDeliverables(name) | "What needs to be built?" | -| --pattern NAME --deps | getPatternDependencies(name) | "What does this depend on?" | - -**Verified by:** - -- Lookup pattern by name -- Query pattern deliverables -- Pattern not found - -
- -
-CLI provides discoverable help (2 scenarios) - -#### CLI provides discoverable help - -**Invariant:** All flags are documented via --help with examples. - -**Rationale:** Claude Code can read --help output to understand available queries without needing external documentation. Self-documenting CLIs reduce the need for Claude Code to read additional context files. - -**Verified by:** - -- Help output shows all flags -- Help shows examples - -
- -### ProcessAPILayeredExtraction - -[View ProcessAPILayeredExtraction source](delivery-process/specs/process-api-layered-extraction.feature) - -**Problem:** -`process-api.ts` is 1,700 lines containing two remaining architectural -violations of ADR-006: - -1. **Parallel Pipeline**: `buildPipeline()` (lines 488-561) wires the - same 8-step scan-extract-transform sequence that `validate-patterns.ts` - and `orchestrator.ts` also wire independently. Three consumers, three - copies of identical pipeline orchestration code. - -2. **Inline Domain Logic**: `handleRules()` (lines 1096-1279, 184 lines) - builds nested `Map` hierarchies (area -> phase -> feature -> rules), - parses business rule annotations via codec-layer imports - (`parseBusinessRuleAnnotations`, `deduplicateScenarioNames`), and - computes aggregate statistics. This is query logic that belongs in the - API layer, not the CLI file. - -Most subcommand handlers already delegate correctly. Of the 16 handlers -in process-api.ts, 13 are thin wrappers over `src/api/` modules: - -| Handler | Delegates To | -| handleStatus | ProcessStateAPI methods | -| handleQuery | Dynamic API method dispatch | -| handlePattern | ProcessStateAPI methods | -| handleList | output-pipeline.ts | -| handleSearch | fuzzy-match.ts, pattern-helpers.ts | -| handleStubs | stub-resolver.ts | -| handleDecisions | stub-resolver.ts, pattern-helpers.ts | -| handlePdr | stub-resolver.ts | -| handleContext | context-assembler.ts, context-formatter.ts | -| handleFiles | context-assembler.ts, context-formatter.ts | -| handleDepTreeCmd | context-assembler.ts, context-formatter.ts | -| handleOverviewCmd | context-assembler.ts, context-formatter.ts | -| handleScopeValidate | scope-validator.ts | - -The remaining violations are: - -| Handler | Issue | Lines | -| handleRules | Inline domain logic: nested Maps, codec imports | 184 | -| handleArch | Partial: 6 sub-handlers delegate, 3 have trivial inline projections | 121 | -| buildPipeline | Parallel Pipeline: duplicates 8-step sequence | 74 | - -**Solution:** -Extract the two remaining violations into their proper layers: - -| Layer | Extraction | Location | -| Pipeline Factory | Shared scan-extract-transform sequence from buildPipeline | src/generators/pipeline/build-pipeline.ts | -| Query Handler | Business rules domain logic from handleRules | src/api/rules-query.ts | - -The CLI retains its routing responsibility: parse args, call pipeline -factory, route subcommand to API module, format output. - -**Design Decisions:** - -DD-1: Pipeline factory location and return type. -Location: `src/generators/pipeline/build-pipeline.ts`, re-exported from -`src/generators/pipeline/index.ts`. The factory returns -`Result` so each consumer can map errors -to its own strategy (process-api calls `process.exit(1)`, -validate-patterns throws, orchestrator returns `Result.err()`). -`PipelineResult` contains `{ dataset: RuntimeMasterDataset, validation: - ValidationSummary }`. The `TagRegistry` is accessible via -`dataset.tagRegistry` and does not need a separate field. - -DD-2: Merge conflict strategy as a pipeline option. -The factory accepts `mergeConflictStrategy: 'fatal' | 'concatenate'`. -`'fatal'` returns `Result.err()` on conflicts (process-api behavior). -`'concatenate'` falls back to `[...ts, ...gherkin]` (validate-patterns -behavior per DD-1 in ValidatorReadModelConsolidation). This is the most -significant semantic difference between consumers. - -DD-3: Factory interface designed for future orchestrator migration. -The `PipelineOptions` interface includes `exclude`, `contextInferenceRules`, -and `includeValidation` fields that orchestrator.ts needs. However, the -actual orchestrator migration is deferred to a follow-up spec. The -orchestrator has 155 lines of pipeline with structured warning collection -(scan errors, extraction errors, Gherkin parse errors as -`GenerationWarning[]`). Integrating this into the factory adds risk to a -first extraction. This spec migrates process-api.ts and -validate-patterns.ts only. - -DD-4: handleRules domain logic extracts to `src/api/rules-query.ts`. -The new module exports `queryBusinessRules(dataset: RuntimeMasterDataset, - filters: RulesFilters): RulesQueryResult`. The `RulesFilters` interface, -`RuleOutput` interface, and all nested Map construction move to this module. -The `parseBusinessRuleAnnotations` and `deduplicateScenarioNames` imports -move from CLI to API layer, which is the correct placement per ADR-006. -The CLI handler becomes: parse filters from args, call -`queryBusinessRules`, apply output modifiers, return. - -DD-5: handleStubs, handleDecisions, handlePdr already delegate correctly. -These handlers are thin CLI wrappers over `stub-resolver.ts` functions -(`findStubPatterns`, `resolveStubs`, `groupStubsByPattern`, -`extractDecisionItems`, `findPdrReferences`). The residual CLI code is -argument parsing and error formatting, which is CLI-shell responsibility. -No extraction needed. The original deliverables are marked n/a. - -DD-6: handleArch inline logic stays in CLI. -The `roles`, `context`, and `layer` listing sub-handlers have 3-5 line -`.map()` projections over `archIndex` pre-computed views. These are trivial -view formatting, not domain logic. The `dangling`, `orphans`, `blocking`, -`neighborhood`, `compare`, and `coverage` sub-handlers already delegate -to `arch-queries.ts` and `context-assembler.ts`. Extracting 3-line `.map()` -calls would add indirection with no architectural benefit. - -DD-7: validate-patterns.ts partially adopts the pipeline factory. -The factory replaces the MasterDataset construction pipeline (steps 1-8). -DoD validation and anti-pattern detection remain as direct stage-1 -consumers using raw scanned files (`scanResult.value.files`, -`gherkinScanResult.value.files`). This is correct per ADR-006: the -exception for `lint-patterns.ts` ("pure stage-1 consumer, no -relationships, no cross-source resolution, direct scanner consumption is -correct") applies equally to DoD validation (checking deliverable -completeness on raw Gherkin) and anti-pattern detection (checking tag -placement on raw scanned files). - -DD-8: Line count invariant replaced with qualitative criterion. -The original 500-line target for process-api.ts is unrealistic. After -extracting buildPipeline (74 lines) and handleRules (184 lines), the -file is ~1,400 lines. The remaining code is legitimate CLI responsibility: -parseArgs (134), showHelp (143), routeSubcommand (96), main (59), 13 thin -delegation handlers (~350), config defaults (50), types (60), imports (120). -Reaching 500 lines would require extracting arg parsing and help text to -separate files, which is file hygiene, not architectural layering. -The invariant becomes: no Map/Set construction in handler functions, each -domain query delegates to an `src/api/` module. - -**Implementation Order:** - -| Step | What | Verification | -| 1 | Create src/generators/pipeline/build-pipeline.ts with PipelineOptions and factory | pnpm typecheck | -| 2 | Export from src/generators/pipeline/index.ts barrel | pnpm typecheck | -| 3 | Migrate process-api.ts buildPipeline to factory call | pnpm typecheck, pnpm process:query -- overview | -| 4 | Remove unused scanner/extractor imports from process-api.ts | pnpm lint | -| 5 | Migrate validate-patterns.ts MasterDataset pipeline to factory call | pnpm validate:patterns (0 errors, 0 warnings) | -| 6 | Create src/api/rules-query.ts with queryBusinessRules | pnpm typecheck | -| 7 | Slim handleRules in process-api.ts to thin delegation | pnpm process:query -- rules | -| 8 | Export from src/api/index.ts barrel | pnpm typecheck | -| 9 | Full verification | pnpm build, pnpm test, pnpm lint, pnpm validate:patterns | - -**Files Modified:** - -| File | Change | Lines Affected | -| src/generators/pipeline/build-pipeline.ts | NEW: shared pipeline factory | +~100 | -| src/generators/pipeline/index.ts | Add re-export of build-pipeline | +2 | -| src/api/rules-query.ts | NEW: business rules query from handleRules | +~200 | -| src/api/index.ts | Add re-exports for rules-query | +5 | -| src/cli/process-api.ts | Replace buildPipeline + handleRules with delegations | -~280 net | -| src/cli/validate-patterns.ts | Replace MasterDataset pipeline with factory call | -~30 net | - -**What does NOT change:** - -- parseArgs(), showHelp(), routeSubcommand(), main() (CLI shell) -- handleArch inline logic (trivial projections per DD-6) -- handleStubs/handleDecisions/handlePdr (already delegate per DD-5) -- generateEmptyHint (UX concern, correctly in CLI) -- DoD validation and anti-pattern detection in validate-patterns.ts (stage-1 consumers per DD-7) -- orchestrator.ts pipeline wiring (deferred per DD-3) -- parseListFilters, parseRulesFilters (arg parsing, not domain logic) -- ValidationIssue, ValidationSummary, ValidateCLIConfig (stable API in validate-patterns) - -
-CLI file contains only routing, no domain logic (2 scenarios) - -#### CLI file contains only routing, no domain logic - -**Invariant:** `process-api.ts` parses arguments, calls the pipeline factory for the MasterDataset, routes subcommands to API modules, and formats output. It does not build Maps, filter patterns, group data, or resolve relationships. Thin view projections (3-5 line `.map()` calls over pre-computed archIndex views) are acceptable as formatting. - -**Rationale:** Domain logic in the CLI file is only accessible via the command line. Extracting it to `src/api/` makes it programmatically testable, reusable by future consumers (MCP server, watch mode), and aligned with the feature-consumption layer defined in ADR-006. - -**Verified by:** - -- No domain data structures in handlers -- All domain queries delegate - -
- -
-Pipeline factory is shared across CLI consumers (2 scenarios) - -#### Pipeline factory is shared across CLI consumers - -**Invariant:** The scan-extract-transform sequence is defined once in `src/generators/pipeline/build-pipeline.ts`. CLI consumers that need a MasterDataset call the factory rather than wiring the pipeline independently. The factory accepts `mergeConflictStrategy` to handle behavioral differences between consumers. - -**Rationale:** Three consumers (process-api, validate-patterns, orchestrator) independently wire the same 8-step sequence: loadConfig, scanPatterns, extractPatterns, scanGherkinFiles, extractPatternsFromGherkin, mergePatterns, computeHierarchyChildren, transformToMasterDataset. The only semantic difference is merge-conflict handling (fatal vs concatenate). This is a Parallel Pipeline anti-pattern per ADR-006. - -**Verified by:** - -- CLI consumers use factory -- Orchestrator migration deferred - -
- -
-Domain logic lives in API modules (2 scenarios) - -#### Domain logic lives in API modules - -**Invariant:** Query logic that operates on MasterDataset lives in `src/api/` modules. The `rules-query.ts` module provides business rules querying with the same grouping logic that was inline in handleRules: filter by product area and pattern, group by area -> phase -> feature -> rules, parse annotations, compute totals. - -**Rationale:** `handleRules` is 184 lines with 5 Map/Set constructions, codec-layer imports (`parseBusinessRuleAnnotations`, `deduplicateScenarioNames`), and a complex 3-level grouping algorithm. This is the last significant inline domain logic in process-api.ts. Moving it to `src/api/` follows the same pattern as the 12 existing API modules (context-assembler, arch-queries, scope-validator, etc.). - -**Verified by:** - -- rules-query module exports -- handleRules slim wrapper - -
- -
-Pipeline factory returns Result for consumer-owned error handling (1 scenarios) - -#### Pipeline factory returns Result for consumer-owned error handling - -**Invariant:** The factory returns `Result` rather than throwing or calling `process.exit()`. Each consumer maps the error to its own strategy: process-api.ts calls `process.exit(1)`, validate-patterns.ts throws, and orchestrator.ts (future) returns `Result.err()`. - -**Rationale:** The current `buildPipeline()` in process-api.ts calls `process.exit(1)` on errors, making it non-reusable. The factory must work across consumers with different error handling models. The Result monad is the project's established pattern for this (see `src/types/result.ts`). - -**Verified by:** - -- Factory uses Result monad - -
- -
-End-to-end verification confirms behavioral equivalence (1 scenarios) - -#### End-to-end verification confirms behavioral equivalence - -**Invariant:** After extraction, all CLI commands produce identical output to pre-refactor behavior with zero build, test, lint, and validation errors. - -**Rationale:** The refactor must not change observable behavior. Full CLI verification confirms the extraction is a pure refactor. - -**Verified by:** - -- Full verification passes - -
- -### DataAPIStubIntegration - -[View DataAPIStubIntegration source](delivery-process/specs/data-api-stub-integration.feature) - -**Problem:** -Design sessions produce code stubs in `delivery-process/stubs/` with rich -metadata: `@target` (destination file path), `@since` (design session ID), -`@see` (PDR references), and `AD-N` numbered decisions. But 14 of 22 stubs -lack the libar-docs opt-in marker, making them invisible to the scanner pipeline. -The 8 stubs that ARE scanned silently drop the target and see annotations because -they are not prefixed with the libar-docs namespace. - -This means: the richest source of design context (stubs with architectural -decisions, target paths, and session provenance) is invisible to the API. - -**Solution:** -A two-phase integration approach: - -1. **Phase A (Annotation):** Add the libar-docs opt-in + implements tag to - the 14 non-annotated stubs. This makes them scannable with zero pipeline changes. -2. **Phase B (Taxonomy):** Register libar-docs-target and libar-docs-since - as new taxonomy tags. Rename existing `@target` and `@since` annotations in - all stubs. This gives structured access to stub-specific metadata. - -3. **Phase C (Commands):** Add query commands: - -- `stubs [pattern]` lists design stubs with target paths -- `decisions [pattern]` surfaces PDR references and AD-N items -- `pdr ` finds all patterns referencing a specific PDR - -**Business Value:** -| Benefit | Impact | -| 14 invisible stubs become visible | Full design context available to API | -| Target path tracking | Know where stubs will be implemented | -| Design decision queries | Surface AD-N decisions for review | -| PDR cross-referencing | Find all patterns related to a decision | - -
-All stubs are visible to the scanner pipeline (3 scenarios) - -#### All stubs are visible to the scanner pipeline - -**Invariant:** Every stub file in `delivery-process/stubs/` has `@libar-docs` opt-in and `@libar-docs-implements` linking it to its parent pattern. - -**Rationale:** The scanner requires `@libar-docs` opt-in marker to include a file. Without it, stubs are invisible regardless of other annotations. The `@libar-docs-implements` tag creates the bidirectional link: spec defines the pattern (via `@libar-docs-pattern`), stub implements it. Per PDR-009, stubs must NOT use `@libar-docs-pattern` -- that belongs to the feature file. - -**Boundary note:** Phase A (annotating stubs with libar-docs opt-in and -libar-docs-implements tags) is consumer-side work done in each consuming repo. -Package.json scan paths (`-i 'delivery-process/stubs/**/*.ts'`) are already -pre-configured in 15 scripts. This spec covers Phase B: taxonomy tag -registration (libar-docs-target, libar-docs-since) and CLI query subcommands. - -**Verified by:** - -- Annotated stubs are discoverable by the scanner -- Stub target path is extracted as structured field -- Stub without libar-docs opt-in is invisible to scanner -- All stubs scanned -- Stub metadata extracted - -
- -
-Stubs subcommand lists design stubs with implementation status (4 scenarios) - -#### Stubs subcommand lists design stubs with implementation status - -**Invariant:** `stubs` returns stub files with their target paths, design session origins, and whether the target file already exists. - -**Rationale:** Before implementation, agents need to know: which stubs exist for a pattern, where they should be moved to, and which have already been implemented. The stub-to-implementation resolver compares `@libar-docs-target` paths against actual files to determine status. - -**Output per stub:** - -| Field | Source | -| ------------ | ------------------------------------- | -| Stub file | Pattern filePath | -| Target | @libar-docs-target value | -| Implemented? | Target file exists? | -| Since | @libar-docs-since (design session ID) | -| Pattern | @libar-docs-implements value | - -**Verified by:** - -- List all stubs with implementation status -- List stubs for a specific pattern -- Filter unresolved stubs -- Stubs for nonexistent pattern returns empty result -- List all stubs -- List stubs for pattern -- Filter unresolved - -
- -
-Decisions and PDR commands surface design rationale (3 scenarios) - -#### Decisions and PDR commands surface design rationale - -**Invariant:** Design decisions (AD-N items) and PDR references from stub annotations are queryable by pattern name or PDR number. - -**Rationale:** Design sessions produce numbered decisions (AD-1, AD-2, etc.) and reference PDR decision records (see PDR-012). When reviewing designs or starting implementation, agents need to find these decisions without reading every stub file manually. - -**decisions output:** - - **pdr output:** - -```text -Pattern: AgentCommandInfrastructure - Source: DS-4 (stubs/agent-command-routing/) - Decisions: - AD-1: Unified action model (PDR-011) - AD-5: Router maps command types to orchestrator (PDR-012) - PDRs referenced: PDR-011, PDR-012 -``` - -```text -PDR-012: Agent Command Routing - Referenced by: - AgentCommandInfrastructure (5 stubs) - CommandRouter (spec) - Decision file: decisions/pdr-012-agent-command-routing.feature -``` - -**Verified by:** - -- Query design decisions for a pattern -- Cross-reference a PDR number -- PDR query for nonexistent number returns empty -- Decisions for pattern -- PDR cross-reference - -
- -### DataAPIDesignSessionSupport - -[View DataAPIDesignSessionSupport source](delivery-process/specs/data-api-session-support.feature) - -**Problem:** -Starting a design or implementation session requires manually compiling -elaborate context prompts. For example, DS-3 (LLM Integration) needs: - -- The spec to design against (agent-llm-integration.feature) -- Dependency stubs from DS-1 and DS-2 (action-handler, event-subscription, schema) -- Consumer specs for outside-in validation (churn-risk, admin-frontend) -- Existing infrastructure (CommandOrchestrator, EventBus) -- Dependency chain status and design decisions from prior sessions - -This manual compilation takes 10-15 minutes per session start and is -error-prone (missing dependencies, stale context). Multi-session work -requires handoff documentation that is also manually maintained. - -**Solution:** -Add session workflow commands that automate two critical session moments: - -1. **Pre-flight check:** `scope-validate ` verifies implementation readiness -2. **Session end:** `handoff [--pattern X]` generates handoff documentation - -Session context assembly (the "session start" moment) lives in DataAPIContextAssembly -via `context --session design|implement|planning`. This spec focuses on -the validation and handoff capabilities that build on top of context assembly. - -**Business Value:** -| Benefit | Impact | -| 10-15 min session start -> 1 command | Eliminates manual context compilation | -| Pre-flight catches blockers early | No wasted sessions on unready patterns | -| Automated handoff | Consistent multi-session state tracking | - -#### Scope-validate checks implementation prerequisites before session start - -**Invariant:** Scope validation surfaces all blocking conditions before committing to a session, preventing wasted effort on unready patterns. - -**Rationale:** Starting implementation on a pattern with incomplete dependencies wastes an entire session. Starting a design session without prior session deliverables means working with incomplete context. Pre-flight validation catches these issues in seconds rather than discovering them mid-session. - -**Validation checklist:** - -| Check | Required For | Source | -| ------------------------------------ | ------------ | ------------------------ | -| Dependencies completed | implement | dependsOn chain status | -| Stubs from dependency sessions exist | design | implementedBy lookup | -| Deliverables defined | implement | Background table in spec | -| FSM allows transition to active | implement | isValidTransition() | -| Design decisions recorded | implement | PDR references in stubs | -| Executable specs location set | implement | @executable-specs tag | - -**Verified by:** - -- All scope validation checks pass -- Dependency blocker detected -- FSM transition blocker detected -- All checks pass -- FSM blocker detected - -#### Handoff generates compact session state summary for multi-session work - -**Invariant:** Handoff documentation captures everything the next session needs to continue work without context loss. - -**Rationale:** Multi-session work (common for design phases spanning DS-1 through DS-7) requires state transfer between sessions. Without automated handoff, critical information is lost: what was completed, what's in progress, what blockers were discovered, and what should happen next. Manual handoff documentation is inconsistent and often forgotten. - -**Handoff output:** - -| Section | Source | -| ----------------------- | --------------------------------------------------------- | -| Session summary | Pattern name, session type, date | -| Completed | Deliverables with status "complete" | -| In progress | Deliverables with status not "complete" and not "pending" | -| Files modified | Git diff file list (if available) | -| Discovered items | @discovered-gap, @discovered-improvement tags | -| Blockers | Incomplete dependencies, open questions | -| Next session priorities | Remaining deliverables, suggested order | - -**Verified by:** - -- Generate handoff for in-progress pattern -- Handoff captures discovered items -- Handoff for in-progress pattern -- Handoff with discoveries - -### DataAPIRelationshipGraph - -[View DataAPIRelationshipGraph source](delivery-process/specs/data-api-relationship-graph.feature) - -**Problem:** -The current API provides flat relationship lookups (`getPatternDependencies`, -`getPatternRelationships`) but no recursive traversal, impact analysis, or -graph health checks. Agents cannot answer "if I change X, what breaks?", -"what's the path from A to B?", or "which patterns have broken references?" -without manual multi-step exploration. - -**Solution:** -Add graph query commands that operate on the full relationship graph: - -1. `graph [--depth N] [--direction up|down|both]` for recursive traversal -2. `graph impact ` for transitive dependent analysis -3. `graph path ` for finding relationship chains -4. `graph dangling` for broken reference detection -5. `graph orphans` for isolated pattern detection -6. `graph blocking` for blocked chain visualization - -**Business Value:** -| Benefit | Impact | -| Impact analysis | Know change blast radius before modifying | -| Dangling references | Detect annotation errors automatically | -| Blocking chains | Understand what prevents progress | -| Path finding | Discover non-obvious relationships | - -**Relationship to ProcessStateAPIRelationshipQueries:** -This spec supersedes the earlier ProcessStateAPIRelationshipQueries spec, -which focused on implementation/inheritance convenience methods. The -underlying data is available via getPatternRelationships(). This spec -adds graph-level operations that traverse relationships recursively. - -
-Graph command traverses relationships recursively with configurable depth (2 scenarios) - -#### Graph command traverses relationships recursively with configurable depth - -**Invariant:** Graph traversal walks both planning relationships (`dependsOn`, `enables`) and implementation relationships (`uses`, `usedBy`) with cycle detection to prevent infinite loops. - -**Rationale:** Flat lookups show direct connections. Recursive traversal shows the full picture: transitive dependencies, indirect consumers, and the complete chain from root to leaf. Depth limiting prevents overwhelming output on deeply connected graphs. - -**Verified by:** - -- Recursive graph traversal -- Bidirectional traversal with depth limit -- Recursive traversal -- Depth limiting -- Direction filtering - -
- -
-Impact analysis shows transitive dependents of a pattern (2 scenarios) - -#### Impact analysis shows transitive dependents of a pattern - -**Invariant:** Impact analysis answers "if I change X, what else is affected?" by walking `usedBy` + `enables` recursively. - -**Rationale:** Before modifying a completed pattern (which requires unlock), understanding the blast radius prevents unintended breakage. Impact analysis is the reverse of dependency traversal -- it looks forward, not backward. - -**Verified by:** - -- Impact analysis shows transitive dependents -- Impact analysis for leaf pattern -- Impact with transitive dependents -- Impact with no dependents - -
- -
-Path finding discovers relationship chains between two patterns (2 scenarios) - -#### Path finding discovers relationship chains between two patterns - -**Invariant:** Path finding returns the shortest chain of relationships connecting two patterns, or indicates no path exists. Traversal considers all relationship types (uses, usedBy, dependsOn, enables). - -**Rationale:** Understanding how two seemingly unrelated patterns connect helps agents assess indirect dependencies before making changes. When pattern A and pattern D are connected through B and C, modifying A requires understanding that chain. - -**Verified by:** - -- Find path between connected patterns -- No path between disconnected patterns -- Path between connected patterns - -
- -
-Graph health commands detect broken references and isolated patterns (3 scenarios) - -#### Graph health commands detect broken references and isolated patterns - -**Invariant:** Dangling references (pattern names in `uses`/`dependsOn` that don't match any pattern definition) are detectable. Orphan patterns (no relationships at all) are identifiable. - -**Rationale:** The MasterDataset transformer already computes dangling references during Pass 3 (relationship resolution) but does not expose them via the API. Orphan patterns indicate missing annotations. Both are data quality signals that improve over time with attention. - -**Verified by:** - -- Detect dangling references -- Detect orphan patterns -- Show blocking chains -- Dangling reference detection -- Orphan detection -- Blocking chains - -
- -### DataAPIPlatformIntegration - -[View DataAPIPlatformIntegration source](delivery-process/specs/data-api-platform-integration.feature) - -**Problem:** -The process-api CLI requires subprocess invocation for every query, adding -shell overhead and preventing stateful interaction. Claude Code's native tool -integration mechanism is Model Context Protocol (MCP), which the process API -does not support. Additionally, in the monorepo context, queries must specify -input paths for each package manually -- there is no cross-package view or -package-scoped filtering. - -**Solution:** -Two integration capabilities: - -1. **MCP Server Mode** -- Expose ProcessStateAPI as an MCP server that Claude - Code connects to directly. Eliminates CLI overhead and enables stateful - queries (pipeline loaded once, multiple queries without re-scanning). -2. **Monorepo Support** -- Cross-package dependency views, package-scoped - filtering, multi-package presets, and per-package coverage reports. - -**Business Value:** -| Benefit | Impact | -| MCP integration | Claude Code calls API as native tool | -| Stateful queries | No re-scanning between calls | -| Cross-package views | Understand monorepo-wide dependencies | -| Package-scoped queries | Focus on specific packages | - -
-ProcessStateAPI is accessible as an MCP server for Claude Code (3 scenarios) - -#### ProcessStateAPI is accessible as an MCP server for Claude Code - -**Invariant:** The MCP server exposes all ProcessStateAPI methods as MCP tools with typed input/output schemas. The pipeline is loaded once on server start and refreshed on source file changes. - -**Rationale:** MCP is Claude Code's native tool integration protocol. An MCP server eliminates the CLI subprocess overhead (2-5s per query) and enables Claude Code to call process queries as naturally as it calls other tools. Stateful operation means the pipeline loads once and serves many queries. - -**MCP configuration:** - -```text -// .mcp.json or claude_desktop_config.json - { - "mcpServers": { - "delivery-process": { - "command": "npx", - "args": ["tsx", "src/mcp/server.ts", "--input", "src/**/*.ts", ...] - } - } - } -``` - -**Verified by:** - -- MCP server exposes ProcessStateAPI tools -- MCP tool invocation returns structured result -- MCP tool invocation with invalid parameters returns error -- MCP server starts -- MCP tool invocation -- Auto-refresh on change - -
- -
-Process state can be auto-generated as CLAUDE.md context sections (3 scenarios) - -#### Process state can be auto-generated as CLAUDE.md context sections - -**Invariant:** Generated CLAUDE.md sections are additive layers that provide pattern metadata, relationships, and reading lists for specific scopes. - -**Rationale:** CLAUDE.md is the primary mechanism for providing persistent context to Claude Code sessions. Auto-generating CLAUDE.md sections from process state ensures the context is always fresh and consistent with the source annotations. This applies the "code-first documentation" principle to AI context itself. - -**Verified by:** - -- Generate CLAUDE.md context layer for bounded context -- Context layer reflects current process state -- Context layer for bounded context with no annotations -- Generate context layer -- Context layer is up-to-date - -
- -
-Cross-package views show dependencies spanning multiple packages (3 scenarios) - -#### Cross-package views show dependencies spanning multiple packages - -**Invariant:** Cross-package queries aggregate patterns from multiple input sources and resolve cross-package relationships. - -**Rationale:** In the monorepo, patterns in `platform-core` are used by patterns in `platform-bc`, which are used by the example app. Understanding these cross-package dependencies is essential for release planning and impact analysis. Currently each package must be queried independently with separate input globs. - -**Verified by:** - -- Cross-package dependency view -- Package-scoped query filtering -- Query for non-existent package returns empty result -- Package-scoped filtering - -
- -
-Process validation integrates with git hooks and file watching (3 scenarios) - -#### Process validation integrates with git hooks and file watching - -**Invariant:** Pre-commit hooks validate annotation consistency. Watch mode re-generates docs on source changes. - -**Rationale:** Git hooks catch annotation errors at commit time (e.g., new `uses` reference to non-existent pattern, invalid `arch-role` value, stub `@target` to non-existent directory). Watch mode enables live documentation regeneration during implementation sessions. - -**Verified by:** - -- Pre-commit validates annotation consistency -- Watch mode re-generates on file change -- Pre-commit on clean commit with no annotation changes -- Pre-commit annotation validation -- Watch mode re-generation - -
- -### DataAPIOutputShaping - -[View DataAPIOutputShaping source](delivery-process/specs/data-api-output-shaping.feature) - -**Problem:** -The ProcessStateAPI CLI returns raw `ExtractedPattern` objects via `JSON.stringify`. -List queries (e.g., `getCurrentWork`) produce ~594KB of JSON because each pattern -includes full `directive` (raw JSDoc AST), `code` (source text), and dozens of -empty/null fields. AI agents waste context tokens parsing verbose output that is -99% noise. There is no way to request compact summaries, filter fields, or get -counts without downloading the full dataset. - -**Solution:** -Add an output shaping pipeline that transforms raw API responses into compact, -AI-optimized formats: - -1. `summarizePattern()` projects patterns to ~100 bytes (vs ~3.5KB raw) -2. Global output modifiers: `--names-only`, `--count`, `--fields` -3. Format control: `--format compact|json` with empty field stripping -4. `list` subcommand with composable filters (`--status`, `--phase`, `--category`) -5. `search` subcommand with fuzzy pattern name matching -6. CLI ergonomics: config file defaults, `-f` shorthand, pnpm banner fix - -**Business Value:** -| Benefit | Impact | -| 594KB to 4KB list output | 99% context reduction for list queries | -| Fuzzy matching | Eliminates agent retry loops on typos | -| Config defaults | No more repeating --input and --features paths | -| Composable filters | One command replaces multiple API method calls | - -
-List queries return compact pattern summaries by default (4 scenarios) - -#### List queries return compact pattern summaries by default - -**Invariant:** List-returning API methods produce summaries, not full ExtractedPattern objects, unless `--full` is explicitly requested. - -**Rationale:** The single biggest usability problem. `getCurrentWork` returns 3 active patterns at ~3.5KB each = 10.5KB. Summarized: ~300 bytes total. The `directive` field (raw JSDoc AST) and `code` field (full source) are almost never needed for list queries. AI agents need name, status, category, phase, and file path -- nothing more. - -**Summary projection fields:** - -| Field | Source | Size | -| ----------- | ------------------- | --------- | -| patternName | pattern.patternName | ~30 chars | -| status | pattern.status | ~8 chars | -| category | pattern.categories | ~15 chars | -| phase | pattern.phase | ~3 chars | -| file | pattern.filePath | ~40 chars | -| source | pattern.source | ~7 chars | - -**Verified by:** - -- List queries return compact summaries -- Full flag returns complete patterns -- Single pattern detail is unaffected -- Full flag combined with names-only is rejected -- List returns summaries -- Full flag returns raw patterns -- Pattern detail unchanged - -
- -
-Global output modifier flags apply to any list-returning command (4 scenarios) - -#### Global output modifier flags apply to any list-returning command - -**Invariant:** Output modifiers are composable and apply uniformly across all list-returning subcommands and query methods. - -**Rationale:** AI agents frequently need just pattern names (for further queries), just counts (for progress checks), or specific fields (for focused analysis). These are post-processing transforms that should work with any data source. - -**Modifier flags:** - -| Flag | Effect | Example Output | -| -------------------- | ----------------------------- | -------------------------------- | -| --names-only | Array of pattern name strings | ["OrderSaga", "EventStore"] | -| --count | Single integer | 6 | -| --fields name,status | Selected fields only | [{"name":"X","status":"active"}] | - -**Verified by:** - -- Names-only output for list queries -- Count output for list queries -- Field selection for list queries -- Invalid field name in field selection is rejected -- Names-only output -- Count output -- Field selection - -
- -
-Output format is configurable with typed response envelope (3 scenarios) - -#### Output format is configurable with typed response envelope - -**Invariant:** All CLI output uses the QueryResult envelope for success/error discrimination. The compact format strips empty and null fields. - -**Rationale:** The existing `QueryResult` types (`QuerySuccess`, `QueryError`) are defined in `src/api/types.ts` but not wired into the CLI output. Agents cannot distinguish success from error without try/catch on JSON parsing. Empty arrays, null values, and empty strings add noise to every response. - -**Envelope structure:** - -| Field | Type | Purpose | -| -------- | ------- | ----------------------------------------- | -| success | boolean | Discriminator for success/error | -| data | T | The query result | -| metadata | object | Pattern count, timestamp, pipeline health | -| error | string | Error message (only on failure) | - -**Verified by:** - -- Successful query returns typed envelope -- Failed query returns error envelope -- Compact format strips empty fields -- Success envelope -- Error envelope -- Compact format strips nulls - -
- -
-List subcommand provides composable filters and fuzzy search (5 scenarios) - -#### List subcommand provides composable filters and fuzzy search - -**Invariant:** The `list` subcommand replaces the need to call specific `getPatternsByX` methods. Filters are composable via AND logic. The `query` subcommand remains available for programmatic/raw access. - -**Rationale:** Currently, filtering by status AND category requires calling `getPatternsByCategory` then manually filtering by status. A single `list` command with composable filters eliminates multi-step queries. Fuzzy search reduces agent retry loops when pattern names are approximate. - -**Filter flags:** - -| Flag | Filters by | Example | -| ---------- | ------------ | --------------------- | -| --status | FSM status | --status active | -| --phase | Phase number | --phase 22 | -| --category | Category tag | --category projection | -| --source | Source type | --source gherkin | -| --limit N | Max results | --limit 10 | -| --offset N | Skip results | --offset 5 | - -**Verified by:** - -- List with single filter -- List with composed filters -- Search with fuzzy matching -- Pagination with limit and offset -- Search with no results returns empty with suggestion -- Single filter -- Composed filters -- Fuzzy search -- Pagination - -
- -
-CLI provides ergonomic defaults and helpful error messages (3 scenarios) - -#### CLI provides ergonomic defaults and helpful error messages - -**Invariant:** Common operations require minimal flags. Pattern name typos produce actionable suggestions. Empty results explain why. - -**Rationale:** Every extra flag and every retry loop costs AI agent context tokens. Config file defaults eliminate repetitive path arguments. Fuzzy matching with suggestions prevents the common "Pattern not found" → retry → still not found loop. Empty result hints guide agents toward productive queries. - -**Ergonomic features:** - -| Feature | Before | After | -| --------------- | -------------------------------------------------- | --------------------------------------------------------------- | -| Config defaults | --input 'src/\*_/_.ts' --features '...' every time | Read from config file | -| -f shorthand | --features 'specs/\*.feature' | -f 'specs/\*.feature' | -| pnpm banner | Breaks JSON piping | Clean stdout | -| Did-you-mean | "Pattern not found" (dead end) | "Did you mean: AgentCommandInfrastructure?" | -| Empty hints | [] (no context) | "No active patterns. 3 are roadmap. Try: list --status roadmap" | - -**Verified by:** - -- Config file provides default input paths -- Fuzzy pattern name suggestion on not-found -- Empty result provides contextual hint -- Config file resolution -- Fuzzy suggestions -- Empty result hints - -
- -### DataAPIContextAssembly - -[View DataAPIContextAssembly source](delivery-process/specs/data-api-context-assembly.feature) - -**Problem:** -Starting a Claude Code design or implementation session requires assembling -30-100KB of curated, multi-source context from hundreds of annotated files. -Today this requires either manual context compilation by the user or 5-10 -explore agents burning context and time. The delivery-process pipeline already -has rich data (MasterDataset with archIndex, relationshipIndex, byPhase, -byStatus views) but no command combines data from multiple indexes around -a focal pattern into a compact, session-oriented context bundle. - -**Solution:** -Add context assembly subcommands that answer "what should I read next?" -rather than "what data exists?": - -1. `context ` assembles metadata + spec path + stub paths + - dependency chain + related patterns into ~1.5KB of file paths -2. `files ` returns only file paths organized by relevance -3. `dep-tree ` walks dependency chains recursively with status -4. `overview` gives executive project summary -5. Session type tailoring via `--session planning|design|implement` - -Implementation readiness checks (`scope-validate`) live in DataAPIDesignSessionSupport. - -**Business Value:** -| Benefit | Impact | -| Replace 5-10 explore agents | One command provides curated context | -| 1.5KB vs 100KB context | 98% reduction in context assembly tokens | -| Session-type tailoring | Right context for the right workflow | -| Dependency chain visibility | Know blocking status before starting | - -
-Context command assembles curated context for a single pattern (4 scenarios) - -#### Context command assembles curated context for a single pattern - -**Invariant:** Given a pattern name, `context` returns everything needed to start working on that pattern: metadata, file locations, dependency status, and architecture position -- in ~1.5KB of structured text. - -**Rationale:** This is the core value proposition. The command crosses five gaps simultaneously: it assembles data from multiple MasterDataset indexes, shapes it compactly, resolves file paths from pattern names, discovers stubs by convention, and tailors output by session type. - -**Assembly steps:** 1. Find pattern in MasterDataset via `getPattern()` 2. Resolve spec file from `pattern.filePath` 3. Find stubs via `implementedBy` in relationshipIndex 4. Walk `dependsOn` chain with status for each dependency 5. Find consumers via `usedBy` 6. Get architecture neighborhood from `archIndex.byContext` 7. Resolve all references to file paths 8. Format as structured text sections - - **Session type tailoring:** - -| Session | Includes | Typical Size | -| --------- | ---------------------------------------------- | ------------ | -| planning | Brief + deps + status | ~500 bytes | -| design | Spec + stubs + deps + architecture + consumers | ~1.5KB | -| implement | Spec + stubs + deliverables + FSM + tests | ~1KB | - -**Verified by:** - -- Assemble design session context -- Assemble planning session context -- Assemble implementation session context -- Context for nonexistent pattern returns error with suggestion -- Design session context -- Planning session context -- Implementation context - -
- -
-Files command returns only file paths organized by relevance (3 scenarios) - -#### Files command returns only file paths organized by relevance - -**Invariant:** `files` returns the most token-efficient output possible -- just file paths that Claude Code can read directly. - -**Rationale:** Most context tokens are spent reading actual files, not metadata. The `files` command tells Claude Code _which_ files to read, organized by importance. Claude Code then reads what it needs. This is more efficient than `context` when the agent already knows the pattern and just needs the file list. - -**Organization:** - -| Section | Contents | -| ------------------------ | -------------------------------------- | -| Primary | Spec file, stub files | -| Dependencies (completed) | Implementation files of completed deps | -| Dependencies (roadmap) | Spec files of incomplete deps | -| Architecture neighbors | Same-context patterns | - -**Verified by:** - -- File reading list with related patterns -- File reading list without related patterns -- Files for pattern with no resolvable paths returns minimal output -- Files with related patterns -- Files without related - -
- -
-Dep-tree command shows recursive dependency chain with status (3 scenarios) - -#### Dep-tree command shows recursive dependency chain with status - -**Invariant:** The dependency tree walks both `dependsOn`/`enables` (planning) and `uses`/`usedBy` (implementation) relationships with configurable depth. - -**Rationale:** Before starting work on a pattern, agents need to know the full dependency chain: what must be complete first, what this unblocks, and where the current pattern sits in the sequence. A tree visualization with status markers makes blocking relationships immediately visible. - -**Output format:** - -```text -AgentAsBoundedContext (22, completed) - -> AgentBCComponentIsolation (22a, completed) - -> AgentLLMIntegration (22b, roadmap) - -> [*] AgentCommandInfrastructure (22c, roadmap) <- YOU ARE HERE - -> AgentChurnRiskCompletion (22d, roadmap) -``` - -**Verified by:** - -- Dependency tree with status markers -- Dependency tree with depth limit -- Dependency tree handles circular dependencies safely -- Dep-tree with status -- Dep-tree with depth limit - -
- -
-Context command supports multiple patterns with merged output (2 scenarios) - -#### Context command supports multiple patterns with merged output - -**Invariant:** Multi-pattern context deduplicates shared dependencies and highlights overlap between patterns. - -**Rationale:** Design sessions often span multiple related patterns (e.g., reviewing DS-2 through DS-5 together). Separate `context` calls would duplicate shared dependencies. Merged context shows the union of all dependencies with overlap analysis. - -**Verified by:** - -- Multi-pattern context merges dependencies -- Multi-pattern context with one invalid name reports error -- Multi-pattern context - -
- -
-Overview provides executive project summary (2 scenarios) - -#### Overview provides executive project summary - -**Invariant:** `overview` returns project-wide health in one command. - -**Rationale:** Planning sessions start with "where are we?" This command answers that question without needing to run multiple queries and mentally aggregate results. Implementation readiness checks for specific patterns live in DataAPIDesignSessionSupport's `scope-validate` command. - -**Overview output** (uses normalizeStatus display aliases: planned = roadmap + deferred): - -| Section | Content | -| ------------- | --------------------------------------------------- | -| Progress | N patterns (X completed, Y active, Z planned) = P% | -| Active phases | Currently in-progress phases with pattern counts | -| Blocking | Patterns that cannot proceed due to incomplete deps | - -**Verified by:** - -- Executive overview -- Overview with empty pipeline returns zero-state summary - -
- -### DataAPICLIErgonomics - -[View DataAPICLIErgonomics source](delivery-process/specs/data-api-cli-ergonomics.feature) - -**Problem:** -The process-api CLI runs the full pipeline (scan, extract, transform) on every -invocation, taking 2-5 seconds. During design sessions with 10-20 queries, this -adds up to 1-2 minutes of waiting. There is no way to keep the pipeline loaded -between queries. Per-subcommand help is missing -- `process-api context --help` -does not work. FSM-only queries (like `isValidTransition`) run the full pipeline -even though FSM rules are static. - -**Solution:** -Add performance and ergonomic improvements: - -1. **Pipeline caching** -- Cache MasterDataset to temp file with mtime invalidation -2. **REPL mode** -- `process-api repl` keeps pipeline loaded for interactive queries -3. **FSM short-circuit** -- FSM queries skip the scan pipeline entirely -4. **Per-subcommand help** -- `process-api --help` with examples -5. **Dry-run mode** -- `--dry-run` shows what would be scanned without running -6. **Validation summary** -- Include pipeline health in response metadata - -**Business Value:** -| Benefit | Impact | -| Cached queries | 2-5s to <100ms for repeated queries | -| REPL mode | Interactive exploration during sessions | -| FSM short-circuit | Instant transition checks | -| Per-subcommand help | Self-documenting for AI agents | - -
-MasterDataset is cached between invocations with file-change invalidation (2 scenarios) - -#### MasterDataset is cached between invocations with file-change invalidation - -**Invariant:** Cache is automatically invalidated when any source file (TypeScript or Gherkin) has a modification time newer than the cache. - -**Rationale:** The pipeline (scan -> extract -> transform) runs fresh on every invocation (~2-5 seconds). Most queries during a session don't need fresh data -- the source files haven't changed between queries. Caching the MasterDataset to a temp file with file-modification-time invalidation makes subsequent queries instant while ensuring staleness is impossible. - -**Verified by:** - -- Second query uses cached dataset -- Cache invalidated on source file change -- Cache hit on unchanged files -- Cache invalidation on file change - -
- -
-REPL mode keeps pipeline loaded for interactive multi-query sessions (2 scenarios) - -#### REPL mode keeps pipeline loaded for interactive multi-query sessions - -**Invariant:** REPL mode loads the pipeline once and accepts multiple queries on stdin, with optional tab completion for pattern names and subcommands. - -**Rationale:** Design sessions often involve 10-20 exploratory queries in sequence (check status, look up pattern, check deps, look up another pattern). REPL mode eliminates per-query pipeline overhead entirely. - -**Verified by:** - -- REPL accepts multiple queries -- REPL reloads on source change notification -- REPL multi-query session -- REPL with reload - -
- -
-Per-subcommand help and diagnostic modes aid discoverability (3 scenarios) - -#### Per-subcommand help and diagnostic modes aid discoverability - -**Invariant:** Every subcommand supports `--help` with usage, flags, and examples. Dry-run shows pipeline scope without executing. - -**Rationale:** AI agents read `--help` output to discover available commands and flags. Without per-subcommand help, agents must read external documentation. Dry-run mode helps diagnose "why no patterns found?" issues by showing what would be scanned. - -**Verified by:** - -- Per-subcommand help output -- Dry-run shows pipeline scope -- Validation summary in response metadata -- Subcommand help -- Dry-run output -- Validation summary - -
- -### DataAPIArchitectureQueries - -[View DataAPIArchitectureQueries source](delivery-process/specs/data-api-architecture-queries.feature) - -**Problem:** -The current `arch` subcommand provides basic queries (roles, context, layer, graph) -but lacks deeper analysis needed for design sessions: pattern neighborhoods (what's -directly connected), cross-context comparison, annotation coverage gaps, and -taxonomy discovery. Agents exploring architecture must make multiple queries and -mentally assemble the picture, wasting context tokens. - -**Solution:** -Extend the `arch` subcommand and add new discovery commands: - -1. `arch neighborhood ` shows 1-hop relationships (direct uses/usedBy) -2. `arch compare ` shows shared deps and integration points -3. `arch coverage` reports annotation completeness with gaps -4. `tags` lists all tags in use with counts -5. `sources` shows file inventory by type -6. `unannotated [--path glob]` finds files without the libar-docs opt-in marker - -**Business Value:** -| Benefit | Impact | -| Pattern neighborhoods | Understand local architecture in one call | -| Coverage gaps | Find unannotated files that need attention | -| Taxonomy discovery | Know what tags and categories are available | -| Cross-context analysis | Compare bounded contexts for integration | - -
-Arch subcommand provides neighborhood and comparison views (3 scenarios) - -#### Arch subcommand provides neighborhood and comparison views - -**Invariant:** Architecture queries resolve pattern names to concrete relationships and file paths, not just abstract names. - -**Rationale:** The current `arch graph ` returns dependency and relationship names but not the full picture of what surrounds a pattern. Design sessions need to understand: "If I'm working on X, what else is directly connected?" and "How do contexts A and B relate?" - -**Neighborhood output:** - -| Section | Content | -| ------------ | --------------------------------------------- | -| Triggered by | Patterns whose `usedBy` includes this pattern | -| Uses | Patterns this calls directly | -| Used by | Patterns that call this directly | -| Same context | Sibling patterns in the same bounded context | - -**Verified by:** - -- Pattern neighborhood shows direct connections -- Cross-context comparison -- Neighborhood for nonexistent pattern returns error -- Neighborhood view - -
- -
-Coverage analysis reports annotation completeness with gaps (3 scenarios) - -#### Coverage analysis reports annotation completeness with gaps - -**Invariant:** Coverage reports identify unannotated files that should have the libar-docs opt-in marker based on their location and content. - -**Rationale:** Annotation completeness directly impacts the quality of all generated documentation and API queries. Files without the opt-in marker are invisible to the pipeline. Coverage gaps mean missing patterns in the registry, incomplete dependency graphs, and blind spots in architecture views. - -**Coverage output:** - -| Metric | Source | -| ----------------------- | --------------------------------------- | -| Annotated files | Files with libar-docs opt-in | -| Total scannable files | All .ts files in input globs | -| Coverage percentage | annotated / total | -| Missing files | Scannable files without annotations | -| Unused roles/categories | Values defined in taxonomy but not used | - -**Verified by:** - -- Architecture coverage report -- Find unannotated files with path filter -- Coverage with no scannable files returns zero coverage -- Coverage report -- Unannotated file discovery - -
- -
-Tags and sources commands provide taxonomy and inventory views (3 scenarios) - -#### Tags and sources commands provide taxonomy and inventory views - -**Invariant:** All tag values in use are discoverable without reading configuration files. Source file inventory shows the full scope of annotated and scanned content. - -**Rationale:** Agents frequently need to know "what categories exist?" or "how many feature files are there?" without reading taxonomy configuration. These are meta-queries about the annotation system itself, essential for writing new annotations correctly and understanding scope. - -**Tags output:** - - **Sources output:** - -| Tag | Count | Example Values | -| ------------------- | ----- | ------------------------------------- | -| libar-docs-status | 69 | completed(36), roadmap(30), active(3) | -| libar-docs-category | 41 | projection(6), saga(4), handler(5) | - -| Source Type | Count | Location Pattern | -| ----------------------- | ----- | ----------------------- | -| TypeScript (annotated) | 47 | src/\*_/_.ts | -| Gherkin (feature files) | 37 | specs/\*_/_.feature | -| Stub files | 22 | stubs/\*_/_.ts | -| Decision files | 13 | decisions/\*_/_.feature | - -**Verified by:** - -- List all tags with usage counts -- Source file inventory -- Tags listing with no patterns returns empty report -- Tags listing -- Sources inventory - -
- -### PDR001SessionWorkflowCommands - -[View PDR001SessionWorkflowCommands source](delivery-process/decisions/pdr-001-session-workflow-commands.feature) - -**Context:** -DataAPIDesignSessionSupport adds `scope-validate` (pre-flight session -readiness check) and `handoff` (session-end state summary) CLI subcommands. -Seven design decisions affect how these commands behave. - -**Decision:** -Seven design decisions (DD-1 through DD-7) captured as Rules below. - -
-DD-1 - Text output with section markers - -#### DD-1 - Text output with section markers - -Both scope-validate and handoff return string from the router, using -=== SECTION === markers. Follows the dual output path where text -commands bypass JSON.stringify. - -
- -
-DD-2 - Git integration is opt-in via --git flag - -#### DD-2 - Git integration is opt-in via --git flag - -The handoff command accepts an optional --git flag. The CLI handler -calls git diff and passes file list to the pure generator function. -No shell dependency in domain logic. - -
- -
-DD-3 - Session type inferred from FSM status - -#### DD-3 - Session type inferred from FSM status - -Handoff infers session type from pattern's current FSM status. -An explicit --session flag overrides inference. - -| Status | Inferred Session | -| --------- | ---------------- | -| roadmap | design | -| active | implement | -| completed | review | -| deferred | design | - -
- -
-DD-4 - Severity levels match Process Guard model - -#### DD-4 - Severity levels match Process Guard model - -Scope validation uses three severity levels: - - The --strict flag promotes WARN to BLOCKED. - -| Severity | Meaning | -| -------- | ------------------------- | -| PASS | Check passed | -| BLOCKED | Hard prerequisite missing | -| WARN | Recommendation not met | - -
- -
-DD-5 - Current date only for handoff - -#### DD-5 - Current date only for handoff - -Handoff always uses the current date. No --date flag. - -
- -
-DD-6 - Both positional and flag forms for scope type - -#### DD-6 - Both positional and flag forms for scope type - -scope-validate accepts scope type as both positional argument -and --type flag. - -
- -
-DD-7 - Co-located formatter functions (2 scenarios) - -#### DD-7 - Co-located formatter functions - -Each module (scope-validator.ts, handoff-generator.ts) exports -both the data builder and the text formatter. Simpler than the -context-assembler/context-formatter split. - -**Verified by:** - -- scope-validate outputs structured text -- Active pattern infers implement session - -
- -### ValidatePatternsCli - -[View ValidatePatternsCli source](tests/features/cli/validate-patterns.feature) - -Command-line interface for cross-validating TypeScript patterns vs Gherkin feature files. - -
-CLI displays help and version information (4 scenarios) - -#### CLI displays help and version information - -**Invariant:** The --help/-h and --version/-v flags must produce usage/version output and exit successfully without requiring other arguments. - -**Rationale:** Help and version are universal CLI conventions — both short and long flag forms must work for discoverability and scripting compatibility. - -**Verified by:** - -- Display help with --help flag -- Display help with -h flag -- Display version with --version flag -- Display version with -v flag - -
- -
-CLI requires input and feature patterns (2 scenarios) - -#### CLI requires input and feature patterns - -**Invariant:** The validate-patterns CLI must fail with clear errors when either --input or --features flags are missing. - -**Rationale:** Cross-source validation requires both TypeScript and Gherkin inputs — running with only one source would produce incomplete validation that misses cross-source mismatches. - -**Verified by:** - -- Fail without --input flag -- Fail without --features flag - -
- -
-CLI validates patterns across TypeScript and Gherkin sources (3 scenarios) - -#### CLI validates patterns across TypeScript and Gherkin sources - -**Invariant:** The validator must detect mismatches between TypeScript and Gherkin sources including phase and status discrepancies. - -**Rationale:** Dual-source architecture requires consistency — a pattern with status "active" in TypeScript but "roadmap" in Gherkin creates conflicting truth and broken reports. - -**Verified by:** - -- Validation passes for matching patterns -- Detect phase mismatch between sources -- Detect status mismatch between sources - -
- -
-CLI supports multiple output formats (2 scenarios) - -#### CLI supports multiple output formats - -**Invariant:** The CLI must support JSON and pretty (human-readable) output formats, with pretty as the default. - -**Rationale:** Pretty format serves interactive use while JSON format enables CI/CD pipeline integration and programmatic consumption of validation results. - -**Verified by:** - -- JSON output format -- Pretty output format is default - -
- -
-Strict mode treats warnings as errors (2 scenarios) - -#### Strict mode treats warnings as errors - -**Invariant:** When --strict is enabled, warnings must be promoted to errors causing a non-zero exit code (exit 2); without --strict, warnings must not cause failure. - -**Rationale:** CI pipelines need strict enforcement while local development benefits from lenient mode — the flag lets teams choose their enforcement level. - -**Verified by:** - -- Strict mode exits with code 2 on warnings -- Non-strict mode passes with warnings - -
- -
-CLI warns about unknown flags (1 scenarios) - -#### CLI warns about unknown flags - -**Invariant:** Unrecognized CLI flags must produce a warning message but allow execution to continue. - -**Rationale:** Pattern validation is non-destructive — warning without failing is more user-friendly than hard errors for minor flag typos, while still surfacing the issue. - -**Verified by:** - -- Warn on unknown flag but continue - -
- -### ProcessApiCliSubcommands - -[View ProcessApiCliSubcommands source](tests/features/cli/process-api-subcommands.feature) - -Discovery subcommands: list, search, context assembly, tags/sources, extended arch, unannotated. - -
-CLI list subcommand filters patterns (2 scenarios) - -#### CLI list subcommand filters patterns - -**Verified by:** - -- List all patterns returns JSON array -- List with invalid phase shows error - -
- -
-CLI search subcommand finds patterns by fuzzy match (2 scenarios) - -#### CLI search subcommand finds patterns by fuzzy match - -**Verified by:** - -- Search returns matching patterns -- Search without query shows error - -
- -
-CLI context assembly subcommands return text output (4 scenarios) - -#### CLI context assembly subcommands return text output - -**Verified by:** - -- Context returns curated text bundle -- Context without pattern name shows error -- Overview returns executive summary text -- Dep-tree returns dependency tree text - -
- -
-CLI tags and sources subcommands return JSON (2 scenarios) - -#### CLI tags and sources subcommands return JSON - -**Verified by:** - -- Tags returns tag usage counts -- Sources returns file inventory - -
- -
-CLI extended arch subcommands query architecture relationships (3 scenarios) - -#### CLI extended arch subcommands query architecture relationships - -**Verified by:** - -- Arch neighborhood returns pattern relationships -- Arch compare returns context comparison -- Arch coverage returns annotation coverage - -
- -
-CLI unannotated subcommand finds files without annotations (1 scenarios) - -#### CLI unannotated subcommand finds files without annotations - -**Verified by:** - -- Unannotated finds files missing libar-docs marker - -
- -### ProcessApiCliModifiersAndRules - -[View ProcessApiCliModifiersAndRules source](tests/features/cli/process-api-modifiers-rules.feature) - -Output modifiers, arch health, and rules subcommand. - -
-Output modifiers work when placed after the subcommand (3 scenarios) - -#### Output modifiers work when placed after the subcommand - -**Invariant:** Output modifiers (--count, --names-only, --fields) produce identical results regardless of position relative to the subcommand and its filters. - -**Rationale:** Users should not need to memorize argument ordering rules; the CLI should be forgiving. - -**Verified by:** - -- Count modifier after list subcommand returns count -- Names-only modifier after list subcommand returns names -- Count modifier combined with list filter - -
- -
-CLI arch health subcommands detect graph quality issues (3 scenarios) - -#### CLI arch health subcommands detect graph quality issues - -**Invariant:** Health subcommands (dangling, orphans, blocking) operate on the relationship index, not the architecture index, and return results without requiring arch annotations. - -**Rationale:** Graph quality issues (broken references, isolated patterns, blocked dependencies) are relationship-level concerns that should be queryable even when no architecture metadata exists. - -**Verified by:** - -- Arch dangling returns broken references -- Arch orphans returns isolated patterns -- Arch blocking returns blocked patterns - -
- -
-CLI rules subcommand queries business rules and invariants (9 scenarios) - -#### CLI rules subcommand queries business rules and invariants - -**Invariant:** The rules subcommand returns structured business rules extracted from Gherkin Rule: blocks, grouped by product area and phase, with parsed invariant and rationale annotations. - -**Rationale:** Live business rule queries replace static generated markdown, enabling on-demand filtering by product area, pattern, and invariant presence. - -**Verified by:** - -- Rules returns business rules from feature files -- Rules filters by product area -- Rules with count modifier returns totals -- Rules with names-only returns flat array -- Rules filters by pattern name -- Rules with only-invariants excludes rules without invariants -- Rules product area filter excludes non-matching areas -- Rules for non-existent product area returns hint -- Rules combines product area and only-invariants filters - -
- -### ProcessApiCliCore - -[View ProcessApiCliCore source](tests/features/cli/process-api-core.feature) - -Core CLI infrastructure: help, version, input validation, status, query, pattern, arch basics, missing args, edge cases. - -
-CLI displays help and version information (3 scenarios) - -#### CLI displays help and version information - -**Verified by:** - -- Display help with --help flag -- Display version with -v flag -- No subcommand shows help - -
- -
-CLI requires input flag for subcommands (2 scenarios) - -#### CLI requires input flag for subcommands - -**Verified by:** - -- Fail without --input flag when running status -- Reject unknown options - -
- -
-CLI status subcommand shows delivery state (1 scenarios) - -#### CLI status subcommand shows delivery state - -**Verified by:** - -- Status shows counts and completion percentage - -
- -
-CLI query subcommand executes API methods (3 scenarios) - -#### CLI query subcommand executes API methods - -**Verified by:** - -- Query getStatusCounts returns count object -- Query isValidTransition with arguments -- Unknown API method shows error - -
- -
-CLI pattern subcommand shows pattern detail (2 scenarios) - -#### CLI pattern subcommand shows pattern detail - -**Verified by:** - -- Pattern lookup returns full detail -- Pattern not found shows error - -
- -
-CLI arch subcommand queries architecture (3 scenarios) - -#### CLI arch subcommand queries architecture - -**Verified by:** - -- Arch roles lists roles with counts -- Arch context filters to bounded context -- Arch layer lists layers with counts - -
- -
-CLI shows errors for missing subcommand arguments (3 scenarios) - -#### CLI shows errors for missing subcommand arguments - -**Verified by:** - -- Query without method name shows error -- Pattern without name shows error -- Unknown subcommand shows error - -
- -
-CLI handles argument edge cases (2 scenarios) - -#### CLI handles argument edge cases - -**Verified by:** - -- Integer arguments are coerced for phase queries -- Double-dash separator is handled gracefully - -
- -### LintProcessCli - -[View LintProcessCli source](tests/features/cli/lint-process.feature) - -Command-line interface for validating changes against delivery process rules. - -
-CLI displays help and version information (4 scenarios) - -#### CLI displays help and version information - -**Invariant:** The --help/-h and --version/-v flags must produce usage/version output and exit successfully without requiring other arguments. - -**Rationale:** Help and version are universal CLI conventions — both short and long flag forms must work for discoverability and scripting compatibility. - -**Verified by:** - -- Display help with --help flag -- Display help with -h flag -- Display version with --version flag -- Display version with -v flag - -
- -
-CLI requires git repository for validation (2 scenarios) - -#### CLI requires git repository for validation - -**Invariant:** The lint-process CLI must fail with a clear error when run outside a git repository in both staged and all modes. - -**Rationale:** Process guard validation depends on git diff for change detection — running without git produces undefined behavior rather than useful validation results. - -**Verified by:** - -- Fail without git repository in staged mode -- Fail without git repository in all mode - -
- -
-CLI validates file mode input (3 scenarios) - -#### CLI validates file mode input - -**Invariant:** In file mode, the CLI must require at least one file path via positional argument or --file flag, and fail with a clear error when none is provided. - -**Rationale:** File mode is for targeted validation of specific files — accepting zero files would silently produce a "no violations" result that falsely implies the files are valid. - -**Verified by:** - -- Fail when files mode has no files -- Accept file via positional argument -- Accept file via --file flag - -
- -
-CLI handles no changes gracefully (1 scenarios) - -#### CLI handles no changes gracefully - -**Invariant:** When no relevant changes are detected (empty diff), the CLI must exit successfully with a zero exit code. - -**Rationale:** No changes means no violations are possible — failing on empty diffs would break CI pipelines on commits that only modify non-spec files. - -**Verified by:** - -- No changes detected exits successfully - -
- -
-CLI supports multiple output formats (2 scenarios) - -#### CLI supports multiple output formats - -**Invariant:** The CLI must support JSON and pretty (human-readable) output formats, with pretty as the default. - -**Rationale:** Pretty format serves interactive pre-commit use while JSON format enables CI/CD pipeline integration and automated violation processing. - -**Verified by:** - -- JSON output format -- Pretty output format is default - -
- -
-CLI supports debug options (1 scenarios) - -#### CLI supports debug options - -**Invariant:** The --show-state flag must display the derived process state (FSM states, protection levels, deliverables) without affecting validation behavior. - -**Rationale:** Process guard decisions are derived from complex state — exposing the intermediate state helps developers understand why a specific validation passed or failed. - -**Verified by:** - -- Show state flag displays derived state - -
- -
-CLI warns about unknown flags (1 scenarios) - -#### CLI warns about unknown flags - -**Invariant:** Unrecognized CLI flags must produce a warning message but allow execution to continue. - -**Rationale:** Process validation is critical-path at commit time — hard-failing on a typo in an optional flag would block commits unnecessarily when the core validation would succeed. - -**Verified by:** - -- Warn on unknown flag but continue - -
- -### LintPatternsCli - -[View LintPatternsCli source](tests/features/cli/lint-patterns.feature) - -Command-line interface for validating pattern annotation quality. - -
-CLI displays help and version information (2 scenarios) - -#### CLI displays help and version information - -**Invariant:** The --help and -v flags must produce usage/version output and exit successfully without requiring other arguments. - -**Rationale:** Help and version are universal CLI conventions — they must work standalone so users can discover usage without reading external documentation. - -**Verified by:** - -- Display help with --help flag -- Display version with -v flag - -
- -
-CLI requires input patterns (1 scenarios) - -#### CLI requires input patterns - -**Invariant:** The lint-patterns CLI must fail with a clear error when the --input flag is not provided. - -**Rationale:** Without input paths, the linter has nothing to validate — failing early prevents confusing "no violations" output that falsely implies clean annotations. - -**Verified by:** - -- Fail without --input flag - -
- -
-Lint passes for valid patterns (1 scenarios) - -#### Lint passes for valid patterns - -**Invariant:** Fully annotated patterns with all required tags must pass linting with zero violations. - -**Rationale:** False positives erode developer trust in the linter — valid annotations must always pass to maintain the tool's credibility. - -**Verified by:** - -- Lint passes for complete annotations - -
- -
-Lint detects violations in incomplete patterns (1 scenarios) - -#### Lint detects violations in incomplete patterns - -**Invariant:** Patterns with missing or incomplete annotations must produce specific violation reports identifying what is missing. - -**Rationale:** Actionable violation messages guide developers to fix annotations — generic "lint failed" messages without specifics waste debugging time. - -**Verified by:** - -- Report violations for incomplete annotations - -
- -
-CLI supports multiple output formats (2 scenarios) - -#### CLI supports multiple output formats - -**Invariant:** The CLI must support JSON and pretty (human-readable) output formats, with pretty as the default. - -**Rationale:** Pretty format serves interactive use while JSON format enables CI/CD pipeline integration and programmatic consumption of lint results. - -**Verified by:** - -- JSON output format -- Pretty output format is default - -
- -
-Strict mode treats warnings as errors (2 scenarios) - -#### Strict mode treats warnings as errors - -**Invariant:** When --strict is enabled, warnings must be promoted to errors causing a non-zero exit code; without --strict, warnings must not cause failure. - -**Rationale:** CI pipelines need strict enforcement while local development benefits from lenient mode — the flag lets teams choose their enforcement level. - -**Verified by:** - -- Strict mode fails on warnings -- Non-strict mode passes with warnings - -
- -### GenerateTagTaxonomyCli - -[View GenerateTagTaxonomyCli source](tests/features/cli/generate-tag-taxonomy.feature) - -Command-line interface for generating TAG_TAXONOMY.md from tag registry configuration. - -
-CLI displays help and version information (4 scenarios) - -#### CLI displays help and version information - -**Invariant:** The --help/-h and --version/-v flags must produce usage/version output and exit successfully without requiring other arguments. - -**Rationale:** Help and version are universal CLI conventions — both short and long flag forms must work for discoverability and scripting compatibility. - -**Verified by:** - -- Display help with --help flag -- Display help with -h flag -- Display version with --version flag -- Display version with -v flag - -
- -
-CLI generates taxonomy at specified output path (3 scenarios) - -#### CLI generates taxonomy at specified output path - -**Invariant:** The taxonomy generator must write output to the specified path, creating parent directories if they do not exist, and defaulting to a standard path when no output is specified. - -**Rationale:** Flexible output paths support both default conventions and custom layouts — auto-creating directories prevents "ENOENT" errors on first run. - -**Verified by:** - -- Generate taxonomy at default path -- Generate taxonomy at custom output path -- Create output directory if missing - -
- -
-CLI respects overwrite flag for existing files (3 scenarios) - -#### CLI respects overwrite flag for existing files - -**Invariant:** The CLI must refuse to overwrite existing output files unless the --overwrite or -f flag is explicitly provided. - -**Rationale:** Overwrite protection prevents accidental destruction of hand-edited taxonomy files — requiring an explicit flag makes destructive operations intentional. - -**Verified by:** - -- Fail when output file exists without --overwrite -- Overwrite existing file with -f flag -- Overwrite existing file with --overwrite flag - -
- -
-Generated taxonomy contains expected sections (2 scenarios) - -#### Generated taxonomy contains expected sections - -**Invariant:** The generated taxonomy file must include category documentation and statistics sections reflecting the configured tag registry. - -**Rationale:** The taxonomy is a reference document — incomplete output missing categories or statistics would leave developers without the information they need to annotate correctly. - -**Verified by:** - -- Generated file contains category documentation -- Generated file reports statistics - -
- -
-CLI warns about unknown flags (1 scenarios) - -#### CLI warns about unknown flags - -**Invariant:** Unrecognized CLI flags must produce a warning message but allow execution to continue. - -**Rationale:** Taxonomy generation is non-destructive — warning without failing is more user-friendly than hard errors for minor flag typos, while still surfacing the issue. - -**Verified by:** - -- Warn on unknown flag but continue - -
- -### GenerateDocsCli - -[View GenerateDocsCli source](tests/features/cli/generate-docs.feature) - -Command-line interface for generating documentation from annotated TypeScript. - -
-CLI displays help and version information (2 scenarios) - -#### CLI displays help and version information - -**Invariant:** The --help and -v flags must produce usage/version output and exit successfully without requiring other arguments. - -**Rationale:** Help and version are universal CLI conventions — they must work standalone so users can discover usage without reading external documentation. - -**Verified by:** - -- Display help with --help flag -- Display version with -v flag - -
- -
-CLI requires input patterns (1 scenarios) - -#### CLI requires input patterns - -**Invariant:** The generate-docs CLI must fail with a clear error when the --input flag is not provided. - -**Rationale:** Without input source paths, the generator has nothing to scan — failing early with a clear message prevents confusing "no patterns found" errors downstream. - -**Verified by:** - -- Fail without --input flag - -
- -
-CLI lists available generators (1 scenarios) - -#### CLI lists available generators - -**Invariant:** The --list-generators flag must display all registered generator names without performing any generation. - -**Rationale:** Users need to discover available generators before specifying --generator — listing them avoids trial-and-error with invalid generator names. - -**Verified by:** - -- List generators with --list-generators - -
- -
-CLI generates documentation from source files (2 scenarios) - -#### CLI generates documentation from source files - -**Invariant:** Given valid input patterns and a generator name, the CLI must scan sources, extract patterns, and produce markdown output files. - -**Rationale:** This is the core pipeline — the CLI is the primary entry point for transforming annotated source code into generated documentation. - -**Verified by:** - -- Generate patterns documentation -- Use default generator (patterns) when not specified - -
- -
-CLI rejects unknown options (1 scenarios) - -#### CLI rejects unknown options - -**Invariant:** Unrecognized CLI flags must cause an error with a descriptive message rather than being silently ignored. - -**Rationale:** Silent flag ignoring hides typos and misconfigurations — users typing --ouput instead of --output would get unexpected default behavior without realizing their flag was ignored. - -**Verified by:** - -- Unknown option causes error - -
- -### ProcessStateAPITesting - -[View ProcessStateAPITesting source](tests/features/api/process-state-api.feature) - -Programmatic interface for querying delivery process state. -Designed for Claude Code integration and tool automation. - -**Problem:** - -- Markdown generation is not ideal for programmatic access -- Claude Code needs structured data to answer process questions -- Multiple queries require redundant parsing of MasterDataset - -**Solution:** - -- ProcessStateAPI wraps MasterDataset with typed query methods -- Returns structured data suitable for programmatic consumption -- Integrates FSM validation for transition checks - -
-Status queries return correct patterns (6 scenarios) - -#### Status queries return correct patterns - -**Invariant:** Status queries must correctly filter by both normalized status (planned = roadmap + deferred) and FSM status (exact match). - -**Rationale:** The two-domain status convention requires separate query methods — mixing them produces incorrect filtered results. - -**Verified by:** - -- Get patterns by normalized status -- Get patterns by FSM status -- Get current work returns active patterns -- Get roadmap items returns roadmap and deferred -- Get status counts -- Get completion percentage - -
- -
-Phase queries return correct phase data (4 scenarios) - -#### Phase queries return correct phase data - -**Invariant:** Phase queries must return only patterns in the requested phase, with accurate progress counts and completion percentage. - -**Rationale:** Phase-level queries power the roadmap and session planning views — incorrect counts cascade into wrong progress percentages. - -**Verified by:** - -- Get patterns by phase -- Get phase progress -- Get nonexistent phase returns undefined -- Get active phases - -
- -
-FSM queries expose transition validation (4 scenarios) - -#### FSM queries expose transition validation - -**Invariant:** FSM queries must validate transitions against the PDR-005 state machine and expose protection levels per status. - -**Rationale:** Programmatic FSM access enables tooling to enforce delivery process rules without reimplementing the state machine. - -**Verified by:** - -- Check valid transition -- Check invalid transition -- Get valid transitions from status -- Get protection info - -
- -
-Pattern queries find and retrieve pattern data (4 scenarios) - -#### Pattern queries find and retrieve pattern data - -**Invariant:** Pattern lookup must be case-insensitive by name, and category queries must return only patterns with the requested category. - -**Rationale:** Case-insensitive search reduces friction in CLI and AI agent usage where exact casing is often unknown. - -**Verified by:** - -- Find pattern by name (case insensitive) -- Find nonexistent pattern returns undefined -- Get patterns by category -- Get all categories with counts - -
- -
-Timeline queries group patterns by time (3 scenarios) - -#### Timeline queries group patterns by time - -**Invariant:** Quarter queries must correctly filter by quarter string, and recently completed must be sorted by date descending with limit. - -**Rationale:** Timeline grouping enables quarterly reporting and session context — recent completions show delivery momentum. - -**Verified by:** - -- Get patterns by quarter -- Get all quarters -- Get recently completed sorted by date - -
- -### ScopeValidatorTests - -[View ScopeValidatorTests source](tests/features/api/session-support/scope-validator.feature) - -**Problem:** -Starting an implementation or design session without checking prerequisites -wastes time when blockers are discovered mid-session. - -**Solution:** -ScopeValidator runs composable checks and aggregates results into a verdict -(ready, blocked, or warnings) before a session starts. - -
-Implementation scope validation checks all prerequisites (7 scenarios) - -#### Implementation scope validation checks all prerequisites - -**Invariant:** Implementation scope validation must check FSM transition validity, dependency completeness, PDR references, and deliverable presence, with strict mode promoting warnings to blockers. - -**Rationale:** Starting implementation without passing scope validation wastes an entire session — the validator catches all known blockers before any code is written. - -**Verified by:** - -- All implementation checks pass -- Incomplete dependency blocks implementation -- FSM transition from completed blocks implementation -- Missing PDR references produce WARN -- No deliverables blocks implementation -- Strict mode promotes WARN to BLOCKED -- Pattern not found throws error - -
- -
-Design scope validation checks dependency stubs (2 scenarios) - -#### Design scope validation checks dependency stubs - -**Invariant:** Design scope validation must verify that dependencies have corresponding code stubs, producing warnings when stubs are missing. - -**Rationale:** Design sessions that reference unstubbed dependencies cannot produce actionable interfaces — stub presence indicates the dependency's API surface is at least sketched. - -**Verified by:** - -- Design session with no dependencies passes -- Design session with dependencies lacking stubs produces WARN - -
- -
-Formatter produces structured text output (3 scenarios) - -#### Formatter produces structured text output - -**Invariant:** The scope validator formatter must produce structured text with ADR-008 markers, showing verdict text for warnings and blocker details for blocked verdicts. - -**Rationale:** Structured formatter output enables the CLI to display verdicts consistently — unstructured output would vary by validation type and be hard to parse. - -**Verified by:** - -- Formatter produces markers per ADR-008 -- Formatter shows warnings verdict text -- Formatter shows blocker details for blocked verdict - -
- -### HandoffGeneratorTests - -[View HandoffGeneratorTests source](tests/features/api/session-support/handoff-generator.feature) - -**Problem:** -Multi-session work loses critical state between sessions when handoff -documentation is manual or forgotten. - -**Solution:** -HandoffGenerator assembles a structured handoff document from ProcessStateAPI -and MasterDataset, capturing completed work, remaining items, discovered -issues, and next-session priorities. - -#### Handoff generates compact session state summary - -**Invariant:** The handoff generator must produce a compact session state summary including pattern status, discovered items, inferred session type, modified files, and dependency blockers, throwing an error for unknown patterns. - -**Rationale:** Handoff documents are the bridge between multi-session work — without compact state capture, the next session starts from scratch instead of resuming where the previous one left off. - -**Verified by:** - -- Generate handoff for in-progress pattern -- Handoff captures discovered items -- Session type is inferred from status -- Completed pattern infers review session type -- Deferred pattern infers design session type -- Files modified section included when provided -- Blockers section shows incomplete dependencies -- Pattern not found throws error - -#### Formatter produces structured text output - -**Invariant:** The handoff formatter must produce structured text output with ADR-008 section markers for machine-parseable session state. - -**Rationale:** ADR-008 markers enable the context assembler to parse handoff output programmatically — unstructured text would require fragile regex parsing. - -**Verified by:** - -- Handoff formatter produces markers per ADR-008 - -### PatternSummarizeTests - -[View PatternSummarizeTests source](tests/features/api/output-shaping/summarize.feature) - -Validates that summarizePattern() projects ExtractedPattern (~3.5KB) to -PatternSummary (~100 bytes) with the correct 6 fields. - -#### summarizePattern projects to compact summary - -**Invariant:** summarizePattern must project a full pattern object to a compact summary containing exactly 6 fields, using the patternName tag over the name field when available and omitting undefined optional fields. - -**Rationale:** Compact summaries reduce token usage by 80-90% compared to full patterns — they provide enough context for navigation without overwhelming AI context windows. - -**Verified by:** - -- Summary includes all 6 fields for a TypeScript pattern -- Summary includes all 6 fields for a Gherkin pattern -- Summary uses patternName tag over name field -- Summary omits undefined optional fields - -#### summarizePatterns batch processes arrays - -**Invariant:** summarizePatterns must batch-process an array of patterns, returning a correctly-sized array of compact summaries. - -**Rationale:** Batch processing avoids N individual function calls — the API frequently needs to summarize all patterns matching a query in a single operation. - -**Verified by:** - -- Batch summarization returns correct count - -### PatternHelpersTests - -[View PatternHelpersTests source](tests/features/api/output-shaping/pattern-helpers.feature) - -
-getPatternName uses patternName tag when available (2 scenarios) - -#### getPatternName uses patternName tag when available - -**Invariant:** getPatternName must return the patternName tag value when set, falling back to the pattern's name field when the tag is absent. - -**Rationale:** The patternName tag allows human-friendly display names — without the fallback, patterns missing the tag would display as undefined. - -**Verified by:** - -- Returns patternName when set -- Falls back to name when patternName is absent - -
- -
-findPatternByName performs case-insensitive matching (3 scenarios) - -#### findPatternByName performs case-insensitive matching - -**Invariant:** findPatternByName must match pattern names case-insensitively, returning undefined when no match exists. - -**Rationale:** Case-insensitive matching prevents frustrating "not found" errors when developers type "processguard" instead of "ProcessGuard" — both clearly refer to the same pattern. - -**Verified by:** - -- Exact case match -- Case-insensitive match -- No match returns undefined - -
- -
-getRelationships looks up with case-insensitive fallback (3 scenarios) - -#### getRelationships looks up with case-insensitive fallback - -**Invariant:** getRelationships must first try exact key lookup in the relationship index, then fall back to case-insensitive matching, returning undefined when no match exists. - -**Rationale:** Exact-first with case-insensitive fallback balances performance (O(1) exact lookup) with usability (tolerates case mismatches in cross-references). - -**Verified by:** - -- Exact key match in relationship index -- Case-insensitive fallback match -- Missing relationship index returns undefined - -
- -
-suggestPattern provides fuzzy suggestions (2 scenarios) - -#### suggestPattern provides fuzzy suggestions - -**Invariant:** suggestPattern must return fuzzy match suggestions for close pattern names, returning empty results when no close match exists. - -**Rationale:** Fuzzy suggestions power "did you mean?" UX in the CLI — without them, typos produce unhelpful "pattern not found" messages. - -**Verified by:** - -- Suggests close match -- No close match returns empty - -
- -### OutputPipelineTests - -[View OutputPipelineTests source](tests/features/api/output-shaping/output-pipeline.feature) - -Validates the output pipeline transforms: summarization, modifiers, -list filters, empty stripping, and format output. - -
-Output modifiers apply with correct precedence (7 scenarios) - -#### Output modifiers apply with correct precedence - -**Invariant:** Output modifiers (count, names-only, fields, full) must apply to pattern arrays with correct precedence, passing scalar inputs through unchanged, with summaries as the default mode. - -**Rationale:** Predictable modifier behavior enables composable CLI queries — unexpected precedence or scalar handling would produce confusing output for piped commands. - -**Verified by:** - -- Default mode returns summaries for pattern arrays -- Count modifier returns integer -- Names-only modifier returns string array -- Fields modifier picks specific fields -- Full modifier bypasses summarization -- Scalar input passes through unchanged -- Fields with single field returns objects with one key - -
- -
-Modifier conflicts are rejected (4 scenarios) - -#### Modifier conflicts are rejected - -**Invariant:** Mutually exclusive modifier combinations (full+names-only, full+count, full+fields) and invalid field names must be rejected with clear error messages. - -**Rationale:** Conflicting modifiers produce ambiguous intent — rejecting early with a clear message is better than silently picking one modifier and ignoring the other. - -**Verified by:** - -- Full combined with names-only is rejected -- Full combined with count is rejected -- Full combined with fields is rejected -- Invalid field name is rejected - -
- -
-List filters compose via AND logic (4 scenarios) - -#### List filters compose via AND logic - -**Invariant:** Multiple list filters (status, category) must compose via AND logic, with pagination (limit/offset) applied after filtering and empty results for out-of-range offsets. - -**Rationale:** AND composition is the intuitive default for filters — "status=active AND category=core" should narrow results, not widen them via OR logic. - -**Verified by:** - -- Filter by status returns matching patterns -- Filter by status and category narrows results -- Pagination with limit and offset -- Offset beyond array length returns empty results - -
- -
-Empty stripping removes noise (1 scenarios) - -#### Empty stripping removes noise - -**Invariant:** Null and empty values must be stripped from output objects to reduce noise in API responses. - -**Rationale:** Empty fields in pattern summaries create visual clutter and waste tokens in AI context windows — stripping them keeps output focused on meaningful data. - -**Verified by:** - -- Null and empty values are stripped - -
- -### FuzzyMatchTests - -[View FuzzyMatchTests source](tests/features/api/output-shaping/fuzzy-match.feature) - -Validates tiered fuzzy matching: exact > prefix > substring > Levenshtein. - -
-Fuzzy matching uses tiered scoring (8 scenarios) - -#### Fuzzy matching uses tiered scoring - -**Invariant:** Pattern matching must use a tiered scoring system: exact match (1.0) > prefix match (0.9) > substring match (0.7) > Levenshtein distance, with results sorted by score descending and case-insensitive matching. - -**Rationale:** Tiered scoring ensures the most intuitive match wins — an exact match should always rank above a substring match, preventing surprising suggestions for common pattern names. - -**Verified by:** - -- Exact match scores 1.0 -- Exact match is case-insensitive -- Prefix match scores 0.9 -- Substring match scores 0.7 -- Levenshtein match for close typos -- Results are sorted by score descending -- Empty query matches all patterns as prefix -- No candidate patterns returns no results - -
- -
-findBestMatch returns single suggestion (2 scenarios) - -#### findBestMatch returns single suggestion - -**Invariant:** findBestMatch must return the single highest-scoring match above the threshold, or undefined when no match exceeds the threshold. - -**Rationale:** A single best suggestion simplifies "did you mean?" prompts in the CLI — returning multiple matches would require additional UI to disambiguate. - -**Verified by:** - -- Best match returns suggestion above threshold -- No match returns undefined when below threshold - -
- -
-Levenshtein distance computation (2 scenarios) - -#### Levenshtein distance computation - -**Invariant:** The Levenshtein distance function must correctly compute edit distance between strings, returning 0 for identical strings. - -**Rationale:** Levenshtein distance is the fallback matching tier — incorrect distance computation would produce wrong fuzzy match scores for typo correction. - -**Verified by:** - -- Identical strings have distance 0 -- Single character difference - -
- -### ArchQueriesTest - -[View ArchQueriesTest source](tests/features/api/architecture-queries/arch-queries.feature) - -
-Neighborhood and comparison views (3 scenarios) - -#### Neighborhood and comparison views - -**Invariant:** The architecture query API must provide pattern neighborhood views (direct connections) and cross-context comparison views (shared/unique dependencies), returning undefined for nonexistent patterns. - -**Rationale:** Neighborhood and comparison views are the primary navigation tools for understanding architecture — without them, developers must manually trace relationship chains across files. - -**Verified by:** - -- Pattern neighborhood shows direct connections -- Cross-context comparison shows shared and unique dependencies -- Neighborhood for nonexistent pattern returns undefined - -
- -
-Taxonomy discovery via tags and sources (3 scenarios) - -#### Taxonomy discovery via tags and sources - -**Invariant:** The API must aggregate tag values with counts across all patterns and categorize source files by type, returning empty reports when no patterns match. - -**Rationale:** Tag aggregation reveals annotation coverage gaps and source inventory helps teams understand their codebase composition — both are essential for project health monitoring. - -**Verified by:** - -- Tag aggregation counts values across patterns -- Source inventory categorizes files by type -- Tags with no patterns returns empty report - -
- -
-Coverage analysis reports annotation completeness (4 scenarios) - -#### Coverage analysis reports annotation completeness - -**Invariant:** Coverage analysis must detect unused taxonomy entries, cross-context integration points, and include all relationship types (implements, dependsOn, enables) in neighborhood views. - -**Rationale:** Unused taxonomy entries indicate dead configuration while missing relationship types produce incomplete architecture views — both degrade the reliability of generated documentation. - -**Verified by:** - -- Unused taxonomy detection -- Cross-context comparison with integration points -- Neighborhood includes implements relationships -- Neighborhood includes dependsOn and enables relationships - -
- -### StubTaxonomyTagTests - -[View StubTaxonomyTagTests source](tests/features/api/stub-integration/taxonomy-tags.feature) - -**Problem:** -Stub metadata (target path, design session) was stored as plain text -in JSDoc descriptions, invisible to structured queries. - -**Solution:** -Register libar-docs-target and libar-docs-since as taxonomy tags -so they flow through the extraction pipeline as structured fields. - -#### Taxonomy tags are registered in the registry - -**Invariant:** The target and since stub metadata tags must be registered in the tag registry as recognized taxonomy entries. - -**Rationale:** Unregistered tags would be flagged as unknown by the linter — registration ensures stub metadata tags pass validation alongside standard annotation tags. - -**Verified by:** - -- Target and since tags exist in registry - -#### Tags are part of the stub metadata group - -**Invariant:** The target and since tags must be grouped under the stub metadata domain in the built registry. - -**Rationale:** Domain grouping enables the taxonomy codec to render stub metadata tags in their own section — ungrouped tags would be lost in the "Other" category. - -**Verified by:** - -- Built registry groups target and since as stub tags - -### StubResolverTests - -[View StubResolverTests source](tests/features/api/stub-integration/stub-resolver.feature) - -**Problem:** -Design session stubs need structured discovery and resolution -to determine which stubs have been implemented and which remain. - -**Solution:** -StubResolver functions identify, resolve, and group stubs from -the MasterDataset with filesystem existence checks. - -
-Stubs are identified by path or target metadata (2 scenarios) - -#### Stubs are identified by path or target metadata - -**Invariant:** A pattern must be identified as a stub if it resides in the stubs directory OR has a targetPath metadata field. - -**Rationale:** Dual identification supports both convention-based (directory) and metadata-based (targetPath) stub detection — relying on only one would miss stubs organized differently. - -**Verified by:** - -- Patterns in stubs directory are identified as stubs -- Patterns with targetPath are identified as stubs - -
- -
-Stubs are resolved against the filesystem (2 scenarios) - -#### Stubs are resolved against the filesystem - -**Invariant:** Resolved stubs must show whether their target file exists on the filesystem and must be grouped by the pattern they implement. - -**Rationale:** Target existence status tells developers whether a stub has been implemented — grouping by pattern enables the "stubs --unresolved" command to show per-pattern implementation gaps. - -**Verified by:** - -- Resolved stubs show target existence status -- Stubs are grouped by implementing pattern - -
- -
-Decision items are extracted from descriptions (3 scenarios) - -#### Decision items are extracted from descriptions - -**Invariant:** AD-N formatted items must be extracted from pattern description text, with empty descriptions returning no items and malformed items being skipped. - -**Rationale:** Decision items (AD-1, AD-2, etc.) link stubs to architectural decisions — extracting them enables traceability from code stubs back to the design rationale. - -**Verified by:** - -- AD-N items are extracted from description text -- Empty description returns no decision items -- Malformed AD items are skipped - -
- -
-PDR references are found across patterns (2 scenarios) - -#### PDR references are found across patterns - -**Invariant:** The resolver must find all patterns that reference a given PDR identifier, returning empty results when no references exist. - -**Rationale:** PDR cross-referencing enables impact analysis — knowing which patterns reference a decision helps assess the blast radius of changing that decision. - -**Verified by:** - -- Patterns referencing a PDR are found -- No references returns empty result - -
- -### ContextFormatterTests - -[View ContextFormatterTests source](tests/features/api/context-assembly/context-formatter.feature) - -Tests for formatContextBundle(), formatDepTree(), formatFileReadingList(), -and formatOverview() plain text rendering functions. - -
-formatContextBundle renders section markers (2 scenarios) - -#### formatContextBundle renders section markers - -**Invariant:** The context formatter must render section markers for all populated sections in a context bundle, with design bundles rendering all sections and implement bundles focusing on deliverables and FSM. - -**Rationale:** Section markers enable structured parsing of context output — without them, AI consumers cannot reliably extract specific sections from the formatted bundle. - -**Verified by:** - -- Design bundle renders all populated sections -- Implement bundle renders deliverables and FSM - -
- -
-formatDepTree renders indented tree (1 scenarios) - -#### formatDepTree renders indented tree - -**Invariant:** The dependency tree formatter must render with indentation arrows and a focal pattern marker to visually distinguish the target pattern from its dependencies. - -**Rationale:** Visual hierarchy in the dependency tree makes dependency chains scannable at a glance — flat output would require mental parsing to understand depth and relationships. - -**Verified by:** - -- Tree renders with arrows and focal marker - -
- -
-formatOverview renders progress summary (1 scenarios) - -#### formatOverview renders progress summary - -**Invariant:** The overview formatter must render a progress summary line showing completion metrics for the project. - -**Rationale:** The progress line is the first thing developers see when starting a session — it provides immediate project health awareness without requiring detailed exploration. - -**Verified by:** - -- Overview renders progress line - -
- -
-formatFileReadingList renders categorized file paths (2 scenarios) - -#### formatFileReadingList renders categorized file paths - -**Invariant:** The file reading list formatter must categorize paths into primary and dependency sections, producing minimal output when the list is empty. - -**Rationale:** Categorized file lists tell developers which files to read first (primary) versus reference (dependency) — uncategorized lists waste time on low-priority files. - -**Verified by:** - -- File list renders primary and dependency sections -- Empty file reading list renders minimal output - -
- -### ContextAssemblerTests - -[View ContextAssemblerTests source](tests/features/api/context-assembly/context-assembler.feature) - -Tests for assembleContext(), buildDepTree(), buildFileReadingList(), and -buildOverview() pure functions that operate on MasterDataset. - -
-assembleContext produces session-tailored context bundles (7 scenarios) - -#### assembleContext produces session-tailored context bundles - -**Invariant:** Each session type (design/planning/implement) must include exactly the context sections defined by its profile — no more, no less. - -**Rationale:** Over-fetching wastes AI context window tokens; under-fetching causes the agent to make uninformed decisions. - -**Verified by:** - -- Design session includes stubs, consumers, and architecture -- Planning session includes only metadata and dependencies -- Implement session includes deliverables and FSM -- Multi-pattern context merges metadata from both patterns -- Pattern not found returns error with suggestion -- Description preserves Problem and Solution structure -- Solution text with inline bold is not truncated -- Design session includes stubs -- consumers -- and architecture - -
- -
-buildDepTree walks dependency chains with cycle detection (4 scenarios) - -#### buildDepTree walks dependency chains with cycle detection - -**Invariant:** The dependency tree must walk the full chain up to the depth limit, mark the focal node, and terminate safely on circular references. - -**Rationale:** Dependency chains reveal implementation prerequisites — cycles and infinite recursion would crash the CLI. - -**Verified by:** - -- Dependency tree shows chain with status markers -- Depth limit truncates branches -- Circular dependencies are handled safely -- Standalone pattern returns single-node tree - -
- -
-buildOverview provides executive project summary (2 scenarios) - -#### buildOverview provides executive project summary - -**Invariant:** The overview must include progress counts (completed/active/planned), active phase listing, and blocking dependencies. - -**Rationale:** The overview is the first command in every session start recipe — it must provide a complete project health snapshot. - -**Verified by:** - -- Overview shows progress, active phases, and blocking -- Empty dataset returns zero-state overview -- Overview shows progress -- active phases -- and blocking - -
- -
-buildFileReadingList returns paths by relevance (3 scenarios) - -#### buildFileReadingList returns paths by relevance - -**Invariant:** Primary files (spec, implementation) must always be included; related files (dependency implementations) are included only when requested. - -**Rationale:** File reading lists power the "what to read" guidance — relevance sorting ensures the most important files are read first within token budgets. - -**Verified by:** - -- File list includes primary and related files -- File list includes implementation files for completed dependencies -- File list without related returns only primary - -
+32 patterns, 137 rules with invariants (137 total) + +### Arch Queries Test + +| Rule | Invariant | Rationale | +| ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Neighborhood and comparison views | The architecture query API must provide pattern neighborhood views (direct connections) and cross-context comparison views (shared/unique dependencies), returning undefined for nonexistent patterns. | Neighborhood and comparison views are the primary navigation tools for understanding architecture — without them, developers must manually trace relationship chains across files. | +| Taxonomy discovery via tags and sources | The API must aggregate tag values with counts across all patterns and categorize source files by type, returning empty reports when no patterns match. | Tag aggregation reveals annotation coverage gaps and source inventory helps teams understand their codebase composition — both are essential for project health monitoring. | +| Coverage analysis reports annotation completeness | Coverage analysis must detect unused taxonomy entries, cross-context integration points, and include all relationship types (implements, dependsOn, enables) in neighborhood views. | Unused taxonomy entries indicate dead configuration while missing relationship types produce incomplete architecture views — both degrade the reliability of generated documentation. | + +### Context Assembler Tests + +| Rule | Invariant | Rationale | +| --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------- | +| assembleContext produces session-tailored context bundles | Each session type (design/planning/implement) must include exactly the context sections defined by its profile — no more, no less. | Over-fetching wastes AI context window tokens; under-fetching causes the agent to make uninformed decisions. | +| buildDepTree walks dependency chains with cycle detection | The dependency tree must walk the full chain up to the depth limit, mark the focal node, and terminate safely on circular references. | Dependency chains reveal implementation prerequisites — cycles and infinite recursion would crash the CLI. | +| buildOverview provides executive project summary | The overview must include progress counts (completed/active/planned), active phase listing, and blocking dependencies. | The overview is the first command in every session start recipe — it must provide a complete project health snapshot. | +| buildFileReadingList returns paths by relevance | Primary files (spec, implementation) must always be included; related files (dependency implementations) are included only when requested. | File reading lists power the "what to read" guidance — relevance sorting ensures the most important files are read first within token budgets. | + +### Context Formatter Tests + +| Rule | Invariant | Rationale | +| ---------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| formatContextBundle renders section markers | The context formatter must render section markers for all populated sections in a context bundle, with design bundles rendering all sections and implement bundles focusing on deliverables and FSM. | Section markers enable structured parsing of context output — without them, AI consumers cannot reliably extract specific sections from the formatted bundle. | +| formatDepTree renders indented tree | The dependency tree formatter must render with indentation arrows and a focal pattern marker to visually distinguish the target pattern from its dependencies. | Visual hierarchy in the dependency tree makes dependency chains scannable at a glance — flat output would require mental parsing to understand depth and relationships. | +| formatOverview renders progress summary | The overview formatter must render a progress summary line showing completion metrics for the project. | The progress line is the first thing developers see when starting a session — it provides immediate project health awareness without requiring detailed exploration. | +| formatFileReadingList renders categorized file paths | The file reading list formatter must categorize paths into primary and dependency sections, producing minimal output when the list is empty. | Categorized file lists tell developers which files to read first (primary) versus reference (dependency) — uncategorized lists waste time on low-priority files. | + +### Data API Architecture Queries + +| Rule | Invariant | Rationale | +| -------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Arch subcommand provides neighborhood and comparison views | Architecture queries resolve pattern names to concrete relationships and file paths, not just abstract names. | The current `arch graph ` returns dependency and relationship names but not the full picture of what surrounds a pattern. Design sessions need to understand: "If I'm working on X, what else is directly connected?" and "How do contexts A and B relate?" | +| Coverage analysis reports annotation completeness with gaps | Coverage reports identify unannotated files that should have the libar-docs opt-in marker based on their location and content. | Annotation completeness directly impacts the quality of all generated documentation and API queries. Files without the opt-in marker are invisible to the pipeline. Coverage gaps mean missing patterns in the registry, incomplete dependency graphs, and blind spots in architecture views. | +| Tags and sources commands provide taxonomy and inventory views | All tag values in use are discoverable without reading configuration files. Source file inventory shows the full scope of annotated and scanned content. | Agents frequently need to know "what categories exist?" or "how many feature files are there?" without reading taxonomy configuration. These are meta-queries about the annotation system itself, essential for writing new annotations correctly and understanding scope. | + +### Data API CLI Ergonomics + +| Rule | Invariant | Rationale | +| ------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| MasterDataset is cached between invocations with file-change invalidation | Cache is automatically invalidated when any source file (TypeScript or Gherkin) has a modification time newer than the cache. | The pipeline (scan -> extract -> transform) runs fresh on every invocation (~2-5 seconds). Most queries during a session don't need fresh data -- the source files haven't changed between queries. Caching the MasterDataset to a temp file with file-modification-time invalidation makes subsequent queries instant while ensuring staleness is impossible. | +| REPL mode keeps pipeline loaded for interactive multi-query sessions | REPL mode loads the pipeline once and accepts multiple queries on stdin, with optional tab completion for pattern names and subcommands. | Design sessions often involve 10-20 exploratory queries in sequence (check status, look up pattern, check deps, look up another pattern). REPL mode eliminates per-query pipeline overhead entirely. | +| Per-subcommand help and diagnostic modes aid discoverability | Every subcommand supports `--help` with usage, flags, and examples. Dry-run shows pipeline scope without executing. | AI agents read `--help` output to discover available commands and flags. Without per-subcommand help, agents must read external documentation. Dry-run mode helps diagnose "why no patterns found?" issues by showing what would be scanned. | + +### Data API Context Assembly + +| Rule | Invariant | Rationale | +| -------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Context command assembles curated context for a single pattern | Given a pattern name, `context` returns everything needed to start working on that pattern: metadata, file locations, dependency status, and architecture position -- in ~1.5KB of structured text. | This is the core value proposition. The command crosses five gaps simultaneously: it assembles data from multiple MasterDataset indexes, shapes it compactly, resolves file paths from pattern names, discovers stubs by convention, and tailors output by session type. | +| Files command returns only file paths organized by relevance | `files` returns the most token-efficient output possible -- just file paths that Claude Code can read directly. | Most context tokens are spent reading actual files, not metadata. The `files` command tells Claude Code _which_ files to read, organized by importance. Claude Code then reads what it needs. This is more efficient than `context` when the agent already knows the pattern and just needs the file list. | +| Dep-tree command shows recursive dependency chain with status | The dependency tree walks both `dependsOn`/`enables` (planning) and `uses`/`usedBy` (implementation) relationships with configurable depth. | Before starting work on a pattern, agents need to know the full dependency chain: what must be complete first, what this unblocks, and where the current pattern sits in the sequence. A tree visualization with status markers makes blocking relationships immediately visible. | +| Context command supports multiple patterns with merged output | Multi-pattern context deduplicates shared dependencies and highlights overlap between patterns. | Design sessions often span multiple related patterns (e.g., reviewing DS-2 through DS-5 together). Separate `context` calls would duplicate shared dependencies. Merged context shows the union of all dependencies with overlap analysis. | +| Overview provides executive project summary | `overview` returns project-wide health in one command. | Planning sessions start with "where are we?" This command answers that question without needing to run multiple queries and mentally aggregate results. Implementation readiness checks for specific patterns live in DataAPIDesignSessionSupport's `scope-validate` command. | + +### Data API Design Session Support + +| Rule | Invariant | Rationale | +| ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Scope-validate checks implementation prerequisites before session start | Scope validation surfaces all blocking conditions before committing to a session, preventing wasted effort on unready patterns. | Starting implementation on a pattern with incomplete dependencies wastes an entire session. Starting a design session without prior session deliverables means working with incomplete context. Pre-flight validation catches these issues in seconds rather than discovering them mid-session. | +| Handoff generates compact session state summary for multi-session work | Handoff documentation captures everything the next session needs to continue work without context loss. | Multi-session work (common for design phases spanning DS-1 through DS-7) requires state transfer between sessions. Without automated handoff, critical information is lost: what was completed, what's in progress, what blockers were discovered, and what should happen next. Manual handoff documentation is inconsistent and often forgotten. | + +### Data API Output Shaping + +| Rule | Invariant | Rationale | +| ---------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| List queries return compact pattern summaries by default | List-returning API methods produce summaries, not full ExtractedPattern objects, unless `--full` is explicitly requested. | The single biggest usability problem. `getCurrentWork` returns 3 active patterns at ~3.5KB each = 10.5KB. Summarized: ~300 bytes total. The `directive` field (raw JSDoc AST) and `code` field (full source) are almost never needed for list queries. AI agents need name, status, category, phase, and file path -- nothing more. | +| Global output modifier flags apply to any list-returning command | Output modifiers are composable and apply uniformly across all list-returning subcommands and query methods. | AI agents frequently need just pattern names (for further queries), just counts (for progress checks), or specific fields (for focused analysis). These are post-processing transforms that should work with any data source. | +| Output format is configurable with typed response envelope | All CLI output uses the QueryResult envelope for success/error discrimination. The compact format strips empty and null fields. | The existing `QueryResult` types (`QuerySuccess`, `QueryError`) are defined in `src/api/types.ts` but not wired into the CLI output. Agents cannot distinguish success from error without try/catch on JSON parsing. Empty arrays, null values, and empty strings add noise to every response. | +| List subcommand provides composable filters and fuzzy search | The `list` subcommand replaces the need to call specific `getPatternsByX` methods. Filters are composable via AND logic. The `query` subcommand remains available for programmatic/raw access. | Currently, filtering by status AND category requires calling `getPatternsByCategory` then manually filtering by status. A single `list` command with composable filters eliminates multi-step queries. Fuzzy search reduces agent retry loops when pattern names are approximate. | +| CLI provides ergonomic defaults and helpful error messages | Common operations require minimal flags. Pattern name typos produce actionable suggestions. Empty results explain why. | Every extra flag and every retry loop costs AI agent context tokens. Config file defaults eliminate repetitive path arguments. Fuzzy matching with suggestions prevents the common "Pattern not found" → retry → still not found loop. Empty result hints guide agents toward productive queries. | + +### Data API Platform Integration + +| Rule | Invariant | Rationale | +| ----------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| ProcessStateAPI is accessible as an MCP server for Claude Code | The MCP server exposes all ProcessStateAPI methods as MCP tools with typed input/output schemas. The pipeline is loaded once on server start and refreshed on source file changes. | MCP is Claude Code's native tool integration protocol. An MCP server eliminates the CLI subprocess overhead (2-5s per query) and enables Claude Code to call process queries as naturally as it calls other tools. Stateful operation means the pipeline loads once and serves many queries. | +| Process state can be auto-generated as CLAUDE.md context sections | Generated CLAUDE.md sections are additive layers that provide pattern metadata, relationships, and reading lists for specific scopes. | CLAUDE.md is the primary mechanism for providing persistent context to Claude Code sessions. Auto-generating CLAUDE.md sections from process state ensures the context is always fresh and consistent with the source annotations. This applies the "code-first documentation" principle to AI context itself. | +| Cross-package views show dependencies spanning multiple packages | Cross-package queries aggregate patterns from multiple input sources and resolve cross-package relationships. | In the monorepo, patterns in `platform-core` are used by patterns in `platform-bc`, which are used by the example app. Understanding these cross-package dependencies is essential for release planning and impact analysis. Currently each package must be queried independently with separate input globs. | +| Process validation integrates with git hooks and file watching | Pre-commit hooks validate annotation consistency. Watch mode re-generates docs on source changes. | Git hooks catch annotation errors at commit time (e.g., new `uses` reference to non-existent pattern, invalid `arch-role` value, stub `@target` to non-existent directory). Watch mode enables live documentation regeneration during implementation sessions. | + +### Data API Relationship Graph + +| Rule | Invariant | Rationale | +| ------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Graph command traverses relationships recursively with configurable depth | Graph traversal walks both planning relationships (`dependsOn`, `enables`) and implementation relationships (`uses`, `usedBy`) with cycle detection to prevent infinite loops. | Flat lookups show direct connections. Recursive traversal shows the full picture: transitive dependencies, indirect consumers, and the complete chain from root to leaf. Depth limiting prevents overwhelming output on deeply connected graphs. | +| Impact analysis shows transitive dependents of a pattern | Impact analysis answers "if I change X, what else is affected?" by walking `usedBy` + `enables` recursively. | Before modifying a completed pattern (which requires unlock), understanding the blast radius prevents unintended breakage. Impact analysis is the reverse of dependency traversal -- it looks forward, not backward. | +| Path finding discovers relationship chains between two patterns | Path finding returns the shortest chain of relationships connecting two patterns, or indicates no path exists. Traversal considers all relationship types (uses, usedBy, dependsOn, enables). | Understanding how two seemingly unrelated patterns connect helps agents assess indirect dependencies before making changes. When pattern A and pattern D are connected through B and C, modifying A requires understanding that chain. | +| Graph health commands detect broken references and isolated patterns | Dangling references (pattern names in `uses`/`dependsOn` that don't match any pattern definition) are detectable. Orphan patterns (no relationships at all) are identifiable. | The MasterDataset transformer already computes dangling references during Pass 3 (relationship resolution) but does not expose them via the API. Orphan patterns indicate missing annotations. Both are data quality signals that improve over time with attention. | + +### Data API Stub Integration + +| Rule | Invariant | Rationale | +| -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| All stubs are visible to the scanner pipeline | Every stub file in `delivery-process/stubs/` has `@libar-docs` opt-in and `@libar-docs-implements` linking it to its parent pattern. | The scanner requires `@libar-docs` opt-in marker to include a file. Without it, stubs are invisible regardless of other annotations. The `@libar-docs-implements` tag creates the bidirectional link: spec defines the pattern (via `@libar-docs-pattern`), stub implements it. Per PDR-009, stubs must NOT use `@libar-docs-pattern` -- that belongs to the feature file. | +| Stubs subcommand lists design stubs with implementation status | `stubs` returns stub files with their target paths, design session origins, and whether the target file already exists. | Before implementation, agents need to know: which stubs exist for a pattern, where they should be moved to, and which have already been implemented. The stub-to-implementation resolver compares `@libar-docs-target` paths against actual files to determine status. | +| Decisions and PDR commands surface design rationale | Design decisions (AD-N items) and PDR references from stub annotations are queryable by pattern name or PDR number. | Design sessions produce numbered decisions (AD-1, AD-2, etc.) and reference PDR decision records (see PDR-012). When reviewing designs or starting implementation, agents need to find these decisions without reading every stub file manually. | + +### Fuzzy Match Tests + +| Rule | Invariant | Rationale | +| --------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Fuzzy matching uses tiered scoring | Pattern matching must use a tiered scoring system: exact match (1.0) > prefix match (0.9) > substring match (0.7) > Levenshtein distance, with results sorted by score descending and case-insensitive matching. | Tiered scoring ensures the most intuitive match wins — an exact match should always rank above a substring match, preventing surprising suggestions for common pattern names. | +| findBestMatch returns single suggestion | findBestMatch must return the single highest-scoring match above the threshold, or undefined when no match exceeds the threshold. | A single best suggestion simplifies "did you mean?" prompts in the CLI — returning multiple matches would require additional UI to disambiguate. | +| Levenshtein distance computation | The Levenshtein distance function must correctly compute edit distance between strings, returning 0 for identical strings. | Levenshtein distance is the fallback matching tier — incorrect distance computation would produce wrong fuzzy match scores for typo correction. | + +### Generate Docs Cli + +| Rule | Invariant | Rationale | +| --------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| CLI displays help and version information | The --help and -v flags must produce usage/version output and exit successfully without requiring other arguments. | Help and version are universal CLI conventions — they must work standalone so users can discover usage without reading external documentation. | +| CLI requires input patterns | The generate-docs CLI must fail with a clear error when the --input flag is not provided. | Without input source paths, the generator has nothing to scan — failing early with a clear message prevents confusing "no patterns found" errors downstream. | +| CLI lists available generators | The --list-generators flag must display all registered generator names without performing any generation. | Users need to discover available generators before specifying --generator — listing them avoids trial-and-error with invalid generator names. | +| CLI generates documentation from source files | Given valid input patterns and a generator name, the CLI must scan sources, extract patterns, and produce markdown output files. | This is the core pipeline — the CLI is the primary entry point for transforming annotated source code into generated documentation. | +| CLI rejects unknown options | Unrecognized CLI flags must cause an error with a descriptive message rather than being silently ignored. | Silent flag ignoring hides typos and misconfigurations — users typing --ouput instead of --output would get unexpected default behavior without realizing their flag was ignored. | + +### Generate Tag Taxonomy Cli + +| Rule | Invariant | Rationale | +| ----------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| CLI displays help and version information | The --help/-h and --version/-v flags must produce usage/version output and exit successfully without requiring other arguments. | Help and version are universal CLI conventions — both short and long flag forms must work for discoverability and scripting compatibility. | +| CLI generates taxonomy at specified output path | The taxonomy generator must write output to the specified path, creating parent directories if they do not exist, and defaulting to a standard path when no output is specified. | Flexible output paths support both default conventions and custom layouts — auto-creating directories prevents "ENOENT" errors on first run. | +| CLI respects overwrite flag for existing files | The CLI must refuse to overwrite existing output files unless the --overwrite or -f flag is explicitly provided. | Overwrite protection prevents accidental destruction of hand-edited taxonomy files — requiring an explicit flag makes destructive operations intentional. | +| Generated taxonomy contains expected sections | The generated taxonomy file must include category documentation and statistics sections reflecting the configured tag registry. | The taxonomy is a reference document — incomplete output missing categories or statistics would leave developers without the information they need to annotate correctly. | +| CLI warns about unknown flags | Unrecognized CLI flags must produce a warning message but allow execution to continue. | Taxonomy generation is non-destructive — warning without failing is more user-friendly than hard errors for minor flag typos, while still surfacing the issue. | + +### Handoff Generator Tests + +| Rule | Invariant | Rationale | +| ----------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Handoff generates compact session state summary | The handoff generator must produce a compact session state summary including pattern status, discovered items, inferred session type, modified files, and dependency blockers, throwing an error for unknown patterns. | Handoff documents are the bridge between multi-session work — without compact state capture, the next session starts from scratch instead of resuming where the previous one left off. | +| Formatter produces structured text output | The handoff formatter must produce structured text output with ADR-008 section markers for machine-parseable session state. | ADR-008 markers enable the context assembler to parse handoff output programmatically — unstructured text would require fragile regex parsing. | + +### Lint Patterns Cli + +| Rule | Invariant | Rationale | +| ---------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| CLI displays help and version information | The --help and -v flags must produce usage/version output and exit successfully without requiring other arguments. | Help and version are universal CLI conventions — they must work standalone so users can discover usage without reading external documentation. | +| CLI requires input patterns | The lint-patterns CLI must fail with a clear error when the --input flag is not provided. | Without input paths, the linter has nothing to validate — failing early prevents confusing "no violations" output that falsely implies clean annotations. | +| Lint passes for valid patterns | Fully annotated patterns with all required tags must pass linting with zero violations. | False positives erode developer trust in the linter — valid annotations must always pass to maintain the tool's credibility. | +| Lint detects violations in incomplete patterns | Patterns with missing or incomplete annotations must produce specific violation reports identifying what is missing. | Actionable violation messages guide developers to fix annotations — generic "lint failed" messages without specifics waste debugging time. | +| CLI supports multiple output formats | The CLI must support JSON and pretty (human-readable) output formats, with pretty as the default. | Pretty format serves interactive use while JSON format enables CI/CD pipeline integration and programmatic consumption of lint results. | +| Strict mode treats warnings as errors | When --strict is enabled, warnings must be promoted to errors causing a non-zero exit code; without --strict, warnings must not cause failure. | CI pipelines need strict enforcement while local development benefits from lenient mode — the flag lets teams choose their enforcement level. | + +### Lint Process Cli + +| Rule | Invariant | Rationale | +| ------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| CLI displays help and version information | The --help/-h and --version/-v flags must produce usage/version output and exit successfully without requiring other arguments. | Help and version are universal CLI conventions — both short and long flag forms must work for discoverability and scripting compatibility. | +| CLI requires git repository for validation | The lint-process CLI must fail with a clear error when run outside a git repository in both staged and all modes. | Process guard validation depends on git diff for change detection — running without git produces undefined behavior rather than useful validation results. | +| CLI validates file mode input | In file mode, the CLI must require at least one file path via positional argument or --file flag, and fail with a clear error when none is provided. | File mode is for targeted validation of specific files — accepting zero files would silently produce a "no violations" result that falsely implies the files are valid. | +| CLI handles no changes gracefully | When no relevant changes are detected (empty diff), the CLI must exit successfully with a zero exit code. | No changes means no violations are possible — failing on empty diffs would break CI pipelines on commits that only modify non-spec files. | +| CLI supports multiple output formats | The CLI must support JSON and pretty (human-readable) output formats, with pretty as the default. | Pretty format serves interactive pre-commit use while JSON format enables CI/CD pipeline integration and automated violation processing. | +| CLI supports debug options | The --show-state flag must display the derived process state (FSM states, protection levels, deliverables) without affecting validation behavior. | Process guard decisions are derived from complex state — exposing the intermediate state helps developers understand why a specific validation passed or failed. | +| CLI warns about unknown flags | Unrecognized CLI flags must produce a warning message but allow execution to continue. | Process validation is critical-path at commit time — hard-failing on a typo in an optional flag would block commits unnecessarily when the core validation would succeed. | + +### Output Pipeline Tests + +| Rule | Invariant | Rationale | +| ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Output modifiers apply with correct precedence | Output modifiers (count, names-only, fields, full) must apply to pattern arrays with correct precedence, passing scalar inputs through unchanged, with summaries as the default mode. | Predictable modifier behavior enables composable CLI queries — unexpected precedence or scalar handling would produce confusing output for piped commands. | +| Modifier conflicts are rejected | Mutually exclusive modifier combinations (full+names-only, full+count, full+fields) and invalid field names must be rejected with clear error messages. | Conflicting modifiers produce ambiguous intent — rejecting early with a clear message is better than silently picking one modifier and ignoring the other. | +| List filters compose via AND logic | Multiple list filters (status, category) must compose via AND logic, with pagination (limit/offset) applied after filtering and empty results for out-of-range offsets. | AND composition is the intuitive default for filters — "status=active AND category=core" should narrow results, not widen them via OR logic. | +| Empty stripping removes noise | Null and empty values must be stripped from output objects to reduce noise in API responses. | Empty fields in pattern summaries create visual clutter and waste tokens in AI context windows — stripping them keeps output focused on meaningful data. | + +### Pattern Helpers Tests + +| Rule | Invariant | Rationale | +| -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| getPatternName uses patternName tag when available | getPatternName must return the patternName tag value when set, falling back to the pattern's name field when the tag is absent. | The patternName tag allows human-friendly display names — without the fallback, patterns missing the tag would display as undefined. | +| findPatternByName performs case-insensitive matching | findPatternByName must match pattern names case-insensitively, returning undefined when no match exists. | Case-insensitive matching prevents frustrating "not found" errors when developers type "processguard" instead of "ProcessGuard" — both clearly refer to the same pattern. | +| getRelationships looks up with case-insensitive fallback | getRelationships must first try exact key lookup in the relationship index, then fall back to case-insensitive matching, returning undefined when no match exists. | Exact-first with case-insensitive fallback balances performance (O(1) exact lookup) with usability (tolerates case mismatches in cross-references). | +| suggestPattern provides fuzzy suggestions | suggestPattern must return fuzzy match suggestions for close pattern names, returning empty results when no close match exists. | Fuzzy suggestions power "did you mean?" UX in the CLI — without them, typos produce unhelpful "pattern not found" messages. | + +### Pattern Summarize Tests + +| Rule | Invariant | Rationale | +| -------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| summarizePattern projects to compact summary | summarizePattern must project a full pattern object to a compact summary containing exactly 6 fields, using the patternName tag over the name field when available and omitting undefined optional fields. | Compact summaries reduce token usage by 80-90% compared to full patterns — they provide enough context for navigation without overwhelming AI context windows. | +| summarizePatterns batch processes arrays | summarizePatterns must batch-process an array of patterns, returning a correctly-sized array of compact summaries. | Batch processing avoids N individual function calls — the API frequently needs to summarize all patterns matching a query in a single operation. | + +### PDR 001 Session Workflow Commands + +| Rule | Invariant | Rationale | +| ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| DD-1 - Text output with section markers | scope-validate and handoff must return plain text with === SECTION === markers, never JSON. | Inconsistent output formats force consumers to detect and branch on format type, breaking the dual output path contract. Both scope-validate and handoff return string from the router, using === SECTION === markers. Follows the dual output path where text commands bypass JSON.stringify. | +| DD-2 - Git integration is opt-in via --git flag | Domain logic must never invoke shell commands or depend on git directly. | Shell dependencies in domain logic make functions untestable without git fixtures and break deterministic behavior. The handoff command accepts an optional --git flag. The CLI handler calls git diff and passes file list to the pure generator function. No shell dependency in domain logic. | +| DD-3 - Session type inferred from FSM status | Every FSM status must map to exactly one default session type, overridable by an explicit --session flag. | Ambiguous or missing inference forces users to always specify --session manually, defeating the ergonomic benefit of status-based defaults. Handoff infers session type from pattern's current FSM status. An explicit --session flag overrides inference. | +| DD-4 - Severity levels match Process Guard model | Scope validation must use exactly three severity levels (PASS, BLOCKED, WARN) consistent with Process Guard. | Divergent severity models cause confusion when the same violation appears in both systems with different severity classifications. Scope validation uses three severity levels: The --strict flag promotes WARN to BLOCKED. | +| DD-5 - Current date only for handoff | Handoff must always use the current system date with no override mechanism. | A --date flag enables backdating handoff timestamps, which breaks audit trail integrity for multi-session work. Handoff always uses the current date. No --date flag. | +| DD-6 - Both positional and flag forms for scope type | scope-validate must accept scope type as both a positional argument and a --type flag. | Supporting only one form creates inconsistency with CLI conventions and forces users to remember which form each subcommand uses. scope-validate accepts scope type as both positional argument and --type flag. | +| DD-7 - Co-located formatter functions | Each module must export both its data builder and text formatter as co-located functions. | Splitting builder and formatter across files increases coupling surface and makes it harder to trace data flow through the module. Each module (scope-validator.ts, handoff-generator.ts) exports both the data builder and the text formatter. Simpler than the context-assembler/context-formatter split. | + +### Process Api Cli Core + +| Rule | Invariant | Rationale | +| ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| CLI displays help and version information | The CLI must always provide discoverable usage and version information via standard flags. | Without accessible help and version output, users cannot self-serve CLI usage or report issues with a specific version. | +| CLI requires input flag for subcommands | Every data-querying subcommand must receive an explicit `--input` glob specifying the source files to scan. | Without an input source, the pipeline has no files to scan and would produce empty or misleading results instead of a clear error. | +| CLI status subcommand shows delivery state | The status subcommand must return structured JSON containing delivery progress derived from the MasterDataset. | Consumers depend on machine-readable status output for scripting and CI integration; unstructured output breaks downstream automation. | +| CLI query subcommand executes API methods | The query subcommand must dispatch to any public Data API method by name and pass positional arguments through. | The CLI is the primary interface for ad-hoc queries; failing to resolve a valid method name or its arguments silently drops the user's request. | +| CLI pattern subcommand shows pattern detail | The pattern subcommand must return the full JSON detail for an exact pattern name match, or a clear error if not found. | Pattern lookup is the primary debugging tool for annotation issues; ambiguous or silent failures waste investigation time. | +| CLI arch subcommand queries architecture | The arch subcommand must expose role, bounded context, and layer queries over the MasterDataset's architecture metadata. | Architecture queries replace manual exploration of annotated sources; missing or incorrect results lead to wrong structural assumptions during design sessions. | +| CLI shows errors for missing subcommand arguments | Subcommands that require arguments must reject invocations with missing arguments and display usage guidance. | Silent acceptance of incomplete input would produce confusing pipeline errors instead of actionable feedback at the CLI boundary. | +| CLI handles argument edge cases | The CLI must gracefully handle non-standard argument forms including numeric coercion and the `--` pnpm separator. | Real-world invocations via pnpm pass `--` separators and numeric strings; mishandling these causes silent data loss or crashes in automated workflows. | + +### Process Api Cli Modifiers And Rules + +| Rule | Invariant | Rationale | +| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Output modifiers work when placed after the subcommand | Output modifiers (--count, --names-only, --fields) produce identical results regardless of position relative to the subcommand and its filters. | Users should not need to memorize argument ordering rules; the CLI should be forgiving. | +| CLI arch health subcommands detect graph quality issues | Health subcommands (dangling, orphans, blocking) operate on the relationship index, not the architecture index, and return results without requiring arch annotations. | Graph quality issues (broken references, isolated patterns, blocked dependencies) are relationship-level concerns that should be queryable even when no architecture metadata exists. | +| CLI rules subcommand queries business rules and invariants | The rules subcommand returns structured business rules extracted from Gherkin Rule: blocks, grouped by product area and phase, with parsed invariant and rationale annotations. | Live business rule queries replace static generated markdown, enabling on-demand filtering by product area, pattern, and invariant presence. | + +### Process Api Cli Subcommands + +| Rule | Invariant | Rationale | +| -------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| CLI list subcommand filters patterns | The list subcommand must return a valid JSON result for valid filters and a non-zero exit code with a descriptive error for invalid filters. | Consumers parse list output programmatically; malformed JSON or silent failures cause downstream tooling to break without diagnosis. | +| CLI search subcommand finds patterns by fuzzy match | The search subcommand must require a query argument and return only patterns whose names match the query. | Missing query validation would produce unfiltered result sets, defeating the purpose of search and wasting context budget in AI sessions. | +| CLI context assembly subcommands return text output | Context assembly subcommands (context, overview, dep-tree) must produce non-empty human-readable text containing the requested pattern or summary, and require a pattern argument where applicable. | These subcommands replace manual file reads in AI sessions; empty or off-target output forces expensive explore-agent fallbacks that consume 5-10x more context. | +| CLI tags and sources subcommands return JSON | The tags and sources subcommands must return valid JSON with the expected top-level structure (data key for tags, array for sources). | Annotation exploration depends on machine-parseable output; invalid JSON prevents automated enrichment workflows from detecting unannotated files and tag gaps. | +| CLI extended arch subcommands query architecture relationships | Extended arch subcommands (neighborhood, compare, coverage) must return valid JSON reflecting the actual architecture relationships present in the scanned sources. | Architecture queries drive design-session decisions; stale or structurally invalid output leads to incorrect dependency analysis and missed coupling between bounded contexts. | +| CLI unannotated subcommand finds files without annotations | The unannotated subcommand must return valid JSON listing every TypeScript file that lacks the `@libar-docs` opt-in marker. | Files missing the opt-in marker are invisible to the scanner; without this subcommand, unannotated files silently drop out of generated documentation and validation. | + +### Process API Layered Extraction + +| Rule | Invariant | Rationale | +| ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| CLI file contains only routing, no domain logic | `process-api.ts` parses arguments, calls the pipeline factory for the MasterDataset, routes subcommands to API modules, and formats output. It does not build Maps, filter patterns, group data, or resolve relationships. Thin view projections (3-5 line `.map()` calls over pre-computed archIndex views) are acceptable as formatting. | Domain logic in the CLI file is only accessible via the command line. Extracting it to `src/api/` makes it programmatically testable, reusable by future consumers (MCP server, watch mode), and aligned with the feature-consumption layer defined in ADR-006. | +| Pipeline factory is shared across CLI consumers | The scan-extract-transform sequence is defined once in `src/generators/pipeline/build-pipeline.ts`. CLI consumers that need a MasterDataset call the factory rather than wiring the pipeline independently. The factory accepts `mergeConflictStrategy` to handle behavioral differences between consumers. | Three consumers (process-api, validate-patterns, orchestrator) independently wire the same 8-step sequence: loadConfig, scanPatterns, extractPatterns, scanGherkinFiles, extractPatternsFromGherkin, mergePatterns, computeHierarchyChildren, transformToMasterDataset. The only semantic difference is merge-conflict handling (fatal vs concatenate). This is a Parallel Pipeline anti-pattern per ADR-006. | +| Domain logic lives in API modules | Query logic that operates on MasterDataset lives in `src/api/` modules. The `rules-query.ts` module provides business rules querying with the same grouping logic that was inline in handleRules: filter by product area and pattern, group by area -> phase -> feature -> rules, parse annotations, compute totals. | `handleRules` is 184 lines with 5 Map/Set constructions, codec-layer imports (`parseBusinessRuleAnnotations`, `deduplicateScenarioNames`), and a complex 3-level grouping algorithm. This is the last significant inline domain logic in process-api.ts. Moving it to `src/api/` follows the same pattern as the 12 existing API modules (context-assembler, arch-queries, scope-validator, etc.). | +| Pipeline factory returns Result for consumer-owned error handling | The factory returns `Result` rather than throwing or calling `process.exit()`. Each consumer maps the error to its own strategy: process-api.ts calls `process.exit(1)`, validate-patterns.ts throws, and orchestrator.ts (future) returns `Result.err()`. | The current `buildPipeline()` in process-api.ts calls `process.exit(1)` on errors, making it non-reusable. The factory must work across consumers with different error handling models. The Result monad is the project's established pattern for this (see `src/types/result.ts`). | +| End-to-end verification confirms behavioral equivalence | After extraction, all CLI commands produce identical output to pre-refactor behavior with zero build, test, lint, and validation errors. | The refactor must not change observable behavior. Full CLI verification confirms the extraction is a pure refactor. | + +### Process State API CLI + +| Rule | Invariant | Rationale | +| ----------------------------------------- | ---------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| CLI supports status-based pattern queries | Every ProcessStateAPI status query method is accessible via CLI. | The most common planning question is "what's the current state?" Status queries (active, roadmap, completed) answer this directly without reading docs. Without CLI access, Claude Code must regenerate markdown and parse unstructured text. | +| CLI supports phase-based queries | Patterns can be filtered by phase number. | Phase 18 (Event Durability) is the current focus per roadmap priorities. Quick phase queries help assess progress and remaining work within a phase. Phase-based planning is the primary organization method for roadmap work. | +| CLI provides progress summary queries | Overall and per-phase progress is queryable in a single command. | Planning sessions need quick answers to "where are we?" without reading the full PATTERNS.md generated file. Progress metrics drive prioritization and help identify where to focus effort. | +| CLI supports multiple output formats | JSON output is parseable by AI agents without transformation. | Claude Code can parse JSON directly. Text format is for human reading. JSON format enables scripting and integration with other tools. The primary use case is AI agent parsing where structured output reduces context and errors. | +| CLI supports individual pattern lookup | Any pattern can be queried by name with full details. | During implementation, Claude Code needs to check specific pattern status, deliverables, and dependencies without reading the full spec file. Pattern lookup is essential for focused implementation work. | +| CLI provides discoverable help | All flags are documented via --help with examples. | Claude Code can read --help output to understand available queries without needing external documentation. Self-documenting CLIs reduce the need for Claude Code to read additional context files. | + +### Process State API Relationship Queries + +| Rule | Invariant | Rationale | +| ------------------------------------------------ | ----------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| API provides implementation relationship queries | Every pattern with `implementedBy` entries is discoverable via the API. | Claude Code needs to navigate from abstract patterns to concrete code. Without this, exploration requires manual grep + file reading, wasting context tokens. | +| API provides inheritance hierarchy queries | Pattern inheritance chains are fully navigable in both directions. | Patterns form specialization hierarchies (e.g., ReactiveProjections extends ProjectionCategories). Claude Code needs to understand what specializes a base pattern and what a specialized pattern inherits from. | +| API provides combined relationship views | All relationship types are accessible through a unified interface. | Claude Code often needs the complete picture: dependencies AND implementations AND inheritance. A single call reduces round-trips and context switching. | +| API supports bidirectional traceability queries | Navigation from spec to code and code to spec is symmetric. | Traceability is bidirectional by definition. If a spec links to code, the code should link back to the spec. The API should surface broken links. | + +### Process State API Testing + +| Rule | Invariant | Rationale | +| ---------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | +| Status queries return correct patterns | Status queries must correctly filter by both normalized status (planned = roadmap + deferred) and FSM status (exact match). | The two-domain status convention requires separate query methods — mixing them produces incorrect filtered results. | +| Phase queries return correct phase data | Phase queries must return only patterns in the requested phase, with accurate progress counts and completion percentage. | Phase-level queries power the roadmap and session planning views — incorrect counts cascade into wrong progress percentages. | +| FSM queries expose transition validation | FSM queries must validate transitions against the PDR-005 state machine and expose protection levels per status. | Programmatic FSM access enables tooling to enforce delivery process rules without reimplementing the state machine. | +| Pattern queries find and retrieve pattern data | Pattern lookup must be case-insensitive by name, and category queries must return only patterns with the requested category. | Case-insensitive search reduces friction in CLI and AI agent usage where exact casing is often unknown. | +| Timeline queries group patterns by time | Quarter queries must correctly filter by quarter string, and recently completed must be sorted by date descending with limit. | Timeline grouping enables quarterly reporting and session context — recent completions show delivery momentum. | + +### Scope Validator Tests + +| Rule | Invariant | Rationale | +| -------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Implementation scope validation checks all prerequisites | Implementation scope validation must check FSM transition validity, dependency completeness, PDR references, and deliverable presence, with strict mode promoting warnings to blockers. | Starting implementation without passing scope validation wastes an entire session — the validator catches all known blockers before any code is written. | +| Design scope validation checks dependency stubs | Design scope validation must verify that dependencies have corresponding code stubs, producing warnings when stubs are missing. | Design sessions that reference unstubbed dependencies cannot produce actionable interfaces — stub presence indicates the dependency's API surface is at least sketched. | +| Formatter produces structured text output | The scope validator formatter must produce structured text with ADR-008 markers, showing verdict text for warnings and blocker details for blocked verdicts. | Structured formatter output enables the CLI to display verdicts consistently — unstructured output would vary by validation type and be hard to parse. | + +### Stub Resolver Tests + +| Rule | Invariant | Rationale | +| ----------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| Stubs are identified by path or target metadata | A pattern must be identified as a stub if it resides in the stubs directory OR has a targetPath metadata field. | Dual identification supports both convention-based (directory) and metadata-based (targetPath) stub detection — relying on only one would miss stubs organized differently. | +| Stubs are resolved against the filesystem | Resolved stubs must show whether their target file exists on the filesystem and must be grouped by the pattern they implement. | Target existence status tells developers whether a stub has been implemented — grouping by pattern enables the "stubs --unresolved" command to show per-pattern implementation gaps. | +| Decision items are extracted from descriptions | AD-N formatted items must be extracted from pattern description text, with empty descriptions returning no items and malformed items being skipped. | Decision items (AD-1, AD-2, etc.) link stubs to architectural decisions — extracting them enables traceability from code stubs back to the design rationale. | +| PDR references are found across patterns | The resolver must find all patterns that reference a given PDR identifier, returning empty results when no references exist. | PDR cross-referencing enables impact analysis — knowing which patterns reference a decision helps assess the blast radius of changing that decision. | + +### Stub Taxonomy Tag Tests + +| Rule | Invariant | Rationale | +| -------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Taxonomy tags are registered in the registry | The target and since stub metadata tags must be registered in the tag registry as recognized taxonomy entries. | Unregistered tags would be flagged as unknown by the linter — registration ensures stub metadata tags pass validation alongside standard annotation tags. | +| Tags are part of the stub metadata group | The target and since tags must be grouped under the stub metadata domain in the built registry. | Domain grouping enables the taxonomy codec to render stub metadata tags in their own section — ungrouped tags would be lost in the "Other" category. | + +### Validate Patterns Cli + +| Rule | Invariant | Rationale | +| ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| CLI displays help and version information | The --help/-h and --version/-v flags must produce usage/version output and exit successfully without requiring other arguments. | Help and version are universal CLI conventions — both short and long flag forms must work for discoverability and scripting compatibility. | +| CLI requires input and feature patterns | The validate-patterns CLI must fail with clear errors when either --input or --features flags are missing. | Cross-source validation requires both TypeScript and Gherkin inputs — running with only one source would produce incomplete validation that misses cross-source mismatches. | +| CLI validates patterns across TypeScript and Gherkin sources | The validator must detect mismatches between TypeScript and Gherkin sources including phase and status discrepancies. | Dual-source architecture requires consistency — a pattern with status "active" in TypeScript but "roadmap" in Gherkin creates conflicting truth and broken reports. | +| CLI supports multiple output formats | The CLI must support JSON and pretty (human-readable) output formats, with pretty as the default. | Pretty format serves interactive use while JSON format enables CI/CD pipeline integration and programmatic consumption of validation results. | +| Strict mode treats warnings as errors | When --strict is enabled, warnings must be promoted to errors causing a non-zero exit code (exit 2); without --strict, warnings must not cause failure. | CI pipelines need strict enforcement while local development benefits from lenient mode — the flag lets teams choose their enforcement level. | +| CLI warns about unknown flags | Unrecognized CLI flags must produce a warning message but allow execution to continue. | Pattern validation is non-destructive — warning without failing is more user-friendly than hard errors for minor flag typos, while still surfacing the issue. | --- diff --git a/docs-live/product-areas/GENERATION.md b/docs-live/product-areas/GENERATION.md index b9cb5c45..ee55d5fc 100644 --- a/docs-live/product-areas/GENERATION.md +++ b/docs-live/product-areas/GENERATION.md @@ -24,8 +24,8 @@ graph TB subgraph generator["Generator"] SourceMapper[/"SourceMapper"/] Documentation_Generation_Orchestrator("Documentation Generation Orchestrator") - DecisionDocGenerator("DecisionDocGenerator") TransformDataset("TransformDataset") + DecisionDocGenerator("DecisionDocGenerator") end subgraph renderer["Renderer"] PatternsCodec[("PatternsCodec")] @@ -48,10 +48,10 @@ graph TB PatternsCodec ..->|implements| PatternRelationshipModel CompositeCodec ..->|implements| ReferenceDocShowcase ArchitectureCodec -->|uses| MasterDataset - DecisionDocGenerator -.->|depends on| DecisionDocCodec - DecisionDocGenerator -.->|depends on| SourceMapper TransformDataset -->|uses| MasterDataset TransformDataset ..->|implements| PatternRelationshipModel + DecisionDocGenerator -.->|depends on| DecisionDocCodec + DecisionDocGenerator -.->|depends on| SourceMapper classDef neighbor stroke-dasharray: 5 5 ``` @@ -229,7466 +229,712 @@ function transformToMasterDataset(raw: RawDataset): RuntimeMasterDataset; --- -## Behavior Specifications - -### MergePatterns - -[View MergePatterns source](src/generators/pipeline/merge-patterns.ts) - -## MergePatterns - Dual-Source Pattern Merging - -Merges patterns from TypeScript and Gherkin sources with conflict detection. -Each pattern name must be unique across both sources. - -Target: src/generators/pipeline/merge-patterns.ts -See: DD-2 (OrchestratorPipelineFactoryMigration) - -### UniversalDocGeneratorRobustness - -[View UniversalDocGeneratorRobustness source](delivery-process/specs/universal-doc-generator-robustness.feature) - -This feature transforms the PoC document generator into a production-ready -universal generator capable of operating at monorepo scale (~210 manual docs -to be replaced across the convex-event-sourcing repository). - -**GitHub Issue:** libar-ai/convex-event-sourcing#134 - -
-Context - PoC limitations prevent monorepo-scale operation - -#### Context - PoC limitations prevent monorepo-scale operation - -**The Problem:** - - The DecisionDocGenerator PoC (Phase 27) successfully demonstrated code-first - documentation generation, but has reliability issues that prevent scaling: - - **Why Fix Before Adding Features:** - - The monorepo has 210 manually maintained docs. Before adding ADR generation - (33 files), guide generation (6 files), or glossary extraction, the foundation - must be reliable. A bug at the source mapper level corrupts ALL generated docs. - - **Target State:** - -| Issue | Impact | Example | -| ------------------- | ---------------- | ---------------------------------------- | -| Content duplication | Confusing output | "Protection Levels" appears twice | -| No validation | Silent failures | Missing files produce empty sections | -| Scattered warnings | Hard to debug | console.warn in source-mapper.ts:149,339 | -| No file validation | Runtime errors | Invalid paths crash extraction | - -| Metric | Current | Target | -| ---------------------- | ------------ | -------------------------- | -| Duplicate sections | Common | Zero (fingerprint dedup) | -| Invalid mapping errors | Silent | Explicit validation errors | -| Warning visibility | console.warn | Structured Result warnings | -| File validation | None | Pre-flight existence check | - -
- -
-Decision - Robustness requires four coordinated improvements - -#### Decision - Robustness requires four coordinated improvements - -**Architecture:** - - **Deliverable Ownership:** - -| Deliverable | Module | Responsibility | -| --------------------- | ------------------------------------------ | ------------------------- | -| Content Deduplication | src/generators/content-deduplicator.ts | Remove duplicate sections | -| Validation Layer | src/generators/source-mapping-validator.ts | Pre-flight checks | -| Warning Collector | src/generators/warning-collector.ts | Unified warning handling | -| File Validation | Integrated into validator | Existence + readability | - -```text -Source Mapping Table - │ - ▼ - ┌─────────────────────────────┐ - │ Validation Layer (NEW) │ ◄── Pre-flight checks - │ - File existence │ - │ - Method validity │ - │ - Format validation │ - └─────────────────────────────┘ - │ - ▼ - ┌─────────────────────────────┐ - │ Source Mapper │ - │ - Warning collector (NEW) │ ◄── Structured warnings - │ - Extraction dispatch │ - └─────────────────────────────┘ - │ - ▼ - ┌─────────────────────────────┐ - │ Content Assembly │ - │ - Deduplication (NEW) │ ◄── Fingerprint-based - │ - Section ordering │ - └─────────────────────────────┘ - │ - ▼ - ┌─────────────────────────────┐ - │ RenderableDocument │ - └─────────────────────────────┘ -``` - -
- -
-Duplicate content must be detected and merged (2 scenarios) - -#### Duplicate content must be detected and merged - -Content fingerprinting identifies duplicate sections extracted from multiple -sources. When duplicates are found, the system merges them intelligently -based on source priority. - -**Verified by:** - -- Identical sections are deduplicated -- Similar but non-identical sections are preserved - -
- -
-Invalid source mappings must fail fast with clear errors (4 scenarios) - -#### Invalid source mappings must fail fast with clear errors - -Pre-flight validation catches configuration errors before extraction begins. -This prevents silent failures and provides actionable error messages. - -**Verified by:** - -- Valid source mapping passes validation -- Missing file produces validation error -- Invalid extraction method produces validation error -- Unreadable file produces validation error - -
- -
-Warnings must be collected and reported consistently (3 scenarios) - -#### Warnings must be collected and reported consistently - -The warning collector replaces scattered console.warn calls with a -structured system that aggregates warnings and reports them consistently. - -**Verified by:** - -- Warnings are collected during extraction -- Multiple warnings from different sources are aggregated -- Warnings are included in Result type - -
- -
-Consequence - Improved reliability at cost of stricter validation - -#### Consequence - Improved reliability at cost of stricter validation - -**Positive:** - - - Duplicate content eliminated from generated docs - - Configuration errors caught before extraction - - Debugging simplified with structured warnings - - Ready for monorepo-scale operation - - **Negative:** - - - Existing source mappings may need updates to pass validation - - Strict validation may require more upfront configuration - - Additional processing overhead for deduplication - - **Migration:** - - Existing decision documents using the PoC generator may need updates: - 1. Run validation in dry-run mode to identify issues - 2. Fix file paths and extraction methods - 3. Re-run generation with new robustness checks - -
- -### TraceabilityGenerator - -[View TraceabilityGenerator source](delivery-process/specs/traceability-generator.feature) - -**Business Value:** Provide audit-ready traceability matrices that demonstrate -test coverage for business rules without manual documentation. - -**How It Works:** - -- Parse `**Verified by:**` annotations in Rule descriptions -- Match scenario names to actual scenarios in feature files -- Generate traceability matrix showing Rule → Scenario mappings -- Report coverage gaps (rules without scenarios, orphan scenarios) - -**Why It Matters:** -| Benefit | How | -| Audit compliance | Demonstrates which tests verify which business rules | -| Coverage visibility | Identifies rules without verification scenarios | -| Orphan detection | Finds scenarios not linked to any rule | -| Impact analysis | Shows which scenarios to run when a rule changes | - -
-Parses Verified by annotations to extract scenario references (2 scenarios) - -#### Parses Verified by annotations to extract scenario references - -**Invariant:** Scenario names in `**Verified by:**` are matched against actual scenarios in feature files. Unmatched references are reported as warnings. - -**Rationale:** Verified by annotations create explicit traceability. Validating references ensures the traceability matrix reflects actual test coverage. - -**Verified by:** - -- Parses comma-separated scenario list -- Reports unmatched scenario references -- Parses comma-separated scenarios -- Reports unmatched references - -
- -
-Generates Rule-to-Scenario traceability matrix (3 scenarios) - -#### Generates Rule-to-Scenario traceability matrix - -**Invariant:** Every Rule appears in the matrix with its verification status. Scenarios are linked by name and file location. - -**Rationale:** A matrix format enables quick scanning of coverage status and supports audit requirements for bidirectional traceability. - -**Verified by:** - -- Matrix includes all rules from feature files -- Matrix shows verification status with scenario count -- Matrix marks unverified rules -- Matrix includes all rules -- Matrix shows verification status - -
- -
-Detects and reports coverage gaps (2 scenarios) - -#### Detects and reports coverage gaps - -**Invariant:** Orphan scenarios (not referenced by any Rule) and unverified rules are listed in dedicated sections. - -**Rationale:** Coverage gaps indicate either missing traceability annotations or actual missing test coverage. Surfacing them enables remediation. - -**Verified by:** - -- Reports orphan scenarios not linked to any rule -- Reports unverified rules -- Reports orphan scenarios - -
- -
-Supports filtering by phase and domain (2 scenarios) - -#### Supports filtering by phase and domain - -**Invariant:** CLI flags allow filtering the matrix by phase number or domain category to generate focused traceability reports. - -**Rationale:** Large codebases have many rules. Filtering enables relevant subset extraction for specific audits or reviews. - -**Verified by:** - -- Filters matrix by phase -- Filters matrix by domain category -- Filters by phase -- Filters by domain - -
- -### TraceabilityEnhancements - -[View TraceabilityEnhancements source](delivery-process/specs/traceability-enhancements.feature) - -**Problem:** -Current TRACEABILITY.md shows 15% coverage (timeline → behavior). -No visibility into patterns without scenarios. -No detection of orphaned scenarios referencing non-existent patterns. - -**Solution:** -Enhance traceability generator to show: - -- Pattern coverage matrix (scenarios per pattern) -- Orphaned scenarios report (scenarios without matching patterns) -- Patterns missing acceptance criteria -- Coverage gap trends over time - -Implements Convergence Opportunity 4: Requirements ↔ Tests Traceability. - -Existing: docs-living/TRACEABILITY.md - -### ScopedArchitecturalView - -[View ScopedArchitecturalView source](delivery-process/specs/scoped-architectural-view.feature) - -**Problem:** -Full architecture diagrams show every annotated pattern in the project. For focused -use cases -- design session context, PR descriptions, CLAUDE.md module sections -- -developers need views scoped to a small set of relevant patterns with their immediate -neighbors. Manually curating diagram content defeats the code-first principle. - -**Solution:** -A `DiagramScope` filter interface that selects patterns by three dimensions -(`archContext`, `archView`, or explicit pattern names), automatically discovers -neighbor patterns via relationship edges, and renders scoped Mermaid diagrams -with subgraph grouping and distinct neighbor styling. - -The `arch-view` tag enables patterns to declare membership in named architectural -views (e.g., `codec-transformation`, `pipeline-stages`). A single pattern can -belong to multiple views. The transformer groups patterns by view in the -`ArchIndex.byView` pre-computed index for O(1) access at render time. - -**Why It Matters:** -| Benefit | How | -| Focused context for AI sessions | Select 3-5 patterns instead of 50+ | -| Automatic neighbor discovery | Related patterns appear without explicit listing | -| Multiple views per pattern | One annotation, many documents | -| Two detail levels from one config | Detailed (with diagram) and summary (table only) | -| Reusable across document types | PR descriptions, CLAUDE.md, design context | - -
-Scope filtering selects patterns by context, view, or name (3 scenarios) - -#### Scope filtering selects patterns by context, view, or name - -**Invariant:** A pattern matches a DiagramScope if ANY of three conditions hold: its name is in `scope.patterns`, its `archContext` is in `scope.archContext`, or any of its `archView` entries is in `scope.archView`. These dimensions are OR'd together -- a pattern need only match one. - -**Rationale:** Three filter dimensions cover different authoring workflows. Explicit names for ad-hoc documents, archContext for bounded context views, archView for cross-cutting architectural perspectives. - -**Verified by:** - -- archContext filter matches patterns in that context -- archView filter matches patterns with that view -- Multiple filter dimensions OR together -- archContext filter matches patterns -- archView filter matches patterns -- combined filters OR together - -
- -
-Neighbor discovery finds connected patterns outside scope (2 scenarios) - -#### Neighbor discovery finds connected patterns outside scope - -**Invariant:** Patterns connected to scope patterns via relationship edges (uses, dependsOn, implementsPatterns, extendsPattern) but NOT themselves in scope appear in a "Related" subgraph with dashed border styling. - -**Rationale:** Scoped views need context. Showing only in-scope patterns without their dependencies loses critical relationship information. Neighbor patterns provide this context without cluttering the main view. - -**Verified by:** - -- Neighbor patterns appear with dashed styling -- Self-contained scope produces no neighbor subgraph -- Neighbor patterns appear in diagram -- Self-contained scope has no neighbors - -
- -
-Multiple diagram scopes compose in sequence (3 scenarios) - -#### Multiple diagram scopes compose in sequence - -**Invariant:** When `diagramScopes` is an array, each scope produces its own Mermaid diagram section with independent title, direction, and pattern selection. At summary detail level, all diagrams are suppressed. - -**Rationale:** A single reference document may need multiple architectural perspectives. Pipeline Overview shows both a codec transformation view (TB) and a pipeline data flow view (LR) in the same document. - -**Verified by:** - -- Two diagram scopes produce two mermaid blocks -- Direction controls diagram orientation -- Summary detail level omits all diagrams -- Two scopes produce two mermaid blocks -- Summary level omits diagrams - -
- -### ReferenceDocShowcase - -[View ReferenceDocShowcase source](delivery-process/specs/reference-doc-showcase.feature) - -**Problem:** -The Reference Generation Sample document exercises a small fraction of the -reference codec's capabilities: 2 convention rules, 1 flowchart diagram, -2 shapes from a single file, and 1 shallow behavior pattern. Of the 9 -renderable block types (heading, paragraph, separator, table, list, code, -mermaid, collapsible, link-out), only 6 are used. Behavior rendering truncates -rule descriptions to 120 characters, discarding invariants, rationale, and -verified-by content that is already extracted. Shape rendering omits JSDoc -prose at standard detail level. Diagrams support only flowcharts with no -edge labels, layer filtering, or alternative diagram types. The extraction -pipeline drops function signatures, param/returns/throws documentation, and -full property-level JSDoc. - -**Solution:** -Expand the reference sample into a comprehensive showcase that exercises every -content block type across all three detail levels. This requires three tiers -of work: codec rendering enhancements (deep behavior, full shapes, rich -diagrams), extraction pipeline improvements (function signatures, param docs, -auto-shape discovery), and infrastructure enablers (codec composition, -AI-optimized rendering, data-driven tag extraction). - -The sample document serves as the integration test: if REFERENCE-SAMPLE.md -renders every block type correctly at every detail level, the codec system -works end-to-end. - -**Why It Matters:** -| Benefit | How | -| Integration validation | Single document tests all 9 renderable block types | -| Deep behavior content | Full rule descriptions with invariant/rationale replace 120-char truncation | -| Complete shape documentation | JSDoc prose at standard level, property tables at detailed | -| Rich diagram vocabulary | Sequence, state, C4, and class diagrams alongside flowcharts | -| Progressive disclosure | Collapsible sections for large content blocks | -| Complete API surface | Function signatures and param docs without source navigation | -| Token-efficient AI context | Dedicated renderer for LLM consumption | -| Flexible composition | CompositeCodec assembles docs from multiple codec outputs | - -
-Deep behavior rendering replaces shallow truncation (3 scenarios) - -#### Deep behavior rendering replaces shallow truncation - -**Invariant:** At standard and detailed levels, behavior sections render full rule descriptions with parsed invariant, rationale, and verified-by content. At summary level, the 120-character truncation is preserved for compact output. Behavior rendering reuses parseBusinessRuleAnnotations from the convention extractor rather than reimplementing structured content parsing. - -**Rationale:** The current 120-character truncation discards invariants, rationale, and verified-by content that is already extracted and available in BusinessRule.description. Reference documents need the full rule content to serve as authoritative documentation. The convention extractor already parses this structured content via parseBusinessRuleAnnotations -- the behavior builder should delegate to the same function. - -**Verified by:** - -- Detailed level renders full rule descriptions with structured content -- Summary level preserves compact truncation -- Standard level renders full descriptions without rationale -- Full rule descriptions at detailed level -- Truncated descriptions at summary level -- Scenario names appear as list blocks under rules - -
- -
-Shape sections include JSDoc prose and property documentation (3 scenarios) - -#### Shape sections include JSDoc prose and property documentation - -**Invariant:** At standard level, shape code blocks are preceded by JSDoc prose when available. At detailed level, interface shapes additionally render a property documentation table. At summary level, only the type-kind table appears. Shapes without JSDoc render code blocks without preceding paragraph. - -**Rationale:** JSDoc on shapes contains design rationale and usage guidance that is already extracted by the shape extractor. Gating it behind detailed level wastes the data at the most common detail level (standard). The fix is a single condition change: reference.ts line 342 from detailLevel === 'detailed' to detailLevel !== 'summary'. - -**Verified by:** - -- Standard level includes JSDoc prose above code blocks -- Detailed level adds property documentation table -- Shapes without JSDoc render code blocks only -- JSDoc renders at standard level -- Property table renders at detailed level -- Summary shows only type-kind table - -
- -
-Diagram scope supports archLayer filtering and multiple diagram types (5 scenarios) - -#### Diagram scope supports archLayer filtering and multiple diagram types - -**Invariant:** DiagramScope gains optional archLayer and diagramType fields. The archLayer filter selects patterns by their architectural layer (domain, application, infrastructure) and composes with archContext and archView via OR logic, consistent with existing filter dimensions. The diagramType field controls Mermaid output format: graph (default), sequenceDiagram, stateDiagram-v2, C4Context, classDiagram. Each diagram type has its own node and edge syntax appropriate to the Mermaid specification. - -**Rationale:** Layer-based views are fundamental to layered architecture documentation -- a developer reviewing the domain layer wants only deciders and value objects, not infrastructure adapters. Multiple diagram types unlock event flow documentation (sequence), FSM visualization (state), architecture overview (C4), and type hierarchy views (class) that flowcharts cannot express naturally. - -**Verified by:** - -- archLayer filter selects patterns by layer -- archLayer and archContext compose via OR -- Sequence diagram renders participant-message format -- State diagram renders state transitions -- Default diagramType produces flowchart -- archLayer filter selects domain-layer patterns -- archLayer composes with archContext via OR -- diagramType field controls Mermaid output - -
- -
-Every renderable block type appears in the showcase document (2 scenarios) - -#### Every renderable block type appears in the showcase document - -**Invariant:** The generated REFERENCE-SAMPLE.md at detailed level must contain at least one instance of each of the 9 block types: heading, paragraph, separator, table, list, code, mermaid, collapsible, link-out. At summary level, progressive disclosure blocks (collapsible, link-out) are omitted for compact output. - -**Rationale:** The sample document is the integration test for the reference codec. If any block type is missing, there is no automated verification that the codec can produce it. Coverage of all 9 types validates the full rendering pipeline from MasterDataset through codec through renderer. - -**Verified by:** - -- Detailed output contains all 9 block types -- Summary output uses compact block subset -- All 9 block types present in detailed output - -
- -
-Edge labels and custom node shapes enrich diagram readability (3 scenarios) - -#### Edge labels and custom node shapes enrich diagram readability - -**Invariant:** Relationship edges in scoped diagrams display labels describing the relationship semantics (uses, dependsOn, implements, extends). Edge labels are enabled by default and can be disabled via a showEdgeLabels option for compact diagrams. Node shapes vary by archRole value -- services use rounded rectangles, bounded contexts use subgraphs, projections use cylinders, and sagas use hexagons. - -**Rationale:** Unlabeled edges are ambiguous -- a reader seeing a solid arrow cannot distinguish "uses" from "implements" without consulting an edge style legend. Custom node shapes leverage Mermaid's shape vocabulary to make archRole visually distinguishable without color reliance, improving accessibility. - -**Verified by:** - -- Relationship edges display type labels by default -- Edge labels can be disabled for compact diagrams -- archRole controls Mermaid node shape -- Edge labels appear on diagram edges -- Edge labels can be disabled -- archRole controls node shape - -
- -
-Extraction pipeline surfaces complete API documentation (4 scenarios) - -#### Extraction pipeline surfaces complete API documentation - -**Invariant:** ExportInfo.signature shows full function parameter types and return type instead of the placeholder value. JSDoc param, returns, and throws tags are extracted and stored on ExtractedShape. Property-level JSDoc preserves full multi-line content without first-line truncation. Auto-shape discovery mode extracts all exported types from files matching shapeSources globs without requiring explicit extract-shapes annotations. - -**Rationale:** Function signatures are the most valuable API surface -- they show what a pattern exports without source navigation. The ExportInfo.signature field already exists in the schema but holds a lossy placeholder. The fix is approximately 15 lines in ast-parser.ts: threading sourceCode into extractFromDeclaration and slicing parameter ranges. Auto-shape discovery eliminates manual annotation burden for files that match shapeSources globs. - -**Verified by:** - -- Function signatures populate ExportInfo -- JSDoc param and returns tags appear in shape sections -- Full property-level JSDoc preserved without truncation -- Auto-shape discovery extracts exports from shapeSources files -- Param and returns tags appear in shape sections -- Full property JSDoc preserved -- Auto-shape discovery extracts without explicit tags - -
- -
-Infrastructure enables flexible document composition and AI-optimized output (4 scenarios) - -#### Infrastructure enables flexible document composition and AI-optimized output - -**Invariant:** CompositeCodec assembles reference documents from multiple codec outputs by concatenating RenderableDocument sections. The renderToClaudeContext renderer produces token-efficient output using section markers optimized for LLM consumption. The Gherkin tag extractor uses TagRegistry metadata instead of hardcoded if/else branches, making new tag addition a zero-code-change operation. Convention content can be extracted from TypeScript JSDoc blocks containing structured Invariant/Rationale annotations, not only from Gherkin Rule blocks. - -**Rationale:** CompositeCodec enables referenceDocConfigs to include content from any codec, not just the current 4 sources. The renderToClaudeContext renderer unifies two formatting paths (codec-based markdown vs hand-written markers in context-formatter.ts). Data-driven tag extraction cuts the maintenance burden of the 40-branch if/else in gherkin-ast-parser.ts roughly in half. TypeScript convention extraction enables self-documenting business rules in implementation files alongside their code. - -**Verified by:** - -- CompositeCodec combines multiple codec outputs -- renderToClaudeContext produces token-efficient output -- New Gherkin tags work via registry without code changes -- TypeScript JSDoc conventions extracted alongside Gherkin -- Claude context renderer produces marker-delimited output -- New tags work via registry without code changes - -
- -### PrdImplementationSection - -[View PrdImplementationSection source](delivery-process/specs/prd-generator-code-annotations-inclusion.feature) - -**Problem:** Implementation files with `@libar-docs-implements:PatternName` contain rich -relationship metadata (`@libar-docs-uses`, `@libar-docs-used-by`, `@libar-docs-usecase`) -that is not rendered in generated PRD documentation. This metadata provides valuable API -guidance and dependency information. - -**Solution:** Extend the PRD generator to collect all files with `@libar-docs-implements:X` -and render their metadata in a dedicated "## Implementations" section. This leverages the -relationship model from PatternRelationshipModel without requiring specs to list file paths. - -**Business Value:** -| Benefit | How | -| PRDs include implementation context | `implements` files auto-discovered and rendered | -| Dependency visibility | `uses`/`used-by` from implementations shown in PRD | -| Usage guidance in docs | `usecase` annotations rendered as "When to Use" | -| Zero manual sync | Code declares relationship, PRD reflects it | - -
-PRD generator discovers implementations from relationship index (2 scenarios) - -#### PRD generator discovers implementations from relationship index - -**Invariant:** When generating PRD for pattern X, the generator queries the relationship index for all files where `implements === X`. No explicit listing in the spec file is required. - -**Rationale:** The `@libar-docs-implements` tag creates a backward link from code to spec. The relationship index aggregates these. PRD generation simply queries the index rather than scanning directories. - -**Verified by:** - -- Implementations discovered from relationship index -- Multiple implementations aggregated -- Implementations discovered -- Multiple files aggregated - -
- -
-Implementation metadata appears in dedicated PRD section (4 scenarios) - -#### Implementation metadata appears in dedicated PRD section - -**Invariant:** The PRD output includes a "## Implementations" section listing all files that implement the pattern. Each file shows its `uses`, `usedBy`, and `usecase` metadata in a consistent format. - -**Rationale:** Developers reading PRDs benefit from seeing the implementation landscape alongside requirements, without cross-referencing code files. - -**Verified by:** - -- Implementations section generated in PRD -- Dependencies rendered per implementation -- Usecases rendered as guidance -- Used-by rendered for visibility -- Section generated -- Dependencies rendered -- Usecases rendered - -
- -
-Patterns without implementations render cleanly (1 scenarios) - -#### Patterns without implementations render cleanly - -**Invariant:** If no files have `@libar-docs-implements:X` for pattern X, the "## Implementations" section is omitted (not rendered as empty). - -**Rationale:** Planned patterns may not have implementations yet. Empty sections add noise without value. - -**Verified by:** - -- Section omitted when no implementations exist -- Section omitted when empty - -
- -### OrchestratorPipelineFactoryMigration - -[View OrchestratorPipelineFactoryMigration source](delivery-process/specs/orchestrator-pipeline-factory-migration.feature) - -**Problem:** -`orchestrator.ts` is the last feature consumer that wires the 8-step -scan-extract-merge-transform pipeline inline (lines 282-427). This is -the Parallel Pipeline anti-pattern identified in ADR-006. The shared -pipeline factory in `build-pipeline.ts` already serves `process-api.ts` -and `validate-patterns.ts`, but the orchestrator — the original pipeline -host — was deferred (ProcessAPILayeredExtraction DD-3) because it -collects structured warnings (scan errors with file details, extraction -error counts, Gherkin parse errors with line/column) that the factory's -flat `readonly string[]` warnings cannot represent. - -**Current violations in orchestrator.ts:** - -| Anti-Pattern | Location | Evidence | -| Parallel Pipeline | Lines 282-427 | 8-step pipeline: loadConfig, scanPatterns, extractPatterns, scanGherkinFiles, extractPatternsFromGherkin, mergePatterns, computeHierarchyChildren, transformToMasterDataset | - -Additionally, `mergePatterns()` is defined in orchestrator.ts (line 701) -but imported by `build-pipeline.ts` from `../orchestrator.js`. This -creates a misplaced-dependency: the factory depends on the consumer it -is meant to replace. When the orchestrator migrates to the factory, the -import direction inverts correctly. - -**What the orchestrator does beyond the pipeline:** - -| Responsibility | Lines | Stays in orchestrator | -| Pipeline (steps 1-8) | 282-427 | No — delegates to factory | -| PR Changes git detection | 429-469 | Yes — generator-specific option | -| Generator dispatch + file writing | 471-645 | Yes — core orchestrator job | -| Session file cleanup | 647-679 | Yes — post-generation lifecycle | -| mergePatterns utility | 701-727 | No — moves to pipeline/ | -| cleanupOrphanedSessionFiles | 761-809 | Yes — lifecycle utility | -| generateFromConfig | 922-998 | Yes — config-based entry point | -| groupGenerators, mergeGenerateResults | 850-898 | Yes — batching utilities | - -**Solution:** -Enrich the pipeline factory's `PipelineResult` with structured warnings -that capture the granularity the orchestrator needs, then migrate -`generateDocumentation()` to call `buildMasterDataset()`. Move -`mergePatterns()` to `src/generators/pipeline/merge-patterns.ts` as a -standalone pipeline step. - -The orchestrator retains: generator dispatch, file writing, PR-changes -detection, codec option assembly, session cleanup, and the -`generateFromConfig` entry point. - -**Design Decisions:** - -DD-1: Structured warnings replace flat strings in PipelineResult. -The factory's `PipelineResult.warnings` changes from `readonly string[]` -to `readonly PipelineWarning[]` where `PipelineWarning` is: - -See PipelineWarning and PipelineWarningDetail interfaces in -src/generators/pipeline/build-pipeline.ts. PipelineWarning has a -discriminated type field ('scan' | 'extraction' | 'gherkin-parse'), -a message, optional count, and optional details array. - -This is structurally similar to `GenerationWarning` + `WarningDetail` -from orchestrator.ts. The orchestrator maps `PipelineWarning` to -`GenerationWarning` in a thin adapter — `'gherkin-parse'` maps to -`'scan'`, and generator-level warning types (`'overwrite-skipped'`, -`'config'`, `'cleanup'`) are produced by the orchestrator itself, not -the pipeline. Existing consumers (process-api, validate-patterns) that -ignore warnings or use flat strings are unaffected — they can read -`.message` only. - -DD-2: mergePatterns moves to src/generators/pipeline/merge-patterns.ts. -Currently defined in orchestrator.ts (line 701), imported by -build-pipeline.ts. After the move: - -- `build-pipeline.ts` imports from `./merge-patterns.js` (sibling) -- `orchestrator.ts` no longer exports `mergePatterns` -- `generators/index.ts` re-exports from `pipeline/merge-patterns.js` -- The public API (`mergePatterns`) stays available, just moves home - -DD-3: Pipeline factory gains an includeValidation option. -The orchestrator calls `transformToMasterDataset` (no validation), -while process-api calls `transformToMasterDatasetWithValidation`. -The factory already calls the validation variant. Adding -`includeValidation?: boolean` (default true) lets the orchestrator -opt out, since doc generation doesn't need validation summaries. -This was foreshadowed in ProcessAPILayeredExtraction DD-3. - -DD-4: Scan result counts flow through PipelineResult. -The orchestrator needs scan result counts for constructing its warning -messages: how many files were scanned, how many had errors, how many -had skipped directives, how many Gherkin files had parse errors. The -factory adds an optional `scanMetadata` field: - -See ScanMetadata interface in src/generators/pipeline/build-pipeline.ts. -It carries scannedFileCount, scanErrorCount, skippedDirectiveCount, -and gherkinErrorCount. - -This avoids exposing raw `ScannedFile[]` (which would be a Parallel -Pipeline enabler) while providing the counts the orchestrator needs -for its warning messages. The merged patterns array for -`GenerateResult.patterns` and generator context comes from -`PipelineResult.dataset.patterns`, not from scan metadata. - -DD-5: The factory supports partial success for scan errors. -Today the factory returns `Result.err` on total scanner failure -(e.g., invalid glob), which remains unchanged — total infrastructure -failures are always fatal. For partial failures (individual files -with parse errors within an otherwise successful scan), the new -`failOnScanErrors?: boolean` option controls behavior. When true -(default for process-api), partial scan errors produce `Result.err`. -When false (orchestrator), partial errors are captured in -`PipelineResult.warnings` as structured `PipelineWarning` objects -and the pipeline continues with successfully scanned files. - -DD-6: generateDocumentation signature is unchanged. -The public `GenerateOptions` and `GenerateResult` interfaces don't -change. The orchestrator's `generateDocumentation()` becomes a thinner -function: build PipelineOptions from GenerateOptions, call factory, -map PipelineWarnings to GenerationWarnings, then proceed with generator -dispatch. The programmatic API is stable. The orchestrator's config -loading (`loadConfig`) is replaced by the factory's internal config -step — `tagRegistry` is accessed via `dataset.tagRegistry`. The merged -patterns array for `GenerateResult.patterns` and generator context is -`dataset.patterns` from the MasterDataset. - -DD-7: validate-patterns.ts and process-api.ts are unaffected. -They already consume the factory. The only change they see is -`PipelineResult.warnings` widening from `readonly string[]` to -`readonly PipelineWarning[]`, which is backward-compatible (they -currently ignore or stringify warnings). - -**Implementation Order:** - -| Step | What | Verification | -| 1 | Move mergePatterns to src/generators/pipeline/merge-patterns.ts | pnpm typecheck | -| 2 | Update imports in build-pipeline.ts, orchestrator.ts, generators/index.ts, orchestrator.steps.ts | pnpm typecheck, pnpm lint | -| 3 | Add PipelineWarning types to build-pipeline.ts | pnpm typecheck | -| 4 | Enrich factory to collect structured warnings and scan metadata | pnpm typecheck | -| 5 | Add includeValidation and failOnScanErrors options to factory | pnpm typecheck | -| 6 | Migrate generateDocumentation pipeline to factory call | pnpm build, pnpm test | -| 7 | Remove unused scanner/extractor imports from orchestrator.ts | pnpm lint | -| 8 | Full verification | pnpm build, pnpm test, pnpm lint, pnpm validate:patterns, pnpm docs:all | - -**Files Modified:** - -| File | Change | Lines Affected | -| src/generators/pipeline/merge-patterns.ts | NEW: mergePatterns moved from orchestrator | +~30 | -| src/generators/pipeline/build-pipeline.ts | Enrich PipelineResult, add options, collect warnings | +~60 | -| src/generators/pipeline/index.ts | Re-export merge-patterns | +2 | -| src/generators/orchestrator.ts | Replace pipeline with factory call, remove mergePatterns | -~170 net | -| src/generators/index.ts | Update mergePatterns re-export source | ~2 | -| tests/steps/generators/orchestrator.steps.ts | Update mergePatterns import to pipeline/merge-patterns | ~1 | - -**What does NOT change:** - -- GenerateOptions, GenerateResult, GeneratedFile interfaces (stable public API) -- Generator dispatch, file writing, PR-changes detection (orchestrator core) -- Session cleanup, generateFromConfig, groupGenerators (orchestrator utilities) -- generate-docs CLI (calls generateDocumentation unchanged) -- process-api.ts, validate-patterns.ts (already migrated) -- Existing test scenarios for orchestrator (same observable behavior) - -
-Orchestrator delegates pipeline to factory (2 scenarios) - -#### Orchestrator delegates pipeline to factory - -**Invariant:** `generateDocumentation()` calls `buildMasterDataset()` for the scan-extract-merge-transform sequence. It does not import from `scanner/` or `extractor/` for pipeline orchestration. Direct imports are permitted only for types used in GenerateResult (e.g., `ExtractedPattern`). - -**Rationale:** The orchestrator is the original host of the inline pipeline. After this migration, the pipeline factory is the sole definition of the 8-step sequence. Any future changes to pipeline steps (adding caching, parallel scanning, incremental extraction) happen in one place and all consumers benefit. - -**Verified by:** - -- No pipeline imports in orchestrator -- Factory is sole pipeline definition - -
- -
-mergePatterns lives in pipeline module (2 scenarios) - -#### mergePatterns lives in pipeline module - -**Invariant:** The `mergePatterns()` function lives in `src/generators/pipeline/merge-patterns.ts` as a pipeline step. It is not defined in consumer code (orchestrator or CLI files). - -**Rationale:** `mergePatterns` is step 5 of the 8-step pipeline. It was defined in orchestrator.ts for historical reasons (the orchestrator was the first pipeline host). Now that the pipeline factory exists, the function belongs alongside other pipeline steps (scan, extract, transform). The public API re-export in `generators/index.ts` preserves backward compatibility. - -**Verified by:** - -- mergePatterns location -- Public API preserved - -
- -
-Factory provides structured warnings for all consumers (2 scenarios) - -#### Factory provides structured warnings for all consumers - -**Invariant:** `PipelineResult.warnings` contains typed warning objects with `type`, `message`, optional `count`, and optional `details` (file, line, column, message). Consumers that need granular diagnostics (orchestrator) use the full structure. Consumers that need simple messages (process-api) read `.message` only. - -**Rationale:** The orchestrator collects scan errors, skipped directives, extraction errors, and Gherkin parse errors as structured `GenerationWarning` objects. The factory must provide equivalent structure to eliminate the orchestrator's need to run the pipeline directly. The `PipelineWarning` type is structurally similar to `GenerationWarning` to minimize mapping complexity. - -**Verified by:** - -- Orchestrator warnings preserved -- Existing consumers unaffected - -
- -
-Pipeline factory supports partial success mode (1 scenarios) - -#### Pipeline factory supports partial success mode - -**Invariant:** When `failOnScanErrors` is false, the factory captures scan errors and extraction errors as warnings and continues with successfully processed files. When true (default), the factory returns `Result.err` on the first scan failure. - -**Rationale:** The orchestrator treats scan errors as non-fatal warnings — documentation generation should succeed for all scannable files even if some files have syntax errors. The process-api treats scan errors as fatal because the query layer requires a complete dataset. The factory must support both strategies via configuration. - -**Verified by:** - -- Partial success mode works - -
- -
-End-to-end verification confirms behavioral equivalence (1 scenarios) - -#### End-to-end verification confirms behavioral equivalence - -**Invariant:** After migration, all CLI commands and doc generation produce identical output to pre-refactor behavior. - -**Rationale:** The migration must not change observable behavior for any consumer. Full verification confirms the factory migration is a pure refactor. - -**Verified by:** - -- Full verification passes - -
- -### GeneratorInfrastructureTesting - -[View GeneratorInfrastructureTesting source](delivery-process/specs/generator-infrastructure-testing.feature) - -**Problem:** -Core generator infrastructure lacks behavior specs: - -- `src/generators/orchestrator.ts` (~420 lines) - Main entry point, untested -- `src/generators/registry.ts` - Registry pattern, untested -- `src/generators/codec-based.ts` - Adapter pattern, untested - -These components orchestrate all document generation but have no executable tests. - -**Solution:** -Create behavior specs for: - -- Orchestrator integration (dual-source merging, error handling) -- Registry operations (register, get, list) -- CodecBasedGenerator adapter (delegation, error handling) - -**Business Value:** -| Benefit | How | -| Pipeline Reliability | Generation orchestration works correctly | -| Error Visibility | Failures produce clear error messages | -| Extension Safety | New generators integrate correctly | - -
-Orchestrator coordinates full documentation generation pipeline (5 scenarios) - -#### Orchestrator coordinates full documentation generation pipeline - -**Invariant:** Orchestrator merges TypeScript and Gherkin patterns, handles conflicts, and produces requested document types. - -**Verified by:** - -- Orchestrator merges TypeScript and Gherkin patterns -- Orchestrator detects pattern name conflicts -- Orchestrator generates requested document types -- Unknown generator name fails gracefully -- Partial success when some generators fail -- Dual-source merging -- Conflict detection -- Generator selection - -
- -
-Registry manages generator registration and retrieval (5 scenarios) - -#### Registry manages generator registration and retrieval - -**Invariant:** Registry prevents duplicate names, returns undefined for unknown generators, and lists available generators alphabetically. - -**Verified by:** - -- Register generator with unique name -- Duplicate registration throws error -- Get registered generator -- Get unknown generator returns undefined -- Available returns sorted list -- Registration -- Retrieval -- Listing - -
- -
-CodecBasedGenerator adapts codecs to generator interface (3 scenarios) - -#### CodecBasedGenerator adapts codecs to generator interface - -**Invariant:** Generator delegates to underlying codec for transformation. Missing MasterDataset produces descriptive error. - -**Verified by:** - -- Generator delegates to codec -- Missing MasterDataset returns error -- Codec options are passed through -- Delegation -- Error handling - -
- -
-Orchestrator supports PR changes generation options (3 scenarios) - -#### Orchestrator supports PR changes generation options - -**Invariant:** PR changes can filter by git diff, changed files, or release version. - -prChangesOptions - -**Verified by:** - -- PR changes filters to git diff base -- PR changes filters to explicit file list -- PR changes filters by release version -- Git diff filtering -- Changed files filtering -- Release filtering - -
- -### DocGenerationProofOfConcept - -[View DocGenerationProofOfConcept source](delivery-process/specs/doc-generation-proof-of-concept.feature) - -**Status: SUPERSEDED** - This POC has been implemented. See: - -- Convention-tagged decision records (ADR/PDR) with @libar-docs-convention tags -- `docs-generated/ANNOTATION-GUIDE.md` - Comprehensive guide for fixing generated docs - -This decision establishes the pattern for generating technical documentation -from annotated source files. It serves as both the DECISION (why/how) and -the PROOF OF CONCEPT (demonstrating the pattern works). - -
-Context - Manual documentation maintenance does not scale - -#### Context - Manual documentation maintenance does not scale - -**The Problem:** - - Common technical documentation is the hardest part to maintain in a repository. - The volume constantly grows, and AI coding sessions are drastically less effective - at updating documentation compared to code. Documentation drifts from source. - - Current state in this package: - - **Root Causes:** - - 1. **Duplication** - Same information exists in code comments, feature files, - and markdown docs. Changes require updating multiple places. - - 2. **No Single Source** - Documentation is authored separately from the code - it describes. There's no compilation step to catch drift. - - 3. **Detail Level Mismatch** - Compact docs for AI context and detailed docs - for humans are maintained separately despite sharing content. - - **What We Have:** - - The delivery-process package already has the required ingredients: - - Pattern extraction from TypeScript JSDoc and Gherkin tags - - Rich content support (DocStrings, tables, code blocks in features) - - Multi-source aggregation via tag taxonomy - - Progressive disclosure via codec detail levels - - Relationship tags for cross-references - - **What's Missing:** - -| Document | Lines | Maintenance Burden | -| ---------------------------- | -------- | --------------------------------- | -| docs/PROCESS-GUARD.md | ~300 | High - duplicates code behavior | -| docs/METHODOLOGY.md | ~400 | Medium - conceptual, changes less | -| \_claude-md/validation/\*.md | ~50 each | High - must match detailed docs | -| CLAUDE.md | ~800 | Very High - aggregates everything | - -| Gap | Impact | Solution | -| -------------------------------- | ------ | -------------------------------------- | -| Shape extraction from TypeScript | High | New @extract-shapes tag | -| Convention-tagged content | Medium | Decision records as convention sources | -| Durable intro/context content | Medium | Decision Rule: Context sections | - -
- -
-Decision - Decisions own convention content and durable context, code owns details - -#### Decision - Decisions own convention content and durable context, code owns details - -**The Pattern:** - - Documentation is generated from three source types with different durability: - - **Why Decisions Own Intro Content:** - - Tier 1 specs (roadmap features) become clutter after implementation - their - deliverables are done, status is completed, they pile up. Behavior specs stay - current because tests must pass. But neither is appropriate for intro content. - - Decisions (ADR/PDR) are durable by design - they remain valid until explicitly - superseded. The `Rule: Context` section of a decision IS the background/intro - for any documentation about that topic. - - **Extends Existing ADR Codec:** - - The doc-from-decision generator extends the existing `AdrDocumentCodec` which - already parses Rule: prefixes via `partitionAdrRules()` (see adr.ts:627-663): - - **Source Mapping Pattern:** - - Each documentation decision declares its target documents and source mapping: - - **Detail Level Mapping:** - - Uses existing `DetailLevel` enum from `renderable/codecs/types/base.ts`: - - **Extraction by Source Type:** - - **The Generator Command:** - -| Source Type | Durability | Content Ownership | -| ---------------------------- | ---------- | -------------------------------------- | -| Decision documents (ADR/PDR) | Permanent | Intro, context, rationale, conventions | -| Behavior specs (.feature) | Permanent | Rules, examples, acceptance criteria | -| Implementation code (.ts) | Compiled | API types, error messages, signatures | - -| Rule Prefix | ADR Section | Doc Section | -| ---------------- | ---------------------- | ---------------------------- | -| `Context...` | context | ## Background / Introduction | -| `Decision...` | decision | ## How It Works | -| `Consequence...` | consequences | ## Trade-offs | -| Other rules | other (warning logged) | Custom sections | - -| Target Document | Sources | Detail Level | Effect | -| --------------------------------------- | ------------------------------------- | ------------ | ------------------------ | -| docs/PROCESS-GUARD.md | This decision + behavior specs + code | detailed | All sections, full JSDoc | -| \_claude-md/validation/process-guard.md | This decision + behavior specs + code | summary | Rules table, types only | - -| Level | Content Included | Rendering Style | -| -------- | ------------------------------------ | ------------------------------ | -| summary | Essential tables, type names only | Compact - lists vs code blocks | -| standard | Tables, types, key descriptions | Balanced | -| detailed | Everything including JSDoc, examples | Full - code blocks with JSDoc | - -| Source | What's Extracted | How | -| ------------------------------- | -------------------------------- | ------------------------- | -| Decision Rule: Context | Intro/background section | Rule description text | -| Decision Rule: Decision | How it works section | Rule description text | -| Decision Rule: Consequences | Trade-offs section | Rule description text | -| Decision DocStrings | Code examples (Husky, API) | Fenced code blocks | -| Behavior spec Rules | Validation rules, business rules | Rule names + descriptions | -| Behavior spec Scenario Outlines | Decision tables, lookup tables | Examples tables | -| TypeScript @extract-shapes | API types, interfaces | AST extraction | -| TypeScript JSDoc | Implementation notes | Markdown in comments | - -```bash -generate-docs --decisions 'specs/**/*.feature' --features 'tests/**/*.feature' --typescript 'src/**/*.ts' --generators doc-from-decision --output docs -``` - -
- -
-Proof of Concept - Self-documentation validates the pattern - -#### Proof of Concept - Self-documentation validates the pattern - -This POC demonstrates the doc-from-decision pattern by generating docs -about ITSELF. The DocGenerationProofOfConcept pattern produces: - - **Process Guard docs are generated separately from `adr-006-process-guard.feature`.** - - **Source Mapping for POC Self-Documentation:** - - This source mapping demonstrates all extraction methods by extracting content - from this POC's own sources. The table serves as both documentation AND test data. - - **Pre-commit Hook Setup:** - - File: `.husky/pre-commit` - - - - **Package.json Scripts:** - - - - **Programmatic API Example:** - - - - **Escape Hatches:** - -| Output | Purpose | Detail Level | -| -------------------------------------------------------- | ------------------ | ------------ | -| docs/DOC-GENERATION-PROOF-OF-CONCEPT.md | Detailed reference | detailed | -| \_claude-md/generated/doc-generation-proof-of-concept.md | AI context | summary | - -| Section | Source File | Extraction Method | -| ----------------- | --------------------------------------------------- | -------------------------- | -| Intro & Context | THIS DECISION (Rule: Context above) | Decision rule description | -| How It Works | THIS DECISION (Rule: Decision above) | Decision rule description | -| Validation Rules | tests/features/validation/process-guard.feature | Rule blocks | -| Protection Levels | delivery-process/specs/process-guard-linter.feature | Scenario Outline Examples | -| Valid Transitions | delivery-process/specs/process-guard-linter.feature | Scenario Outline Examples | -| API Types | src/lint/process-guard/types.ts | @extract-shapes tag | -| Decider API | src/lint/process-guard/decider.ts | @extract-shapes tag | -| CLI Options | src/cli/lint-process.ts | JSDoc section | -| Error Messages | src/lint/process-guard/decider.ts | createViolation() patterns | -| Pre-commit Setup | THIS DECISION (DocString) | Fenced code block | -| Programmatic API | THIS DECISION (DocString) | Fenced code block | - -| Situation | Solution | Example | -| ----------------------------- | --------------------- | ----------------------------------------- | -| Fix bug in completed spec | Add unlock reason tag | `@libar-docs-unlock-reason:'Fix-typo'` | -| Modify outside session scope | Use ignore flag | `lint-process --staged --ignore-session` | -| CI treats warnings as errors | Use strict flag | `lint-process --all --strict` | -| Skip workflow (legacy import) | Multiple transitions | Set roadmap then completed in same commit | - -```bash -npx lint-process --staged -``` - -```json -{ - "scripts": { - "lint:process": "lint-process --staged", - "lint:process:ci": "lint-process --all --strict" - } -} -``` - -```typescript -import { - deriveProcessState, - detectStagedChanges, - validateChanges, - hasErrors, - summarizeResult, -} from '@libar-dev/delivery-process/lint'; - -// 1. Derive state from annotations -const state = (await deriveProcessState({ baseDir: '.' })).value; - -// 2. Detect changes -const changes = detectStagedChanges('.').value; - -// 3. Validate -const { result } = validateChanges({ - state, - changes, - options: { strict: false, ignoreSession: false }, -}); - -// 4. Handle results -if (hasErrors(result)) { - console.log(summarizeResult(result)); - process.exit(1); -} -``` - -
- -
-Expected Output - Compact claude module structure - -#### Expected Output - Compact claude module structure - -**File:** `_claude-md/validation/process-guard.md` - - The compact module extracts only essential content for AI context. - Output size depends on source mapping entries - there is no artificial line limit. - - **Expected Sections:** - - **Key Characteristics:** - - - Summary detail level (essential tables only) - - No JSDoc comments or implementation details - - Tables for structured data (rules, protection levels) - - Inline code blocks for CLI examples - - Cross-reference to detailed documentation - -| Section | Content | -| ------------------ | ----------------------------------------------------------- | -| Header + Intro | Pattern name, problem/solution summary | -| API Types | Core interface definitions (DeciderInput, ValidationResult) | -| 7 Validation Rules | Rule table with severity and description | -| Protection Levels | Status-to-protection mapping table | -| CLI | Essential command examples | -| Link | Reference to full documentation | - -
- -
-Consequences - Durable sources with clear ownership boundaries - -#### Consequences - Durable sources with clear ownership boundaries - -**Benefits:** - - **Trade-offs:** - - **Ownership Boundaries:** - -| Benefit | How | -| ---------------------- | ----------------------------------------- | -| Single source of truth | Each content type owned by one source | -| Always-current docs | Generated from tested/compiled sources | -| Reduced maintenance | Change source once, docs regenerate | -| Progressive disclosure | Same sources → compact + detailed outputs | -| Clear ownership | Decisions own "why", code owns "what" | - -| Trade-off | Mitigation | -| ------------------------------------------------- | ---------------------------------------- | -| Decisions must be updated for fundamental changes | Appropriate - fundamentals ARE decisions | -| New @extract-shapes capability required | Spec created (shape-extraction.feature) | -| Initial annotation effort on existing code | One-time migration, then maintained | -| Generated docs in git history | Same as current manual approach | - -| Content Type | Owner | Update Trigger | -| --------------------------- | ------------------------- | ------------------------------- | -| Intro, rationale, context | Decision document | Fundamental change to approach | -| Rules, examples, edge cases | Behavior specs | Behavior change (tests fail) | -| API types, signatures | Code with @extract-shapes | Interface change (compile fail) | -| Error messages | Code patterns | Message text change | -| Code examples | Decision DocStrings | Example needs update | - -
- -
-Consequences - Design stubs live in stubs, not src - -#### Consequences - Design stubs live in stubs, not src - -**The Problem:** - - Design stubs (pre-implementation API shapes) placed in `src/` cause issues: - - Example of the anti-pattern (from monorepo eslint.config.js): - - - **The Solution:** - - Design stubs live in `delivery-process/stubs/`: - - **Design Stub Pattern:** - - - - **Benefits:** - - **Workflow:** - - 1. **Design session:** Create stub in `delivery-process/stubs/{pattern-name}/` - 2. **Iterate:** Refine API shapes, add JSDoc, test with docs generation - 3. **Implementation session:** Move/copy to `src/`, implement real logic - 4. **Stub becomes example:** Original stub stays as reference (optional) - - **What This Enables:** - - Once proven with Process Guard, the pattern applies to all documentation: - -| Issue | Impact | -| ------------------------ | ------------------------------------------- | -| ESLint exceptions needed | Rules relaxed for "not-yet-real" code | -| Confusion | What's production vs. what's design? | -| Pollution | Stubs mixed with implemented code | -| Import accidents | Other code might import unimplemented stubs | -| Maintenance burden | Must track which files are stubs | - -| Location | Content | When Moved to src/ | -| -------------------------------------- | --------------------------------------------- | ---------------------- | -| delivery-process/stubs/{pattern}/\*.ts | API shapes, interfaces, throw-not-implemented | Implementation session | -| src/\*_/_.ts | Production code only | Already there | - -| Benefit | How | -| --------------------- | -------------------------------------------------------------------- | -| No ESLint exceptions | Stubs aren't in src/, no relaxation needed | -| Clear separation | delivery-process/stubs/ = design, src/ = production | -| Documentation source | Stubs with @extract-shapes generate API docs | -| Safe iteration | Can refine stub APIs without breaking anything | -| Implementation signal | Moving from delivery-process/stubs/ to src/ = implementation started | - -| Document | Decision Source | -| ---------------------- | ----------------------------------------------- | -| docs/METHODOLOGY.md | ADR for delivery process methodology | -| docs/TAXONOMY.md | PDR-006 TypeScript Taxonomy (exists) | -| docs/VALIDATION.md | ADR for validation approach | -| docs/SESSION-GUIDES.md | ADR for session workflows | -| \_claude-md/\*_/_.md | Corresponding decisions with compact extraction | - -```javascript -// TODO: Delivery process design artifacts: Relax unused-vars - { - files: [ - "**/packages/platform-core/src/durability/durableAppend.ts", - "**/packages/platform-core/src/durability/intentCompletion.ts", - // ... more stubs in src/ ... - ], - rules: { - "@typescript-eslint/no-unused-vars": "off", - }, - } -``` - -```typescript -// delivery-process/stubs/shape-extractor/shape-extractor.ts -/** - * @libar-docs - * @libar-docs-pattern ShapeExtractorStub - * @libar-docs-status roadmap - * - * ## Shape Extractor - Design Stub - * - * API design for extracting TypeScript types from source files. - */ - -export interface ExtractedShape { - name: string; - kind: 'interface' | 'type' | 'enum' | 'function'; - sourceText: string; -} - -export function extractShapes( - sourceCode: string, - shapeNames: string[] -): Map { - throw new Error('ShapeExtractor not yet implemented - roadmap pattern'); -} -``` - -
- -
-Decision - Source mapping table parsing and extraction method dispatch (9 scenarios) - -#### Decision - Source mapping table parsing and extraction method dispatch - -**Invariant:** The source mapping table in a decision document defines how documentation sections are assembled from multiple source files. - -**Table Format:** - - **Self-Reference Markers:** - - **Extraction Method Dispatch:** - - **Path Resolution:** - - - Relative paths are resolved from project root - - `THIS DECISION` resolves to the current decision document - - Missing files produce warnings but generation continues - -| Column | Purpose | Example | -| ----------------- | -------------------------------------------- | -------------------------------- | -| Section | Target section heading in generated doc | "Intro & Context", "API Types" | -| Source File | Path to source file or self-reference marker | "src/types.ts", "THIS DECISION" | -| Extraction Method | How to extract content from source | "@extract-shapes", "Rule blocks" | - -| Marker | Meaning | -| ------------------------- | -------------------------------------------------- | -| THIS DECISION | Extract from the current decision document | -| THIS DECISION (Rule: X) | Extract specific Rule: block from current document | -| THIS DECISION (DocString) | Extract fenced code blocks from current document | - -| Extraction Method | Source Type | Action | -| -------------------------- | ------------------------ | ----------------------------------------------------- | -| Decision rule description | Decision (.feature) | Extract Rule: block content (Invariant, Rationale) | -| @extract-shapes tag | TypeScript (.ts) | Invoke shape extractor for @libar-docs-extract-shapes | -| Rule blocks | Behavior spec (.feature) | Extract Rule: names and descriptions | -| Scenario Outline Examples | Behavior spec (.feature) | Extract Examples tables as markdown | -| JSDoc section | TypeScript (.ts) | Extract markdown from JSDoc comments | -| createViolation() patterns | TypeScript (.ts) | Extract error message literals | -| Fenced code block | Decision (.feature) | Extract DocString code blocks with language | - -**Verified by:** - -- Decision Rule descriptions become documentation sections -- Decision DocStrings become code examples -- Source mapping aggregates multiple files -- Compact and detailed outputs from same sources -- Missing source file produces warning -- Source file exists but extraction method fails -- Source mapping validated at generation time -- Full pipeline generates documentation from decision documents -- Generator registered in CODEC_MAP - -
- -### CrossCuttingDocumentInclusion - -[View CrossCuttingDocumentInclusion source](delivery-process/specs/cross-cutting-document-inclusion.feature) - -**Problem:** -The reference doc codec assembles content from four sources, each with its -own selection mechanism: conventionTags filters by convention tag values, -behaviorCategories filters by pattern category, shapeSelectors filters by -shape group or source, and diagramScopes filters by archContext or explicit -pattern names. These selectors operate at different granularity levels. -Convention and behavior selectors are coarse -- they pull ALL items matching -a tag or category, with no way to select a single convention rule or a -single behavior pattern for a focused showcase. - -More fundamentally, content-to-document is a many-to-many relationship. -A CategoryDefinition interface should be includable in a Taxonomy Reference, -a Configuration Guide, AND a claude.md architecture section simultaneously. -However, libar-docs-shape only supports one group, and behaviorCategories only -supports one category per pattern. There is no cross-cutting tag that says -"include this specific item in these specific documents." - -The experimental libar-docs-arch-view tag partially solved this for diagram -scoping but its name is misleading -- it routes content, not architectural -views. It should be replaced by a general-purpose include tag. - -**Solution:** -Replace libar-docs-arch-view with libar-docs-include as a general-purpose -CSV tag on both patterns and shape declarations. This tag acts as a -document-routing mechanism alongside existing selectors. The tag controls -two things: (1) diagram scoping -- DiagramScope gains an include field -replacing archView, and (2) content routing -- ReferenceDocConfig gains an -includeTags field. Content matching logic becomes: include if item matches -existing selectors OR has a matching libar-docs-include tag value. The -include tag is purely additive -- it never removes content that would be -selected by existing filters. - -The tag is CSV format, so one item can appear in multiple documents: -libar-docs-include:reference-sample,codec-system,config-guide - -This gives every content type (conventions, behaviors, shapes, diagrams) -uniform per-item opt-in without changing how existing selectors work. - -**Design Decisions:** - -DD-1: Additive semantics (OR, not AND) -The includeTags filter is unioned with existing selectors, not -intersected. A pattern appears in a reference doc if it matches -behaviorCategories OR has a matching include tag. Configs without -includeTags behave identically to today. Configs with includeTags -can pull in additional items that existing selectors cannot reach, -without disrupting what existing selectors already select. - -DD-2: One tag replaces arch-view and adds content routing -The libar-docs-include tag replaces the experimental arch-view tag -entirely. DiagramScope.archView is renamed to DiagramScope.include. -The same tag values that scope diagrams can also route content via -ReferenceDocConfig.includeTags. One concept, one name. The arch-view -tag, field names, registry entry, and all references are removed. - -DD-3: Works on both patterns and declarations -For patterns (conventions, behaviors), the include tag lives in the -file-level or feature-level libar-docs block and is extracted as -part of the directive. For shapes, the include tag lives in the -declaration-level JSDoc alongside libar-docs-shape. The shape -extractor (discoverTaggedShapes) extracts both tags from the same -JSDoc comment. The include values are stored on ExtractedShape as -an optional includes: readonly string[] field. - -DD-4: Content type determines rendering, include tag determines routing -The include tag does not change HOW content renders -- only WHERE -it appears. A pattern with rules still renders as a behavior section. -A shape still renders as a type code block. A convention still -renders as convention tables. The include tag is orthogonal to -content type. The codec determines rendering based on what the -item IS, not how it was selected. - -**Pragmatic Constraints:** -| Constraint | Rationale | -| Include values are single tokens (no spaces) | Standard tag value convention, hyphen-separated | -| No wildcard or glob matching on include values | Exact string match keeps selection predictable | -| Additive only, no exclusion mechanism | Exclusion adds complexity; use separate configs instead | -| Shape include requires libar-docs-shape tag too | Include routes a shape, but libar-docs-shape triggers extraction | - -**Implementation Path:** -| Layer | Change | Effort | -| registry-builder.ts | Replace arch-view with include in metadataTags (format: csv) | ~5 lines | -| extracted-pattern.ts | Rename archView to include on directive schema | ~5 lines | -| extracted-shape.ts | Add optional includes: readonly string[] field | ~3 lines | -| doc-directive.ts | Rename archView to include on DocDirective | ~5 lines | -| shape-extractor.ts | Extract libar-docs-include CSV from declaration JSDoc | ~15 lines | -| doc-extractor.ts | Rename archView references to include | ~10 lines | -| ast-parser.ts | Rename arch-view extraction to include | ~5 lines | -| gherkin-ast-parser.ts | Rename archView field to include | ~5 lines | -| reference.ts | Rename DiagramScope.archView to include, add includeTags to ReferenceDocConfig, add inclusion pass | ~35 lines | -| project-config-schema.ts | Rename archView to include, add includeTags | ~5 lines | -| transform-dataset.ts | Rename archView references to include in dataset views | ~10 lines | -| master-dataset.ts | Rename byArchView to byInclude in dataset schema | ~5 lines | -| reference-generators.ts | Update built-in configs from archView to include | ~5 lines | -| pattern-scanner.ts | Rename arch-view extraction to include | ~3 lines | -| delivery-process.config.ts | Update showcase config: rename archView, add includeTags | ~5 lines | -| Source files (~8 files) | Replace libar-docs-arch-view annotations with libar-docs-include | ~8 lines | - -**Integration with Existing Selectors:** -The reference codec decode method gains a new inclusion pass after the -existing four content assembly steps. For each content type, the flow is: - -1. Existing selector produces initial content set -2. Include tag pass finds additional items tagged for this document -3. Results are merged (deduplicated by pattern name or shape name) -4. Merged set is rendered using the existing section builders - -This means the include tag can pull a single behavior pattern into a -reference doc without needing to create a dedicated behaviorCategory -for it. It can pull a single convention rule without a unique -conventionTag. The include tag closes the granularity gap for all -content types uniformly. - -
-Include tag routes content to named documents (4 scenarios) - -#### Include tag routes content to named documents - -**Invariant:** A pattern or shape with libar-docs-include:X appears in any reference document whose includeTags contains X. The tag is CSV, so libar-docs-include:X,Y routes the item to both document X and document Y. This is additive -- the item also appears in any document whose existing selectors (conventionTags, behaviorCategories, shapeSelectors) would already select it. - -**Rationale:** Content-to-document is a many-to-many relationship. A type definition may be relevant to an architecture overview, a configuration guide, and an AI context section. The include tag expresses this routing at the source, next to the code, without requiring the document configs to enumerate every item by name. - -**Verified by:** - -- Pattern with include tag appears in reference doc -- CSV include routes pattern to multiple documents -- Include is additive with existing selectors -- Pattern without include tag is unaffected -- Pattern with include tag appears in matching doc -- CSV include routes to multiple docs - -
- -
-Include tag scopes diagrams (replaces arch-view) (2 scenarios) - -#### Include tag scopes diagrams (replaces arch-view) - -**Invariant:** DiagramScope.include matches patterns whose libar-docs-include values contain the specified scope value. This is the same field that existed as archView -- renamed for consistency with the general-purpose include tag. Patterns with libar-docs-include:pipeline-stages appear in any DiagramScope with include: pipeline-stages. - -**Rationale:** The experimental arch-view tag was diagram-specific routing under a misleading name. Renaming to include unifies the vocabulary: one tag, two consumption points (diagram scoping via DiagramScope.include, content routing via ReferenceDocConfig.includeTags). - -**Verified by:** - -- Diagram scope uses include to select patterns -- Pattern in diagram and content via same include tag -- Diagram scope with include matches tagged patterns -- Existing diagram configurations work after rename - -
- -
-Shapes use include tag for document routing (3 scenarios) - -#### Shapes use include tag for document routing - -**Invariant:** A declaration tagged with both libar-docs-shape and libar-docs-include has its include values stored on the ExtractedShape. The reference codec uses these values alongside shapeSelectors for shape filtering. A shape with libar-docs-include:X appears in any document whose includeTags contains X, regardless of whether the shape matches any shapeSelector. - -**Rationale:** Shape extraction (via libar-docs-shape) and document routing (via libar-docs-include) are orthogonal concerns. A shape must be extracted before it can be routed. The shape tag triggers extraction; the include tag controls which documents render it. This separation allows one shape to appear in multiple documents without needing multiple group values. - -**Verified by:** - -- Shape with include tag appears in reference doc -- Shape with both group and include works -- Shape without include but with matching group still works -- Shape with include appears in matching doc -- Shape without include but with group still works - -
- -
-Conventions use include tag for selective inclusion (2 scenarios) - -#### Conventions use include tag for selective inclusion - -**Invariant:** A decision record or convention pattern with libar-docs-include:X appears in a reference document whose includeTags contains X. This allows selecting a single convention rule for a focused document without pulling all conventions matching a broad conventionTag. - -**Rationale:** Convention content is currently selected by conventionTags, which pulls all decision records tagged with a given convention value. For showcase documents or focused guides, this is too coarse. The include tag enables cherry-picking individual conventions alongside broad tag-based selection. - -**Verified by:** - -- Convention with include tag appears in reference doc -- Include works alongside conventionTags -- Convention with include appears in matching doc - -
- -### CodecDrivenReferenceGeneration - -[View CodecDrivenReferenceGeneration source](delivery-process/specs/codec-driven-reference-generation.feature) - -**Problem:** -Each reference document (Process Guard, Taxonomy, Validation, etc.) required a -hand-coded recipe feature that duplicated codec setup, rendering, and file output -logic. Adding a new reference document meant creating a new feature file, a new -codec wrapper, and a new generator class -- all following the same pattern. - -**Solution:** -A single `createReferenceCodec` factory driven by `ReferenceDocConfig` objects. -Each config declares four content sources -- convention tags, diagram scopes, -shape source globs, and behavior categories -- that compose automatically in -AD-5 order. 13 configs produce 27 generators (13 detailed for `docs/` + -13 summary for `_claude-md/` + 1 meta-generator). - -**Why It Matters:** -| Benefit | How | -| Zero-code new documents | Add a config object, get two output files | -| Consistent structure | Every reference doc follows the same composition order | -| Two detail levels | Detailed (full source, diagrams) and summary (compact tables) | -| Convention-driven content | Decision records auto-populate via tag matching | -| Shape extraction | TypeScript types rendered from AST, not duplicated in prose | - -
-Config-driven codec replaces per-document recipe features (2 scenarios) - -#### Config-driven codec replaces per-document recipe features - -**Invariant:** A single `ReferenceDocConfig` object is sufficient to produce a complete reference document. No per-document codec subclass or recipe feature is required. - -**Rationale:** The codec composition logic is identical across all reference documents. Only the content sources differ. Extracting this into a config-driven factory eliminates N duplicated recipe features and makes adding new documents a one-line config addition. - -**Verified by:** - -- Config with matching data produces a complete document -- Config with no matching data produces fallback content -- All 13 configs produce valid documents -- Empty config produces fallback content - -
- -
-Four content sources compose in AD-5 order (2 scenarios) - -#### Four content sources compose in AD-5 order - -**Invariant:** Reference documents always compose content in this order: conventions, then scoped diagrams, then shapes, then behaviors. Empty sources are omitted without placeholder sections. - -**Rationale:** AD-5 established that conceptual context (conventions and architectural diagrams) should precede implementation details (shapes and behaviors). This reading order helps developers understand the "why" before the "what". - -**Verified by:** - -- Composition follows AD-5 order -- Empty sources are omitted gracefully -- Composition order follows conventions-diagrams-shapes-behaviors -- Convention and behavior content compose together - -
- -
-Detail level controls output density (2 scenarios) - -#### Detail level controls output density - -**Invariant:** Three detail levels produce progressively more content from the same config. Summary: type tables only, no diagrams, no narrative. Standard: narrative and code examples, no rationale. Detailed: full rationale, property documentation, and scoped diagrams. - -**Rationale:** AI context windows need compact summaries. Human readers need full documentation. The same config serves both audiences by parameterizing the detail level at generation time. - -**Verified by:** - -- Summary level produces compact type tables -- Detailed level includes full source and rationale -- Summary produces compact tables -- Detailed includes full rationale - -
- -
-Generator registration produces paired detailed and summary outputs (2 scenarios) - -#### Generator registration produces paired detailed and summary outputs - -**Invariant:** Each ReferenceDocConfig produces exactly two generators (detailed for `docs/`, summary for `_claude-md/`) plus a meta-generator that invokes all pairs. Total: N configs x 2 + 1 = 2N + 1 generators. - -**Rationale:** Every reference document needs both a human-readable detailed version and an AI-optimized compact version. The meta-generator enables `pnpm docs:all` to produce every reference document in one pass. - -**Verified by:** - -- All 27 generators are registered from 13 configs -- Detailed generators use kebab-case-reference naming -- All 27 generators are registered -- Generators follow naming convention - -
- -### CodecBehaviorTesting - -[View CodecBehaviorTesting source](delivery-process/specs/codec-behavior-testing.feature) - -**Problem:** -Of 17 document codecs in src/renderable/codecs/, only 3 have behavior specs: - -- PatternsDocumentCodec (tested) -- BusinessRulesCodec (tested) -- ArchitectureDocumentCodec (tested) - -The remaining 14 codecs lack executable specs, meaning document generation -correctness is unverified. - -**Solution:** -Create behavior specs for each untested codec covering: - -- Input transformation (MasterDataset to RenderableDocument) -- Output structure (correct sections, headings, content) -- Edge cases (empty data, missing fields) - -**Business Value:** -| Benefit | How | -| Correctness | Generated docs match expected structure | -| Regression Prevention | Changes to codecs don't break output | -| Confidence | Safe to modify codec logic | - -
-Timeline codecs group patterns by phase and status (4 scenarios) - -#### Timeline codecs group patterns by phase and status - -**Invariant:** Roadmap shows planned work, Milestones shows completed work, CurrentWork shows active patterns only. - -**Verified by:** - -- RoadmapDocumentCodec groups by phase -- CompletedMilestonesCodec shows only completed -- CurrentWorkCodec shows only active -- Empty dataset produces minimal output -- RoadmapCodec grouping -- MilestonesCodec filtering -- CurrentWorkCodec filtering - -
- -
-Session codecs provide working context for AI sessions (2 scenarios) - -#### Session codecs provide working context for AI sessions - -**Invariant:** SessionContext shows active patterns with deliverables. RemainingWork aggregates incomplete work by phase. - -**Verified by:** - -- SessionContextCodec includes active pattern details -- RemainingWorkCodec aggregates by phase -- SessionContext content -- RemainingWork aggregation - -
- -
-Requirements codec produces PRD-style documentation (2 scenarios) - -#### Requirements codec produces PRD-style documentation - -**Invariant:** Features include problem, solution, business value. Acceptance criteria are formatted with bold keywords. - -**Verified by:** - -- RequirementsDocumentCodec includes full feature descriptions -- Acceptance criteria have bold keywords -- PRD structure -- Acceptance criteria formatting - -
- -
-Reporting codecs support release management and auditing (2 scenarios) - -#### Reporting codecs support release management and auditing - -**Invariant:** Changelog follows Keep a Changelog format. Traceability maps rules to scenarios. - -**Verified by:** - -- ChangelogCodec follows Keep a Changelog format -- TraceabilityCodec maps rules to scenarios -- Changelog format -- Traceability matrix - -
- -
-Planning codecs support implementation sessions (2 scenarios) - -#### Planning codecs support implementation sessions - -**Invariant:** Planning checklist includes DoD items. Session plan shows implementation steps. - -**Verified by:** - -- PlanningChecklistCodec includes deliverables -- SessionFindingsCodec captures discoveries -- Checklist items -- Session plan steps - -
- -### ClaudeModuleGeneration - -[View ClaudeModuleGeneration source](delivery-process/specs/claude-module-generation.feature) - -**Problem:** CLAUDE.md modules are hand-written markdown files that drift from source -code over time. When behavior specs or implementation details change, module content -becomes stale. Manual synchronization is tedious and error-prone. Different consumers -need different detail levels (compact for AI context, detailed for human reference). - -**Solution:** Generate CLAUDE.md modules directly from behavior spec feature files using -dedicated `claude-*` tags. The same source generates both: - -- Compact modules for `_claude-md/` (AI context optimized) -- Detailed documentation for `docs/` (human reference, progressive disclosure) - -Three tags control module generation: - -- `@libar-docs-claude-module` - Module identifier (becomes filename) -- `@libar-docs-claude-section` - Target section directory in `_claude-md/` -- `@libar-docs-claude-tags` - Tags for variation filtering in modular-claude-md - -**Why It Matters:** -| Benefit | How | -| Single source of truth | Behavior specs ARE the module content | -| Always-current modules | Generated on each docs build | -| Progressive disclosure | Same source → compact module + detailed docs | -| Preserves Rule structure | `Rule:` blocks become module sections | -| Extracts decision tables | `Scenario Outline Examples:` become lookup tables | -| CLI integration | `pnpm docs:claude-modules` via generator registry | - -**Prototype Example:** -The Process Guard behavior spec (`tests/features/validation/process-guard.feature`) -generates both `_claude-md/delivery-process/process-guard.md` and detailed docs. - -
-Claude module tags exist in the tag registry (3 scenarios) - -#### Claude module tags exist in the tag registry - -**Invariant:** Three claude-specific tags (`claude-module`, `claude-section`, `claude-tags`) must exist in the tag registry with correct format and values. - -**Rationale:** Module generation requires metadata to determine output path, section placement, and variation filtering. Standard tag infrastructure enables consistent extraction via the existing Gherkin parser. - -**Verified by:** - -- Tag registry contains claude-module -- Tag registry contains claude-section -- Tag registry contains claude-tags -- Tag registry contains - claude-section -- claude-section has enum values - -
- -
-Gherkin parser extracts claude module tags from feature files (4 scenarios) - -#### Gherkin parser extracts claude module tags from feature files - -**Invariant:** The Gherkin extractor must extract `claude-module`, `claude-section`, and `claude-tags` from feature file tags into ExtractedPattern objects. - -**Rationale:** Behavior specs are the source of truth for CLAUDE.md module content. Parser must extract module metadata alongside existing pattern metadata. - -**Verified by:** - -- Extract claude-module from feature tags -- Extract claude-section from feature tags -- Extract claude-tags as array -- Patterns without claude tags are not module candidates -- Extract claude-section - from feature tags -- Handle missing claude tags gracefully - -
- -
-Module content is extracted from feature file structure (4 scenarios) - -#### Module content is extracted from feature file structure - -**Invariant:** The codec must extract content from standard feature file elements: Feature description (Problem/Solution), Rule blocks, and Scenario Outline Examples. - -**Rationale:** Behavior specs already contain well-structured, prescriptive content. The extraction preserves structure rather than flattening to prose. - -**Verified by:** - -- Feature description becomes module introduction -- Rule blocks become module sections -- Scenario Outline Examples become decision tables -- Scenarios without Examples tables are not extracted -- Feature description becomes intro -- Rule names become section headers -- Rule descriptions become content -- Scenario Outline Examples become tables - -
- -
-ClaudeModuleCodec produces compact markdown modules (4 scenarios) - -#### ClaudeModuleCodec produces compact markdown modules - -**Invariant:** The codec transforms patterns with claude tags into markdown files suitable for the `_claude-md/` directory structure. - -**Rationale:** CLAUDE.md modules must be compact and actionable. The codec produces ready-to-use markdown without truncation (let modular-claude-md handle token budget warnings). - -**Verified by:** - -- Module uses correct heading levels -- Tables from rule descriptions are preserved -- Code blocks in descriptions are preserved -- See-also link to full documentation is included -- Output uses H3 for title -- Output uses H4 for rules -- Tables are - preserved -- See-also link is included - -
- -
-Claude module generator writes files to correct locations (4 scenarios) - -#### Claude module generator writes files to correct locations - -**Invariant:** The generator must write module files to `{outputDir}/{section}/{module}.md` based on the `claude-section` and `claude-module` tags. - -**Rationale:** Output path structure must match modular-claude-md expectations. The `claude-section` determines the subdirectory, `claude-module` determines filename. - -**Verified by:** - -- Output path uses section as directory -- Multiple modules generated from single run -- Generator skips patterns without claude-module tag -- Generator creates section directories if missing -- Output filename uses module name -- Multiple modules from single run -- Generator respects --overwrite flag - -
- -
-Claude module generator is registered with generator registry (3 scenarios) - -#### Claude module generator is registered with generator registry - -**Invariant:** A "claude-modules" generator must be registered with the generator registry to enable `pnpm docs:claude-modules` via the existing CLI. - -**Rationale:** Consistent with architecture-diagram-generation pattern. New generators register with the orchestrator rather than creating separate commands. - -**Verified by:** - -- Generator is registered with name "claude-modules" -- CLI command generates modules -- Generator supports fullDocsPath option -- Generator is registered -- CLI command works -- Generator options supported - -
- -
-Same source generates detailed docs with progressive disclosure (3 scenarios) - -#### Same source generates detailed docs with progressive disclosure - -**Invariant:** When running with `detailLevel: "detailed"`, the codec produces expanded documentation including all Rule content, code examples, and scenario details. - -**Rationale:** Single source generates both compact modules (AI context) and detailed docs (human reference). Progressive disclosure is already a codec capability. - -**Verified by:** - -- Detailed mode includes scenario descriptions -- Summary mode produces compact output for modules -- Standard mode is default for module generation -- Detailed mode includes scenarios -- Detailed mode includes code examples -- Summary mode produces compact output - -
- -### BusinessRulesGenerator - -[View BusinessRulesGenerator source](delivery-process/specs/business-rules-generator.feature) - -**Business Value:** Enable stakeholders to understand domain constraints without reading -implementation details or full feature files. - -**How It Works:** - -- Extract `Rule:` blocks from feature files -- Parse `**Invariant:**` and `**Rationale:**` annotations -- Generate organized Business Rules document by domain/phase -- Include traceability via `**Verified by:**` links to scenarios - -**Why It Matters:** -| Benefit | How | -| Domain knowledge capture | Invariants document what must always be true | -| Onboarding acceleration | New developers understand constraints quickly | -| Business alignment | Rationale explains why constraints exist | -| Audit readiness | Traceability shows which tests verify each rule | - -
-Extracts Rule blocks with Invariant and Rationale (2 scenarios) - -#### Extracts Rule blocks with Invariant and Rationale - -**Invariant:** Every `Rule:` block with `**Invariant:**` annotation must be extracted. Rules without annotations are included with rule name only. - -**Rationale:** Business rules are the core domain constraints. Extracting them separately from acceptance criteria creates a focused reference document for domain understanding. - -**Verified by:** - -- Extracts annotated Rule with Invariant and Rationale -- Extracts unannotated Rule with name only -- Extracts annotated Rule -- Extracts unannotated Rule - -
- -
-Organizes rules by domain category and phase (2 scenarios) - -#### Organizes rules by domain category and phase - -**Invariant:** Rules are grouped first by domain category (from `@libar-docs-*` flags), then by phase number for temporal ordering. - -**Rationale:** Domain-organized documentation helps stakeholders find rules relevant to their area of concern without scanning all rules. - -**Verified by:** - -- Groups rules by domain category -- Orders rules by phase within domain -- Groups rules by domain -- Orders by phase within domain - -
- -
-Preserves code examples and comparison tables (2 scenarios) - -#### Preserves code examples and comparison tables - -**Invariant:** DocStrings (`"""typescript`) and tables in Rule descriptions are rendered in the business rules document. - -**Rationale:** Code examples and tables provide concrete understanding of abstract rules. Removing them loses critical context. - -**Verified by:** - -- Includes code examples from DocStrings -- Includes comparison tables -- Includes code examples -- Includes tables - -
- -
-Generates scenario traceability links (2 scenarios) - -#### Generates scenario traceability links - -**Invariant:** Each rule's `**Verified by:**` section generates links to the scenarios that verify the rule. - -**Rationale:** Traceability enables audit compliance and helps developers find relevant tests when modifying rules. - -**Verified by:** - -- Generates scenario verification links -- Links include feature file locations -- Generates scenario links -- Links include file locations - -
- -### ArchitectureDiagramCore - -[View ArchitectureDiagramCore source](delivery-process/specs/architecture-diagram-core.feature) - -**Problem:** Architecture documentation requires manually maintaining mermaid diagrams -that duplicate information already encoded in source code. When code changes, -diagrams become stale. Manual sync is error-prone and time-consuming. - -**Solution:** Generate architecture diagrams automatically from source code annotations -using dedicated `arch-*` tags for precise control. Three tags classify components: - -- `@libar-docs-arch-role` - Component type (preset-configurable: service, handler, repository, etc.) -- `@libar-docs-arch-context` - Bounded context for subgraph grouping -- `@libar-docs-arch-layer` - Architectural layer (domain, application, infrastructure) - -**Why It Matters:** -| Benefit | How | -| Always-current diagrams | Generated from source annotations | -| Bounded context isolation | arch-context groups into subgraphs | -| Multiple diagram types | Component diagrams + layered diagrams | -| UML-inspired semantics | Relationship arrows match uses/depends-on/implements/extends | -| CLI integration | `pnpm docs:architecture` via generator registry | - -
-Architecture tags exist in the tag registry (3 scenarios) - -#### Architecture tags exist in the tag registry - -**Invariant:** Three architecture-specific tags (`arch-role`, `arch-context`, `arch-layer`) must exist in the tag registry with correct format and enum values. - -**Rationale:** Architecture diagram generation requires metadata to classify source files into diagram components. Standard tag infrastructure enables consistent extraction via the existing AST parser. - -**Note:** The `arch-role` enum values are configurable via presets: - `libar-generic` preset: generic roles (`service`, `repository`, `handler`, `infrastructure`) - `ddd-es-cqrs` preset: DDD-specific roles (`command-handler`, `projection`, `saga`, etc.) - -**Verified by:** - -- Tag registry contains arch-role -- Tag registry contains arch-context -- Tag registry contains arch-layer -- arch-role has enum values -- arch-layer has enum values - -
- -
-AST parser extracts architecture tags from TypeScript (5 scenarios) - -#### AST parser extracts architecture tags from TypeScript - -**Invariant:** The AST parser must extract `arch-role`, `arch-context`, and `arch-layer` tags from TypeScript JSDoc comments into DocDirective objects. - -**Rationale:** Source code annotations are the single source of truth for architectural metadata. Parser must extract them alongside existing pattern metadata. - -**Verified by:** - -- Extract arch-role from TypeScript annotation -- Extract arch-context from TypeScript annotation -- Extract arch-layer from TypeScript annotation -- Extract multiple arch tags together -- Missing arch tags yield undefined -- Extract arch-role from TypeScript -- Extract arch-context from TypeScript -- Extract arch-layer from TypeScript -- Extract all three together - -
- -
-MasterDataset builds archIndex during transformation (4 scenarios) - -#### MasterDataset builds archIndex during transformation - -**Invariant:** The `transformToMasterDataset` function must build an `archIndex` that groups patterns by role, context, and layer for efficient diagram generation. - -**Rationale:** Single-pass extraction during dataset transformation avoids expensive re-traversal. Index structure enables O(1) lookup by each dimension. - -**Verified by:** - -- archIndex groups patterns by arch-role -- archIndex groups patterns by arch-context -- archIndex groups patterns by arch-layer -- archIndex.all contains all patterns with any arch tag -- archIndex groups by role -- archIndex groups by context -- archIndex groups by layer -- archIndex.all contains all arch-annotated patterns - -
- -
-Component diagrams group patterns by bounded context (7 scenarios) - -#### Component diagrams group patterns by bounded context - -**Invariant:** Component diagrams must render patterns as nodes grouped into bounded context subgraphs, with relationship arrows using UML-inspired styles. - -**Rationale:** Component diagrams visualize system architecture showing how bounded contexts isolate components. Subgraphs enforce visual separation. - -**Verified by:** - -- Generate subgraphs per bounded context -- Patterns without arch-context go to Shared Infrastructure -- Render uses relationship as solid arrow -- Render depends-on relationship as dashed arrow -- Render implements relationship as dotted arrow -- Render extends relationship as open arrow -- Arrows only render between annotated components -- Group context-less patterns - in Shared Infrastructure -- Render uses as solid arrow -- Render depends-on as dashed arrow - -
- -### ArchitectureDiagramAdvanced - -[View ArchitectureDiagramAdvanced source](delivery-process/specs/architecture-diagram-advanced.feature) - -**Problem:** Core diagram generation (see ArchitectureDiagramCore) produces -component-level diagrams from `arch-*` tags. However, large codebases need -additional visualization modes: layered views grouping patterns by architectural -layer, CLI-integrated generation via the generator registry, and sequence -diagrams showing runtime interaction flows between components. - -**Solution:** Extend the architecture diagram system with advanced capabilities: - -- Layered diagrams that group patterns by `@libar-docs-arch-layer` (domain, application, infrastructure) -- Generator registry integration for CLI-driven generation via `pnpm docs:architecture` -- Sequence diagram support for modeling runtime interactions between components - -**Why It Matters:** -| Benefit | How | -| Layer visibility | Layered diagrams reveal architectural boundaries | -| CLI integration | Generator registry enables `pnpm docs:architecture` | -| Runtime modeling | Sequence diagrams show interaction flows | -| Composable views | Multiple diagram types from the same annotations | - -
-Layered diagrams group patterns by architectural layer (4 scenarios) - -#### Layered diagrams group patterns by architectural layer - -**Invariant:** Layered diagrams must render patterns grouped by architectural layer (domain, application, infrastructure) with top-to-bottom flow. - -**Rationale:** Layered architecture visualization shows dependency direction - infrastructure at top, domain at bottom - following conventional layer ordering. - -**Verified by:** - -- Generate subgraphs per layer -- Layer order is infrastructure-application-domain -- Include context label in node names -- Patterns without layer go to Other subgraph - -
- -
-Architecture generator is registered with generator registry (5 scenarios) - -#### Architecture generator is registered with generator registry - -**Invariant:** An "architecture" generator must be registered with the generator registry to enable `pnpm docs:architecture` via the existing `generate-docs.js` CLI. - -**Rationale:** The delivery-process uses a generator registry pattern. New generators register with the orchestrator rather than creating separate CLI commands. - -**Verified by:** - -- Architecture generator is registered -- Generator produces component diagram by default -- Generator option for layered diagram -- Generator option for context filtering -- npm script pnpm docs:architecture works -- Generator is registered -- Generator produces component diagram -- Generator produces layered diagram -- npm script works - -
- -
-Sequence diagrams render interaction flows (3 scenarios) - -#### Sequence diagrams render interaction flows - -**Invariant:** Sequence diagrams must render interaction flows (command flow, saga flow) showing step-by-step message passing between components. - -**Rationale:** Component diagrams show structure but not behavior. Sequence diagrams show runtime flow - essential for understanding command/saga execution. - -**Verified by:** - -- Generate command flow sequence diagram -- Generate saga flow sequence diagram -- Participant ordering follows architectural layers -- Generate command flow sequence -- Generate saga flow sequence - -
- -### ArchitectureDelta - -[View ArchitectureDelta source](delivery-process/specs/architecture-delta.feature) - -**Problem:** -Architecture evolution is not visible between releases. -Breaking changes are not clearly documented. -New constraints introduced by phases are hard to track. -No automated way to generate "what changed" for a release. - -**Solution:** -Generate ARCH-DELTA.md showing changes since last release: - -- New patterns introduced (with ADR references) -- Deprecated patterns (with replacement guidance) -- New constraints (with rationale) -- Breaking changes (with migration notes) - -Uses git tags to determine release boundaries. -Uses @libar-docs-decision, @libar-docs-replaces annotations. - -Implements Convergence Opportunity 5: Architecture Change Control. - -### ADR006SingleReadModelArchitecture - -[View ADR006SingleReadModelArchitecture source](delivery-process/decisions/adr-006-single-read-model-architecture.feature) - -**Context:** -The delivery-process package applies event sourcing to itself: git is -the event store, annotated source files are authoritative state, generated -documentation is a projection. The MasterDataset is the read model — -produced by a single-pass O(n) transformer with pre-computed views -and a relationship index. - -ADR-005 established that codecs consume MasterDataset as their sole input. -The ProcessStateAPI consumes it. But the validation layer bypasses it, -wiring its own mini-pipeline from raw scanner/extractor output. It creates -a lossy local type that discards relationship data, then discovers it -lacks the information needed — requiring ad-hoc re-derivation of what -the MasterDataset already computes. - -This is the same class of problem the MasterDataset was created to solve. -Before the single-pass transformer, each generator called `.filter()` -independently. The MasterDataset eliminated that duplication for codecs. -This ADR extends the same principle to all consumers. - -**Decision:** -The MasterDataset is the single read model for all consumers. No consumer -re-derives pattern data from raw scanner/extractor output when that data -is available in the MasterDataset. Validators, codecs, and query APIs -consume the same pre-computed read model. - -**Consequences:** -| Type | Impact | -| Positive | Relationship resolution happens once — no consumer re-derives implements, uses, or dependsOn | -| Positive | Eliminates lossy local types that discard fields from canonical ExtractedPattern | -| Positive | Validation rules automatically benefit from new MasterDataset views and indices | -| Positive | Aligns with the monorepo's own ADR-006: projections for all reads, never query aggregate state | -| Negative | Validators that today only need stage 1-2 data will import the transformer | -| Negative | MasterDataset schema changes affect more consumers | - -
-All feature consumers query the read model, not raw state - -#### All feature consumers query the read model, not raw state - -**Invariant:** Code that needs pattern relationships, status groupings, cross-source resolution, or dependency information consumes the MasterDataset. Direct scanner/extractor imports are permitted only in pipeline orchestration code that builds the MasterDataset. Exception: `lint-patterns.ts` is a pure stage-1 consumer. It validates annotation syntax on scanned files. No relationships, no cross-source resolution. Direct scanner consumption is correct for that use case. - -| Layer | May Import | Examples | -| ---------------------- | -------------------------------- | --------------------------------------------------- | -| Pipeline Orchestration | scanner/, extractor/, pipeline/ | orchestrator.ts, process-api.ts pipeline setup | -| Feature Consumption | MasterDataset, relationshipIndex | codecs, ProcessStateAPI, validators, query handlers | - -
- -
-No lossy local types - -#### No lossy local types - -**Invariant:** Consumers do not define local DTOs that duplicate and discard fields from ExtractedPattern. If a consumer needs a subset, the type system provides the projection — not a hand-written extraction function that becomes a barrier between the consumer and canonical data. - -
- -
-Relationship resolution is computed once - -#### Relationship resolution is computed once - -**Invariant:** Forward relationships (uses, dependsOn, implementsPatterns) and reverse lookups (usedBy, implementedBy, extendedBy) are computed in `transformToMasterDataset()`. No consumer re-derives these from raw pattern arrays or scanned file tags. - -
- -
-Three named anti-patterns - -#### Three named anti-patterns - -**Invariant:** These are recognized violations, serving as review criteria for new code and refactoring targets for existing code: Naming them makes them visible in code review — including AI-assisted sessions where the default proposal is often "add a helper function." - -**Good vs Bad** - -**References** - -- Monorepo ADR-006: Projections for All Reads (same principle, application domain) -- ADR-005: Codec-Based Markdown Rendering (established MasterDataset as codec input) -- Order-management ARCHITECTURE.md: CommandOrchestrator + Read Model separation - -| Anti-Pattern | Detection Signal | -| ----------------------- | ---------------------------------------------------------------------------------------- | -| Parallel Pipeline | Feature consumer imports from scanner/ or extractor/ | -| Lossy Local Type | Local interface with subset of ExtractedPattern fields + dedicated extraction function | -| Re-derived Relationship | Building Map or Set from pattern.implementsPatterns, uses, or dependsOn in consumer code | - -```typescript -// Good: consume the read model - function validateCrossSource(dataset: RuntimeMasterDataset): ValidationSummary { - const rel = dataset.relationshipIndex[patternName]; - const isImplemented = rel.implementedBy.length > 0; - } - - // Bad: re-derive from raw state (Parallel Pipeline + Re-derived Relationship) - function buildImplementsLookup( - gherkinFiles: readonly ScannedGherkinFile[], - tsPatterns: readonly ExtractedPattern[] - ): ReadonlySet { ... } -``` - -
- -### ADR005CodecBasedMarkdownRendering - -[View ADR005CodecBasedMarkdownRendering source](delivery-process/decisions/adr-005-codec-based-markdown-rendering.feature) - -**Context:** -The documentation generator needs to transform structured pattern data -(MasterDataset) into markdown files. The initial approach used direct -string concatenation in generator functions, mixing data selection, -formatting logic, and output assembly in a single pass. This made -generators hard to test, difficult to compose, and impossible to -render the same data in different formats (e.g., full docs vs compact -AI context). - -**Decision:** -Adopt a codec architecture inspired by serialization codecs (encode/decode). -Each document type has a codec that decodes a MasterDataset into a -RenderableDocument — an intermediate representation of sections, headings, -tables, paragraphs, and code blocks. A separate renderer transforms the -RenderableDocument into markdown. This separates data selection (what to -include) from formatting (how it looks) from serialization (markdown syntax). - -**Consequences:** -| Type | Impact | -| Positive | Codecs are pure functions: dataset in, document out -- trivially testable | -| Positive | RenderableDocument is an inspectable IR -- tests assert on structure, not strings | -| Positive | Composable via CompositeCodec -- reference docs assemble from child codecs | -| Positive | Same dataset can produce different outputs (full doc, compact doc, AI context) | -| Negative | Extra abstraction layer between data and output | -| Negative | RenderableDocument vocabulary must cover all needed output patterns | - -**Benefits:** -| Benefit | Before (String Concat) | After (Codec) | -| Testability | Assert on markdown strings | Assert on typed section blocks | -| Composability | Copy-paste between generators | CompositeCodec assembles children | -| Format variants | Duplicate generator logic | Same codec, different renderer | -| Progressive disclosure | Manual heading management | Heading depth auto-calculated | - -
-Codecs implement a decode-only contract (2 scenarios) - -#### Codecs implement a decode-only contract - -**Invariant:** Every codec is a pure function that accepts a MasterDataset and returns a RenderableDocument. Codecs do not perform side effects, do not write files, and do not access the filesystem. The codec contract is decode-only because the transformation is one-directional: structured data becomes a document, never the reverse. - -**Rationale:** Pure functions are deterministic and trivially testable. For the same MasterDataset, a codec always produces the same RenderableDocument. This makes snapshot testing reliable and enables codec output comparison across versions. - -**Codec call signature:** - -```typescript -interface DocumentCodec { - decode(dataset: MasterDataset): RenderableDocument; -} -``` - -**Verified by:** - -- Codec produces deterministic output -- Codec has no side effects - -
- -
-RenderableDocument is a typed intermediate representation (2 scenarios) - -#### RenderableDocument is a typed intermediate representation - -**Invariant:** RenderableDocument contains a title, an ordered array of SectionBlock elements, and an optional record of additional files. Each SectionBlock is a discriminated union: heading, paragraph, table, code, list, separator, or metaRow. The renderer consumes this IR without needing to know which codec produced it. - -**Rationale:** A typed IR decouples codecs from rendering. Codecs express intent ("this is a table with these rows") and the renderer handles syntax ("pipe-delimited markdown with separator row"). This means switching output format (e.g., HTML instead of markdown) requires only a new renderer, not changes to every codec. - -**Section block types:** - -| Block Type | Purpose | Markdown Output | -| ---------- | ----------------------------- | --------------------------- | -| heading | Section title with depth | ## Title (depth-adjusted) | -| paragraph | Prose text | Plain text with blank lines | -| table | Structured data | Pipe-delimited table | -| code | Code sample with language | Fenced code block | -| list | Ordered or unordered items | - item or 1. item | -| separator | Visual break between sections | --- | -| metaRow | Key-value metadata | **Key:** Value | - -**Verified by:** - -- All block types render to markdown -- Unknown block type is rejected - -
- -
-CompositeCodec assembles documents from child codecs (2 scenarios) - -#### CompositeCodec assembles documents from child codecs - -**Invariant:** CompositeCodec accepts an array of child codecs and produces a single RenderableDocument by concatenating their sections. Child codec order determines section order in the output. Separators are inserted between children by default. - -**Rationale:** Reference documents combine content from multiple domains (patterns, conventions, shapes, diagrams). Rather than building a monolithic codec that knows about all content types, CompositeCodec lets each domain own its codec and composes them declaratively. - -**Composition example:** - -```typescript -const referenceDoc = CompositeCodec.create({ - title: 'Architecture Reference', - codecs: [ - behaviorCodec, // patterns with rules - conventionCodec, // decision records - shapeCodec, // type definitions - diagramCodec, // mermaid diagrams - ], -}); -``` - -**Verified by:** - -- Child sections appear in codec array order -- Empty children are skipped without separators - -
- -
-ADR content comes from both Feature description and Rule prefixes (3 scenarios) - -#### ADR content comes from both Feature description and Rule prefixes - -**Invariant:** ADR structured content (Context, Decision, Consequences) can appear in two locations within a feature file. Both sources must be rendered. Silently dropping either source causes content loss. - -**Rationale:** Early ADRs used name prefixes like "Context - ..." and "Decision - ..." on Rule blocks to structure content. Later ADRs placed Context, Decision, and Consequences as bold-annotated prose in the Feature description, reserving Rule: blocks for invariants and design rules. Both conventions are valid. The ADR codec must handle both because the codebase contains ADRs authored in each style. The Feature description lives in pattern.directive.description. If the codec only renders Rules (via partitionRulesByPrefix), then Feature description content is silently dropped -- no error, no warning. This caused confusion across two repos where ADR content appeared in the feature file but was missing from generated docs. The fix renders pattern.directive.description in buildSingleAdrDocument between the Overview metadata table and the partitioned Rules section, using renderFeatureDescription() which walks content linearly and handles prose, tables, and DocStrings with correct interleaving. - -| Source | Location | Example | Rendered Via | -| ------------------- | ----------------------------------- | ------------------------- | -------------------------- | -| Rule prefix | Rule: Context - ... | ADR-001 (taxonomy) | partitionRulesByPrefix() | -| Feature description | **Context:** prose in Feature block | ADR-005 (codec rendering) | renderFeatureDescription() | - -**Verified by:** - -- Feature description content is rendered -- Rule prefix content is rendered -- Both sources combine in single ADR - -
- -
-The markdown renderer is codec-agnostic (2 scenarios) - -#### The markdown renderer is codec-agnostic - -**Invariant:** The renderer accepts any RenderableDocument regardless of which codec produced it. Rendering depends only on block types, not on document origin. This enables testing codecs and renderers independently. - -**Rationale:** If the renderer knew about specific codecs, adding a new codec would require renderer changes. By operating purely on the SectionBlock discriminated union, the renderer is closed for modification but open for extension via new block types. - -**Verified by:** - -- Same renderer handles different codec outputs -- Renderer and codec are tested independently - -
- -### TestContentBlocks - -[View TestContentBlocks source](tests/features/poc/test-content-blocks.feature) - -This feature demonstrates what content blocks are captured and rendered -by the PRD generator. Use this as a reference for writing rich specs. - -**Overview** - -The delivery process supports **rich Markdown** in descriptions: - -- Bullet points work -- _Italics_ and **bold** work -- `inline code` works - -**Custom Section** - -You can create any section you want using bold headers. -This content will appear in the PRD Description section. - -#### Business rules appear as a separate section - -Rule descriptions provide context for why this business rule exists. -You can include multiple paragraphs here. - - This is a second paragraph explaining edge cases or exceptions. - -**Verified by:** - -- Scenario with DocString for rich content -- Scenario with DataTable for structured data - -#### Multiple rules create multiple Business Rule entries - -Each Rule keyword creates a separate entry in the Business Rules section. -This helps organize complex features into logical business domains. - -**Verified by:** - -- Simple scenario under second rule -- Scenario with examples table - -### RuleKeywordPoC - -[View RuleKeywordPoC source](tests/features/poc/rule-keyword-poc.feature) - -This feature tests whether vitest-cucumber supports the Rule keyword -for organizing scenarios under business rules. - -#### Basic arithmetic operations work correctly - -The calculator should perform standard math operations -with correct results. - -**Verified by:** - -- Addition of two positive numbers -- Subtraction of two numbers - -#### Division has special constraints - -Division by zero must be handled gracefully to prevent -system errors. - -**Verified by:** - -- Division of two numbers -- Division by zero is prevented - -### WarningCollectorTesting - -[View WarningCollectorTesting source](tests/features/doc-generation/warning-collector.feature) - -The warning collector provides a unified system for capturing, categorizing, -and reporting non-fatal issues during document generation. It replaces -scattered console.warn calls with structured warning handling that integrates -with the Result pattern. - -
-Warnings are captured with source context (3 scenarios) - -#### Warnings are captured with source context - -**Invariant:** Each captured warning must include the source file path, optional line number, and category for precise identification. - -**Rationale:** Context-free warnings are impossible to act on — developers need to know which file and line produced the warning to fix the underlying issue. - -**Verified by:** - -- Warning includes source file -- Warning includes line number when available -- Warning includes category - -
- -
-Warnings are categorized for filtering and grouping (3 scenarios) - -#### Warnings are categorized for filtering and grouping - -**Invariant:** Warnings must support multiple categories and be filterable by both category and source file. - -**Rationale:** Large codebases produce many warnings — filtering by category or file lets developers focus on one concern at a time instead of triaging an overwhelming flat list. - -**Verified by:** - -- Warning categories are supported -- Warnings can be filtered by category -- Warnings can be filtered by source file - -
- -
-Warnings are aggregated across the pipeline (3 scenarios) - -#### Warnings are aggregated across the pipeline - -**Invariant:** Warnings from multiple pipeline stages must be collected into a single aggregated view, groupable by source file and summarizable by category counts. - -**Rationale:** Pipeline stages run independently — without aggregation, warnings would be scattered across stage outputs, making it impossible to see the full picture. - -**Verified by:** - -- Warnings from multiple stages are collected -- Warnings are grouped by source file -- Summary counts by category - -
- -
-Warnings integrate with the Result pattern (3 scenarios) - -#### Warnings integrate with the Result pattern - -**Invariant:** Warnings must propagate through the Result monad, being preserved in both successful and failed results and across pipeline stages. - -**Rationale:** The Result pattern is the standard error-handling mechanism — warnings that don't propagate through Results would be silently lost when functions compose. - -**Verified by:** - -- Successful result includes warnings -- Failed result includes warnings collected before failure -- Warnings propagate through pipeline - -
- -
-Warnings can be formatted for different outputs (3 scenarios) - -#### Warnings can be formatted for different outputs - -**Invariant:** Warnings must be formattable as colored console output, machine-readable JSON, and markdown for documentation, each with appropriate structure. - -**Rationale:** Different consumers need different formats — CI pipelines parse JSON, developers read console output, and generated docs embed markdown. - -**Verified by:** - -- Console format includes color and location -- JSON format is machine-readable -- Markdown format for documentation - -
- -
-Existing console.warn calls are migrated to collector (2 scenarios) - -#### Existing console.warn calls are migrated to collector - -**Invariant:** Pipeline components (source mapper, shape extractor) must use the warning collector instead of direct console.warn calls. - -**Rationale:** Direct console.warn calls bypass aggregation and filtering — migrating to the collector ensures all warnings are captured, categorized, and available for programmatic consumption. - -**Verified by:** - -- Source mapper uses warning collector -- Shape extractor uses warning collector - -
- -### ValidationRulesCodecTesting - -[View ValidationRulesCodecTesting source](tests/features/doc-generation/validation-rules-codec.feature) - -Validates the Validation Rules Codec that transforms MasterDataset into a -RenderableDocument for Process Guard validation rules reference (VALIDATION-RULES.md). - -
-Document metadata is correctly set (3 scenarios) - -#### Document metadata is correctly set - -**Invariant:** The validation rules document must have the title "Validation Rules", a purpose describing Process Guard, and a detail level reflecting the generateDetailFiles option. - -**Rationale:** Accurate metadata ensures the validation rules document is correctly indexed in the generated documentation site. - -**Verified by:** - -- Document title is Validation Rules -- Document purpose describes Process Guard -- Detail level reflects generateDetailFiles option - -
- -
-All validation rules are documented in a table (2 scenarios) - -#### All validation rules are documented in a table - -**Invariant:** All 6 Process Guard validation rules must appear in the rules table with their correct severity levels (error or warning). - -**Rationale:** The rules table is the primary reference for understanding what Process Guard enforces — missing rules would leave developers surprised by undocumented validation failures. - -**Verified by:** - -- All 6 rules appear in table -- Rules have correct severity levels - -
- -
-FSM state diagram is generated from transitions (3 scenarios) - -#### FSM state diagram is generated from transitions - -**Invariant:** When includeFSMDiagram is enabled, a Mermaid state diagram showing all 4 FSM states and their transitions must be generated; when disabled, the diagram section must be omitted. - -**Rationale:** The state diagram is the most intuitive representation of allowed transitions — it answers "where can I go from here?" faster than a text table. - -**Verified by:** - -- Mermaid diagram generated when includeFSMDiagram enabled -- Diagram includes all 4 states -- FSM diagram excluded when includeFSMDiagram disabled - -
- -
-Protection level matrix shows status protections (2 scenarios) - -#### Protection level matrix shows status protections - -**Invariant:** When includeProtectionMatrix is enabled, a matrix showing all 4 statuses with their protection levels must be generated; when disabled, the section must be omitted. - -**Rationale:** The protection matrix explains why certain edits are blocked — without it, developers encounter cryptic "scope-creep" or "completed-protection" errors without understanding the underlying model. - -**Verified by:** - -- Matrix shows all 4 statuses with protection levels -- Protection matrix excluded when includeProtectionMatrix disabled - -
- -
-CLI usage is documented with options and exit codes (4 scenarios) - -#### CLI usage is documented with options and exit codes - -**Invariant:** When includeCLIUsage is enabled, the document must include CLI example code, all 6 options, and exit code documentation; when disabled, the section must be omitted. - -**Rationale:** CLI documentation in the validation rules doc provides a single reference for both the rules and how to run them — separate docs would fragment the developer experience. - -**Verified by:** - -- CLI example code block included -- All 6 CLI options documented -- Exit codes documented -- CLI section excluded when includeCLIUsage disabled - -
- -
-Escape hatches are documented for special cases (2 scenarios) - -#### Escape hatches are documented for special cases - -**Invariant:** When includeEscapeHatches is enabled, all 3 escape hatch mechanisms must be documented; when disabled, the section must be omitted. - -**Rationale:** Escape hatches prevent the validation system from becoming a blocker — developers need to know how to safely bypass rules for legitimate exceptions. - -**Verified by:** - -- All 3 escape hatches documented -- Escape hatches section excluded when includeEscapeHatches disabled - -
- -### TaxonomyCodecTesting - -[View TaxonomyCodecTesting source](tests/features/doc-generation/taxonomy-codec.feature) - -Validates the Taxonomy Codec that transforms MasterDataset into a -RenderableDocument for tag taxonomy reference documentation (TAXONOMY.md). - -
-Document metadata is correctly set (3 scenarios) - -#### Document metadata is correctly set - -**Invariant:** The taxonomy document must have the title "Taxonomy Reference", a descriptive purpose string, and a detail level reflecting the generateDetailFiles option. - -**Rationale:** Document metadata drives the table of contents and navigation in generated doc sites — incorrect metadata produces broken links and misleading titles. - -**Verified by:** - -- Document title is Taxonomy Reference -- Document purpose describes tag taxonomy -- Detail level reflects generateDetailFiles option - -
- -
-Categories section is generated from TagRegistry (3 scenarios) - -#### Categories section is generated from TagRegistry - -**Invariant:** The categories section must render all categories from the configured TagRegistry as a table, with optional linkOut to detail files when progressive disclosure is enabled. - -**Rationale:** Categories are the primary navigation structure in the taxonomy — missing categories leave developers unable to find the correct annotation tags. - -**Verified by:** - -- Categories section is included in output -- Category table has correct columns -- LinkOut to detail file when generateDetailFiles enabled - -
- -
-Metadata tags can be grouped by domain (2 scenarios) - -#### Metadata tags can be grouped by domain - -**Invariant:** When groupByDomain is enabled, metadata tags must be organized into domain-specific subsections; when disabled, a single flat table must be rendered. - -**Rationale:** Domain grouping improves scannability for large tag sets (21 categories in ddd-es-cqrs) while flat mode is simpler for small presets (3 categories in generic). - -**Verified by:** - -- With groupByDomain enabled tags are grouped into subsections -- With groupByDomain disabled single table rendered - -
- -
-Tags are classified into domains by hardcoded mapping (5 scenarios) - -#### Tags are classified into domains by hardcoded mapping - -**Invariant:** Tags must be classified into domains (Core, Relationship, Timeline, etc.) using a hardcoded mapping, with unrecognized tags placed in an "Other Tags" group. - -**Rationale:** Domain classification is stable across releases — hardcoding prevents miscategorization from user config errors while the "Other" fallback handles future tag additions gracefully. - -**Verified by:** - -- Core tags correctly classified -- Relationship tags correctly classified -- Timeline tags correctly classified -- ADR prefix matching works -- Unknown tags go to Other Tags group - -
- -
-Optional sections can be disabled via codec options (3 scenarios) - -#### Optional sections can be disabled via codec options - -**Invariant:** Format Types, Presets, and Architecture sections must each be independently disableable via their respective codec option flags. - -**Rationale:** Not all projects need all sections — disabling irrelevant sections reduces generated document size and prevents confusion from inapplicable content. - -**Verified by:** - -- includeFormatTypes disabled excludes Format Types section -- includePresets disabled excludes Presets section -- includeArchDiagram disabled excludes Architecture section - -
- -
-Detail files are generated for progressive disclosure (3 scenarios) - -#### Detail files are generated for progressive disclosure - -**Invariant:** When generateDetailFiles is enabled, the codec must produce additional detail files (one per domain group) alongside the main taxonomy document; when disabled, no additional files are created. - -**Rationale:** Progressive disclosure keeps the main document scannable while providing deep-dive content in linked pages — monolithic documents become unwieldy for large tag sets. - -**Verified by:** - -- generateDetailFiles creates 3 additional files -- Detail files have correct paths -- generateDetailFiles disabled creates no additional files - -
- -
-Format types are documented with descriptions and examples (1 scenarios) - -#### Format types are documented with descriptions and examples - -**Invariant:** All 6 format types must be documented with descriptions and usage examples in the generated taxonomy. - -**Rationale:** Format types control how tag values are parsed — undocumented formats force developers to guess the correct syntax, leading to annotation errors. - -**Verified by:** - -- All 6 format types are documented - -
- -### SourceMappingValidatorTesting - -[View SourceMappingValidatorTesting source](tests/features/doc-generation/source-mapping-validator.feature) - -**Context:** Source mappings reference files that may not exist, use invalid -extraction methods, or have incompatible method-file combinations. Without -pre-flight validation, extraction fails late with confusing errors. - -**Approach:** Validate file existence, extraction method validity, and format -correctness before extraction begins. Collect all errors rather than stopping -at the first one, enabling users to fix all issues in a single iteration. - -
-Source files must exist and be readable (5 scenarios) - -#### Source files must exist and be readable - -**Invariant:** All source file paths in mappings must resolve to existing, readable files. - -**Rationale:** Prevents extraction failures and provides clear error messages upfront. - -**Verified by:** - -- Existing file passes validation -- Missing file produces error with path -- Directory instead of file produces error -- THIS DECISION skips file validation -- THIS DECISION with rule reference skips file validation -- @acceptance-criteria scenarios below. - -
- -
-Extraction methods must be valid and supported (4 scenarios) - -#### Extraction methods must be valid and supported - -**Invariant:** Extraction methods must match a known method from the supported set. - -**Rationale:** Invalid methods cannot extract content; suggest valid alternatives. - -**Verified by:** - -- Valid extraction methods pass validation -- Unknown method produces error with suggestions -- Empty method produces error -- Method aliases are normalized -- @acceptance-criteria scenarios below. - -
- -
-Extraction methods must be compatible with file types (4 scenarios) - -#### Extraction methods must be compatible with file types - -**Invariant:** Method-file combinations must be compatible (e.g., TypeScript methods for .ts files). - -**Rationale:** Incompatible combinations fail at extraction; catch early with clear guidance. - -**Verified by:** - -- TypeScript method on feature file produces error -- Gherkin method on TypeScript file produces error -- Compatible method-file combination passes -- Self-reference method on actual file produces error -- @acceptance-criteria scenarios below. - -
- -
-Source mapping tables must have required columns (3 scenarios) - -#### Source mapping tables must have required columns - -**Invariant:** Tables must contain Section, Source File, and Extraction Method columns. - -**Rationale:** Missing columns prevent extraction; alternative column names are mapped. - -**Verified by:** - -- Missing Section column produces error -- Missing Source File column produces error -- Alternative column names are accepted -- @acceptance-criteria scenarios below. - -
- -
-All validation errors are collected and returned together (2 scenarios) - -#### All validation errors are collected and returned together - -**Invariant:** Validation collects all errors before returning, not just the first. - -**Rationale:** Enables users to fix all issues in a single iteration. - -**Verified by:** - -- Multiple errors are aggregated -- Warnings are collected alongside errors -- @acceptance-criteria scenarios below. - -
- -### SourceMapperTesting - -[View SourceMapperTesting source](tests/features/doc-generation/source-mapper.feature) - -The Source Mapper aggregates content from multiple source files based on -source mapping tables parsed from decision documents. It dispatches extraction -to appropriate handlers based on extraction method and preserves ordering. - -
-Extraction methods dispatch to correct handlers (3 scenarios) - -#### Extraction methods dispatch to correct handlers - -**Invariant:** Each extraction method type (self-reference, TypeScript, Gherkin) must dispatch to the correct specialized handler based on the source file type or marker. - -**Rationale:** Wrong dispatch would apply TypeScript extraction logic to Gherkin files (or vice versa), producing garbled or empty results. - -**Verified by:** - -- Dispatch to decision extraction for THIS DECISION -- Dispatch to TypeScript extractor for .ts files -- Dispatch to behavior spec extractor for .feature files - -
- -
-Self-references extract from current decision document (3 scenarios) - -#### Self-references extract from current decision document - -**Invariant:** THIS DECISION self-references must extract content from the current decision document using rule descriptions, DocStrings, or full document access. - -**Rationale:** Self-references avoid circular file reads — the document content is already in memory, so extraction is a lookup operation rather than a file I/O operation. - -**Verified by:** - -- Extract from THIS DECISION using rule description -- Extract DocStrings from THIS DECISION -- Extract full document from THIS DECISION - -
- -
-Multiple sources are aggregated in mapping order (2 scenarios) - -#### Multiple sources are aggregated in mapping order - -**Invariant:** When multiple source mappings target the same section, their extracted content must be aggregated in the order defined by the mapping table. - -**Rationale:** Mapping order is intentional — authors structure their source tables to produce a logical reading flow, and reordering would break the narrative. - -**Verified by:** - -- Aggregate from multiple sources -- Ordering is preserved from mapping table - -
- -
-Missing files produce warnings without failing (3 scenarios) - -#### Missing files produce warnings without failing - -**Invariant:** When a referenced source file does not exist, the mapper must produce a warning and continue processing remaining mappings rather than failing entirely. - -**Rationale:** Partial extraction is more useful than total failure — a decision document with most sections populated and one warning is better than no document at all. - -**Verified by:** - -- Missing source file produces warning -- Partial extraction when some files missing -- Validation checks all files before extraction - -
- -
-Empty extraction results produce info warnings (2 scenarios) - -#### Empty extraction results produce info warnings - -**Invariant:** When extraction succeeds but produces empty results (no matching shapes, no matching rules), an informational warning must be generated. - -**Rationale:** Empty results often indicate stale source mappings pointing to renamed or removed content — warnings surface these issues before they reach generated output. - -**Verified by:** - -- Empty shapes extraction produces info warning -- No matching rules produces info warning - -
- -
-Extraction methods are normalized for dispatch (2 scenarios) - -#### Extraction methods are normalized for dispatch - -**Invariant:** Extraction method strings must be normalized to canonical forms before dispatch, with unrecognized methods producing a warning. - -**Rationale:** Users write extraction methods in natural language — normalization bridges the gap between human-readable table entries and programmatic dispatch keys. - -**Verified by:** - -- Normalize various extraction method formats -- Unknown extraction method produces warning - -
- -### RobustnessIntegration - -[View RobustnessIntegration source](tests/features/doc-generation/robustness-integration.feature) - -**Context:** Document generation pipeline needs validation, deduplication, and -warning collection to work together correctly for production use. - -**Approach:** Integration tests verify the full pipeline with all robustness -features enabled, ensuring validation runs first, deduplication merges content, -and warnings are collected across stages. - -
-Validation runs before extraction in the pipeline (3 scenarios) - -#### Validation runs before extraction in the pipeline - -**Invariant:** Validation must complete and pass before extraction begins. - -**Rationale:** Prevents wasted extraction work and provides clear fail-fast behavior. - -**Verified by:** - -- Valid decision document generates successfully -- Invalid mapping halts pipeline before extraction -- Multiple validation errors are reported together -- @acceptance-criteria scenarios below. - - The validation layer must run first and halt the pipeline if errors - are found - -- preventing wasted extraction work. - -
- -
-Deduplication runs after extraction before assembly (2 scenarios) - -#### Deduplication runs after extraction before assembly - -**Invariant:** Deduplication processes all extracted content before document assembly. - -**Rationale:** All sources must be extracted to identify cross-source duplicates. - -**Verified by:** - -- Duplicate content is removed from final output -- Non-duplicate sections are preserved -- @acceptance-criteria scenarios below. - - Content from all sources is extracted first - -- then deduplicated -- then assembled into the final document. - -
- -
-Warnings from all stages are collected and reported (2 scenarios) - -#### Warnings from all stages are collected and reported - -**Invariant:** Warnings from all pipeline stages are aggregated in the result. - -**Rationale:** Users need visibility into non-fatal issues without blocking generation. - -**Verified by:** - -- Warnings are collected across pipeline stages -- Warnings do not prevent successful generation -- @acceptance-criteria scenarios below. - - Non-fatal issues from validation - -- extraction -- and deduplication are - collected and included in the result. - -
- -
-Pipeline provides actionable error messages (3 scenarios) - -#### Pipeline provides actionable error messages - -**Invariant:** Error messages include context and fix suggestions. - -**Rationale:** Users should fix issues in one iteration without guessing. - -**Verified by:** - -- File not found error includes fix suggestion -- Invalid method error includes valid alternatives -- Extraction error includes source context -- @acceptance-criteria scenarios below. - - Errors include enough context for users to understand and fix the issue. - -
- -
-Existing decision documents continue to work (2 scenarios) - -#### Existing decision documents continue to work - -**Invariant:** Valid existing decision documents generate without new errors. - -**Rationale:** Robustness improvements must be backward compatible. - -**Verified by:** - -- PoC decision document still generates -- Process Guard decision document still generates -- @acceptance-criteria scenarios below. - - The robustness improvements must not break existing valid decision - documents that worked with the PoC. - -
- -### PocIntegration - -[View PocIntegration source](tests/features/doc-generation/poc-integration.feature) - -End-to-end integration tests that exercise the full documentation generation -pipeline using the actual POC decision document and real source files. - -This validates that all 11 source mappings from the POC decision document -work correctly with real project files. - -
-POC decision document is parsed correctly (2 scenarios) - -#### POC decision document is parsed correctly - -**Invariant:** The real POC decision document (Process Guard) must be parseable by the codec, extracting all source mappings with their extraction types. - -**Rationale:** Integration testing against the actual POC document validates that the codec works with real-world content, not just synthetic test data. - -**Verified by:** - -- Load actual POC decision document -- Source mappings include all extraction types - -
- -
-Self-references extract content from POC decision (3 scenarios) - -#### Self-references extract content from POC decision - -**Invariant:** THIS DECISION self-references in the POC document must successfully extract Context rules, Decision rules, and DocStrings from the document itself. - -**Rationale:** Self-references are the most common extraction type in decision docs — they must work correctly for the POC to demonstrate the end-to-end pipeline. - -**Verified by:** - -- Extract Context rule from THIS DECISION -- Extract Decision rule from THIS DECISION -- Extract DocStrings from THIS DECISION - -
- -
-TypeScript shapes are extracted from real files (3 scenarios) - -#### TypeScript shapes are extracted from real files - -**Invariant:** The source mapper must successfully extract type shapes and patterns from real TypeScript source files referenced in the POC document. - -**Rationale:** TypeScript extraction is the primary mechanism for pulling implementation details into decision docs — it must work with actual project files. - -**Verified by:** - -- Extract shapes from types.ts -- Extract shapes from decider.ts -- Extract createViolation patterns from decider.ts - -
- -
-Behavior spec content is extracted correctly (2 scenarios) - -#### Behavior spec content is extracted correctly - -**Invariant:** The source mapper must successfully extract Rule blocks and ScenarioOutline Examples from real Gherkin feature files referenced in the POC document. - -**Rationale:** Behavior spec extraction bridges decision documents to executable specifications — incorrect extraction would misrepresent the verified behavior. - -**Verified by:** - -- Extract Rule blocks from process-guard.feature -- Extract Scenario Outline Examples from process-guard-linter.feature - -
- -
-JSDoc sections are extracted from CLI files (1 scenarios) - -#### JSDoc sections are extracted from CLI files - -**Invariant:** The source mapper must successfully extract JSDoc comment sections from real TypeScript CLI files referenced in the POC document. - -**Rationale:** CLI documentation often lives in JSDoc comments — extracting them into decision docs avoids duplicating CLI usage information manually. - -**Verified by:** - -- Extract JSDoc from lint-process.ts - -
- -
-All source mappings execute successfully (1 scenarios) - -#### All source mappings execute successfully - -**Invariant:** All source mappings defined in the POC decision document must execute without errors, producing non-empty extraction results. - -**Rationale:** End-to-end execution validates that all extraction types work with real files — a single failing mapping would produce incomplete decision documentation. - -**Verified by:** - -- Execute all 11 source mappings from POC - -
- -
-Compact output generates correctly (2 scenarios) - -#### Compact output generates correctly - -**Invariant:** The compact output for the POC document must generate successfully and contain all essential sections defined by the compact format. - -**Rationale:** Compact output is the AI-facing artifact — verifying it against the real POC ensures the format serves its purpose of providing concise decision context. - -**Verified by:** - -- Generate compact output from POC -- Compact output contains essential sections - -
- -
-Detailed output generates correctly (2 scenarios) - -#### Detailed output generates correctly - -**Invariant:** The detailed output for the POC document must generate successfully and contain all sections including full content from source mappings. - -**Rationale:** Detailed output is the human-facing artifact — verifying it against the real POC ensures no content is lost in the generation pipeline. - -**Verified by:** - -- Generate detailed output from POC -- Detailed output contains full content - -
- -
-Generated output matches quality expectations (2 scenarios) - -#### Generated output matches quality expectations - -**Invariant:** The generated output structure must match the expected target format, with complete validation rules and properly structured sections. - -**Rationale:** Quality assertions catch regressions in output formatting — structural drift in generated documents would degrade their usefulness as references. - -**Verified by:** - -- Compact output matches target structure -- Validation rules are complete in output - -
- -### DecisionDocGeneratorTesting - -[View DecisionDocGeneratorTesting source](tests/features/doc-generation/decision-doc-generator.feature) - -The Decision Doc Generator orchestrates the full documentation generation -pipeline from decision documents (ADR/PDR in .feature format): - -1. Decision parsing - Extract source mappings, rules, DocStrings -2. Source mapping - Aggregate content from TypeScript, Gherkin, decision sources -3. Content assembly - Build RenderableDocument from aggregated sections -4. Multi-level output - Generate compact and detailed versions - -
-Output paths are determined from pattern metadata (3 scenarios) - -#### Output paths are determined from pattern metadata - -**Invariant:** Output file paths must be derived from pattern metadata using kebab-case conversion of the pattern name, with configurable section prefixes. - -**Rationale:** Consistent path derivation ensures generated files are predictable and linkable — ad-hoc paths would break cross-document references. - -**Verified by:** - -- Default output paths for pattern -- Custom section for compact output -- CamelCase pattern converted to kebab-case - -
- -
-Compact output includes only essential content (3 scenarios) - -#### Compact output includes only essential content - -**Invariant:** Compact output mode must include only essential decision content (type shapes, key constraints) while excluding full descriptions and verbose sections. - -**Rationale:** Compact output is designed for AI context windows where token budget is limited — including full descriptions would negate the space savings. - -**Verified by:** - -- Compact output excludes full descriptions -- Compact output includes type shapes -- Compact output handles empty content - -
- -
-Detailed output includes full content (3 scenarios) - -#### Detailed output includes full content - -**Invariant:** Detailed output mode must include all decision content including full descriptions, consequences, and DocStrings rendered as code blocks. - -**Rationale:** Detailed output serves as the complete human reference — omitting any section would force readers to consult source files for the full picture. - -**Verified by:** - -- Detailed output includes all sections -- Detailed output includes consequences -- Detailed output includes DocStrings as code blocks - -
- -
-Multi-level generation produces both outputs (2 scenarios) - -#### Multi-level generation produces both outputs - -**Invariant:** The generator must produce both compact and detailed output files from a single generation run, using the pattern name or patternName tag as the identifier. - -**Rationale:** Both output levels serve different audiences (AI vs human) — generating them together ensures consistency and eliminates the risk of one becoming stale. - -**Verified by:** - -- Generate both compact and detailed outputs -- Pattern name falls back to pattern.name - -
- -
-Generator is registered with the registry (3 scenarios) - -#### Generator is registered with the registry - -**Invariant:** The decision document generator must be registered with the generator registry under a canonical name and must filter input patterns to only those with source mappings. - -**Rationale:** Registry registration enables discovery via --list-generators — filtering to source-mapped patterns prevents empty output for patterns without decision metadata. - -**Verified by:** - -- Generator is registered with correct name -- Generator filters patterns by source mapping presence -- Generator processes patterns with source mappings - -
- -
-Source mappings are executed during generation (2 scenarios) - -#### Source mappings are executed during generation - -**Invariant:** Source mapping tables must be executed during generation to extract content from referenced files, with missing files reported as validation errors. - -**Rationale:** Source mappings are the bridge between decision specs and implementation — unexecuted mappings produce empty sections, while silent missing-file errors hide broken references. - -**Verified by:** - -- Source mappings are executed -- Missing source files are reported as validation errors - -
- -### DecisionDocCodecTesting - -[View DecisionDocCodecTesting source](tests/features/doc-generation/decision-doc-codec.feature) - -Validates the Decision Doc Codec that parses decision documents (ADR/PDR -in .feature format) and extracts content for documentation generation. - -
-Rule blocks are partitioned by semantic prefix (2 scenarios) - -#### Rule blocks are partitioned by semantic prefix - -**Invariant:** Decision document rules must be partitioned into ADR sections based on their semantic prefix (e.g., "Decision:", "Context:", "Consequence:"), with non-standard rules placed in an "other" category. - -**Rationale:** Semantic partitioning produces structured ADR output that follows the standard ADR format — unpartitioned rules would generate a flat, unnavigable document. - -**Verified by:** - -- Partition rules into ADR sections -- Non-standard rules go to other category - -
- -
-DocStrings are extracted with language tags (3 scenarios) - -#### DocStrings are extracted with language tags - -**Invariant:** DocStrings within rule descriptions must be extracted preserving their language tag (e.g., typescript, bash), defaulting to "text" when no language is specified. - -**Rationale:** Language tags enable syntax highlighting in generated markdown code blocks — losing the tag produces unformatted code that is harder to read. - -**Verified by:** - -- Extract single DocString -- Extract multiple DocStrings -- DocString without language defaults to text - -
- -
-Source mapping tables are parsed from rule descriptions (2 scenarios) - -#### Source mapping tables are parsed from rule descriptions - -**Invariant:** Markdown tables in rule descriptions with source mapping columns must be parsed into structured data, returning empty arrays when no table is present. - -**Rationale:** Source mapping tables drive the extraction pipeline — they define which files to read and what content to extract for each decision section. - -**Verified by:** - -- Parse basic source mapping table -- No source mapping returns empty - -
- -
-Self-reference markers are correctly detected (5 scenarios) - -#### Self-reference markers are correctly detected - -**Invariant:** The "THIS DECISION" marker must be recognized as a self-reference to the current decision document, with optional rule name qualifiers parsed correctly. - -**Rationale:** Self-references enable decisions to extract content from their own rules — misdetecting them would trigger file-system lookups for a non-existent "THIS DECISION" file. - -**Verified by:** - -- Detect THIS DECISION marker -- Detect THIS DECISION with Rule -- Regular file path is not self-reference -- Parse self-reference types -- Parse self-reference with rule name - -
- -
-Extraction methods are normalized to known types (3 scenarios) - -#### Extraction methods are normalized to known types - -**Invariant:** Extraction method strings from source mapping tables must be normalized to canonical method names for dispatcher routing. - -**Rationale:** Users may write extraction methods in various formats (e.g., "Decision rule description", "extract-shapes") — normalization ensures consistent dispatch regardless of formatting. - -**Verified by:** - -- Normalize Decision rule description -- Normalize extract-shapes -- Normalize unknown method - -
- -
-Complete decision documents are parsed with all content (1 scenarios) - -#### Complete decision documents are parsed with all content - -**Invariant:** A complete decision document must be parseable into its constituent parts including rules, DocStrings, source mappings, and self-references in a single parse operation. - -**Rationale:** Complete parsing validates that all codec features compose correctly — partial parsing could miss interactions between features. - -**Verified by:** - -- Parse complete decision document - -
- -
-Rules can be found by name with partial matching (3 scenarios) - -#### Rules can be found by name with partial matching - -**Invariant:** Rules must be findable by exact name match or partial (substring) name match, returning undefined when no match exists. - -**Rationale:** Partial matching supports flexible cross-references between decisions — requiring exact matches would make references brittle to minor naming changes. - -**Verified by:** - -- Find rule by exact name -- Find rule by partial name -- Rule not found returns undefined - -
- -### ContentDeduplication - -[View ContentDeduplication source](tests/features/doc-generation/content-deduplication.feature) - -**Context:** Multiple sources may extract identical content, leading to -duplicate sections in generated documentation. - -**Approach:** Use SHA-256 fingerprinting to detect duplicates, merge based -on source priority, and preserve original section order after deduplication. - -
-Duplicate detection uses content fingerprinting (4 scenarios) - -#### Duplicate detection uses content fingerprinting - -**Invariant:** Content with identical normalized text must produce identical fingerprints. - -**Rationale:** Fingerprinting enables efficient duplicate detection without full text comparison. - -**Verified by:** - -- Identical content produces same fingerprint -- Whitespace differences are normalized -- Different content produces different fingerprints -- Similar headers with different content are preserved -- @acceptance-criteria scenarios below. - - Content fingerprints are computed from normalized text - -- ignoring whitespace - differences and minor formatting variations. - -
- -
-Duplicates are merged based on source priority (3 scenarios) - -#### Duplicates are merged based on source priority - -**Invariant:** Higher-priority sources take precedence when merging duplicate content. - -**Rationale:** TypeScript sources have richer JSDoc; feature files provide behavioral context. - -**Verified by:** - -- TypeScript source takes priority over feature file -- Richer content takes priority when sources equal -- Source attribution is added to merged content -- @acceptance-criteria scenarios below. - - The merge strategy determines which content to keep based on source file - priority and content richness once duplicates are detected. - -
- -
-Section order is preserved after deduplication (2 scenarios) - -#### Section order is preserved after deduplication - -**Invariant:** Section order matches the source mapping table order after deduplication. - -**Rationale:** Predictable ordering ensures consistent documentation structure. - -**Verified by:** - -- Original order maintained after dedup -- Empty sections after dedup are removed -- @acceptance-criteria scenarios below. - - The order of sections in the source mapping table is preserved even - after duplicates are removed. - -
- -
-Deduplicator integrates with source mapper pipeline (1 scenarios) - -#### Deduplicator integrates with source mapper pipeline - -**Invariant:** Deduplication runs after extraction and before document assembly. - -**Rationale:** All content must be extracted before duplicates can be identified. - -**Verified by:** - -- Deduplication happens in pipeline -- @acceptance-criteria scenarios below. - - The deduplicator is called after all extractions complete but before - the RenderableDocument is assembled. - -
- -### TableExtraction - -[View TableExtraction source](tests/features/generators/table-extraction.feature) - -Tables in business rule descriptions should appear exactly once in output. -The extractTables() function extracts tables for proper formatting, and -stripMarkdownTables() removes them from the raw text to prevent duplicates. - -
-Tables in rule descriptions render exactly once (2 scenarios) - -#### Tables in rule descriptions render exactly once - -**Invariant:** Each markdown table in a rule description appears exactly once in the rendered output, with no residual pipe characters in surrounding text. - -**Rationale:** Without deduplication, tables extracted for formatting would also remain in the raw description text, producing duplicate output. - -**Verified by:** - -- Single table renders once in detailed mode -- Table is extracted and properly formatted - -
- -
-Multiple tables in description each render exactly once (1 scenarios) - -#### Multiple tables in description each render exactly once - -**Invariant:** When a rule description contains multiple markdown tables, each table renders as a separate formatted table block with no merging or duplication. - -**Verified by:** - -- Two tables in description render as two separate tables - -
- -
-stripMarkdownTables removes table syntax from text (3 scenarios) - -#### stripMarkdownTables removes table syntax from text - -**Invariant:** stripMarkdownTables removes all pipe-delimited table syntax from input text while preserving all surrounding content unchanged. - -**Verified by:** - -- Strips single table from text -- Strips multiple tables from text -- Preserves text without tables - -
- -### GeneratorRegistryTesting - -[View GeneratorRegistryTesting source](tests/features/generators/registry.feature) - -Tests the GeneratorRegistry registration, lookup, and listing capabilities. -The registry manages document generators with name uniqueness constraints. - -#### Registry manages generator registration and retrieval - -**Invariant:** Each generator name is unique within the registry; duplicate registration is rejected and lookup of unknown names returns undefined. - -**Verified by:** - -- Register generator with unique name -- Duplicate registration throws error -- Get registered generator -- Get unknown generator returns undefined -- Available returns sorted list - -### PrdImplementationSectionTesting - -[View PrdImplementationSectionTesting source](tests/features/generators/prd-implementation-section.feature) - -Tests the Implementations section rendering in pattern documents. -Verifies that code stubs with @libar-docs-implements tags appear in pattern docs -with working links to the source files. - -
-Implementation files appear in pattern docs via @libar-docs-implements (2 scenarios) - -#### Implementation files appear in pattern docs via @libar-docs-implements - -**Invariant:** Any TypeScript file with a matching @libar-docs-implements tag must appear in the pattern document's Implementations section with a working file link. - -**Rationale:** Implementation discovery relies on tag-based linking — missing entries break traceability between specs and code. - -**Verified by:** - -- Implementations section renders with file links -- Implementation includes description when available - -
- -
-Multiple implementations are listed alphabetically (1 scenarios) - -#### Multiple implementations are listed alphabetically - -**Invariant:** When multiple files implement the same pattern, they must be listed in ascending file path order. - -**Rationale:** Deterministic ordering ensures stable document output across regeneration runs. - -**Verified by:** - -- Multiple implementations sorted by file path - -
- -
-Patterns without implementations omit the section (1 scenarios) - -#### Patterns without implementations omit the section - -**Invariant:** The Implementations heading must not appear in pattern documents when no implementing files exist. - -**Verified by:** - -- No implementations section when none exist - -
- -
-Implementation references use relative file links (1 scenarios) - -#### Implementation references use relative file links - -**Invariant:** Implementation file links must be relative paths starting from the patterns output directory. - -**Rationale:** Absolute paths break when documentation is viewed from different locations; relative paths ensure portability. - -**Verified by:** - -- Links are relative from patterns directory - -
- -### PrChangesOptions - -[View PrChangesOptions source](tests/features/generators/pr-changes-options.feature) - -Tests the PrChangesCodec filtering capabilities for generating PR-scoped -documentation. The codec filters patterns by changed files and/or release -version, supporting combined OR logic when both filters are provided. - -#### Orchestrator supports PR changes generation options - -**Invariant:** PR changes output includes only patterns matching the changed files list, the release version filter, or both (OR logic when combined). - -**Rationale:** PR-scoped documentation must reflect exactly what changed, avoiding noise from unrelated patterns. - -**Verified by:** - -- PR changes filters to explicit file list -- PR changes filters by release version -- Combined filters use OR logic - -### DocumentationOrchestrator - -[View DocumentationOrchestrator source](tests/features/generators/orchestrator.feature) - -Tests the orchestrator's pattern merging, conflict detection, and generator -coordination capabilities. The orchestrator coordinates the full documentation -generation pipeline: Scanner -> Extractor -> Generators -> File Writer. - -#### Orchestrator coordinates full documentation generation pipeline - -**Invariant:** Non-overlapping patterns from TypeScript and Gherkin sources must merge into a unified dataset; overlapping pattern names must fail with conflict error. - -**Rationale:** Silent merging of conflicting patterns would produce incorrect documentation — fail-fast ensures data integrity across the pipeline. - -**Verified by:** - -- Non-overlapping patterns merge successfully -- Orchestrator detects pattern name conflicts -- Orchestrator detects pattern name conflicts with status mismatch -- Unknown generator name fails gracefully -- Partial success when some generators are invalid - -### CodecBasedGeneratorTesting - -[View CodecBasedGeneratorTesting source](tests/features/generators/codec-based.feature) - -Tests the CodecBasedGenerator which adapts the RenderableDocument Model (RDM) -codec system to the DocumentGenerator interface. This enables codec-based -document generation to work seamlessly with the existing orchestrator. - -#### CodecBasedGenerator adapts codecs to generator interface - -**Invariant:** CodecBasedGenerator delegates document generation to the underlying codec and surfaces codec errors through the generator interface. - -**Rationale:** The adapter pattern enables codec-based rendering to integrate with the existing orchestrator without modifying either side. - -**Verified by:** - -- Generator delegates to codec -- Missing MasterDataset returns error -- Codec options are passed through - -### BusinessRulesDocumentCodec - -[View BusinessRulesDocumentCodec source](tests/features/generators/business-rules-codec.feature) - -Tests the BusinessRulesCodec transformation from MasterDataset to RenderableDocument. -Verifies rule extraction, organization by domain/phase, and progressive disclosure. - -
-Extracts Rule blocks with Invariant and Rationale (2 scenarios) - -#### Extracts Rule blocks with Invariant and Rationale - -**Verified by:** - -- Extracts annotated Rule with Invariant and Rationale -- Extracts unannotated Rule without showing not specified - -
- -
-Organizes rules by product area and phase (2 scenarios) - -#### Organizes rules by product area and phase - -**Verified by:** - -- Groups rules by product area and phase -- Orders rules by phase within domain - -
- -
-Summary mode generates compact output (2 scenarios) - -#### Summary mode generates compact output - -**Verified by:** - -- Summary mode includes statistics line -- Summary mode excludes detailed sections - -
- -
-Preserves code examples and tables in detailed mode (2 scenarios) - -#### Preserves code examples and tables in detailed mode - -**Verified by:** - -- Code examples included in detailed mode -- Code examples excluded in standard mode - -
- -
-Generates scenario traceability links (1 scenarios) - -#### Generates scenario traceability links - -**Verified by:** - -- Verification links include file path - -
- -
-Progressive disclosure generates detail files per product area (3 scenarios) - -#### Progressive disclosure generates detail files per product area - -**Verified by:** - -- Detail files are generated per product area -- Main document has product area index table with links -- Detail files have back-link to main document - -
- -
-Empty rules show placeholder instead of blank content (2 scenarios) - -#### Empty rules show placeholder instead of blank content - -**Verified by:** - -- Rule without invariant or description or scenarios shows placeholder -- Rule without invariant but with scenarios shows verified-by instead - -
- -
-Rules always render flat for full visibility (1 scenarios) - -#### Rules always render flat for full visibility - -**Verified by:** - -- Features with many rules render flat without collapsible blocks - -
- -
-Source file shown as filename text (1 scenarios) - -#### Source file shown as filename text - -**Verified by:** - -- Source file rendered as plain text not link - -
- -
-Verified-by renders as checkbox list at standard level (2 scenarios) - -#### Verified-by renders as checkbox list at standard level - -**Verified by:** - -- Rules with scenarios show verified-by checklist -- Duplicate scenario names are deduplicated - -
- -
-Feature names are humanized from camelCase pattern names (2 scenarios) - -#### Feature names are humanized from camelCase pattern names - -**Verified by:** - -- CamelCase pattern name becomes spaced heading -- Testing suffix is stripped from feature names - -
- -### TransformDatasetTesting - -[View TransformDatasetTesting source](tests/features/behavior/transform-dataset.feature) - -The transformToMasterDataset function transforms raw extracted patterns -into a MasterDataset with all pre-computed views in a single pass. -This is the core of the unified transformation pipeline. - -**Problem:** - -- Generators need multiple views of the same pattern data -- Computing views lazily leads to O(n\*v) complexity -- Views must be consistent with each other - -**Solution:** - -- Single-pass transformation computes all views in O(n) -- All views are immutable and pre-computed -- MasterDataset is the source of truth for all generators - -
-Empty dataset produces valid zero-state views (1 scenarios) - -#### Empty dataset produces valid zero-state views - -**Invariant:** An empty input produces a MasterDataset with all counts at zero and no groupings. - -**Verified by:** - -- Transform empty dataset - -
- -
-Status and phase grouping creates navigable views (6 scenarios) - -#### Status and phase grouping creates navigable views - -**Invariant:** Patterns are grouped by canonical status and sorted by phase number, with per-phase status counts computed. - -**Rationale:** Generators need O(1) access to status-filtered and phase-ordered views without recomputing on each render pass. - -**Verified by:** - -- Group patterns by status -- Normalize status variants to canonical values -- Group patterns by phase -- Sort phases by phase number -- Compute per-phase status counts -- Patterns without phase are not in byPhase - -
- -
-Quarter and category grouping organizes by timeline and domain (3 scenarios) - -#### Quarter and category grouping organizes by timeline and domain - -**Invariant:** Patterns are grouped by quarter and category, with only patterns bearing the relevant metadata included in each view. - -**Verified by:** - -- Group patterns by quarter -- Patterns without quarter are not in byQuarter -- Group patterns by category - -
- -
-Source grouping separates TypeScript and Gherkin origins (2 scenarios) - -#### Source grouping separates TypeScript and Gherkin origins - -**Invariant:** Patterns are partitioned by source file type, and patterns with phase metadata appear in the roadmap view. - -**Verified by:** - -- Group patterns by source file type -- Patterns with phase are also in roadmap view - -
- -
-Relationship index builds bidirectional dependency graph (5 scenarios) - -#### Relationship index builds bidirectional dependency graph - -**Invariant:** The relationship index contains forward and reverse lookups, with reverse lookups merged and deduplicated against explicit annotations. - -**Rationale:** Bidirectional navigation is required for dependency tree queries without O(n) scans per lookup. - -**Verified by:** - -- Build relationship index from patterns -- Build relationship index with all relationship types -- Reverse lookup computes enables from dependsOn -- Reverse lookup computes usedBy from uses -- Reverse lookup merges with explicit annotations without duplicates - -
- -
-Completion tracking computes project progress (2 scenarios) - -#### Completion tracking computes project progress - -**Invariant:** Completion percentage is rounded to the nearest integer, and fully-completed requires all patterns in completed status with a non-zero total. - -**Verified by:** - -- Calculate completion percentage -- Check if fully completed - -
- -
-Workflow integration conditionally includes delivery process data (2 scenarios) - -#### Workflow integration conditionally includes delivery process data - -**Invariant:** The workflow is included in the MasterDataset only when provided, and phase names are resolved from the workflow configuration. - -**Verified by:** - -- Include workflow in result when provided -- Result omits workflow when not provided - -
- -### RichContentHelpersTesting - -[View RichContentHelpersTesting source](tests/features/behavior/rich-content-helpers.feature) - -As a document codec author -I need helpers to render Gherkin rich content -So that DataTables, DocStrings, and scenarios render consistently across codecs - -The helpers handle edge cases like: - -- Unclosed DocStrings (fallback to plain paragraph) -- Windows CRLF line endings (normalized to LF) -- Empty inputs (graceful handling) -- Missing table cells (empty string fallback) - -
-DocString parsing handles edge cases (6 scenarios) - -#### DocString parsing handles edge cases - -**Invariant:** DocString parsing must gracefully handle empty input, missing language hints, unclosed delimiters, and non-LF line endings without throwing errors. - -**Verified by:** - -- Empty description returns empty array -- Description with no DocStrings returns single paragraph -- Single DocString parses correctly -- DocString without language hint uses text -- Unclosed DocString returns plain paragraph fallback -- Windows CRLF line endings are normalized - -
- -
-DataTable rendering produces valid markdown (3 scenarios) - -#### DataTable rendering produces valid markdown - -**Invariant:** DataTable rendering must produce a well-formed table block for any number of rows, substituting empty strings for missing cell values. - -**Verified by:** - -- Single row DataTable renders correctly -- Multi-row DataTable renders correctly -- Missing cell values become empty strings - -
- -
-Scenario content rendering respects options (3 scenarios) - -#### Scenario content rendering respects options - -**Invariant:** Scenario rendering must honor the includeSteps option, producing step lists only when enabled, and must include embedded DataTables when present. - -**Verified by:** - -- Render scenario with steps -- Skip steps when includeSteps is false -- Render scenario with DataTable in step - -
- -
-Business rule rendering handles descriptions (3 scenarios) - -#### Business rule rendering handles descriptions - -**Invariant:** Business rule rendering must always include the rule name as a bold paragraph, and must parse descriptions for embedded DocStrings when present. - -**Verified by:** - -- Rule with simple description -- Rule with no description -- Rule with embedded DocString in description - -
- -
-DocString content is dedented when parsed (4 scenarios) - -#### DocString content is dedented when parsed - -**Invariant:** DocString code blocks must be dedented to remove common leading whitespace while preserving internal relative indentation, empty lines, and trimming trailing whitespace from each line. - -**Verified by:** - -- Code block preserves internal relative indentation -- Empty lines in code block are preserved -- Trailing whitespace is trimmed from each line -- Code with mixed indentation is preserved - -
- -### RendererOutputFormats - -[View RendererOutputFormats source](tests/features/behavior/render-output.feature) - -The universal renderer converts RenderableDocument to markdown. -It is a "dumb printer" with no domain knowledge - all logic lives in codecs. - -
-Code blocks and mermaid diagrams render with fenced syntax (3 scenarios) - -#### Code blocks and mermaid diagrams render with fenced syntax - -**Invariant:** Code blocks use triple backtick fencing with optional language hint. Mermaid blocks use mermaid as the language hint. - -**Verified by:** - -- Render code block with language -- Render code block without language -- Render mermaid diagram - -
- -
-Collapsible blocks render as HTML details elements (3 scenarios) - -#### Collapsible blocks render as HTML details elements - -**Invariant:** Summary text is HTML-escaped to prevent injection. Collapsible content renders between details tags. - -**Verified by:** - -- Render collapsible block -- Render collapsible with HTML entities in summary -- Render nested collapsible content - -
- -
-Link-out blocks render as markdown links with URL encoding (2 scenarios) - -#### Link-out blocks render as markdown links with URL encoding - -**Invariant:** Link paths with spaces are percent-encoded for valid URLs. - -**Verified by:** - -- Render link-out block -- Render link-out with spaces in path - -
- -
-Multi-file documents produce correct output file collections (2 scenarios) - -#### Multi-file documents produce correct output file collections - -**Invariant:** Output file count equals 1 (main) plus additional file count. The first output file always uses the provided base path. - -**Verified by:** - -- Render document with additional files -- Render document without additional files - -
- -
-Complex documents render all block types in sequence (1 scenarios) - -#### Complex documents render all block types in sequence - -**Invariant:** Multiple block types in a single document render in order without interference. - -**Verified by:** - -- Render complex document with multiple block types - -
- -
-Claude context renderer produces compact AI-optimized output (7 scenarios) - -#### Claude context renderer produces compact AI-optimized output - -**Invariant:** Claude context replaces markdown syntax with section markers, omits visual-only blocks (mermaid, separators), flattens collapsible content, and produces shorter output than markdown. - -**Verified by:** - -- Claude context renders title and headings as section markers -- Claude context renders sub-headings with different markers -- Claude context omits mermaid blocks -- Claude context flattens collapsible blocks -- Claude context renders link-out as plain text -- Claude context omits separator tokens -- Claude context produces fewer characters than markdown - -
- -### RendererBlockTypes - -[View RendererBlockTypes source](tests/features/behavior/render-blocks.feature) - -The universal renderer converts RenderableDocument to markdown. -It is a "dumb printer" with no domain knowledge - all logic lives in codecs. - -
-Document metadata renders as frontmatter before sections (4 scenarios) - -#### Document metadata renders as frontmatter before sections - -**Invariant:** Title always renders as H1, purpose and detail level render as bold key-value pairs separated by horizontal rule. - -**Verified by:** - -- Render minimal document with title only -- Render document with purpose -- Render document with detail level -- Render document with purpose and detail level - -
- -
-Headings render at correct markdown levels with clamping (3 scenarios) - -#### Headings render at correct markdown levels with clamping - -**Invariant:** Heading levels are clamped to the valid range 1-6 regardless of input value. - -**Verified by:** - -- Render headings at different levels -- Clamp heading level 0 to 1 -- Clamp heading level 7 to 6 - -
- -
-Paragraphs and separators render as plain text and horizontal rules (3 scenarios) - -#### Paragraphs and separators render as plain text and horizontal rules - -**Invariant:** Paragraph content passes through unmodified, including special markdown characters. Separators render as horizontal rules. - -**Verified by:** - -- Render paragraph -- Render paragraph with special characters -- Render separator - -
- -
-Tables render with headers, alignment, and cell escaping (6 scenarios) - -#### Tables render with headers, alignment, and cell escaping - -**Invariant:** Tables must escape pipe characters, convert newlines to line breaks, and pad short rows to match column count. - -**Verified by:** - -- Render basic table -- Render table with alignment -- Render empty table (no columns) -- Render table with pipe character in cell -- Render table with newline in cell -- Render table with short row (fewer cells than columns) - -
- -
-Lists render in unordered, ordered, checkbox, and nested formats (4 scenarios) - -#### Lists render in unordered, ordered, checkbox, and nested formats - -**Invariant:** List type determines prefix: dash for unordered, numbered for ordered, checkbox syntax for checked items. Nesting adds two-space indentation per level. - -**Verified by:** - -- Render unordered list -- Render ordered list -- Render checkbox list with checked items -- Render nested list - -
- -### RemainingWorkSummaryAccuracy - -[View RemainingWorkSummaryAccuracy source](tests/features/behavior/remaining-work-totals.feature) - -Summary totals in REMAINING-WORK.md must match the sum of phase table rows. -The backlog calculation must correctly identify patterns without phases -using pattern.id (which is always defined) rather than patternName. - -
-Summary totals equal sum of phase table rows (2 scenarios) - -#### Summary totals equal sum of phase table rows - -**Invariant:** The summary Active and Total Remaining counts must exactly equal the sum of the corresponding counts across all phase table rows. - -**Rationale:** A mismatch between summary and phase-level totals indicates patterns are being double-counted or dropped. - -**Verified by:** - -- Summary matches phase table with all patterns having phases -- Summary includes completed patterns correctly - -
- -
-Patterns without phases appear in Backlog row (2 scenarios) - -#### Patterns without phases appear in Backlog row - -**Invariant:** Patterns that have no assigned phase must be grouped into a "Backlog" row in the phase table rather than being omitted. - -**Rationale:** Unphased patterns are still remaining work; omitting them would undercount the total. - -**Verified by:** - -- Summary includes backlog patterns without phase -- All patterns in backlog when none have phases - -
- -
-Patterns without patternName are counted using id (2 scenarios) - -#### Patterns without patternName are counted using id - -**Invariant:** Pattern counting must use pattern.id as the identifier, never patternName, so that patterns with undefined names are neither double-counted nor omitted. - -**Rationale:** patternName is optional; relying on it for counting would miss unnamed patterns entirely. - -**Verified by:** - -- Patterns with undefined patternName counted correctly -- Mixed patterns with and without patternName - -
- -
-All phases with incomplete patterns are shown (2 scenarios) - -#### All phases with incomplete patterns are shown - -**Invariant:** The phase table must include every phase that contains at least one incomplete pattern, and phases with only completed patterns must be excluded. - -**Verified by:** - -- Multiple phases shown in order -- Completed phases not shown in remaining work - -
- -### RemainingWorkEnhancement - -[View RemainingWorkEnhancement source](tests/features/behavior/remaining-work-enhancement.feature) - -Enhanced REMAINING-WORK.md generation with priority-based sorting, -quarter grouping, and progressive disclosure for better session planning. - -**Problem:** - -- Flat phase lists make it hard to identify what to work on next -- No visibility into relative urgency or importance of phases -- Large backlogs overwhelm planners with too much information at once -- Quarter-based planning requires manual grouping of phases -- Effort estimates are not factored into prioritization decisions - -**Solution:** - -- Priority-based sorting surfaces critical/high-priority work first -- Quarter grouping organizes planned work into time-based buckets -- Progressive disclosure shows summary with link to full backlog details -- Effort parsing enables sorting by estimated work duration -- Visual priority icons provide at-a-glance urgency indicators - -
-Priority-based sorting surfaces critical work first (3 scenarios) - -#### Priority-based sorting surfaces critical work first - -**Invariant:** Phases with higher priority always appear before lower-priority phases when sorting by priority. - -**Verified by:** - -- Next Actionable sorted by priority -- Undefined priority sorts last -- Priority icons displayed in table - -
- -
-Effort parsing converts duration strings to comparable hours (5 scenarios) - -#### Effort parsing converts duration strings to comparable hours - -**Invariant:** Effort strings must be parsed to a common unit (hours) for accurate sorting across different time scales. - -**Verified by:** - -- Phases sorted by effort ascending -- Effort parsing handles hours -- Effort parsing handles days -- Effort parsing handles weeks -- Effort parsing handles months - -
- -
-Quarter grouping organizes planned work into time-based buckets (2 scenarios) - -#### Quarter grouping organizes planned work into time-based buckets - -**Invariant:** Phases with a quarter tag are grouped under their quarter heading; phases without a quarter appear under Unscheduled. - -**Verified by:** - -- Planned phases grouped by quarter -- Quarters sorted chronologically - -
- -
-Priority grouping organizes phases by urgency level (1 scenarios) - -#### Priority grouping organizes phases by urgency level - -**Invariant:** Phases are grouped under their priority heading; phases without priority appear under Unprioritized. - -**Verified by:** - -- Planned phases grouped by priority - -
- -
-Progressive disclosure prevents information overload in large backlogs (2 scenarios) - -#### Progressive disclosure prevents information overload in large backlogs - -**Invariant:** When the backlog exceeds maxNextActionable, only the top N phases are shown with a link or count for the remainder. - -**Verified by:** - -- Large backlog uses progressive disclosure -- Moderate backlog shows count without link - -
- -
-Edge cases are handled gracefully (2 scenarios) - -#### Edge cases are handled gracefully - -**Invariant:** Empty or fully-blocked backlogs produce meaningful output instead of errors or blank sections. - -**Verified by:** - -- Empty backlog handling -- All phases blocked - -
- -
-Default behavior preserves backward compatibility (2 scenarios) - -#### Default behavior preserves backward compatibility - -**Invariant:** Without explicit sortBy or groupPlannedBy options, phases are sorted by phase number in a flat list. - -**Verified by:** - -- Default sorting is by phase number -- Default grouping is none (flat list) - -
- -### PrChangesGeneration - -[View PrChangesGeneration source](tests/features/behavior/pr-changes-generation.feature) - -The delivery process generates PR-CHANGES.md from active or completed phases, -formatted for PR descriptions, code reviews, and release notes. - -**Problem:** - -- PR descriptions are manually written, often incomplete or inconsistent -- Reviewers lack structured view of what changed and why -- Deliverable completion status scattered across feature files -- Dependency relationships between phases hidden from reviewers - -**Solution:** - -- Auto-generate PR-CHANGES.md with summary statistics and phase-grouped changes -- Include both active and completed phases (roadmap phases excluded) -- Filter by release version (releaseFilter) to show matching deliverables -- Surface deliverables inline with each pattern -- Include review checklist with standard code quality items -- Include dependency section showing what patterns enable or require - -
-Release version filtering controls which phases appear in output (4 scenarios) - -#### Release version filtering controls which phases appear in output - -**Invariant:** Only phases with deliverables matching the releaseFilter are included; roadmap phases are always excluded. - -**Verified by:** - -- Filter phases by specific release version -- Show all active and completed phases when no releaseFilter -- Active phases with matching deliverables are included -- Roadmap phases are excluded even with matching deliverables - -
- -
-Patterns are grouped by phase number in the output (1 scenarios) - -#### Patterns are grouped by phase number in the output - -**Invariant:** Each phase number produces a separate heading section in the generated output. - -**Verified by:** - -- Patterns grouped by phase number - -
- -
-Summary statistics provide a high-level overview of the PR (2 scenarios) - -#### Summary statistics provide a high-level overview of the PR - -**Invariant:** Summary section always shows pattern counts and release tag when a releaseFilter is active. - -**Verified by:** - -- Summary shows pattern counts in table format -- Summary shows release tag when filtering - -
- -
-Deliverables are displayed inline with their parent patterns (2 scenarios) - -#### Deliverables are displayed inline with their parent patterns - -**Invariant:** When includeDeliverables is enabled, each pattern lists its deliverables with name, status, and release tag. - -**Verified by:** - -- Deliverables shown inline with patterns -- Deliverables show release tags - -
- -
-Review checklist includes standard code quality verification items (2 scenarios) - -#### Review checklist includes standard code quality verification items - -**Invariant:** Review checklist always includes code conventions, tests, documentation, and completed pattern verification items. - -**Verified by:** - -- Review checklist includes standard code quality items -- Review checklist includes completed pattern verification - -
- -
-Dependencies section shows inter-pattern relationships (2 scenarios) - -#### Dependencies section shows inter-pattern relationships - -**Invariant:** Dependencies section surfaces both what patterns enable and what they depend on. - -**Verified by:** - -- Dependencies shows what patterns enable -- Dependencies shows what patterns depend on - -
- -
-Business value can be included or excluded from pattern metadata (2 scenarios) - -#### Business value can be included or excluded from pattern metadata - -**Invariant:** Business value display is controlled by the includeBusinessValue option. - -**Verified by:** - -- Pattern metadata includes business value when enabled -- Business value can be excluded - -
- -
-Output can be sorted by phase number or priority (2 scenarios) - -#### Output can be sorted by phase number or priority - -**Invariant:** Sorting is deterministic and respects the configured sortBy option. - -**Verified by:** - -- Phases sorted by phase number -- Phases sorted by priority - -
- -
-Edge cases produce graceful output (3 scenarios) - -#### Edge cases produce graceful output - -**Invariant:** The generator handles missing phases, missing deliverables, and missing phase numbers without errors. - -**Verified by:** - -- No matching phases produces no changes message -- Patterns without deliverables still display -- Patterns without phase show in phase 0 group - -
- -
-Deliverable-level filtering shows only matching deliverables within a phase (1 scenarios) - -#### Deliverable-level filtering shows only matching deliverables within a phase - -**Invariant:** When a phase contains deliverables with different release tags, only those matching the releaseFilter are shown. - -**Verified by:** - -- Mixed releases within single phase shows only matching deliverables - -
- -### PatternsCodecTesting - -[View PatternsCodecTesting source](tests/features/behavior/patterns-codec.feature) - -The PatternsDocumentCodec transforms MasterDataset into a RenderableDocument -for generating PATTERNS.md and category detail files. - -**Problem:** - -- Need to generate a comprehensive pattern registry from extracted patterns -- Output should include progress tracking, navigation, and categorization - -**Solution:** - -- Codec transforms MasterDataset → RenderableDocument in a single decode call -- Generates main document with optional category detail files - -
-Document structure includes progress tracking and category navigation (3 scenarios) - -#### Document structure includes progress tracking and category navigation - -**Invariant:** Every decoded document must contain a title, purpose, Progress section with status counts, and category navigation regardless of dataset size. - -**Rationale:** The PATTERNS.md is the primary entry point for understanding project scope; incomplete structure would leave consumers without context. - -**Verified by:** - -- Decode empty dataset -- Decode dataset with patterns - document structure -- Progress summary shows correct counts - -
- -
-Pattern table presents all patterns sorted by status then name (2 scenarios) - -#### Pattern table presents all patterns sorted by status then name - -**Invariant:** The pattern table must include every pattern in the dataset with columns for Pattern, Category, Status, and Description, sorted by status priority (completed first) then alphabetically by name. - -**Rationale:** Consistent ordering allows quick scanning of project progress; completed patterns at top confirm done work, while roadmap items at bottom show remaining scope. - -**Verified by:** - -- Pattern table includes all patterns -- Pattern table is sorted by status then name - -
- -
-Category sections group patterns by domain (2 scenarios) - -#### Category sections group patterns by domain - -**Invariant:** Each category in the dataset must produce an H3 section listing its patterns, and the filterCategories option must restrict output to only the specified categories. - -**Verified by:** - -- Category sections with pattern lists -- Filter to specific categories - -
- -
-Dependency graph visualizes pattern relationships (3 scenarios) - -#### Dependency graph visualizes pattern relationships - -**Invariant:** A Mermaid dependency graph must be included when pattern relationships exist and the includeDependencyGraph option is not disabled; it must be omitted when no relationships exist or when explicitly disabled. - -**Verified by:** - -- Dependency graph included when relationships exist -- No dependency graph when no relationships -- Dependency graph disabled by option - -
- -
-Detail file generation creates per-pattern pages (3 scenarios) - -#### Detail file generation creates per-pattern pages - -**Invariant:** When generateDetailFiles is enabled, each pattern must produce an individual markdown file at patterns/{slug}.md containing an Overview section; when disabled, no additional files must be generated. - -**Rationale:** Detail files enable deep-linking into specific patterns from the main registry while keeping the index document scannable. - -**Verified by:** - -- Generate individual pattern files when enabled -- No detail files when disabled -- Individual pattern file contains full details - -
- -### ImplementationLinkPathNormalization - -[View ImplementationLinkPathNormalization source](tests/features/behavior/implementation-links.feature) - -Links to implementation files in generated pattern documents should have -correct relative paths. Repository prefixes like "libar-platform/" must -be stripped to produce valid links from the output directory. - -
-Repository prefixes are stripped from implementation paths (3 scenarios) - -#### Repository prefixes are stripped from implementation paths - -**Invariant:** Implementation file paths must not contain repository-level prefixes like "libar-platform/" or "monorepo/". - -**Rationale:** Generated links are relative to the output directory; repository prefixes produce broken paths. - -**Verified by:** - -- Strip libar-platform prefix from implementation paths -- Strip monorepo prefix from implementation paths -- Preserve paths without repository prefix - -
- -
-All implementation links in a pattern are normalized (1 scenarios) - -#### All implementation links in a pattern are normalized - -**Invariant:** Every implementation link in a pattern document must have its path normalized, regardless of how many implementations exist. - -**Verified by:** - -- Multiple implementations with mixed prefixes - -
- -
-normalizeImplPath strips known prefixes (4 scenarios) - -#### normalizeImplPath strips known prefixes - -**Invariant:** normalizeImplPath removes only recognized repository prefixes from the start of a path and leaves all other path segments unchanged. - -**Verified by:** - -- Strips libar-platform/ prefix -- Strips monorepo/ prefix -- Returns unchanged path without known prefix -- Only strips prefix at start of path - -
- -### ExtractSummary - -[View ExtractSummary source](tests/features/behavior/extract-summary.feature) - -The extractSummary function transforms multi-line pattern descriptions into -concise, single-line summaries suitable for table display in generated docs. - -**Key behaviors:** - -- Combines multiple lines until finding a complete sentence -- Truncates at sentence boundaries when possible -- Adds "..." for incomplete text (no sentence ending) -- Skips tautological first lines (just the pattern name) -- Skips section header labels like "Problem:", "Solution:" - -
-Single-line descriptions are returned as-is when complete (2 scenarios) - -#### Single-line descriptions are returned as-is when complete - -**Invariant:** A single-line description that ends with sentence-ending punctuation is returned verbatim; one without gets an appended ellipsis. - -**Verified by:** - -- Complete sentence on single line -- Single line without sentence ending gets ellipsis - -
- -
-Multi-line descriptions are combined until sentence ending (4 scenarios) - -#### Multi-line descriptions are combined until sentence ending - -**Invariant:** Lines are concatenated until a sentence-ending punctuation mark is found or the character limit is reached, whichever comes first. - -**Verified by:** - -- Two lines combine into complete sentence -- Combines lines up to sentence boundary within limit -- Long multi-line text truncates when exceeds limit -- Multi-line without sentence ending gets ellipsis - -
- -
-Long descriptions are truncated at sentence or word boundaries (2 scenarios) - -#### Long descriptions are truncated at sentence or word boundaries - -**Invariant:** Summaries exceeding the character limit are truncated at the nearest sentence boundary if possible, otherwise at a word boundary with an appended ellipsis. - -**Rationale:** Sentence-boundary truncation preserves semantic completeness; word-boundary fallback avoids mid-word breaks. - -**Verified by:** - -- Long text truncates at sentence boundary within limit -- Long text without sentence boundary truncates at word with ellipsis - -
- -
-Tautological and header lines are skipped (3 scenarios) - -#### Tautological and header lines are skipped - -**Invariant:** Lines that merely repeat the pattern name or consist only of a section header label (e.g., "Problem:", "Solution:") are skipped; the summary begins with the first substantive line. - -**Rationale:** Tautological opening lines waste the limited summary space without adding information. - -**Verified by:** - -- Skips pattern name as first line -- Skips section header labels -- Skips multiple header patterns - -
- -
-Edge cases are handled gracefully (5 scenarios) - -#### Edge cases are handled gracefully - -**Invariant:** Degenerate inputs (empty strings, markdown-only content, bold markers) produce valid output without errors: empty input yields empty string, formatting is stripped, and multiple sentence endings use the first. - -**Verified by:** - -- Empty description returns empty string -- Markdown headers are stripped -- Bold markdown is stripped -- Multiple sentence endings - takes first complete sentence -- Question mark as sentence ending - -
- -### DescriptionQualityFoundation - -[View DescriptionQualityFoundation source](tests/features/behavior/description-quality-foundation.feature) - -Enhanced documentation generation with human-readable names, -behavior file verification, and numbered acceptance criteria for PRD quality. - -**Problem:** - -- CamelCase pattern names (e.g., "RemainingWorkEnhancement") are hard to read -- File extensions like ".md" incorrectly trigger sentence-ending detection -- Business value tags with hyphens display as "enable-rich-prd" instead of readable text -- No way to verify behavior file traceability during extraction -- PRD acceptance criteria lack visual structure and numbering - -**Solution:** - -- Transform CamelCase to title case ("Remaining Work Enhancement") -- Skip file extension patterns when detecting sentence boundaries -- Convert hyphenated business values to readable phrases -- Verify behavior file existence during pattern extraction -- Number acceptance criteria and bold Given/When/Then keywords in PRD output - -
-Behavior files are verified during pattern extraction (4 scenarios) - -#### Behavior files are verified during pattern extraction - -**Invariant:** Every timeline pattern must report whether its corresponding behavior file exists. - -**Verified by:** - -- Behavior file existence verified during extraction -- Missing behavior file sets verification to false -- Explicit behavior file tag skips verification -- Behavior file inferred from timeline naming convention - -
- -
-Traceability coverage reports verified and unverified behavior files (1 scenarios) - -#### Traceability coverage reports verified and unverified behavior files - -**Invariant:** Coverage reports must distinguish between patterns with verified behavior files and those without. - -**Verified by:** - -- Traceability shows covered phases with verified behavior files - -
- -
-Pattern names are transformed to human-readable display names (4 scenarios) - -#### Pattern names are transformed to human-readable display names - -**Invariant:** Display names must convert CamelCase to title case, handle consecutive capitals, and respect explicit title overrides. - -**Verified by:** - -- CamelCase pattern names transformed to title case -- PascalCase with consecutive caps handled correctly -- Falls back to name when no patternName -- Explicit title tag overrides CamelCase transformation - -
- -
-PRD acceptance criteria are formatted with numbering and bold keywords (3 scenarios) - -#### PRD acceptance criteria are formatted with numbering and bold keywords - -**Invariant:** PRD output must number acceptance criteria and bold Given/When/Then keywords when steps are enabled. - -**Verified by:** - -- PRD shows numbered acceptance criteria with bold keywords -- PRD respects includeScenarioSteps flag -- PRD shows full Feature description without truncation - -
- -
-Business values are formatted for human readability (3 scenarios) - -#### Business values are formatted for human readability - -**Invariant:** Hyphenated business value tags must be converted to space-separated readable text in all output contexts. - -**Verified by:** - -- Hyphenated business value converted to spaces -- Business value displayed in Next Actionable table -- File extensions not treated as sentence endings - -
- -### DescriptionHeaderNormalization - -[View DescriptionHeaderNormalization source](tests/features/behavior/description-headers.feature) - -Pattern descriptions should not create duplicate headers when rendered. -If directive descriptions start with markdown headers, those headers -should be stripped before rendering under the "Description" section. - -
-Leading headers are stripped from pattern descriptions (3 scenarios) - -#### Leading headers are stripped from pattern descriptions - -**Invariant:** Markdown headers at the start of a pattern description are removed before rendering to prevent duplicate headings under the Description section. - -**Rationale:** The codec already emits a "## Description" header; preserving the source header would create a redundant or conflicting heading hierarchy. - -**Verified by:** - -- Strip single leading markdown header -- Strip multiple leading headers -- Preserve description without leading header - -
- -
-Edge cases are handled correctly (3 scenarios) - -#### Edge cases are handled correctly - -**Invariant:** Header stripping handles degenerate inputs (header-only, whitespace-only, mid-description headers) without data loss or rendering errors. - -**Verified by:** - -- Empty description after stripping headers -- Description with only whitespace and headers -- Header in middle of description is preserved - -
- -
-stripLeadingHeaders removes only leading headers (6 scenarios) - -#### stripLeadingHeaders removes only leading headers - -**Invariant:** The helper function strips only headers that appear before any non-header content; headers occurring after body text are preserved. - -**Verified by:** - -- Strips h1 header -- Strips h2 through h6 headers -- Strips leading empty lines before header -- Preserves content starting with text -- Returns empty string for header-only input -- Handles null/undefined input - -
- -### ZodCodecMigration - -[View ZodCodecMigration source](tests/features/behavior/codec-migration.feature) - -All JSON parsing and serialization uses type-safe Zod codec pattern, -replacing raw JSON.parse/stringify with single-step validated operations. - -**Problem:** - -- Raw JSON.parse returns unknown/any types, losing type safety at runtime -- JSON.stringify doesn't validate output matches expected schema -- Error handling for malformed JSON scattered across codebase -- No structured validation errors with field-level details -- $schema fields from JSON Schema files cause Zod strict mode failures - -**Solution:** - -- Input codec (createJsonInputCodec) combines parsing + validation in one step -- Output codec (createJsonOutputCodec) validates before serialization -- Structured CodecError type with operation, source, and validation details -- $schema stripping before validation for JSON Schema compatibility -- formatCodecError utility for consistent human-readable error output - -
-Input codec parses and validates JSON in a single step (4 scenarios) - -#### Input codec parses and validates JSON in a single step - -**Invariant:** Every JSON string parsed through the input codec is both syntactically valid JSON and schema-conformant before returning a typed value. - -**Verified by:** - -- Input codec parses valid JSON to typed object -- Input codec returns error for malformed JSON -- Input codec returns validation errors for schema violations -- Input codec strips $schema field before validation - -
- -
-Output codec validates before serialization (3 scenarios) - -#### Output codec validates before serialization - -**Invariant:** Every object serialized through the output codec is schema-validated before JSON.stringify, preventing invalid data from reaching consumers. - -**Verified by:** - -- Output codec serializes valid object to JSON -- Output codec returns error for schema violations -- Output codec respects indent option - -
- -
-LintOutputSchema validates CLI lint output structure (2 scenarios) - -#### LintOutputSchema validates CLI lint output structure - -**Invariant:** Lint output JSON always conforms to the LintOutputSchema, ensuring consistent structure for downstream tooling. - -**Verified by:** - -- LintOutputSchema validates correct lint output -- LintOutputSchema rejects invalid severity - -
- -
-ValidationSummaryOutputSchema validates cross-source analysis output (2 scenarios) - -#### ValidationSummaryOutputSchema validates cross-source analysis output - -**Invariant:** Validation summary JSON always conforms to the ValidationSummaryOutputSchema, ensuring consistent reporting of cross-source pattern analysis. - -**Verified by:** - -- ValidationSummaryOutputSchema validates correct validation output -- ValidationSummaryOutputSchema rejects invalid issue source - -
- -
-RegistryMetadataOutputSchema accepts arbitrary nested structures (1 scenarios) - -#### RegistryMetadataOutputSchema accepts arbitrary nested structures - -**Invariant:** Registry metadata codec accepts any valid JSON-serializable object without schema constraints on nested structure. - -**Verified by:** - -- RegistryMetadataOutputSchema accepts arbitrary metadata - -
- -
-formatCodecError produces human-readable error output (1 scenarios) - -#### formatCodecError produces human-readable error output - -**Invariant:** Formatted codec errors always include the operation context and all validation error details for debugging. - -**Verified by:** - -- formatCodecError includes validation errors in output - -
- -
-safeParse returns typed values or undefined without throwing (3 scenarios) - -#### safeParse returns typed values or undefined without throwing - -**Invariant:** safeParse never throws exceptions; it returns the typed value on success or undefined on any failure. - -**Verified by:** - -- safeParse returns typed value on valid JSON -- safeParse returns undefined on malformed JSON -- safeParse returns undefined on schema violation - -
- -
-createFileLoader handles filesystem operations with typed errors (5 scenarios) - -#### createFileLoader handles filesystem operations with typed errors - -**Invariant:** File loader converts all filesystem errors (ENOENT, EACCES, generic) into structured CodecError values with appropriate messages and source paths. - -**Verified by:** - -- createFileLoader loads and parses valid JSON file -- createFileLoader handles ENOENT error -- createFileLoader handles EACCES error -- createFileLoader handles general read error -- createFileLoader handles invalid JSON in file - -
- -### MermaidRelationshipRendering - -[View MermaidRelationshipRendering source](tests/features/behavior/pattern-relationships/mermaid-rendering.feature) - -Tests for rendering all relationship types in Mermaid dependency graphs -with distinct visual styles per relationship semantics. - -
-Each relationship type has a distinct arrow style (4 scenarios) - -#### Each relationship type has a distinct arrow style - -**Invariant:** Each relationship type (uses, depends-on, implements, extends) must render with a unique, visually distinguishable arrow style. - -**Rationale:** Identical arrow styles would make relationship semantics indistinguishable in generated diagrams. - -**Verified by:** - -- Uses relationships render as solid arrows -- Depends-on relationships render as dashed arrows -- Implements relationships render as dotted arrows -- Extends relationships render as solid open arrows - -
- -
-Pattern names are sanitized for Mermaid node IDs (1 scenarios) - -#### Pattern names are sanitized for Mermaid node IDs - -**Invariant:** Pattern names must be transformed into valid Mermaid node IDs by replacing special characters (dots, hyphens, spaces) with underscores. - -**Verified by:** - -- Special characters are replaced - -
- -
-All relationship types appear in single graph (1 scenarios) - -#### All relationship types appear in single graph - -**Invariant:** The generated Mermaid graph must combine all relationship types (uses, depends-on, implements, extends) into a single top-down graph. - -**Verified by:** - -- Complete dependency graph with all relationship types - -
- -### LayeredDiagramGeneration - -[View LayeredDiagramGeneration source](tests/features/behavior/architecture-diagrams/layered-diagram.feature) - -As a documentation generator -I want to generate layered architecture diagrams from metadata -So that system architecture is visualized by layer hierarchy - -
-Layered diagrams group patterns by arch-layer (1 scenarios) - -#### Layered diagrams group patterns by arch-layer - -**Invariant:** Each distinct arch-layer value must produce exactly one Mermaid subgraph containing all patterns with that layer. - -**Verified by:** - -- Generate subgraphs for each layer -- Generate subgraphs for each layer - - Patterns with arch-layer are grouped into Mermaid subgraphs. - Each layer becomes a visual container. - -
- -
-Layer order is domain to infrastructure (top to bottom) (1 scenarios) - -#### Layer order is domain to infrastructure (top to bottom) - -**Invariant:** Layer subgraphs must be rendered in Clean Architecture order: domain first, then application, then infrastructure. - -**Rationale:** The visual order reflects the dependency rule where outer layers depend on inner layers; reversing it would misrepresent the architecture. - -**Verified by:** - -- Layers render in correct order -- Layers render in correct order - - The layer subgraphs are rendered in Clean Architecture order: - domain at top - -- then application -- then infrastructure at bottom. - This reflects the dependency rule: outer layers depend on inner layers. - -
- -
-Context labels included in layered diagram nodes (1 scenarios) - -#### Context labels included in layered diagram nodes - -**Invariant:** Each node in a layered diagram must include its bounded context name as a label, since context is not conveyed by subgraph grouping. - -**Rationale:** Layered diagrams group by layer, not context, so the context label is the only way to identify which bounded context a node belongs to. - -**Verified by:** - -- Nodes include context labels -- Nodes include context labels - - Unlike component diagrams which group by context - -- layered diagrams - include the context as a label in each node name. - -
- -
-Patterns without layer go to Other subgraph (1 scenarios) - -#### Patterns without layer go to Other subgraph - -**Invariant:** Patterns that have arch-role or arch-context but no arch-layer must be placed in an "Other" subgraph, never omitted from the diagram. - -**Rationale:** Omitting unlayered patterns would silently hide architectural components; the "Other" group makes their missing classification visible. - -**Verified by:** - -- Unlayered patterns in Other subgraph -- Unlayered patterns in Other subgraph - - Patterns that have arch-role or arch-context but no arch-layer - are grouped into an "Other" subgraph. - -
- -
-Layered diagram includes summary section (1 scenarios) - -#### Layered diagram includes summary section - -**Invariant:** The generated layered diagram document must include an Overview section with annotated source file count. - -**Verified by:** - -- Summary section for layered view -- Summary section for layered view - - The generated document starts with an overview section - specific to layered architecture visualization. - -
- -### ArchGeneratorRegistration - -[View ArchGeneratorRegistration source](tests/features/behavior/architecture-diagrams/generator-registration.feature) - -As a CLI user -I want an architecture generator registered in the generator registry -So that I can run pnpm docs:architecture to generate diagrams - -
-Architecture generator is registered in the registry (1 scenarios) - -#### Architecture generator is registered in the registry - -**Invariant:** The generator registry must contain an "architecture" generator entry available for CLI invocation. - -**Verified by:** - -- Generator is available in registry -- Generator is available in registry - - The architecture generator must be registered like other built-in - generators so it can be invoked via CLI. - -
- -
-Architecture generator produces component diagram by default (1 scenarios) - -#### Architecture generator produces component diagram by default - -**Invariant:** Running the architecture generator without diagram type options must produce a component diagram with bounded context subgraphs. - -**Verified by:** - -- Default generation produces component diagram -- Default generation produces component diagram - - Running the architecture generator without options produces - a component diagram (bounded context view). - -
- -
-Architecture generator supports diagram type options (1 scenarios) - -#### Architecture generator supports diagram type options - -**Invariant:** The architecture generator must accept a diagram type option that selects between component and layered diagram output. - -**Verified by:** - -- Generate layered diagram with options -- Generate layered diagram with options - - The generator accepts options to specify diagram type - (component or layered). - -
- -
-Architecture generator supports context filtering (1 scenarios) - -#### Architecture generator supports context filtering - -**Invariant:** When context filtering is applied, the generated diagram must include only patterns from the specified bounded contexts and exclude all others. - -**Verified by:** - -- Filter to specific contexts -- Filter to specific contexts - - The generator can filter to specific bounded contexts - for focused diagram output. - -
- -### ComponentDiagramGeneration - -[View ComponentDiagramGeneration source](tests/features/behavior/architecture-diagrams/component-diagram.feature) - -As a documentation generator -I want to generate component diagrams from architecture metadata -So that system architecture is automatically visualized with bounded context subgraphs - -
-Component diagrams group patterns by bounded context (1 scenarios) - -#### Component diagrams group patterns by bounded context - -**Invariant:** Each distinct arch-context value must produce exactly one Mermaid subgraph containing all patterns with that context. - -**Verified by:** - -- Generate subgraphs for bounded contexts -- Generate subgraphs for bounded contexts - - Patterns with arch-context are grouped into Mermaid subgraphs. - Each bounded context becomes a visual container. - -
- -
-Context-less patterns go to Shared Infrastructure (1 scenarios) - -#### Context-less patterns go to Shared Infrastructure - -**Invariant:** Patterns without an arch-context value must be placed in a "Shared Infrastructure" subgraph, never omitted from the diagram. - -**Rationale:** Cross-cutting infrastructure components (event bus, logger) belong to no bounded context but must still appear in the diagram. - -**Verified by:** - -- Shared infrastructure subgraph for context-less patterns -- Shared infrastructure subgraph for context-less patterns - - Patterns without arch-context are grouped into a - "Shared Infrastructure" subgraph. - -
- -
-Relationship types render with distinct arrow styles (1 scenarios) - -#### Relationship types render with distinct arrow styles - -**Invariant:** Each relationship type must render with its designated Mermaid arrow style: uses (-->), depends-on (-.->), implements (..->), extends (-->>). - -**Rationale:** Distinct arrow styles convey dependency semantics visually; conflating them loses architectural information. - -**Verified by:** - -- Arrow styles for relationship types -- Arrow styles for relationship types - - Arrow styles follow UML conventions: - - uses: solid arrow (-->) - - depends-on: dashed arrow (-.->) - - implements: dotted arrow (..->) - - extends: open arrow (-->>) - -
- -
-Arrows only connect annotated components (1 scenarios) - -#### Arrows only connect annotated components - -**Invariant:** Relationship arrows must only be rendered when both source and target patterns exist in the architecture index. - -**Rationale:** Rendering an arrow to a non-existent node would produce invalid Mermaid syntax or dangling references. - -**Verified by:** - -- Skip arrows to non-annotated targets -- Skip arrows to non-annotated targets - - Relationships pointing to non-annotated patterns - are not rendered (target would not exist in diagram). - -
- -
-Component diagram includes summary section (1 scenarios) - -#### Component diagram includes summary section - -**Invariant:** The generated component diagram document must include an Overview section with component count and bounded context count. - -**Verified by:** - -- Summary section with counts -- Summary section with counts - - The generated document starts with an overview section - showing component counts and bounded context statistics. - -
- -
-Component diagram includes legend when enabled (1 scenarios) - -#### Component diagram includes legend when enabled - -**Invariant:** When the legend is enabled, the document must include a Legend section explaining relationship arrow styles. - -**Verified by:** - -- Legend section with arrow explanations -- Legend section with arrow explanations - - The legend explains arrow style meanings for readers. - -
- -
-Component diagram includes inventory table when enabled (1 scenarios) - -#### Component diagram includes inventory table when enabled - -**Invariant:** When the inventory is enabled, the document must include a Component Inventory table with Component, Context, Role, and Layer columns. - -**Verified by:** - -- Inventory table with component details -- Inventory table with component details - - The inventory lists all components with their metadata. - -
- -
-Empty architecture data shows guidance message (1 scenarios) - -#### Empty architecture data shows guidance message - -**Invariant:** When no patterns have architecture annotations, the document must display a guidance message explaining how to add arch tags. - -**Rationale:** An empty diagram with no explanation would be confusing; guidance helps users onboard to the annotation system. - -**Verified by:** - -- No architecture data message -- No architecture data message - - If no patterns have architecture annotations - -- the document explains how to add them. - -
- -### ArchTagExtraction - -[View ArchTagExtraction source](tests/features/behavior/architecture-diagrams/arch-tag-extraction.feature) - -As a documentation generator -I want architecture tags extracted from source code -So that I can generate accurate architecture diagrams - -
-arch-role tag is defined in the registry (2 scenarios) - -#### arch-role tag is defined in the registry - -**Invariant:** The tag registry must contain an arch-role tag with enum format and all valid architectural role values. - -**Rationale:** Without a registry-defined arch-role tag, the extractor cannot validate role values and diagrams may render invalid roles. - -**Verified by:** - -- arch-role tag exists with enum format -- arch-role has required enum values -- arch-role has required enum values - - Architecture roles classify components for diagram rendering. - Valid roles: command-handler - -- projection -- saga -- process-manager -- infrastructure -- repository -- decider -- read-model -- bounded-context. - -
- -
-arch-context tag is defined in the registry (1 scenarios) - -#### arch-context tag is defined in the registry - -**Invariant:** The tag registry must contain an arch-context tag with value format for free-form bounded context names. - -**Verified by:** - -- arch-context tag exists with value format -- arch-context tag exists with value format - - Context tags group components into bounded context subgraphs. - Format is "value" (free-form string like "orders" - -- "inventory"). - -
- -
-arch-layer tag is defined in the registry (2 scenarios) - -#### arch-layer tag is defined in the registry - -**Invariant:** The tag registry must contain an arch-layer tag with enum format and exactly three values: domain, application, infrastructure. - -**Verified by:** - -- arch-layer tag exists with enum format -- arch-layer has exactly three values -- arch-layer has exactly three values - - Layer tags enable layered architecture diagrams. - Valid layers: domain - -- application -- infrastructure. - -
- -
-AST parser extracts arch-role from TypeScript annotations (2 scenarios) - -#### AST parser extracts arch-role from TypeScript annotations - -**Invariant:** The AST parser must extract the arch-role value from JSDoc annotations and populate the directive's archRole field. - -**Verified by:** - -- Extract arch-role projection -- Extract arch-role command-handler -- Extract arch-role command-handler - - The AST parser must extract arch-role alongside other pattern metadata. - -
- -
-AST parser extracts arch-context from TypeScript annotations (2 scenarios) - -#### AST parser extracts arch-context from TypeScript annotations - -**Invariant:** The AST parser must extract the arch-context value from JSDoc annotations and populate the directive's archContext field. - -**Verified by:** - -- Extract arch-context orders -- Extract arch-context inventory -- Extract arch-context inventory - - Context values are free-form strings naming the bounded context. - -
- -
-AST parser extracts arch-layer from TypeScript annotations (2 scenarios) - -#### AST parser extracts arch-layer from TypeScript annotations - -**Invariant:** The AST parser must extract the arch-layer value from JSDoc annotations and populate the directive's archLayer field. - -**Verified by:** - -- Extract arch-layer application -- Extract arch-layer infrastructure -- Extract arch-layer infrastructure - - Layer tags classify components by architectural layer. - -
- -
-AST parser handles multiple arch tags together (1 scenarios) - -#### AST parser handles multiple arch tags together - -**Invariant:** When a JSDoc block contains arch-role, arch-context, and arch-layer tags, all three must be extracted into the directive. - -**Verified by:** - -- Extract all three arch tags -- Extract all three arch tags - - Components often have role + context + layer together. - -
- -
-Missing arch tags yield undefined values (1 scenarios) - -#### Missing arch tags yield undefined values - -**Invariant:** Arch tag fields absent from a JSDoc block must be undefined in the extracted directive, not null or empty string. - -**Rationale:** Downstream consumers distinguish between "not annotated" (undefined) and "annotated with empty value" to avoid rendering ghost nodes. - -**Verified by:** - -- Missing arch tags are undefined -- Missing arch tags are undefined - - Components without arch tags should have undefined (not null or empty). - -
- -### ArchIndexDataset - -[View ArchIndexDataset source](tests/features/behavior/architecture-diagrams/arch-index.feature) - -As a documentation generator -I want an archIndex built during dataset transformation -So that I can efficiently look up patterns by role, context, and layer - -
-archIndex groups patterns by arch-role (1 scenarios) - -#### archIndex groups patterns by arch-role - -**Invariant:** Every pattern with an arch-role tag must appear in the archIndex.byRole map under its role key. - -**Rationale:** Diagram generators need O(1) lookup of patterns by role to render role-based groupings efficiently. - -**Verified by:** - -- Group patterns by role -- Group patterns by role - - The archIndex.byRole map groups patterns by their architectural role - (command-handler - -- projection -- saga -- etc.) for efficient lookup. - -
- -
-archIndex groups patterns by arch-context (1 scenarios) - -#### archIndex groups patterns by arch-context - -**Invariant:** Every pattern with an arch-context tag must appear in the archIndex.byContext map under its context key. - -**Rationale:** Component diagrams render bounded context subgraphs and need patterns grouped by context. - -**Verified by:** - -- Group patterns by context -- Group patterns by context - - The archIndex.byContext map groups patterns by bounded context - for subgraph rendering in component diagrams. - -
- -
-archIndex groups patterns by arch-layer (1 scenarios) - -#### archIndex groups patterns by arch-layer - -**Invariant:** Every pattern with an arch-layer tag must appear in the archIndex.byLayer map under its layer key. - -**Rationale:** Layered diagrams render layer subgraphs and need patterns grouped by architectural layer. - -**Verified by:** - -- Group patterns by layer -- Group patterns by layer - - The archIndex.byLayer map groups patterns by architectural layer - (domain - -- application -- infrastructure) for layered diagram rendering. - -
- -
-archIndex.all contains all patterns with any arch tag (1 scenarios) - -#### archIndex.all contains all patterns with any arch tag - -**Invariant:** archIndex.all must contain exactly the set of patterns that have at least one arch tag (role, context, or layer). - -**Verified by:** - -- archIndex.all includes all annotated patterns -- archIndex.all includes all annotated patterns - - The archIndex.all array contains all patterns that have at least - one arch tag (role - -- context -- or layer). Patterns without any arch - tags are excluded. - -
- -
-Patterns without arch tags are excluded from archIndex (1 scenarios) - -#### Patterns without arch tags are excluded from archIndex - -**Invariant:** Patterns lacking all three arch tags (role, context, layer) must not appear in any archIndex view. - -**Rationale:** Including non-architectural patterns would pollute diagrams with irrelevant components. - -**Verified by:** - -- Non-annotated patterns excluded -- Non-annotated patterns excluded - - Patterns that have no arch-role - -- arch-context -- or arch-layer are - not included in the archIndex at all. - -
- -### TimelineCodecTesting - -[View TimelineCodecTesting source](tests/features/behavior/codecs/timeline-codecs.feature) - -The timeline codecs (RoadmapDocumentCodec, CompletedMilestonesCodec, CurrentWorkCodec) -transform MasterDataset into RenderableDocuments for different timeline views. - -**Problem:** - -- Need to generate roadmap, milestones, and current work documents from patterns -- Each view requires different filtering and grouping logic - -**Solution:** - -- Three specialized codecs for different timeline perspectives -- Shared phase grouping with status-specific filtering - -
-RoadmapDocumentCodec groups patterns by phase with progress tracking (8 scenarios) - -#### RoadmapDocumentCodec groups patterns by phase with progress tracking - -**Invariant:** The roadmap must include overall progress with percentage, phase navigation table, and phase sections with pattern tables. - -**Rationale:** The roadmap is the primary planning artifact — progress tracking at both project and phase level enables informed prioritization. - -**Verified by:** - -- Decode empty dataset produces minimal roadmap -- Decode dataset with multiple phases -- Progress section shows correct status counts -- Phase navigation table with progress -- Phase sections show pattern tables -- Generate phase detail files when enabled -- No detail files when disabled -- Quarterly timeline shown when quarters exist - -
- -
-CompletedMilestonesCodec shows only completed patterns grouped by quarter (6 scenarios) - -#### CompletedMilestonesCodec shows only completed patterns grouped by quarter - -**Invariant:** Only completed patterns appear, grouped by quarter with navigation, recent completions, and collapsible phase details. - -**Rationale:** Milestone tracking provides a historical record of delivery — grouping by quarter aligns with typical reporting cadence. - -**Verified by:** - -- No completed patterns produces empty message -- Summary shows completed counts -- Quarterly navigation with completed patterns -- Completed phases shown in collapsible sections -- Recent completions section with limit -- Generate quarterly detail files when enabled - -
- -
-CurrentWorkCodec shows only active patterns with deliverables (6 scenarios) - -#### CurrentWorkCodec shows only active patterns with deliverables - -**Invariant:** Only active patterns appear with progress bars, deliverable tracking, and an all-active-patterns summary table. - -**Rationale:** Current work focus eliminates noise from completed and planned items — teams need to see only what's in flight. - -**Verified by:** - -- No active work produces empty message -- Summary shows overall progress -- Active phases with progress bars -- Deliverables rendered when configured -- All active patterns table -- Generate current work detail files when enabled - -
- -### ShapeSelectorTesting - -[View ShapeSelectorTesting source](tests/features/behavior/codecs/shape-selector.feature) - -Tests the filterShapesBySelectors function that provides fine-grained -shape selection via structural discriminated union selectors. - -#### Reference doc configs select shapes via shapeSelectors - -**Invariant:** shapeSelectors provides three selection modes: by source path + specific names, by group tag, or by source path alone. - -**Verified by:** - -- Select specific shapes by source and names -- Select all shapes in a group -- Select all tagged shapes from a source file -- shapeSources without shapeSelectors returns all shapes -- Select by source and names -- Select by group -- Select by source alone -- shapeSources backward compatibility preserved - -### ShapeMatcherTesting - -[View ShapeMatcherTesting source](tests/features/behavior/codecs/shape-matcher.feature) - -Matches file paths against glob patterns for TypeScript shape extraction. -Uses in-memory string matching (no filesystem access) per AD-6. - -
-Exact paths match without wildcards (2 scenarios) - -#### Exact paths match without wildcards - -**Invariant:** A pattern without glob characters must match only the exact file path, character for character. - -**Verified by:** - -- Exact path matches identical path -- Exact path does not match different path - -
- -
-Single-level globs match one directory level (3 scenarios) - -#### Single-level globs match one directory level - -**Invariant:** A single `*` glob must match files only within the specified directory, never crossing directory boundaries. - -**Verified by:** - -- Single glob matches file in target directory -- Single glob does not match nested subdirectory -- Single glob does not match wrong extension - -
- -
-Recursive globs match any depth (4 scenarios) - -#### Recursive globs match any depth - -**Invariant:** A `**` glob must match files at any nesting depth below the specified prefix, while still respecting extension and prefix constraints. - -**Verified by:** - -- Recursive glob matches file at target depth -- Recursive glob matches file at deeper depth -- Recursive glob matches file at top level -- Recursive glob does not match wrong prefix - -
- -
-Dataset shape extraction deduplicates by name (3 scenarios) - -#### Dataset shape extraction deduplicates by name - -**Invariant:** When multiple patterns match a source glob, the returned shapes must be deduplicated by name so each shape appears at most once. - -**Rationale:** Duplicate shape names in generated documentation confuse readers and inflate type registries. - -**Verified by:** - -- Shapes are extracted from matching patterns -- Duplicate shape names are deduplicated -- No shapes returned when glob does not match - -
- -### SessionCodecTesting - -[View SessionCodecTesting source](tests/features/behavior/codecs/session-codecs.feature) - -The session codecs (SessionContextCodec, RemainingWorkCodec) -transform MasterDataset into RenderableDocuments for AI session context -and incomplete work aggregation views. - -**Problem:** - -- Need to generate session context and remaining work documents from patterns -- Each view requires different filtering, grouping, and prioritization logic - -**Solution:** - -- Two specialized codecs for session planning perspectives -- SessionContextCodec focuses on current work and phase navigation -- RemainingWorkCodec aggregates incomplete work with priority sorting - -#### SessionContextCodec provides working context for AI sessions - -**Invariant:** Session context must include session status with active/completed/remaining counts, phase navigation for incomplete phases, and active work grouped by phase. - -**Rationale:** AI agents need a compact, navigable view of current project state to make informed implementation decisions. - -**Verified by:** - -- Decode empty dataset produces minimal session context -- Decode dataset with timeline patterns -- Session status shows current focus -- Phase navigation for incomplete phases -- Active work grouped by phase -- Blocked items section with dependencies -- No blocked items section when disabled -- Recent completions collapsible -- Generate session phase detail files when enabled -- No detail files when disabled - -#### RemainingWorkCodec aggregates incomplete work by phase - -**Invariant:** Remaining work must show status counts, phase-grouped navigation, priority classification (in-progress/ready/blocked), and next actionable items. - -**Rationale:** Remaining work visibility prevents scope blindness — knowing what's left, what's blocked, and what's ready drives efficient session planning. - -**Verified by:** - -- All work complete produces celebration message -- Summary shows remaining counts -- Phase navigation with remaining count -- By priority shows ready vs blocked -- Next actionable items section -- Next actionable respects maxNextActionable limit -- Sort by phase option -- Sort by priority option -- Generate remaining work detail files when enabled -- No detail files when disabled for remaining - -### RequirementsAdrCodecTesting - -[View RequirementsAdrCodecTesting source](tests/features/behavior/codecs/requirements-adr-codecs.feature) - -The RequirementsDocumentCodec and AdrDocumentCodec transform MasterDataset -into RenderableDocuments for PRD-style and architecture decision documentation. - -**Problem:** - -- Need to generate product requirements documents with flexible groupings -- Need to document architecture decisions with status tracking and supersession - -**Solution:** - -- RequirementsDocumentCodec generates PRD-style docs grouped by product area, user role, or phase -- AdrDocumentCodec generates ADR documentation with category, phase, or date groupings - -#### RequirementsDocumentCodec generates PRD-style documentation from patterns - -**Invariant:** RequirementsDocumentCodec transforms MasterDataset patterns into a PRD-style document with flexible grouping (product area, user role, or phase), optional detail file generation, and business value rendering. - -**Verified by:** - -- No patterns with PRD metadata produces empty message -- Summary shows counts and groupings -- By product area section groups patterns correctly -- By user role section uses collapsible groups -- Group by phase option changes primary grouping -- Filter by status option limits patterns -- All features table shows complete list -- Business value rendering when enabled -- Generate individual requirement detail files when enabled -- Requirement detail file contains acceptance criteria from scenarios -- Requirement detail file contains business rules section -- Implementation links from relationshipIndex - -#### AdrDocumentCodec documents architecture decisions - -**Invariant:** AdrDocumentCodec transforms MasterDataset ADR patterns into an architecture decision record document with status tracking, category/phase/date grouping, supersession relationships, and optional detail file generation. - -**Verified by:** - -- No ADR patterns produces empty message -- Summary shows status counts and categories -- ADRs grouped by category -- ADRs grouped by phase option -- ADRs grouped by date (quarter) option -- ADR index table with all decisions -- ADR entries use clean text without emojis -- Context, Decision, Consequences sections from Rule keywords -- ADR supersedes rendering -- Generate individual ADR detail files when enabled -- ADR detail file contains full content -- Context -- Decision -- Consequences sections from Rule keywords - -### ReportingCodecTesting - -[View ReportingCodecTesting source](tests/features/behavior/codecs/reporting-codecs.feature) - -The reporting codecs (ChangelogCodec, TraceabilityCodec, OverviewCodec) -transform MasterDataset into RenderableDocuments for reporting outputs. - -**Problem:** - -- Need to generate changelog, traceability, and overview documents -- Each view requires different filtering, grouping, and formatting logic - -**Solution:** - -- Three specialized codecs for different reporting perspectives -- Keep a Changelog format for ChangelogCodec -- Coverage statistics and gap reporting for TraceabilityCodec -- Architecture and summary views for OverviewCodec - -
-ChangelogCodec follows Keep a Changelog format (8 scenarios) - -#### ChangelogCodec follows Keep a Changelog format - -**Invariant:** Releases must be sorted by semver descending, unreleased patterns grouped under "[Unreleased]", and change types follow the standard order (Added, Changed, Deprecated, Removed, Fixed, Security). - -**Rationale:** Keep a Changelog is an industry standard format — following it ensures the output is immediately familiar to developers. - -**Verified by:** - -- Decode empty dataset produces changelog header only -- Unreleased section shows active and vNEXT patterns -- Release sections sorted by semver descending -- Quarter fallback for patterns without release -- Earlier section for undated patterns -- Category mapping to change types -- Exclude unreleased when option disabled -- Change type sections follow standard order - -
- -
-TraceabilityCodec maps timeline patterns to behavior tests (8 scenarios) - -#### TraceabilityCodec maps timeline patterns to behavior tests - -**Invariant:** Coverage statistics must show total timeline phases, those with behavior tests, those missing, and a percentage. Gaps must be surfaced prominently. - -**Rationale:** Traceability ensures every planned pattern has executable verification — gaps represent unverified claims about system behavior. - -**Verified by:** - -- No timeline patterns produces empty message -- Coverage statistics show totals and percentage -- Coverage gaps table shows missing coverage -- Covered phases in collapsible section -- Exclude gaps when option disabled -- Exclude stats when option disabled -- Exclude covered when option disabled -- Verified behavior files indicated in output - -
- -
-OverviewCodec provides project architecture summary (8 scenarios) - -#### OverviewCodec provides project architecture summary - -**Invariant:** The overview must include architecture sections from overview-tagged patterns, pattern summary with progress percentage, and timeline summary with phase counts. - -**Rationale:** The architecture overview is the primary entry point for understanding the project — it must provide a complete picture at a glance. - -**Verified by:** - -- Decode empty dataset produces minimal overview -- Architecture section from overview-tagged patterns -- Patterns summary with progress bar -- Timeline summary with phase counts -- Exclude architecture when option disabled -- Exclude patterns summary when option disabled -- Exclude timeline summary when option disabled -- Multiple overview patterns create multiple architecture subsections - -
- -### ReferenceGeneratorTesting - -[View ReferenceGeneratorTesting source](tests/features/behavior/codecs/reference-generators.feature) - -Registers reference document generators from project config. Configs with -`productArea` set are routed to a "product-area-docs" meta-generator; -configs without `productArea` go to "reference-docs". Each config also -produces TWO individual generators (detailed + summary). - -
-Registration produces the correct number of generators (1 scenarios) - -#### Registration produces the correct number of generators - -**Invariant:** Each reference config produces exactly 2 generators (detailed + summary), plus meta-generators for product-area and non-product-area routing. - -**Rationale:** The count is deterministic from config — any mismatch indicates a registration bug that would silently drop generated documents. - -**Verified by:** - -- Generators are registered from configs plus meta-generators - -
- -
-Product area configs produce a separate meta-generator (1 scenarios) - -#### Product area configs produce a separate meta-generator - -**Invariant:** Configs with productArea set route to "product-area-docs" meta-generator; configs without route to "reference-docs". - -**Rationale:** Product area docs are rendered into per-area subdirectories while standalone references go to the root output. - -**Verified by:** - -- Product area meta-generator is registered - -
- -
-Generator naming follows kebab-case convention (2 scenarios) - -#### Generator naming follows kebab-case convention - -**Invariant:** Detailed generators end in "-reference" and summary generators end in "-reference-claude". - -**Rationale:** Consistent naming enables programmatic discovery and distinguishes human-readable from AI-optimized outputs. - -**Verified by:** - -- Detailed generator has name ending in "-reference" -- Summary generator has name ending in "-reference-claude" - -
- -
-Generator execution produces markdown output (2 scenarios) - -#### Generator execution produces markdown output - -**Invariant:** Every registered generator must produce at least one non-empty output file when given matching data. - -**Rationale:** A generator that produces empty output wastes a pipeline slot and creates confusion when expected docs are missing. - -**Verified by:** - -- Product area generator with matching data produces non-empty output -- Product area generator with no patterns still produces intro - -
- -### ReferenceCodecDiagramTesting - -[View ReferenceCodecDiagramTesting source](tests/features/behavior/codecs/reference-codec-diagrams.feature) - -Scoped diagram generation from diagramScope and diagramScopes config, -including archContext, include, archLayer, patterns filters, and -multiple diagram scope composition. - -#### Scoped diagrams are generated from diagramScope config - -**Verified by:** - -- Config with diagramScope produces mermaid block at detailed level -- Neighbor patterns appear in diagram with distinct style -- include filter selects patterns by include tag membership -- Self-contained scope produces no Related subgraph -- Multiple filter dimensions OR together -- Explicit pattern names filter selects named patterns -- Config without diagramScope produces no diagram section -- archLayer filter selects patterns by architectural layer -- archLayer and archContext compose via OR -- Summary level omits scoped diagram - -#### Multiple diagram scopes produce multiple mermaid blocks - -**Verified by:** - -- Config with diagramScopes array produces multiple diagrams -- Diagram direction is reflected in mermaid output -- Legacy diagramScope still works when diagramScopes is absent - -### ReferenceCodecDiagramTypeTesting - -[View ReferenceCodecDiagramTypeTesting source](tests/features/behavior/codecs/reference-codec-diagram-types.feature) - -Diagram type controls Mermaid output format including flowchart, -sequenceDiagram, stateDiagram-v2, C4Context, and classDiagram. -Edge labels and custom node shapes enrich diagram readability. - -#### Diagram type controls Mermaid output format - -**Invariant:** The diagramType field on DiagramScope selects the Mermaid output format. Supported types are graph (flowchart, default), sequenceDiagram, and stateDiagram-v2. Each type produces syntactically valid Mermaid output with type-appropriate node and edge rendering. - -**Rationale:** Flowcharts cannot naturally express event flows (sequence), FSM visualization (state), or temporal ordering. Multiple diagram types unlock richer architectural documentation from the same relationship data. - -**Verified by:** - -- Default diagramType produces flowchart -- Sequence diagram renders participant-message format -- State diagram renders state transitions -- Sequence diagram includes neighbor patterns as participants -- State diagram adds start and end pseudo-states -- C4 diagram renders system boundary format -- C4 diagram renders neighbor patterns as external systems -- Class diagram renders class members and relationships -- Class diagram renders archRole as stereotype - -#### Edge labels and custom node shapes enrich diagram readability - -**Invariant:** Relationship edges display labels describing the relationship type (uses, depends on, implements, extends). Edge labels are enabled by default and can be disabled via showEdgeLabels false. Node shapes in flowchart diagrams vary by archRole value using Mermaid shape syntax. - -**Rationale:** Unlabeled edges are ambiguous without consulting a legend. Custom node shapes make archRole visually distinguishable without color reliance, improving accessibility and scanability. - -**Verified by:** - -- Relationship edges display type labels by default -- Edge labels can be disabled for compact diagrams -- archRole controls Mermaid node shape -- Pattern without archRole uses default rectangle shape -- Edge labels appear by default -- Edge labels can be disabled -- archRole controls node shape -- Unknown archRole falls back to rectangle - -### ReferenceCodecDetailRendering - -[View ReferenceCodecDetailRendering source](tests/features/behavior/codecs/reference-codec-detail-rendering.feature) - -Standard detail level behavior, deep behavior rendering with structured -annotations, shape JSDoc prose, param/returns/throws documentation, -collapsible blocks, link-out blocks, and include tags. - -
-Standard detail level includes narrative but omits rationale (1 scenarios) - -#### Standard detail level includes narrative but omits rationale - -**Verified by:** - -- Standard level includes narrative but omits rationale - -
- -
-Deep behavior rendering with structured annotations (4 scenarios) - -#### Deep behavior rendering with structured annotations - -**Verified by:** - -- Detailed level renders structured behavior rules -- Standard level renders behavior rules without rationale -- Summary level shows behavior rules as truncated table -- Scenario names and verifiedBy merge as deduplicated list - -
- -
-Shape JSDoc prose renders at standard and detailed levels (3 scenarios) - -#### Shape JSDoc prose renders at standard and detailed levels - -**Verified by:** - -- Standard level includes JSDoc in code blocks -- Detailed level includes JSDoc in code block and property table -- Shapes without JSDoc render code blocks only - -
- -
-Shape sections render param returns and throws documentation (4 scenarios) - -#### Shape sections render param returns and throws documentation - -**Verified by:** - -- Detailed level renders param table for function shapes -- Detailed level renders returns and throws documentation -- Standard level renders param table without throws -- Shapes without param docs skip param table - -
- -
-Collapsible blocks wrap behavior rules for progressive disclosure (3 scenarios) - -#### Collapsible blocks wrap behavior rules for progressive disclosure - -**Invariant:** When a behavior pattern has 3 or more rules and detail level is not summary, each rule's content is wrapped in a collapsible block with the rule name and scenario count in the summary. Patterns with fewer than 3 rules render rules flat. Summary level never produces collapsible blocks. - -**Rationale:** Behavior sections with many rules produce substantial content at detailed level. Collapsible blocks enable progressive disclosure so readers can expand only the rules they need. - -**Verified by:** - -- Behavior pattern with many rules uses collapsible blocks at detailed level -- Behavior pattern with few rules does not use collapsible blocks -- Summary level never produces collapsible blocks -- Many rules use collapsible at detailed level -- Few rules render flat -- Summary level suppresses collapsible - -
- -
-Link-out blocks provide source file cross-references (3 scenarios) - -#### Link-out blocks provide source file cross-references - -**Invariant:** At standard and detailed levels, each behavior pattern includes a link-out block referencing its source file path. At summary level, link-out blocks are omitted for compact output. - -**Rationale:** Cross-reference links enable readers to navigate from generated documentation to the annotated source files, closing the loop between generated docs and the single source of truth. - -**Verified by:** - -- Behavior pattern includes source file link-out at detailed level -- Standard level includes source file link-out -- Summary level omits link-out blocks -- Detailed level includes source link-out -- Standard level includes source link-out -- Summary level omits link-out - -
- -
-Include tags route cross-cutting content into reference documents (3 scenarios) - -#### Include tags route cross-cutting content into reference documents - -**Invariant:** Patterns with matching include tags appear alongside category-selected patterns in the behavior section. The merging is additive (OR semantics). - -**Verified by:** - -- Include-tagged pattern appears in behavior section -- Include-tagged pattern is additive with category-selected patterns -- Pattern without matching include tag is excluded - -
- -### ReferenceCodecCoreTesting - -[View ReferenceCodecCoreTesting source](tests/features/behavior/codecs/reference-codec-core.feature) - -Parameterized codec factory that creates reference document codecs -from configuration objects. Core behavior including empty datasets, -conventions, detail levels, shapes, composition, and mermaid blocks. - -
-Empty datasets produce fallback content (1 scenarios) - -#### Empty datasets produce fallback content - -**Verified by:** - -- Codec with no matching content produces fallback message - -
- -
-Convention content is rendered as sections (2 scenarios) - -#### Convention content is rendered as sections - -**Verified by:** - -- Convention rules appear as H2 headings with content -- Convention tables are rendered in the document - -
- -
-Detail level controls output density (2 scenarios) - -#### Detail level controls output density - -**Verified by:** - -- Summary level omits narrative and rationale -- Detailed level includes rationale and verified-by - -
- -
-Behavior sections are rendered from category-matching patterns (1 scenarios) - -#### Behavior sections are rendered from category-matching patterns - -**Verified by:** - -- Behavior-tagged patterns appear in a Behavior Specifications section - -
- -
-Shape sources are extracted from matching patterns (3 scenarios) - -#### Shape sources are extracted from matching patterns - -**Verified by:** - -- Shapes appear when source file matches shapeSources glob -- Summary level shows shapes as a compact table -- No shapes when source file does not match glob - -
- -
-Convention and behavior content compose in a single document (1 scenarios) - -#### Convention and behavior content compose in a single document - -**Verified by:** - -- Both convention and behavior sections appear when data exists - -
- -
-Composition order follows AD-5: conventions then shapes then behaviors (1 scenarios) - -#### Composition order follows AD-5: conventions then shapes then behaviors - -**Verified by:** - -- Convention headings appear before shapes before behaviors - -
- -
-Convention code examples render as mermaid blocks (2 scenarios) - -#### Convention code examples render as mermaid blocks - -**Verified by:** - -- Convention with mermaid content produces mermaid block in output -- Summary level omits convention code examples - -
- -### PrChangesCodecRenderingTesting - -[View PrChangesCodecRenderingTesting source](tests/features/behavior/codecs/pr-changes-codec-rendering.feature) - -The PrChangesCodec transforms MasterDataset into RenderableDocument for -PR-scoped documentation. It filters patterns by changed files and/or -release version tags, groups by phase or priority, and generates -review-focused output. - -**Problem:** - -- Need to generate PR-specific documentation from patterns -- Filters by changed files and release version tags -- Different grouping options (phase, priority, workflow) - -**Solution:** - -- PrChangesCodec with configurable filtering and grouping -- Generates review checklists and dependency sections -- OR logic for combined filters - -
-PrChangesCodec handles empty results gracefully (3 scenarios) - -#### PrChangesCodec handles empty results gracefully - -**Invariant:** When no patterns match the applied filters, the codec must produce a valid document with a "No Changes" section describing which filters were active. - -**Rationale:** Reviewers need to distinguish "nothing matched" from "codec error" and understand why no patterns appear. - -**Verified by:** - -- No changes when no patterns match changedFiles filter -- No changes when no patterns match releaseFilter -- No changes with combined filters when nothing matches - -
- -
-PrChangesCodec generates summary with filter information (3 scenarios) - -#### PrChangesCodec generates summary with filter information - -**Invariant:** Every PR changes document must contain a Summary section with pattern counts and active filter information. - -**Verified by:** - -- Summary section shows pattern counts -- Summary shows release tag when releaseFilter is set -- Summary shows files filter count when changedFiles is set - -
- -
-PrChangesCodec groups changes by phase when sortBy is "phase" (2 scenarios) - -#### PrChangesCodec groups changes by phase when sortBy is "phase" - -**Invariant:** When sortBy is "phase" (the default), patterns must be grouped under phase headings in ascending phase order. - -**Verified by:** - -- Changes grouped by phase with default sortBy -- Pattern details shown within phase groups - -
- -
-PrChangesCodec groups changes by priority when sortBy is "priority" (2 scenarios) - -#### PrChangesCodec groups changes by priority when sortBy is "priority" - -**Invariant:** When sortBy is "priority", patterns must be grouped under High/Medium/Low priority headings with correct pattern assignment. - -**Verified by:** - -- Changes grouped by priority -- Priority groups show correct patterns - -
- -
-PrChangesCodec shows flat list when sortBy is "workflow" (1 scenarios) - -#### PrChangesCodec shows flat list when sortBy is "workflow" - -**Invariant:** When sortBy is "workflow", patterns must be rendered as a flat list without phase or priority grouping. - -**Rationale:** Workflow sorting presents patterns in review order without structural grouping, suited for quick PR reviews. - -**Verified by:** - -- Flat changes list with workflow sort - -
- -
-PrChangesCodec renders pattern details with metadata and description (3 scenarios) - -#### PrChangesCodec renders pattern details with metadata and description - -**Invariant:** Each pattern entry must include a metadata table (status, phase, business value when available) and description text. - -**Verified by:** - -- Pattern detail shows metadata table -- Pattern detail shows business value when available -- Pattern detail shows description - -
- -
-PrChangesCodec renders deliverables when includeDeliverables is enabled (3 scenarios) - -#### PrChangesCodec renders deliverables when includeDeliverables is enabled - -**Invariant:** Deliverables are only rendered when includeDeliverables is enabled, and when releaseFilter is set, only deliverables matching that release are shown. - -**Verified by:** - -- Deliverables shown when patterns have deliverables -- Deliverables filtered by release when releaseFilter is set -- No deliverables section when includeDeliverables is disabled - -
- -
-PrChangesCodec renders acceptance criteria from scenarios (2 scenarios) - -#### PrChangesCodec renders acceptance criteria from scenarios - -**Invariant:** When patterns have associated scenarios, the codec must render an "Acceptance Criteria" section containing scenario names and step lists. - -**Verified by:** - -- Acceptance criteria rendered when patterns have scenarios -- Acceptance criteria shows scenario steps - -
- -
-PrChangesCodec renders business rules from Gherkin Rule keyword (2 scenarios) - -#### PrChangesCodec renders business rules from Gherkin Rule keyword - -**Invariant:** When patterns have Gherkin Rule blocks, the codec must render a "Business Rules" section containing rule names and verification information. - -**Verified by:** - -- Business rules rendered when patterns have rules -- Business rules show rule names and verification info - -
- -### PrChangesCodecOptionsTesting - -[View PrChangesCodecOptionsTesting source](tests/features/behavior/codecs/pr-changes-codec-options.feature) - -The PrChangesCodec transforms MasterDataset into RenderableDocument for -PR-scoped documentation. It filters patterns by changed files and/or -release version tags, groups by phase or priority, and generates -review-focused output. - -**Problem:** - -- Need to generate PR-specific documentation from patterns -- Filters by changed files and release version tags -- Different grouping options (phase, priority, workflow) - -**Solution:** - -- PrChangesCodec with configurable filtering and grouping -- Generates review checklists and dependency sections -- OR logic for combined filters - -
-PrChangesCodec generates review checklist when includeReviewChecklist is enabled (6 scenarios) - -#### PrChangesCodec generates review checklist when includeReviewChecklist is enabled - -**Invariant:** When includeReviewChecklist is enabled, the codec must generate a "Review Checklist" section with standard items and context-sensitive items based on pattern state (completed, active, dependencies, deliverables). When disabled, no checklist appears. - -**Verified by:** - -- Review checklist generated with standard items -- Review checklist includes completed patterns item when applicable -- Review checklist includes active work item when applicable -- Review checklist includes dependencies item when patterns have dependencies -- Review checklist includes deliverables item when patterns have deliverables -- No review checklist when includeReviewChecklist is disabled - -
- -
-PrChangesCodec generates dependencies section when includeDependencies is enabled (4 scenarios) - -#### PrChangesCodec generates dependencies section when includeDependencies is enabled - -**Invariant:** When includeDependencies is enabled and patterns have dependency relationships, the codec must render a "Dependencies" section with "Depends On" and "Enables" subsections. When no dependencies exist or the option is disabled, the section is omitted. - -**Verified by:** - -- Dependencies section shows depends on relationships -- Dependencies section shows enables relationships -- No dependencies section when patterns have no dependencies -- No dependencies section when includeDependencies is disabled - -
- -
-PrChangesCodec filters patterns by changedFiles (2 scenarios) - -#### PrChangesCodec filters patterns by changedFiles - -**Invariant:** When changedFiles filter is set, only patterns whose source files match (including partial directory path matches) are included in the output. - -**Verified by:** - -- Patterns filtered by changedFiles match -- changedFiles filter matches partial paths - -
- -
-PrChangesCodec filters patterns by releaseFilter (1 scenarios) - -#### PrChangesCodec filters patterns by releaseFilter - -**Invariant:** When releaseFilter is set, only patterns with deliverables matching the specified release version are included. - -**Verified by:** - -- Patterns filtered by release version - -
- -
-PrChangesCodec uses OR logic for combined filters (2 scenarios) - -#### PrChangesCodec uses OR logic for combined filters - -**Invariant:** When both changedFiles and releaseFilter are set, patterns matching either criterion are included (OR logic), and patterns matching both criteria appear only once (no duplicates). - -**Rationale:** OR logic maximizes PR coverage — a change may affect files not yet assigned to a release, or a release may include patterns from unchanged files. - -**Verified by:** - -- Combined filters match patterns meeting either criterion -- Patterns matching both criteria are not duplicated - -
- -
-PrChangesCodec only includes active and completed patterns (2 scenarios) - -#### PrChangesCodec only includes active and completed patterns - -**Invariant:** The codec must exclude roadmap and deferred patterns, including only active and completed patterns in the PR changes output. - -**Rationale:** PR changes reflect work that is in progress or done — roadmap and deferred patterns have no code changes to review. - -**Verified by:** - -- Roadmap patterns are excluded -- Deferred patterns are excluded - -
- -### PlanningCodecTesting - -[View PlanningCodecTesting source](tests/features/behavior/codecs/planning-codecs.feature) - -The planning codecs (PlanningChecklistCodec, SessionPlanCodec, SessionFindingsCodec) -transform MasterDataset into RenderableDocuments for planning and retrospective views. - -**Problem:** - -- Need to generate planning checklists, session plans, and findings documents from patterns -- Each view requires different filtering, grouping, and content rendering - -**Solution:** - -- Three specialized codecs for different planning perspectives -- PlanningChecklistCodec prepares for implementation sessions -- SessionPlanCodec generates structured implementation plans -- SessionFindingsCodec captures retrospective discoveries - -
-PlanningChecklistCodec prepares for implementation sessions (9 scenarios) - -#### PlanningChecklistCodec prepares for implementation sessions - -**Invariant:** The checklist must include pre-planning questions, definition of done with deliverables, and dependency status for all actionable phases. - -**Rationale:** Implementation sessions fail without upfront preparation — the checklist surfaces blockers before work begins. - -**Verified by:** - -- No actionable phases produces empty message -- Summary shows phases to plan count -- Pre-planning questions section -- Definition of Done with deliverables -- Acceptance criteria from scenarios -- Risk assessment section -- Dependency status shows met vs unmet -- forActivePhases option -- forNextActionable option - -
- -
-SessionPlanCodec generates implementation plans (8 scenarios) - -#### SessionPlanCodec generates implementation plans - -**Invariant:** The plan must include status summary, implementation approach from use cases, deliverables with status, and acceptance criteria from scenarios. - -**Rationale:** A structured implementation plan ensures all deliverables and acceptance criteria are visible before coding starts. - -**Verified by:** - -- No phases to plan produces empty message -- Summary shows status counts -- Implementation approach from useCases -- Deliverables rendering -- Acceptance criteria with steps -- Business rules section -- statusFilter option for active only -- statusFilter option for planned only - -
- -
-SessionFindingsCodec captures retrospective discoveries (11 scenarios) - -#### SessionFindingsCodec captures retrospective discoveries - -**Invariant:** Findings must be categorized into gaps, improvements, risks, and learnings with per-type counts in the summary. - -**Rationale:** Retrospective findings drive continuous improvement — categorization enables prioritized follow-up across sessions. - -**Verified by:** - -- No findings produces empty message -- Summary shows finding type counts -- Gaps section -- Improvements section -- Risks section includes risk field -- Learnings section -- groupBy category option -- groupBy phase option -- groupBy type option -- showSourcePhase option enabled -- showSourcePhase option disabled - -
- -### DedentHelper - -[View DedentHelper source](tests/features/behavior/codecs/dedent.feature) - -The dedent helper function normalizes indentation in code blocks extracted -from DocStrings. It handles various whitespace patterns including tabs, -mixed indentation, and edge cases. - -**Problem:** - -- DocStrings in Gherkin files have consistent indentation for alignment -- Tab characters vs spaces create inconsistent indentation calculation -- Edge cases like empty lines, all-empty input, single lines need handling - -**Solution:** - -- Normalize tabs to spaces before calculating minimum indentation -- Handle edge cases gracefully without throwing errors -- Preserve relative indentation after removing common prefix - -
-Tabs are normalized to spaces before dedent (2 scenarios) - -#### Tabs are normalized to spaces before dedent - -**Invariant:** Tab characters must be converted to spaces before calculating the minimum indentation level. - -**Rationale:** Mixing tabs and spaces produces incorrect indentation calculations — normalizing first ensures consistent dedent depth. - -**Verified by:** - -- Tab-indented code is properly dedented -- Mixed tabs and spaces are normalized - -
- -
-Empty lines are handled correctly (2 scenarios) - -#### Empty lines are handled correctly - -**Invariant:** Empty lines (including lines with only whitespace) must not affect the minimum indentation calculation and must be preserved in output. - -**Verified by:** - -- Empty lines with trailing spaces are preserved -- All empty lines returns original text - -
- -
-Single line input is handled (2 scenarios) - -#### Single line input is handled - -**Invariant:** Single-line input must have its leading whitespace removed without errors or unexpected transformations. - -**Verified by:** - -- Single line with indentation is dedented -- Single line without indentation is unchanged - -
- -
-Unicode whitespace is handled (1 scenarios) - -#### Unicode whitespace is handled - -**Invariant:** Non-breaking spaces and other Unicode whitespace characters must be treated as content, not as indentation to be removed. - -**Verified by:** - -- Non-breaking space is treated as content - -
- -
-Relative indentation is preserved (2 scenarios) - -#### Relative indentation is preserved - -**Invariant:** After removing the common leading whitespace, the relative indentation between lines must remain unchanged. - -**Verified by:** - -- Nested code blocks preserve relative indentation -- Mixed indentation levels are preserved relatively - -
- -### ConventionExtractorTesting - -[View ConventionExtractorTesting source](tests/features/behavior/codecs/convention-extractor.feature) - -Extracts convention content from MasterDataset decision records -tagged with @libar-docs-convention. Produces structured ConventionBundles -with rule content, tables, and invariant/rationale metadata. - -
-Empty and missing inputs produce empty results (2 scenarios) - -#### Empty and missing inputs produce empty results - -**Verified by:** - -- Empty convention tags returns empty array -- No matching patterns returns empty array - -
- -
-Convention bundles are extracted from matching patterns (3 scenarios) - -#### Convention bundles are extracted from matching patterns - -**Verified by:** - -- Single pattern with one convention tag produces one bundle -- Pattern with CSV conventions contributes to multiple bundles -- Multiple patterns with same convention merge into one bundle - -
- -
-Structured content is extracted from rule descriptions (2 scenarios) - -#### Structured content is extracted from rule descriptions - -**Verified by:** - -- Invariant and rationale are extracted from rule description -- Tables in rule descriptions are extracted as structured data - -
- -
-Code examples in rule descriptions are preserved (2 scenarios) - -#### Code examples in rule descriptions are preserved - -**Verified by:** - -- Mermaid diagram in rule description is extracted as code example -- Rule description without code examples has no code examples field - -
- -
-TypeScript JSDoc conventions are extracted alongside Gherkin (6 scenarios) - -#### TypeScript JSDoc conventions are extracted alongside Gherkin - -**Verified by:** - -- TypeScript pattern with heading sections produces multiple rules -- TypeScript pattern without headings becomes single rule -- TypeScript and Gherkin conventions merge in same bundle -- TypeScript pattern with convention but empty description -- TypeScript description with tables is extracted correctly -- TypeScript description with code examples - -
- -### CompositeCodecTesting - -[View CompositeCodecTesting source](tests/features/behavior/codecs/composite-codec.feature) - -Assembles reference documents from multiple codec outputs by -concatenating RenderableDocument sections. Enables building -documents composed from any combination of existing codecs. - -
-CompositeCodec concatenates sections in codec array order (2 scenarios) - -#### CompositeCodec concatenates sections in codec array order - -**Invariant:** Sections from child codecs appear in the composite output in the same order as the codecs array. - -**Verified by:** - -- Sections from two codecs appear in order -- Three codecs produce sections in array order - -
- -
-Separators between codec outputs are configurable (2 scenarios) - -#### Separators between codec outputs are configurable - -**Invariant:** By default, a separator block is inserted between each child codec's sections. When separateSections is false, no separators are added. - -**Verified by:** - -- Default separator between sections -- No separator when disabled - -
- -
-additionalFiles merge with last-wins semantics (2 scenarios) - -#### additionalFiles merge with last-wins semantics - -**Invariant:** additionalFiles from all children are merged into a single record. When keys collide, the later codec's value wins. - -**Verified by:** - -- Non-overlapping files merged -- Colliding keys use last-wins - -
- -
-composeDocuments works at document level without codecs (1 scenarios) - -#### composeDocuments works at document level without codecs - -**Invariant:** composeDocuments accepts RenderableDocument array and produces a composed RenderableDocument without requiring codecs. - -**Verified by:** - -- Direct document composition - -
- -
-Empty codec outputs are handled gracefully (1 scenarios) - -#### Empty codec outputs are handled gracefully - -**Invariant:** Codecs producing empty sections arrays contribute nothing to the output. No separator is emitted for empty outputs. - -**Verified by:** - -- Empty codec skipped without separator - -
+## Business Rules + +72 patterns, 344 rules with invariants (344 total) + +### ADR 005 Codec Based Markdown Rendering + +| Rule | Invariant | Rationale | +| ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Codecs implement a decode-only contract | Every codec is a pure function that accepts a MasterDataset and returns a RenderableDocument. Codecs do not perform side effects, do not write files, and do not access the filesystem. The codec contract is decode-only because the transformation is one-directional: structured data becomes a document, never the reverse. | Pure functions are deterministic and trivially testable. For the same MasterDataset, a codec always produces the same RenderableDocument. This makes snapshot testing reliable and enables codec output comparison across versions. | +| RenderableDocument is a typed intermediate representation | RenderableDocument contains a title, an ordered array of SectionBlock elements, and an optional record of additional files. Each SectionBlock is a discriminated union: heading, paragraph, table, code, list, separator, or metaRow. The renderer consumes this IR without needing to know which codec produced it. | A typed IR decouples codecs from rendering. Codecs express intent ("this is a table with these rows") and the renderer handles syntax ("pipe-delimited markdown with separator row"). This means switching output format (e.g., HTML instead of markdown) requires only a new renderer, not changes to every codec. | +| CompositeCodec assembles documents from child codecs | CompositeCodec accepts an array of child codecs and produces a single RenderableDocument by concatenating their sections. Child codec order determines section order in the output. Separators are inserted between children by default. | Reference documents combine content from multiple domains (patterns, conventions, shapes, diagrams). Rather than building a monolithic codec that knows about all content types, CompositeCodec lets each domain own its codec and composes them declaratively. | +| ADR content comes from both Feature description and Rule prefixes | ADR structured content (Context, Decision, Consequences) can appear in two locations within a feature file. Both sources must be rendered. Silently dropping either source causes content loss. | Early ADRs used name prefixes like "Context - ..." and "Decision - ..." on Rule blocks to structure content. Later ADRs placed Context, Decision, and Consequences as bold-annotated prose in the Feature description, reserving Rule: blocks for invariants and design rules. Both conventions are valid. The ADR codec must handle both because the codebase contains ADRs authored in each style. The Feature description lives in pattern.directive.description. If the codec only renders Rules (via partitionRulesByPrefix), then Feature description content is silently dropped -- no error, no warning. This caused confusion across two repos where ADR content appeared in the feature file but was missing from generated docs. The fix renders pattern.directive.description in buildSingleAdrDocument between the Overview metadata table and the partitioned Rules section, using renderFeatureDescription() which walks content linearly and handles prose, tables, and DocStrings with correct interleaving. | +| The markdown renderer is codec-agnostic | The renderer accepts any RenderableDocument regardless of which codec produced it. Rendering depends only on block types, not on document origin. This enables testing codecs and renderers independently. | If the renderer knew about specific codecs, adding a new codec would require renderer changes. By operating purely on the SectionBlock discriminated union, the renderer is closed for modification but open for extension via new block types. | + +### ADR 006 Single Read Model Architecture + +| Rule | Invariant | Rationale | +| --------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| All feature consumers query the read model, not raw state | Code that needs pattern relationships, status groupings, cross-source resolution, or dependency information consumes the MasterDataset. Direct scanner/extractor imports are permitted only in pipeline orchestration code that builds the MasterDataset. | Bypassing the read model forces consumers to re-derive data that the MasterDataset already computes, creating duplicate logic and divergent behavior when the pipeline evolves. Exception: `lint-patterns.ts` is a pure stage-1 consumer. It validates annotation syntax on scanned files. No relationships, no cross-source resolution. Direct scanner consumption is correct for that use case. | +| No lossy local types | Consumers do not define local DTOs that duplicate and discard fields from ExtractedPattern. If a consumer needs a subset, the type system provides the projection — not a hand-written extraction function that becomes a barrier between the consumer and canonical data. | Lossy local types silently drop fields that later become needed, causing bugs that only surface when new MasterDataset capabilities are added and the local type lacks them. | +| Relationship resolution is computed once | Forward relationships (uses, dependsOn, implementsPatterns) and reverse lookups (usedBy, implementedBy, extendedBy) are computed in `transformToMasterDataset()`. No consumer re-derives these from raw pattern arrays or scanned file tags. | Re-deriving relationships in consumers duplicates the resolution logic and risks inconsistency when different consumers implement subtly different traversal or filtering rules. | +| Three named anti-patterns | These are recognized violations, serving as review criteria for new code and refactoring targets for existing code. | Without named anti-patterns, violations appear as one-off style issues rather than systematic architectural drift, making them harder to detect and communicate in code review. Naming them makes them visible in code review — including AI-assisted sessions where the default proposal is often "add a helper function." | + +### Arch Generator Registration + +| Rule | Invariant | Rationale | +| ------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| Architecture generator is registered in the registry | The generator registry must contain an "architecture" generator entry available for CLI invocation. | Without a registered entry, the CLI cannot discover or invoke architecture diagram generation. | +| Architecture generator produces component diagram by default | Running the architecture generator without diagram type options must produce a component diagram with bounded context subgraphs. | A sensible default prevents users from needing to specify options for the most common use case. | +| Architecture generator supports diagram type options | The architecture generator must accept a diagram type option that selects between component and layered diagram output. | Different architectural perspectives (bounded context vs. layer hierarchy) require different diagram types, and the user must be able to select which to generate. | +| Architecture generator supports context filtering | When context filtering is applied, the generated diagram must include only patterns from the specified bounded contexts and exclude all others. | Without filtering, large monorepos would produce unreadable diagrams with dozens of bounded contexts; filtering enables focused per-context views. | + +### Arch Index Dataset + +| Rule | Invariant | Rationale | +| ------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| archIndex groups patterns by arch-role | Every pattern with an arch-role tag must appear in the archIndex.byRole map under its role key. | Diagram generators need O(1) lookup of patterns by role to render role-based groupings efficiently. | +| archIndex groups patterns by arch-context | Every pattern with an arch-context tag must appear in the archIndex.byContext map under its context key. | Component diagrams render bounded context subgraphs and need patterns grouped by context. | +| archIndex groups patterns by arch-layer | Every pattern with an arch-layer tag must appear in the archIndex.byLayer map under its layer key. | Layered diagrams render layer subgraphs and need patterns grouped by architectural layer. | +| archIndex.all contains all patterns with any arch tag | archIndex.all must contain exactly the set of patterns that have at least one arch tag (role, context, or layer). | Consumers iterating over all architectural patterns need a single canonical list; omitting partially-tagged patterns would silently drop them from diagrams. | +| Patterns without arch tags are excluded from archIndex | Patterns lacking all three arch tags (role, context, layer) must not appear in any archIndex view. | Including non-architectural patterns would pollute diagrams with irrelevant components. | + +### Architecture Diagram Advanced + +| Rule | Invariant | Rationale | +| ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| Layered diagrams group patterns by architectural layer | Layered diagrams must render patterns grouped by architectural layer (domain, application, infrastructure) with top-to-bottom flow. | Layered architecture visualization shows dependency direction - infrastructure at top, domain at bottom - following conventional layer ordering. | +| Architecture generator is registered with generator registry | An "architecture" generator must be registered with the generator registry to enable `pnpm docs:architecture` via the existing `generate-docs.js` CLI. | The delivery-process uses a generator registry pattern. New generators register with the orchestrator rather than creating separate CLI commands. | +| Sequence diagrams render interaction flows | Sequence diagrams must render interaction flows (command flow, saga flow) showing step-by-step message passing between components. | Component diagrams show structure but not behavior. Sequence diagrams show runtime flow - essential for understanding command/saga execution. | + +### Architecture Diagram Core + +| Rule | Invariant | Rationale | +| ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| Architecture tags exist in the tag registry | Three architecture-specific tags (`arch-role`, `arch-context`, `arch-layer`) must exist in the tag registry with correct format and enum values. | Architecture diagram generation requires metadata to classify source files into diagram components. Standard tag infrastructure enables consistent extraction via the existing AST parser. | +| AST parser extracts architecture tags from TypeScript | The AST parser must extract `arch-role`, `arch-context`, and `arch-layer` tags from TypeScript JSDoc comments into DocDirective objects. | Source code annotations are the single source of truth for architectural metadata. Parser must extract them alongside existing pattern metadata. | +| MasterDataset builds archIndex during transformation | The `transformToMasterDataset` function must build an `archIndex` that groups patterns by role, context, and layer for efficient diagram generation. | Single-pass extraction during dataset transformation avoids expensive re-traversal. Index structure enables O(1) lookup by each dimension. | +| Component diagrams group patterns by bounded context | Component diagrams must render patterns as nodes grouped into bounded context subgraphs, with relationship arrows using UML-inspired styles. | Component diagrams visualize system architecture showing how bounded contexts isolate components. Subgraphs enforce visual separation. | + +### Arch Tag Extraction + +| Rule | Invariant | Rationale | +| ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | +| arch-role tag is defined in the registry | The tag registry must contain an arch-role tag with enum format and all valid architectural role values. | Without a registry-defined arch-role tag, the extractor cannot validate role values and diagrams may render invalid roles. | +| arch-context tag is defined in the registry | The tag registry must contain an arch-context tag with value format for free-form bounded context names. | Without a registry-defined arch-context tag, bounded context groupings cannot be validated and diagrams may contain arbitrary context names. | +| arch-layer tag is defined in the registry | The tag registry must contain an arch-layer tag with enum format and exactly three values: domain, application, infrastructure. | Allowing arbitrary layer values would break the fixed Clean Architecture ordering that layered diagrams depend on. | +| AST parser extracts arch-role from TypeScript annotations | The AST parser must extract the arch-role value from JSDoc annotations and populate the directive's archRole field. | If arch-role is not extracted, patterns cannot be classified by architectural role and diagram node styling is lost. | +| AST parser extracts arch-context from TypeScript annotations | The AST parser must extract the arch-context value from JSDoc annotations and populate the directive's archContext field. | If arch-context is not extracted, component diagrams cannot group patterns into bounded context subgraphs. | +| AST parser extracts arch-layer from TypeScript annotations | The AST parser must extract the arch-layer value from JSDoc annotations and populate the directive's archLayer field. | If arch-layer is not extracted, layered diagrams cannot group patterns into domain/application/infrastructure subgraphs. | +| AST parser handles multiple arch tags together | When a JSDoc block contains arch-role, arch-context, and arch-layer tags, all three must be extracted into the directive. | Partial extraction would cause components to be missing from role, context, or layer groupings depending on which tag was dropped. | +| Missing arch tags yield undefined values | Arch tag fields absent from a JSDoc block must be undefined in the extracted directive, not null or empty string. | Downstream consumers distinguish between "not annotated" (undefined) and "annotated with empty value" to avoid rendering ghost nodes. | + +### Business Rules Document Codec + +| Rule | Invariant | Rationale | +| -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | +| Extracts Rule blocks with Invariant and Rationale | Annotated Rule blocks must have their Invariant, Rationale, and Verified-by fields faithfully extracted and rendered. | These structured annotations are the primary content of business rules documentation; losing them silently produces incomplete output. | +| Organizes rules by product area and phase | Rules must be grouped by product area and ordered by phase number within each group. | Ungrouped or misordered rules make it impossible to find domain-specific constraints or understand their delivery sequence. | +| Summary mode generates compact output | Summary mode must produce only a statistics line and omit all detailed rule headings and content. | AI context windows have strict token limits; including full detail in summary mode wastes context budget and degrades session quality. | +| Preserves code examples and tables in detailed mode | Code examples must appear only in detailed mode and must be excluded from standard mode output. | Code blocks in standard mode clutter the overview and push important rule summaries out of view; detailed mode is the opt-in path for full content. | +| Generates scenario traceability links | Verification links must include the source file path so readers can locate the verifying scenario. | Links without file paths are unresolvable, breaking the traceability chain between business rules and their executable specifications. | +| Progressive disclosure generates detail files per product area | Each product area with rules must produce a separate detail file, and the main document must link to all detail files via an index table. | A single monolithic document becomes unnavigable at scale; progressive disclosure lets readers drill into only the product area they need. | +| Empty rules show placeholder instead of blank content | Rules with no invariant, description, or scenarios must render a placeholder message; rules with scenarios but no invariant must show the verified-by list instead. | Blank rule sections are indistinguishable from rendering bugs; explicit placeholders signal intentional incompleteness versus broken extraction. | +| Rules always render flat for full visibility | Rule output must never use collapsible blocks regardless of rule count; all rule headings must be directly visible. | Business rules are compliance-critical content; hiding them behind collapsible sections risks rules being overlooked during review. | +| Source file shown as filename text | Source file references must render as plain filename text, not as markdown links. | Markdown links to local file paths break in every viewer except the local filesystem, producing dead links that erode trust in the documentation. | +| Verified-by renders as checkbox list at standard level | Verified-by must render as a checkbox list of scenario names, with duplicate names deduplicated. | Duplicate entries inflate the checklist and mislead reviewers into thinking more verification exists than actually does. | +| Feature names are humanized from camelCase pattern names | CamelCase pattern names must be converted to space-separated headings with trailing "Testing" suffixes stripped. | Raw camelCase names are unreadable in documentation headings, and "Testing" suffixes leak implementation concerns into user-facing output. | + +### Business Rules Generator + +| Rule | Invariant | Rationale | +| ------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| Extracts Rule blocks with Invariant and Rationale | Every `Rule:` block with `**Invariant:**` annotation must be extracted. Rules without annotations are included with rule name only. | Business rules are the core domain constraints. Extracting them separately from acceptance criteria creates a focused reference document for domain understanding. | +| Organizes rules by domain category and phase | Rules are grouped first by domain category (from `@libar-docs-*` flags), then by phase number for temporal ordering. | Domain-organized documentation helps stakeholders find rules relevant to their area of concern without scanning all rules. | +| Preserves code examples and comparison tables | DocStrings (`"""typescript`) and tables in Rule descriptions are rendered in the business rules document. | Code examples and tables provide concrete understanding of abstract rules. Removing them loses critical context. | +| Generates scenario traceability links | Each rule's `**Verified by:**` section generates links to the scenarios that verify the rule. | Traceability enables audit compliance and helps developers find relevant tests when modifying rules. | + +### Claude Module Generation + +| Rule | Invariant | Rationale | +| --------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Claude module tags exist in the tag registry | Three claude-specific tags (`claude-module`, `claude-section`, `claude-tags`) must exist in the tag registry with correct format and values. | Module generation requires metadata to determine output path, section placement, and variation filtering. Standard tag infrastructure enables consistent extraction via the existing Gherkin parser. | +| Gherkin parser extracts claude module tags from feature files | The Gherkin extractor must extract `claude-module`, `claude-section`, and `claude-tags` from feature file tags into ExtractedPattern objects. | Behavior specs are the source of truth for CLAUDE.md module content. Parser must extract module metadata alongside existing pattern metadata. | +| Module content is extracted from feature file structure | The codec must extract content from standard feature file elements: Feature description (Problem/Solution), Rule blocks, and Scenario Outline Examples. | Behavior specs already contain well-structured, prescriptive content. The extraction preserves structure rather than flattening to prose. | +| ClaudeModuleCodec produces compact markdown modules | The codec transforms patterns with claude tags into markdown files suitable for the `_claude-md/` directory structure. | CLAUDE.md modules must be compact and actionable. The codec produces ready-to-use markdown without truncation (let modular-claude-md handle token budget warnings). | +| Claude module generator writes files to correct locations | The generator must write module files to `{outputDir}/{section}/{module}.md` based on the `claude-section` and `claude-module` tags. | Output path structure must match modular-claude-md expectations. The `claude-section` determines the subdirectory, `claude-module` determines filename. | +| Claude module generator is registered with generator registry | A "claude-modules" generator must be registered with the generator registry to enable `pnpm docs:claude-modules` via the existing CLI. | Consistent with architecture-diagram-generation pattern. New generators register with the orchestrator rather than creating separate commands. | +| Same source generates detailed docs with progressive disclosure | When running with `detailLevel: "detailed"`, the codec produces expanded documentation including all Rule content, code examples, and scenario details. | Single source generates both compact modules (AI context) and detailed docs (human reference). Progressive disclosure is already a codec capability. | + +### Codec Based Generator Testing + +| Rule | Invariant | Rationale | +| -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------- | +| CodecBasedGenerator adapts codecs to generator interface | CodecBasedGenerator delegates document generation to the underlying codec and surfaces codec errors through the generator interface. | The adapter pattern enables codec-based rendering to integrate with the existing orchestrator without modifying either side. | + +### Codec Behavior Testing + +| Rule | Invariant | Rationale | +| -------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | +| Timeline codecs group patterns by phase and status | Roadmap shows planned work, Milestones shows completed work, CurrentWork shows active patterns only. | Mixing statuses across timeline views would bury actionable information and make it impossible to distinguish planned from delivered work. | +| Session codecs provide working context for AI sessions | SessionContext shows active patterns with deliverables. RemainingWork aggregates incomplete work by phase. | AI sessions without curated context waste tokens on irrelevant patterns, and unaggregated remaining work obscures project health. | +| Requirements codec produces PRD-style documentation | Features include problem, solution, business value. Acceptance criteria are formatted with bold keywords. | Omitting problem/solution context produces specs that lack justification, and unformatted acceptance criteria are difficult to scan. | +| Reporting codecs support release management and auditing | Changelog follows Keep a Changelog format. Traceability maps rules to scenarios. | Non-standard changelog formats break tooling that parses release notes, and unmapped rules represent unverified business constraints. | +| Planning codecs support implementation sessions | Planning checklist includes DoD items. Session plan shows implementation steps. | Missing DoD items in checklists allow incomplete patterns to pass validation, and sessions without implementation steps lose focus. | + +### Codec Driven Reference Generation + +| Rule | Invariant | Rationale | +| ------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Config-driven codec replaces per-document recipe features | A single `ReferenceDocConfig` object is sufficient to produce a complete reference document. No per-document codec subclass or recipe feature is required. | The codec composition logic is identical across all reference documents. Only the content sources differ. Extracting this into a config-driven factory eliminates N duplicated recipe features and makes adding new documents a one-line config addition. | +| Four content sources compose in AD-5 order | Reference documents always compose content in this order: conventions, then scoped diagrams, then shapes, then behaviors. Empty sources are omitted without placeholder sections. | AD-5 established that conceptual context (conventions and architectural diagrams) should precede implementation details (shapes and behaviors). This reading order helps developers understand the "why" before the "what". | +| Detail level controls output density | Three detail levels produce progressively more content from the same config. Summary: type tables only, no diagrams, no narrative. Standard: narrative and code examples, no rationale. Detailed: full rationale, property documentation, and scoped diagrams. | AI context windows need compact summaries. Human readers need full documentation. The same config serves both audiences by parameterizing the detail level at generation time. | +| Generator registration produces paired detailed and summary outputs | Each ReferenceDocConfig produces exactly two generators (detailed for `docs/`, summary for `_claude-md/`) plus a meta-generator that invokes all pairs. Total: N configs x 2 + 1 = 2N + 1 generators. | Every reference document needs both a human-readable detailed version and an AI-optimized compact version. The meta-generator enables `pnpm docs:all` to produce every reference document in one pass. | + +### Component Diagram Generation + +| Rule | Invariant | Rationale | +| ------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | +| Component diagrams group patterns by bounded context | Each distinct arch-context value must produce exactly one Mermaid subgraph containing all patterns with that context. | Without subgraph grouping, the visual relationship between components and their bounded context is lost, making the diagram structurally meaningless. | +| Context-less patterns go to Shared Infrastructure | Patterns without an arch-context value must be placed in a "Shared Infrastructure" subgraph, never omitted from the diagram. | Cross-cutting infrastructure components (event bus, logger) belong to no bounded context but must still appear in the diagram. | +| Relationship types render with distinct arrow styles | Each relationship type must render with its designated Mermaid arrow style: uses (-->), depends-on (-.->), implements (..->), extends (-->>). | Distinct arrow styles convey dependency semantics visually; conflating them loses architectural information. | +| Arrows only connect annotated components | Relationship arrows must only be rendered when both source and target patterns exist in the architecture index. | Rendering an arrow to a non-existent node would produce invalid Mermaid syntax or dangling references. | +| Component diagram includes summary section | The generated component diagram document must include an Overview section with component count and bounded context count. | Without summary counts, readers cannot quickly assess diagram scope or detect missing components. | +| Component diagram includes legend when enabled | When the legend is enabled, the document must include a Legend section explaining relationship arrow styles. | Without a legend, readers cannot distinguish uses, depends-on, implements, and extends arrows, making relationship semantics ambiguous. | +| Component diagram includes inventory table when enabled | When the inventory is enabled, the document must include a Component Inventory table with Component, Context, Role, and Layer columns. | The inventory provides a searchable, text-based alternative to the visual diagram for tooling and accessibility. | +| Empty architecture data shows guidance message | When no patterns have architecture annotations, the document must display a guidance message explaining how to add arch tags. | An empty diagram with no explanation would be confusing; guidance helps users onboard to the annotation system. | + +### Composite Codec Testing + +| Rule | Invariant | Rationale | +| --------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| CompositeCodec concatenates sections in codec array order | Sections from child codecs appear in the composite output in the same order as the codecs array. | Non-deterministic section ordering would make generated documents unstable across runs, breaking diff-based review workflows. | +| Separators between codec outputs are configurable | By default, a separator block is inserted between each child codec's sections. When separateSections is false, no separators are added. | Without configurable separators, consumers cannot control visual grouping — some documents need clear boundaries between codec outputs while others need seamless flow. | +| additionalFiles merge with last-wins semantics | additionalFiles from all children are merged into a single record. When keys collide, the later codec's value wins. | Silently dropping colliding keys would lose content without warning, while throwing on collision would prevent composing codecs that intentionally override shared file paths. | +| composeDocuments works at document level without codecs | composeDocuments accepts RenderableDocument array and produces a composed RenderableDocument without requiring codecs. | Requiring a full codec instance for simple document merging would force unnecessary schema definitions when callers already hold pre-rendered documents. | +| Empty codec outputs are handled gracefully | Codecs producing empty sections arrays contribute nothing to the output. No separator is emitted for empty outputs. | Emitting separators around empty sections would produce orphaned dividers in the generated markdown, creating visual noise with no content between them. | + +### Content Deduplication + +| Rule | Invariant | Rationale | +| --------------------------------------------------- | --------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| Duplicate detection uses content fingerprinting | Content with identical normalized text must produce identical fingerprints. | Fingerprinting enables efficient duplicate detection without full text comparison. | +| Duplicates are merged based on source priority | Higher-priority sources take precedence when merging duplicate content. | TypeScript sources have richer JSDoc; feature files provide behavioral context. | +| Section order is preserved after deduplication | Section order matches the source mapping table order after deduplication. | Predictable ordering ensures consistent documentation structure. | +| Deduplicator integrates with source mapper pipeline | Deduplication runs after extraction and before document assembly. | All content must be extracted before duplicates can be identified. | + +### Convention Extractor Testing + +| Rule | Invariant | Rationale | +| ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| Empty and missing inputs produce empty results | Extraction with no tags or no matching patterns always produces an empty result. | Callers must be able to distinguish "no conventions found" from errors without special-casing nulls or exceptions. | +| Convention bundles are extracted from matching patterns | Each unique convention tag produces exactly one bundle, and patterns sharing a tag are merged into that bundle. | Without tag-based grouping and merging, convention content would be fragmented across duplicates, making downstream rendering unreliable. | +| Structured content is extracted from rule descriptions | Invariant, rationale, and table content embedded in rule descriptions must be extracted as structured metadata, not raw text. | Downstream renderers depend on structured fields to produce consistent documentation; unstructured text would require re-parsing at every consumption point. | +| Code examples in rule descriptions are preserved | Fenced code blocks (including Mermaid diagrams) in rule descriptions must be extracted as typed code examples and never discarded. | Losing code examples during extraction would silently degrade generated documentation, removing diagrams and samples authors intended to publish. | +| TypeScript JSDoc conventions are extracted alongside Gherkin | TypeScript JSDoc and Gherkin convention sources sharing the same tag must merge into a single bundle with all rules preserved from both sources. | Conventions are defined across both TypeScript and Gherkin; failing to merge them would split a single logical convention into incomplete fragments. | + +### Cross Cutting Document Inclusion + +| Rule | Invariant | Rationale | +| --------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Include tag routes content to named documents | A pattern or shape with libar-docs-include:X appears in any reference document whose includeTags contains X. The tag is CSV, so libar-docs-include:X,Y routes the item to both document X and document Y. This is additive -- the item also appears in any document whose existing selectors (conventionTags, behaviorCategories, shapeSelectors) would already select it. | Content-to-document is a many-to-many relationship. A type definition may be relevant to an architecture overview, a configuration guide, and an AI context section. The include tag expresses this routing at the source, next to the code, without requiring the document configs to enumerate every item by name. | +| Include tag scopes diagrams (replaces arch-view) | DiagramScope.include matches patterns whose libar-docs-include values contain the specified scope value. This is the same field that existed as archView -- renamed for consistency with the general-purpose include tag. Patterns with libar-docs-include:pipeline-stages appear in any DiagramScope with include: pipeline-stages. | The experimental arch-view tag was diagram-specific routing under a misleading name. Renaming to include unifies the vocabulary: one tag, two consumption points (diagram scoping via DiagramScope.include, content routing via ReferenceDocConfig.includeTags). | +| Shapes use include tag for document routing | A declaration tagged with both libar-docs-shape and libar-docs-include has its include values stored on the ExtractedShape. The reference codec uses these values alongside shapeSelectors for shape filtering. A shape with libar-docs-include:X appears in any document whose includeTags contains X, regardless of whether the shape matches any shapeSelector. | Shape extraction (via libar-docs-shape) and document routing (via libar-docs-include) are orthogonal concerns. A shape must be extracted before it can be routed. The shape tag triggers extraction; the include tag controls which documents render it. This separation allows one shape to appear in multiple documents without needing multiple group values. | +| Conventions use include tag for selective inclusion | A decision record or convention pattern with libar-docs-include:X appears in a reference document whose includeTags contains X. This allows selecting a single convention rule for a focused document without pulling all conventions matching a broad conventionTag. | Convention content is currently selected by conventionTags, which pulls all decision records tagged with a given convention value. For showcase documents or focused guides, this is too coarse. The include tag enables cherry-picking individual conventions alongside broad tag-based selection. | + +### Decision Doc Codec Testing + +| Rule | Invariant | Rationale | +| ------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Rule blocks are partitioned by semantic prefix | Decision document rules must be partitioned into ADR sections based on their semantic prefix (e.g., "Decision:", "Context:", "Consequence:"), with non-standard rules placed in an "other" category. | Semantic partitioning produces structured ADR output that follows the standard ADR format — unpartitioned rules would generate a flat, unnavigable document. | +| DocStrings are extracted with language tags | DocStrings within rule descriptions must be extracted preserving their language tag (e.g., typescript, bash), defaulting to "text" when no language is specified. | Language tags enable syntax highlighting in generated markdown code blocks — losing the tag produces unformatted code that is harder to read. | +| Source mapping tables are parsed from rule descriptions | Markdown tables in rule descriptions with source mapping columns must be parsed into structured data, returning empty arrays when no table is present. | Source mapping tables drive the extraction pipeline — they define which files to read and what content to extract for each decision section. | +| Self-reference markers are correctly detected | The "THIS DECISION" marker must be recognized as a self-reference to the current decision document, with optional rule name qualifiers parsed correctly. | Self-references enable decisions to extract content from their own rules — misdetecting them would trigger file-system lookups for a non-existent "THIS DECISION" file. | +| Extraction methods are normalized to known types | Extraction method strings from source mapping tables must be normalized to canonical method names for dispatcher routing. | Users may write extraction methods in various formats (e.g., "Decision rule description", "extract-shapes") — normalization ensures consistent dispatch regardless of formatting. | +| Complete decision documents are parsed with all content | A complete decision document must be parseable into its constituent parts including rules, DocStrings, source mappings, and self-references in a single parse operation. | Complete parsing validates that all codec features compose correctly — partial parsing could miss interactions between features. | +| Rules can be found by name with partial matching | Rules must be findable by exact name match or partial (substring) name match, returning undefined when no match exists. | Partial matching supports flexible cross-references between decisions — requiring exact matches would make references brittle to minor naming changes. | + +### Decision Doc Generator Testing + +| Rule | Invariant | Rationale | +| ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Output paths are determined from pattern metadata | Output file paths must be derived from pattern metadata using kebab-case conversion of the pattern name, with configurable section prefixes. | Consistent path derivation ensures generated files are predictable and linkable — ad-hoc paths would break cross-document references. | +| Compact output includes only essential content | Compact output mode must include only essential decision content (type shapes, key constraints) while excluding full descriptions and verbose sections. | Compact output is designed for AI context windows where token budget is limited — including full descriptions would negate the space savings. | +| Detailed output includes full content | Detailed output mode must include all decision content including full descriptions, consequences, and DocStrings rendered as code blocks. | Detailed output serves as the complete human reference — omitting any section would force readers to consult source files for the full picture. | +| Multi-level generation produces both outputs | The generator must produce both compact and detailed output files from a single generation run, using the pattern name or patternName tag as the identifier. | Both output levels serve different audiences (AI vs human) — generating them together ensures consistency and eliminates the risk of one becoming stale. | +| Generator is registered with the registry | The decision document generator must be registered with the generator registry under a canonical name and must filter input patterns to only those with source mappings. | Registry registration enables discovery via --list-generators — filtering to source-mapped patterns prevents empty output for patterns without decision metadata. | +| Source mappings are executed during generation | Source mapping tables must be executed during generation to extract content from referenced files, with missing files reported as validation errors. | Source mappings are the bridge between decision specs and implementation — unexecuted mappings produce empty sections, while silent missing-file errors hide broken references. | + +### Dedent Helper + +| Rule | Invariant | Rationale | +| ------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | +| Tabs are normalized to spaces before dedent | Tab characters must be converted to spaces before calculating the minimum indentation level. | Mixing tabs and spaces produces incorrect indentation calculations — normalizing first ensures consistent dedent depth. | +| Empty lines are handled correctly | Empty lines (including lines with only whitespace) must not affect the minimum indentation calculation and must be preserved in output. | Counting whitespace-only lines as indented content would inflate the minimum indentation, causing non-empty lines to retain unwanted leading spaces. | +| Single line input is handled | Single-line input must have its leading whitespace removed without errors or unexpected transformations. | Failing or returning empty output on single-line input would break callers that extract individual lines from multi-line DocStrings. | +| Unicode whitespace is handled | Non-breaking spaces and other Unicode whitespace characters must be treated as content, not as indentation to be removed. | Stripping Unicode whitespace as indentation would corrupt intentional formatting in source code and documentation content. | +| Relative indentation is preserved | After removing the common leading whitespace, the relative indentation between lines must remain unchanged. | Altering relative indentation would break the syntactic structure of extracted code blocks, making them unparseable or semantically incorrect. | + +### Description Header Normalization + +| Rule | Invariant | Rationale | +| ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Leading headers are stripped from pattern descriptions | Markdown headers at the start of a pattern description are removed before rendering to prevent duplicate headings under the Description section. | The codec already emits a "## Description" header; preserving the source header would create a redundant or conflicting heading hierarchy. | +| Edge cases are handled correctly | Header stripping handles degenerate inputs (header-only, whitespace-only, mid-description headers) without data loss or rendering errors. | Patterns with unusual descriptions (header-only stubs, whitespace padding) are common in early roadmap stages; crashing on these would block documentation generation for the entire dataset. | +| stripLeadingHeaders removes only leading headers | The helper function strips only headers that appear before any non-header content; headers occurring after body text are preserved. | Mid-description headers are intentional structural elements authored by the user; stripping them would silently destroy document structure. | + +### Description Quality Foundation + +| Rule | Invariant | Rationale | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| Behavior files are verified during pattern extraction | Every timeline pattern must report whether its corresponding behavior file exists. | Without verification at extraction time, traceability reports would silently include broken references to non-existent behavior files. | +| Traceability coverage reports verified and unverified behavior files | Coverage reports must distinguish between patterns with verified behavior files and those without. | Conflating verified and unverified coverage would overstate test confidence, hiding gaps that should be addressed before release. | +| Pattern names are transformed to human-readable display names | Display names must convert CamelCase to title case, handle consecutive capitals, and respect explicit title overrides. | CamelCase identifiers are unreadable in generated documentation; human-readable names are essential for non-developer consumers of pattern registries. | +| PRD acceptance criteria are formatted with numbering and bold keywords | PRD output must number acceptance criteria and bold Given/When/Then keywords when steps are enabled. | Unnumbered criteria are difficult to reference in reviews; unformatted step keywords blend into prose, making scenarios harder to parse visually. | +| Business values are formatted for human readability | Hyphenated business value tags must be converted to space-separated readable text in all output contexts. | Raw hyphenated tags like "enable-rich-prd" are annotation artifacts; displaying them verbatim in generated docs confuses readers expecting natural language. | + +### Doc Generation Proof Of Concept + +| Rule | Invariant | Rationale | +| ---------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Context - Manual documentation maintenance does not scale | Documentation must be generated from annotated source code, never manually maintained as a separate artifact. | Manual documentation drifts from source as the codebase evolves, creating stale references that mislead both humans and AI coding sessions. | +| Decision - Decisions own convention content and durable context, code owns details | Each content type (intro/rationale, rules/examples, API types) is owned by exactly one source type (decision, behavior spec, or code). | Shared ownership leads to conflicting updates and ambiguous authority over what the "correct" version is. | +| Proof of Concept - Self-documentation validates the pattern | The documentation generation pattern must be validated by generating documentation about itself from its own annotated sources. | A self-referential proof of concept exposes extraction gaps and source mapping issues that synthetic test data would miss. This POC demonstrates the doc-from-decision pattern by generating docs about ITSELF. The DocGenerationProofOfConcept pattern produces: | +| Expected Output - Compact claude module structure | Compact output must contain only essential tables and type names, with no JSDoc comments or implementation details. | AI context windows are finite; including non-essential content displaces actionable information and degrades session effectiveness. | +| Consequences - Durable sources with clear ownership boundaries | Decision documents remain the authoritative source for intro, rationale, and convention content until explicitly superseded. | Without durable ownership, documentation sections lose their authoritative source and degrade into unattributed prose that no one updates. | +| Consequences - Design stubs live in stubs, not src | Pre-implementation design stubs must reside in `delivery-process/stubs/`, never in `src/`. | Stubs in `src/` require ESLint exceptions, create confusion between production and design code, and risk accidental imports of unimplemented functions. | +| Decision - Source mapping table parsing and extraction method dispatch | The source mapping table in a decision document defines how documentation sections are assembled from multiple source files. | Without a declarative mapping, generators must hard-code source-to-section relationships, making the system brittle to new document types. | + +### Documentation Orchestrator + +| Rule | Invariant | Rationale | +| --------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | +| Orchestrator coordinates full documentation generation pipeline | Non-overlapping patterns from TypeScript and Gherkin sources must merge into a unified dataset; overlapping pattern names must fail with conflict error. | Silent merging of conflicting patterns would produce incorrect documentation — fail-fast ensures data integrity across the pipeline. | + +### Extract Summary + +| Rule | Invariant | Rationale | +| -------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| Single-line descriptions are returned as-is when complete | A single-line description that ends with sentence-ending punctuation is returned verbatim; one without gets an appended ellipsis. | Summaries appear in pattern tables where readers expect grammatically complete text; an ellipsis signals intentional truncation rather than a rendering bug. | +| Multi-line descriptions are combined until sentence ending | Lines are concatenated until a sentence-ending punctuation mark is found or the character limit is reached, whichever comes first. | Splitting at arbitrary line breaks produces sentence fragments that lose meaning; combining until a natural boundary preserves semantic completeness. | +| Long descriptions are truncated at sentence or word boundaries | Summaries exceeding the character limit are truncated at the nearest sentence boundary if possible, otherwise at a word boundary with an appended ellipsis. | Sentence-boundary truncation preserves semantic completeness; word-boundary fallback avoids mid-word breaks. | +| Tautological and header lines are skipped | Lines that merely repeat the pattern name or consist only of a section header label (e.g., "Problem:", "Solution:") are skipped; the summary begins with the first substantive line. | Tautological opening lines waste the limited summary space without adding information. | +| Edge cases are handled gracefully | Degenerate inputs (empty strings, markdown-only content, bold markers) produce valid output without errors: empty input yields empty string, formatting is stripped, and multiple sentence endings use the first. | Summary extraction runs on every pattern in the dataset; an unhandled edge case would crash the entire documentation generation pipeline. | + +### Generator Infrastructure Testing + +| Rule | Invariant | Rationale | +| --------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | +| Orchestrator coordinates full documentation generation pipeline | Orchestrator merges TypeScript and Gherkin patterns, handles conflicts, and produces requested document types. | Without centralized orchestration, consumers would wire pipelines independently, leading to inconsistent merging and silent data loss. | +| Registry manages generator registration and retrieval | Registry prevents duplicate names, returns undefined for unknown generators, and lists available generators alphabetically. | Duplicate registrations would silently overwrite generators, causing unpredictable output depending on registration order. | +| CodecBasedGenerator adapts codecs to generator interface | Generator delegates to underlying codec for transformation. Missing MasterDataset produces descriptive error. | If the adapter silently proceeds without a MasterDataset, codecs receive undefined input and produce corrupt or empty documents. | +| Orchestrator supports PR changes generation options | PR changes can filter by git diff, changed files, or release version. | Without filtering, PR documentation would include all patterns in the dataset, making change review noisy and hiding actual modifications. | + +### Generator Registry Testing + +| Rule | Invariant | Rationale | +| ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------- | +| Registry manages generator registration and retrieval | Each generator name is unique within the registry; duplicate registration is rejected and lookup of unknown names returns undefined. | Allowing duplicate names would silently overwrite an existing generator, causing previously registered behavior to disappear without warning. | + +### Implementation Link Path Normalization + +| Rule | Invariant | Rationale | +| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| Repository prefixes are stripped from implementation paths | Implementation file paths must not contain repository-level prefixes like "libar-platform/" or "monorepo/". | Generated links are relative to the output directory; repository prefixes produce broken paths. | +| All implementation links in a pattern are normalized | Every implementation link in a pattern document must have its path normalized, regardless of how many implementations exist. | A single un-normalized link in a multi-implementation pattern produces a broken reference that undermines trust in the entire generated document. | +| normalizeImplPath strips known prefixes | normalizeImplPath removes only recognized repository prefixes from the start of a path and leaves all other path segments unchanged. | Over-stripping would corrupt legitimate path segments that happen to match a prefix name, producing silent broken links. | + +### Layered Diagram Generation + +| Rule | Invariant | Rationale | +| ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | +| Layered diagrams group patterns by arch-layer | Each distinct arch-layer value must produce exactly one Mermaid subgraph containing all patterns with that layer. | Without layer subgraphs, the Clean Architecture boundary between domain, application, and infrastructure is not visually enforced. | +| Layer order is domain to infrastructure (top to bottom) | Layer subgraphs must be rendered in Clean Architecture order: domain first, then application, then infrastructure. | The visual order reflects the dependency rule where outer layers depend on inner layers; reversing it would misrepresent the architecture. | +| Context labels included in layered diagram nodes | Each node in a layered diagram must include its bounded context name as a label, since context is not conveyed by subgraph grouping. | Layered diagrams group by layer, not context, so the context label is the only way to identify which bounded context a node belongs to. | +| Patterns without layer go to Other subgraph | Patterns that have arch-role or arch-context but no arch-layer must be placed in an "Other" subgraph, never omitted from the diagram. | Omitting unlayered patterns would silently hide architectural components; the "Other" group makes their missing classification visible. | +| Layered diagram includes summary section | The generated layered diagram document must include an Overview section with annotated source file count. | Without summary counts, readers cannot assess diagram completeness or detect missing annotated sources. | + +### Mermaid Relationship Rendering + +| Rule | Invariant | Rationale | +| ------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | +| Each relationship type has a distinct arrow style | Each relationship type (uses, depends-on, implements, extends) must render with a unique, visually distinguishable arrow style. | Identical arrow styles would make relationship semantics indistinguishable in generated diagrams. | +| Pattern names are sanitized for Mermaid node IDs | Pattern names must be transformed into valid Mermaid node IDs by replacing special characters (dots, hyphens, spaces) with underscores. | Unsanitized names containing dots, hyphens, or spaces produce invalid Mermaid syntax that fails to render. | +| All relationship types appear in single graph | The generated Mermaid graph must combine all relationship types (uses, depends-on, implements, extends) into a single top-down graph. | Splitting relationship types into separate graphs would fragment the dependency picture and hide cross-type interactions. | + +### Orchestrator Pipeline Factory Migration + +| Rule | Invariant | Rationale | +| ------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Orchestrator delegates pipeline to factory | `generateDocumentation()` calls `buildMasterDataset()` for the scan-extract-merge-transform sequence. It does not import from `scanner/` or `extractor/` for pipeline orchestration. Direct imports are permitted only for types used in GenerateResult (e.g., `ExtractedPattern`). | The orchestrator is the original host of the inline pipeline. After this migration, the pipeline factory is the sole definition of the 8-step sequence. Any future changes to pipeline steps (adding caching, parallel scanning, incremental extraction) happen in one place and all consumers benefit. | +| mergePatterns lives in pipeline module | The `mergePatterns()` function lives in `src/generators/pipeline/merge-patterns.ts` as a pipeline step. It is not defined in consumer code (orchestrator or CLI files). | `mergePatterns` is step 5 of the 8-step pipeline. It was defined in orchestrator.ts for historical reasons (the orchestrator was the first pipeline host). Now that the pipeline factory exists, the function belongs alongside other pipeline steps (scan, extract, transform). The public API re-export in `generators/index.ts` preserves backward compatibility. | +| Factory provides structured warnings for all consumers | `PipelineResult.warnings` contains typed warning objects with `type`, `message`, optional `count`, and optional `details` (file, line, column, message). Consumers that need granular diagnostics (orchestrator) use the full structure. Consumers that need simple messages (process-api) read `.message` only. | The orchestrator collects scan errors, skipped directives, extraction errors, and Gherkin parse errors as structured `GenerationWarning` objects. The factory must provide equivalent structure to eliminate the orchestrator's need to run the pipeline directly. The `PipelineWarning` type is structurally similar to `GenerationWarning` to minimize mapping complexity. | +| Pipeline factory supports partial success mode | When `failOnScanErrors` is false, the factory captures scan errors and extraction errors as warnings and continues with successfully processed files. When true (default), the factory returns `Result.err` on the first scan failure. | The orchestrator treats scan errors as non-fatal warnings — documentation generation should succeed for all scannable files even if some files have syntax errors. The process-api treats scan errors as fatal because the query layer requires a complete dataset. The factory must support both strategies via configuration. | +| End-to-end verification confirms behavioral equivalence | After migration, all CLI commands and doc generation produce identical output to pre-refactor behavior. | The migration must not change observable behavior for any consumer. Full verification confirms the factory migration is a pure refactor. | + +### Patterns Codec Testing + +| Rule | Invariant | Rationale | +| --------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Document structure includes progress tracking and category navigation | Every decoded document must contain a title, purpose, Progress section with status counts, and category navigation regardless of dataset size. | The PATTERNS.md is the primary entry point for understanding project scope; incomplete structure would leave consumers without context. | +| Pattern table presents all patterns sorted by status then name | The pattern table must include every pattern in the dataset with columns for Pattern, Category, Status, and Description, sorted by status priority (completed first) then alphabetically by name. | Consistent ordering allows quick scanning of project progress; completed patterns at top confirm done work, while roadmap items at bottom show remaining scope. | +| Category sections group patterns by domain | Each category in the dataset must produce an H3 section listing its patterns, and the filterCategories option must restrict output to only the specified categories. | Without category grouping, consumers must scan the entire flat pattern list to find domain-relevant patterns; filtering avoids noise in focused documentation. | +| Dependency graph visualizes pattern relationships | A Mermaid dependency graph must be included when pattern relationships exist and the includeDependencyGraph option is not disabled; it must be omitted when no relationships exist or when explicitly disabled. | Dependency relationships are invisible in flat pattern lists; the graph reveals implementation ordering and coupling that affects planning decisions. | +| Detail file generation creates per-pattern pages | When generateDetailFiles is enabled, each pattern must produce an individual markdown file at patterns/{slug}.md containing an Overview section; when disabled, no additional files must be generated. | Detail files enable deep-linking into specific patterns from the main registry while keeping the index document scannable. | + +### Planning Codec Testing + +| Rule | Invariant | Rationale | +| ----------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | +| PlanningChecklistCodec prepares for implementation sessions | The checklist must include pre-planning questions, definition of done with deliverables, and dependency status for all actionable phases. | Implementation sessions fail without upfront preparation — the checklist surfaces blockers before work begins. | +| SessionPlanCodec generates implementation plans | The plan must include status summary, implementation approach from use cases, deliverables with status, and acceptance criteria from scenarios. | A structured implementation plan ensures all deliverables and acceptance criteria are visible before coding starts. | +| SessionFindingsCodec captures retrospective discoveries | Findings must be categorized into gaps, improvements, risks, and learnings with per-type counts in the summary. | Retrospective findings drive continuous improvement — categorization enables prioritized follow-up across sessions. | + +### Poc Integration + +| Rule | Invariant | Rationale | +| ------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| POC decision document is parsed correctly | The real POC decision document (Process Guard) must be parseable by the codec, extracting all source mappings with their extraction types. | Integration testing against the actual POC document validates that the codec works with real-world content, not just synthetic test data. | +| Self-references extract content from POC decision | THIS DECISION self-references in the POC document must successfully extract Context rules, Decision rules, and DocStrings from the document itself. | Self-references are the most common extraction type in decision docs — they must work correctly for the POC to demonstrate the end-to-end pipeline. | +| TypeScript shapes are extracted from real files | The source mapper must successfully extract type shapes and patterns from real TypeScript source files referenced in the POC document. | TypeScript extraction is the primary mechanism for pulling implementation details into decision docs — it must work with actual project files. | +| Behavior spec content is extracted correctly | The source mapper must successfully extract Rule blocks and ScenarioOutline Examples from real Gherkin feature files referenced in the POC document. | Behavior spec extraction bridges decision documents to executable specifications — incorrect extraction would misrepresent the verified behavior. | +| JSDoc sections are extracted from CLI files | The source mapper must successfully extract JSDoc comment sections from real TypeScript CLI files referenced in the POC document. | CLI documentation often lives in JSDoc comments — extracting them into decision docs avoids duplicating CLI usage information manually. | +| All source mappings execute successfully | All source mappings defined in the POC decision document must execute without errors, producing non-empty extraction results. | End-to-end execution validates that all extraction types work with real files — a single failing mapping would produce incomplete decision documentation. | +| Compact output generates correctly | The compact output for the POC document must generate successfully and contain all essential sections defined by the compact format. | Compact output is the AI-facing artifact — verifying it against the real POC ensures the format serves its purpose of providing concise decision context. | +| Detailed output generates correctly | The detailed output for the POC document must generate successfully and contain all sections including full content from source mappings. | Detailed output is the human-facing artifact — verifying it against the real POC ensures no content is lost in the generation pipeline. | +| Generated output matches quality expectations | The generated output structure must match the expected target format, with complete validation rules and properly structured sections. | Quality assertions catch regressions in output formatting — structural drift in generated documents would degrade their usefulness as references. | + +### Pr Changes Codec Options Testing + +| Rule | Invariant | Rationale | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| PrChangesCodec generates review checklist when includeReviewChecklist is enabled | When includeReviewChecklist is enabled, the codec must generate a "Review Checklist" section with standard items and context-sensitive items based on pattern state (completed, active, dependencies, deliverables). When disabled, no checklist appears. | A context-sensitive checklist prevents reviewers from missing state-specific concerns (e.g., verifying completed patterns still work, or that dependencies are satisfied) that a static checklist would not cover. | +| PrChangesCodec generates dependencies section when includeDependencies is enabled | When includeDependencies is enabled and patterns have dependency relationships, the codec must render a "Dependencies" section with "Depends On" and "Enables" subsections. When no dependencies exist or the option is disabled, the section is omitted. | Dependency visibility in PR reviews prevents merging changes that break upstream or downstream patterns, which would otherwise only surface during integration. | +| PrChangesCodec filters patterns by changedFiles | When changedFiles filter is set, only patterns whose source files match (including partial directory path matches) are included in the output. | Filtering by changed files scopes the PR document to only the patterns actually touched, preventing reviewers from wading through unrelated patterns. | +| PrChangesCodec filters patterns by releaseFilter | When releaseFilter is set, only patterns with deliverables matching the specified release version are included. | Release filtering isolates the patterns scheduled for a specific version, enabling targeted release reviews without noise from other versions' deliverables. | +| PrChangesCodec uses OR logic for combined filters | When both changedFiles and releaseFilter are set, patterns matching either criterion are included (OR logic), and patterns matching both criteria appear only once (no duplicates). | OR logic maximizes PR coverage — a change may affect files not yet assigned to a release, or a release may include patterns from unchanged files. | +| PrChangesCodec only includes active and completed patterns | The codec must exclude roadmap and deferred patterns, including only active and completed patterns in the PR changes output. | PR changes reflect work that is in progress or done — roadmap and deferred patterns have no code changes to review. | + +### Pr Changes Codec Rendering Testing + +| Rule | Invariant | Rationale | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| PrChangesCodec handles empty results gracefully | When no patterns match the applied filters, the codec must produce a valid document with a "No Changes" section describing which filters were active. | Reviewers need to distinguish "nothing matched" from "codec error" and understand why no patterns appear. | +| PrChangesCodec generates summary with filter information | Every PR changes document must contain a Summary section with pattern counts and active filter information. | Without a summary, reviewers must scan the entire document to understand the scope and filtering context of the PR changes. | +| PrChangesCodec groups changes by phase when sortBy is "phase" | When sortBy is "phase" (the default), patterns must be grouped under phase headings in ascending phase order. | Phase grouping aligns PR changes with the delivery roadmap, letting reviewers verify that changes belong to the expected implementation phase. | +| PrChangesCodec groups changes by priority when sortBy is "priority" | When sortBy is "priority", patterns must be grouped under High/Medium/Low priority headings with correct pattern assignment. | Priority grouping lets reviewers focus on high-impact changes first, ensuring critical patterns receive the most review attention. | +| PrChangesCodec shows flat list when sortBy is "workflow" | When sortBy is "workflow", patterns must be rendered as a flat list without phase or priority grouping. | Workflow sorting presents patterns in review order without structural grouping, suited for quick PR reviews. | +| PrChangesCodec renders pattern details with metadata and description | Each pattern entry must include a metadata table (status, phase, business value when available) and description text. | Metadata and description provide the context reviewers need to evaluate whether a pattern's implementation aligns with its stated purpose and delivery status. | +| PrChangesCodec renders deliverables when includeDeliverables is enabled | Deliverables are only rendered when includeDeliverables is enabled, and when releaseFilter is set, only deliverables matching that release are shown. | Deliverables add bulk to the PR document; gating them behind a flag keeps default output concise, while release filtering prevents reviewers from seeing unrelated work items. | +| PrChangesCodec renders acceptance criteria from scenarios | When patterns have associated scenarios, the codec must render an "Acceptance Criteria" section containing scenario names and step lists. | Acceptance criteria give reviewers a concrete checklist to verify that the PR's implementation satisfies the behavioral requirements defined in the spec. | +| PrChangesCodec renders business rules from Gherkin Rule keyword | When patterns have Gherkin Rule blocks, the codec must render a "Business Rules" section containing rule names and verification information. | Business rules surface domain invariants directly in the PR review, ensuring reviewers can verify that implementation changes respect the documented constraints. | + +### Pr Changes Generation + +| Rule | Invariant | Rationale | +| --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------- | +| Release version filtering controls which phases appear in output | Only phases with deliverables matching the releaseFilter are included; roadmap phases are always excluded. | Including unrelated releases or unstarted roadmap items in a PR description misleads reviewers about the scope of actual changes. | +| Patterns are grouped by phase number in the output | Each phase number produces a separate heading section in the generated output. | Without phase grouping, reviewers cannot distinguish which changes belong to which delivery phase, making incremental review impossible. | +| Summary statistics provide a high-level overview of the PR | Summary section always shows pattern counts and release tag when a releaseFilter is active. | Without a summary, reviewers must read the entire document to understand the PR's scope; the release tag anchors the summary to a specific version. | +| Deliverables are displayed inline with their parent patterns | When includeDeliverables is enabled, each pattern lists its deliverables with name, status, and release tag. | Hiding deliverables forces reviewers to cross-reference feature files to verify completion; inline display makes review self-contained. | +| Review checklist includes standard code quality verification items | Review checklist always includes code conventions, tests, documentation, and completed pattern verification items. | Omitting the checklist means quality gates depend on reviewer memory; a consistent checklist ensures no standard verification step is skipped. | +| Dependencies section shows inter-pattern relationships | Dependencies section surfaces both what patterns enable and what they depend on. | Hidden dependencies cause merge-order mistakes and broken builds; surfacing them in the PR lets reviewers verify prerequisite work is complete. | +| Business value can be included or excluded from pattern metadata | Business value display is controlled by the includeBusinessValue option. | Not all consumers need business value context; making it opt-in keeps the default output concise for technical reviewers. | +| Output can be sorted by phase number or priority | Sorting is deterministic and respects the configured sortBy option. | Non-deterministic ordering produces diff noise between regenerations, making it impossible to tell if content actually changed. | +| Edge cases produce graceful output | The generator handles missing phases, missing deliverables, and missing phase numbers without errors. | Crashing on incomplete data prevents PR generation entirely; graceful degradation ensures output is always available even with partial inputs. | +| Deliverable-level filtering shows only matching deliverables within a phase | When a phase contains deliverables with different release tags, only those matching the releaseFilter are shown. | Showing all deliverables regardless of release tag pollutes the PR with unrelated work, obscuring what actually shipped in the target release. | + +### Pr Changes Options + +| Rule | Invariant | Rationale | +| --------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| Orchestrator supports PR changes generation options | PR changes output includes only patterns matching the changed files list, the release version filter, or both (OR logic when combined). | PR-scoped documentation must reflect exactly what changed, avoiding noise from unrelated patterns. | + +### Prd Implementation Section + +| Rule | Invariant | Rationale | +| --------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| PRD generator discovers implementations from relationship index | When generating PRD for pattern X, the generator queries the relationship index for all files where `implements === X`. No explicit listing in the spec file is required. | The `@libar-docs-implements` tag creates a backward link from code to spec. The relationship index aggregates these. PRD generation simply queries the index rather than scanning directories. | +| Implementation metadata appears in dedicated PRD section | The PRD output includes a "## Implementations" section listing all files that implement the pattern. Each file shows its `uses`, `usedBy`, and `usecase` metadata in a consistent format. | Developers reading PRDs benefit from seeing the implementation landscape alongside requirements, without cross-referencing code files. | +| Patterns without implementations render cleanly | If no files have `@libar-docs-implements:X` for pattern X, the "## Implementations" section is omitted (not rendered as empty). | Planned patterns may not have implementations yet. Empty sections add noise without value. | + +### Prd Implementation Section Testing + +| Rule | Invariant | Rationale | +| ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Implementation files appear in pattern docs via @libar-docs-implements | Any TypeScript file with a matching @libar-docs-implements tag must appear in the pattern document's Implementations section with a working file link. | Implementation discovery relies on tag-based linking — missing entries break traceability between specs and code. | +| Multiple implementations are listed alphabetically | When multiple files implement the same pattern, they must be listed in ascending file path order. | Deterministic ordering ensures stable document output across regeneration runs. | +| Patterns without implementations omit the section | The Implementations heading must not appear in pattern documents when no implementing files exist. | Rendering an empty Implementations section misleads readers into thinking implementations were expected but are missing, rather than simply not applicable. | +| Implementation references use relative file links | Implementation file links must be relative paths starting from the patterns output directory. | Absolute paths break when documentation is viewed from different locations; relative paths ensure portability. | + +### Reference Codec Core Testing + +| Rule | Invariant | Rationale | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Empty datasets produce fallback content | A codec must always produce a valid document, even when no matching content exists in the dataset. | Consumers rely on a consistent document structure; a missing or null document would cause rendering failures downstream. | +| Convention content is rendered as sections | Convention-tagged patterns must render as distinct headed sections with their rule names, invariants, and tables preserved. | Conventions define project-wide constraints; losing their structure in generated docs would make them unenforceable and undiscoverable. | +| Detail level controls output density | Each detail level (summary, standard, detailed) must produce a deterministic subset of content, with summary being the most restrictive. | AI session contexts have strict token budgets; uncontrolled output density wastes context window and degrades session quality. | +| Behavior sections are rendered from category-matching patterns | Only patterns whose category matches the configured behavior tags may appear in the Behavior Specifications section. | Mixing unrelated categories into a single behavior section would produce misleading documentation that conflates distinct concerns. | +| Shape sources are extracted from matching patterns | Only shapes from patterns whose file path matches the configured shapeSources glob may appear in the API Types section. | Including shapes from unrelated source paths would pollute the API Types section with irrelevant type definitions, breaking the scoped documentation contract. | +| Convention and behavior content compose in a single document | Convention and behavior content must coexist in the same RenderableDocument when both are present in the dataset. | Splitting conventions and behaviors into separate documents would force consumers to cross-reference multiple files, losing the unified view of a product area. | +| Composition order follows AD-5: conventions then shapes then behaviors | Document sections must follow the canonical order: conventions, then API types (shapes), then behavior specifications. | AD-5 establishes a consistent reading flow (rules, then types, then specs); violating this order would confuse readers who expect a stable document structure. | +| Convention code examples render as mermaid blocks | Mermaid diagram content in conventions must render as fenced mermaid blocks, and must be excluded at summary detail level. | Mermaid diagrams are visual aids that require rendering support; emitting them as plain text would produce unreadable output, and including them in summaries wastes token budget. | + +### Reference Codec Detail Rendering + +| Rule | Invariant | Rationale | +| ----------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Standard detail level includes narrative but omits rationale | Standard detail level renders narrative prose for convention patterns but excludes rationale sections, reserving rationale for the detailed level only. | Progressive disclosure prevents information overload at the standard level while ensuring readers who need deeper justification can access it at the detailed level. | +| Deep behavior rendering with structured annotations | Behavior patterns render structured rule annotations (invariant, rationale, verified-by) at detailed level, invariant-only at standard level, and a truncated table at summary level. | Structured annotations are the primary mechanism for surfacing business rules from Gherkin sources; inconsistent rendering across detail levels would produce misleading or incomplete documentation. | +| Shape JSDoc prose renders at standard and detailed levels | Shape patterns with JSDoc prose include that prose in rendered code blocks at standard and detailed levels. Shapes without JSDoc render code blocks only. | JSDoc prose provides essential context for API types; omitting it would force readers to open source files to understand a shape's purpose, undermining the generated documentation's self-sufficiency. | +| Shape sections render param returns and throws documentation | Function shapes render parameter, returns, and throws documentation at detailed level. Standard level renders parameter tables but omits throws. Shapes without param docs skip the parameter table entirely. | Throws documentation is diagnostic detail that clutters standard output; separating it into detailed level keeps standard output focused on the function's contract while preserving full error documentation for consumers who need it. | +| Collapsible blocks wrap behavior rules for progressive disclosure | When a behavior pattern has 3 or more rules and detail level is not summary, each rule's content is wrapped in a collapsible block with the rule name and scenario count in the summary. Patterns with fewer than 3 rules render rules flat. Summary level never produces collapsible blocks. | Behavior sections with many rules produce substantial content at detailed level. Collapsible blocks enable progressive disclosure so readers can expand only the rules they need. | +| Link-out blocks provide source file cross-references | At standard and detailed levels, each behavior pattern includes a link-out block referencing its source file path. At summary level, link-out blocks are omitted for compact output. | Cross-reference links enable readers to navigate from generated documentation to the annotated source files, closing the loop between generated docs and the single source of truth. | +| Include tags route cross-cutting content into reference documents | Patterns with matching include tags appear alongside category-selected patterns in the behavior section. The merging is additive (OR semantics). | Cross-cutting patterns (e.g., shared utilities, common validators) belong in multiple reference documents; without include-tag routing, these patterns would only appear in their home category, leaving dependent documents incomplete. | + +### Reference Codec Diagram Testing + +| Rule | Invariant | Rationale | +| ------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| Scoped diagrams are generated from diagramScope config | Diagram content is determined exclusively by diagramScope filters (archContext, include, archLayer, patterns), and filters compose via OR — a pattern matching any single filter appears in the diagram. | Without filter-driven scoping, diagrams would include all patterns regardless of relevance, producing unreadable visualizations that obscure architectural boundaries. | +| Multiple diagram scopes produce multiple mermaid blocks | Each entry in the diagramScopes array produces an independent Mermaid block with its own title and direction, and legacy singular diagramScope remains supported as a fallback. | Product areas require multiple architectural views (e.g., system overview and data flow) from a single configuration, and breaking backward compatibility with the singular diagramScope would silently remove diagrams from existing consumers. | + +### Reference Codec Diagram Type Testing + +| Rule | Invariant | Rationale | +| ------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Diagram type controls Mermaid output format | The diagramType field on DiagramScope selects the Mermaid output format. Supported types are graph (flowchart, default), sequenceDiagram, and stateDiagram-v2. Each type produces syntactically valid Mermaid output with type-appropriate node and edge rendering. | Flowcharts cannot naturally express event flows (sequence), FSM visualization (state), or temporal ordering. Multiple diagram types unlock richer architectural documentation from the same relationship data. | +| Edge labels and custom node shapes enrich diagram readability | Relationship edges display labels describing the relationship type (uses, depends on, implements, extends). Edge labels are enabled by default and can be disabled via showEdgeLabels false. Node shapes in flowchart diagrams vary by archRole value using Mermaid shape syntax. | Unlabeled edges are ambiguous without consulting a legend. Custom node shapes make archRole visually distinguishable without color reliance, improving accessibility and scanability. | + +### Reference Doc Showcase + +| Rule | Invariant | Rationale | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| Deep behavior rendering replaces shallow truncation | At standard and detailed levels, behavior sections render full rule descriptions with parsed invariant, rationale, and verified-by content. At summary level, the 120-character truncation is preserved for compact output. Behavior rendering reuses parseBusinessRuleAnnotations from the convention extractor rather than reimplementing structured content parsing. | The current 120-character truncation discards invariants, rationale, and verified-by content that is already extracted and available in BusinessRule.description. Reference documents need the full rule content to serve as authoritative documentation. The convention extractor already parses this structured content via parseBusinessRuleAnnotations -- the behavior builder should delegate to the same function. | +| Shape sections include JSDoc prose and property documentation | At standard level, shape code blocks are preceded by JSDoc prose when available. At detailed level, interface shapes additionally render a property documentation table. At summary level, only the type-kind table appears. Shapes without JSDoc render code blocks without preceding paragraph. | JSDoc on shapes contains design rationale and usage guidance that is already extracted by the shape extractor. Gating it behind detailed level wastes the data at the most common detail level (standard). The fix is a single condition change: reference.ts line 342 from detailLevel === 'detailed' to detailLevel !== 'summary'. | +| Diagram scope supports archLayer filtering and multiple diagram types | DiagramScope gains optional archLayer and diagramType fields. The archLayer filter selects patterns by their architectural layer (domain, application, infrastructure) and composes with archContext and archView via OR logic, consistent with existing filter dimensions. The diagramType field controls Mermaid output format: graph (default), sequenceDiagram, stateDiagram-v2, C4Context, classDiagram. Each diagram type has its own node and edge syntax appropriate to the Mermaid specification. | Layer-based views are fundamental to layered architecture documentation -- a developer reviewing the domain layer wants only deciders and value objects, not infrastructure adapters. Multiple diagram types unlock event flow documentation (sequence), FSM visualization (state), architecture overview (C4), and type hierarchy views (class) that flowcharts cannot express naturally. | +| Every renderable block type appears in the showcase document | The generated REFERENCE-SAMPLE.md at detailed level must contain at least one instance of each of the 9 block types: heading, paragraph, separator, table, list, code, mermaid, collapsible, link-out. At summary level, progressive disclosure blocks (collapsible, link-out) are omitted for compact output. | The sample document is the integration test for the reference codec. If any block type is missing, there is no automated verification that the codec can produce it. Coverage of all 9 types validates the full rendering pipeline from MasterDataset through codec through renderer. | +| Edge labels and custom node shapes enrich diagram readability | Relationship edges in scoped diagrams display labels describing the relationship semantics (uses, dependsOn, implements, extends). Edge labels are enabled by default and can be disabled via a showEdgeLabels option for compact diagrams. Node shapes vary by archRole value -- services use rounded rectangles, bounded contexts use subgraphs, projections use cylinders, and sagas use hexagons. | Unlabeled edges are ambiguous -- a reader seeing a solid arrow cannot distinguish "uses" from "implements" without consulting an edge style legend. Custom node shapes leverage Mermaid's shape vocabulary to make archRole visually distinguishable without color reliance, improving accessibility. | +| Extraction pipeline surfaces complete API documentation | ExportInfo.signature shows full function parameter types and return type instead of the placeholder value. JSDoc param, returns, and throws tags are extracted and stored on ExtractedShape. Property-level JSDoc preserves full multi-line content without first-line truncation. Auto-shape discovery mode extracts all exported types from files matching shapeSources globs without requiring explicit extract-shapes annotations. | Function signatures are the most valuable API surface -- they show what a pattern exports without source navigation. The ExportInfo.signature field already exists in the schema but holds a lossy placeholder. The fix is approximately 15 lines in ast-parser.ts: threading sourceCode into extractFromDeclaration and slicing parameter ranges. Auto-shape discovery eliminates manual annotation burden for files that match shapeSources globs. | +| Infrastructure enables flexible document composition and AI-optimized output | CompositeCodec assembles reference documents from multiple codec outputs by concatenating RenderableDocument sections. The renderToClaudeContext renderer produces token-efficient output using section markers optimized for LLM consumption. The Gherkin tag extractor uses TagRegistry metadata instead of hardcoded if/else branches, making new tag addition a zero-code-change operation. Convention content can be extracted from TypeScript JSDoc blocks containing structured Invariant/Rationale annotations, not only from Gherkin Rule blocks. | CompositeCodec enables referenceDocConfigs to include content from any codec, not just the current 4 sources. The renderToClaudeContext renderer unifies two formatting paths (codec-based markdown vs hand-written markers in context-formatter.ts). Data-driven tag extraction cuts the maintenance burden of the 40-branch if/else in gherkin-ast-parser.ts roughly in half. TypeScript convention extraction enables self-documenting business rules in implementation files alongside their code. | + +### Reference Generator Testing + +| Rule | Invariant | Rationale | +| ------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | +| Registration produces the correct number of generators | Each reference config produces exactly 2 generators (detailed + summary), plus meta-generators for product-area and non-product-area routing. | The count is deterministic from config — any mismatch indicates a registration bug that would silently drop generated documents. | +| Product area configs produce a separate meta-generator | Configs with productArea set route to "product-area-docs" meta-generator; configs without route to "reference-docs". | Product area docs are rendered into per-area subdirectories while standalone references go to the root output. | +| Generator naming follows kebab-case convention | Detailed generators end in "-reference" and summary generators end in "-reference-claude". | Consistent naming enables programmatic discovery and distinguishes human-readable from AI-optimized outputs. | +| Generator execution produces markdown output | Every registered generator must produce at least one non-empty output file when given matching data. | A generator that produces empty output wastes a pipeline slot and creates confusion when expected docs are missing. | + +### Remaining Work Enhancement + +| Rule | Invariant | Rationale | +| ---------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Priority-based sorting surfaces critical work first | Phases with higher priority always appear before lower-priority phases when sorting by priority. | Without priority sorting, critical work gets buried under low-priority items, delaying urgent deliverables. | +| Effort parsing converts duration strings to comparable hours | Effort strings must be parsed to a common unit (hours) for accurate sorting across different time scales. | Comparing raw strings like "2h" and "3d" lexicographically produces incorrect ordering; normalization to hours ensures consistent comparison. | +| Quarter grouping organizes planned work into time-based buckets | Phases with a quarter tag are grouped under their quarter heading; phases without a quarter appear under Unscheduled. | Flat lists obscure time-based planning; grouping by quarter lets planners see what is committed per period and what remains unscheduled. | +| Priority grouping organizes phases by urgency level | Phases are grouped under their priority heading; phases without priority appear under Unprioritized. | Mixing priority levels in a flat list forces readers to visually scan for urgency; grouping by priority makes triage immediate. | +| Progressive disclosure prevents information overload in large backlogs | When the backlog exceeds maxNextActionable, only the top N phases are shown with a link or count for the remainder. | Displaying hundreds of phases in the summary overwhelms planners; progressive disclosure keeps the summary scannable while preserving access to the full backlog. | +| Edge cases are handled gracefully | Empty or fully-blocked backlogs produce meaningful output instead of errors or blank sections. | Blank or errored output when the backlog is empty confuses users into thinking the generator is broken rather than reflecting a genuinely empty state. | +| Default behavior preserves backward compatibility | Without explicit sortBy or groupPlannedBy options, phases are sorted by phase number in a flat list. | Changing default behavior would break existing consumers that rely on phase-number ordering without specifying options. | + +### Remaining Work Summary Accuracy + +| Rule | Invariant | Rationale | +| ------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| Summary totals equal sum of phase table rows | The summary Active and Total Remaining counts must exactly equal the sum of the corresponding counts across all phase table rows. | A mismatch between summary and phase-level totals indicates patterns are being double-counted or dropped. | +| Patterns without phases appear in Backlog row | Patterns that have no assigned phase must be grouped into a "Backlog" row in the phase table rather than being omitted. | Unphased patterns are still remaining work; omitting them would undercount the total. | +| Patterns without patternName are counted using id | Pattern counting must use pattern.id as the identifier, never patternName, so that patterns with undefined names are neither double-counted nor omitted. | patternName is optional; relying on it for counting would miss unnamed patterns entirely. | +| All phases with incomplete patterns are shown | The phase table must include every phase that contains at least one incomplete pattern, and phases with only completed patterns must be excluded. | Showing fully completed phases inflates the remaining work view, while omitting phases with incomplete patterns hides outstanding work. | + +### Renderer Block Types + +| Rule | Invariant | Rationale | +| ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Document metadata renders as frontmatter before sections | Title always renders as H1, purpose and detail level render as bold key-value pairs separated by horizontal rule. | Consistent frontmatter structure allows downstream tooling and readers to reliably locate the document title and metadata without parsing the full body. | +| Headings render at correct markdown levels with clamping | Heading levels are clamped to the valid range 1-6 regardless of input value. | Markdown only supports heading levels 1-6; unclamped values would produce invalid syntax that renders as plain text in all markdown processors. | +| Paragraphs and separators render as plain text and horizontal rules | Paragraph content passes through unmodified, including special markdown characters. Separators render as horizontal rules. | The renderer is a dumb printer; altering paragraph content would break codec-controlled formatting and violate the separation between codec logic and rendering. | +| Tables render with headers, alignment, and cell escaping | Tables must escape pipe characters, convert newlines to line breaks, and pad short rows to match column count. | Unescaped pipes corrupt table column boundaries, raw newlines break row parsing, and short rows cause column misalignment in every markdown renderer. | +| Lists render in unordered, ordered, checkbox, and nested formats | List type determines prefix: dash for unordered, numbered for ordered, checkbox syntax for checked items. Nesting adds two-space indentation per level. | Incorrect prefixes or indentation levels cause markdown parsers to break list continuity, rendering nested items as separate top-level lists or plain text. | + +### Renderer Output Formats + +| Rule | Invariant | Rationale | +| ---------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Code blocks and mermaid diagrams render with fenced syntax | Code blocks use triple backtick fencing with optional language hint. Mermaid blocks use mermaid as the language hint. | Inconsistent fencing breaks syntax highlighting in GitHub/IDE markdown previews and prevents Mermaid renderers from detecting diagram blocks. | +| Collapsible blocks render as HTML details elements | Summary text is HTML-escaped to prevent injection. Collapsible content renders between details tags. | Unescaped HTML in summary text enables XSS when generated markdown is rendered in browsers; malformed details tags break progressive disclosure in documentation. | +| Link-out blocks render as markdown links with URL encoding | Link paths with spaces are percent-encoded for valid URLs. | Unencoded spaces produce broken links in markdown renderers, making cross-document navigation fail silently for files with spaces in their paths. | +| Multi-file documents produce correct output file collections | Output file count equals 1 (main) plus additional file count. The first output file always uses the provided base path. | A mismatch between expected and actual file count causes the orchestrator to write orphaned files or miss outputs, corrupting the generated documentation directory. | +| Complex documents render all block types in sequence | Multiple block types in a single document render in order without interference. | Block ordering reflects the codec's semantic structure; out-of-order or swallowed blocks would produce misleading documentation that diverges from the source of truth. | +| Claude context renderer produces compact AI-optimized output | Claude context replaces markdown syntax with section markers, omits visual-only blocks (mermaid, separators), flattens collapsible content, and produces shorter output than markdown. | LLM context windows are token-limited; visual-only blocks waste tokens without adding semantic value, and verbose markdown syntax inflates context size unnecessarily. | +| Claude MD module renderer produces modular-claude-md compatible output | Title renders as H3 (offset +2), section headings are offset by +2 clamped at H6, frontmatter is omitted, mermaid blocks are omitted, link-out blocks are omitted, and collapsible blocks are flattened to headings. | The modular-claude-md system manages CLAUDE.md as composable H3-rooted modules. Generating incompatible formats (like section markers) produces orphaned files that are never consumed. | + +### Reporting Codec Testing + +| Rule | Invariant | Rationale | +| ---------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | +| ChangelogCodec follows Keep a Changelog format | Releases must be sorted by semver descending, unreleased patterns grouped under "[Unreleased]", and change types follow the standard order (Added, Changed, Deprecated, Removed, Fixed, Security). | Keep a Changelog is an industry standard format — following it ensures the output is immediately familiar to developers. | +| TraceabilityCodec maps timeline patterns to behavior tests | Coverage statistics must show total timeline phases, those with behavior tests, those missing, and a percentage. Gaps must be surfaced prominently. | Traceability ensures every planned pattern has executable verification — gaps represent unverified claims about system behavior. | +| OverviewCodec provides project architecture summary | The overview must include architecture sections from overview-tagged patterns, pattern summary with progress percentage, and timeline summary with phase counts. | The architecture overview is the primary entry point for understanding the project — it must provide a complete picture at a glance. | + +### Requirements Adr Codec Testing + +| Rule | Invariant | Rationale | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| RequirementsDocumentCodec generates PRD-style documentation from patterns | RequirementsDocumentCodec transforms MasterDataset patterns into a PRD-style document with flexible grouping (product area, user role, or phase), optional detail file generation, and business value rendering. | Flexible grouping lets stakeholders view requirements through their preferred lens (area, role, or phase), and detail files provide deep-dive context without bloating the summary document. | +| AdrDocumentCodec documents architecture decisions | AdrDocumentCodec transforms MasterDataset ADR patterns into an architecture decision record document with status tracking, category/phase/date grouping, supersession relationships, and optional detail file generation. | Architecture decisions lose value without status tracking and supersession chains; without them, teams act on outdated decisions and cannot trace why a previous approach was abandoned. | + +### Rich Content Helpers Testing + +| Rule | Invariant | Rationale | +| -------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| DocString parsing handles edge cases | DocString parsing must gracefully handle empty input, missing language hints, unclosed delimiters, and non-LF line endings without throwing errors. | Codecs receive uncontrolled user content from feature file descriptions; unhandled edge cases would crash document generation for the entire pipeline. | +| DataTable rendering produces valid markdown | DataTable rendering must produce a well-formed table block for any number of rows, substituting empty strings for missing cell values. | Malformed tables break markdown rendering and downstream tooling; missing cells would produce undefined values that corrupt table alignment. | +| Scenario content rendering respects options | Scenario rendering must honor the includeSteps option, producing step lists only when enabled, and must include embedded DataTables when present. | Ignoring the includeSteps option would bloat summary views with unwanted detail, and dropping embedded DataTables would lose structured test data. | +| Business rule rendering handles descriptions | Business rule rendering must always include the rule name as a bold paragraph, and must parse descriptions for embedded DocStrings when present. | Omitting the rule name makes rendered output unnavigable, and skipping DocString parsing would output raw delimiter syntax instead of formatted code blocks. | +| DocString content is dedented when parsed | DocString code blocks must be dedented to remove common leading whitespace while preserving internal relative indentation, empty lines, and trimming trailing whitespace from each line. | Without dedentation, code blocks inherit the Gherkin indentation level, rendering as deeply indented and unreadable in generated markdown. | + +### Robustness Integration + +| Rule | Invariant | Rationale | +| --------------------------------------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------------ | +| Validation runs before extraction in the pipeline | Validation must complete and pass before extraction begins. | Prevents wasted extraction work and provides clear fail-fast behavior. | +| Deduplication runs after extraction before assembly | Deduplication processes all extracted content before document assembly. | All sources must be extracted to identify cross-source duplicates. | +| Warnings from all stages are collected and reported | Warnings from all pipeline stages are aggregated in the result. | Users need visibility into non-fatal issues without blocking generation. | +| Pipeline provides actionable error messages | Error messages include context and fix suggestions. | Users should fix issues in one iteration without guessing. | +| Existing decision documents continue to work | Valid existing decision documents generate without new errors. | Robustness improvements must be backward compatible. | + +### Rule Keyword Po C + +| Rule | Invariant | Rationale | +| ------------------------------------------ | -------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Basic arithmetic operations work correctly | Arithmetic operations must return mathematically correct results for all valid inputs. | Incorrect arithmetic results silently corrupt downstream calculations, making errors undetectable at their source. The calculator should perform standard math operations with correct results. | +| Division has special constraints | Division operations must reject a zero divisor before execution. | Unguarded division by zero causes runtime exceptions that crash the process instead of returning a recoverable error. Division by zero must be handled gracefully to prevent system errors. | + +### Scoped Architectural View + +| Rule | Invariant | Rationale | +| ---------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| Scope filtering selects patterns by context, view, or name | A pattern matches a DiagramScope if ANY of three conditions hold: its name is in `scope.patterns`, its `archContext` is in `scope.archContext`, or any of its `archView` entries is in `scope.archView`. These dimensions are OR'd together -- a pattern need only match one. | Three filter dimensions cover different authoring workflows. Explicit names for ad-hoc documents, archContext for bounded context views, archView for cross-cutting architectural perspectives. | +| Neighbor discovery finds connected patterns outside scope | Patterns connected to scope patterns via relationship edges (uses, dependsOn, implementsPatterns, extendsPattern) but NOT themselves in scope appear in a "Related" subgraph with dashed border styling. | Scoped views need context. Showing only in-scope patterns without their dependencies loses critical relationship information. Neighbor patterns provide this context without cluttering the main view. | +| Multiple diagram scopes compose in sequence | When `diagramScopes` is an array, each scope produces its own Mermaid diagram section with independent title, direction, and pattern selection. At summary detail level, all diagrams are suppressed. | A single reference document may need multiple architectural perspectives. Pipeline Overview shows both a codec transformation view (TB) and a pipeline data flow view (LR) in the same document. | + +### Session Codec Testing + +| Rule | Invariant | Rationale | +| ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| SessionContextCodec provides working context for AI sessions | Session context must include session status with active/completed/remaining counts, phase navigation for incomplete phases, and active work grouped by phase. | AI agents need a compact, navigable view of current project state to make informed implementation decisions. | +| RemainingWorkCodec aggregates incomplete work by phase | Remaining work must show status counts, phase-grouped navigation, priority classification (in-progress/ready/blocked), and next actionable items. | Remaining work visibility prevents scope blindness — knowing what's left, what's blocked, and what's ready drives efficient session planning. | + +### Shape Matcher Testing + +| Rule | Invariant | Rationale | +| --------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Exact paths match without wildcards | A pattern without glob characters must match only the exact file path, character for character. | Loose matching on non-glob patterns would silently include unintended files, causing incorrect shapes to appear in generated documentation. | +| Single-level globs match one directory level | A single `*` glob must match files only within the specified directory, never crossing directory boundaries. | Crossing directory boundaries would violate standard glob semantics and pull in shapes from nested modules that belong to different product areas. | +| Recursive globs match any depth | A `**` glob must match files at any nesting depth below the specified prefix, while still respecting extension and prefix constraints. | Recursive globs enable broad subtree selection for shape extraction; failing to respect prefix and extension constraints would leak unrelated shapes into the output. | +| Dataset shape extraction deduplicates by name | When multiple patterns match a source glob, the returned shapes must be deduplicated by name so each shape appears at most once. | Duplicate shape names in generated documentation confuse readers and inflate type registries. | + +### Shape Selector Testing + +| Rule | Invariant | Rationale | +| ------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Reference doc configs select shapes via shapeSelectors | shapeSelectors provides three selection modes: by source path + specific names, by group tag, or by source path alone. | Multiple selection modes let reference docs curate precisely which shapes appear, preventing either over-inclusion of internal types or under-inclusion of public API surfaces. | + +### Source Mapper Testing + +| Rule | Invariant | Rationale | +| ------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Extraction methods dispatch to correct handlers | Each extraction method type (self-reference, TypeScript, Gherkin) must dispatch to the correct specialized handler based on the source file type or marker. | Wrong dispatch would apply TypeScript extraction logic to Gherkin files (or vice versa), producing garbled or empty results. | +| Self-references extract from current decision document | THIS DECISION self-references must extract content from the current decision document using rule descriptions, DocStrings, or full document access. | Self-references avoid circular file reads — the document content is already in memory, so extraction is a lookup operation rather than a file I/O operation. | +| Multiple sources are aggregated in mapping order | When multiple source mappings target the same section, their extracted content must be aggregated in the order defined by the mapping table. | Mapping order is intentional — authors structure their source tables to produce a logical reading flow, and reordering would break the narrative. | +| Missing files produce warnings without failing | When a referenced source file does not exist, the mapper must produce a warning and continue processing remaining mappings rather than failing entirely. | Partial extraction is more useful than total failure — a decision document with most sections populated and one warning is better than no document at all. | +| Empty extraction results produce info warnings | When extraction succeeds but produces empty results (no matching shapes, no matching rules), an informational warning must be generated. | Empty results often indicate stale source mappings pointing to renamed or removed content — warnings surface these issues before they reach generated output. | +| Extraction methods are normalized for dispatch | Extraction method strings must be normalized to canonical forms before dispatch, with unrecognized methods producing a warning. | Users write extraction methods in natural language — normalization bridges the gap between human-readable table entries and programmatic dispatch keys. | + +### Source Mapping Validator Testing + +| Rule | Invariant | Rationale | +| --------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | +| Source files must exist and be readable | All source file paths in mappings must resolve to existing, readable files. | Prevents extraction failures and provides clear error messages upfront. | +| Extraction methods must be valid and supported | Extraction methods must match a known method from the supported set. | Invalid methods cannot extract content; suggest valid alternatives. | +| Extraction methods must be compatible with file types | Method-file combinations must be compatible (e.g., TypeScript methods for .ts files). | Incompatible combinations fail at extraction; catch early with clear guidance. | +| Source mapping tables must have required columns | Tables must contain Section, Source File, and Extraction Method columns. | Missing columns prevent extraction; alternative column names are mapped. | +| All validation errors are collected and returned together | Validation collects all errors before returning, not just the first. | Enables users to fix all issues in a single iteration. | + +### Table Extraction + +| Rule | Invariant | Rationale | +| ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| Tables in rule descriptions render exactly once | Each markdown table in a rule description appears exactly once in the rendered output, with no residual pipe characters in surrounding text. | Without deduplication, tables extracted for formatting would also remain in the raw description text, producing duplicate output. | +| Multiple tables in description each render exactly once | When a rule description contains multiple markdown tables, each table renders as a separate formatted table block with no merging or duplication. | Merging or dropping tables would lose distinct data structures that the author intentionally separated, corrupting the rendered documentation. | +| stripMarkdownTables removes table syntax from text | stripMarkdownTables removes all pipe-delimited table syntax from input text while preserving all surrounding content unchanged. | If table syntax is not stripped from the raw text, the same table data appears twice in the rendered output -- once from the extracted table block and once as raw pipe characters in the description. | + +### Taxonomy Codec Testing + +| Rule | Invariant | Rationale | +| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Document metadata is correctly set | The taxonomy document must have the title "Taxonomy Reference", a descriptive purpose string, and a detail level reflecting the generateDetailFiles option. | Document metadata drives the table of contents and navigation in generated doc sites — incorrect metadata produces broken links and misleading titles. | +| Categories section is generated from TagRegistry | The categories section must render all categories from the configured TagRegistry as a table, with optional linkOut to detail files when progressive disclosure is enabled. | Categories are the primary navigation structure in the taxonomy — missing categories leave developers unable to find the correct annotation tags. | +| Metadata tags can be grouped by domain | When groupByDomain is enabled, metadata tags must be organized into domain-specific subsections; when disabled, a single flat table must be rendered. | Domain grouping improves scannability for large tag sets (21 categories in ddd-es-cqrs) while flat mode is simpler for small presets (3 categories in generic). | +| Tags are classified into domains by hardcoded mapping | Tags must be classified into domains (Core, Relationship, Timeline, etc.) using a hardcoded mapping, with unrecognized tags placed in an "Other Tags" group. | Domain classification is stable across releases — hardcoding prevents miscategorization from user config errors while the "Other" fallback handles future tag additions gracefully. | +| Optional sections can be disabled via codec options | Format Types, Presets, and Architecture sections must each be independently disableable via their respective codec option flags. | Not all projects need all sections — disabling irrelevant sections reduces generated document size and prevents confusion from inapplicable content. | +| Detail files are generated for progressive disclosure | When generateDetailFiles is enabled, the codec must produce additional detail files (one per domain group) alongside the main taxonomy document; when disabled, no additional files are created. | Progressive disclosure keeps the main document scannable while providing deep-dive content in linked pages — monolithic documents become unwieldy for large tag sets. | +| Format types are documented with descriptions and examples | All 6 format types must be documented with descriptions and usage examples in the generated taxonomy. | Format types control how tag values are parsed — undocumented formats force developers to guess the correct syntax, leading to annotation errors. | + +### Test Content Blocks + +| Rule | Invariant | Rationale | +| ---------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| Business rules appear as a separate section | Every Rule block must produce a distinct Business Rule entry containing its description and associated scenarios. | Without guaranteed capture, rule descriptions and rich content (DocStrings, DataTables) would be silently dropped from generated documentation. Rule descriptions provide context for why this business rule exists. You can include multiple paragraphs here. This is a second paragraph explaining edge cases or exceptions. | +| Multiple rules create multiple Business Rule entries | Each Rule keyword in a feature file must produce its own independent Business Rule entry in generated output. | Merging rules into a single entry would collapse distinct business domains, making it impossible to trace scenarios back to their governing constraint. Each Rule keyword creates a separate entry in the Business Rules section. This helps organize complex features into logical business domains. | + +### Timeline Codec Testing + +| Rule | Invariant | Rationale | +| ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | +| RoadmapDocumentCodec groups patterns by phase with progress tracking | The roadmap must include overall progress with percentage, phase navigation table, and phase sections with pattern tables. | The roadmap is the primary planning artifact — progress tracking at both project and phase level enables informed prioritization. | +| CompletedMilestonesCodec shows only completed patterns grouped by quarter | Only completed patterns appear, grouped by quarter with navigation, recent completions, and collapsible phase details. | Milestone tracking provides a historical record of delivery — grouping by quarter aligns with typical reporting cadence. | +| CurrentWorkCodec shows only active patterns with deliverables | Only active patterns appear with progress bars, deliverable tracking, and an all-active-patterns summary table. | Current work focus eliminates noise from completed and planned items — teams need to see only what's in flight. | + +### Traceability Generator + +| Rule | Invariant | Rationale | +| ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | +| Parses Verified by annotations to extract scenario references | Scenario names in `**Verified by:**` are matched against actual scenarios in feature files. Unmatched references are reported as warnings. | Verified by annotations create explicit traceability. Validating references ensures the traceability matrix reflects actual test coverage. | +| Generates Rule-to-Scenario traceability matrix | Every Rule appears in the matrix with its verification status. Scenarios are linked by name and file location. | A matrix format enables quick scanning of coverage status and supports audit requirements for bidirectional traceability. | +| Detects and reports coverage gaps | Orphan scenarios (not referenced by any Rule) and unverified rules are listed in dedicated sections. | Coverage gaps indicate either missing traceability annotations or actual missing test coverage. Surfacing them enables remediation. | +| Supports filtering by phase and domain | CLI flags allow filtering the matrix by phase number or domain category to generate focused traceability reports. | Large codebases have many rules. Filtering enables relevant subset extraction for specific audits or reviews. | + +### Transform Dataset Testing + +| Rule | Invariant | Rationale | +| ----------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Empty dataset produces valid zero-state views | An empty input produces a MasterDataset with all counts at zero and no groupings. | Generators must handle the zero-state gracefully; a missing or malformed empty dataset would cause null-reference errors across all rendering codecs. | +| Status and phase grouping creates navigable views | Patterns are grouped by canonical status and sorted by phase number, with per-phase status counts computed. | Generators need O(1) access to status-filtered and phase-ordered views without recomputing on each render pass. | +| Quarter and category grouping organizes by timeline and domain | Patterns are grouped by quarter and category, with only patterns bearing the relevant metadata included in each view. | Timeline and domain views must exclude patterns without the relevant metadata to prevent misleading counts and empty groupings in generated documentation. | +| Source grouping separates TypeScript and Gherkin origins | Patterns are partitioned by source file type, and patterns with phase metadata appear in the roadmap view. | Codecs that render TypeScript-specific or Gherkin-specific views depend on pre-partitioned sources; mixing sources would produce incorrect per-origin statistics and broken cross-references. | +| Relationship index builds bidirectional dependency graph | The relationship index contains forward and reverse lookups, with reverse lookups merged and deduplicated against explicit annotations. | Bidirectional navigation is required for dependency tree queries without O(n) scans per lookup. | +| Completion tracking computes project progress | Completion percentage is rounded to the nearest integer, and fully-completed requires all patterns in completed status with a non-zero total. | Inconsistent rounding or a false-positive fully-completed signal on an empty dataset would misrepresent project health in dashboards and generated progress reports. | +| Workflow integration conditionally includes delivery process data | The workflow is included in the MasterDataset only when provided, and phase names are resolved from the workflow configuration. | Projects without a delivery workflow must still produce valid datasets; unconditionally requiring workflow data would break standalone documentation generation. | + +### Universal Doc Generator Robustness + +| Rule | Invariant | Rationale | +| ----------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Context - PoC limitations prevent monorepo-scale operation | The document generator must produce correct, deduplicated output and surface all errors explicitly before operating at monorepo scale. | Silent failures and duplicated content in the PoC corrupt generated docs across all 210 target files, making bugs invisible until downstream consumers encounter broken documentation. | +| Decision - Robustness requires four coordinated improvements | Robustness improvements must be implemented as four distinct, coordinated modules (deduplication, validation, warning collection, file validation) rather than ad-hoc fixes. | Scattering reliability fixes across existing code creates coupling and makes individual concerns untestable; isolated modules enable independent verification and replacement. | +| Duplicate content must be detected and merged | No two sections in a generated document may have identical content fingerprints; duplicates must be merged into a single section with source attribution. | Duplicate sections confuse readers and inflate document size, undermining trust in generated documentation as a reliable replacement for manually maintained docs. Content fingerprinting identifies duplicate sections extracted from multiple sources. When duplicates are found, the system merges them intelligently based on source priority. | +| Invalid source mappings must fail fast with clear errors | Every source mapping must pass pre-flight validation (file existence, method validity, readability) before any extraction is attempted. | Without pre-flight validation, invalid mappings produce silent failures or cryptic runtime errors, making it impossible to diagnose configuration problems at monorepo scale. Pre-flight validation catches configuration errors before extraction begins. This prevents silent failures and provides actionable error messages. | +| Warnings must be collected and reported consistently | All non-fatal issues during extraction must be captured in a structured warning collector grouped by source, never emitted via console.warn. | Scattered console.warn calls are lost in CI output and lack source context, making it impossible to trace warnings back to the configuration entry that caused them. The warning collector replaces scattered console.warn calls with a structured system that aggregates warnings and reports them consistently. | +| Consequence - Improved reliability at cost of stricter validation | Existing source mappings that previously succeeded silently may now fail validation and must be updated to conform to the stricter checks. | Allowing invalid mappings to bypass validation would preserve the silent-failure behavior the robustness work was designed to eliminate. | + +### Validation Rules Codec Testing + +| Rule | Invariant | Rationale | +| --------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Document metadata is correctly set | The validation rules document must have the title "Validation Rules", a purpose describing Process Guard, and a detail level reflecting the generateDetailFiles option. | Accurate metadata ensures the validation rules document is correctly indexed in the generated documentation site. | +| All validation rules are documented in a table | All 6 Process Guard validation rules must appear in the rules table with their correct severity levels (error or warning). | The rules table is the primary reference for understanding what Process Guard enforces — missing rules would leave developers surprised by undocumented validation failures. | +| FSM state diagram is generated from transitions | When includeFSMDiagram is enabled, a Mermaid state diagram showing all 4 FSM states and their transitions must be generated; when disabled, the diagram section must be omitted. | The state diagram is the most intuitive representation of allowed transitions — it answers "where can I go from here?" faster than a text table. | +| Protection level matrix shows status protections | When includeProtectionMatrix is enabled, a matrix showing all 4 statuses with their protection levels must be generated; when disabled, the section must be omitted. | The protection matrix explains why certain edits are blocked — without it, developers encounter cryptic "scope-creep" or "completed-protection" errors without understanding the underlying model. | +| CLI usage is documented with options and exit codes | When includeCLIUsage is enabled, the document must include CLI example code, all 6 options, and exit code documentation; when disabled, the section must be omitted. | CLI documentation in the validation rules doc provides a single reference for both the rules and how to run them — separate docs would fragment the developer experience. | +| Escape hatches are documented for special cases | When includeEscapeHatches is enabled, all 3 escape hatch mechanisms must be documented; when disabled, the section must be omitted. | Escape hatches prevent the validation system from becoming a blocker — developers need to know how to safely bypass rules for legitimate exceptions. | + +### Warning Collector Testing + +| Rule | Invariant | Rationale | +| ----------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Warnings are captured with source context | Each captured warning must include the source file path, optional line number, and category for precise identification. | Context-free warnings are impossible to act on — developers need to know which file and line produced the warning to fix the underlying issue. | +| Warnings are categorized for filtering and grouping | Warnings must support multiple categories and be filterable by both category and source file. | Large codebases produce many warnings — filtering by category or file lets developers focus on one concern at a time instead of triaging an overwhelming flat list. | +| Warnings are aggregated across the pipeline | Warnings from multiple pipeline stages must be collected into a single aggregated view, groupable by source file and summarizable by category counts. | Pipeline stages run independently — without aggregation, warnings would be scattered across stage outputs, making it impossible to see the full picture. | +| Warnings integrate with the Result pattern | Warnings must propagate through the Result monad, being preserved in both successful and failed results and across pipeline stages. | The Result pattern is the standard error-handling mechanism — warnings that don't propagate through Results would be silently lost when functions compose. | +| Warnings can be formatted for different outputs | Warnings must be formattable as colored console output, machine-readable JSON, and markdown for documentation, each with appropriate structure. | Different consumers need different formats — CI pipelines parse JSON, developers read console output, and generated docs embed markdown. | +| Existing console.warn calls are migrated to collector | Pipeline components (source mapper, shape extractor) must use the warning collector instead of direct console.warn calls. | Direct console.warn calls bypass aggregation and filtering — migrating to the collector ensures all warnings are captured, categorized, and available for programmatic consumption. | + +### Zod Codec Migration + +| Rule | Invariant | Rationale | +| -------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| Input codec parses and validates JSON in a single step | Every JSON string parsed through the input codec is both syntactically valid JSON and schema-conformant before returning a typed value. | Separating parse from validate allows invalid data to leak past the boundary — a single-step codec ensures callers never hold an unvalidated value. | +| Output codec validates before serialization | Every object serialized through the output codec is schema-validated before JSON.stringify, preventing invalid data from reaching consumers. | Serializing without validation can produce JSON that downstream consumers cannot parse, causing failures far from the source of the invalid data. | +| LintOutputSchema validates CLI lint output structure | Lint output JSON always conforms to the LintOutputSchema, ensuring consistent structure for downstream tooling. | Non-conformant lint output breaks CI pipeline parsers and IDE integrations that depend on a stable JSON contract. | +| ValidationSummaryOutputSchema validates cross-source analysis output | Validation summary JSON always conforms to the ValidationSummaryOutputSchema, ensuring consistent reporting of cross-source pattern analysis. | Inconsistent validation summaries cause miscounted pattern coverage, leading to false confidence or missed gaps in cross-source analysis. | +| RegistryMetadataOutputSchema accepts arbitrary nested structures | Registry metadata codec accepts any valid JSON-serializable object without schema constraints on nested structure. | Registry consumers attach domain-specific metadata whose shape varies per preset — constraining the nested structure would break extensibility across presets. | +| formatCodecError produces human-readable error output | Formatted codec errors always include the operation context and all validation error details for debugging. | Omitting the operation context or individual field errors forces developers to reproduce failures manually instead of diagnosing from the error message alone. | +| safeParse returns typed values or undefined without throwing | safeParse never throws exceptions; it returns the typed value on success or undefined on any failure. | Throwing on invalid input forces every call site to wrap in try/catch — returning undefined lets callers use simple conditional checks and avoids unhandled exception crashes. | +| createFileLoader handles filesystem operations with typed errors | File loader converts all filesystem errors (ENOENT, EACCES, generic) into structured CodecError values with appropriate messages and source paths. | Propagating raw filesystem exceptions leaks Node.js error internals to consumers and prevents consistent error formatting across parse, validate, and I/O failures. | --- diff --git a/docs-live/product-areas/PROCESS.md b/docs-live/product-areas/PROCESS.md index 0edd1e4a..31a8a733 100644 --- a/docs-live/product-areas/PROCESS.md +++ b/docs-live/product-areas/PROCESS.md @@ -20,6 +20,8 @@ **Invariant:** The product-area tag uses one of 7 canonical values. Each value represents a reader-facing documentation section, not a source module. +**Rationale:** Without canonical values, organic drift (e.g., Generator vs Generators) produces inconsistent grouping in generated documentation and fragmented product area pages. + | Value | Reader Question | Covers | | ------------- | ----------------------------------- | ----------------------------------------------- | | Annotation | How do I annotate code? | Scanning, extraction, tag parsing, dual-source | @@ -36,6 +38,8 @@ **Invariant:** The adr-category tag uses one of 4 values. +**Rationale:** Unbounded category values prevent meaningful grouping of architecture decisions and make cross-cutting queries unreliable. + | Value | Purpose | | ------------- | --------------------------------------------- | | architecture | System structure, component design, data flow | @@ -49,6 +53,8 @@ **Invariant:** Pattern status uses exactly 4 values with defined protection levels. These are enforced by Process Guard at commit time. +**Rationale:** Without protection levels, active specs accumulate scope creep and completed specs get silently modified, undermining delivery process integrity. + | Status | Protection | Can Add Deliverables | Allowed Actions | | --------- | ------------ | -------------------- | ------------------------------- | | roadmap | None | Yes | Full editing | @@ -60,7 +66,9 @@ ## Valid FSM transitions -**Invariant:** Only these transitions are valid. All others are rejected by Process Guard. Completed is a terminal state. Modifications require `@libar-docs-unlock-reason` escape hatch. +**Invariant:** Only these transitions are valid. All others are rejected by Process Guard. + +**Rationale:** Allowing arbitrary transitions (e.g., roadmap to completed) bypasses the active phase where scope-lock and deliverable tracking provide quality assurance. Completed is a terminal state. Modifications require `@libar-docs-unlock-reason` escape hatch. | From | To | Trigger | | -------- | --------- | --------------------- | @@ -76,6 +84,8 @@ **Invariant:** Every tag has one of 6 format types that determines how its value is parsed. +**Rationale:** Without explicit format types, parsers must guess value structure, leading to silent data corruption when CSV values are treated as single strings or numbers are treated as text. + | Format | Parsing | Example | | ------------ | ------------------------------ | ------------------------------ | | flag | Boolean presence, no value | @libar-docs-core | @@ -91,6 +101,8 @@ **Invariant:** Relationship tags have defined ownership by source type. Anti-pattern detection enforces these boundaries. +**Rationale:** Cross-domain tag placement (e.g., runtime dependencies in Gherkin) creates conflicting sources of truth and breaks the dual-source architecture ownership model. + | Tag | Correct Source | Wrong Source | Rationale | | ---------- | -------------- | ------------- | ---------------------------------- | | uses | TypeScript | Feature files | TS owns runtime dependencies | @@ -104,12 +116,16 @@ **Invariant:** The quarter tag uses `YYYY-QN` format (e.g., `2026-Q1`). ISO-year-first sorting works lexicographically. +**Rationale:** Non-standard formats (e.g., Q1-2026) break lexicographic sorting, which roadmap generation and timeline queries depend on for correct ordering. + --- ## Canonical phase definitions (6-phase USDP standard) **Invariant:** The default workflow defines exactly 6 phases in fixed order. These are the canonical phase names and ordinals used by all generated documentation. +**Rationale:** Ad-hoc phase names and ordering produce inconsistent roadmap grouping across packages and make cross-package progress tracking impossible. + | Order | Phase | Purpose | | ----- | ------------- | ---------------------------------------------- | | 1 | Inception | Problem framing, scope definition | @@ -125,6 +141,8 @@ **Invariant:** Deliverable status (distinct from pattern FSM status) uses exactly 6 values, enforced by Zod schema at parse time. +**Rationale:** Freeform status strings bypass Zod validation and break DoD checks, which rely on terminal status classification to determine pattern completeness. + | Value | Meaning | | ----------- | -------------------- | | complete | Work is done | @@ -206,863 +224,89 @@ graph LR --- -## Behavior Specifications - -### StepDefinitionCompletion - -[View StepDefinitionCompletion source](delivery-process/specs/step-definition-completion.feature) - -**Problem:** -7 feature files in tests/features/behavior/ have complete Gherkin specs -but NO step definitions. These specs describe expected behavior but are -NOT executable - they're documentation without tests. - -**Solution:** -Create step definitions for each existing feature file: - -- pr-changes-generation.feature (12 scenarios) -- remaining-work-enhancement.feature (7 scenarios) -- remaining-work-totals.feature (6 scenarios) -- session-handoffs.feature (9 scenarios) -- description-headers.feature (6 scenarios) -- description-quality-foundation.feature (10 scenarios) -- implementation-links.feature (5 scenarios) - -Additionally, 3 feature files in other directories need step definitions: - -- tests/features/generators/table-extraction.feature -- tests/features/scanner/docstring-mediatype.feature -- tests/features/generators/business-rules-codec.feature - -**Business Value:** -| Benefit | How | -| Executable Tests | Specs become regression tests | -| CI Integration | Tests run on every commit | -| Refactoring Safety | Changes verified against specs | - -
-Generator-related specs need step definitions for output validation (3 scenarios) - -#### Generator-related specs need step definitions for output validation - -**Invariant:** Step definitions test actual codec output against expected structure. Factory functions from tests/fixtures/ should be used for test data. - -**Existing Specs:** - `tests/features/behavior/pr-changes-generation.feature` - 12 scenarios - `tests/features/behavior/remaining-work-enhancement.feature` - 7 scenarios - `tests/features/behavior/remaining-work-totals.feature` - 6 scenarios - `tests/features/behavior/session-handoffs.feature` - 9 scenarios - - **Implementation Notes:** - - Use createExtractedPattern() from tests/fixtures/pattern-factories.ts - - Use createMasterDataset() from tests/fixtures/dataset-factories.ts - - Import codecs from src/renderable/codecs/ - - Assert on RenderableDocument structure, not markdown output - -**Verified by:** - -- pr-changes-generation.steps.ts implements all 12 scenarios -- remaining-work-enhancement.steps.ts implements priority sorting -- session-handoffs.steps.ts implements handoff context -- PR changes step defs -- Remaining work step defs -- Session handoffs step defs - -
- -
-Renderable helper specs need step definitions for utility functions (2 scenarios) - -#### Renderable helper specs need step definitions for utility functions - -**Invariant:** Helper functions are pure and easy to unit test. Step definitions should test edge cases identified in specs. - -**Existing Specs:** - `tests/features/behavior/description-headers.feature` - 6 scenarios - `tests/features/behavior/description-quality-foundation.feature` - 10 scenarios - `tests/features/behavior/implementation-links.feature` - 5 scenarios - - **Implementation Notes:** - - Import helpers from src/renderable/utils.ts or src/generators/sections/helpers.ts - - Use simple string inputs/outputs - - Test stripLeadingHeaders(), camelCaseToTitleCase(), normalizeImplPath() - -**Verified by:** - -- description-headers.steps.ts tests header stripping -- description-quality-foundation.steps.ts tests title case conversion -- Description header step defs -- Quality foundation step defs -- Implementation links step defs - -
- -
-Remaining specs in other directories need step definitions (2 scenarios) - -#### Remaining specs in other directories need step definitions - -**Existing Specs:** - `tests/features/generators/table-extraction.feature` - `tests/features/scanner/docstring-mediatype.feature` - -**Verified by:** - -- table-extraction.steps.ts tests stripMarkdownTables -- docstring-mediatype.steps.ts tests mediaType preservation -- Table extraction step defs -- DocString mediatype step defs - -
- -
-Step definition implementation follows project patterns - -#### Step definition implementation follows project patterns - -**Pattern:** All step definitions should follow the established patterns in -existing .steps.ts files for consistency. - - **Template:** - - - **File Locations:** - - Behavior steps: tests/steps/behavior/{feature-name}.steps.ts - - Generator steps: tests/steps/generators/{feature-name}.steps.ts - - Scanner steps: tests/steps/scanner/{feature-name}.steps.ts - -```typescript -import { Given, When, Then, Before } from '@cucumber/cucumber'; -import { expect } from 'vitest'; -import { createExtractedPattern } from '../../fixtures/pattern-factories.js'; - -interface TestState { - input: unknown; - result: unknown; - error: Error | null; -} - -let state: TestState; - -Before(() => { - state = { input: null, result: null, error: null }; -}); - -Given('...', function (arg: string) { - // Setup test state -}); - -When('...', function () { - // Execute action under test -}); - -Then('...', function (expected: string) { - expect(state.result).toBe(expected); -}); -``` - -
- -### SessionFileCleanup - -[View SessionFileCleanup source](delivery-process/specs/session-file-cleanup.feature) - -**Problem:** -Session files (docs-living/sessions/phase-\*.md) are ephemeral working -documents for active phases. When phases complete or are paused, orphaned -session files should be cleaned up. The cleanup behavior is documented -but not specified with acceptance criteria. - -**Solution:** -Formalize cleanup behavior with specifications covering: - -- When cleanup triggers -- What files are deleted vs preserved -- Error handling -- Logging/notification of cleanup actions - -
-Cleanup triggers during session-context generation (1 scenarios) - -#### Cleanup triggers during session-context generation - -**Verified by:** - -- Cleanup runs after generating session files - -
- -
-Only phase-*.md files are candidates for cleanup (1 scenarios) - -#### Only phase-\*.md files are candidates for cleanup - -**Verified by:** - -- Non-session files are preserved - -
- -
-Cleanup failures are non-fatal (2 scenarios) - -#### Cleanup failures are non-fatal - -**Verified by:** - -- Permission error during cleanup -- Missing sessions directory - -
- -### MvpWorkflowImplementation - -[View MvpWorkflowImplementation source](delivery-process/specs/mvp-workflow-implementation.feature) - -**Problem:** -PDR-005 defines a 4-state workflow FSM (`roadmap, active, completed, deferred`) -but the delivery-process package validation schemas and generators may still -reference legacy status values. Need to ensure alignment. - -**Solution:** -Implement PDR-005 status values via taxonomy module refactor: - -1. Create taxonomy module as single source of truth (src/taxonomy/status-values.ts) -2. Update validation schemas to import from taxonomy module -3. Update generators to use normalizeStatus() for display bucket mapping - -#### PDR-005 status values are recognized - -**Verified by:** - -- Scanner extracts new status values -- All four status values are valid - -#### Generators map statuses to documents - -**Verified by:** - -- Roadmap and deferred appear in ROADMAP.md -- Active appears in CURRENT-WORK.md -- Completed appears in CHANGELOG - -### LivingRoadmapCLI - -[View LivingRoadmapCLI source](delivery-process/specs/living-roadmap-cli.feature) - -**Problem:** -Roadmap is a static document that requires regeneration. -No interactive way to answer "what's next?" or "what's blocked?" -Critical path analysis requires manual inspection. - -**Solution:** -Add interactive CLI commands for roadmap queries: - -- `pnpm roadmap:next` - Show next actionable phase -- `pnpm roadmap:blocked` - Show phases waiting on dependencies -- `pnpm roadmap:path-to --phase N` - Show critical path to target -- `pnpm roadmap:status` - Quick summary (completed/active/roadmap counts) - -This is the capstone for Setup A (Framework Roadmap OS). -Transforms roadmap from "document to maintain" to "queries over reality". - -Implements Convergence Opportunity 8: Living Roadmap That Compiles. - -### EffortVarianceTracking - -[View EffortVarianceTracking source](delivery-process/specs/effort-variance-tracking.feature) - -**Problem:** -No systematic way to track planned vs actual effort. -Cannot learn from estimation accuracy patterns. -No visibility into "where time goes" across workflows. - -**Solution:** -Generate EFFORT-ANALYSIS.md report showing: - -- Phase burndown (planned vs actual per phase) -- Estimation accuracy trends over time -- Time distribution by workflow type (design, implementation, testing, docs) - -Uses effort and effort-actual metadata from TypeScript phase files. -Uses workflow metadata for time distribution analysis. - -Implements Convergence Opportunity 3: Earned-Value Tracking (lightweight). - -### CliBehaviorTesting - -[View CliBehaviorTesting source](delivery-process/specs/cli-behavior-testing.feature) - -**Problem:** -All 5 CLI commands (generate-docs, lint-patterns, lint-process, validate-patterns, -generate-tag-taxonomy) have zero behavior specs. These are user-facing interfaces -that need comprehensive testing for argument parsing, error handling, and output formats. - -**Solution:** -Create behavior specs for each CLI command covering: - -- Argument parsing (all flags and combinations) -- Error handling (missing/invalid input) -- Output format validation (JSON, pretty) -- Exit code behavior - -**Business Value:** -| Benefit | How | -| Reliability | CLI commands work correctly in all scenarios | -| User Experience | Clear error messages for invalid usage | -| CI/CD Integration | Predictable exit codes for automation | - -
-generate-docs handles all argument combinations correctly (4 scenarios) - -#### generate-docs handles all argument combinations correctly - -**Invariant:** Invalid arguments produce clear error messages with usage hints. Valid arguments produce expected output files. - -**Verified by:** - -- Generate specific document type -- Generate multiple document types -- Unknown generator name fails with helpful error -- Missing required input fails with usage hint -- Argument parsing -- Generator selection -- Output file creation - -
- -
-lint-patterns validates annotation quality with configurable strictness (4 scenarios) - -#### lint-patterns validates annotation quality with configurable strictness - -**Invariant:** Lint violations are reported with file, line, and severity. Exit codes reflect violation presence based on strictness setting. - -**Verified by:** - -- Lint passes for valid annotations -- Lint fails for missing pattern name -- JSON output format -- Strict mode treats warnings as errors -- Lint execution -- Strict mode -- Output formats - -
- -
-validate-patterns performs cross-source validation with DoD checks (3 scenarios) - -#### validate-patterns performs cross-source validation with DoD checks - -**Invariant:** DoD and anti-pattern violations are reported per phase. Exit codes reflect validation state. - -**Verified by:** - -- DoD validation for specific phase -- Anti-pattern detection -- Combined validation modes -- DoD validation -- Phase filtering - -
- -
-All CLIs handle errors consistently with DocError pattern (2 scenarios) - -#### All CLIs handle errors consistently with DocError pattern - -**Invariant:** Errors include type, file, line (when applicable), and reason. Unknown errors are caught and formatted safely. - -**Verified by:** - -- File not found error includes path -- Parse error includes line number -- Error formatting -- Unknown error handling - -
- -### ADR003SourceFirstPatternArchitecture - -[View ADR003SourceFirstPatternArchitecture source](delivery-process/decisions/adr-003-source-first-pattern-architecture.feature) - -**Context:** -The original annotation architecture assumed pattern definitions live -in tier 1 feature specs, with TypeScript code limited to `@libar-docs-implements`. -At scale this creates three problems: tier 1 specs become stale after implementation -(only 39% of 44 specs have traceability to executable specs), retroactive annotation -of existing code triggers merge conflicts, and duplicated Rules/Scenarios in tier 1 -specs average 200-400 lines that exist in better form in executable specs. - -**Decision:** -Invert the ownership model: TypeScript source code is the canonical pattern -definition. Tier 1 specs become ephemeral planning documents. The three durable -artifacts are annotated source code, executable specs, and decision specs. - -**Consequences:** -| Type | Impact | -| Positive | Pattern identity travels with code from stub through production | -| Positive | Eliminates stale tier 1 spec maintenance burden | -| Positive | Executable specs become the living specification (richer, verified) | -| Positive | Retroactive annotation works without merge conflicts | -| Negative | Migration effort for existing tier 1 specs | -| Negative | Requires updating CLAUDE.md annotation ownership guidance | - -
-TypeScript source owns pattern identity - -#### TypeScript source owns pattern identity - -**Invariant:** A pattern is defined by `@libar-docs-pattern` in a TypeScript file — either a stub (pre-implementation) or source code (post-implementation). - -**Pattern Definition Lifecycle:** - - Exception: Patterns with no TypeScript implementation (pure process or - workflow concerns) may be defined in decision specs. The constraint is: - one definition per pattern, regardless of source type. - -| Phase | Location | Status | -| -------------- | -------------------------------------- | --------- | -| Design | `delivery-process/stubs/pattern-name/` | roadmap | -| Implementation | `src/path/to/module.ts` | active | -| Completed | `src/path/to/module.ts` | completed | - -
- -
-Tier 1 specs are ephemeral working documents - -#### Tier 1 specs are ephemeral working documents - -**Invariant:** Tier 1 roadmap specs serve planning and delivery tracking. They are not the source of truth for pattern identity, invariants, or acceptance criteria. After completion, they may be archived. - -**Value by lifecycle phase:** - -| Phase | Planning Value | Documentation Value | -| --------- | ----------------------------- | ---------------------------------- | -| roadmap | High | None (not yet built) | -| active | Medium (deliverable tracking) | Low (stale snapshot) | -| completed | None | None (executable specs are better) | - -
- -
-Three durable artifact types - -#### Three durable artifact types - -**Invariant:** The delivery process produces three artifact types with long-term value. All other artifacts are projections or ephemeral. - -| Artifact | Purpose | Owns | -| ------------------------ | ------------------------------------ | ------------------------------------- | -| Annotated TypeScript | Pattern identity, architecture graph | Name, status, uses, categories | -| Executable specs | Behavior verification, invariants | Rules, rationale, acceptance criteria | -| Decision specs (ADR/PDR) | Architectural choices, rationale | Why decisions were made | - -
- -
-Implements is UML Realization (many-to-one) - -#### Implements is UML Realization (many-to-one) - -**Invariant:** `@libar-docs-implements` declares a realization relationship. Multiple files can implement the same pattern. One file can implement multiple patterns (CSV format). - -| Relationship | Tag | Cardinality | -| ------------ | ------------------------ | ----------------------- | -| Definition | `@libar-docs-pattern` | Exactly one per pattern | -| Realization | `@libar-docs-implements` | Many-to-one | - -
- -
-Single-definition constraint - -#### Single-definition constraint - -**Invariant:** `@libar-docs-pattern:X` may appear in exactly one file across the entire codebase. The `mergePatterns()` conflict check in `orchestrator.ts` correctly enforces this. - -**Migration path for existing conflicts:** - -| Current State | Resolution | -| ------------------------------- | ----------------------------------------------- | -| Pattern in both TS and feature | Keep TS definition, feature uses `@implements` | -| Pattern only in tier 1 spec | Move definition to TS stub, archive tier 1 spec | -| Pattern only in TS | Already correct | -| Pattern only in executable spec | Valid if no TS implementation exists | - -
- -
-Reverse links preferred over forward links (1 scenarios) - -#### Reverse links preferred over forward links - -**Invariant:** `@libar-docs-implements` (reverse: "I verify this pattern") is the primary traceability mechanism. `@libar-docs-executable-specs` (forward: "my tests live here") is retained but not required. - -| Mechanism | Usage | Reliability | -| ----------------------------- | ----------------- | -------------------------------- | -| `@implements` (reverse) | 14 patterns (32%) | Self-maintaining, lives in test | -| `@executable-specs` (forward) | 9 patterns (20%) | Requires tier 1 spec maintenance | - -**Verified by:** - -- TypeScript source is canonical pattern definition - -
- -### ADR002GherkinOnlyTesting - -[View ADR002GherkinOnlyTesting source](delivery-process/decisions/adr-002-gherkin-only-testing.feature) - -**Context:** -A package that generates documentation from `.feature` files had dual -test approaches: 97 legacy `.test.ts` files alongside Gherkin features. -This undermined the core thesis that Gherkin IS sufficient for all testing. - -**Decision:** -Enforce strict Gherkin-only testing for the delivery-process package: - -- All tests must be `.feature` files with step definitions -- No new `.test.ts` files -- Edge cases use Scenario Outline with Examples tables - -**Consequences:** -| Type | Impact | -| Positive | Single source of truth for tests AND documentation | -| Positive | Demonstrates Gherkin sufficiency -- the package practices what it preaches | -| Positive | Living documentation always matches test coverage | -| Positive | Forces better scenario design with Examples tables | -| Negative | Scenario Outline syntax more verbose than parameterized tests | - -#### Source-driven process benefit - -**Invariant:** Feature files serve as both executable specs and documentation source. This dual purpose is the primary benefit of Gherkin-only testing for this package. - -| Artifact | Without Gherkin-Only | With Gherkin-Only | -| ------------------- | --------------------------- | ---------------------------------- | -| Tests | .test.ts (hidden from docs) | .feature (visible in docs) | -| Business rules | Manually maintained | Extracted from Rule blocks | -| Acceptance criteria | Implicit in test code | Explicit @acceptance-criteria tags | -| Traceability | Manual cross-referencing | @libar-docs-implements links | - -**Verified by:** - -- Gherkin-only policy enforced - -### ADR001TaxonomyCanonicalValues - -[View ADR001TaxonomyCanonicalValues source](delivery-process/decisions/adr-001-taxonomy-canonical-values.feature) - -**Context:** -The annotation system requires well-defined canonical values for taxonomy -tags, FSM status lifecycle, and source ownership rules. Without canonical -values, organic growth produces drift (Generator vs Generators, Process -vs DeliveryProcess) and inconsistent grouping in generated documentation. - -**Decision:** -Define canonical values for all taxonomy enums, FSM states with protection -levels, valid transitions, tag format types, and source ownership rules. -These are the durable constants of the delivery process. - -**Consequences:** -| Type | Impact | -| Positive | Generated docs group into coherent sections | -| Positive | FSM enforcement has clear, auditable state definitions | -| Positive | Source ownership prevents cross-domain tag confusion | -| Negative | Migration effort for existing specs with non-canonical values | - -
-Product area canonical values - -#### Product area canonical values - -**Invariant:** The product-area tag uses one of 7 canonical values. Each value represents a reader-facing documentation section, not a source module. - -| Value | Reader Question | Covers | -| ------------- | ----------------------------------- | ----------------------------------------------- | -| Annotation | How do I annotate code? | Scanning, extraction, tag parsing, dual-source | -| Configuration | How do I configure the tool? | Config loading, presets, resolution | -| Generation | How does code become docs? | Codecs, generators, rendering, diagrams | -| Validation | How is the workflow enforced? | FSM, DoD, anti-patterns, process guard, lint | -| DataAPI | How do I query process state? | Process state API, stubs, context assembly, CLI | -| CoreTypes | What foundational types exist? | Result monad, error factories, string utils | -| Process | How does the session workflow work? | Session lifecycle, handoffs, conventions | - -
- -
-ADR category canonical values - -#### ADR category canonical values - -**Invariant:** The adr-category tag uses one of 4 values. - -| Value | Purpose | -| ------------- | --------------------------------------------- | -| architecture | System structure, component design, data flow | -| process | Workflow, conventions, annotation rules | -| testing | Test strategy, verification approach | -| documentation | Documentation generation, content structure | - -
- -
-FSM status values and protection levels - -#### FSM status values and protection levels - -**Invariant:** Pattern status uses exactly 4 values with defined protection levels. These are enforced by Process Guard at commit time. - -| Status | Protection | Can Add Deliverables | Allowed Actions | -| --------- | ------------ | -------------------- | ------------------------------- | -| roadmap | None | Yes | Full editing | -| active | Scope-locked | No | Edit existing deliverables only | -| completed | Hard-locked | No | Requires unlock-reason tag | -| deferred | None | Yes | Full editing | - -
- -
-Valid FSM transitions - -#### Valid FSM transitions - -**Invariant:** Only these transitions are valid. All others are rejected by Process Guard. Completed is a terminal state. Modifications require `@libar-docs-unlock-reason` escape hatch. - -| From | To | Trigger | -| -------- | --------- | --------------------- | -| roadmap | active | Start work | -| roadmap | deferred | Postpone | -| active | completed | All deliverables done | -| active | roadmap | Blocked/regressed | -| deferred | roadmap | Resume planning | - -
- -
-Tag format types - -#### Tag format types - -**Invariant:** Every tag has one of 6 format types that determines how its value is parsed. - -| Format | Parsing | Example | -| ------------ | ------------------------------ | ------------------------------ | -| flag | Boolean presence, no value | @libar-docs-core | -| value | Simple string | @libar-docs-pattern MyPattern | -| enum | Constrained to predefined list | @libar-docs-status completed | -| csv | Comma-separated values | @libar-docs-uses A, B, C | -| number | Numeric value | @libar-docs-phase 15 | -| quoted-value | Preserves spaces | @libar-docs-brief:'Multi word' | - -
- -
-Source ownership - -#### Source ownership - -**Invariant:** Relationship tags have defined ownership by source type. Anti-pattern detection enforces these boundaries. - -| Tag | Correct Source | Wrong Source | Rationale | -| ---------- | -------------- | ------------- | ---------------------------------- | -| uses | TypeScript | Feature files | TS owns runtime dependencies | -| depends-on | Feature files | TypeScript | Gherkin owns planning dependencies | -| quarter | Feature files | TypeScript | Gherkin owns timeline metadata | -| team | Feature files | TypeScript | Gherkin owns ownership metadata | - -
- -
-Quarter format convention - -#### Quarter format convention - -**Invariant:** The quarter tag uses `YYYY-QN` format (e.g., `2026-Q1`). ISO-year-first sorting works lexicographically. - -
- -
-Canonical phase definitions (6-phase USDP standard) - -#### Canonical phase definitions (6-phase USDP standard) - -**Invariant:** The default workflow defines exactly 6 phases in fixed order. These are the canonical phase names and ordinals used by all generated documentation. - -| Order | Phase | Purpose | -| ----- | ------------- | ---------------------------------------------- | -| 1 | Inception | Problem framing, scope definition | -| 2 | Elaboration | Design decisions, architecture exploration | -| 3 | Session | Planning and design session work | -| 4 | Construction | Implementation, testing, integration | -| 5 | Validation | Verification, acceptance criteria confirmation | -| 6 | Retrospective | Review, lessons learned, documentation | - -
- -
-Deliverable status canonical values (1 scenarios) - -#### Deliverable status canonical values - -**Invariant:** Deliverable status (distinct from pattern FSM status) uses exactly 6 values, enforced by Zod schema at parse time. - -| Value | Meaning | -| ----------- | -------------------- | -| complete | Work is done | -| in-progress | Work is ongoing | -| pending | Work has not started | -| deferred | Work postponed | -| superseded | Replaced by another | -| n/a | Not applicable | - -**Verified by:** - -- Canonical values are enforced - -
- -### SessionHandoffs - -[View SessionHandoffs source](tests/features/behavior/session-handoffs.feature) - -The delivery process supports mid-phase handoffs between sessions and -coordination across multiple developers through structured templates, -checklists, and generated documentation. - -**Problem:** - -- Context is lost when work pauses mid-phase (LLM sessions have no memory) -- Discoveries made during sessions are not captured for roadmap refinement -- Multiple developers working on same phase can create conflicts -- Resuming work requires re-reading scattered feature files - -**Solution:** - -- Discovery tags (@libar-process-discovered-\*) capture learnings inline -- SESSION-CONTEXT.md provides complete phase context for LLM planning -- Handoff template standardizes state capture at session boundaries -- Retrospective checklist ensures discoveries flow to findings generator -- PROCESS_SETUP.md documents coordination patterns for parallel work - -
-Handoff context generation captures session state (3 scenarios) - -#### Handoff context generation captures session state - -**Invariant:** Active phases with handoff context enabled must include session handoff sections with template and checklist links. - -**Verified by:** - -- SESSION-CONTEXT.md includes handoff section for active phases -- Discovery tags appear in handoff context section -- Paused phase shows status indicator - -
- -
-Handoff templates and checklists contain required sections (2 scenarios) - -#### Handoff templates and checklists contain required sections - -**Invariant:** Session handoff template and retrospective checklist must exist and contain all required sections for structured knowledge transfer. - -**Verified by:** - -- Handoff template exists and contains required sections -- Retrospective checklist exists and contains required sections - -
- -
-PROCESS_SETUP.md documents handoff and coordination protocols (2 scenarios) - -#### PROCESS_SETUP.md documents handoff and coordination protocols - -**Invariant:** PROCESS_SETUP.md must document both session handoff protocol and multi-developer coordination patterns. - -**Verified by:** - -- PROCESS_SETUP.md documents handoff protocol -- PROCESS_SETUP.md documents multi-developer coordination - -
- -
-Edge cases and acceptance criteria ensure robustness (5 scenarios) - -#### Edge cases and acceptance criteria ensure robustness - -**Invariant:** Handoff context must degrade gracefully when no discoveries exist and must be disableable. Mid-phase handoffs, multi-developer coordination, and retrospective capture must all preserve context. - -**Verified by:** - -- Fresh phase shows no previous context message -- Handoff context can be disabled -- Mid-phase handoff preserves context -- Multiple developers can coordinate -- Session retrospective captures learnings - -
- -### SessionFileLifecycle - -[View SessionFileLifecycle source](tests/features/behavior/session-file-lifecycle.feature) - -Orphaned session files are automatically cleaned up during generation, -maintaining a clean docs-living/sessions/ directory. - -**Problem:** - -- Session files for completed phases become orphaned and show stale data -- Manual cleanup is error-prone and easily forgotten -- Stale session files mislead LLMs reading docs-living/ for context -- No tracking of which files were cleaned up during generation -- Accumulating orphaned files clutter the sessions directory over time - -**Solution:** - -- DELETE strategy removes orphaned files during session-context generation -- Only active phase session files are preserved and regenerated -- COMPLETED-MILESTONES.md serves as authoritative history (no session files needed) -- Generator output tracks deleted files for transparency and debugging -- Cleanup is idempotent and handles edge cases (missing dirs, empty state) - -
-Orphaned session files are removed during generation (2 scenarios) - -#### Orphaned session files are removed during generation - -**Invariant:** Only session files for active phases are preserved; all other phase files must be deleted during cleanup and replaced with fresh content. - -**Verified by:** - -- Orphaned session files are deleted during generation -- Active phase session files are preserved and regenerated - -
- -
-Cleanup handles edge cases without errors (3 scenarios) - -#### Cleanup handles edge cases without errors - -**Invariant:** Cleanup must be idempotent, tolerate missing directories, and produce empty results when no phases are active. - -**Rationale:** Generator runs are not guarded by precondition checks for directory existence. Cleanup must never crash regardless of filesystem state. - -**Verified by:** - -- No active phases results in empty sessions directory -- Cleanup is idempotent -- Missing sessions directory is handled gracefully - -
- -
-Deleted files are tracked in cleanup results (1 scenarios) - -#### Deleted files are tracked in cleanup results - -**Invariant:** The cleanup result must include the relative paths of all deleted session files for transparency and debugging. - -**Verified by:** - -- Deleted files are tracked in generator output - -
+## Business Rules + +9 patterns, 36 rules with invariants (36 total) + +### ADR 001 Taxonomy Canonical Values + +| Rule | Invariant | Rationale | +| --------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Product area canonical values | The product-area tag uses one of 7 canonical values. Each value represents a reader-facing documentation section, not a source module. | Without canonical values, organic drift (e.g., Generator vs Generators) produces inconsistent grouping in generated documentation and fragmented product area pages. | +| ADR category canonical values | The adr-category tag uses one of 4 values. | Unbounded category values prevent meaningful grouping of architecture decisions and make cross-cutting queries unreliable. | +| FSM status values and protection levels | Pattern status uses exactly 4 values with defined protection levels. These are enforced by Process Guard at commit time. | Without protection levels, active specs accumulate scope creep and completed specs get silently modified, undermining delivery process integrity. | +| Valid FSM transitions | Only these transitions are valid. All others are rejected by Process Guard. | Allowing arbitrary transitions (e.g., roadmap to completed) bypasses the active phase where scope-lock and deliverable tracking provide quality assurance. Completed is a terminal state. Modifications require `@libar-docs-unlock-reason` escape hatch. | +| Tag format types | Every tag has one of 6 format types that determines how its value is parsed. | Without explicit format types, parsers must guess value structure, leading to silent data corruption when CSV values are treated as single strings or numbers are treated as text. | +| Source ownership | Relationship tags have defined ownership by source type. Anti-pattern detection enforces these boundaries. | Cross-domain tag placement (e.g., runtime dependencies in Gherkin) creates conflicting sources of truth and breaks the dual-source architecture ownership model. | +| Quarter format convention | The quarter tag uses `YYYY-QN` format (e.g., `2026-Q1`). ISO-year-first sorting works lexicographically. | Non-standard formats (e.g., Q1-2026) break lexicographic sorting, which roadmap generation and timeline queries depend on for correct ordering. | +| Canonical phase definitions (6-phase USDP standard) | The default workflow defines exactly 6 phases in fixed order. These are the canonical phase names and ordinals used by all generated documentation. | Ad-hoc phase names and ordering produce inconsistent roadmap grouping across packages and make cross-package progress tracking impossible. | +| Deliverable status canonical values | Deliverable status (distinct from pattern FSM status) uses exactly 6 values, enforced by Zod schema at parse time. | Freeform status strings bypass Zod validation and break DoD checks, which rely on terminal status classification to determine pattern completeness. | + +### ADR 002 Gherkin Only Testing + +| Rule | Invariant | Rationale | +| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Source-driven process benefit | Feature files serve as both executable specs and documentation source. This dual purpose is the primary benefit of Gherkin-only testing for this package. | Parallel `.test.ts` files create a hidden test layer invisible to the documentation pipeline, undermining the single source of truth principle this package enforces. | + +### ADR 003 Source First Pattern Architecture + +| Rule | Invariant | Rationale | +| -------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| TypeScript source owns pattern identity | A pattern is defined by `@libar-docs-pattern` in a TypeScript file — either a stub (pre-implementation) or source code (post-implementation). | If pattern identity lives in tier 1 specs, it becomes stale after implementation and diverges from the code that actually realizes the pattern. | +| Tier 1 specs are ephemeral working documents | Tier 1 roadmap specs serve planning and delivery tracking. They are not the source of truth for pattern identity, invariants, or acceptance criteria. After completion, they may be archived. | Treating tier 1 specs as durable creates a maintenance burden — at scale only 39% maintain traceability, and duplicated Rules/Scenarios average 200-400 stale lines. | +| Three durable artifact types | The delivery process produces three artifact types with long-term value. All other artifacts are projections or ephemeral. | Without a clear boundary between durable and ephemeral artifacts, teams maintain redundant documents that inevitably drift from the source of truth. | +| Implements is UML Realization (many-to-one) | `@libar-docs-implements` declares a realization relationship. Multiple files can implement the same pattern. One file can implement multiple patterns (CSV format). | Without many-to-one realization, cross-cutting patterns that span multiple files cannot be traced back to a single canonical definition. | +| Single-definition constraint | `@libar-docs-pattern:X` may appear in exactly one file across the entire codebase. The `mergePatterns()` conflict check in `orchestrator.ts` correctly enforces this. | Duplicate pattern definitions cause merge conflicts in the MasterDataset and produce ambiguous ownership in generated documentation. | +| Reverse links preferred over forward links | `@libar-docs-implements` (reverse: "I verify this pattern") is the primary traceability mechanism. `@libar-docs-executable-specs` (forward: "my tests live here") is retained but not required. | Forward links in tier 1 specs go stale when specs are archived, while reverse links in test files are self-maintaining because the test cannot run without the implementation. | + +### Cli Behavior Testing + +| Rule | Invariant | Rationale | +| ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| generate-docs handles all argument combinations correctly | Invalid arguments produce clear error messages with usage hints. Valid arguments produce expected output files. | CLI commands are the primary user-facing interface; unclear errors cause developers to bypass the tool and maintain docs manually, defeating the code-first approach. | +| lint-patterns validates annotation quality with configurable strictness | Lint violations are reported with file, line, and severity. Exit codes reflect violation presence based on strictness setting. | Without structured violation output, CI pipelines cannot distinguish lint failures from crashes, and developers cannot locate the offending annotation to fix it. | +| validate-patterns performs cross-source validation with DoD checks | DoD and anti-pattern violations are reported per phase. Exit codes reflect validation state. | Phase-level reporting is required because cross-source validation spans multiple files; a single pass/fail gives no actionable information about which phase needs attention. | +| All CLIs handle errors consistently with DocError pattern | Errors include type, file, line (when applicable), and reason. Unknown errors are caught and formatted safely. | Inconsistent error formats force consumers to write per-CLI parsing logic; a uniform DocError shape enables a single error handler across all CLI commands and CI integrations. | + +### Mvp Workflow Implementation + +| Rule | Invariant | Rationale | +| ------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| PDR-005 status values are recognized | The scanner and validation schemas must accept exactly the four PDR-005 status values: roadmap, active, completed, deferred. | Unrecognized status values silently drop patterns from generated documents, causing missing documentation across the entire monorepo. | +| Generators map statuses to documents | Each status value must route to exactly one target document: roadmap/deferred to ROADMAP.md, active to CURRENT-WORK.md, completed to CHANGELOG. | Incorrect status-to-document mapping causes patterns to appear in the wrong document or be omitted entirely, breaking the project overview for all consumers. | + +### Session File Cleanup + +| Rule | Invariant | Rationale | +| -------------------------------------------------- | --------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Cleanup triggers during session-context generation | Orphaned session files for inactive phases must be removed during session-context generation. | Stale session files mislead developers into thinking a phase is still active, causing wasted effort on completed or paused work. | +| Only phase-\*.md files are candidates for cleanup | Cleanup must only target files matching the `phase-*.md` naming convention. | Deleting non-session files (infrastructure files, manual notes) would destroy user content that cannot be regenerated. | +| Cleanup failures are non-fatal | A cleanup failure must never prevent session-context generation from completing successfully. | Cleanup is a housekeeping side-effect; blocking the primary generation workflow on a file-system error would break the developer's session for a non-critical concern. | + +### Session File Lifecycle + +| Rule | Invariant | Rationale | +| ---------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | +| Orphaned session files are removed during generation | Only session files for active phases are preserved; all other phase files must be deleted during cleanup and replaced with fresh content. | Stale session files for completed or deferred phases mislead LLMs that read the sessions directory for context, causing incorrect planning decisions. | +| Cleanup handles edge cases without errors | Cleanup must be idempotent, tolerate missing directories, and produce empty results when no phases are active. | Generator runs are not guarded by precondition checks for directory existence. Cleanup must never crash regardless of filesystem state. | +| Deleted files are tracked in cleanup results | The cleanup result must include the relative paths of all deleted session files for transparency and debugging. | Without deletion tracking, operators cannot audit what the generator removed, making it impossible to diagnose missing file issues after a run. | + +### Session Handoffs + +| Rule | Invariant | Rationale | +| ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | +| Handoff context generation captures session state | Active phases with handoff context enabled must include session handoff sections with template and checklist links. | Without structured handoff sections, LLM sessions lose context between runs and developers waste time re-discovering phase state. | +| Handoff templates and checklists contain required sections | Session handoff template and retrospective checklist must exist and contain all required sections for structured knowledge transfer. | Missing template sections cause incomplete handoffs, leading to lost context and repeated work when a new session resumes. | +| PROCESS_SETUP.md documents handoff and coordination protocols | PROCESS_SETUP.md must document both session handoff protocol and multi-developer coordination patterns. | Without a single authoritative coordination reference, parallel developers follow ad-hoc processes that cause merge conflicts and duplicated effort. | +| Edge cases and acceptance criteria ensure robustness | Handoff context must degrade gracefully when no discoveries exist and must be disableable. Mid-phase handoffs, multi-developer coordination, and retrospective capture must all preserve context. | If handoff generation crashes on empty state or cannot be disabled, it blocks unrelated generation workflows and erodes trust in the automation. | + +### Step Definition Completion + +| Rule | Invariant | Rationale | +| ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Generator-related specs need step definitions for output validation | Step definitions test actual codec output against expected structure. | Testing rendered markdown strings instead of structured codec output makes tests brittle to formatting changes that do not affect correctness. Factory functions from tests/fixtures/ should be used for test data. | +| Renderable helper specs need step definitions for utility functions | Helper functions are pure and easy to unit test. | Renderable helpers are reused across multiple codecs; untested edge cases silently corrupt generated documentation in every consumer. Step definitions should test edge cases identified in specs. | +| Remaining specs in other directories need step definitions | Every feature file in tests/features/ must have a corresponding step definition file. | Feature files without step definitions are inert documentation that silently fall out of sync with the code they describe. | +| Step definition implementation follows project patterns | All step definition files must follow the established state-management and import patterns from existing .steps.ts files. | Inconsistent step definition structure makes tests harder to review, debug, and maintain across the 10+ feature files in this deliverable. | --- diff --git a/docs-live/product-areas/VALIDATION.md b/docs-live/product-areas/VALIDATION.md index 02d8cc12..cb1f984b 100644 --- a/docs-live/product-areas/VALIDATION.md +++ b/docs-live/product-areas/VALIDATION.md @@ -35,8 +35,8 @@ C4Context System(FSMTransitions, "FSMTransitions") System(FSMStates, "FSMStates") } - System_Ext(CodecUtils, "CodecUtils") System_Ext(DoDValidationTypes, "DoDValidationTypes") + System_Ext(CodecUtils, "CodecUtils") System_Ext(DualSourceExtractor, "DualSourceExtractor") System_Ext(DetectChanges, "DetectChanges") System_Ext(DeriveProcessState, "DeriveProcessState") @@ -85,8 +85,8 @@ graph LR FSMStates[/"FSMStates"/] end subgraph related["Related"] - CodecUtils["CodecUtils"]:::neighbor DoDValidationTypes["DoDValidationTypes"]:::neighbor + CodecUtils["CodecUtils"]:::neighbor DualSourceExtractor["DualSourceExtractor"]:::neighbor DetectChanges["DetectChanges"]:::neighbor DeriveProcessState["DeriveProcessState"]:::neighbor @@ -900,2094 +900,203 @@ const missingStatus: LintRule; --- -## Behavior Specifications - -### ValidatorReadModelConsolidation - -[View ValidatorReadModelConsolidation source](delivery-process/specs/validator-read-model-consolidation.feature) - -**Problem:** -`validate-patterns.ts` is the only feature consumer that bypasses the -MasterDataset. It wires its own mini-pipeline (scan + extract + ad-hoc -matching), creates a lossy local type (`GherkinPatternInfo`) that discards -relationship data, and then fails to resolve `@libar-docs-implements` -links — producing 7 false-positive warnings. - -This is the Parallel Pipeline anti-pattern identified in ADR-006. The -validator re-derives pattern identity and cross-source matching from raw -scanner/extractor output, ignoring the relationship index that the -MasterDataset already computes with full forward and reverse edges. - -**Current violations in validate-patterns.ts (lines refer to pre-refactor):** - -| Anti-Pattern | Location | Evidence | -| Parallel Pipeline | Lines 32-35 | Imports scanPatterns, scanGherkinFiles, extractPatterns, extractProcessMetadata | -| Lossy Local Type | Lines 82-88 | GherkinPatternInfo keeps 5 of 30+ ExtractedPattern fields | -| Re-derived Relationship | Lines 373-384 | Builds Map by name-equality, cannot resolve implements links | - -**Current 7 warnings decomposed:** - -| Warning Pattern | Root Cause | Fix Category | -| ShapeExtractor | Has @libar-docs-implements ShapeExtraction — only resolvable via relationshipIndex | Relationship-blind | -| DecisionDocGenerator | Test feature DecisionDocGeneratorTesting has @libar-docs-implements:DecisionDocGenerator | Relationship-blind | -| ContentDeduplicator | Utility with @libar-docs-phase 28 but no Gherkin spec | Spurious phase tag | -| FileCache | Utility with @libar-docs-phase 27 but no Gherkin spec | Spurious phase tag | -| WarningCollector | Utility with @libar-docs-phase 28 but no Gherkin spec | Spurious phase tag | -| SourceMappingValidator | Utility with @libar-docs-phase 28 but no Gherkin spec | Spurious phase tag | -| SourceMapper | Utility with @libar-docs-phase 27 but no Gherkin spec | Spurious phase tag | - -**Solution:** -Refactor `validate-patterns.ts` to consume the MasterDataset as its -data source for cross-source validation. The validator becomes a feature -consumer like codecs and the ProcessStateAPI — querying pre-computed -views and the relationship index instead of building its own maps from -raw data. - -This eliminates: - -- `GherkinPatternInfo` (Lossy Local Type) -- `extractGherkinPatternInfo()` (duplicate extractor) -- Ad-hoc name-matching maps that miss implements relationships -- The need for any `buildImplementsLookup()` helper - -The validator retains its own validation logic (what to check, what -severity to assign). Only its data access changes — from raw state -to the read model. - -**Design Decisions:** - -DD-1: Reuse the same pipeline as process-api.ts — not a shared factory yet. -The validator will wire scan-extract-merge-transform inline, mirroring -how process-api.ts does it today (lines 490-558). Extracting a shared -pipeline factory is scoped to ProcessAPILayeredExtraction, not this spec. -This keeps the refactoring focused on data-access only. - -DD-2: The validatePatterns() function signature changes from -(tsPatterns, gherkinPatterns) to (dataset: RuntimeMasterDataset). -All cross-source matching uses dataset.patterns + dataset.relationshipIndex. -The function remains exported for testability. - -DD-3: Cross-source matching uses a two-phase approach: -Phase 1 — Build a name-based Map from dataset.patterns (same as today). -Phase 2 — For each TS pattern not matched by name, check if it appears -in any relationshipIndex entry's implementedBy array. This resolves -the ShapeExtractor and DecisionDocGenerator false positives. - -DD-4: The validator will import transformToMasterDatasetWithValidation -from generators/pipeline/index.js, plus the merge and hierarchy helpers -already used by process-api.ts. This is a temporary parallel pipeline -(acknowledged) that will be replaced when the pipeline factory exists. - -DD-5: Phase tag removal from utility patterns is a separate atomic step -done first — it reduces warnings from 7 to 2 and is independently -verifiable before touching any validator code. - -**Implementation Order:** - -| Step | What | Verification | -| 1 | Remove @libar-docs-phase from 5 utility files | pnpm build, warnings drop from 7 to 2 | -| 2 | Wire MasterDataset pipeline in main() | pnpm typecheck | -| 3 | Rewrite validatePatterns() to consume RuntimeMasterDataset | pnpm typecheck | -| 4 | Delete GherkinPatternInfo, extractGherkinPatternInfo | pnpm typecheck, pnpm test | -| 5 | Remove unused scanner/extractor imports | pnpm lint | -| 6 | Run pnpm validate:patterns — verify 0 errors, 0 warnings | Full verification | - -**Files Modified:** - -| File | Change | Lines Affected | -| src/cli/validate-patterns.ts | Major: rewrite pipeline + validatePatterns() | ~200 lines net reduction | -| src/generators/content-deduplicator.ts | Remove @libar-docs-phase 28 | Line 6 | -| src/cache/file-cache.ts | Remove @libar-docs-phase 27 | Line 5 | -| src/generators/warning-collector.ts | Remove @libar-docs-phase 28 | Line 6 | -| src/generators/source-mapping-validator.ts | Remove @libar-docs-phase 28 | Line 6 | -| src/generators/source-mapper.ts | Remove @libar-docs-phase 27 | Line 6 | - -**What does NOT change:** - -- ValidationIssue, ValidationSummary, ValidateCLIConfig interfaces (stable API) -- parseArgs(), printHelp(), formatPretty(), formatJson() (CLI shell — untouched) -- DoD validation (already consumes scanned Gherkin files directly — correct for its purpose) -- Anti-pattern detection (already consumes scanned files — correct for its purpose) -- Exit code logic (unchanged) - -
-Validator queries the read model for cross-source matching (2 scenarios) - -#### Validator queries the read model for cross-source matching - -**Invariant:** Pattern identity resolution — including implements relationships in both directions — uses `MasterDataset.relationshipIndex` rather than ad-hoc name-equality maps built from raw scanner output. - -**Rationale:** The MasterDataset computes implementedBy reverse lookups in transform-dataset.ts (second pass, lines 488-546). The validator's current name-equality Map cannot resolve ShapeExtractor -> ShapeExtraction or DecisionDocGeneratorTesting -> DecisionDocGenerator because these are implements relationships, not name matches. - -**Verified by:** - -- Implements relationships resolve in both directions -- TS pattern implementing a Gherkin spec resolves -- Implements resolve bidirectionally -- TS implementing Gherkin resolves - -
- -
-No lossy local types in the validator (1 scenarios) - -#### No lossy local types in the validator - -**Invariant:** The validator operates on `ExtractedPattern` from the MasterDataset, not a consumer-local DTO that discards fields. - -**Rationale:** GherkinPatternInfo keeps only name, phase, status, file, and deliverables — discarding uses, dependsOn, implementsPatterns, include, productArea, rules, and 20+ other fields. When the validator needs relationship data, it cannot access it through the lossy type. - -**Verified by:** - -- GherkinPatternInfo type is eliminated - -
- -
-Utility patterns without specs are not false positives (2 scenarios) - -#### Utility patterns without specs are not false positives - -**Invariant:** Internal utility patterns that have a `@libar-docs-phase` but will never have a Gherkin spec should not carry phase metadata. Phase tags signal roadmap participation. - -**Rationale:** Five utility patterns (ContentDeduplicator, FileCache, WarningCollector, SourceMappingValidator, SourceMapper) have phase tags from the phase when they were built. They are infrastructure, not roadmap features. The validator correctly reports missing Gherkin for patterns with phases — the fix is removing the phase tag, not suppressing the warning. - -**Verified by:** - -- Utility patterns do not trigger warnings -- Full validation suite passes with zero warnings - -
- -### StreamingGitDiff - -[View StreamingGitDiff source](delivery-process/specs/streaming-git-diff.feature) - -**Problem:** -The process guard (`lint-process --all`) fails with `ENOBUFS` error on large -repositories. The current implementation uses `execSync` which buffers the -entire `git diff` output in memory. When comparing against `main` in repos -with hundreds of changed files, the diff output can exceed Node.js buffer -limits (~1MB default), causing the pipe to overflow. - -This prevents using `--all` mode in CI/CD pipelines for production repositories. - -**Solution:** -Replace synchronous buffered git execution with streaming approach: - -1. Use `spawn` instead of `execSync` for git diff commands -2. Process diff output line-by-line as it streams -3. Extract status transitions and deliverable changes incrementally -4. Never hold full diff content in memory - -**Design Principles:** - -- Constant memory usage regardless of diff size -- Same validation results as current implementation -- Backward compatible - no CLI changes required -- Async/await API for streaming operations - -**Scope:** -Only `detect-changes.ts` requires modification. The `deriveProcessState` -and validation logic remain unchanged - they receive the same data structures. - -
-Git commands stream output instead of buffering (2 scenarios) - -#### Git commands stream output instead of buffering - -**Verified by:** - -- Large diff does not cause memory overflow -- Streaming produces same results as buffered - -
- -
-Diff content is parsed as it streams (2 scenarios) - -#### Diff content is parsed as it streams - -**Verified by:** - -- Status transitions detected incrementally -- Deliverable changes detected incrementally - -
- -
-Streaming errors are handled gracefully (2 scenarios) - -#### Streaming errors are handled gracefully - -**Verified by:** - -- Git command failure returns Result error -- Malformed diff lines are skipped - -
- -### StepLintVitestCucumber - -[View StepLintVitestCucumber source](delivery-process/specs/step-lint-vitest-cucumber.feature) - -**Problem:** -Hours are lost debugging vitest-cucumber-specific issues that only surface -at test runtime. These are semantic traps at the boundary between .feature -files and .steps.ts files: using {string} function params inside -ScenarioOutline (should use variables object), forgetting to destructure -the And keyword (causes StepAbleUnknowStepError), missing Rule() wrappers, and hash -comments inside description pseudo-code-blocks. All are statically -detectable but no existing linter catches them. - -**Solution:** -A dedicated lint-steps CLI that statically analyzes .feature and .steps.ts -files for vitest-cucumber compatibility. Three check categories: - -- Feature-only: hash-in-description, duplicate-and-step, dollar-in-step-text -- Step-only: regex-step-pattern, unsupported-phrase-type -- Cross-file: scenario-outline-function-params, missing-and-destructuring, - missing-rule-wrapper - -Reuses LintViolation/LintSummary from the existing lint engine for -consistent output formatting. Regex-based scanning (no TypeScript AST -needed). Feature-to-step pairing via loadFeature() path extraction. - -
-Hash comments inside description pseudo-code-blocks are detected (3 scenarios) - -#### Hash comments inside description pseudo-code-blocks are detected - -**Invariant:** A # at the start of a line inside a """ block within a Feature or Rule description terminates the description context, because the Gherkin parser treats # as a comment even inside descriptions. The """ delimiters in descriptions are NOT real DocStrings. - -**Rationale:** This is the most confusing Gherkin parser trap. Authors embed code examples using """ and expect # comments to be protected. The resulting parse error gives no hint about the actual cause. - -**Verified by:** - -- Hash inside description pseudo-code-block is flagged -- Hash in step DocString is not flagged -- Section separator comments are not flagged - -
- -
-Duplicate And steps in the same scenario are detected (2 scenarios) - -#### Duplicate And steps in the same scenario are detected - -**Invariant:** Multiple And steps with identical text in the same scenario cause vitest-cucumber step matching failures. The fix is to consolidate into a single step with a DataTable. - -**Verified by:** - -- Duplicate And step text is flagged -- Same And text in different scenarios is allowed - -
- -
-Dollar sign in step text is detected (1 scenarios) - -#### Dollar sign in step text is detected - -**Invariant:** The $ character in step text causes matching issues in vitest-cucumber's expression parser. - -**Verified by:** - -- Dollar in step text produces warning - -
- -
-Regex step patterns are detected (1 scenarios) - -#### Regex step patterns are detected - -**Invariant:** vitest-cucumber only supports string patterns with {string} and {int}. Regex patterns throw StepAbleStepExpressionError. - -**Verified by:** - -- Regex pattern in Given is flagged - -
- -
-Unsupported phrase type is detected (1 scenarios) - -#### Unsupported phrase type is detected - -**Invariant:** vitest-cucumber does not support {phrase}. Use {string} with quoted values in the feature file. - -**Verified by:** - -- Phrase type in step string is flagged - -
- -
-ScenarioOutline function params are detected (2 scenarios) - -#### ScenarioOutline function params are detected - -**Invariant:** ScenarioOutline step callbacks must use the variables object, not function params. Using (\_ctx, value: string) means value will be undefined at runtime. - -**Verified by:** - -- Function params in ScenarioOutline are flagged -- Function params in regular Scenario are not flagged - -
- -
-Missing And destructuring is detected (2 scenarios) - -#### Missing And destructuring is detected - -**Invariant:** If a feature file has And steps, the step definition must destructure And from the scenario callback. - -**Verified by:** - -- Missing And destructuring is flagged -- Present And destructuring passes - -
- -
-Missing Rule wrapper is detected (2 scenarios) - -#### Missing Rule wrapper is detected - -**Invariant:** If a feature file has Rule: blocks, the step definition must destructure Rule from describeFeature. - -**Verified by:** - -- Missing Rule wrapper is flagged -- Present Rule wrapper passes - -
- -
-Feature-to-step pairing resolves both loadFeature patterns (2 scenarios) - -#### Feature-to-step pairing resolves both loadFeature patterns - -**Invariant:** Step files use two loadFeature patterns: simple string paths and resolve(\_\_dirname, relative) paths. Both must be paired. - -**Verified by:** - -- Simple loadFeature path is paired -- Resolve-based loadFeature path is paired - -
- -### StepLintExtendedRules - -[View StepLintExtendedRules source](delivery-process/specs/step-lint-extended-rules.feature) - -**Problem:** -The initial lint-steps CLI catches 8 vitest-cucumber traps, but 4 documented -traps from \_claude-md/testing/vitest-cucumber.md remain uncovered: - -- Hash in step text (mid-line) truncates the step at runtime -- Feature descriptions starting with Given/When/Then break the parser -- Scenario Outline steps using quoted values (the feature-file side of the - Two-Pattern Problem — the step-file side is already caught) -- Repeated identical step patterns in the same scenario overwrite registrations - -These cause cryptic runtime failures that are statically detectable. - -**Solution:** -Extend lint-steps with 4 new rules using the same pure-function architecture. -Two are feature-only checks, one is a step-only check, and one is a -cross-file check. All reuse the existing LintViolation/LintSummary types -and integrate into the existing runner pipeline. - -| New Rule | Category | Severity | Trap Caught | -| hash-in-step-text | feature-only | warning | Mid-line hash in step text interpreted as Gherkin comment | -| keyword-in-description | feature-only | error | Description line starting with Given/When/Then breaks parser | -| outline-quoted-values | cross-file | warning | Scenario Outline feature steps with quoted values suggest wrong pattern | -| repeated-step-pattern | step-only | error | Same step pattern registered twice in one scenario block | - -
-Hash in step text is detected (2 scenarios) - -#### Hash in step text is detected - -**Invariant:** A hash character in the middle of a Gherkin step line can be interpreted as a comment by some parsers, silently truncating the step text. This differs from hash-in-description (which catches hash inside description pseudo-code-blocks). - -**Rationale:** We encountered this exact trap while writing the lint-steps test suite. Step text like "Given a file with # inside" was silently truncated to "Given a file with". - -**Verified by:** - -- Hash in step text produces warning -- Hash at start of comment line is not flagged - -
- -
-Gherkin keywords in description text are detected (2 scenarios) - -#### Gherkin keywords in description text are detected - -**Invariant:** A Feature or Rule description line that starts with Given, When, Then, And, or But breaks the Gherkin parser because it interprets the line as a step definition rather than description text. - -**Rationale:** This is documented in vitest-cucumber quirks but has no static detection. Authors writing natural language descriptions accidentally start sentences with these keywords. - -**Verified by:** - -- Description starting with Given is flagged -- Step lines with Given are not flagged - -
- -
-Scenario Outline steps with quoted values are detected (2 scenarios) - -#### Scenario Outline steps with quoted values are detected - -**Invariant:** When a feature file has a Scenario Outline and its steps use quoted values instead of angle-bracket placeholders, this indicates the author may be using the Scenario pattern (function params) instead of the ScenarioOutline pattern (variables object). This is the feature-file side of the Two-Pattern Problem. - -**Rationale:** The existing scenario-outline-function-params rule catches the step-file side. This rule catches the feature-file side where quoted values in Scenario Outline steps suggest the author expects Cucumber expression matching rather than variable substitution. - -**Verified by:** - -- Outline step with quoted value produces warning -- Outline step with angle bracket is not flagged - -
- -
-Repeated step patterns in the same scenario are detected (2 scenarios) - -#### Repeated step patterns in the same scenario are detected - -**Invariant:** Registering the same step pattern twice in one Scenario block causes vitest-cucumber to overwrite the first registration. Only the last callback runs, causing silent test failures where assertions appear to pass but the setup was wrong. - -**Rationale:** This happens when authors copy-paste step definitions within a scenario and forget to change the pattern. The failure is silent — tests pass but with wrong assertions. - -**Verified by:** - -- Duplicate Given pattern in one scenario is flagged -- Same pattern in different scenarios is not flagged - -
- -### StatusAwareEslintSuppression - -[View StatusAwareEslintSuppression source](delivery-process/specs/status-aware-eslint-suppression.feature) - -**Problem:** -Design artifacts (code stubs with `@libar-docs-status roadmap`) intentionally have unused -exports that define API shapes before implementation. Current workaround uses directory-based -ESLint exclusions which: - -- Don't account for status transitions (roadmap -> active -> completed) -- Create tech debt when implementations land (exclusions persist) -- Require manual maintenance as files move between statuses - -**Solution:** -Extend the Process Guard Linter infrastructure with an ESLint integration that: - -1. Reads `@libar-docs-status` from file-level JSDoc comments -2. Maps status to protection level using existing `deriveProcessState()` -3. Generates dynamic ESLint configuration or filters messages at runtime -4. Removes the need for directory-based exclusions entirely - -**Why It Matters:** -| Benefit | How | -| Automatic lifecycle handling | Files graduating from roadmap to completed automatically get strict linting | -| Zero maintenance | No manual exclusion updates when files change status | -| Consistency with Process Guard | Same status extraction logic, same protection level mapping | -| Tech debt elimination | Removes ~20 lines of directory-based exclusions from eslint.config.js | - -
-File status determines unused-vars enforcement (3 scenarios) - -#### File status determines unused-vars enforcement - -**Invariant:** Files with `@libar-docs-status roadmap` or `deferred` have relaxed unused-vars rules. Files with `active`, `completed`, or no status have strict enforcement. - -**Rationale:** Design artifacts (roadmap stubs) define API shapes that are intentionally unused until implementation. Relaxing rules for these files prevents false positives while ensuring implemented code (active/completed) remains strictly checked. - -| Status | Protection Level | unused-vars Behavior | -| ----------- | ---------------- | --------------------------- | -| roadmap | none | Relaxed (warn, ignore args) | -| deferred | none | Relaxed (warn, ignore args) | -| active | scope | Strict (error) | -| complete | hard | Strict (error) | -| (no status) | N/A | Strict (error) | - -**Verified by:** - -- Roadmap file has relaxed unused-vars rules -- Completed file has strict unused-vars rules -- File without status tag has strict rules -- Roadmap file has relaxed rules -- Completed file has strict rules -- No status file has strict rules - -
- -
-Reuses deriveProcessState for status extraction (2 scenarios) - -#### Reuses deriveProcessState for status extraction - -**Invariant:** Status extraction logic must be shared with Process Guard Linter. No duplicate parsing or status-to-protection mapping. - -**Rationale:** DRY principle - the Process Guard already has battle-tested status extraction from JSDoc comments. Duplicating this logic creates maintenance burden and potential inconsistencies between tools. - -**Current State:** - - **Target State:** - -```typescript -// Process Guard already has this: -import { deriveProcessState } from '../lint/process-guard/index.js'; - -const state = await deriveProcessState(ctx, files); -// state.files.get(path).protection -> "none" | "scope" | "hard" -``` - -```typescript -// ESLint integration reuses the same logic: -import { getFileProtectionLevel } from '../lint/process-guard/index.js'; - -const protection = getFileProtectionLevel(filePath); -// protection === "none" -> relax unused-vars -// protection === "scope" | "hard" -> strict unused-vars -``` - -**Verified by:** - -- Protection level matches Process Guard derivation -- Status-to-protection mapping is consistent -- Protection level from Process Guard -- Consistent status mapping - -
- -
-ESLint Processor filters messages based on status (3 scenarios) - -#### ESLint Processor filters messages based on status - -**Invariant:** The processor uses ESLint's postprocess hook to filter or downgrade messages. Source code is never modified. No eslint-disable comments are injected. - -**Rationale:** ESLint processors can inspect and filter linting messages after rules run. This approach: - Requires no source code modification - Works with any ESLint rule (not just no-unused-vars) - Can be extended to other status-based behaviors - -**Verified by:** - -- Processor filters messages in postprocess -- No source code modification occurs -- Non-relaxed rules pass through unchanged -- Processor filters in postprocess -- No source modification - -
- -
-CLI can generate static ESLint ignore list (2 scenarios) - -#### CLI can generate static ESLint ignore list - -**Invariant:** Running `pnpm lint:process --eslint-ignores` outputs a list of files that should have relaxed linting, suitable for inclusion in eslint.config.js. - -**Rationale:** For CI environments or users preferring static configuration, a generated list provides an alternative to runtime processing. The list can be regenerated whenever status annotations change. - -**Verified by:** - -- CLI generates ESLint ignore file list -- JSON output mode for programmatic consumption -- CLI generates file list -- List includes only relaxed files - -
- -
-Replaces directory-based ESLint exclusions (2 scenarios) - -#### Replaces directory-based ESLint exclusions - -**Invariant:** After implementation, the directory-based exclusions in eslint.config.js (lines 30-57) are removed. All suppression is driven by @libar-docs-status annotations. - -**Rationale:** Directory-based exclusions are tech debt: - They don't account for file lifecycle (roadmap -> completed) - They require manual updates when new roadmap directories are added - They persist even after files are implemented - -**Current State (to be removed):** - - **Target State:** - -```javascript -// eslint.config.js - directory-based exclusions pattern - { - files: [ - "**/delivery-process/stubs/**", - // ... patterns for roadmap/deferred files - ], - rules: { - "@typescript-eslint/no-unused-vars": ["warn", { args: "none" }], - }, - } -``` - -```javascript -// eslint.config.js - import { statusAwareProcessor } from "@libar-dev/delivery-process/eslint"; - - { - files: ["**/*.ts", "**/*.tsx"], - processor: statusAwareProcessor, - // OR use generated ignore list: - // files: [...generatedRoadmapFiles], - } -``` - -**Verified by:** - -- Directory exclusions are removed after migration -- Existing roadmap files still pass lint -- Directory exclusions removed -- Processor integration added - -
- -
-Rule relaxation is configurable (2 scenarios) - -#### Rule relaxation is configurable - -**Invariant:** The set of rules relaxed for roadmap/deferred files is configurable, defaulting to `@typescript-eslint/no-unused-vars`. - -**Rationale:** Different projects may want to relax different rules for design artifacts. The default covers the common case (unused exports in API stubs). - -**Verified by:** - -- Default configuration relaxes no-unused-vars -- Custom rules can be configured for relaxation -- Default rules are relaxed -- Custom rules can be configured - -
- -### ReleaseAssociationRules - -[View ReleaseAssociationRules source](delivery-process/specs/release-association-rules.feature) - -**Problem:** -PDR-002 and PDR-003 define conventions for separating specs from release -metadata, but there's no automated enforcement. Spec files may -inadvertently include release columns, and TypeScript phase files may -have incorrect structure. - -**Solution:** -Implement validation rules for: - -- Spec file compliance (no release columns in DataTables) -- TypeScript phase file structure -- Cross-reference validation (spec references exist) -- Release version format (semver pattern) - -
-Spec files must not contain release columns (2 scenarios) - -#### Spec files must not contain release columns - -**Verified by:** - -- Spec with release column is rejected -- Spec without release column passes - -
- -
-TypeScript phase files must have required annotations (2 scenarios) - -#### TypeScript phase files must have required annotations - -**Verified by:** - -- Phase file with missing required annotations -- Phase file required annotations - -
- -
-Release version follows semantic versioning (1 scenarios) - -#### Release version follows semantic versioning - -**Verified by:** - -- Valid release version formats - -
- -### ProgressiveGovernance - -[View ProgressiveGovernance source](delivery-process/specs/progressive-governance.feature) - -**Problem:** -Enterprise governance patterns applied everywhere create overhead. -Simple utility patterns don't need risk tables and stakeholder approvals. -No way to filter views by governance level. - -**Solution:** -Enable governance as a lens, not a mandate: - -- Default: Lightweight (no risk/compliance tags required) -- Opt-in: Rich governance for high-risk patterns only - -Use risk metadata to: - -- Filter roadmap views by risk level -- Require additional metadata only for high-risk patterns -- Generate risk-focused dashboards when requested - -Implements Convergence Opportunity 6: Progressive Governance. - -Note: This is lower priority because simple --filter "risk=high" on -existing generators achieves 80% of the value. This phase adds polish. - -### ProcessGuardLinter - -[View ProcessGuardLinter source](delivery-process/specs/process-guard-linter.feature) - -**Problem:** -During planning and implementation sessions, accidental modifications occur: - -- Specs outside the intended scope get modified in bulk -- Completed/approved work gets inadvertently changed -- No enforcement boundary between "planning what to do" and "doing it" - -The delivery process has implicit states (planning, implementing) but no -programmatic guard preventing invalid state transitions or out-of-scope changes. - -**Solution:** -Implement a Decider-based linter that: - -1. Derives process state from existing file annotations (no separate state file) -2. Validates proposed changes (git diff) against derived state -3. Enforces file protection levels per PDR-005 state machine -4. Supports explicit session scoping via session definition files -5. Protects taxonomy from changes that would break protected specs - -**Design Principles:** - -- State is derived from annotations, not maintained separately -- Decider logic is pure (no I/O), enabling unit testing -- Integrates with existing lint infrastructure (`lint-process.ts`) -- Warnings for soft rules, errors for hard rules -- Escape hatch via `@libar-docs-unlock-reason` annotation - -**Relationship to PDR-005:** -Uses the phase-state-machine FSM as protection levels: - -- `roadmap`: Fully editable, no restrictions (planning phase) -- `active`: Scope-locked, errors on new deliverables (work in progress) -- `completed`: Hard-locked, requires explicit unlock to modify -- `deferred`: Fully editable, no restrictions (parked work) - -
-Protection levels determine modification restrictions (4 scenarios) - -#### Protection levels determine modification restrictions - -Files inherit protection from their `@libar-docs-status` tag. Higher -protection levels require explicit unlock to modify. - -**Verified by:** - -- Protection level from status -- Completed file modification without unlock fails -- Completed file modification with unlock passes -- Active file modification is allowed but scope-locked - -
- -
-Session definition files scope what can be modified (4 scenarios) - -#### Session definition files scope what can be modified - -Optional session files (`delivery-process/sessions/*.feature`) explicitly -declare which specs are in-scope for modification during a work session. -If active, modifications outside scope trigger warnings or errors. - -**Verified by:** - -- Session file defines modification scope -- Modifying spec outside active session scope warns -- Modifying explicitly excluded spec fails -- No active session allows all modifications - -
- -
-Status transitions follow PDR-005 FSM (2 scenarios) - -#### Status transitions follow PDR-005 FSM - -Status changes in a file must follow a valid transition per PDR-005. -This extends phase-state-machine.feature to the linter context. - -**Verified by:** - -- Valid status transitions -- Invalid status transitions - -
- -
-Active specs cannot add new deliverables (3 scenarios) - -#### Active specs cannot add new deliverables - -Once a spec transitions to `active`, its deliverables table is -considered scope-locked. Adding new rows indicates scope creep. - -**Verified by:** - -- Adding deliverable to active spec fails -- Updating deliverable status in active spec passes -- Removing deliverable from active spec warns - -
- -
-CLI provides flexible validation modes (5 scenarios) - -#### CLI provides flexible validation modes - -**Verified by:** - -- Validate staged changes (pre-commit default) -- Validate all tracked files -- Show derived state for debugging -- Strict mode treats warnings as errors -- Ignore session flag bypasses session rules - -
- -
-Integrates with existing lint infrastructure (2 scenarios) - -#### Integrates with existing lint infrastructure - -**Verified by:** - -- Output format matches lint-patterns -- Can run alongside lint-patterns - -
- -
-New tags support process guard functionality (2 scenarios) - -#### New tags support process guard functionality - -The following tags are defined in the TypeScript taxonomy to support process guard: - -**Verified by:** - -- Session-related tags are recognized -- Protection-related tags are recognized - -
- -### PhaseStateMachineValidation - -[View PhaseStateMachineValidation source](delivery-process/specs/phase-state-machine.feature) - -**Problem:** -Phase lifecycle state transitions are not enforced programmatically despite being documented in PROCESS_SETUP.md. -Invalid transitions can occur silently, leading to inconsistent process state. - -**Solution:** -Implement state machine validation that: - -- Validates all status transitions -- Enforces required metadata for terminal states -- Provides clear error messages for invalid transitions -- Integrates with generators and linters - -
-Valid status values are enforced (2 scenarios) - -#### Valid status values are enforced - -**Verified by:** - -- Only valid status values are accepted -- Invalid status values are rejected - -
- -
-Status transitions follow state machine rules (2 scenarios) - -#### Status transitions follow state machine rules - -**Verified by:** - -- Valid transitions are allowed -- Invalid transitions are rejected - -
- -
-Terminal states require completion metadata (2 scenarios) - -#### Terminal states require completion metadata - -**Verified by:** - -- Completed status requires completion date -- Completed phases should have effort-actual - -
- -### PhaseNumberingConventions - -[View PhaseNumberingConventions source](delivery-process/specs/phase-numbering-conventions.feature) - -**Problem:** -Phase numbers are assigned manually without validation, leading to -potential conflicts (duplicate numbers), gaps that confuse ordering, -and inconsistent conventions across sources. - -**Solution:** -Define and validate phase numbering conventions: - -- Unique phase numbers per release version -- Gap detection and warnings -- Cross-source consistency validation -- Suggested next phase number - -
-Phase numbers must be unique within a release (2 scenarios) - -#### Phase numbers must be unique within a release - -**Verified by:** - -- Duplicate phase numbers are detected -- Same phase number in different releases is allowed - -
- -
-Phase number gaps are detected (2 scenarios) - -#### Phase number gaps are detected - -**Verified by:** - -- Large gaps trigger warnings -- Small gaps are acceptable - -
- -
-CLI suggests next available phase number (1 scenarios) - -#### CLI suggests next available phase number - -**Verified by:** - -- Suggest next phase number - -
- -### DoDValidation - -[View DoDValidation source](delivery-process/specs/dod-validation.feature) - -**Problem:** -Phase completion is currently subjective ("done when we feel it"). -No objective criteria validation, easy to miss deliverables. -Cannot gate CI/releases on DoD compliance. - -**Solution:** -Implement `pnpm validate:dod --phase N` CLI command that: - -- Checks all deliverables have status "Complete"/"Done" -- Verifies at least one @acceptance-criteria scenario exists -- Warns if effort-actual is missing for completed phases -- Returns exit code for CI gating - -Implements Convergence Opportunity 2: DoD as Machine-Checkable. - -See: docs/ideation-convergence/01-delivery-process-opportunities.md - -### LintRuleIndividualTesting - -[View LintRuleIndividualTesting source](tests/features/lint/lint-rules-individual.feature) - -Individual lint rules that check parsed directives for completeness. -Tests presence/absence checks: pattern name, status, whenToUse, and relationships. - -
-Files must declare an explicit pattern name (5 scenarios) - -#### Files must declare an explicit pattern name - -**Invariant:** Every annotated file must have a non-empty patternName to be identifiable in the registry. - -**Rationale:** Without a pattern name, the file cannot be tracked, linked, or referenced in generated documentation. - -**Verified by:** - -- Detect missing pattern name -- Detect empty string pattern name -- Detect whitespace-only pattern name -- Accept valid pattern name -- Include file and line in violation - -
- -
-Files should declare a lifecycle status (5 scenarios) - -#### Files should declare a lifecycle status - -**Invariant:** Every annotated file should have a status tag to track its position in the delivery lifecycle. - -**Rationale:** Missing status prevents FSM validation and roadmap tracking. - -**Verified by:** - -- Detect missing status -- Accept completed status -- Accept active status -- Accept roadmap status -- Accept deferred status - -
- -
-Files should document when to use the pattern (3 scenarios) - -#### Files should document when to use the pattern - -**Invariant:** Annotated files should include whenToUse guidance so consumers know when to apply the pattern. - -**Rationale:** Without usage guidance, patterns become undiscoverable despite being documented. - -**Verified by:** - -- Detect missing whenToUse -- Detect empty whenToUse array -- Accept whenToUse with content - -
- -
-Files should declare relationship tags (5 scenarios) - -#### Files should declare relationship tags - -**Invariant:** Annotated files should declare uses or usedBy relationships to enable dependency tracking and architecture diagrams. - -**Rationale:** Isolated patterns without relationships produce diagrams with no edges and prevent dependency analysis. - -**Verified by:** - -- Detect missing relationship tags -- Detect empty uses array -- Accept uses with content -- Accept usedBy with content -- Accept both uses and usedBy - -
- -### LintRuleAdvancedTesting - -[View LintRuleAdvancedTesting source](tests/features/lint/lint-rules-advanced.feature) - -Complex lint rule logic and collection-level behavior. -Tests tautological description detection, default collection, and severity filtering. - -
-Descriptions must not repeat the pattern name (9 scenarios) - -#### Descriptions must not repeat the pattern name - -**Invariant:** A description that merely echoes the pattern name adds no value and must be rejected. - -**Rationale:** Tautological descriptions waste reader attention and indicate missing documentation effort. - -**Verified by:** - -- Detect description that equals pattern name -- Detect description that is pattern name with punctuation -- Detect short description starting with pattern name -- Accept description with substantial content after name -- Accept meaningfully different description -- Ignore empty descriptions -- Ignore missing pattern name -- Skip headings when finding first line -- Skip "When to use" sections when finding first line - -
- -
-Default rules collection is complete and well-ordered (4 scenarios) - -#### Default rules collection is complete and well-ordered - -**Invariant:** The default rules collection must contain all defined rules with unique IDs, ordered by severity (errors first). - -**Rationale:** A complete, ordered collection ensures no rule is silently dropped and severity-based filtering works correctly. - -**Verified by:** - -- Default rules contains all 8 rules -- Default rules have unique IDs -- Default rules are ordered by severity -- Default rules include all named rules - -
- -
-Rules can be filtered by minimum severity (3 scenarios) - -#### Rules can be filtered by minimum severity - -**Invariant:** Filtering by severity must return only rules at or above the specified level. - -**Rationale:** CI pipelines need to control which violations block merges vs. which are advisory. - -**Verified by:** - -- Filter returns all rules for info severity -- Filter excludes info rules for warning severity -- Filter returns only errors for error severity - -
- -### LintEngineTesting - -[View LintEngineTesting source](tests/features/lint/lint-engine.feature) - -The lint engine orchestrates rule execution, aggregates violations, -and formats output for human and machine consumption. - -The engine provides: - -- Single directive linting -- Multi-file batch linting -- Failure detection (with strict mode) -- Violation sorting -- Pretty and JSON output formats - -
-Single directive linting validates annotations against rules (4 scenarios) - -#### Single directive linting validates annotations against rules - -**Invariant:** Every directive is checked against all provided rules and violations include source location. - -**Verified by:** - -- Return empty array when all rules pass -- Return violations for failing rules -- Run all provided rules -- Include correct file and line in violations - -
- -
-Multi-file batch linting aggregates results across files (4 scenarios) - -#### Multi-file batch linting aggregates results across files - -**Invariant:** All files and directives are scanned, violations are collected per file, and severity counts are accurate. - -**Verified by:** - -- Return empty results for clean files -- Collect violations by file -- Count violations by severity -- Handle multiple directives per file - -
- -
-Failure detection respects strict mode for severity escalation (5 scenarios) - -#### Failure detection respects strict mode for severity escalation - -**Invariant:** Errors always indicate failure. Warnings only indicate failure in strict mode. Info never indicates failure. - -**Verified by:** - -- Return true when there are errors -- Return false for warnings only in non-strict mode -- Return true for warnings in strict mode -- Return false for info only -- Return false when no violations - -
- -
-Violation sorting orders by severity then by line number (3 scenarios) - -#### Violation sorting orders by severity then by line number - -**Invariant:** Sorted output places errors first, then warnings, then info, with stable line-number ordering within each severity. Sorting does not mutate the original array. - -**Verified by:** - -- Sort errors first then warnings then info -- Sort by line number within same severity -- Not mutate original array - -
- -
-Pretty formatting produces human-readable output with severity counts (4 scenarios) - -#### Pretty formatting produces human-readable output with severity counts - -**Invariant:** Pretty output includes file paths, line numbers, severity labels, rule IDs, and summary counts. Quiet mode suppresses non-error violations. - -**Verified by:** - -- Show success message when no violations -- Format violations with file line severity and message -- Show summary line with counts -- Filter out warnings and info in quiet mode - -
- -
-JSON formatting produces machine-readable output with full details (3 scenarios) - -#### JSON formatting produces machine-readable output with full details - -**Invariant:** JSON output is valid, includes all summary fields, and preserves violation details including file, line, severity, rule, and message. - -**Verified by:** - -- Return valid JSON -- Include all summary fields -- Include violation details - -
- -### StatusTransitionDetectionTesting - -[View StatusTransitionDetectionTesting source](tests/features/validation/status-transition-detection.feature) - -Tests for the detectStatusTransitions function that parses git diff output. -Verifies that status tags inside docstrings are ignored and only file-level -tags are used for FSM transition validation. - -
-Status transitions are detected from file-level tags (3 scenarios) - -#### Status transitions are detected from file-level tags - -**Invariant:** Status transitions must be detected by comparing @libar-docs-status tags at the file level between the old and new versions of a file. - -**Rationale:** File-level tags are the canonical source of pattern status — detecting transitions from tags ensures consistency with the FSM validator. - -**Verified by:** - -- New file with status tag is detected as transition from roadmap -- Modified file with status change is detected -- No transition when status unchanged - -
- -
-Status tags inside docstrings are ignored (3 scenarios) - -#### Status tags inside docstrings are ignored - -**Invariant:** Status tags appearing inside Gherkin docstring blocks (between triple-quote delimiters) must not be treated as real status declarations. - -**Rationale:** Docstrings often contain example code or documentation showing status tags — parsing these as real would cause phantom status transitions. - -**Verified by:** - -- Status tag inside docstring is not used for transition -- Multiple docstring status tags are all ignored -- Only docstring status tags results in no transition - -
- -
-First valid status tag outside docstrings is used (1 scenarios) - -#### First valid status tag outside docstrings is used - -**Invariant:** When multiple status tags appear outside docstrings, only the first one determines the file's status. - -**Rationale:** A single canonical status per file prevents ambiguity — using the first tag matches Gherkin convention where file-level tags appear at the top. - -**Verified by:** - -- First file-level tag wins over subsequent tags - -
- -
-Line numbers are tracked from hunk headers (1 scenarios) - -#### Line numbers are tracked from hunk headers - -**Invariant:** Detected status transitions must include the line number where the status tag appears, derived from git diff hunk headers. - -**Rationale:** Line numbers enable precise error reporting — developers need to know exactly where in the file the transition was detected. - -**Verified by:** - -- Transition location includes correct line number - -
- -
-Generated documentation directories are excluded (2 scenarios) - -#### Generated documentation directories are excluded - -**Invariant:** Files in generated documentation directories (docs-generated/, docs-living/) must be excluded from status transition detection. - -**Rationale:** Generated files are projections of source files — detecting transitions in them would produce duplicate violations and false positives. - -**Verified by:** - -- Status in docs-generated directory is ignored -- Status in docs-living directory is ignored - -
- -### ProcessGuardTesting - -[View ProcessGuardTesting source](tests/features/validation/process-guard.feature) - -Pure validation functions for enforcing delivery process rules per PDR-005. -All validation follows the Decider pattern: (state, changes, options) => result. - -**Problem:** - -- Completed specs modified without explicit unlock reason -- Invalid status transitions bypass FSM rules -- Active specs expand scope unexpectedly with new deliverables -- Changes occur outside session boundaries - -**Solution:** - -- checkProtectionLevel() enforces unlock-reason for completed (hard) files -- checkStatusTransitions() validates transitions against FSM matrix -- checkScopeCreep() prevents deliverable addition to active (scope) specs -- checkSessionScope() warns about files outside session scope -- checkSessionExcluded() errors on explicitly excluded files - -
-Completed files require unlock-reason to modify (4 scenarios) - -#### Completed files require unlock-reason to modify - -**Invariant:** A completed spec file cannot be modified unless it carries an @libar-docs-unlock-reason tag. - -**Rationale:** Completed work represents validated, shipped functionality — accidental modification risks regression. - -**Verified by:** - -- Completed file with unlock-reason passes validation -- Completed file without unlock-reason fails validation -- Protection levels and unlock requirement -- File transitioning to completed does not require unlock-reason - -
- -
-Status transitions must follow PDR-005 FSM (2 scenarios) - -#### Status transitions must follow PDR-005 FSM - -**Invariant:** Status changes must follow the directed graph: roadmap->active->completed, roadmap<->deferred, active->roadmap. - -**Rationale:** The FSM prevents skipping required stages (e.g., roadmap->completed bypasses implementation). - -**Verified by:** - -- Valid transitions pass validation -- Invalid transitions fail validation - -
- -
-Active specs cannot add new deliverables (6 scenarios) - -#### Active specs cannot add new deliverables - -**Invariant:** A spec in active status cannot have deliverables added that were not present when it entered active. - -**Rationale:** Scope-locking active work prevents mid-sprint scope creep that derails delivery commitments. - -**Verified by:** - -- Active spec with no deliverable changes passes -- Active spec adding deliverable fails validation -- Roadmap spec can add deliverables freely -- Removing deliverable produces warning -- Deliverable status change does not trigger scope-creep -- Multiple deliverable status changes pass validation - -
- -
-Files outside active session scope trigger warnings (4 scenarios) - -#### Files outside active session scope trigger warnings - -**Invariant:** Files modified outside the active session's declared scope produce a session-scope warning. - -**Rationale:** Session scoping keeps focus on planned work and makes accidental cross-cutting changes visible. - -**Verified by:** - -- File in session scope passes validation -- File outside session scope triggers warning -- No active session means all files in scope -- ignoreSession flag suppresses session warnings - -
- -
-Explicitly excluded files trigger errors (3 scenarios) - -#### Explicitly excluded files trigger errors - -**Invariant:** Files explicitly excluded from a session cannot be modified, producing a session-excluded error. - -**Rationale:** Exclusion is stronger than scope — it marks files that must NOT be touched during this session. - -**Verified by:** - -- Excluded file triggers error -- Non-excluded file passes validation -- ignoreSession flag suppresses excluded errors - -
- -
-Multiple rules validate independently (3 scenarios) - -#### Multiple rules validate independently - -**Invariant:** Each validation rule evaluates independently — a single file can produce violations from multiple rules. - -**Rationale:** Independent evaluation ensures no rule masks another, giving complete diagnostic output. - -**Verified by:** - -- Multiple violations from different rules -- Strict mode promotes warnings to errors -- Clean change produces empty violations - -
- -### FSMValidatorTesting - -[View FSMValidatorTesting source](tests/features/validation/fsm-validator.feature) - -Pure validation functions for the 4-state FSM defined in PDR-005. -All validation follows the Decider pattern: no I/O, no side effects. - -**Problem:** - -- Status values must conform to PDR-005 FSM states -- Status transitions must follow valid paths in the state machine -- Completed patterns should have proper metadata (date, effort) - -**Solution:** - -- validateStatus() checks status values against allowed enum -- validateTransition() validates transitions against FSM matrix -- validateCompletionMetadata() warns about missing completion info - -
-Status values must be valid PDR-005 FSM states (3 scenarios) - -#### Status values must be valid PDR-005 FSM states - -**Invariant:** Every pattern status value must be one of the states defined in the PDR-005 finite state machine (roadmap, active, completed, deferred). - -**Rationale:** Invalid status values bypass FSM transition validation and produce undefined behavior in process guard enforcement. - -**Verified by:** - -- Valid status values are accepted -- Invalid status values are rejected -- Terminal state returns warning - -
- -
-Status transitions must follow FSM rules (5 scenarios) - -#### Status transitions must follow FSM rules - -**Invariant:** Every status change must follow a valid edge in the PDR-005 state machine graph — no skipping states or invalid paths. - -**Rationale:** The FSM encodes the delivery workflow contract — invalid transitions indicate process violations that could corrupt delivery tracking. - -**Verified by:** - -- Valid transitions are accepted -- Invalid transitions are rejected with alternatives -- Terminal state has no valid transitions -- Invalid source status in transition -- Invalid target status in transition - -
- -
-Completed patterns should have proper metadata (4 scenarios) - -#### Completed patterns should have proper metadata - -**Invariant:** Patterns in completed status must carry completion date and actual effort metadata to pass validation without warnings. - -**Rationale:** Completion metadata enables retrospective analysis and effort estimation — missing metadata degrades project planning accuracy over time. - -**Verified by:** - -- Completed pattern with full metadata has no warnings -- Completed pattern without date shows warning -- Completed pattern with planned but no actual effort shows warning -- Non-completed pattern skips metadata validation - -
- -
-Protection levels match FSM state definitions (4 scenarios) - -#### Protection levels match FSM state definitions - -**Invariant:** Each FSM state must map to exactly one protection level (none, scope-locked, or hard-locked) as defined in PDR-005. - -**Rationale:** Protection levels enforce edit constraints per state — mismatched protection would allow prohibited modifications to active or completed specs. - -**Verified by:** - -- Roadmap status has no protection -- Active status has scope protection -- Completed status has hard protection -- Deferred status has no protection - -
- -
-Combined validation provides complete results (1 scenarios) - -#### Combined validation provides complete results - -**Invariant:** The FSM validator must return a combined result including status validity, transition validity, metadata warnings, and protection level in a single call. - -**Rationale:** Callers need a complete validation picture — requiring multiple separate calls risks partial validation and inconsistent error reporting. - -**Verified by:** - -- Valid completed pattern returns combined results - -
- -### DoDValidatorTesting - -[View DoDValidatorTesting source](tests/features/validation/dod-validator.feature) - -Validates that completed phases meet Definition of Done criteria: - -1. All deliverables must have "complete" status -2. At least one @acceptance-criteria scenario must exist - -**Problem:** - -- Phases marked "completed" without all deliverables done -- Missing acceptance criteria means no BDD tests -- Manual review burden without automated validation - -**Solution:** - -- isDeliverableComplete() detects completion via status patterns -- hasAcceptanceCriteria() checks for AC scenarios -- validateDoDForPhase() validates single phase -- validateDoD() validates across multiple phases -- formatDoDSummary() renders console-friendly output - -
-Deliverable completion uses canonical status taxonomy (2 scenarios) - -#### Deliverable completion uses canonical status taxonomy - -**Invariant:** Deliverable completion status must be determined exclusively using the 6 canonical values from the deliverable status taxonomy. - -**Rationale:** Freeform status strings bypass schema validation and produce inconsistent completion tracking across the monorepo. - -**Verified by:** - -- Complete status is detected as complete -- Non-complete canonical statuses are correctly identified - -
- -
-Acceptance criteria must be tagged with @acceptance-criteria (3 scenarios) - -#### Acceptance criteria must be tagged with @acceptance-criteria - -**Invariant:** Every completed pattern must have at least one scenario tagged with @acceptance-criteria in its feature file. - -**Rationale:** Without explicit acceptance criteria tags, there is no machine-verifiable proof that the delivered work meets its requirements. - -**Verified by:** - -- Feature with @acceptance-criteria scenario passes -- Feature without @acceptance-criteria fails -- Tag matching is case-insensitive - -
- -
-Acceptance criteria scenarios can be extracted by name (2 scenarios) - -#### Acceptance criteria scenarios can be extracted by name - -**Invariant:** The validator must be able to extract scenario names from @acceptance-criteria-tagged scenarios for reporting. - -**Rationale:** Extracted names appear in traceability reports and DoD summaries, providing an audit trail from requirement to verification. - -**Verified by:** - -- Extract multiple AC scenario names -- No AC scenarios returns empty list - -
- -
-DoD requires all deliverables complete and AC present (4 scenarios) - -#### DoD requires all deliverables complete and AC present - -**Invariant:** A pattern passes Definition of Done only when ALL deliverables have complete status AND at least one @acceptance-criteria scenario exists. - -**Rationale:** Partial completion or missing acceptance criteria means the pattern is not verified — marking it complete would bypass quality gates. - -**Verified by:** - -- Phase with all deliverables complete and AC passes -- Phase with incomplete deliverables fails -- Phase without acceptance criteria fails -- Phase without deliverables fails - -
- -
-DoD can be validated across multiple completed phases (4 scenarios) - -#### DoD can be validated across multiple completed phases - -**Invariant:** DoD validation must evaluate all completed phases independently and report per-phase pass/fail results. - -**Rationale:** Multi-phase patterns need granular validation — a single aggregate result would hide which specific phase failed its Definition of Done. - -**Verified by:** - -- All completed phases passing DoD -- Mixed pass/fail results -- Only completed phases are validated by default -- Filter to specific phases - -
- -
-Summary can be formatted for console output (3 scenarios) - -#### Summary can be formatted for console output - -**Invariant:** DoD validation results must be renderable as structured console output showing phase-level pass/fail details. - -**Rationale:** Developers need immediate, actionable feedback during pre-commit validation — raw data structures are not human-readable. - -**Verified by:** - -- Empty summary shows no completed phases message -- Summary with passed phases shows details -- Summary with failed phases shows details - -
- -### DetectChangesTesting - -[View DetectChangesTesting source](tests/features/validation/detect-changes.feature) - -Tests for the detectDeliverableChanges function that parses git diff output. -Verifies that status changes are correctly identified as modifications, -not as additions or removals. - -
-Status changes are detected as modifications not additions (2 scenarios) - -#### Status changes are detected as modifications not additions - -**Invariant:** When a deliverable's status value changes between versions, the change detector must classify it as a modification, not an addition or removal. - -**Rationale:** Correct change classification drives scope-creep detection — misclassifying a status change as an addition would trigger false scope-creep violations on active specs. - -**Verified by:** - -- Single deliverable status change is detected as modification -- Multiple deliverable status changes are all modifications - -
- -
-New deliverables are detected as additions (1 scenarios) - -#### New deliverables are detected as additions - -**Invariant:** Deliverables present in the new version but absent in the old version must be classified as additions. - -**Rationale:** Addition detection powers the scope-creep rule — new deliverables added to active specs must be flagged as violations. - -**Verified by:** - -- New deliverable is detected as addition - -
- -
-Removed deliverables are detected as removals (1 scenarios) - -#### Removed deliverables are detected as removals - -**Invariant:** Deliverables present in the old version but absent in the new version must be classified as removals. - -**Rationale:** Removal detection enables the deliverable-removed warning — silently dropping deliverables could hide incomplete work. - -**Verified by:** - -- Removed deliverable is detected as removal - -
- -
-Mixed changes are correctly categorized (1 scenarios) - -#### Mixed changes are correctly categorized - -**Invariant:** When a single diff contains additions, removals, and modifications simultaneously, each change must be independently categorized. - -**Rationale:** Real-world commits often contain mixed changes — incorrect categorization of any single change cascades into wrong validation decisions. - -**Verified by:** - -- Mixed additions, removals, and modifications are handled correctly -- Mixed additions -- removals -- and modifications are handled correctly - -
- -
-Non-deliverable tables are ignored (1 scenarios) - -#### Non-deliverable tables are ignored - -**Invariant:** Changes to non-deliverable tables (e.g., ScenarioOutline Examples tables) must not be detected as deliverable changes. - -**Rationale:** Feature files contain many table structures — only the Background deliverables table is semantically relevant to process guard validation. - -**Verified by:** - -- Changes in Examples tables are not detected as deliverable changes - -
- -### ConfigSchemaValidation - -[View ConfigSchemaValidation source](tests/features/validation/config-schemas.feature) - -Configuration schemas validate scanner and generator inputs with security -constraints to prevent path traversal attacks and ensure safe file operations. - -**Security focus:** - -- Parent directory traversal (..) is blocked in glob patterns -- Output directories must be within project bounds -- Registry files must be .json format -- Symlink bypass attempts are prevented - -
-ScannerConfigSchema validates scanner configuration (7 scenarios) - -#### ScannerConfigSchema validates scanner configuration - -**Invariant:** Scanner configuration must contain at least one valid glob pattern with no parent directory traversal, and baseDir must resolve to an absolute path. - -**Rationale:** Malformed or malicious glob patterns could scan outside project boundaries, exposing sensitive files. - -**Verified by:** - -- ScannerConfigSchema validates correct configuration -- ScannerConfigSchema accepts multiple patterns -- ScannerConfigSchema rejects empty patterns array -- ScannerConfigSchema rejects parent traversal in patterns -- ScannerConfigSchema rejects hidden parent traversal -- ScannerConfigSchema normalizes baseDir to absolute path -- ScannerConfigSchema accepts optional exclude patterns - -
- -
-GeneratorConfigSchema validates generator configuration (6 scenarios) - -#### GeneratorConfigSchema validates generator configuration - -**Invariant:** Generator configuration must use a .json registry file and an output directory that does not escape the project root via parent traversal. - -**Rationale:** Non-JSON registry files could introduce parsing vulnerabilities, and unrestricted output paths could overwrite files outside the project. - -**Verified by:** - -- GeneratorConfigSchema validates correct configuration -- GeneratorConfigSchema requires .json registry file -- GeneratorConfigSchema rejects outputDir with parent traversal -- GeneratorConfigSchema accepts relative output directory -- GeneratorConfigSchema defaults overwrite to false -- GeneratorConfigSchema defaults readmeOnly to false - -
- -
-isScannerConfig type guard narrows unknown values (4 scenarios) - -#### isScannerConfig type guard narrows unknown values - -**Invariant:** isScannerConfig returns true only for objects that have a non-empty patterns array and a string baseDir. - -**Verified by:** - -- isScannerConfig returns true for valid config -- isScannerConfig returns false for invalid config -- isScannerConfig returns false for null -- isScannerConfig returns false for non-object - -
- -
-isGeneratorConfig type guard narrows unknown values (3 scenarios) - -#### isGeneratorConfig type guard narrows unknown values - -**Invariant:** isGeneratorConfig returns true only for objects that have a string outputDir and a .json registryPath. - -**Verified by:** - -- isGeneratorConfig returns true for valid config -- isGeneratorConfig returns false for invalid config -- isGeneratorConfig returns false for non-json registry - -
- -### AntiPatternDetectorTesting - -[View AntiPatternDetectorTesting source](tests/features/validation/anti-patterns.feature) - -Detects violations of the dual-source documentation architecture and -process hygiene issues that lead to documentation drift. - -**Problem:** - -- Dependencies in features (should be code-only) cause drift -- Process metadata in code (should be features-only) violates separation -- Generator hints in features create tight coupling -- Large feature files are hard to maintain - -**Solution:** - -- detectProcessInCode() finds feature-only tags in code -- detectMagicComments() finds generator hints in features -- detectScenarioBloat() warns about too many scenarios -- detectMegaFeature() warns about large feature files - -
-Process metadata should not appear in TypeScript code (2 scenarios) - -#### Process metadata should not appear in TypeScript code - -**Invariant:** Process metadata tags (@libar-docs-status, @libar-docs-phase, etc.) must only appear in Gherkin feature files, never in TypeScript source code. - -**Rationale:** TypeScript owns runtime behavior while Gherkin owns delivery process metadata — mixing them creates dual-source conflicts and validation ambiguity. - -**Verified by:** - -- Code without process tags passes -- Feature-only process tags in code are flagged - -
- -
-Generator hints should not appear in feature files (3 scenarios) - -#### Generator hints should not appear in feature files - -**Invariant:** Feature files must not contain generator magic comments beyond a configurable threshold. - -**Rationale:** Generator hints are implementation details that belong in TypeScript — excessive magic comments in specs indicate leaking implementation concerns into business requirements. - -**Verified by:** - -- Feature without magic comments passes -- Features with excessive magic comments are flagged -- Magic comments within threshold pass - -
- -
-Feature files should not have excessive scenarios (2 scenarios) - -#### Feature files should not have excessive scenarios - -**Invariant:** A single feature file must not exceed the configured maximum scenario count. - -**Rationale:** Oversized feature files indicate missing decomposition — they become hard to maintain and slow to execute. - -**Verified by:** - -- Feature with few scenarios passes -- Feature exceeding scenario threshold is flagged - -
- -
-Feature files should not exceed size thresholds (2 scenarios) - -#### Feature files should not exceed size thresholds - -**Invariant:** A single feature file must not exceed the configured maximum line count. - -**Rationale:** Excessively large files indicate a feature that should be split into focused, independently testable specifications. - -**Verified by:** - -- Normal-sized feature passes -- Oversized feature is flagged - -
- -
-All anti-patterns can be detected in one pass (1 scenarios) - -#### All anti-patterns can be detected in one pass - -**Invariant:** The anti-pattern detector must evaluate all registered rules in a single scan pass over the source files. - -**Rationale:** Single-pass detection ensures consistent results and avoids O(n\*m) performance degradation with multiple file traversals. - -**Verified by:** - -- Combined detection finds process-in-code issues - -
- -
-Violations can be formatted for console output (2 scenarios) - -#### Violations can be formatted for console output - -**Invariant:** Anti-pattern violations must be renderable as grouped, human-readable console output. - -**Rationale:** Developers need actionable feedback at commit time — ungrouped or unformatted violations are hard to triage and fix. - -**Verified by:** - -- Empty violations produce clean report -- Violations are grouped by severity - -
- -### LinterValidationTesting - -[View LinterValidationTesting source](tests/features/behavior/pattern-relationships/linter-validation.feature) - -Tests for lint rules that validate relationship integrity, detect conflicts, -and ensure bidirectional traceability consistency. - -
-Pattern cannot implement itself (circular reference) (2 scenarios) - -#### Pattern cannot implement itself (circular reference) - -**Invariant:** A pattern's implements tag must reference a different pattern than its own pattern tag. - -**Rationale:** Self-implementing patterns create circular references that break the sub-pattern hierarchy. - -**Verified by:** - -- Pattern tag with implements tag causes error -- Implements without pattern tag is valid -- Implements without pattern tag is valid - - A file cannot define a pattern that implements itself. This creates a - circular reference. Different patterns are allowed (sub-pattern hierarchy). - -
- -
-Relationship targets should exist (strict mode) (3 scenarios) - -#### Relationship targets should exist (strict mode) - -**Invariant:** Every relationship target must reference a pattern that exists in the known pattern registry when strict mode is enabled. - -**Rationale:** Dangling references to non-existent patterns produce broken dependency graphs and misleading documentation. - -**Verified by:** - -- Uses referencing non-existent pattern warns -- Implements referencing non-existent pattern warns -- Valid relationship target passes -- Valid relationship target passes - - In strict mode - -- all relationship targets are validated against known patterns. - -
- -
-Bidirectional traceability links should be consistent (2 scenarios) - -#### Bidirectional traceability links should be consistent - -**Invariant:** Every forward traceability link (executable-specs, roadmap-spec) must have a corresponding back-link in the target file. - -**Rationale:** Asymmetric links mean one side of the traceability chain is invisible, defeating the purpose of bidirectional tracing. - -**Verified by:** - -- Missing back-link detected -- Orphan executable spec detected - -
- -
-Parent references must be valid (2 scenarios) - -#### Parent references must be valid - -**Invariant:** A pattern's parent reference must point to an existing epic pattern in the registry. - -**Verified by:** - -- Invalid parent reference detected -- Valid parent reference passes - -
+## Business Rules + +20 patterns, 95 rules with invariants (95 total) + +### Anti Pattern Detector Testing + +| Rule | Invariant | Rationale | +| ----------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Process metadata should not appear in TypeScript code | Process metadata tags (@libar-docs-status, @libar-docs-phase, etc.) must only appear in Gherkin feature files, never in TypeScript source code. | TypeScript owns runtime behavior while Gherkin owns delivery process metadata — mixing them creates dual-source conflicts and validation ambiguity. | +| Generator hints should not appear in feature files | Feature files must not contain generator magic comments beyond a configurable threshold. | Generator hints are implementation details that belong in TypeScript — excessive magic comments in specs indicate leaking implementation concerns into business requirements. | +| Feature files should not have excessive scenarios | A single feature file must not exceed the configured maximum scenario count. | Oversized feature files indicate missing decomposition — they become hard to maintain and slow to execute. | +| Feature files should not exceed size thresholds | A single feature file must not exceed the configured maximum line count. | Excessively large files indicate a feature that should be split into focused, independently testable specifications. | +| All anti-patterns can be detected in one pass | The anti-pattern detector must evaluate all registered rules in a single scan pass over the source files. | Single-pass detection ensures consistent results and avoids O(n\*m) performance degradation with multiple file traversals. | +| Violations can be formatted for console output | Anti-pattern violations must be renderable as grouped, human-readable console output. | Developers need actionable feedback at commit time — ungrouped or unformatted violations are hard to triage and fix. | + +### Config Schema Validation + +| Rule | Invariant | Rationale | +| ------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| ScannerConfigSchema validates scanner configuration | Scanner configuration must contain at least one valid glob pattern with no parent directory traversal, and baseDir must resolve to an absolute path. | Malformed or malicious glob patterns could scan outside project boundaries, exposing sensitive files. | +| GeneratorConfigSchema validates generator configuration | Generator configuration must use a .json registry file and an output directory that does not escape the project root via parent traversal. | Non-JSON registry files could introduce parsing vulnerabilities, and unrestricted output paths could overwrite files outside the project. | +| isScannerConfig type guard narrows unknown values | isScannerConfig returns true only for objects that have a non-empty patterns array and a string baseDir. | Without a reliable type guard, callers cannot safely narrow unknown config objects and risk accessing properties on incompatible types at runtime. | +| isGeneratorConfig type guard narrows unknown values | isGeneratorConfig returns true only for objects that have a string outputDir and a .json registryPath. | Without a reliable type guard, callers cannot safely narrow unknown config objects and risk passing malformed generator configs that bypass schema validation. | + +### Detect Changes Testing + +| Rule | Invariant | Rationale | +| ---------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Status changes are detected as modifications not additions | When a deliverable's status value changes between versions, the change detector must classify it as a modification, not an addition or removal. | Correct change classification drives scope-creep detection — misclassifying a status change as an addition would trigger false scope-creep violations on active specs. | +| New deliverables are detected as additions | Deliverables present in the new version but absent in the old version must be classified as additions. | Addition detection powers the scope-creep rule — new deliverables added to active specs must be flagged as violations. | +| Removed deliverables are detected as removals | Deliverables present in the old version but absent in the new version must be classified as removals. | Removal detection enables the deliverable-removed warning — silently dropping deliverables could hide incomplete work. | +| Mixed changes are correctly categorized | When a single diff contains additions, removals, and modifications simultaneously, each change must be independently categorized. | Real-world commits often contain mixed changes — incorrect categorization of any single change cascades into wrong validation decisions. | +| Non-deliverable tables are ignored | Changes to non-deliverable tables (e.g., ScenarioOutline Examples tables) must not be detected as deliverable changes. | Feature files contain many table structures — only the Background deliverables table is semantically relevant to process guard validation. | + +### DoD Validator Testing + +| Rule | Invariant | Rationale | +| ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------- | +| Deliverable completion uses canonical status taxonomy | Deliverable completion status must be determined exclusively using the 6 canonical values from the deliverable status taxonomy. | Freeform status strings bypass schema validation and produce inconsistent completion tracking across the monorepo. | +| Acceptance criteria must be tagged with @acceptance-criteria | Every completed pattern must have at least one scenario tagged with @acceptance-criteria in its feature file. | Without explicit acceptance criteria tags, there is no machine-verifiable proof that the delivered work meets its requirements. | +| Acceptance criteria scenarios can be extracted by name | The validator must be able to extract scenario names from @acceptance-criteria-tagged scenarios for reporting. | Extracted names appear in traceability reports and DoD summaries, providing an audit trail from requirement to verification. | +| DoD requires all deliverables complete and AC present | A pattern passes Definition of Done only when ALL deliverables have complete status AND at least one @acceptance-criteria scenario exists. | Partial completion or missing acceptance criteria means the pattern is not verified — marking it complete would bypass quality gates. | +| DoD can be validated across multiple completed phases | DoD validation must evaluate all completed phases independently and report per-phase pass/fail results. | Multi-phase patterns need granular validation — a single aggregate result would hide which specific phase failed its Definition of Done. | +| Summary can be formatted for console output | DoD validation results must be renderable as structured console output showing phase-level pass/fail details. | Developers need immediate, actionable feedback during pre-commit validation — raw data structures are not human-readable. | + +### FSM Validator Testing + +| Rule | Invariant | Rationale | +| ---------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | +| Status values must be valid PDR-005 FSM states | Every pattern status value must be one of the states defined in the PDR-005 finite state machine (roadmap, active, completed, deferred). | Invalid status values bypass FSM transition validation and produce undefined behavior in process guard enforcement. | +| Status transitions must follow FSM rules | Every status change must follow a valid edge in the PDR-005 state machine graph — no skipping states or invalid paths. | The FSM encodes the delivery workflow contract — invalid transitions indicate process violations that could corrupt delivery tracking. | +| Completed patterns should have proper metadata | Patterns in completed status must carry completion date and actual effort metadata to pass validation without warnings. | Completion metadata enables retrospective analysis and effort estimation — missing metadata degrades project planning accuracy over time. | +| Protection levels match FSM state definitions | Each FSM state must map to exactly one protection level (none, scope-locked, or hard-locked) as defined in PDR-005. | Protection levels enforce edit constraints per state — mismatched protection would allow prohibited modifications to active or completed specs. | +| Combined validation provides complete results | The FSM validator must return a combined result including status validity, transition validity, metadata warnings, and protection level in a single call. | Callers need a complete validation picture — requiring multiple separate calls risks partial validation and inconsistent error reporting. | + +### Lint Engine Testing + +| Rule | Invariant | Rationale | +| --------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Single directive linting validates annotations against rules | Every directive is checked against all provided rules and violations include source location. | Skipping rules or omitting source locations makes violations unactionable, as developers cannot locate or understand the issue. | +| Multi-file batch linting aggregates results across files | All files and directives are scanned, violations are collected per file, and severity counts are accurate. | Missing files or inaccurate severity counts cause silent rule violations in CI and undermine trust in the linting pipeline. | +| Failure detection respects strict mode for severity escalation | Errors always indicate failure. Warnings only indicate failure in strict mode. Info never indicates failure. | Without correct severity-to-exit-code mapping, CI pipelines either miss real errors or block on informational messages, eroding developer trust in the linter. | +| Violation sorting orders by severity then by line number | Sorted output places errors first, then warnings, then info, with stable line-number ordering within each severity. Sorting does not mutate the original array. | Unsorted output forces developers to manually scan for critical errors among lower-severity noise, and mutating the original array would break callers that hold a reference to it. | +| Pretty formatting produces human-readable output with severity counts | Pretty output includes file paths, line numbers, severity labels, rule IDs, and summary counts. Quiet mode suppresses non-error violations. | Incomplete formatting (missing file paths or line numbers) prevents developers from navigating directly to violations, and noisy output in quiet mode defeats its purpose. | +| JSON formatting produces machine-readable output with full details | JSON output is valid, includes all summary fields, and preserves violation details including file, line, severity, rule, and message. | Machine consumers (CI pipelines, IDE integrations) depend on valid JSON with complete fields; missing or malformed output breaks automated tooling downstream. | + +### Linter Validation Testing + +| Rule | Invariant | Rationale | +| ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | +| Pattern cannot implement itself (circular reference) | A pattern's implements tag must reference a different pattern than its own pattern tag. | Self-implementing patterns create circular references that break the sub-pattern hierarchy. | +| Relationship targets should exist (strict mode) | Every relationship target must reference a pattern that exists in the known pattern registry when strict mode is enabled. | Dangling references to non-existent patterns produce broken dependency graphs and misleading documentation. | +| Bidirectional traceability links should be consistent | Every forward traceability link (executable-specs, roadmap-spec) must have a corresponding back-link in the target file. | Asymmetric links mean one side of the traceability chain is invisible, defeating the purpose of bidirectional tracing. | +| Parent references must be valid | A pattern's parent reference must point to an existing epic pattern in the registry. | Dangling parent references break the epic-to-pattern hierarchy, causing patterns to appear orphaned in roadmap views and losing rollup visibility. | + +### Lint Rule Advanced Testing + +| Rule | Invariant | Rationale | +| ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | +| Descriptions must not repeat the pattern name | A description that merely echoes the pattern name adds no value and must be rejected. | Tautological descriptions waste reader attention and indicate missing documentation effort. | +| Default rules collection is complete and well-ordered | The default rules collection must contain all defined rules with unique IDs, ordered by severity (errors first). | A complete, ordered collection ensures no rule is silently dropped and severity-based filtering works correctly. | +| Rules can be filtered by minimum severity | Filtering by severity must return only rules at or above the specified level. | CI pipelines need to control which violations block merges vs. which are advisory. | + +### Lint Rule Individual Testing + +| Rule | Invariant | Rationale | +| --------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | +| Files must declare an explicit pattern name | Every annotated file must have a non-empty patternName to be identifiable in the registry. | Without a pattern name, the file cannot be tracked, linked, or referenced in generated documentation. | +| Files should declare a lifecycle status | Every annotated file should have a status tag to track its position in the delivery lifecycle. | Missing status prevents FSM validation and roadmap tracking. | +| Files should document when to use the pattern | Annotated files should include whenToUse guidance so consumers know when to apply the pattern. | Without usage guidance, patterns become undiscoverable despite being documented. | +| Files should declare relationship tags | Annotated files should declare uses or usedBy relationships to enable dependency tracking and architecture diagrams. | Isolated patterns without relationships produce diagrams with no edges and prevent dependency analysis. | + +### Phase Numbering Conventions + +| Rule | Invariant | Rationale | +| --------------------------------------------- | ------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | +| Phase numbers must be unique within a release | No two specs within the same release version may share the same phase number. | Duplicate phase numbers create ambiguous ordering, causing unpredictable generation output and incorrect roadmap sequencing. | +| Phase number gaps are detected | Large gaps in the phase number sequence must produce warnings during validation. | Undetected gaps signal accidentally skipped or orphaned specs, leading to misleading roadmap progress and hidden incomplete work. | +| CLI suggests next available phase number | The suggested phase number must not conflict with any existing phase in the target release. | Without automated suggestion, authors manually guess the next number, frequently picking duplicates that are only caught later at validation time. | + +### Phase State Machine Validation + +| Rule | Invariant | Rationale | +| --------------------------------------------- | ----------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| Valid status values are enforced | Phase status must be one of the four canonical values: roadmap, active, completed, or deferred. | Freeform status strings bypass FSM transition enforcement and produce undefined behavior in downstream generators and validators. | +| Status transitions follow state machine rules | Every status transition must follow a permitted edge in the FSM transition matrix. | Skipping states (e.g., roadmap to completed) breaks scope-lock enforcement and allows incomplete deliverables to reach terminal status. | +| Terminal states require completion metadata | Phases reaching completed status must carry a completion date and actual effort tag. | Without completion metadata, effort variance tracking and timeline reporting produce gaps that undermine delivery process visibility. | + +### Process Guard Linter + +| Rule | Invariant | Rationale | +| ----------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Protection levels determine modification restrictions | Every file's modification restrictions are determined solely by its `@libar-docs-status` tag, with `completed` requiring an explicit unlock reason for any change. | Without status-derived protection, completed and approved work can be silently overwritten by bulk edits or accidental modifications. Files inherit protection from their `@libar-docs-status` tag. Higher protection levels require explicit unlock to modify. | +| Session definition files scope what can be modified | When an active session exists, only specs explicitly listed in the session definition may be modified without warning, and excluded specs cannot be modified at all. | Without session scoping, bulk operations and context switches cause unintended modifications to specs outside the current work focus. Optional session files (`delivery-process/sessions/*.feature`) explicitly declare which specs are in-scope for modification during a work session. If active, modifications outside scope trigger warnings or errors. | +| Status transitions follow PDR-005 FSM | Every status change must follow a valid edge in the PDR-005 finite state machine; no transition may skip intermediate states. | Skipping states (e.g., `roadmap` directly to `completed`) bypasses scope-locking and review gates, allowing incomplete work to be marked as done. Status changes in a file must follow a valid transition per PDR-005. This extends phase-state-machine.feature to the linter context. | +| Active specs cannot add new deliverables | The deliverables table of an `active` spec is immutable with respect to new rows; only existing deliverable statuses may change. | Adding deliverables after work has begun constitutes scope creep, undermining effort estimates and blocking completion. Once a spec transitions to `active`, its deliverables table is considered scope-locked. Adding new rows indicates scope creep. | +| CLI provides flexible validation modes | The CLI must support both pre-commit (staged-only) and CI (all-files) validation modes with deterministic exit codes reflecting violation severity. | Without flexible modes, teams cannot integrate process guard into both local developer workflows and CI pipelines with appropriate strictness levels. | +| Integrates with existing lint infrastructure | Process guard output format and exit code semantics must be consistent with the existing `lint-patterns` tool. | Inconsistent output formats force consumers to maintain separate parsers, and inconsistent exit codes break combined lint pipelines. | +| New tags support process guard functionality | Session and protection tags must be registered in the TypeScript taxonomy with defined formats before use in feature files. | Unregistered tags bypass schema validation and are silently ignored by the scanner, causing process guard rules to fail without diagnostics. The following tags are defined in the TypeScript taxonomy to support process guard: | + +### Process Guard Testing + +| Rule | Invariant | Rationale | +| --------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | +| Completed files require unlock-reason to modify | A completed spec file cannot be modified unless it carries an @libar-docs-unlock-reason tag. | Completed work represents validated, shipped functionality — accidental modification risks regression. | +| Status transitions must follow PDR-005 FSM | Status changes must follow the directed graph: roadmap->active->completed, roadmap<->deferred, active->roadmap. | The FSM prevents skipping required stages (e.g., roadmap->completed bypasses implementation). | +| Active specs cannot add new deliverables | A spec in active status cannot have deliverables added that were not present when it entered active. | Scope-locking active work prevents mid-sprint scope creep that derails delivery commitments. | +| Files outside active session scope trigger warnings | Files modified outside the active session's declared scope produce a session-scope warning. | Session scoping keeps focus on planned work and makes accidental cross-cutting changes visible. | +| Explicitly excluded files trigger errors | Files explicitly excluded from a session cannot be modified, producing a session-excluded error. | Exclusion is stronger than scope — it marks files that must NOT be touched during this session. | +| Multiple rules validate independently | Each validation rule evaluates independently — a single file can produce violations from multiple rules. | Independent evaluation ensures no rule masks another, giving complete diagnostic output. | + +### Release Association Rules + +| Rule | Invariant | Rationale | +| ----------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | +| Spec files must not contain release columns | Spec file DataTables must never include a Release column; release metadata belongs exclusively in phase files. | Mixing release metadata into specs couples planning artifacts to release timing, violating the separation defined by PDR-003. | +| TypeScript phase files must have required annotations | Every TypeScript phase file must include @libar-docs-pattern, @libar-docs-phase, and @libar-docs-status annotations. | Missing required annotations cause phase files to be invisible to the scanner, producing incomplete roadmap projections and broken cross-references. | +| Release version follows semantic versioning | All release version identifiers must conform to the `vX.Y.Z` semantic versioning format. | Non-semver version strings break downstream tooling that relies on version ordering and comparison for release planning. | + +### Status Aware Eslint Suppression + +| Rule | Invariant | Rationale | +| ------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| File status determines unused-vars enforcement | Files with `@libar-docs-status roadmap` or `deferred` have relaxed unused-vars rules. Files with `active`, `completed`, or no status have strict enforcement. | Design artifacts (roadmap stubs) define API shapes that are intentionally unused until implementation. Relaxing rules for these files prevents false positives while ensuring implemented code (active/completed) remains strictly checked. | +| Reuses deriveProcessState for status extraction | Status extraction logic must be shared with Process Guard Linter. No duplicate parsing or status-to-protection mapping. | DRY principle - the Process Guard already has battle-tested status extraction from JSDoc comments. Duplicating this logic creates maintenance burden and potential inconsistencies between tools. | +| ESLint Processor filters messages based on status | The processor uses ESLint's postprocess hook to filter or downgrade messages. Source code is never modified. No eslint-disable comments are injected. | ESLint processors can inspect and filter linting messages after rules run. This approach: - Requires no source code modification - Works with any ESLint rule (not just no-unused-vars) - Can be extended to other status-based behaviors | +| CLI can generate static ESLint ignore list | Running `pnpm lint:process --eslint-ignores` outputs a list of files that should have relaxed linting, suitable for inclusion in eslint.config.js. | For CI environments or users preferring static configuration, a generated list provides an alternative to runtime processing. The list can be regenerated whenever status annotations change. | +| Replaces directory-based ESLint exclusions | After implementation, the directory-based exclusions in eslint.config.js (lines 30-57) are removed. All suppression is driven by @libar-docs-status annotations. | Directory-based exclusions are tech debt: - They don't account for file lifecycle (roadmap -> completed) - They require manual updates when new roadmap directories are added - They persist even after files are implemented | +| Rule relaxation is configurable | The set of rules relaxed for roadmap/deferred files is configurable, defaulting to `@typescript-eslint/no-unused-vars`. | Different projects may want to relax different rules for design artifacts. The default covers the common case (unused exports in API stubs). | + +### Status Transition Detection Testing + +| Rule | Invariant | Rationale | +| ---------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | +| Status transitions are detected from file-level tags | Status transitions must be detected by comparing @libar-docs-status tags at the file level between the old and new versions of a file. | File-level tags are the canonical source of pattern status — detecting transitions from tags ensures consistency with the FSM validator. | +| Status tags inside docstrings are ignored | Status tags appearing inside Gherkin docstring blocks (between triple-quote delimiters) must not be treated as real status declarations. | Docstrings often contain example code or documentation showing status tags — parsing these as real would cause phantom status transitions. | +| First valid status tag outside docstrings is used | When multiple status tags appear outside docstrings, only the first one determines the file's status. | A single canonical status per file prevents ambiguity — using the first tag matches Gherkin convention where file-level tags appear at the top. | +| Line numbers are tracked from hunk headers | Detected status transitions must include the line number where the status tag appears, derived from git diff hunk headers. | Line numbers enable precise error reporting — developers need to know exactly where in the file the transition was detected. | +| Generated documentation directories are excluded | Files in generated documentation directories (docs-generated/, docs-living/) must be excluded from status transition detection. | Generated files are projections of source files — detecting transitions in them would produce duplicate violations and false positives. | + +### Step Lint Extended Rules + +| Rule | Invariant | Rationale | +| -------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Hash in step text is detected | A hash character in the middle of a Gherkin step line can be interpreted as a comment by some parsers, silently truncating the step text. This differs from hash-in-description (which catches hash inside description pseudo-code-blocks). | We encountered this exact trap while writing the lint-steps test suite. Step text like "Given a file with # inside" was silently truncated to "Given a file with". | +| Gherkin keywords in description text are detected | A Feature or Rule description line that starts with Given, When, Then, And, or But breaks the Gherkin parser because it interprets the line as a step definition rather than description text. | This is documented in vitest-cucumber quirks but has no static detection. Authors writing natural language descriptions accidentally start sentences with these keywords. | +| Scenario Outline steps with quoted values are detected | When a feature file has a Scenario Outline and its steps use quoted values instead of angle-bracket placeholders, this indicates the author may be using the Scenario pattern (function params) instead of the ScenarioOutline pattern (variables object). This is the feature-file side of the Two-Pattern Problem. | The existing scenario-outline-function-params rule catches the step-file side. This rule catches the feature-file side where quoted values in Scenario Outline steps suggest the author expects Cucumber expression matching rather than variable substitution. | +| Repeated step patterns in the same scenario are detected | Registering the same step pattern twice in one Scenario block causes vitest-cucumber to overwrite the first registration. Only the last callback runs, causing silent test failures where assertions appear to pass but the setup was wrong. | This happens when authors copy-paste step definitions within a scenario and forget to change the pattern. The failure is silent — tests pass but with wrong assertions. | + +### Step Lint Vitest Cucumber + +| Rule | Invariant | Rationale | +| ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Hash comments inside description pseudo-code-blocks are detected | A # at the start of a line inside a """ block within a Feature or Rule description terminates the description context, because the Gherkin parser treats # as a comment even inside descriptions. The """ delimiters in descriptions are NOT real DocStrings. | This is the most confusing Gherkin parser trap. Authors embed code examples using """ and expect # comments to be protected. The resulting parse error gives no hint about the actual cause. | +| Duplicate And steps in the same scenario are detected | Multiple And steps with identical text in the same scenario cause vitest-cucumber step matching failures. The fix is to consolidate into a single step with a DataTable. | Duplicate step text silently overwrites step registrations, causing the second And to match the first handler and produce wrong or undefined behavior at runtime. | +| Dollar sign in step text is detected | The $ character in step text causes matching issues in vitest-cucumber's expression parser. | The dollar sign is interpreted as a special character in expression parsing, causing steps to silently fail to match and producing confusing StepAbleUnknowStepError messages. | +| Regex step patterns are detected | vitest-cucumber only supports string patterns with {string} and {int}. Regex patterns throw StepAbleStepExpressionError. | Regex patterns are a common Cucumber.js habit that compiles without error but throws at runtime in vitest-cucumber, wasting debugging time. | +| Unsupported phrase type is detected | vitest-cucumber does not support {phrase}. Use {string} with quoted values in the feature file. | The {phrase} type is valid in standard Cucumber but unsupported in vitest-cucumber, causing silent parameter capture failures that are difficult to trace. | +| ScenarioOutline function params are detected | ScenarioOutline step callbacks must use the variables object, not function params. Using (\_ctx, value: string) means value will be undefined at runtime. | This is the most common vitest-cucumber trap. Function params compile and even type-check, but the values are always undefined at runtime because ScenarioOutline injects data through the variables object, not positional arguments. | +| Missing And destructuring is detected | If a feature file has And steps, the step definition must destructure And from the scenario callback. | Without destructuring And, vitest-cucumber cannot bind And steps and throws StepAbleUnknowStepError at runtime with no indication that a missing destructure is the cause. | +| Missing Rule wrapper is detected | If a feature file has Rule: blocks, the step definition must destructure Rule from describeFeature. | Without the Rule() wrapper, scenarios inside Rule: blocks are invisible to vitest-cucumber and silently never execute, giving a false green test suite. | +| Feature-to-step pairing resolves both loadFeature patterns | Step files use two loadFeature patterns: simple string paths and resolve(\_\_dirname, relative) paths. Both must be paired. | Unpaired feature files cannot be cross-checked for compatibility issues, leaving ScenarioOutline param misuse and missing destructures undetected. | + +### Streaming Git Diff + +| Rule | Invariant | Rationale | +| ----------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| Git commands stream output instead of buffering | Git diff output must be consumed as a stream with constant memory usage, never buffered entirely in memory. | Buffering full diff output causes ENOBUFS crashes on large repositories where diff size exceeds Node.js buffer limits. | +| Diff content is parsed as it streams | Status transitions and deliverable changes must be extracted incrementally as each file section completes, not after the entire diff is collected. | Batch-processing the full diff reintroduces the memory bottleneck that streaming is designed to eliminate. | +| Streaming errors are handled gracefully | Stream failures and malformed diff lines must return Result errors or be skipped without throwing exceptions. | Unhandled stream errors crash the CLI process, preventing any validation output from reaching the user. | + +### Validator Read Model Consolidation + +| Rule | Invariant | Rationale | +| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Validator queries the read model for cross-source matching | Pattern identity resolution — including implements relationships in both directions — uses `MasterDataset.relationshipIndex` rather than ad-hoc name-equality maps built from raw scanner output. | The MasterDataset computes implementedBy reverse lookups in transform-dataset.ts (second pass, lines 488-546). The validator's current name-equality Map cannot resolve ShapeExtractor -> ShapeExtraction or DecisionDocGeneratorTesting -> DecisionDocGenerator because these are implements relationships, not name matches. | +| No lossy local types in the validator | The validator operates on `ExtractedPattern` from the MasterDataset, not a consumer-local DTO that discards fields. | GherkinPatternInfo keeps only name, phase, status, file, and deliverables — discarding uses, dependsOn, implementsPatterns, include, productArea, rules, and 20+ other fields. When the validator needs relationship data, it cannot access it through the lossy type. | +| Utility patterns without specs are not false positives | Internal utility patterns that have a `@libar-docs-phase` but will never have a Gherkin spec should not carry phase metadata. Phase tags signal roadmap participation. | Five utility patterns (ContentDeduplicator, FileCache, WarningCollector, SourceMappingValidator, SourceMapper) have phase tags from the phase when they were built. They are infrastructure, not roadmap features. The validator correctly reports missing Gherkin for patterns with phases — the fix is removing the phase tag, not suppressing the warning. | --- diff --git a/docs/ANNOTATION-GUIDE.md b/docs/ANNOTATION-GUIDE.md index 3d22ec6a..cb271949 100644 --- a/docs/ANNOTATION-GUIDE.md +++ b/docs/ANNOTATION-GUIDE.md @@ -1,459 +1,126 @@ -# Documentation Annotation Guide +# Annotation Guide -**Purpose:** This guide documents the approach for fixing auto-generated documentation by adding `@libar-docs-extract-shapes` annotations to TypeScript files. Use this guide when deploying agents to fix similar issues. +How to annotate TypeScript and Gherkin files for pattern extraction, documentation generation, and architecture diagrams. -## Final Statistics - -| Metric | Before | After | -| ------------------------------- | ------ | ---------- | -| Files with `@extract-shapes` | 18 | **36** | -| Files with `@arch-context` | 6 | **21** | -| Total generated doc lines | ~3,000 | **7,500+** | -| Docs with TypeScript extraction | 3 | **8** | -| Architecture diagram components | 6 | **21** | -| Bounded contexts in diagram | 4 | **9** | - -**Documents Now Auto-Generated:** - -- ARCHITECTURE-REFERENCE.md (714 lines) - TypeScript schemas extracted -- CONFIGURATION-REFERENCE.md (731 lines) - Preset/factory types extracted -- INSTRUCTIONS-REFERENCE.md (974 lines) - All 5 CLI configs extracted -- VALIDATION-REFERENCE.md (912 lines) - All validation types extracted -- TAXONOMY-REFERENCE.md (622 lines) - All taxonomy types extracted -- PROCESS-GUARD-REFERENCE.md (449 lines) - FSM + Decider types extracted, NO DUPLICATES -- DOC-GENERATION-PROOF-OF-CONCEPT.md (710 lines) - Pattern demonstration -- SESSION-GUIDES-REFERENCE.md - FSM states types extracted - -**Documents Remaining Manual (Conceptual Content):** - -- METHODOLOGY-REFERENCE.md (372 lines) -- SESSION-GUIDES-REFERENCE.md (543 lines) -- GHERKIN-PATTERNS-REFERENCE.md (550 lines) -- PUBLISHING-REFERENCE.md (396 lines) -- INDEX-REFERENCE.md (289 lines) +For the **complete tag reference** (all 50+ tags with formats, values, and examples), generate the taxonomy: `npx generate-tag-taxonomy -o TAG_TAXONOMY.md -f` or see [TAXONOMY.md](./TAXONOMY.md) for the taxonomy architecture. --- -## Pattern 0: Architecture Annotations for Diagram Generation +## Getting Started -**Problem:** The generated architecture diagram was sparse (only 6 components) because few files had `@libar-docs-arch-*` annotations. +### File-Level Opt-In -**Solution:** Add architecture annotations to key files across all bounded contexts: +Every file that participates in the annotation system must have a `@libar-docs` opt-in marker. Files without this marker are invisible to the scanner. -| Annotation | Purpose | Values | -| -------------------------- | ------------------------------------ | -------------------------------------------------------------------------------- | -| `@libar-docs-arch-context` | Groups components by bounded context | scanner, extractor, generator, renderer, taxonomy, config, lint, validation, api | -| `@libar-docs-arch-layer` | Architectural layer classification | domain, application, infrastructure | -| `@libar-docs-arch-role` | Component role (optional) | service, infrastructure | - -**Files Annotated (15 new files):** - -| File | Context | Layer | -| --------------------------------------------------- | ---------- | -------------- | -| `src/renderable/codecs/patterns.ts` | renderer | application | -| `src/renderable/codecs/architecture.ts` | renderer | application | -| `src/renderable/codecs/decision-doc.ts` | renderer | application | -| `src/renderable/codecs/session.ts` | renderer | application | -| `src/taxonomy/registry-builder.ts` | taxonomy | domain | -| `src/taxonomy/categories.ts` | taxonomy | domain | -| `src/config/factory.ts` | config | application | -| `src/config/config-loader.ts` | config | infrastructure | -| `src/lint/rules.ts` | lint | application | -| `src/lint/process-guard/decider.ts` | lint | application | -| `src/validation/anti-patterns.ts` | validation | application | -| `src/validation/dod-validator.ts` | validation | application | -| `src/generators/built-in/decision-doc-generator.ts` | generator | application | -| `src/generators/source-mapper.ts` | generator | infrastructure | -| `src/generators/content-deduplicator.ts` | generator | infrastructure | - -**Result:** Architecture diagram now shows 21 components across 9 bounded contexts, providing an accurate visual representation of the system structure. - -**Example annotation:** +**TypeScript** — file-level JSDoc block: ```typescript /** * @libar-docs - * @libar-docs-pattern PatternsCodec - * @libar-docs-status completed - * @libar-docs-arch-context renderer - * @libar-docs-arch-layer application + * @libar-docs-pattern MyPattern + * @libar-docs-status roadmap + * @libar-docs-uses EventStore, CommandBus + * + * ## My Pattern - Description + * + * Paragraph describing the pattern's purpose. */ ``` ---- - -## Fix Patterns Discovered (Exemplar Work) - -These patterns were discovered while perfecting the `ARCHITECTURE-REFERENCE.md` exemplar. - -### Pattern 1: Zod Schema Extraction - -**Problem:** Extracting type aliases like `MasterDataset` shows unhelpful output: - -```typescript -export type MasterDataset = z.infer; -``` - -**Solution:** Extract the schema constant (with `Schema` suffix) instead: - -| Wrong (Type Alias) | Correct (Schema Const) | -| ------------------ | ---------------------- | -| `MasterDataset` | `MasterDatasetSchema` | -| `StatusGroups` | `StatusGroupsSchema` | -| `PhaseGroup` | `PhaseGroupSchema` | - -**Why it works:** Schema constants contain the actual `z.object({...})` definition with all fields visible. Type aliases are just inferred wrappers. - -**Example annotation:** - -```typescript -// WRONG - shows z.infer<> wrapper -* @libar-docs-extract-shapes MasterDataset, StatusGroups - -// CORRECT - shows full z.object({}) definition -* @libar-docs-extract-shapes MasterDatasetSchema, StatusGroupsSchema -``` - -### Pattern 2: Duplicate Sections Prevention - -**Problem:** Content appeared twice in generated docs - once in "Implementation Details" (from Source Mapping) and again in "Other rules" section. - -**Root Cause:** The decision doc generator rendered Rule: blocks as standalone sections even when they were already covered by Source Mapping entries. - -**Solution:** The generator now performs fuzzy word matching to skip "Other rules" that are covered by Source Mapping section names: - -1. Build set of section names from Source Mapping table -2. For each Rule: block, extract significant words (3+ chars) -3. Skip the rule if any Source Mapping section has: - - Exact name match - - Substring match - - 2+ overlapping significant words - -**This is now implemented in** `src/generators/built-in/decision-doc-generator.ts` (lines ~365-400). - -### Pattern 3: Source Mapping Self-References - -**Problem:** Source Mapping entries can reference either external files OR the current decision document itself. - -**Self-reference syntax:** -| Reference | Meaning | -|-----------|---------| -| `THIS DECISION` | Extract from current document's description | -| `THIS DECISION (Rule: Context)` | Extract from specific Rule: block | - -**External file syntax:** -| Reference | Meaning | -|-----------|---------| -| `src/path/file.ts` | Extract from TypeScript file | -| `specs/path/file.feature` | Extract from Gherkin file | - -**Generator behavior:** - -- Self-references: Content rendered inline (parsed from feature file) -- External files: Content extracted via `@extract-shapes` annotation - -### Pattern 4: Section Names Must Match Rule Names (CRITICAL) - -**Problem:** Duplicate sections appear when Source Mapping section names don't match Rule: block names. - -**Root Cause:** The generator's fuzzy matching algorithm checks if Source Mapping section names match Rule: block names to avoid rendering the same content twice. When names don't match, both get rendered. - -**Example of the problem:** +**Gherkin** — file-level tags before `Feature:`: ```gherkin -# Source Mapping has: -| CLI Examples | THIS DECISION (Rule: CLI Usage) | Fenced code block | - -# But Rule: block is named: -Rule: CLI Usage +@libar-docs +@libar-docs-pattern:MyPattern +@libar-docs-status:roadmap +@libar-docs-phase:14 +@libar-docs-depends-on:EventStore,CommandBus +Feature: My Pattern + + **Problem:** + Description of the problem. ``` -The fuzzy matcher checks: - -- "cli examples" contains "cli usage"? NO -- "cli usage" contains "cli examples"? NO -- Word overlap: {"cli", "examples"} vs {"cli", "usage"} → only 1 word matches (need 2) +### Tag Prefix by Preset -**Result:** Content appears TWICE in generated output. +The tag prefix is configurable via presets. All examples in this guide use the default `@libar-docs-` prefix. -**Solution:** Section names MUST match Rule: block names exactly: +| Preset | Prefix | Categories | Use Case | +| ------------------------- | -------------- | ---------- | ----------------------------- | +| `libar-generic` (default) | `@libar-docs-` | 3 | Simple projects | +| `ddd-es-cqrs` | `@libar-docs-` | 21 | DDD/Event Sourcing monorepos | +| `generic` | `@docs-` | 3 | Simple projects, short prefix | -```gherkin -# CORRECT - Section name matches Rule: name -| CLI Usage | THIS DECISION (Rule: CLI Usage) | Rule block content | -| Programmatic API | THIS DECISION (Rule: Programmatic API) | Rule block content | - -# WRONG - Section name differs from Rule: name -| CLI Examples | THIS DECISION (Rule: CLI Usage) | Fenced code block | -| API Example | THIS DECISION (Rule: Programmatic API) | Fenced code block | -``` +See [CONFIGURATION.md](./CONFIGURATION.md) for preset details and custom configuration. -### Pattern 5: Content Ownership Boundaries +### Dual-Source Ownership -**Principle:** Each content type has one owner. Do NOT duplicate content across sources. +Annotations are split between TypeScript and Gherkin by domain: -| Content Type | Owner | Extract From | Examples | -| ------------------------- | --------------- | -------------------------- | ---------------------------------------- | -| Type definitions | TypeScript code | `@extract-shapes` | interfaces, types, consts | -| Const values (FSM states) | TypeScript code | `@extract-shapes` | `PROTECTION_LEVELS`, `VALID_TRANSITIONS` | -| Human-readable tables | Feature file | Self-reference Rule: block | Escape Hatches, Rule Descriptions | -| Mermaid diagrams | Feature file | Self-reference DocString | FSM diagrams, architecture flows | -| Code examples | Feature file | Self-reference DocString | CLI usage, API examples | -| Conceptual context | Feature file | Self-reference Rule: block | "Why" explanations | +| Source | Owns | Example Tags | +| -------------- | ----------------------------------------------- | -------------------------------------------- | +| **TypeScript** | Implementation: runtime deps, category, shapes | `uses`, `used-by`, `extract-shapes`, `shape` | +| **Gherkin** | Planning: status, phase, timeline, dependencies | `status`, `phase`, `depends-on`, `quarter` | -**Anti-pattern:** Don't have BOTH a hardcoded table in Rule: block AND TypeScript extraction for the same data: - -```gherkin -# WRONG - duplicates FSM data in two places -Rule: Protection Levels - | Status | Level | ... | # Hardcoded table - | roadmap | none | ... | - -# Source Mapping also extracts from TypeScript: -| Protection Levels | src/validation/fsm/states.ts | @extract-shapes tag | -``` - -**Correct approach:** Extract from TypeScript (single source of truth): - -```gherkin -# Source Mapping extracts from TypeScript only -| FSM Protection Levels | src/validation/fsm/states.ts | @extract-shapes tag | - -# NO hardcoded Rule: block table for same data -``` - -### Pattern 6: All Rule: Blocks Must Be in Source Mapping - -**Problem:** Rule: blocks that aren't in Source Mapping get rendered as standalone "Other rules" sections, causing duplicates when their content overlaps with Source Mapping entries. - -**Solution:** Every Rule: block should have a corresponding Source Mapping entry: - -```gherkin -**Source Mapping:** - -| Section | Source File | Extraction Method | -| --- | --- | --- | -| FSM Diagram | THIS DECISION (Rule: FSM Diagram) | Fenced code block (Mermaid) | -| Escape Hatches | THIS DECISION (Rule: Escape Hatches) | Rule block table | -| Rule Descriptions | THIS DECISION (Rule: Rule Descriptions) | Rule block table | -| CLI Usage | THIS DECISION (Rule: CLI Usage) | Rule block content | -| Programmatic API | THIS DECISION (Rule: Programmatic API) | Rule block content | -| Architecture | THIS DECISION (Rule: Architecture) | Rule block content | -``` - -This ensures: - -1. All Rule: content is extracted exactly once via Source Mapping -2. The fuzzy matching correctly skips rendering the same content as "Other rules" -3. No duplicate sections in generated output - -### Pattern 7: Content Deduplication - TypeScript vs Feature File - -**Problem:** The same data appears in both TypeScript source and Feature file Rule: blocks. - -**Root Cause:** When establishing documentation recipes, authors copied tables from TypeScript -into feature files for "complete" Rule: blocks. This creates maintenance burden and drift risk. - -**Example of the problem (from instructions-reference.feature):** - -```gherkin -Rule: Category Tags - **Full Category Table (21 categories):** - | Tag | Domain | Priority | Description | - | domain | Strategic DDD | 1 | ... - ... (21 rows manually copied from categories.ts) -``` - -Meanwhile, `src/taxonomy/categories.ts` has the SAME data: - -```typescript -export const CATEGORIES: readonly CategoryDefinition[] = [ - { tag: 'domain', domain: 'Strategic DDD', priority: 1, ... }, - ... -]; -``` - -**Solution:** Apply strict content ownership: - -| Content Type | Single Source | Never Duplicate In | -| ------------------------------------------------- | -------------------------------- | -------------------- | -| Tag definitions (name, format, purpose, example) | TypeScript `registry-builder.ts` | Feature file tables | -| Category definitions (tag, domain, priority) | TypeScript `categories.ts` | Feature file tables | -| CLI flags and options | TypeScript `src/cli/*.ts` | Feature file tables | -| Conceptual context ("When to Use", "Why") | Feature file Rule: blocks | TypeScript JSDoc | -| Supplementary tables (Source Ownership, Duration) | Feature file Rule: blocks | N/A - unique content | -| Code examples | Feature file DocStrings | N/A | - -**How to Fix:** - -1. Check if table data exists in TypeScript with `@extract-shapes` annotation -2. If yes: REMOVE table from Rule: block, keep only context paragraph -3. If no: Keep table in Rule: block (it's unique content) -4. Update Source Mapping to reflect actual extraction sources - -**Example fix applied to instructions-reference.feature:** - -Before (528 lines): - -```gherkin -Rule: Category Tags - **Full Category Table (21 categories):** - | Tag | Domain | Priority | Description | - | domain | Strategic DDD | 1 | Bounded contexts... | - ... (21 rows) -``` - -After (363 lines): - -```gherkin -Rule: Category Tags - **Context:** Category tags classify patterns by domain area. - The full category list (21 categories) is extracted from `src/taxonomy/categories.ts`. -``` - -### Pattern 8: Identifying Supplementary Tables (Unique Content) - -**Problem:** How do you know if a table should be kept or removed? - -Some tables in Rule: blocks contain information NOT in TypeScript. These are "supplementary tables" -that provide human-written guidance rather than data that can be extracted from code. - -**Supplementary tables to KEEP:** - -| Table Type | Example | Why It's Unique | -| ------------------------ | ------------------------------------------- | ---------------------------------- | -| Source Ownership | `uses` → TypeScript, `depends-on` → Feature | Architectural guidance not in code | -| Format Types Explanation | `flag` → Boolean presence | Parsing behavior explanation | -| Hierarchy Duration | `epic` → Multi-quarter | Timeline context not in TypeScript | -| Two-Tier Architecture | Tier 1 → delivery-process/specs | Structural guidance | -| Escape Hatches | CLI flags with workarounds | Usage guidance | - -**Data tables to REMOVE (duplicate TypeScript):** - -| Table Type | Why Remove | TypeScript Source | -| -------------------- | --------------------------------------------- | --------------------- | -| Tag definitions | Same columns as MetadataTagDefinition | `registry-builder.ts` | -| Category definitions | Same structure as CATEGORIES array | `categories.ts` | -| Enum values | Already in tag definition's `values` property | `registry-builder.ts` | -| CLI flags | Already extracted via @extract-shapes | `src/cli/*.ts` | - -**Identification Rule:** Search TypeScript for the table's data: - -```bash -grep -r "first-cell-value" src/taxonomy/ src/cli/ -``` - -If found → REMOVE the table, extract from TypeScript -If not found → KEEP the table, it's unique content - ---- - -## File Organization - -Documentation recipe files use decision document FORMAT but serve a different PURPOSE: - -| Directory | Purpose | Example | -| ----------------------------- | --------------------------------------------- | -------------------------------- | -| `specs/docs/` | Documentation recipes (Source Mapping tables) | `instructions-reference.feature` | -| `delivery-process/decisions/` | ADR/PDR documents | `adr-006-process-guard.feature` | -| `delivery-process/specs/` | Roadmap specifications | `phase-state-machine.feature` | - -Documentation recipes: - -- Define WHICH sources feed WHICH documentation sections -- Don't record decisions made, they configure generation -- Use Rule: blocks for unique supplementary content only - ---- - -## Problem Statement - -The `specs/docs/*.feature` files have **Source Mapping tables** that reference TypeScript files: - -``` -| MasterDataset Schema | src/validation-schemas/master-dataset.ts | extract-shapes tag | -``` - -But many TypeScript files **lack the `@libar-docs-extract-shapes` annotation**, so no types are extracted. +Anti-pattern validation enforces these boundaries — see [VALIDATION.md](./VALIDATION.md). --- -## The Fix Pattern - -### Step 1: Read the Feature File Source Mapping +## Shape Extraction -Look at the **Source Mapping** table in the feature file: +Shape extraction pulls TypeScript type definitions (interfaces, type aliases, enums, functions, consts) into generated documentation. There are three modes: -```gherkin -| Section | Source File | Extraction Method | -| --- | --- | --- | -| MasterDataset Schema | src/validation-schemas/master-dataset.ts | extract-shapes tag | -| RenderableDocument | src/renderable/schema.ts | extract-shapes tag | -``` - -Identify which rows have `extract-shapes tag` as the extraction method. +### Mode 1: File-Level Explicit Names -### Step 2: Check if TypeScript File Has Annotation - -Search for `@libar-docs-extract-shapes` in the TypeScript file: - -```bash -grep "@libar-docs-extract-shapes" src/validation-schemas/master-dataset.ts -``` - -If no match, the annotation is missing. - -### Step 3: Add the Annotation - -Add `@libar-docs-extract-shapes` to the file's JSDoc block, listing key exported types: - -**Before:** +List specific declaration names in the file-level JSDoc: ```typescript /** * @libar-docs - * @libar-docs-pattern MasterDataset - * @libar-docs-status completed - * ... + * @libar-docs-extract-shapes MasterDatasetSchema, StatusGroupsSchema, RelationshipEntry */ ``` -**After:** +Names appear in the generated output in the order listed. + +### Mode 2: File-Level Wildcard + +Extract all exported declarations automatically: ```typescript /** * @libar-docs - * @libar-docs-pattern MasterDataset - * @libar-docs-status completed - * @libar-docs-extract-shapes MasterDataset, StatusGroups, PhaseGroup, RelationshipEntry - * ... + * @libar-docs-extract-shapes * */ ``` -### Step 4: Choose Which Types to Extract +Wildcard must be the sole value — `*, Foo` is invalid. -Run `grep "^export"` on the file to see all exports: +### Mode 3: Declaration-Level Tagging -```bash -grep "^export" src/validation-schemas/master-dataset.ts -``` +Tag individual declarations with `@libar-docs-shape`, optionally with a group name: -Prioritize: +```typescript +/** @libar-docs-shape api-types */ +export interface CommandInput { + readonly aggregateId: string; + readonly payload: unknown; +} -1. **Main types** - The primary interface/type the file defines -2. **Key supporting types** - Types that users of the API need to understand -3. **Skip internal types** - Types that are implementation details +/** @libar-docs-shape api-types */ +export type CommandResult = Result; +``` -### Step 5: Verify Generation +Declaration-level shapes work on both exported and non-exported declarations. The optional group name (`api-types`) enables filtering in diagram scopes and product area documents via `@libar-docs-include`. -Run the generator and check output: +### Critical Gotcha: Zod Schemas -```bash -npx tsx scripts/generate-docs-auto.ts [pattern-name] -cat docs-generated/docs/[PATTERN]-REFERENCE.md | grep -A 20 "### [Section Name]" -``` +For Zod files, extract the **schema constant** (with `Schema` suffix), not the inferred type alias: -The extracted types should appear in code blocks. +| Wrong (type alias) | Correct (schema constant) | +| ---------------------------------------- | ----------------------------------------- | +| `@extract-shapes MasterDataset` | `@extract-shapes MasterDatasetSchema` | +| Shows: `z.infer` (unhelpful) | Shows: `z.object({...})` (full structure) | --- @@ -463,471 +130,139 @@ The extracted types should appear in code blocks. ```typescript /** - * @libar-docs-extract-shapes MasterDataset, StatusGroups, PhaseGroup + * @libar-docs + * @libar-docs-pattern MasterDataset + * @libar-docs-status completed + * @libar-docs-extract-shapes MasterDatasetSchema, StatusGroupsSchema, PhaseGroupSchema */ -// For Zod files, list the inferred type names (without "Schema" suffix) ``` -### Interface Files +### Interface / Type Files ```typescript /** + * @libar-docs + * @libar-docs-pattern DocumentGenerator + * @libar-docs-status completed * @libar-docs-extract-shapes DocumentGenerator, GeneratorContext, GeneratorOutput */ -// For interface files, list the interface names ``` -### Function/Service Files +### Function / Service Files ```typescript /** - * @libar-docs-extract-shapes transformToMasterDataset, RuntimeMasterDataset, RawDataset + * @libar-docs + * @libar-docs-pattern TransformDataset + * @libar-docs-status completed + * @libar-docs-arch-context generator + * @libar-docs-arch-layer application + * @libar-docs-extract-shapes transformToMasterDataset, RuntimeMasterDataset */ -// For function files, include main function + related types ``` ---- - -## Files Fixed in Architecture Pattern - -| File | Added Shapes | -| ---------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | -| `src/validation-schemas/master-dataset.ts` | MasterDataset, StatusGroups, StatusCounts, PhaseGroup, SourceViews, RelationshipEntry, ArchIndex | -| `src/renderable/schema.ts` | RenderableDocument, SectionBlock, HeadingBlock, TableBlock, ListBlock, CodeBlock, MermaidBlock, CollapsibleBlock | -| `src/generators/types.ts` | DocumentGenerator, GeneratorContext, GeneratorOutput | -| `src/generators/pipeline/transform-dataset.ts` | RuntimeMasterDataset, RawDataset, transformToMasterDataset | - ---- - -## Results Comparison - -| Metric | Manual docs/ARCHITECTURE.md | Generated ARCHITECTURE-REFERENCE.md | -| -------------------- | --------------------------- | ----------------------------------- | -| Lines | 1311 | 714 | -| Sections | 17 | 13 | -| Has TypeScript types | No (prose descriptions) | Yes (actual interfaces) | -| Accuracy risk | May drift from code | Always accurate | - -**Key trade-off:** Generated docs are smaller but include actual type definitions that are guaranteed to match the code. Manual docs have more narrative but risk drift. - ---- - -## Completed Fixes (All Done) - -### Architecture Documentation ✅ - -Feature: `specs/docs/architecture-reference.feature` - -Files fixed: - -- `src/validation-schemas/master-dataset.ts` - Added annotation -- `src/renderable/schema.ts` - Added annotation -- `src/generators/types.ts` - Added annotation -- `src/generators/pipeline/transform-dataset.ts` - Added annotation - -**Generated:** 714 lines - -### Configuration Documentation ✅ - -Feature: `specs/docs/configuration-reference.feature` - -Files fixed: - -- `src/config/presets.ts` - Expanded shape list -- `src/config/config-loader.ts` - Expanded shape list - -**Generated:** 731 lines - -### Instructions Documentation ✅ - -Feature: `specs/docs/instructions-reference.feature` - -Files fixed: - -- `src/cli/generate-docs.ts` - Added annotation -- `src/cli/lint-patterns.ts` - Added annotation -- `src/cli/validate-patterns.ts` - Added annotation -- `src/cli/generate-tag-taxonomy.ts` - Added annotation - -**Generated:** 974 lines - -### Validation Documentation ✅ - -Feature: `specs/docs/validation-reference.feature` - -Files fixed: - -- `src/lint/rules.ts` - Expanded from 3 to 13 shapes -- `src/validation/anti-patterns.ts` - Expanded from 6 to 8 shapes -- `src/validation/types.ts` - Expanded from 6 to 11 shapes -- `src/validation/dod-validator.ts` - Expanded from 4 to 6 shapes - -**Generated:** 912 lines - -### Process Guard Documentation ✅ (Exemplar for duplicate prevention) - -Feature: `specs/docs/process-guard-reference.feature` - -**Key fixes applied:** - -1. Added `@libar-docs-extract-shapes` to `src/validation/fsm/states.ts`: - - `PROTECTION_LEVELS, ProtectionLevel, getProtectionLevel, isTerminalState, isFullyEditable, isScopeLocked` - -2. Updated Source Mapping to extract from TypeScript instead of hardcoded Rule: blocks: - - Protection Levels → `src/validation/fsm/states.ts` - - Valid Transitions → `src/validation/fsm/transitions.ts` - -3. Fixed Section names to match Rule: names exactly: - - `CLI Usage` → `THIS DECISION (Rule: CLI Usage)` (not "CLI Examples") - - `Programmatic API` → `THIS DECISION (Rule: Programmatic API)` (not "API Example") - -4. Added all Rule: blocks to Source Mapping table to prevent "Other rules" duplication - -**Before:** 521 lines with duplicate sections -**After:** 449 lines with NO duplicates - -**Compact output:** 134 lines with actual content (was "No structured content") - ---- - -## Agent Deployment Template - -```` -You are fixing auto-generated documentation for the delivery-process package. - -**Feature file:** specs/docs/[NAME]-reference.feature - -**Your task:** - -### Step 0: Check for Content Duplication (NEW - CRITICAL) -Before fixing missing @extract-shapes, check if Rule: blocks duplicate TypeScript data. - -1. For each Rule: block with a data table, search TypeScript: - ```bash - grep -r "first-cell-value" src/taxonomy/ src/cli/ -```` - -2. If the table data exists in TypeScript: - - REMOVE the table from the Rule: block - - Keep only the context paragraph - - Update Source Mapping to extract from TypeScript - -3. If the table data does NOT exist in TypeScript: - - KEEP the table (it's supplementary content) - - Ensure Source Mapping references the Rule: block - -**Duplication red flags:** - -- Table has same columns as TypeScript interface (tag, format, purpose) -- Table values match constants in TypeScript files -- Source Mapping says "extract-shapes" but Rule: also has table - -**Example fix (from instructions-reference.feature):** - -BEFORE (duplicates categories.ts): +### Gherkin Feature Files ```gherkin -Rule: Category Tags - | Tag | Domain | Priority | Description | - | domain | Strategic DDD | 1 | Bounded contexts... | - ... (21 rows) +@libar-docs +@libar-docs-pattern:ProcessGuardLinter +@libar-docs-status:roadmap +@libar-docs-phase:99 +@libar-docs-depends-on:StateMachine,ValidationRules +Feature: Process Guard Linter + + Background: Deliverables + Given the following deliverables: + | Deliverable | Status | Location | + | State derivation | Pending | src/lint/derive.ts | + + Rule: Completed specs require unlock reason + + **Invariant:** A completed spec cannot be modified without explicit unlock. + **Rationale:** Prevents accidental regression of validated work. + + @acceptance-criteria @happy-path + Scenario: Reject modification without unlock + Given a spec with status "completed" + When I modify a deliverable + Then validation fails with "completed-protection" ``` -AFTER (removed duplicate): - -```gherkin -Rule: Category Tags - **Context:** Category tags classify patterns by domain area. - The full category list is extracted from `src/taxonomy/categories.ts`. -``` - -### Step 1: Analyze Source Mapping Table - -Read the feature file's Source Mapping table and categorize each row: - -- TypeScript extraction (`@extract-shapes tag`) → Check for missing annotations -- Self-references (`THIS DECISION`) → Verify section names match Rule: names - -### Step 2: Fix TypeScript Extraction - -For each row with "extract-shapes tag" extraction method: - -1. Read the referenced TypeScript file -2. Check if it has `@libar-docs-extract-shapes` annotation -3. If missing, add it with key exported types -4. **IMPORTANT:** For Zod files, extract SCHEMA CONSTANTS (e.g., `MasterDatasetSchema`) - NOT type aliases (e.g., `MasterDataset`) - schema constants show full structure - -### Step 3: Fix Self-References (CRITICAL for duplicates) - -For each row with `THIS DECISION (Rule: X)` reference: - -1. Verify the Source Mapping section name MATCHES the Rule: block name -2. If they differ, update the Source Mapping section name to match exactly - -Example fix: - -```gherkin -# BEFORE (causes duplicates): -| CLI Examples | THIS DECISION (Rule: CLI Usage) | - -# AFTER (no duplicates): -| CLI Usage | THIS DECISION (Rule: CLI Usage) | -``` - -### Step 4: Ensure All Rules Are Mapped - -Every Rule: block in the feature file should have a Source Mapping entry: - -- Missing Rule: → Add to Source Mapping table -- This prevents "Other rules" section duplication - -### Step 5: Verify Generation - -Run: `npx tsx scripts/generate-docs-auto.ts [filter]` - -Check output for: - -- TypeScript code blocks with actual interfaces/schemas -- NO duplicate sections (search for repeated headings) -- Zod schemas show `z.object({...})` structure -- Compact version (`_claude-md/`) has content, not "No structured content" - -**Success criteria:** - -- All referenced TypeScript files have @libar-docs-extract-shapes -- Source Mapping section names match Rule: block names exactly -- Every Rule: block has a Source Mapping entry -- Generated docs contain NO duplicate sections -- Compact output has essential content (~50-150 lines) - -**Common issues and fixes:** -| Issue | Cause | Fix | -|-------|-------|-----| -| `z.infer` shown | Extracted type alias | Extract schema const (`XSchema`) instead | -| Duplicate sections | Section name ≠ Rule: name | Make Source Mapping section name match Rule: name | -| Missing shapes | No annotation | Add `@libar-docs-extract-shapes` to file | -| Empty sections | Wrong shape names | Check `grep "^export"` output for correct names | -| "Other rules" section | Rule: not in Source Mapping | Add entry to Source Mapping table | -| Compact shows "No content" | Rule: content not tables | Include tables in Rule: blocks | - -**Content ownership rules:** -| Content Type | Extract From | -|--------------|--------------| -| Type definitions, const values | TypeScript `@extract-shapes` | -| Human-readable tables | Self-reference Rule: block | -| Mermaid diagrams | Self-reference DocString | -| Workflow examples | Self-reference DocString | -| Conceptual context | Self-reference Rule: block | - -```` - --- -### Pattern 9: Property-Level JSDoc for CLI Config Interfaces - -**Problem:** Extracted TypeScript interfaces show structure but lack descriptions for each property, making them less useful than hand-written tables. - -**Solution:** Add JSDoc comments to every property in config interfaces. The shape extractor preserves these comments in the extracted source text. - -**Example:** -```typescript -// BEFORE - properties lack descriptions -interface CLIConfig { - input: string[]; - exclude: string[]; - output: string; -} - -// AFTER - JSDoc describes each property -interface CLIConfig { - /** Glob patterns for TypeScript input files (-i, --input). Repeatable. */ - input: string[]; - /** Glob patterns to exclude from scanning (-e, --exclude). Repeatable. */ - exclude: string[]; - /** Output directory for generated documentation (-o, --output). Default: docs/architecture */ - output: string; -} -```` - -**Result:** The generated documentation shows the full interface with inline JSDoc comments, providing the same information as hand-written flag tables but extracted directly from source code. - -### Pattern 10: CLI Documentation Ownership - -**Problem:** CLI documentation exists in both feature files (hardcoded tables) and TypeScript files (config interfaces), creating duplication. - -**Solution:** Apply strict content ownership: - -| Content Type | Owner | Extraction Method | -| -------------------------------------- | ------------------------- | ----------------------------------------------- | -| Interface structure | TypeScript | `@extract-shapes` | -| Property descriptions | TypeScript JSDoc | `@extract-shapes` (visible in extracted source) | -| Usage examples | Feature file DocStrings | Self-reference | -| Business rules (lint/validation rules) | Feature file tables | Supplementary content | -| Context paragraphs | Feature file Rule: blocks | Self-reference | - -**What to Remove from Feature Files:** - -- CLI flag tables that duplicate TypeScript interface properties -- Replace with: "Configuration interface (`CLIConfig`) extracted from `src/cli/[name].ts`." - -**What to KEEP in Feature Files:** - -- Supplementary tables (Lint Rules, Validation Rules, Escape Hatches) -- Usage examples in DocStrings -- Context paragraphs explaining when/why to use the CLI +## Tag Groups Quick Reference + +Tags are organized into 12 functional groups. This table shows representative tags per group — for the **complete reference** with all formats, values, and examples, run `npx generate-tag-taxonomy -o TAG_TAXONOMY.md -f`. + +| Group | Tags (representative) | Format Types | +| ---------------- | ---------------------------------------------------- | ------------------------- | +| **Core** | `pattern`, `status`, `core`, `brief` | value, enum, flag | +| **Relationship** | `uses`, `used-by`, `implements`, `depends-on` | csv, value | +| **Process** | `phase`, `quarter`, `effort`, `team`, `priority` | number, value, enum | +| **PRD** | `product-area`, `user-role`, `business-value` | value | +| **ADR** | `adr`, `adr-status`, `adr-category`, `adr-theme` | value, enum | +| **Hierarchy** | `level`, `parent`, `title` | enum, value, quoted-value | +| **Traceability** | `executable-specs`, `roadmap-spec`, `behavior-file` | csv, value | +| **Discovery** | `discovered-gap`, `discovered-improvement` | value (repeatable) | +| **Architecture** | `arch-role`, `arch-context`, `arch-layer`, `include` | enum, value, csv | +| **Extraction** | `extract-shapes`, `shape` | csv, value | +| **Stub** | `target`, `since` | value | +| **Convention** | `convention` | csv (enum values) | + +### Format Types + +| Format | Syntax Example | Parsing | +| -------------- | ------------------------------ | ------------------------------ | +| `flag` | `@libar-docs-core` | Boolean presence (no value) | +| `value` | `@libar-docs-pattern Foo` | Simple string | +| `enum` | `@libar-docs-status roadmap` | Constrained to predefined list | +| `csv` | `@libar-docs-uses A, B, C` | Comma-separated values | +| `number` | `@libar-docs-phase 14` | Numeric value | +| `quoted-value` | `@libar-docs-title:'My Title'` | Preserves spaces in value | --- -### Pattern 11: Related Documentation Cross-References - -**Problem:** Auto-generated docs lack the "Related Documentation" cross-linking that helps readers navigate between documents. - -**Solution:** Add a `Rule: Related Documentation` block to recipe feature files with a table of related documents: - -```gherkin -Rule: Related Documentation - - **Context:** Related documentation for deeper understanding. - -| Document | Relationship | Focus | -| --- | --- | --- | -| VALIDATION-REFERENCE.md | Sibling | DoD validation, anti-pattern detection | -| SESSION-GUIDES-REFERENCE.md | Prerequisite | Planning/Implementation workflows | -| CONFIGURATION-REFERENCE.md | Reference | Presets and tag configuration | -``` - -**Relationship Types:** - -| Type | Meaning | -| ------------ | ---------------------------- | -| Sibling | Related doc at same level | -| Prerequisite | Should read before this doc | -| Reference | Lookup reference when needed | -| Background | Conceptual foundation | - -**Don't forget** to add the Rule: to the Source Mapping table: - -```gherkin -| Related Documentation | THIS DECISION (Rule: Related Documentation) | Rule block table | -``` +## Verification ---- +### CLI Commands -### Pattern 12: Quick Start Paths for Index Documents - -**Problem:** Index documents lack task-oriented navigation paths that help users find the right starting point. +```bash +# Tag usage inventory (counts per tag and value) +pnpm process:query -- tags -**Solution:** Add a `Rule: Quick Start Paths` block with a table showing common tasks and recommended reading order: +# Find files missing @libar-docs opt-in marker +pnpm process:query -- unannotated --path src/types -```gherkin -Rule: Quick Start Paths +# File inventory by type (TS, Gherkin, Stubs) +pnpm process:query -- sources - **Context:** Common tasks with recommended documentation paths. +# Full pattern JSON including extractedShapes +pnpm process:query -- query getPattern MyPattern -| Task | Start Here | Then Read | -| --- | --- | --- | -| Set up pre-commit hooks | PROCESS-GUARD.md | CONFIGURATION.md | -| Add annotations to TypeScript | INSTRUCTIONS.md | GHERKIN-PATTERNS.md | -| Run AI-assisted implementation | SESSION-GUIDES.md | PROCESS-GUARD.md | +# Generate complete tag reference +npx generate-tag-taxonomy -o TAG_TAXONOMY.md -f ``` ---- - -### Pattern 13: ADR vs Documentation Recipe - -**Problem:** Two document types both use Source Mapping tables but serve different purposes. - -**Document Types:** - -| Type | Purpose | Location | Script | -| ------- | -------------------------- | ----------------------------- | ---------------- | -| ADR/PDR | Record decisions (WHY) | `delivery-process/decisions/` | `docs:decisions` | -| Recipe | Configure generation (HOW) | `specs/docs/` | `docs:technical` | - -**When to Use Each:** - -- **ADR:** When documenting WHY a decision was made (Context/Decision/Consequences structure) -- **Recipe:** When ONLY configuring doc generation (Source Mapping + minimal Rule: blocks) - -**Anti-pattern:** Having BOTH an ADR AND a Recipe that duplicate content. Choose one: - -- If the ADR has good Context/Decision/Consequences → use ADR, add Source Mapping -- If you only need to aggregate TypeScript extractions → use Recipe - ---- - -## Directory Structure - -| Directory | Purpose | Package.json Script | -| ----------------------------- | ------------------------------------------ | ------------------------------- | -| `specs/docs/` | Doc generation recipes with Source Mapping | `docs:technical` | -| `delivery-process/decisions/` | ADR/PDR decision documents | `docs:decisions` | -| `delivery-process/specs/` | Tier 1 roadmap specifications | `docs:patterns`, `docs:roadmap` | +### Common Issues -**Note:** `specs/docs/` is at project root (not inside `delivery-process/`) because these are recipes FOR generating documentation, not part of the delivery process itself. +| Symptom | Cause | Fix | +| ------------------------------- | ----------------------------------- | ------------------------------------------------ | +| Pattern not in scanner output | Missing `@libar-docs` opt-in marker | Add file-level `@libar-docs` JSDoc/tag | +| Shape shows `z.infer<>` wrapper | Extracted type alias, not schema | Use schema constant name (e.g., `FooSchema`) | +| Shape not in product area doc | Missing `@libar-docs-product-area` | Add product-area tag to file-level annotation | +| Declaration-level shape missing | No `@libar-docs-shape` on decl | Add `@libar-docs-shape` JSDoc to the declaration | +| Tag value rejected | Wrong format or invalid enum value | Check format type in taxonomy reference | +| Anti-pattern validation error | Tag on wrong source type | Move tag to correct source (TS vs Gherkin) | --- -## Agent Deployment for Fixing Generated Docs - -### Pre-Flight Checklist - -Before fixing a document: - -1. [ ] Identify the feature file (recipe in `specs/docs/` or ADR in `delivery-process/decisions/`) -2. [ ] Check Source Mapping table exists -3. [ ] Verify Source Mapping section names match Rule: block names **EXACTLY** -4. [ ] Verify all TypeScript files have `@libar-docs-extract-shapes` - -### Debugging Empty Output - -When generated docs are empty or have "No structured content": - -1. **Check self-reference matching:** - - Source Mapping: `THIS DECISION (Rule: X)` - - Must match: `Rule: X` block name exactly (case-sensitive) - - Example: `Rule: Context above` does NOT match `Rule: Context - Why X Exists` - -2. **Check external file paths:** - - Paths relative to project root - - Files must exist - - TypeScript files need `@libar-docs-extract-shapes` - -3. **Run with output inspection:** - ```bash - npx tsx scripts/generate-docs-auto.ts [pattern] 2>&1 | head -100 - ``` - -### Success Criteria - -| Document Type | Expected Lines | Key Content | -| ------------------------------------------ | -------------- | ----------------------------- | -| TypeScript-heavy (PROCESS-GUARD-REFERENCE) | 400-500 | Code blocks with actual types | -| Conceptual (METHODOLOGY-REFERENCE) | 300-400 | Prose in Rule: blocks | -| Compact (\_claude-md/) | 50-150 | Tables only, no code blocks | - -### Systematic Fix Process - -For each document to fix: - -1. **Read the feature file** (recipe or ADR) -2. **Check Source Mapping table:** - - Do section names match Rule: block names exactly? - - Do external TypeScript files have `@libar-docs-extract-shapes`? -3. **Fix mismatches** following Pattern 4 (Section Names Must Match) -4. **Regenerate and verify** line count meets expectations - ---- - -## Inherently Manual Docs (No Changes Needed) - -These docs describe concepts/practices, not code: - -- `methodology-reference.feature` - Philosophy/thesis -- `publishing-reference.feature` - Release workflow -- `gherkin-patterns-reference.feature` - Writing patterns -- `session-guides-reference.feature` - Workflow procedures -- `index-reference.feature` - Navigation +## Related Documentation -For these, the feature file Rule blocks ARE the source of truth. No TypeScript extraction is possible or needed. +| Topic | Document | +| ------------------------- | ---------------------------------------------- | +| Taxonomy architecture | [TAXONOMY.md](./TAXONOMY.md) | +| Presets and configuration | [CONFIGURATION.md](./CONFIGURATION.md) | +| Pipeline and codecs | [ARCHITECTURE.md](./ARCHITECTURE.md) | +| Gherkin writing patterns | [GHERKIN-PATTERNS.md](./GHERKIN-PATTERNS.md) | +| Anti-pattern validation | [VALIDATION.md](./VALIDATION.md) | +| Product area enrichment | [CLAUDE.md — Product Area Guide](../CLAUDE.md) | diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 0c7f75ca..7e035021 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -228,23 +228,44 @@ function buildMasterDataset( **PipelineOptions:** -| Field | Type | Description | -| ----------------------- | -------------------------------------------- | ---------------------------------------------------- | -| `input` | `readonly string[]` | TypeScript source glob patterns | -| `features` | `readonly string[]` | Gherkin feature glob patterns | -| `baseDir` | `string` | Base directory for glob resolution | -| `mergeConflictStrategy` | `'fatal' \| 'concatenate'` | How to handle duplicate pattern names across sources | -| `exclude` | `readonly string[]` (optional) | Glob patterns to exclude from scanning | -| `workflowPath` | `string` (optional) | Custom workflow config JSON path | -| `contextInferenceRules` | `readonly ContextInferenceRule[]` (optional) | Custom context inference rules | +| Field | Type | Description | +| ----------------------- | -------------------------------------------- | -------------------------------------------------------- | +| `input` | `readonly string[]` | TypeScript source glob patterns | +| `features` | `readonly string[]` | Gherkin feature glob patterns | +| `baseDir` | `string` | Base directory for glob resolution | +| `mergeConflictStrategy` | `'fatal' \| 'concatenate'` | How to handle duplicate pattern names across sources | +| `exclude` | `readonly string[]` (optional) | Glob patterns to exclude from scanning | +| `workflowPath` | `string` (optional) | Custom workflow config JSON path | +| `contextInferenceRules` | `readonly ContextInferenceRule[]` (optional) | Custom context inference rules | +| `includeValidation` | `boolean` (optional) | When false, skip validation pass (default true) | +| `failOnScanErrors` | `boolean` (optional) | When true, return error on scan failures (default false) | **PipelineResult:** -| Field | Type | Description | -| ------------ | ---------------------- | ------------------------------------------------ | -| `dataset` | `RuntimeMasterDataset` | The fully-computed read model | -| `validation` | `ValidationSummary` | Schema validation results for all patterns | -| `warnings` | `readonly string[]` | Non-fatal warnings (e.g., Gherkin scan failures) | +| Field | Type | Description | +| -------------- | ---------------------------- | ------------------------------------------ | +| `dataset` | `RuntimeMasterDataset` | The fully-computed read model | +| `validation` | `ValidationSummary` | Schema validation results for all patterns | +| `warnings` | `readonly PipelineWarning[]` | Structured non-fatal warnings | +| `scanMetadata` | `ScanMetadata` | Aggregate scan counts for reporting | + +**PipelineWarning:** + +| Field | Type | Description | +| --------- | --------------------------------------------- | -------------------------- | +| `type` | `'scan' \| 'extraction' \| 'gherkin-parse'` | Warning category | +| `message` | `string` | Human-readable description | +| `count` | `number` (optional) | Number of affected items | +| `details` | `readonly PipelineWarningDetail[]` (optional) | File-level diagnostics | + +**ScanMetadata:** + +| Field | Type | Description | +| ----------------------- | -------- | ---------------------------------- | +| `scannedFileCount` | `number` | Total files successfully scanned | +| `scanErrorCount` | `number` | Files that failed to scan | +| `skippedDirectiveCount` | `number` | Invalid directives skipped | +| `gherkinErrorCount` | `number` | Feature files that failed to parse | **PipelineError:** @@ -309,7 +330,7 @@ const phase3 = masterDataset.byPhase.find((p) => p.phaseNumber === 3); **Key Files:** - `src/renderable/codecs/*.ts` - Document codecs -- `src/renderable/renderer.ts` - Markdown renderer +- `src/renderable/render.ts` - Markdown renderer ```typescript // Codec transforms to universal intermediate format @@ -365,7 +386,7 @@ interface MasterDataset { categoryCount: number; // ─── Relationship Index (10 fields) ───────────────────────────────────── - relationshipIndex: Record< + relationshipIndex?: Record< string, { // Forward relationships (from annotations) @@ -383,6 +404,15 @@ interface MasterDataset { extendedBy: string[]; // inverse of extendsPattern } >; + + // ─── Architecture Data (optional) ────────────────────────────────────── + archIndex?: { + byRole: Record; + byContext: Record; + byLayer: Record; + byView: Record; + all: ExtractedPattern[]; + }; } ``` @@ -455,17 +485,19 @@ export function transformToMasterDataset(raw: RawDataset): RuntimeMasterDataset The delivery-process package uses a codec-based architecture for document generation: ``` -MasterDataset → Codec.decode() → RenderableDocument ─┬→ renderToMarkdown → Markdown Files - └→ renderToClaudeContext → Token-efficient text +MasterDataset → Codec.decode() → RenderableDocument ─┬→ renderToMarkdown → Markdown Files + ├→ renderToClaudeMdModule → Modular Claude.md + └→ renderToClaudeContext → Token-efficient text ``` -| Component | Description | -| ------------------------- | ----------------------------------------------------------------------------------- | -| **MasterDataset** | Aggregated view of all extracted patterns with indexes by category, phase, status | -| **Codec** | Zod 4 codec that transforms MasterDataset into RenderableDocument | -| **RenderableDocument** | Universal intermediate format with typed section blocks | -| **renderToMarkdown** | Domain-agnostic markdown renderer for human documentation | -| **renderToClaudeContext** | LLM-optimized renderer (~20-40% fewer tokens, omits Mermaid, flattens collapsibles) | +| Component | Description | +| -------------------------- | ---------------------------------------------------------------------------------------------- | +| **MasterDataset** | Aggregated view of all extracted patterns with indexes by category, phase, status | +| **Codec** | Zod 4 codec that transforms MasterDataset into RenderableDocument | +| **RenderableDocument** | Universal intermediate format with typed section blocks | +| **renderToMarkdown** | Domain-agnostic markdown renderer for human documentation | +| **renderToClaudeMdModule** | Modular-claude-md renderer (H3-rooted headings, omits Mermaid/link-outs) | +| **renderToClaudeContext** | LLM-optimized renderer (~20-40% fewer tokens, omits Mermaid, flattens collapsibles) _(legacy)_ | ### Block Vocabulary (9 Types) @@ -692,6 +724,83 @@ const doc = codec.decode(dataset); **Output Files:** `OVERVIEW.md` +#### BusinessRulesCodec + +**Purpose:** Business rules documentation organized by product area, phase, and feature. Extracts domain constraints from Gherkin `Rule:` blocks. + +**Output Files:** + +- `BUSINESS-RULES.md` - Main index with statistics and all rules + +**Options (BusinessRulesCodecOptions extends BaseCodecOptions):** + +| Option | Type | Default | Description | +| ---------------------- | -------------------------------------------- | --------------------- | ----------------------------------------- | +| `groupBy` | `"domain" \| "phase" \| "domain-then-phase"` | `"domain-then-phase"` | Primary grouping strategy | +| `includeCodeExamples` | boolean | `false` | Include code examples from DocStrings | +| `includeTables` | boolean | `true` | Include markdown tables from descriptions | +| `includeRationale` | boolean | `true` | Include rationale section per rule | +| `filterDomains` | string[] | `[]` | Filter by domain categories (empty = all) | +| `filterPhases` | number[] | `[]` | Filter by phases (empty = all) | +| `onlyWithInvariants` | boolean | `false` | Show only rules with explicit invariants | +| `includeSource` | boolean | `true` | Include source feature file link | +| `includeVerifiedBy` | boolean | `true` | Include "Verified by" scenario links | +| `maxDescriptionLength` | number | `150` | Max description length in standard mode | +| `excludeSourcePaths` | string[] | `[]` | Exclude patterns by source path prefix | + +#### ArchitectureDocumentCodec + +**Purpose:** Architecture diagrams (Mermaid) generated from source annotations. Supports component and layered views. + +**Output Files:** + +- `ARCHITECTURE.md` (generated) - Architecture diagrams with component inventory + +**Options (ArchitectureCodecOptions extends BaseCodecOptions):** + +| Option | Type | Default | Description | +| ------------------ | -------------------------- | ------------- | ----------------------------------------- | +| `diagramType` | `"component" \| "layered"` | `"component"` | Type of diagram to generate | +| `includeInventory` | boolean | `true` | Include component inventory table | +| `includeLegend` | boolean | `true` | Include legend for arrow styles | +| `filterContexts` | string[] | `[]` | Filter to specific contexts (empty = all) | + +#### TaxonomyDocumentCodec + +**Purpose:** Taxonomy reference documentation with tag definitions, preset comparison, and format type reference. + +**Output Files:** + +- `TAXONOMY.md` - Main taxonomy reference +- `taxonomy/*.md` - Detail files per tag domain + +**Options (TaxonomyCodecOptions extends BaseCodecOptions):** + +| Option | Type | Default | Description | +| -------------------- | ------- | ------- | ------------------------------- | +| `includePresets` | boolean | `true` | Include preset comparison table | +| `includeFormatTypes` | boolean | `true` | Include format type reference | +| `includeArchDiagram` | boolean | `true` | Include architecture diagram | +| `groupByDomain` | boolean | `true` | Group metadata tags by domain | + +#### ValidationRulesCodec + +**Purpose:** Process Guard validation rules reference with FSM diagrams and protection level matrix. + +**Output Files:** + +- `VALIDATION-RULES.md` - Main validation rules reference +- `validation/*.md` - Detail files per rule category + +**Options (ValidationRulesCodecOptions extends BaseCodecOptions):** + +| Option | Type | Default | Description | +| ------------------------- | ------- | ------- | -------------------------------- | +| `includeFSMDiagram` | boolean | `true` | Include FSM state diagram | +| `includeCLIUsage` | boolean | `true` | Include CLI usage section | +| `includeEscapeHatches` | boolean | `true` | Include escape hatches section | +| `includeProtectionMatrix` | boolean | `true` | Include protection levels matrix | + --- ### Reference & Composition Codecs @@ -772,17 +881,19 @@ Progressive disclosure splits large documents into a main index plus detail file ### Codec Split Logic -| Codec | Split By | Detail Path Pattern | -| -------------- | ---------------------- | ------------------------------- | -| `patterns` | Category | `patterns/.md` | -| `roadmap` | Phase | `phases/phase--.md` | -| `milestones` | Quarter | `milestones/.md` | -| `current` | Active Phase | `current/phase--.md` | -| `requirements` | Product Area | `requirements/.md` | -| `session` | Incomplete Phase | `sessions/phase--.md` | -| `remaining` | Incomplete Phase | `remaining/phase--.md` | -| `adrs` | Category (≥ threshold) | `decisions/.md` | -| `pr-changes` | None | Single file only | +| Codec | Split By | Detail Path Pattern | +| ------------------ | ---------------------- | ------------------------------- | +| `patterns` | Category | `patterns/.md` | +| `roadmap` | Phase | `phases/phase--.md` | +| `milestones` | Quarter | `milestones/.md` | +| `current` | Active Phase | `current/phase--.md` | +| `requirements` | Product Area | `requirements/.md` | +| `session` | Incomplete Phase | `sessions/phase--.md` | +| `remaining` | Incomplete Phase | `remaining/phase--.md` | +| `adrs` | Category (≥ threshold) | `decisions/.md` | +| `taxonomy` | Tag Domain | `taxonomy/.md` | +| `validation-rules` | Rule Category | `validation/.md` | +| `pr-changes` | None | Single file only | ### Disabling Progressive Disclosure @@ -1436,7 +1547,12 @@ generatorRegistry.register(new MyCustomGenerator()); | `ChangelogCodec` | `changelog` | `-g changelog` | | `TraceabilityCodec` | `traceability` | `-g traceability` | | `OverviewCodec` | `overview-rdm` | `-g overview-rdm` | +| `BusinessRulesCodec` | `business-rules` | `-g business-rules` | +| `ArchitectureDocumentCodec` | `architecture` | `-g architecture` | +| `TaxonomyDocumentCodec` | `taxonomy` | `-g taxonomy` | +| `ValidationRulesCodec` | `validation-rules` | `-g validation-rules` | | `ReferenceCodec` | `reference-sample` | `-g reference-sample` | +| `DecisionDocGenerator` | `doc-from-decision` | `-g doc-from-decision` | ### CLI Usage @@ -1491,27 +1607,32 @@ filterQuarters: []; // All (default) - [README.md](../README.md) - Package quick start and API overview - [CONFIGURATION.md](./CONFIGURATION.md) - Configuration guide, presets, customization -- [INSTRUCTIONS.md](../INSTRUCTIONS.md) - Tag reference and CLI details +- [TAXONOMY.md](./TAXONOMY.md) - Tag taxonomy concepts and API - [src/taxonomy/](../src/taxonomy/) - TypeScript taxonomy source (categories, status values, priorities) --- ## Code References -| Component | File | Purpose | -| ------------------------ | ----------------------------------------------- | ---------------------------------------------- | -| MasterDataset Schema | `src/validation-schemas/master-dataset.ts` | Central data structure | -| transformToMasterDataset | `src/generators/pipeline/transform-dataset.ts` | Single-pass transformation | -| Document Codecs | `src/renderable/codecs/*.ts` | Zod 4 codec implementations | -| Reference Codec | `src/renderable/codecs/reference.ts` | Scoped reference documents | -| Composite Codec | `src/renderable/codecs/composite.ts` | Multi-codec assembly | -| Convention Extractor | `src/renderable/codecs/convention-extractor.ts` | Convention content extraction | -| Shape Matcher | `src/renderable/codecs/shape-matcher.ts` | Declaration-level filtering | -| Markdown Renderer | `src/renderable/render.ts` | Block → Markdown | -| Claude Context Renderer | `src/renderable/render.ts` | LLM-optimized rendering | -| Orchestrator | `src/generators/orchestrator.ts` | Pipeline coordination | -| TypeScript Scanner | `src/scanner/pattern-scanner.ts` | TS AST parsing | -| Gherkin Scanner | `src/scanner/gherkin-scanner.ts` | Feature file parsing | -| Pipeline Factory | `src/generators/pipeline/build-pipeline.ts` | Shared 8-step pipeline for CLI consumers | -| Business Rules Query | `src/api/rules-query.ts` | Rules domain query (from Gherkin Rule: blocks) | -| Shape Extractor | `src/extractor/shape-extractor.ts` | Shape extraction from TS | +| Component | File | Purpose | +| ------------------------ | --------------------------------------------------- | ---------------------------------------------- | +| MasterDataset Schema | `src/validation-schemas/master-dataset.ts` | Central data structure | +| transformToMasterDataset | `src/generators/pipeline/transform-dataset.ts` | Single-pass transformation | +| Document Codecs | `src/renderable/codecs/*.ts` | Zod 4 codec implementations | +| Reference Codec | `src/renderable/codecs/reference.ts` | Scoped reference documents | +| Composite Codec | `src/renderable/codecs/composite.ts` | Multi-codec assembly | +| Convention Extractor | `src/renderable/codecs/convention-extractor.ts` | Convention content extraction | +| Shape Matcher | `src/renderable/codecs/shape-matcher.ts` | Declaration-level filtering | +| Markdown Renderer | `src/renderable/render.ts` | Block → Markdown | +| Claude Context Renderer | `src/renderable/render.ts` | LLM-optimized rendering | +| Orchestrator | `src/generators/orchestrator.ts` | Pipeline coordination | +| TypeScript Scanner | `src/scanner/pattern-scanner.ts` | TS AST parsing | +| Gherkin Scanner | `src/scanner/gherkin-scanner.ts` | Feature file parsing | +| Pipeline Factory | `src/generators/pipeline/build-pipeline.ts` | Shared 8-step pipeline for CLI consumers | +| Business Rules Query | `src/api/rules-query.ts` | Rules domain query (from Gherkin Rule: blocks) | +| Business Rules Codec | `src/renderable/codecs/business-rules.ts` | Business rules from Gherkin Rule: blocks | +| Architecture Codec | `src/renderable/codecs/architecture.ts` | Architecture diagrams from annotations | +| Taxonomy Codec | `src/renderable/codecs/taxonomy.ts` | Taxonomy reference documentation | +| Validation Rules Codec | `src/renderable/codecs/validation-rules.ts` | Process Guard validation rules reference | +| Decision Doc Generator | `src/generators/built-in/decision-doc-generator.ts` | ADR/PDR decision documents | +| Shape Extractor | `src/extractor/shape-extractor.ts` | Shape extraction from TS | diff --git a/docs/CONFIGURATION.md b/docs/CONFIGURATION.md index 1faa1ca7..7286588a 100644 --- a/docs/CONFIGURATION.md +++ b/docs/CONFIGURATION.md @@ -3,7 +3,7 @@ Configure tag prefixes, presets, sources, output, and custom taxonomies for `@libar-dev/delivery-process`. > **Prerequisites:** See [README.md](../README.md) for installation and basic usage. -> **Tag Reference:** See [INSTRUCTIONS.md](../INSTRUCTIONS.md) for complete tag lists. +> **Tag Reference:** Run `npx generate-tag-taxonomy -o TAG_TAXONOMY.md -f` for a complete tag list. See [TAXONOMY.md](./TAXONOMY.md) for concepts. --- @@ -147,7 +147,7 @@ Full taxonomy for domain-driven architectures with 21 categories. export function transformToMasterDataset(input: TransformInput): MasterDataset { ... } ``` -> **Category Reference:** See [INSTRUCTIONS.md](../INSTRUCTIONS.md#category-tags) for the complete list. +> **Category Reference:** Run `npx generate-tag-taxonomy -o TAG_TAXONOMY.md -f` for the complete list. See [TAXONOMY.md](./TAXONOMY.md) for concepts. --- @@ -157,8 +157,8 @@ The `defineConfig()` function centralizes taxonomy, sources, output, and generat ### Discovery Order -1. Current directory -2. Walk up to repo root (`.git` folder) +1. Current directory: check `delivery-process.config.ts`, then `.js` +2. Walk up to repo root (`.git` folder), checking each directory 3. Fall back to libar-generic preset (3 categories, `@libar-docs-` prefix) ### Config File Format @@ -324,7 +324,8 @@ import { mergeSourcesForGenerator } from '@libar-dev/delivery-process/config'; const effectiveSources = mergeSourcesForGenerator( resolved.project.sources, - resolved.project.generatorOverrides['changelog'] + 'changelog', + resolved.project.generatorOverrides ); // effectiveSources.typescript - merged TypeScript globs // effectiveSources.features - merged or replaced feature globs @@ -348,9 +349,9 @@ New projects should use `defineConfig()` for the unified configuration experienc ## Related Documentation -| Document | Purpose | -| ------------------------------------- | ------------------------------- | -| [README.md](../README.md) | Installation and quick start | -| [INSTRUCTIONS.md](../INSTRUCTIONS.md) | Complete tag and CLI reference | -| [ARCHITECTURE.md](./ARCHITECTURE.md) | Pipeline and codec architecture | -| [METHODOLOGY.md](./METHODOLOGY.md) | Dual-source ownership strategy | +| Document | Purpose | +| ------------------------------------ | ------------------------------- | +| [README.md](../README.md) | Installation and quick start | +| [TAXONOMY.md](./TAXONOMY.md) | Tag taxonomy concepts and API | +| [ARCHITECTURE.md](./ARCHITECTURE.md) | Pipeline and codec architecture | +| [METHODOLOGY.md](./METHODOLOGY.md) | Dual-source ownership strategy | diff --git a/docs/GHERKIN-PATTERNS.md b/docs/GHERKIN-PATTERNS.md index 18646c92..91e73a6c 100644 --- a/docs/GHERKIN-PATTERNS.md +++ b/docs/GHERKIN-PATTERNS.md @@ -2,7 +2,7 @@ Practical patterns for writing Gherkin specs that work with `delivery-process` generators. -> **Tag Reference:** For the complete tag list, see [INSTRUCTIONS.md](../INSTRUCTIONS.md#category-tags). +> **Tag Reference:** Run `npx generate-tag-taxonomy -o TAG_TAXONOMY.md -f` for the complete tag list. See [TAXONOMY.md](./TAXONOMY.md) for concepts. --- @@ -204,16 +204,36 @@ Scenario: Extract directive from TypeScript ## Tag Conventions +### Semantic Tags (Extracted by Generators) + +These tags are recognized by the extractor and appear in generated documentation: + +| Tag | Purpose | +| ---------------------- | ------------------------------------------------- | +| `@acceptance-criteria` | Required for DoD validation of completed patterns | +| `@happy-path` | Primary success scenario | +| `@validation` | Input validation, constraint checks | +| `@business-rule` | Business invariant verification | +| `@business-failure` | Expected business failure scenario | +| `@compensation` | Compensating action scenario | +| `@idempotency` | Idempotency verification | +| `@expiration` | Expiration/timeout behavior | +| `@workflow-state` | Workflow state transition scenario | + +### Convention Tags (Organizational) + +These tags are not extracted by generators but are used by convention for organizing feature files: + | Tag | Purpose | | ----------------- | ------------------------------------ | -| `@happy-path` | Primary success scenario | | `@edge-case` | Boundary conditions, unusual inputs | | `@error-handling` | Error recovery, graceful degradation | -| `@validation` | Input validation, constraint checks | | `@integration` | Cross-component behavior | | `@poc` | Proof of concept, experimental | -Combine with feature-level tags for filtering: +### Combining Tags + +Combine scenario-level tags with feature-level tags for filtering: ```gherkin @behavior @scanner-core @@ -263,11 +283,11 @@ Rule: Reservations prevent race conditions ... ``` -| Element | Purpose | Extracted By | -| ------------------ | --------------------------------------- | ------------------------ | -| `**Invariant:**` | Business constraint (what must be true) | Business Rules generator | -| `**Rationale:**` | Business justification (why it exists) | Business Rules generator | -| `**Verified by:**` | Comma-separated scenario names | Traceability generator | +| Element | Purpose | Extracted By | +| ------------------ | --------------------------------------- | ------------------------------------------- | +| `**Invariant:**` | Business constraint (what must be true) | Business Rules generator | +| `**Rationale:**` | Business justification (why it exists) | Business Rules generator | +| `**Verified by:**` | Comma-separated scenario names | Multiple codecs (Business Rules, Reference) | > **Note:** Rule blocks are optional. Use them when the feature defines business invariants that benefit from structured documentation. @@ -323,21 +343,173 @@ For values with spaces, use the `quoted-value` format where supported: --- +## Step Linting + +`lint-steps` is a static analyzer that catches vitest-cucumber compatibility issues **before tests run**. It uses regex-based state machines (not the `@cucumber/gherkin` parser) to detect patterns that cause cryptic runtime failures. Run it after writing or modifying any `.feature` or `.steps.ts` file: + +```bash +pnpm lint:steps +``` + +12 rules across 3 categories (8 error, 4 warning). For the full validation tool suite, see [VALIDATION.md](./VALIDATION.md). + +### Feature File Rules + +These rules scan `.feature` files without needing a Gherkin parser: + +| Rule ID | Severity | What It Catches | +| ------------------------ | -------- | ------------------------------------------------------------------------ | +| `hash-in-description` | error | `#` at line start inside `"""` block in description — terminates parsing | +| `keyword-in-description` | error | Description line starting with Given/When/Then/And/But — breaks parser | +| `duplicate-and-step` | error | Multiple `And` steps with identical text in same scenario | +| `dollar-in-step-text` | warning | `$` in step text (outside quotes) causes matching issues | +| `hash-in-step-text` | warning | Mid-line `#` in step text (outside quotes) silently truncates the step | + +**`hash-in-description` — the most surprising trap:** + +```gherkin +# BAD — # inside """ block in description terminates parsing +Rule: My Rule + """bash + # This breaks the parser — Gherkin sees a comment, not code + generate-docs --output docs + """ + +# GOOD — move code to a step DocString (safe context) +Scenario: Example usage + Given the following script: + """bash + # Safe inside a real DocString + generate-docs --output docs + """ +``` + +**`keyword-in-description`:** + +```gherkin +# BAD — starts with "Given", parser interprets as a step +Rule: Authentication + Given a valid session, the system should... + +# GOOD — rephrase to avoid reserved keywords at line start +Rule: Authentication + A valid session enables the system to... +``` + +### Step Definition Rules + +These rules scan `.steps.ts` files: + +| Rule ID | Severity | What It Catches | +| ------------------------- | -------- | ---------------------------------------------------------- | +| `regex-step-pattern` | error | Regex pattern in step registration — use string patterns | +| `unsupported-phrase-type` | error | `{phrase}` in step string — use `{string}` instead | +| `repeated-step-pattern` | error | Same pattern registered twice — second silently overwrites | + +**`regex-step-pattern`:** + +```typescript +// BAD — regex pattern throws StepAbleStepExpressionError +Given(/a user with id (\d+)/, (_ctx, id) => { ... }); + +// GOOD — string pattern with Cucumber expression +Given('a user with id {int}', (_ctx, id: number) => { ... }); +``` + +### Cross-File Rules + +These rules pair `.feature` and `.steps.ts` files and cross-check them: + +| Rule ID | Severity | What It Catches | +| ---------------------------------- | -------- | -------------------------------------------------------------------- | +| `scenario-outline-function-params` | error | Function params in ScenarioOutline callback (should use variables) | +| `missing-and-destructuring` | error | Feature has `And` steps but step file does not destructure `And` | +| `missing-rule-wrapper` | error | Feature has `Rule:` blocks but step file does not destructure `Rule` | +| `outline-quoted-values` | warning | Quoted values in Outline steps instead of `` syntax | + +**The Two-Pattern Problem** — `scenario-outline-function-params` + `outline-quoted-values` form a pair: + +```gherkin +# Feature file — BAD (outline-quoted-values) +Scenario Outline: Validate quantity + When I set quantity to "" + # Should be: When I set quantity to + + Examples: + | quantity | + | 5 | +``` + +```typescript +// Step file — BAD (scenario-outline-function-params) +ScenarioOutline('Validate quantity', ({ When }) => { + When('I set quantity to {string}', (_ctx, qty: string) => { + // qty is undefined at runtime — {string} does NOT work in ScenarioOutline + }); +}); + +// GOOD — use variables object +ScenarioOutline('Validate quantity', ({ When }, variables: { quantity: string }) => { + When('I set quantity to ', () => { + const qty = variables.quantity; + }); +}); +``` + +**`missing-and-destructuring`:** + +```typescript +// BAD — And not destructured, causes StepAbleUnknowStepError +describeFeature(feature, ({ Given, When, Then }) => { ... }); + +// GOOD — And is available for feature And steps +describeFeature(feature, ({ Given, When, Then, And }) => { ... }); +``` + +### CLI Reference + +| Flag | Short | Description | Default | +| ------------------ | ----- | -------------------------- | -------- | +| `--strict` | | Treat warnings as errors | false | +| `--format ` | | Output: `pretty` or `json` | `pretty` | +| `--base-dir ` | `-b` | Base directory for paths | cwd | + +**Scan scope** (hardcoded defaults): + +``` +Feature files: tests/features/**/*.feature + delivery-process/specs/**/*.feature + delivery-process/decisions/**/*.feature +Step files: tests/steps/**/*.steps.ts +``` + +**Exit codes:** + +| Code | Meaning | +| ---- | ---------------------------------------------- | +| `0` | No errors (warnings allowed unless `--strict`) | +| `1` | Errors found (or warnings with `--strict`) | + +--- + ## Quick Reference -| Element | Use For | Example Location | -| -------------------- | -------------------------------------- | ------------------------------------------- | -| Background DataTable | Deliverables, shared reference data | `specs/process-guard-linter.feature` | -| Rule: | Group scenarios by business constraint | `tests/features/validation/*.feature` | -| Scenario Outline | Same pattern with variations | `tests/features/behavior/fsm-*.feature` | -| DocString `"""` | Code examples, content with pipes | `tests/features/behavior/scanner-*.feature` | -| Section comments `#` | Organize large feature files | Most test features | +| Element | Use For | Example Location | +| -------------------- | -------------------------------------- | ----------------------------------------------------- | +| Background DataTable | Deliverables, shared reference data | `delivery-process/specs/process-guard-linter.feature` | +| Rule: | Group scenarios by business constraint | `tests/features/validation/*.feature` | +| Scenario Outline | Same pattern with variations | `tests/features/validation/fsm-validator.feature` | +| DocString `"""` | Code examples, content with pipes | `tests/features/behavior/scanner-*.feature` | +| Section comments `#` | Organize large feature files | Most test features | +| `lint-steps` | Catch vitest-cucumber traps statically | `pnpm lint:steps` | --- ## Related Documentation -| Document | Purpose | -| ------------------------------------------- | ----------------------------------- | -| [INSTRUCTIONS.md](../INSTRUCTIONS.md) | Complete tag reference and CLI | -| [docs/CONFIGURATION.md](./CONFIGURATION.md) | Preset and tag prefix configuration | +| Document | Purpose | +| -------------------------------------------- | --------------------------------------- | +| [ANNOTATION-GUIDE.md](./ANNOTATION-GUIDE.md) | Annotation mechanics and tag reference | +| [TAXONOMY.md](./TAXONOMY.md) | Tag taxonomy concepts and API | +| [CONFIGURATION.md](./CONFIGURATION.md) | Preset and tag prefix configuration | +| [VALIDATION.md](./VALIDATION.md) | Full validation tool suite and CI setup | diff --git a/docs/INDEX.md b/docs/INDEX.md index 5133767f..8a67f680 100644 --- a/docs/INDEX.md +++ b/docs/INDEX.md @@ -4,14 +4,14 @@ ## Package Metadata -| Field | Value | -| ---------------- | ------------------------------------------------------------------ | -| **Package** | @libar-dev/delivery-process | -| **Version** | 0.1.0-pre.0 | -| **Purpose** | Source-first delivery process — code is the single source of truth | -| **Key Features** | Living docs, FSM enforcement, AI-native Data API CLI | -| **Node.js** | >= 18.0.0 | -| **License** | MIT | +| Field | Value | +| ---------------- | ---------------------------------------------------- | +| **Package** | @libar-dev/delivery-process | +| **Version** | 1.0.0-pre.0 | +| **Purpose** | Context engineering for AI-assisted codebases | +| **Key Features** | Living docs, FSM enforcement, AI-native Data API CLI | +| **Node.js** | >= 18.0.0 | +| **License** | MIT | --- @@ -19,18 +19,20 @@ | If you want to... | Read this | Lines | | ------------------------------ | -------------------------------------------- | ------ | -| Get started quickly | [README.md](../README.md) | 1-377 | +| Get started quickly | [README.md](../README.md) | 1-504 | | Configure presets and tags | [CONFIGURATION.md](./CONFIGURATION.md) | 1-357 | -| Understand the "why" | [METHODOLOGY.md](./METHODOLOGY.md) | 1-234 | -| Learn the architecture | [ARCHITECTURE.md](./ARCHITECTURE.md) | 1-1515 | -| Run AI coding sessions | [SESSION-GUIDES.md](./SESSION-GUIDES.md) | 1-351 | -| Write Gherkin specs | [GHERKIN-PATTERNS.md](./GHERKIN-PATTERNS.md) | 1-343 | -| Enforce delivery process rules | [PROCESS-GUARD.md](./PROCESS-GUARD.md) | 1-335 | -| Validate annotation quality | [VALIDATION.md](./VALIDATION.md) | 1-206 | -| Query process state via CLI | [PROCESS-API.md](./PROCESS-API.md) | 1-259 | -| Look up tag definitions | [INSTRUCTIONS.md](../INSTRUCTIONS.md) | 1-344 | -| Understand the taxonomy | [TAXONOMY.md](./TAXONOMY.md) | 1-95 | -| Publish to npm | [PUBLISHING.md](./PUBLISHING.md) | 1-149 | +| Understand the "why" | [METHODOLOGY.md](./METHODOLOGY.md) | 1-238 | +| Learn the architecture | [ARCHITECTURE.md](./ARCHITECTURE.md) | 1-1638 | +| Run AI coding sessions | [SESSION-GUIDES.md](./SESSION-GUIDES.md) | 1-389 | +| Write Gherkin specs | [GHERKIN-PATTERNS.md](./GHERKIN-PATTERNS.md) | 1-515 | +| Enforce delivery process rules | [PROCESS-GUARD.md](./PROCESS-GUARD.md) | 1-341 | +| Validate annotation quality | [VALIDATION.md](./VALIDATION.md) | 1-281 | +| Query process state via CLI | [PROCESS-API.md](./PROCESS-API.md) | 1-507 | +| Understand the taxonomy | [TAXONOMY.md](./TAXONOMY.md) | 1-105 | +| Publish to npm | [PUBLISHING.md](./PUBLISHING.md) | 1-144 | +| Learn annotation patterns | [ANNOTATION-GUIDE.md](./ANNOTATION-GUIDE.md) | 1-268 | +| Review the changelog | [CHANGELOG.md](../CHANGELOG.md) | 1-26 | +| Security policy | [SECURITY.md](../SECURITY.md) | 1-21 | --- @@ -48,7 +50,7 @@ 5. **[PROCESS-API.md](./PROCESS-API.md)** — Data API CLI query interface 6. **[SESSION-GUIDES.md](./SESSION-GUIDES.md)** — Planning/Design/Implementation workflows 7. **[GHERKIN-PATTERNS.md](./GHERKIN-PATTERNS.md)** — Writing effective Gherkin specs -8. **[INSTRUCTIONS.md](../INSTRUCTIONS.md)** — Complete tag and CLI reference +8. **[ANNOTATION-GUIDE.md](./ANNOTATION-GUIDE.md)** — Annotation mechanics, shape extraction, tag quick reference ### For Team Leads / CI @@ -59,22 +61,27 @@ ## Detailed Table of Contents -### README.md (Lines 1-377) - -| Section | Lines | Key Topics | -| -------------------------- | ------- | --------------------------------------------- | -| The Problem / The Solution | 16-33 | Documentation drift, code as source of truth | -| Built for AI-Assisted Dev | 36-57 | Data API CLI typed queries | -| How It Works | 60-111 | Annotation examples, dual-source | -| Quick Start | 114-170 | Install, annotate, generate, lint | -| CLI Commands | 173-183 | Command summary table | -| FSM-Enforced Workflow | 187-217 | State diagram, protection levels | -| Data API CLI | 221-246 | CLI example, context cost comparison | -| Rich Relationship Model | 269-291 | Dependency tags, Mermaid graph | -| How It Compares | 294-309 | Comparison with Backstage, Confluence, etc. | -| Use Cases | 312-322 | Multi-phase roadmaps, AI sessions, validation | -| Configuration | 325-346 | Presets table, custom config | -| Documentation | 350-359 | Doc links table | +### README.md (Lines 1-504) + +| Section | Lines | Key Topics | +| ------------------------- | ------- | ------------------------------------------------- | +| Why This Exists | 17-31 | AI context failure, code as source of truth | +| Built for AI-Assisted Dev | 33-50 | Data API CLI typed queries | +| Quick Start | 52-109 | Install, annotate, generate, lint | +| How It Works | 111-165 | Annotation examples, pipeline one-liner | +| What Gets Generated | 167-184 | Content block types, config-driven generation | +| CLI Commands | 186-254 | generate-docs, process-api, generate-tag-taxonomy | +| Proven at Scale | 256-303 | Discovery, real results, 3-session MVP | +| FSM-Enforced Workflow | 305-337 | State diagram, protection levels | +| Data API CLI | 339-365 | CLI example, context cost comparison | +| Rich Relationship Model | 367-390 | Dependency tags, Mermaid graph | +| How It Compares | 392-414 | Comparison with Backstage, Mintlify, etc. | +| Design-First Development | 416-420 | Stub pattern summary + link | +| Document Durability Model | 422-426 | Durability hierarchy summary + link | +| Use Cases | 428-439 | Multi-phase roadmaps, AI sessions, validation | +| Configuration | 441-475 | Presets table, custom config | +| Documentation | 477-500 | Doc links table | +| License | 502-504 | MIT license | --- @@ -87,169 +94,194 @@ | Unified Config File | 154-244 | defineConfig(), sources, output, gen overrides | | Custom Configuration | 248-295 | Custom tag prefix, custom categories | | Programmatic Config | 299-331 | loadProjectConfig(), mergeSourcesForGenerator() | -| Backward Compatibility | 335-345 | Legacy createDeliveryProcess() support | +| Backward Compatibility | 336-346 | Legacy createDeliveryProcess() support | +| Related Documentation | 350-357 | Links to README, TAXONOMY, ARCHITECTURE | --- -### METHODOLOGY.md (Lines 1-234) +### METHODOLOGY.md (Lines 1-238) -| Section | Lines | Key Topics | -| --------------------------- | ------- | ---------------------------------------- | -| Core Thesis | 9-30 | USDP inversion, event sourcing analogy | -| Dogfooding | 34-64 | Real annotation examples from codebase | -| Four-Stage Workflow | 68-84 | Ideation → Design → Planning → Coding | -| Annotation Ownership | 87-137 | Split-ownership principle, example split | -| Two-Tier Spec Architecture | 140-153 | Roadmap tier vs Package tier | -| Code Stubs | 156-177 | Minimal, Interface, Partial levels | -| Planning Stubs Architecture | 180-198 | tests/planning-stubs/ exclusion pattern | +| Section | Lines | Key Topics | +| -------------------------- | ------- | ---------------------------------------- | +| Core Thesis | 9-30 | USDP inversion, event sourcing analogy | +| Dogfooding | 34-68 | Real annotation examples from codebase | +| Session Workflow | 72-87 | Planning → Design → Implementation | +| Annotation Ownership | 91-140 | Split-ownership principle, example split | +| Two-Tier Spec Architecture | 144-156 | Roadmap tier vs Package tier | +| Code Stubs | 160-180 | Minimal, Interface, Partial levels | +| Stubs Architecture | 184-226 | Design stubs + planning stubs locations | +| Related Documentation | 230-238 | Links to PROCESS-GUARD, CONFIG, GHERKIN | --- -### ARCHITECTURE.md (Lines 1-1515) - -| Section | Lines | Key Topics | -| -------------------------- | --------- | ---------------------------------------------------------------- | -| Executive Summary | 28-69 | What it does, key principles (incl. Single Read Model), overview | -| Configuration Architecture | 70-139 | Entry point, pipeline effects, resolution | -| Four-Stage Pipeline | 140-321 | Scanner → Extractor → Pipeline Factory → Transformer → Codec | -| Unified Transformation | 322-448 | MasterDataset schema (10-field relationshipIndex), single-pass | -| Codec Architecture | 449-494 | Concepts, block vocabulary, factory | -| Available Codecs | 495-759 | All 16 codecs with options tables | -| Progressive Disclosure | 760-805 | Split logic, detail levels | -| Source Systems | 806-912 | TypeScript scanner, Gherkin scanner | -| Key Design Patterns | 913-993 | Result monad, schema-first, tag registry | -| Data Flow Diagrams | 994-1178 | Pipeline flow, factory entry point, MasterDataset views, codecs | -| Workflow Integration | 1179-1289 | Planning, implementing, release workflows | -| Programmatic Usage | 1290-1346 | Direct codec usage, generateDocument | -| Extending the System | 1347-1415 | Custom codec, custom generator | -| Quick Reference | 1416-1487 | Codec-to-generator mapping, CLI, filters | +### ARCHITECTURE.md (Lines 1-1638) + +| Section | Lines | Key Topics | +| -------------------------- | --------- | ----------------------------------------------------------------- | +| Executive Summary | 28-69 | What it does, key principles (incl. Single Read Model), overview | +| Configuration Architecture | 70-139 | Entry point, pipeline effects, resolution | +| Four-Stage Pipeline | 140-343 | Scanner → Extractor → Pipeline Factory → Transformer → Codec | +| Unified Transformation | 345-478 | MasterDataset schema (relationshipIndex + archIndex), single-pass | +| Codec Architecture | 481-527 | Concepts, block vocabulary, factory, 3 renderers | +| Available Codecs | 529-870 | All 20 codecs with options tables | +| Progressive Disclosure | 871-917 | Split logic, detail levels | +| Source Systems | 919-1024 | TypeScript scanner, Gherkin scanner | +| Key Design Patterns | 1026-1105 | Result monad, schema-first, tag registry | +| Data Flow Diagrams | 1107-1290 | Pipeline flow, factory entry point, MasterDataset views, codecs | +| Workflow Integration | 1292-1401 | Planning, implementing, release workflows | +| Programmatic Usage | 1403-1458 | Direct codec usage, generateDocument | +| Extending the System | 1460-1527 | Custom codec, custom generator | +| Quick Reference | 1529-1604 | Codec-to-generator mapping, CLI, filters | #### Available Codecs Reference -| Codec | Lines | Output Files | -| ------------------------- | ------- | --------------------------- | -| PatternsDocumentCodec | 502-521 | PATTERNS.md, patterns/\*.md | -| RequirementsDocumentCodec | 523-545 | PRODUCT-REQUIREMENTS.md | -| RoadmapDocumentCodec | 547-564 | ROADMAP.md, phases/\*.md | -| CompletedMilestonesCodec | 566-573 | COMPLETED-MILESTONES.md | -| CurrentWorkCodec | 575-582 | CURRENT-WORK.md | -| ChangelogCodec | 584-602 | CHANGELOG.md | -| SessionContextCodec | 604-611 | SESSION-CONTEXT.md | -| RemainingWorkCodec | 613-635 | REMAINING-WORK.md | -| PlanningChecklistCodec | 637-641 | PLANNING-CHECKLIST.md | -| SessionPlanCodec | 643-647 | SESSION-PLAN.md | -| SessionFindingsCodec | 649-664 | SESSION-FINDINGS.md | -| AdrDocumentCodec | 666-673 | DECISIONS.md | -| PrChangesCodec | 675-679 | working/PR-CHANGES.md | -| TraceabilityCodec | 681-685 | TRACEABILITY.md | -| OverviewCodec | 687-693 | OVERVIEW.md | +| Codec | Lines | Output Files | +| ------------------------- | ------- | ------------------------------------- | +| PatternsDocumentCodec | 536-556 | PATTERNS.md, patterns/\*.md | +| RequirementsDocumentCodec | 557-578 | PRODUCT-REQUIREMENTS.md | +| RoadmapDocumentCodec | 581-598 | ROADMAP.md, phases/\*.md | +| CompletedMilestonesCodec | 600-607 | COMPLETED-MILESTONES.md | +| CurrentWorkCodec | 609-616 | CURRENT-WORK.md | +| ChangelogCodec | 618-634 | CHANGELOG.md | +| SessionContextCodec | 638-645 | SESSION-CONTEXT.md | +| RemainingWorkCodec | 647-667 | REMAINING-WORK.md | +| PlanningChecklistCodec | 671-675 | PLANNING-CHECKLIST.md | +| SessionPlanCodec | 677-681 | SESSION-PLAN.md | +| SessionFindingsCodec | 683-696 | SESSION-FINDINGS.md | +| AdrDocumentCodec | 700-707 | DECISIONS.md | +| PrChangesCodec | 709-713 | working/PR-CHANGES.md | +| TraceabilityCodec | 715-719 | TRACEABILITY.md | +| OverviewCodec | 721-725 | OVERVIEW.md | +| BusinessRulesCodec | 727-749 | BUSINESS-RULES.md | +| ArchitectureDocumentCodec | 751-766 | ARCHITECTURE.md (generated) | +| TaxonomyDocumentCodec | 768-784 | TAXONOMY.md, taxonomy/\*.md | +| ValidationRulesCodec | 786-804 | VALIDATION-RULES.md, validation/\*.md | +| ReferenceCodec | 808-850 | Configured per-instance | --- -### SESSION-GUIDES.md (Lines 1-351) +### SESSION-GUIDES.md (Lines 1-389) -| Section | Lines | Key Topics | -| ------------------------ | ------- | ---------------------------------------- | -| Session Decision Tree | 7-24 | Which session type to use | -| Planning Session | 27-83 | Create roadmap spec, checklist, do NOT | -| Design Session | 86-132 | When required, checklist, code stubs | -| Implementation Session | 135-192 | Pre-flight, execution, FSM transitions | -| Planning + Design | 195-274 | Combined workflow, handoff complete when | -| Handoff Documentation | 277-313 | Template, discovery tags | -| FSM Protection Quick Ref | 316-326 | State protection levels table | +| Section | Lines | Key Topics | +| ------------------------ | ------- | ------------------------------------------ | +| Session Decision Tree | 7-25 | Which session type to use | +| Planning Session | 27-91 | Context gathering, checklist, do NOT | +| Design Session | 93-161 | Context gathering, when required, stubs | +| Implementation Session | 163-235 | scope-validate, execution, FSM transitions | +| Planning + Design | 237-317 | Combined workflow, handoff complete when | +| Handoff Documentation | 319-365 | CLI handoff, template, discovery tags | +| FSM Protection Quick Ref | 367-376 | State protection levels table | +| Related Documentation | 380-389 | Links to Methodology, Gherkin, Config, etc | --- -### GHERKIN-PATTERNS.md (Lines 1-343) - -| Section | Lines | Key Topics | -| --------------------------- | ------- | ------------------------------------------- | -| Essential Patterns | 9-152 | Roadmap spec, Rule blocks, Scenario Outline | -| — Roadmap Spec Structure | 11-45 | Tags, Problem/Solution, Background table | -| — Rule Blocks | 46-79 | Business constraints, ScenarioOutline | -| — Scenario Outline | 81-98 | Examples table for variations | -| — Executable Test Feature | 100-150 | Section dividers, behavior verification | -| DataTable & DocString Usage | 155-202 | Background vs Scenario tables, code blocks | -| Tag Conventions | 205-223 | @happy-path, @edge-case, @validation, etc. | -| Feature File Rich Content | 226-323 | Code-first, Rule annotations, syntax notes | -| Quick Reference | 326-335 | Element-to-use-case mapping table | +### GHERKIN-PATTERNS.md (Lines 1-515) + +| Section | Lines | Key Topics | +| --------------------------- | ------- | ------------------------------------------------------- | +| Essential Patterns | 9-152 | Roadmap spec, Rule blocks, Scenario Outline | +| — Roadmap Spec Structure | 11-45 | Tags, Problem/Solution, Background table | +| — Rule Blocks | 47-79 | Business constraints, ScenarioOutline | +| — Scenario Outline | 82-98 | Examples table for variations | +| — Executable Test Feature | 101-150 | Section dividers, behavior verification | +| DataTable & DocString Usage | 155-202 | Background vs Scenario tables, code blocks | +| Tag Conventions | 205-243 | Semantic tags, convention tags, combining | +| Feature File Rich Content | 246-344 | Code-first, Rule annotations, syntax notes | +| Step Linting | 346-493 | lint-steps rules, CLI, feature/step/cross-file checks | +| Quick Reference | 495-506 | Element-to-use-case mapping table | +| Related Documentation | 508-515 | Links to ANNOTATION-GUIDE, TAXONOMY, CONFIG, VALIDATION | --- -### PROCESS-GUARD.md (Lines 1-335) - -| Section | Lines | Key Topics | -| -------------------------------- | ------- | --------------------------------------- | -| Quick Reference | 9-37 | Protection levels, transitions, escapes | -| Error: completed-protection | 40-65 | Fix with unlock reason | -| Error: invalid-status-transition | 68-98 | Follow FSM path, common invalid table | -| Error: scope-creep | 101-124 | Remove deliverable or revert status | -| Warning: session-scope | 127-146 | Add to scope or --ignore-session | -| Error: session-excluded | 149-168 | Remove from exclusion or override | -| Warning: deliverable-removed | 171-184 | Informational, document if intentional | -| CLI Usage | 187-235 | Modes, options, exit codes, examples | -| Pre-commit Setup | 238-260 | Husky, package.json scripts | -| Programmatic API | 263-311 | Full code example, API functions table | -| Architecture | 314-326 | Decider pattern diagram | +### PROCESS-API.md (Lines 1-507) + +| Section | Lines | Key Topics | +| ------------------------- | ------- | ----------------------------------------------------------- | +| Why Use This | 12-28 | Context cost comparison, AI agent tiers, two output modes | +| Quick Start | 30-63 | Session recipe (overview → scope-validate → context) | +| Session Types | 65-77 | planning/design/implement decision tree | +| Session Workflow Commands | 79-204 | overview, scope-validate, context, dep-tree, files, handoff | +| Pattern Discovery | 206-302 | status, list, search, pattern, stubs, decisions, pdr, rules | +| Architecture Queries | 304-333 | 11 arch subcommands table, examples | +| Metadata & Inventory | 335-375 | tags, sources, unannotated, query escape hatch | +| Output Reference | 377-465 | Options, modifiers, filters, JSON envelope, exit codes | +| Common Recipes | 467-507 | Starting, finding work, investigating, design, ending | --- -### VALIDATION.md (Lines 1-206) +### PROCESS-GUARD.md (Lines 1-341) + +| Section | Lines | Key Topics | +| -------------------------------- | ------- | ----------------------------------------------- | +| Quick Reference | 9-37 | Protection levels, transitions, escapes | +| Error: completed-protection | 40-72 | Fix with unlock reason, validation requirements | +| Error: invalid-status-transition | 74-105 | Follow FSM path, common invalid table | +| Error: scope-creep | 107-131 | Remove deliverable or revert status | +| Warning: session-scope | 133-153 | Add to scope or --ignore-session | +| Error: session-excluded | 155-175 | Remove from exclusion or override | +| Warning: deliverable-removed | 177-191 | Informational, document if intentional | +| CLI Usage | 193-243 | Modes, options (incl. --base-dir), exit codes | +| Pre-commit Setup | 246-269 | Husky, package.json scripts | +| Programmatic API | 271-318 | Full code example, API functions table | +| Architecture | 321-333 | Decider pattern diagram | +| Related Documentation | 335-341 | Links to METHODOLOGY, TAXONOMY, VALIDATION | + +--- -| Section | Lines | Key Topics | -| ----------------- | ------- | ------------------------------------- | -| Which Command? | 7-20 | Decision tree for validation commands | -| Command Summary | 22-30 | lint-patterns, lint-process, validate | -| lint-patterns | 33-56 | Rules table, CLI reference | -| lint-process | 59-81 | What it validates, reference links | -| validate-patterns | 84-124 | Checks available, anti-pattern, DoD | -| CI/CD Integration | 127-158 | package.json scripts, GitHub Actions | -| Exit Codes | 161-170 | 0 = no errors, 1 = errors | -| Programmatic API | 173-188 | Import paths for all validators | +### VALIDATION.md (Lines 1-281) + +| Section | Lines | Key Topics | +| --------------------- | ------- | ------------------------------------------------- | +| Which Command? | 7-24 | Decision tree for validation commands | +| Command Summary | 26-35 | lint-patterns, lint-steps, lint-process, validate | +| lint-patterns | 37-74 | 8 rules table, CLI flags | +| lint-steps | 76-98 | 12 rules, 3 categories, vitest-cucumber traps | +| lint-process | 100-121 | What it validates, reference links | +| validate-patterns | 123-197 | CLI flags, checks, anti-patterns, DoD | +| CI/CD Integration | 199-238 | Consumer scripts, hooks, GitHub Actions | +| Exit Codes | 240-248 | Per-command exit code table | +| Programmatic API | 250-272 | Import paths for all validators | +| Related Documentation | 274-281 | Links to GHERKIN-PATTERNS, PROCESS-GUARD, CONFIG | --- -### INSTRUCTIONS.md (Lines 1-344) - -| Section | Lines | Key Topics | -| -------------------------- | ------- | ------------------------------------- | -| File-Level Opt-In | 23-43 | Preset markers, basic usage | -| Category Tags | 46-81 | All 21 DDD-ES-CQRS categories table | -| Metadata Tags | 84-159 | Core, relationship, process, PRD, ADR | -| Aggregation Tags | 162-171 | overview, decision, intro routing | -| CLI: generate-docs | 176-204 | All flags, basic usage | -| CLI: lint-patterns | 207-226 | Flags, exit codes | -| CLI: lint-process | 229-250 | Flags, exit codes | -| CLI: validate-patterns | 253-277 | Flags, exit codes | -| CLI: generate-tag-taxonomy | 280-292 | Flags for taxonomy generation | -| Gherkin Integration | 295-331 | @pattern:\* tags, process metadata | +### TAXONOMY.md (Lines 1-105) + +| Section | Lines | Key Topics | +| --------------------- | ------- | -------------------------------------------- | +| Concept | 7-18 | What taxonomy defines, FSM states | +| Architecture | 22-65 | File structure, TagRegistry, presets | +| Format Types | 69-80 | flag, value, enum, csv, number, quoted-value | +| Generating Reference | 84-96 | generate-docs (preferred), deprecated CLI | +| Related Documentation | 100-105 | Links to CONFIGURATION, METHODOLOGY | --- -### TAXONOMY.md (Lines 1-95) +### PUBLISHING.md (Lines 1-144) -| Section | Lines | Key Topics | -| -------------------- | ----- | -------------------------------------- | -| Concept | 7-19 | What taxonomy defines | -| Architecture | 22-57 | File structure, TagRegistry, presets | -| Format Types | 60-73 | flag, value, enum, csv, number, quoted | -| Generating Reference | 76-84 | generate-tag-taxonomy command | +| Section | Lines | Key Topics | +| ----------------------------- | ------- | ------------------------------------ | +| Prerequisites | 5-9 | npm account, login, tests | +| Version Strategy | 11-18 | Semantic versioning, pre/latest tags | +| Publishing Workflow | 20-67 | Pre-releases, subsequent, stable | +| Automated Publishing | 69-85 | GitHub Actions, provenance | +| Pre-commit and Pre-push Hooks | 87-99 | Husky hooks, lint-staged, typecheck | +| Dry Run | 101-109 | Test before publishing | +| Verifying a Published Package | 111-126 | npm view, test install | +| Troubleshooting | 128-144 | Auth errors, package not found | --- -### PUBLISHING.md (Lines 1-149) +### ANNOTATION-GUIDE.md (Lines 1-268) -| Section | Lines | Key Topics | -| -------------------- | ------- | ------------------------------------ | -| Prerequisites | 5-9 | npm account, login, tests | -| Version Strategy | 11-19 | Semantic versioning, pre/latest tags | -| Pre-releases | 23-45 | First pre-release, subsequent | -| Stable Releases | 48-61 | patch, minor, major | -| Automated Publishing | 63-78 | GitHub Actions workflow | -| Pre-commit/Pre-push | 80-96 | Husky hooks, dist sync verification | -| Dry Run | 98-105 | Test before publishing | -| Verifying Published | 107-119 | npm view, test install | -| Troubleshooting | 121-149 | dist sync, auth errors, not found | +| Section | Lines | Key Topics | +| -------------------------------- | ------- | ------------------------------------------------------ | +| Getting Started | 9-67 | Opt-in marker, TS/Gherkin examples, presets, ownership | +| Shape Extraction | 69-125 | 3 modes: explicit, wildcard, declaration-level | +| Annotation Patterns by File Type | 127-191 | Zod, interface, function, Gherkin examples | +| Tag Groups Quick Reference | 193-223 | 12 groups with representative tags and format types | +| Verification | 225-257 | CLI commands, common issues table | +| Related Documentation | 259-268 | Links to TAXONOMY, CONFIGURATION, ARCHITECTURE | --- @@ -273,13 +305,17 @@ roadmap ──→ active ──→ completed deferred ──→ roadmap ``` -### Data API CLI +### Data API CLI — Primary Context Source + +The CLI is the **recommended way** to gather context in any session type. +It queries annotated sources in real time — not generated snapshots. +See [PROCESS-API.md](./PROCESS-API.md). ```bash -pnpm process:query -- query getCurrentWork # What's active -pnpm process:query -- query getRoadmapItems # What can be started -pnpm process:query -- query isValidTransition roadmap active -pnpm process:query -- pattern TransformDataset +pnpm process:query -- scope-validate MyPattern implement # ALWAYS run first +pnpm process:query -- context MyPattern --session implement # Curated context bundle +pnpm process:query -- files MyPattern --related # Implementation paths +pnpm process:query -- handoff --pattern MyPattern # Capture session end state ``` --- @@ -297,6 +333,21 @@ pnpm process:query -- pattern TransformDataset | GHERKIN-PATTERNS.md | Writers | Specs — writing effective Gherkin | | PROCESS-GUARD.md | Team Leads | Governance — enforcement rules | | VALIDATION.md | CI/CD | Quality — automated checks | -| INSTRUCTIONS.md | Reference | Lookup — tag and CLI reference | -| TAXONOMY.md | Reference | Lookup — tag format definitions | +| TAXONOMY.md | Reference | Lookup — tag taxonomy and API | +| ANNOTATION-GUIDE.md | Developers | Reference — annotation mechanics | | PUBLISHING.md | Maintainers | Release — npm publishing | +| CHANGELOG.md | Everyone | Version history and changes | +| SECURITY.md | Everyone | Security policy and reporting | + +--- + +## Auto-Generated Documentation + +The `docs-live/` directory contains documentation **generated from annotated sources** using the codec pipeline. These files should not be edited manually — regenerate with `pnpm docs:all` or `pnpm docs:product-areas`. + +| Directory | Contents | Generated By | +| -------------------------- | ---------------------------------------------------- | -------------------- | +| `docs-live/product-areas/` | 7 product area docs with diagrams and shapes | `docs:product-areas` | +| `docs-live/decisions/` | Architecture Decision Records (ADR-001–006, ADR-021) | `docs:all` | +| `docs-live/_claude-md/` | Compact AI context modules per product area | `docs:product-areas` | +| `docs-live/` | DECISIONS.md, PRODUCT-AREAS.md (indexes) | `docs:all` | diff --git a/docs/METHODOLOGY.md b/docs/METHODOLOGY.md index 19035bea..f81d11c9 100644 --- a/docs/METHODOLOGY.md +++ b/docs/METHODOLOGY.md @@ -2,7 +2,7 @@ > **Git is the event store. Documentation artifacts are projections. Annotated code is the single source of truth.** -This document explains the _why_ behind `@libar-dev/delivery-process`. For _how_, see [INSTRUCTIONS.md](../INSTRUCTIONS.md). +This document explains the _why_ behind `@libar-dev/delivery-process`. For _how_, see [README.md](../README.md) and [TAXONOMY.md](./TAXONOMY.md). --- @@ -35,52 +35,56 @@ When you run `generate-docs`, you're rebuilding read models from the event strea Every pattern in this package uses its own annotation system. Real examples: -**ProcessGuardDecider** (pure validation logic): +**Document Extractor** (pattern extraction): ```typescript /** * @libar-docs - * @libar-docs-pattern ProcessGuardDecider + * @libar-docs-pattern Document Extractor * @libar-docs-status completed - * @libar-docs-uses FSMTransitions, FSMStates - * @libar-docs-used-by LintModule + * @libar-docs-uses Pattern Scanner, Tag Registry, Zod + * @libar-docs-used-by Orchestrator, Generators */ -export function validateChanges(input: ValidationInput): ValidationOutput { ... } +export function extractPatterns( + scannedFiles: readonly ScannedFile[], baseDir: string, registry?: TagRegistry +): ExtractionResults { ... } ``` -**PatternScanner** (file discovery): +**Pattern Scanner** (file discovery): ```typescript /** * @libar-docs - * @libar-docs-pattern PatternScanner + * @libar-docs-pattern Pattern Scanner * @libar-docs-status completed - * @libar-docs-uses GherkinASTParser, TypeScriptASTParser - * @libar-docs-used-by Orchestrator, DualSourceExtractor + * @libar-docs-uses glob, AST Parser + * @libar-docs-used-by Doc Extractor, Orchestrator */ -export async function scanPatterns(config: ScanConfig): Promise { ... } +export async function scanPatterns( + config: ScannerConfig, registry?: TagRegistry +): Promise> { ... } ``` Run `pnpm docs:patterns` and these annotations become a searchable pattern registry with dependency graphs. --- -## Four-Stage Workflow +## Session Workflow -| Stage | Input | Output | FSM State | -| ------------ | ------------------- | --------------------------- | ------------------------------------ | -| **Ideation** | Pattern brief | Roadmap spec (`.feature`) | `roadmap` | -| **Design** | Complex requirement | Decision specs + code stubs | `roadmap` | -| **Planning** | Roadmap spec | Implementation plan | `roadmap` | -| **Coding** | Implementation plan | Code + tests | `roadmap` -> `active` -> `completed` | +| Session | Input | Output | FSM State | +| --------------------- | ------------------- | --------------------------- | ---------------------------------- | +| **Planning** | Pattern brief | Roadmap spec (`.feature`) | Creates `roadmap` | +| **Design** | Complex requirement | Decision specs + code stubs | None | +| **Implementation** | Roadmap spec | Code + tests | `roadmap` → `active` → `completed` | +| **Planning + Design** | Pattern brief | Spec + stubs | Creates `roadmap` | -**When to skip stages:** +**When to skip sessions:** -| Skip | When | -| -------- | ----------------------------------------------------- | -| Design | Single valid approach, straightforward implementation | -| Planning | Single-session work, clear scope | -| Neither | Multi-session work, architectural decisions | +| Skip | When | +| ----------------- | ----------------------------------------------------- | +| Design | Single valid approach, straightforward implementation | +| Planning + Design | Ready to code, clear scope, no decisions | +| Neither | Multi-session work, architectural decisions | --- @@ -139,10 +143,10 @@ Note: Code stubs must NOT use `@-pattern`. The feature file is the canon ## Two-Tier Spec Architecture -| Tier | Location | Purpose | Executable | -| ----------- | ----------------------- | ------------------------------------------- | ---------- | -| **Roadmap** | `specs/{area}/` | Planning, deliverables, acceptance criteria | No | -| **Package** | `{pkg}/tests/features/` | Implementation proof, regression testing | Yes | +| Tier | Location | Purpose | Executable | +| ----------- | ------------------------- | ------------------------------------------- | ---------- | +| **Roadmap** | `delivery-process/specs/` | Planning, deliverables, acceptance criteria | No | +| **Package** | `{pkg}/tests/features/` | Implementation proof, regression testing | Yes | **Traceability:** @@ -165,7 +169,7 @@ Code is the source of truth. Feature files reference code, not duplicate it. * ## Reservation Pattern - TTL-Based Pre-Creation Uniqueness */ export function reserve(ctx: MutationCtx, args: ReserveArgs): Promise { - throw new Error('Not yet implemented - roadmap pattern'); + throw new Error('ReservationPattern not yet implemented - roadmap pattern'); } ``` @@ -231,4 +235,4 @@ This avoids `.skip()` (forbidden by test safety policy) while preserving plannin | [PROCESS-GUARD.md](./PROCESS-GUARD.md) | FSM validation rules, protection levels, CLI | | [CONFIGURATION.md](./CONFIGURATION.md) | Tag prefixes, presets, customization | | [GHERKIN-PATTERNS.md](./GHERKIN-PATTERNS.md) | Writing effective specs | -| [INSTRUCTIONS.md](../INSTRUCTIONS.md) | Complete tag reference | +| [TAXONOMY.md](./TAXONOMY.md) | Tag taxonomy concepts and API | diff --git a/docs/PROCESS-API.md b/docs/PROCESS-API.md index 5c880849..e34db6c7 100644 --- a/docs/PROCESS-API.md +++ b/docs/PROCESS-API.md @@ -1,50 +1,216 @@ -# Process API CLI +# Data API CLI -> Query delivery process state directly from the command line. +> Query delivery process state directly from annotated source code. + +> **For AI coding agents:** Start every session with these three commands: +> +> 1. `overview` — project health +> 2. `scope-validate ` — catches blockers before you start +> 3. `context --session ` — curated context bundle --- -## Overview +## Why Use This + +Traditional approach: read generated Markdown, parse it mentally, hope it's current. This CLI queries the **same annotated sources** that generate those docs — in real time, with typed output. -The `process-api` CLI provides query subcommands with JSON output. It delegates to the shared pipeline factory (`buildMasterDataset()`) to build a MasterDataset from annotated sources, then routes queries to the internal query layer. +| Approach | Context Cost | Accuracy | Speed | +| ------------------------ | ------------ | --------------------- | ------- | +| Parse generated Markdown | High | Snapshot at gen time | Slow | +| **Data API CLI** | **Low** | Real-time from source | Instant | -**Primary use case:** Claude Code sessions querying delivery state without regenerating markdown documentation. +The CLI has two output modes: -**Key benefits:** +- **Text commands** (6) — formatted for terminal reading or AI context. Use `===` section markers for structure. +- **JSON commands** (12+) — wrapped in a `QueryResult` envelope. Pipeable to `jq`. -- Real-time queries from annotated source code -- JSON output, pipeable to `jq` for filtering -- 5-10x smaller context than reading generated docs -- Same data as generated documentation, different access pattern +Run `process-api --help` for the full command reference with all flags and 26 available API methods. --- ## Quick Start +The recommended session startup is three commands: + ```bash -# Overall delivery status -pnpm process:query -- status +# 1. Project health — progress, active phases, blockers +pnpm process:query -- overview + +# 2. Pre-flight check — catches FSM violations before you start +pnpm process:query -- scope-validate MyPattern implement + +# 3. Curated context — tailored to your session type +pnpm process:query -- context MyPattern --session implement +``` + +Example `overview` output: + +``` +=== PROGRESS === +318 patterns (224 completed, 47 active, 47 planned) = 70% + +=== ACTIVE PHASES === +Phase 24: ProcessStateAPIRelationshipQueries (1 active) +Phase 25: DataAPIStubIntegration (1 active) + +=== BLOCKING === +StepLintExtendedRules blocked by: StepLintVitestCucumber + +=== DATA API — Use Instead of Explore Agents === +pnpm process:query -- + overview, context, scope-validate, dep-tree, list, stubs, files, rules, arch blocking +``` + +--- + +## Session Types + +The `--session` flag tailors output to what you need right now: + +| Type | Includes | When to Use | +| ----------- | -------------------------------------------- | ---------------------------------- | +| `planning` | Pattern metadata and spec file only | Creating a new roadmap spec | +| `design` | Full: metadata, stubs, deps, deliverables | Making architectural decisions | +| `implement` | Focused: deliverables, FSM state, test files | Writing code from an existing spec | + +**Decision tree:** Starting to code? `implement`. Complex decisions? `design`. New pattern? `planning`. Not sure? Run `overview` first. + +--- + +## Session Workflow Commands + +These 6 commands output structured text (not JSON). They are designed for terminal reading and AI context consumption. + +### `overview` + +Executive summary: progress percentage, active phases, blocking patterns, and a CLI cheat sheet. + +```bash +pnpm process:query -- overview +``` + +### `scope-validate` + +**Highest-impact command.** Pre-flight readiness check that prevents wasted sessions. Returns a PASS/BLOCKED/WARN verdict covering: dependency completion, deliverable definitions, FSM transition validity, and design decisions. + +```bash +pnpm process:query -- scope-validate MyPattern implement +``` + +Checks: dependency completion, deliverable definitions, FSM transition validity, design decisions, executable spec location. + +Example output: + +``` +=== SCOPE VALIDATION: DataAPIDesignSessionSupport (implement) === + +=== CHECKLIST === +[PASS] Dependencies completed: 2/2 completed +[PASS] Deliverables defined: 4 deliverable(s) found +[BLOCKED] FSM allows transition: completed → active is not valid. +[WARN] Design decisions recorded: No PDR/AD references found in stubs -# What's currently being worked on? -pnpm process:query -- query getCurrentWork +=== VERDICT === +BLOCKED: 1 blocker(s) prevent implement session +``` + +Valid session types for scope-validate: `implement`, `design`. + +### `context` + +Curated context bundle tailored to session type. + +```bash +pnpm process:query -- context MyPattern --session design +``` + +Example output: + +``` +=== PATTERN: ContextAssemblerImpl === +Status: active | Category: pattern +## ContextAssembler — Session-Oriented Context Bundle Builder -# Full detail for a specific pattern -pnpm process:query -- pattern ProcessStateAPI +Pure function composition over MasterDataset. +File: src/api/context-assembler.ts -# Architecture: which bounded contexts exist? -pnpm process:query -- arch roles +=== DEPENDENCIES === +[active] ProcessStateAPI (implementation) src/api/process-state.ts +[completed] MasterDataset (implementation) src/validation-schemas/master-dataset.ts -# Architecture: what's in the scanner context? -pnpm process:query -- arch context scanner +=== CONSUMERS === +ContextFormatterImpl (active) +ProcessAPICLIImpl (active) + +=== ARCHITECTURE (context: api) === +MasterDataset (completed, read-model) +ProcessStateAPI (active, service) +... +``` + +### `dep-tree` + +Dependency chain with status indicators. Shows what a pattern depends on, recursively. + +```bash +pnpm process:query -- dep-tree MyPattern +pnpm process:query -- dep-tree MyPattern --depth 2 +``` + +### `files` + +File reading list with implementation paths. Use `--related` to include architecture neighbors. + +```bash +pnpm process:query -- files MyPattern +pnpm process:query -- files MyPattern --related +``` + +Example with `--related`: + +``` +=== PRIMARY === +src/cli/process-api.ts + +=== ARCHITECTURE NEIGHBORS === +src/cli/version.ts +src/cli/output-pipeline.ts +src/cli/error-handler.ts +``` + +### `handoff` + +Captures session-end state: deliverable statuses, blockers, and modification date. + +```bash +pnpm process:query -- handoff --pattern MyPattern +pnpm process:query -- handoff --pattern MyPattern --git # include recent commits +pnpm process:query -- handoff --pattern MyPattern --session my-session-id +``` + +Example output: + +``` +=== HANDOFF: DataAPIDesignSessionSupport (review) === +Date: 2026-02-21 | Status: completed + +=== COMPLETED === +[x] Scope validation logic (src/api/scope-validator.ts) +[x] Handoff document generator (src/api/handoff-generator.ts) + +=== BLOCKERS === +None ``` --- -## Subcommands +## Pattern Discovery + +These commands output JSON wrapped in a `QueryResult` envelope. ### `status` -Returns delivery status counts and completion percentage. +Status counts and completion percentage. ```bash pnpm process:query -- status @@ -52,208 +218,291 @@ pnpm process:query -- status **Output:** `{ counts: { completed, active, planned, total }, completionPercentage, distribution }` -### `query [args...]` +### `list` -Executes any query API method by name. +Filtered pattern listing. Composable with output modifiers and list filters. ```bash -pnpm process:query -- query getStatusCounts -pnpm process:query -- query getPatternsByPhase 18 -pnpm process:query -- query isValidTransition roadmap active -pnpm process:query -- query getPatternsByCategory projection +# All roadmap patterns +pnpm process:query -- list --status roadmap + +# Just names +pnpm process:query -- list --status roadmap --names-only + +# Count only +pnpm process:query -- list --status active --count + +# Specific fields +pnpm process:query -- list --phase 25 --fields patternName,status,file ``` -Integer-like arguments are automatically coerced to numbers. +See [Output Modifiers](#output-modifiers) and [List Filters](#list-filters) below for all options. -### `pattern ` +### `search` -Returns full detail for one pattern including deliverables, dependencies, and relationships. +Fuzzy name search with match scores. Suggests close matches when a pattern is not found. ```bash -pnpm process:query -- pattern OrderFulfillmentSaga +pnpm process:query -- search EventStore ``` -**Output:** Pattern metadata + deliverables array + dependencies + relationships (uses, usedBy, implementsPatterns, etc.) +### `pattern` -### `arch [args]` +Full detail for one pattern including deliverables, dependencies, and all relationship fields. -Architecture queries using `@libar-docs-arch-*` annotations. +```bash +pnpm process:query -- pattern TransformDataset +``` -| Subcommand | Description | Example | -| ------------------------ | ------------------------------------------ | ------------------------------ | -| `roles` | All arch-roles with pattern counts | `arch roles` | -| `context` | All bounded contexts | `arch context` | -| `context ` | Patterns in one bounded context | `arch context scanner` | -| `layer` | All architecture layers | `arch layer` | -| `layer ` | Patterns in one layer | `arch layer domain` | -| `neighborhood ` | Uses, usedBy, same-context siblings | `arch neighborhood EventStore` | -| `compare ` | Cross-context shared deps + integration | `arch compare scanner codec` | -| `coverage` | Annotation coverage analysis | `arch coverage` | -| `dangling` | Broken references (names that don't exist) | `arch dangling` | -| `orphans` | Patterns with no relationships (isolated) | `arch orphans` | -| `blocking` | Patterns blocked by incomplete deps | `arch blocking` | +**Warning:** Completed patterns can produce ~66KB of output. Prefer `context --session` for interactive sessions. + +### `stubs` + +Design stubs with target paths and resolution status. + +```bash +pnpm process:query -- stubs MyPattern # stubs for one pattern +pnpm process:query -- stubs --unresolved # only stubs missing target files +``` + +### `decisions` + +AD-N design decisions extracted from stub descriptions. + +```bash +pnpm process:query -- decisions MyPattern +``` + +**Note:** Returns exit code 1 when no decisions are found (unlike `list`/`search` which return empty arrays). + +### `pdr` + +Cross-reference patterns mentioning a PDR number. + +```bash +pnpm process:query -- pdr 1 +``` + +**Note:** Returns exit code 1 when no PDR references are found, same as `decisions`. ### `rules` -Query business rules extracted from Gherkin `Rule:` blocks, grouped by product area, phase, and feature. +Business rules and invariants extracted from Gherkin `Rule:` blocks, grouped by product area, phase, and feature. ```bash -# All rules across all product areas pnpm process:query -- rules - -# Filter by product area pnpm process:query -- rules --product-area Validation - -# Filter by pattern name pnpm process:query -- rules --pattern ProcessGuardDecider - -# Only rules with invariants pnpm process:query -- rules --only-invariants ``` -**Filters:** - -| Flag | Description | -| -------------------- | ------------------------------------------------- | -| `--product-area ` | Filter to rules in a specific product area | -| `--pattern ` | Filter to rules in a specific pattern | -| `--only-invariants` | Only show rules with `**Invariant:**` annotations | +**Warning:** Unfiltered `rules` output can exceed 600KB. Always use `--pattern` or `--product-area` filters. **Output shape:** `{ productAreas: [{ productArea, ruleCount, invariantCount, phases: [{ phase, features: [{ pattern, source, rules }] }] }], totalRules, totalInvariants }` --- -## CLI Options +## Architecture Queries -| Flag | Short | Description | Default | -| ---------------------- | ----- | ------------------------------------ | -------- | -| `--input ` | `-i` | TypeScript glob pattern (repeatable) | required | -| `--features ` | | Gherkin glob pattern (repeatable) | --- | -| `--base-dir ` | `-b` | Base directory | cwd | -| `--workflow ` | `-w` | Workflow config JSON | default | -| `--help` | `-h` | Show help | --- | -| `--version` | `-v` | Show version | --- | +All architecture queries output JSON. They use `@libar-docs-arch-*` annotations. -**Exit codes:** `0` success, `1` error (with message on stderr) +| Subcommand | Description | Example | +| ------------------------ | ------------------------------------------ | ------------------------------ | +| `arch roles` | All arch-roles with pattern counts | `arch roles` | +| `arch context` | All bounded contexts | `arch context` | +| `arch context ` | Patterns in one bounded context | `arch context scanner` | +| `arch layer` | All architecture layers | `arch layer` | +| `arch layer ` | Patterns in one layer | `arch layer domain` | +| `arch neighborhood

` | Uses, usedBy, dependsOn, same-context | `arch neighborhood EventStore` | +| `arch compare ` | Cross-context shared deps + integration | `arch compare scanner codec` | +| `arch coverage` | Annotation completeness across input files | `arch coverage` | +| `arch dangling` | Broken references (names that don't exist) | `arch dangling` | +| `arch orphans` | Patterns with no relationships (isolated) | `arch orphans` | +| `arch blocking` | Patterns blocked by incomplete deps | `arch blocking` | + +```bash +# What patterns are stuck? +pnpm process:query -- arch blocking + +# How well-annotated is the codebase? +pnpm process:query -- arch coverage + +# What does this pattern touch? +pnpm process:query -- arch neighborhood RulesQueryModule +``` --- -## Available API Methods +## Metadata & Inventory -All methods accessible via `query [args...]`. +### `tags` -### Status Queries +Tag usage report — counts per tag and value across all annotated sources. -| Method | Arguments | Returns | -| ------------------------------- | ---------------------------- | --------------------------------------- | -| `getPatternsByNormalizedStatus` | `completed\|active\|planned` | Patterns by normalized status | -| `getPatternsByStatus` | `` | Patterns by exact FSM status | -| `getStatusCounts` | --- | `{ completed, active, planned, total }` | -| `getStatusDistribution` | --- | Counts + percentages | -| `getCompletionPercentage` | --- | Integer 0-100 | +```bash +pnpm process:query -- tags +``` -### Phase Queries +### `sources` -| Method | Arguments | Returns | -| -------------------- | ---------- | ------------------------ | -| `getPatternsByPhase` | `` | Patterns in phase | -| `getPhaseProgress` | `` | Phase completion details | -| `getActivePhases` | --- | Phases with active work | -| `getAllPhases` | --- | All phases sorted | +File inventory by type (TypeScript, Gherkin, Stubs, Decisions). -### FSM Queries +```bash +pnpm process:query -- sources +``` -| Method | Arguments | Returns | -| ------------------------- | ------------- | ------------------------ | -| `isValidTransition` | ` ` | Boolean | -| `checkTransition` | ` ` | Detailed validation | -| `getValidTransitionsFrom` | `` | Valid target states | -| `getProtectionInfo` | `` | Protection level details | +### `unannotated` -### Pattern Queries +TypeScript files missing the `@libar-docs` opt-in marker. Use `--path` to scope to a directory. -| Method | Arguments | Returns | -| ------------------------- | ------------ | -------------------------------- | -| `getPattern` | `` | Full pattern detail | -| `getPatternDependencies` | `` | dependsOn, enables, uses, usedBy | -| `getPatternRelationships` | `` | All 10 relationship fields | -| `getRelatedPatterns` | `` | seeAlso values | -| `getApiReferences` | `` | apiRef values | -| `getPatternDeliverables` | `` | Deliverables with status | -| `getPatternsByCategory` | `` | Patterns in category | -| `getCategories` | --- | All categories with counts | +```bash +pnpm process:query -- unannotated +pnpm process:query -- unannotated --path src/types +``` -### Timeline Queries +### `query [args...]` -| Method | Arguments | Returns | -| ---------------------- | ----------- | -------------------------------- | -| `getPatternsByQuarter` | `` | Patterns in quarter | -| `getQuarters` | --- | All quarters sorted | -| `getCurrentWork` | --- | Active patterns | -| `getRoadmapItems` | --- | Roadmap + deferred patterns | -| `getRecentlyCompleted` | `[limit]` | Recently completed (default: 10) | +Execute any of the 26 query API methods directly by name. This is the escape hatch for methods not exposed as dedicated subcommands. -### Raw Access +```bash +pnpm process:query -- query getStatusCounts +pnpm process:query -- query isValidTransition roadmap active +pnpm process:query -- query getPatternsByPhase 18 +pnpm process:query -- query getRecentlyCompleted 5 +``` -| Method | Arguments | Returns | -| ------------------ | --------- | --------------------------------- | -| `getMasterDataset` | --- | Full MasterDataset with archIndex | +Integer-like arguments are automatically coerced to numbers. Run `process-api --help` for the full list of available API methods. --- -## Output Format +## Output Reference -All subcommands output JSON to stdout. Errors go to stderr. +### Global Options -```bash -# Pipe to jq for filtering -pnpm process:query -- query getPatternsByCategory projection | jq '.[].patternName' +| Flag | Short | Description | Default | +| ---------------------- | ----- | ------------------------------------ | ---------------------------- | +| `--input ` | `-i` | TypeScript glob pattern (repeatable) | from config or auto-detected | +| `--features ` | `-f` | Gherkin glob pattern (repeatable) | from config or auto-detected | +| `--base-dir

` | `-b` | Base directory | cwd | +| `--workflow ` | `-w` | Workflow config JSON | default | +| `--help` | `-h` | Show help | --- | +| `--version` | `-v` | Show version | --- | + +**Config auto-detection:** If `--input` and `--features` are not provided, the CLI loads defaults from `delivery-process.config.ts` in the current directory. If no config file exists, it falls back to filesystem-based detection. If neither works, `--input` is required. + +### Output Modifiers + +Composable with `list`, `arch context/layer`, and pattern-array `query` methods. + +| Modifier | Description | +| ---------------------- | --------------------------------------------- | +| `--names-only` | Return array of pattern name strings | +| `--count` | Return integer count | +| `--fields ` | Return only specified fields per pattern | +| `--full` | Bypass summarization, return raw patterns | +| `--format ` | `json` (default, pretty-printed) or `compact` | + +Valid fields for `--fields`: `patternName`, `status`, `category`, `phase`, `file`, `source`. + +Precedence: `--count` > `--names-only` > `--fields` > default summarize. + +**Note on summarization:** By default, pattern arrays are summarized to ~100 bytes per pattern (from ~3.5KB raw). Use `--full` to get complete pattern objects. + +### List Filters -# Check a transition -pnpm process:query -- query isValidTransition roadmap active | jq '.valid // .' +For the `list` subcommand. All filters are composable. -# Get pattern names in a bounded context -pnpm process:query -- arch context scanner | jq '.[].patternName' +| Filter | Description | +| ------------------------ | ----------------------------------------------------------- | +| `--status ` | Filter by FSM status (roadmap, active, completed, deferred) | +| `--phase ` | Filter by roadmap phase number | +| `--category ` | Filter by category | +| `--source ` | Filter by source type | +| `--arch-context ` | Filter by architecture context | +| `--product-area ` | Filter by product area | +| `--limit ` | Maximum results | +| `--offset ` | Skip first n results | + +### JSON Envelope + +All JSON commands wrap output in a `QueryResult` envelope: + +```json +{ + "success": true, + "data": { ... }, + "metadata": { + "timestamp": "2026-02-21T04:31:31.633Z", + "patternCount": 318 + } +} ``` -**Note:** `pnpm` outputs a banner line to stdout (`> @libar-dev/...`). For clean JSON piping, use `npx tsx src/cli/process-api.ts` directly instead of `pnpm process:query`. +On error: ---- +```json +{ + "success": false, + "error": "Pattern not found: \"Orchestrator\"\nDid you mean: OrchestratorPipelineFactoryMigration?", + "code": "PATTERN_NOT_FOUND" +} +``` -## Common Use Cases +### Exit Codes -### Claude Code Session Start +| Code | Meaning | +| ---- | ------------------------------ | +| `0` | Success | +| `1` | Error (with message on stderr) | + +### JSON Piping + +`pnpm` outputs a banner line to stdout (`> @libar-dev/...`). For clean JSON piping, use `npx tsx src/cli/process-api.ts` directly: ```bash -# Quick status check -pnpm process:query -- status +npx tsx src/cli/process-api.ts list --status roadmap --names-only | jq '.data[]' +``` -# What's active? -pnpm process:query -- query getCurrentWork +--- + +## Common Recipes + +### Starting a Session + +```bash +pnpm process:query -- overview # project health +pnpm process:query -- scope-validate MyPattern implement # pre-flight +pnpm process:query -- context MyPattern --session implement # curated context ``` -### Planning Session +### Finding What to Work On ```bash -# What can we start next? -pnpm process:query -- query getRoadmapItems +pnpm process:query -- list --status roadmap --names-only # available patterns +pnpm process:query -- arch blocking # stuck patterns +pnpm process:query -- stubs --unresolved # missing implementations +``` -# What phase are we in? -pnpm process:query -- query getActivePhases +### Investigating a Pattern -# Check if a transition is valid before editing specs -pnpm process:query -- query isValidTransition roadmap active +```bash +pnpm process:query -- search EventStore # fuzzy name search +pnpm process:query -- dep-tree MyPattern --depth 2 # dependency chain +pnpm process:query -- arch neighborhood MyPattern # what it touches +pnpm process:query -- files MyPattern --related # file paths ``` -### Implementation Session +### Design Session Prep ```bash -# Get full detail for the pattern being implemented -pnpm process:query -- pattern ProcessStateAPI +pnpm process:query -- context MyPattern --session design # full context +pnpm process:query -- decisions MyPattern # design decisions +pnpm process:query -- stubs MyPattern # existing stubs +``` -# Check dependencies -pnpm process:query -- query getPatternRelationships ProcessStateAPI +### Ending a Session -# Architecture context -pnpm process:query -- arch context api +```bash +pnpm process:query -- handoff --pattern MyPattern # capture state +pnpm process:query -- handoff --pattern MyPattern --git # include commits ``` diff --git a/docs/PROCESS-GUARD.md b/docs/PROCESS-GUARD.md index 0f3bd799..3625322e 100644 --- a/docs/PROCESS-GUARD.md +++ b/docs/PROCESS-GUARD.md @@ -61,6 +61,12 @@ Process Guard validates delivery workflow changes at commit time. For FSM concep Feature: Phase State Machine ``` +**Unlock reason requirements:** + +- Minimum **10 characters** (short reasons like "fix" are rejected) +- Cannot be a placeholder: `test`, `xxx`, `bypass`, `temp`, `todo`, `fixme` +- If the reason is invalid, the error still fires — Process Guard treats it as no unlock reason + **Alternative:** If this should be new work, create a new spec instead of modifying completed work. --- @@ -207,6 +213,7 @@ lint-process [options] | `--show-state` | Debug: show derived process state | | `--format json` | Machine-readable output | | `-f, --file ` | Specific file to validate (repeatable) | +| `-b, --base-dir` | Base directory for file resolution | ### Exit Codes @@ -327,8 +334,8 @@ State is derived from file annotations — there is no separate state file to ma ## Related Documentation -| Document | Content | -| ------------------------------------- | ------------------------------- | -| [METHODOLOGY.md](./METHODOLOGY.md) | FSM concepts, state definitions | -| [README.md](../README.md) | Package overview, quick start | -| [INSTRUCTIONS.md](../INSTRUCTIONS.md) | Complete tag reference | +| Document | Content | +| ---------------------------------- | ------------------------------- | +| [METHODOLOGY.md](./METHODOLOGY.md) | FSM concepts, state definitions | +| [README.md](../README.md) | Package overview, quick start | +| [TAXONOMY.md](./TAXONOMY.md) | Tag taxonomy concepts and API | diff --git a/docs/PUBLISHING.md b/docs/PUBLISHING.md index aae73b6d..ac7d0ba4 100644 --- a/docs/PUBLISHING.md +++ b/docs/PUBLISHING.md @@ -26,8 +26,7 @@ Pre-releases allow testing before marking as stable. ```bash # First pre-release (e.g., 1.0.0-pre.0) npm version 1.0.0-pre.0 --no-git-tag-version -pnpm build -git add -A +git add package.json git commit -m "chore: prepare 1.0.0-pre.0" git tag v1.0.0-pre.0 git push && git push --tags @@ -46,6 +45,13 @@ npm publish --tag pre --access public ### Stable Releases +**Before the first stable release**, update `publishConfig` in `package.json`: + +1. Remove `"tag": "pre"` from `publishConfig` (or change to `"tag": "latest"`) +2. Verify with `npm publish --dry-run --access public` (should show tag `latest`, not `pre`) + +If you skip this step, stable versions will be published under the `pre` dist-tag and users running `npm install @libar-dev/delivery-process` won't get them. + ```bash # Patch release (1.0.0 → 1.0.1) pnpm release:patch @@ -71,9 +77,10 @@ The repository includes a GitHub Actions workflow that publishes automatically w The workflow will: +- Build the package fresh (`pnpm build`) - Run tests -- Build the package - Publish to npm with the appropriate tag (`pre` for pre-releases, `latest` for stable) +- Include provenance attestation for supply chain security **Required secret:** `NPM_TOKEN` - npm automation token with publish permissions. @@ -85,14 +92,11 @@ The repository uses Husky for git hooks: - Runs `lint-staged` (ESLint + Prettier on staged files) - Runs `typecheck` +- Runs `lint:process` (FSM validation on staged files) ### Pre-push - Runs full test suite -- Rebuilds `dist/` -- **Verifies `dist/` is in sync** - fails if the build produces changes - -This ensures the committed `dist/` is never stale. ## Dry Run @@ -112,6 +116,9 @@ After publishing, verify the package: # Check npm registry npm view @libar-dev/delivery-process +# Check dist-tags +npm view @libar-dev/delivery-process dist-tags + # Install in a test project mkdir /tmp/test-install && cd /tmp/test-install npm init -y @@ -120,17 +127,6 @@ npm install @libar-dev/delivery-process@pre ## Troubleshooting -### "dist/ is out of sync" error on push - -The pre-push hook detected that `dist/` differs from what's committed. Fix: - -```bash -pnpm build -git add dist/ -git commit --amend --no-edit -git push -``` - ### npm publish fails with authentication error ```bash diff --git a/docs/SESSION-GUIDES.md b/docs/SESSION-GUIDES.md index 34dd24cb..0f86904e 100644 --- a/docs/SESSION-GUIDES.md +++ b/docs/SESSION-GUIDES.md @@ -28,6 +28,13 @@ Starting from pattern brief? **Goal:** Create a roadmap spec. Do not write implementation code. +### Context Gathering + +```bash +pnpm process:query -- overview # Project health +pnpm process:query -- list --status roadmap --names-only # Available patterns +``` + ### Checklist - [ ] **Extract metadata** from pattern brief: @@ -59,7 +66,7 @@ Starting from pattern brief? Background: Deliverables Given the following deliverables: | Deliverable | Status | Location | Tests | Test Type | - | Core types | planned | src/types.ts | Yes | unit | + | Core types | pending | src/types.ts | Yes | unit | ``` - [ ] **Convert tables to Rules** — Each business constraint becomes a `Rule:` block @@ -87,6 +94,16 @@ See [`tests/features/validation/fsm-validator.feature`](../tests/features/valida **Goal:** Make architectural decisions. Create code stubs with interfaces. Do not implement. +### Context Gathering + +```bash +pnpm process:query -- context --session design # Full context bundle +pnpm process:query -- dep-tree # Dependency chain +pnpm process:query -- stubs # Existing design stubs +``` + +Use these **before** launching explore agents. See [PROCESS-API.md](./PROCESS-API.md). + ### When Required | Use Design Session | Skip Design Session | @@ -147,11 +164,22 @@ See [`tests/features/validation/fsm-validator.feature`](../tests/features/valida **Goal:** Write code. The roadmap spec is the source of truth. -### Pre-flight +### Context Gathering (Step 0) -- [ ] Roadmap spec exists with `@-status:roadmap` -- [ ] Decision specs approved (if needed) -- [ ] Implementation plan exists (for multi-session work) +```bash +# Pre-flight — catches FSM violations, missing deps, incomplete deliverables +pnpm process:query -- scope-validate implement + +# Curated context — deliverables, FSM state, test files +pnpm process:query -- context --session implement + +# File paths for implementation +pnpm process:query -- files --related +``` + +The `scope-validate` command replaces the manual pre-flight checklist — it checks +dependency completion, deliverable definitions, FSM validity, and design decisions. +See [PROCESS-API.md](./PROCESS-API.md#scope-validate). ### Execution Checklist @@ -178,7 +206,7 @@ See [`tests/features/validation/fsm-validator.feature`](../tests/features/valida - [ ] Write tests - [ ] Update deliverable status: ```gherkin - | Core types | completed | src/types.ts | Yes | unit | + | Core types | complete | src/types.ts | Yes | unit | ``` 4. **Verify all design decisions addressed:** @@ -292,6 +320,14 @@ See [`tests/features/validation/fsm-validator.feature`](../tests/features/valida For multi-session work, capture state at session boundaries. +```bash +# Generate handoff from actual annotation state (preferred over manual template) +pnpm process:query -- handoff --pattern +pnpm process:query -- handoff --pattern --git # include recent commits +``` + +The CLI handoff always reflects current annotation state. The template below is for additional context: + ### Handoff Template ```markdown @@ -343,9 +379,11 @@ Valid transitions: See [METHODOLOGY.md#fsm-enforced-workflow](./METHODOLOGY.md#f ## Related Documentation -| Document | Content | -| -------------------------------------------- | ---------------------------------------------- | -| [METHODOLOGY.md](./METHODOLOGY.md) | Core thesis, FSM states, two-tier architecture | -| [GHERKIN-PATTERNS.md](./GHERKIN-PATTERNS.md) | DataTables, DocStrings, Rule blocks | -| [CONFIGURATION.md](./CONFIGURATION.md) | Tag prefixes, presets | -| [../INSTRUCTIONS.md](../INSTRUCTIONS.md) | CLI commands, full tag reference | +| Document | Content | +| -------------------------------------------- | ------------------------------------------------- | +| [METHODOLOGY.md](./METHODOLOGY.md) | Core thesis, FSM states, two-tier architecture | +| [GHERKIN-PATTERNS.md](./GHERKIN-PATTERNS.md) | DataTables, DocStrings, Rule blocks | +| [CONFIGURATION.md](./CONFIGURATION.md) | Tag prefixes, presets | +| [TAXONOMY.md](./TAXONOMY.md) | Tag taxonomy concepts and API | +| [PROCESS-API.md](./PROCESS-API.md) | Data API CLI commands for all session types | +| [VALIDATION.md](./VALIDATION.md) | CLI flags for lint-patterns and validate-patterns | diff --git a/docs/TAXONOMY.md b/docs/TAXONOMY.md index 38492dca..6e580cca 100644 --- a/docs/TAXONOMY.md +++ b/docs/TAXONOMY.md @@ -8,12 +8,12 @@ The taxonomy defines the vocabulary for pattern annotations: what tags exist, th A **taxonomy** is a classification system. In `@libar-dev/delivery-process`, the taxonomy defines: -| Component | Purpose | -| ---------------- | ------------------------------------------------- | -| **Categories** | Domain classifications (e.g., `core`, `api`) | -| **Status** | FSM states (`roadmap`, `active`, `completed`) | -| **Format Types** | How tag values are parsed (`flag`, `csv`, `enum`) | -| **Hierarchy** | Work item levels (`epic`, `phase`, `task`) | +| Component | Purpose | +| ---------------- | --------------------------------------------------------- | +| **Categories** | Domain classifications (e.g., `core`, `api`) | +| **Status** | FSM states (`roadmap`, `active`, `completed`, `deferred`) | +| **Format Types** | How tag values are parsed (`flag`, `csv`, `enum`) | +| **Hierarchy** | Work item levels (`epic`, `phase`, `task`) | The taxonomy is NOT a fixed schema. Presets (`libar-generic`, `generic`, `ddd-es-cqrs`) select different subsets, and you can define custom categories. @@ -23,14 +23,19 @@ The taxonomy is NOT a fixed schema. Presets (`libar-generic`, `generic`, `ddd-es ``` src/taxonomy/ -├── registry-builder.ts # buildRegistry() - creates TagRegistry -├── categories.ts # Category definitions -├── status-values.ts # FSM state values (PDR-005) -├── normalized-status.ts # Display normalization (3 buckets) -├── format-types.ts # Tag value parsing rules -├── hierarchy-levels.ts # epic/phase/task -├── risk-levels.ts # low/medium/high -└── layer-types.ts # timeline/domain/integration/e2e +├── index.ts # Barrel exports +├── registry-builder.ts # buildRegistry() — creates TagRegistry +├── categories.ts # Category definitions (core, api, ddd, …) +├── status-values.ts # FSM state values: roadmap/active/completed/deferred +├── deliverable-status.ts # Deliverable statuses: complete/in-progress/pending/deferred/superseded/n-a +├── normalized-status.ts # Display normalization (3 buckets) +├── format-types.ts # Tag value parsing rules +├── hierarchy-levels.ts # epic/phase/task +├── risk-levels.ts # low/medium/high +├── severity-types.ts # error/warning/info +├── layer-types.ts # timeline/domain/integration/e2e/component/unknown +├── generator-options.ts # Format, groupBy, sortBy, workflow, priority, ADR enums +└── conventions.ts # Convention values for reference document generation ``` ### TagRegistry @@ -44,7 +49,9 @@ const registry = buildRegistry(); // registry.tagPrefix → "@libar-docs-" // registry.fileOptInTag → "@libar-docs" // registry.categories → CategoryDefinition[] -// registry.statusValues → ["roadmap", "active", "completed", "deferred"] +// registry.metadataTags → MetadataTagDefinition[] +// registry.aggregationTags → AggregationTagDefinition[] +// registry.formatOptions → string[] ``` ### Presets Select Taxonomy Subsets @@ -76,13 +83,17 @@ Tags have different value formats: ## Generating a Tag Reference -To generate a human-readable taxonomy reference: +Generate a human-readable taxonomy reference from the TypeScript taxonomy source: ```bash +# Via the docs generator (recommended) +npx generate-docs -g taxonomy -i "src/**/*.ts" -o docs -f + +# Flat single-file reference (deprecated — use generate-docs instead) npx generate-tag-taxonomy -o TAG_TAXONOMY.md -f ``` -This creates a markdown file documenting all tags with their formats, valid values, and examples. +The generated output reflects every tag the system supports — including all 21 categories available with the `ddd-es-cqrs` preset. --- @@ -90,6 +101,5 @@ This creates a markdown file documenting all tags with their formats, valid valu | Topic | Document | | --------------------- | ----------------------------------------------------------- | -| **Complete tag list** | [INSTRUCTIONS.md](../INSTRUCTIONS.md) | | **Presets & config** | [CONFIGURATION.md](./CONFIGURATION.md) | | **Custom categories** | [CONFIGURATION.md](./CONFIGURATION.md#custom-configuration) | diff --git a/docs/VALIDATION.md b/docs/VALIDATION.md index ce263bdc..957c1e3d 100644 --- a/docs/VALIDATION.md +++ b/docs/VALIDATION.md @@ -10,6 +10,9 @@ Quick reference for choosing and running the right validation command. Need to check annotation quality? ├─ Yes → lint-patterns │ +Need to check vitest-cucumber compatibility? +├─ Yes → lint-steps +│ Need FSM workflow validation? ├─ Yes → lint-process │ @@ -22,11 +25,12 @@ Running pre-commit hook? ## Command Summary -| Command | Purpose | When to Use | -| ------------------- | --------------------------------- | ---------------------------------- | -| `lint-patterns` | Annotation quality | Ensure patterns have required tags | -| `lint-process` | FSM workflow enforcement | Pre-commit hooks, CI pipelines | -| `validate-patterns` | Cross-source + DoD + anti-pattern | Release validation, comprehensive | +| Command | Purpose | When to Use | +| ------------------- | --------------------------------- | --------------------------------------------- | +| `lint-patterns` | Annotation quality | Ensure patterns have required tags | +| `lint-steps` | vitest-cucumber compatibility | After writing/modifying feature or step files | +| `lint-process` | FSM workflow enforcement | Pre-commit hooks, CI pipelines | +| `validate-patterns` | Cross-source + DoD + anti-pattern | Release validation, comprehensive | --- @@ -42,18 +46,54 @@ npx lint-patterns -i "src/**/*.ts" npx lint-patterns -i "src/**/*.ts" --strict ``` +### CLI Flags + +| Flag | Short | Description | Default | +| ------------------------ | ----- | ----------------------------------- | -------- | +| `--input ` | `-i` | Glob pattern (required, repeatable) | required | +| `--exclude ` | `-e` | Exclude pattern (repeatable) | - | +| `--base-dir ` | `-b` | Base directory | cwd | +| `--strict` | | Treat warnings as errors | false | +| `--format ` | `-f` | Output: `pretty` or `json` | `pretty` | +| `--quiet` | `-q` | Only show errors | false | +| `--min-severity ` | | `error`, `warning`, `info` | - | + ### Rules -| Rule | Severity | What It Checks | -| -------------------------- | -------- | ----------------------------------- | -| `missing-pattern-name` | error | Must have `@-pattern` | -| `invalid-status` | error | Status must be valid FSM value | -| `tautological-description` | error | Description cannot just repeat name | -| `missing-status` | warning | Should have status tag | -| `missing-when-to-use` | warning | Should have "When to Use" section | -| `missing-relationships` | info | Consider adding uses/used-by | +| Rule | Severity | What It Checks | +| -------------------------------- | -------- | -------------------------------------------------- | +| `missing-pattern-name` | error | Must have `@-pattern` | +| `invalid-status` | error | Status must be valid FSM value | +| `tautological-description` | error | Description cannot just repeat name | +| `pattern-conflict-in-implements` | error | Pattern cannot implement itself (circular ref) | +| `missing-relationship-target` | warning | Relationship targets must reference known patterns | +| `missing-status` | warning | Should have status tag | +| `missing-when-to-use` | warning | Should have "When to Use" section | +| `missing-relationships` | info | Consider adding uses/used-by | + +--- + +## lint-steps + +Static analyzer for vitest-cucumber feature/step compatibility. Catches mismatches that cause cryptic runtime failures. -**Full CLI reference:** See [INSTRUCTIONS.md](../INSTRUCTIONS.md#lint-patterns) +```bash +# Standard check +pnpm lint:steps + +# Strict mode (CI) +pnpm lint:steps --strict +``` + +**What it validates:** + +- Feature file syntax traps (`#` in descriptions, keywords in descriptions, duplicate And steps) +- Step definition anti-patterns (regex patterns, `{phrase}` usage, repeated registrations) +- Cross-file mismatches (ScenarioOutline param pattern, missing And/Rule destructuring) + +12 rules across 3 categories (8 error, 4 warning). + +**Detailed rules and examples:** See [GHERKIN-PATTERNS.md — Step Linting](./GHERKIN-PATTERNS.md#step-linting) --- @@ -78,8 +118,6 @@ npx lint-process --all --strict **Detailed rules and escape hatches:** See [PROCESS-GUARD.md](./PROCESS-GUARD.md) -**Full CLI reference:** See [INSTRUCTIONS.md](../INSTRUCTIONS.md#lint-process) - --- ## validate-patterns @@ -95,13 +133,31 @@ npx validate-patterns \ --anti-patterns ``` +### CLI Flags + +| Flag | Short | Description | Default | +| --------------------------- | ----- | ------------------------------------------------ | -------- | +| `--input` | `-i` | Glob for TypeScript files (required, repeatable) | required | +| `--features` | `-F` | Glob for Gherkin files (required, repeatable) | required | +| `--exclude` | `-e` | Exclude pattern (repeatable) | - | +| `--base-dir` | `-b` | Base directory | cwd | +| `--strict` | | Treat warnings as errors (exit 2) | false | +| `--verbose` | | Show info-level messages | false | +| `--format` | `-f` | Output: `pretty` or `json` | `pretty` | +| `--dod` | | Enable Definition of Done validation | false | +| `--phase` | | Validate specific phase (repeatable) | - | +| `--anti-patterns` | | Enable anti-pattern detection | false | +| `--scenario-threshold` | | Max scenarios per feature | 30 | +| `--mega-feature-threshold` | | Max lines per feature | 750 | +| `--magic-comment-threshold` | | Max magic comments | 5 | + ### Checks Available | Flag | What It Validates | | ----------------- | --------------------------------------------- | +| (always runs) | Cross-source Feature/TypeScript consistency | | `--dod` | Completed patterns have all deliverables done | | `--anti-patterns` | Dual-source ownership rules not violated | -| `--cross-source` | Feature/TypeScript metadata consistency | ### Architecture Note (ADR-006) @@ -111,23 +167,32 @@ Raw scans are retained only for DoD and anti-pattern detection, which are stage- ### Anti-Pattern Detection -Enforces dual-source architecture ownership: +Detects process metadata tags that belong in feature files but appear in TypeScript code (`process-in-code`): + +| Tag Suffix (Feature-Only) | What It Tracks | +| ------------------------- | -------------------- | +| `@-quarter` | Timeline metadata | +| `@-team` | Ownership metadata | +| `@-effort` | Estimation metadata | +| `@-effort-actual` | Actual effort | +| `@-workflow` | Workflow metadata | +| `@-completed` | Completion timestamp | -| Tag Type | Correct Location | Wrong Location | -| ---------------------- | ---------------- | --------------- | -| `@-uses` | TypeScript code | Feature files | -| `@-depends-on` | Feature files | TypeScript code | -| `@-quarter` | Feature files | TypeScript code | -| `@-team` | Feature files | TypeScript code | +Additional anti-pattern checks: + +| ID | Severity | What It Detects | +| ----------------- | -------- | ----------------------------------- | +| `process-in-code` | error | Feature-only tags found in TS code | +| `magic-comments` | warning | Generator hints in feature files | +| `scenario-bloat` | warning | Too many scenarios per feature file | +| `mega-feature` | warning | Feature file exceeds line threshold | ### DoD Validation For patterns with `completed` status, checks: -- All deliverables marked complete (checkmark, "Done", "Complete") -- At least one `@acceptance-criteria` scenario exists - -**Full CLI reference:** See [INSTRUCTIONS.md](../INSTRUCTIONS.md#validate-patterns) +- All deliverables are in a terminal state (`complete`, `n/a`, or `superseded`) +- At least one `@acceptance-criteria` scenario exists in the spec --- @@ -135,10 +200,14 @@ For patterns with `completed` status, checks: ### Recommended package.json Scripts +Add these scripts to your project's `package.json`: + ```json { "scripts": { "lint:patterns": "lint-patterns -i 'src/**/*.ts'", + "lint:steps": "lint-steps", + "lint:steps:ci": "lint-steps --strict", "lint:process": "lint-process --staged", "lint:process:ci": "lint-process --all --strict", "validate:all": "validate-patterns -i 'src/**/*.ts' -F 'specs/**/*.feature' --dod --anti-patterns" @@ -159,6 +228,9 @@ npx lint-process --staged - name: Lint annotations run: npx lint-patterns -i "src/**/*.ts" --strict +- name: Lint steps + run: npx lint-steps --strict + - name: Validate patterns run: npx validate-patterns -i "src/**/*.ts" -F "specs/**/*.feature" --dod --anti-patterns ``` @@ -167,12 +239,11 @@ npx lint-process --staged ## Exit Codes -All commands follow the same convention: - -| Code | Meaning | -| ---- | ---------------------------------------------- | -| `0` | No errors (warnings allowed unless `--strict`) | -| `1` | Errors found (or warnings with `--strict`) | +| Code | `lint-patterns` / `lint-steps` / `lint-process` | `validate-patterns` | +| ---- | ----------------------------------------------- | ------------------------------------- | +| `0` | No errors (warnings allowed unless `--strict`) | No issues found | +| `1` | Errors found (or warnings with `--strict`) | Errors found | +| `2` | — | Warnings found (with `--strict` only) | --- @@ -184,6 +255,9 @@ All validation tools expose programmatic APIs. Import from subpaths: // Pattern linting import { lintFiles, hasFailures } from '@libar-dev/delivery-process/lint'; +// Step linting +import { runStepLint, STEP_LINT_RULES } from '@libar-dev/delivery-process/lint'; + // Process guard import { deriveProcessState, validateChanges } from '@libar-dev/delivery-process/lint'; @@ -191,7 +265,7 @@ import { deriveProcessState, validateChanges } from '@libar-dev/delivery-process import { detectAntiPatterns, validateDoD } from '@libar-dev/delivery-process/validation'; ``` -`validatePatterns()` now accepts a `RuntimeMasterDataset`. Build one via `buildMasterDataset()` from `@libar-dev/delivery-process/generators/pipeline`. +`validatePatterns()` now accepts a `RuntimeMasterDataset`. Build one via `buildMasterDataset()` from `@libar-dev/delivery-process/generators`. See [ARCHITECTURE.md](./ARCHITECTURE.md) for detailed API documentation. @@ -199,8 +273,9 @@ See [ARCHITECTURE.md](./ARCHITECTURE.md) for detailed API documentation. ## Related Documentation -| Document | Content | -| -------------------------------------- | ------------------------------- | -| [PROCESS-GUARD.md](./PROCESS-GUARD.md) | FSM rules, error fixes, escapes | -| [INSTRUCTIONS.md](../INSTRUCTIONS.md) | Full CLI reference | -| [ARCHITECTURE.md](./ARCHITECTURE.md) | Programmatic API details | +| Document | Content | +| -------------------------------------------- | ------------------------------------- | +| [GHERKIN-PATTERNS.md](./GHERKIN-PATTERNS.md) | Step linting rules, examples, and CLI | +| [PROCESS-GUARD.md](./PROCESS-GUARD.md) | FSM rules, error fixes, escapes | +| [TAXONOMY.md](./TAXONOMY.md) | Tag taxonomy concepts and API | +| [ARCHITECTURE.md](./ARCHITECTURE.md) | Programmatic API details | diff --git a/package.json b/package.json index e074144d..57ecacad 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@libar-dev/delivery-process", - "version": "0.1.0-pre.0", - "description": "Turn TypeScript annotations and Gherkin specs into living docs, architecture graphs, and AI-queryable delivery state. FSM-enforced workflows.", + "version": "1.0.0-pre.1", + "description": "Context engineering toolkit: extract patterns from TypeScript and Gherkin into a queryable delivery state with living docs, architecture graphs, and FSM-enforced workflows.", "type": "module", "sideEffects": false, "main": "dist/index.js", @@ -12,6 +12,10 @@ "types": "./dist/index.d.ts", "import": "./dist/index.js" }, + "./api": { + "types": "./dist/api/index.d.ts", + "import": "./dist/api/index.js" + }, "./config": { "types": "./dist/config/index.d.ts", "import": "./dist/config/index.js" @@ -51,7 +55,8 @@ "./validation": { "types": "./dist/validation/index.d.ts", "import": "./dist/validation/index.js" - } + }, + "./package.json": "./package.json" }, "bin": { "generate-docs": "./dist/cli/generate-docs.js", @@ -93,7 +98,7 @@ "docs:business-rules": "tsx src/cli/generate-docs.ts -g business-rules", "docs:reference": "tsx src/cli/generate-docs.ts -g reference-docs", "docs:product-areas": "tsx src/cli/generate-docs.ts -g product-area-docs", - "docs:all": "pnpm docs:decisions && pnpm docs:product-areas && pnpm docs:taxonomy && pnpm docs:business-rules", + "docs:all": "pnpm docs:decisions && pnpm docs:product-areas && pnpm docs:taxonomy && pnpm docs:business-rules && pnpm docs:reference", "docs:all-preview": "pnpm docs:patterns && pnpm docs:roadmap && pnpm docs:remaining && pnpm docs:changelog && pnpm docs:architecture && pnpm docs:decisions && pnpm docs:reference && pnpm docs:product-areas && pnpm docs:taxonomy && pnpm docs:validation && pnpm docs:requirements && pnpm docs:current && pnpm docs:milestones && pnpm docs:business-rules", "process:query": "tsx src/cli/process-api.ts", "process:q": "tsx src/cli/process-api.ts", @@ -122,36 +127,36 @@ "claude:full": "CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1 claude --add-dir .claude-layers/api-reference --add-dir .claude-layers/meta" }, "keywords": [ + "context-engineering", + "ai-context", + "llm-context", + "agentic-context", + "ai-assisted-development", + "ai-coding", + "claude-code", + "cursor-ai", + "structured-specs", "source-first", - "delivery-process", + "code-first", + "docs-as-code", "living-documentation", "documentation-generator", - "docs-as-code", - "code-first", "technical-documentation", - "architecture-graph", - "dependency-graph", - "traceability-matrix", - "mermaid", + "delivery-process", "workflow-enforcement", "fsm-enforcement", - "process-guard", "pre-commit-hooks", "git-hooks", - "roadmap", - "sdlc", - "software-delivery", + "architecture-graph", + "dependency-graph", + "mermaid", + "traceability", + "dual-source", + "master-dataset", "gherkin", "bdd", "typescript-annotations", - "traceability", - "ai-assisted-development", - "ai-context", - "llm-context", - "process-state-api", - "claude-code", - "cursor-ai", - "ai-coding", + "roadmap", "cli" ], "author": "Libar AI", @@ -170,7 +175,6 @@ "dependencies": { "@cucumber/gherkin": "^29.0.0", "@cucumber/messages": "^25.0.1", - "@libar-dev/modular-claude-md": "github:libar-dev/modular-claude-md#3a37c573ae8611f1e0e92c00f565bb0ab45e1263", "@typescript-eslint/typescript-estree": "^8.18.0", "glob": "^10.3.10", "zod": "^4.1.11" @@ -188,15 +192,17 @@ "tsx": "^4.7.0", "typescript": "^5.7.2", "typescript-eslint": "^8.18.2", - "vitest": "^2.1.8" + "vitest": "^2.1.8", + "@libar-dev/modular-claude-md": "github:libar-dev/modular-claude-md#3a37c573ae8611f1e0e92c00f565bb0ab45e1263" }, "files": [ "dist", "docs", + "docs-live", "docs-generated", "README.md", - "INSTRUCTIONS.md", - "LICENSE" + "LICENSE", + "CHANGELOG.md" ], "private": false, "publishConfig": { @@ -212,10 +218,5 @@ "*.{json,md,yml,yaml}": [ "prettier --write" ] - }, - "pnpm": { - "onlyBuiltDependencies": [ - "@libar-dev/modular-claude-md" - ] } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5c15c191..86d81e9c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,9 +14,6 @@ importers: '@cucumber/messages': specifier: ^25.0.1 version: 25.0.1 - '@libar-dev/modular-claude-md': - specifier: github:libar-dev/modular-claude-md#3a37c573ae8611f1e0e92c00f565bb0ab45e1263 - version: https://codeload.github.com/libar-dev/modular-claude-md/tar.gz/3a37c573ae8611f1e0e92c00f565bb0ab45e1263 '@typescript-eslint/typescript-estree': specifier: ^8.18.0 version: 8.53.1(typescript@5.9.3) @@ -30,6 +27,9 @@ importers: '@amiceli/vitest-cucumber': specifier: ^5.2.1 version: 5.2.1(vitest@2.1.9(@types/node@20.10.0)) + '@libar-dev/modular-claude-md': + specifier: github:libar-dev/modular-claude-md#3a37c573ae8611f1e0e92c00f565bb0ab45e1263 + version: https://codeload.github.com/libar-dev/modular-claude-md/tar.gz/3a37c573ae8611f1e0e92c00f565bb0ab45e1263 '@types/node': specifier: 20.10.0 version: 20.10.0 diff --git a/src/api/arch-queries.ts b/src/api/arch-queries.ts index 178d6b8e..961f79d1 100644 --- a/src/api/arch-queries.ts +++ b/src/api/arch-queries.ts @@ -13,6 +13,8 @@ * * Pure functions over MasterDataset for deep architecture exploration. * No I/O — all data comes from pre-computed views. + * + * **When to Use:** When exploring architecture structure (neighborhoods, comparisons, tags, sources) via the Data API CLI. */ import type { diff --git a/src/api/context-assembler.ts b/src/api/context-assembler.ts index 9d46f227..96fc94c7 100644 --- a/src/api/context-assembler.ts +++ b/src/api/context-assembler.ts @@ -17,6 +17,8 @@ * * The assembler does NOT format output. It produces structured data that * the ContextFormatter renders as plain text (see ADR-008). + * + * **When to Use:** When building a session context bundle for a pattern — use this instead of manually querying MasterDataset views. */ import type { ProcessStateAPI } from './process-state.js'; diff --git a/src/api/context-formatter.ts b/src/api/context-formatter.ts index 7f3673b8..c9897cca 100644 --- a/src/api/context-formatter.ts +++ b/src/api/context-formatter.ts @@ -15,6 +15,8 @@ * through the Codec/RenderableDocument/UniversalRenderer markdown pipeline. * Context bundles are rendered as compact structured text with === section * markers for easy AI parsing (see ADR-008). + * + * **When to Use:** When rendering a ContextBundle as plain text for CLI output — use this instead of the markdown codec pipeline. */ import type { @@ -205,6 +207,23 @@ export function formatOverview(overview: OverviewSummary): string { sections.push('=== BLOCKING ===\n' + lines.join('\n')); } + sections.push( + '=== DATA API — Use Instead of Explore Agents ===\n' + + 'pnpm process:query -- \n' + + '\n' + + ' overview Project health (this output)\n' + + ' context --session Curated context bundle (planning/design/implement)\n' + + ' scope-validate Pre-flight check before starting work\n' + + ' dep-tree Dependency chains\n' + + ' list --status roadmap Available patterns to work on\n' + + ' stubs --unresolved Design stubs missing implementations\n' + + ' files File paths for a pattern\n' + + ' rules Business rules from Gherkin\n' + + ' arch blocking Patterns stuck on incomplete deps\n' + + '\n' + + 'Full reference: pnpm process:query -- --help' + ); + return sections.join('\n\n') + '\n'; } diff --git a/src/api/coverage-analyzer.ts b/src/api/coverage-analyzer.ts index ca40d267..70841c37 100644 --- a/src/api/coverage-analyzer.ts +++ b/src/api/coverage-analyzer.ts @@ -14,6 +14,8 @@ * Reports annotation completeness by comparing scannable files (from glob) * against annotated patterns in MasterDataset. Uses independent glob via * findFilesToScan() — cheap (~1ms) and avoids changing buildPipeline(). + * + * **When to Use:** When checking annotation completeness or finding unannotated files via `arch coverage` or `unannotated` CLI subcommands. */ import * as fs from 'node:fs/promises'; diff --git a/src/api/fuzzy-match.ts b/src/api/fuzzy-match.ts index 81416618..a767b0d1 100644 --- a/src/api/fuzzy-match.ts +++ b/src/api/fuzzy-match.ts @@ -19,6 +19,8 @@ * Used by: * - `search` subcommand: ranked results via fuzzyMatchPatterns() * - `pattern` subcommand: "Did you mean...?" fallback via findBestMatch() + * + * **When to Use:** When resolving user-typed pattern names that may contain typos or partial matches. */ // --------------------------------------------------------------------------- diff --git a/src/api/handoff-generator.ts b/src/api/handoff-generator.ts index 4b99f984..093b49f0 100644 --- a/src/api/handoff-generator.ts +++ b/src/api/handoff-generator.ts @@ -15,6 +15,8 @@ * Pure function that assembles a handoff document from ProcessStateAPI * and MasterDataset. Captures everything the next session needs to * continue work without context loss. + * + * **When to Use:** When ending a work session and capturing state for the next session via the `handoff` CLI subcommand. */ import type { SessionType } from './context-assembler.js'; diff --git a/src/api/pattern-helpers.ts b/src/api/pattern-helpers.ts index ec84ea5d..1d8e112f 100644 --- a/src/api/pattern-helpers.ts +++ b/src/api/pattern-helpers.ts @@ -10,6 +10,8 @@ * * Common helper functions used by context-assembler, arch-queries, and other * API modules that need pattern name resolution and relationship lookups. + * + * **When to Use:** When resolving pattern names, looking up relationships, or finding patterns by name in API module code. */ import type { ExtractedPattern } from '../validation-schemas/extracted-pattern.js'; diff --git a/src/api/rules-query.ts b/src/api/rules-query.ts index 05a5cc1e..50bfe5a1 100644 --- a/src/api/rules-query.ts +++ b/src/api/rules-query.ts @@ -14,6 +14,8 @@ * * Target: src/api/rules-query.ts * See: DD-4 (ProcessAPILayeredExtraction) + * + * **When to Use:** When querying business rules and invariants from Gherkin specs via the `rules` CLI subcommand. */ import { parseBusinessRuleAnnotations } from '../renderable/codecs/helpers.js'; diff --git a/src/api/scope-validator.ts b/src/api/scope-validator.ts index 6af20091..9f1f0c7d 100644 --- a/src/api/scope-validator.ts +++ b/src/api/scope-validator.ts @@ -15,6 +15,8 @@ * Pure function composition over ProcessStateAPI and MasterDataset. * Runs a checklist of prerequisite validations before starting a * design or implementation session. + * + * **When to Use:** When running pre-flight checks before a session via the `scope-validate` CLI subcommand. */ import type { ProcessStateAPI } from './process-state.js'; diff --git a/src/api/stub-resolver.ts b/src/api/stub-resolver.ts index 966fcadc..2b12f55e 100644 --- a/src/api/stub-resolver.ts +++ b/src/api/stub-resolver.ts @@ -18,6 +18,8 @@ * Resolution uses a `fileExists` callback (defaulting to `fs.existsSync()`) on * targetPath — not pipeline data — because target files may not have `@libar-docs` * annotations. The callback enables testing without filesystem side effects. + * + * **When to Use:** When querying design stub status via the `stubs` CLI subcommand or when checking stub resolution in scope validation. */ import { existsSync } from 'node:fs'; diff --git a/src/api/summarize.ts b/src/api/summarize.ts index ab155346..32333a38 100644 --- a/src/api/summarize.ts +++ b/src/api/summarize.ts @@ -18,6 +18,8 @@ * * Uses Zod schema-first pattern: PatternSummarySchema defines the type, * and PatternSummary is inferred from it. + * + * **When to Use:** When projecting full ExtractedPattern data down to compact summaries for list and overview queries. */ import { z } from 'zod'; diff --git a/src/cache/file-cache.ts b/src/cache/file-cache.ts index 3e8faaa8..45079f77 100644 --- a/src/cache/file-cache.ts +++ b/src/cache/file-cache.ts @@ -18,6 +18,8 @@ * - **No eviction needed**: Generation runs are bounded in duration and file count * - **Thread-safe**: Single-threaded Node.js, no locking required * - **Stats tracking**: Optional hit/miss tracking for performance analysis + * + * **When to Use:** When a generation run reads the same file multiple times — create a cache instance per orchestrator run. */ /** diff --git a/src/cli/generate-docs.ts b/src/cli/generate-docs.ts index cd0f3721..6db3e4b5 100644 --- a/src/cli/generate-docs.ts +++ b/src/cli/generate-docs.ts @@ -437,4 +437,7 @@ async function main(): Promise { ); } -void main(); +void main().catch((error: unknown) => { + console.error(error instanceof Error ? error.message : String(error)); + process.exit(1); +}); diff --git a/src/cli/generate-tag-taxonomy.ts b/src/cli/generate-tag-taxonomy.ts index 95963447..2f81b110 100644 --- a/src/cli/generate-tag-taxonomy.ts +++ b/src/cli/generate-tag-taxonomy.ts @@ -211,4 +211,7 @@ async function main(): Promise { } // Entry point -void main(); +void main().catch((error: unknown) => { + console.error(error instanceof Error ? error.message : String(error)); + process.exit(1); +}); diff --git a/src/cli/output-pipeline.ts b/src/cli/output-pipeline.ts index ae2e87e9..299710a2 100644 --- a/src/cli/output-pipeline.ts +++ b/src/cli/output-pipeline.ts @@ -19,6 +19,8 @@ * Architecture decision: This is a single post-processing function, NOT a * middleware chain. The 4 modifiers are mutually exclusive with clear precedence: * count > namesOnly > fields > default summarize. + * + * **When to Use:** When processing CLI query results that need output shaping via --names-only, --count, --fields, or --full modifiers. */ import type { ExtractedPattern } from '../validation-schemas/extracted-pattern.js'; diff --git a/src/cli/validate-patterns.ts b/src/cli/validate-patterns.ts index 3ae0de61..6ae97e03 100644 --- a/src/cli/validate-patterns.ts +++ b/src/cli/validate-patterns.ts @@ -270,8 +270,8 @@ DoD Validation: Anti-Pattern Detection: --anti-patterns Enable anti-pattern detection - --scenario-threshold Max scenarios per feature (default: 20) - --mega-feature-threshold Max lines per feature (default: 500) + --scenario-threshold Max scenarios per feature (default: 30) + --mega-feature-threshold Max lines per feature (default: 750) --magic-comment-threshold Max magic comments (default: 5) Exit Codes: diff --git a/src/config/define-config.ts b/src/config/define-config.ts index 44ee01ff..01a5ed02 100644 --- a/src/config/define-config.ts +++ b/src/config/define-config.ts @@ -20,16 +20,7 @@ * * ### When to Use * - * In `delivery-process.config.ts` at project root: - * - * ```typescript - * import { defineConfig } from '@libar-dev/delivery-process/config'; - * - * export default defineConfig({ - * preset: 'ddd-es-cqrs', - * sources: { typescript: ['src/** /*.ts'] }, - * }); - * ``` + * - In `delivery-process.config.ts` at project root to get type-safe configuration with autocompletion. */ import type { DeliveryProcessProjectConfig } from './project-config.js'; diff --git a/src/config/merge-sources.ts b/src/config/merge-sources.ts index 38ba1000..0dc0cba6 100644 --- a/src/config/merge-sources.ts +++ b/src/config/merge-sources.ts @@ -23,9 +23,7 @@ * * ### When to Use * - * Called by the orchestrator before invoking each generator, so that - * generators like `changelog` can pull from different feature sets - * than the base config specifies. + * - Called by the orchestrator before invoking each generator to apply per-generator source overrides. */ import type { GeneratorSourceOverride, ResolvedSourcesConfig } from './project-config.js'; diff --git a/src/config/project-config-schema.ts b/src/config/project-config-schema.ts index dfdfa711..2d62cb61 100644 --- a/src/config/project-config-schema.ts +++ b/src/config/project-config-schema.ts @@ -21,6 +21,8 @@ * - No parent directory traversal in glob patterns (security) * - Preset name must be one of the known presets * - `replaceFeatures` and `additionalFeatures` are mutually exclusive + * + * **When to Use:** When loading and validating project configuration from `delivery-process.config.ts` at startup. */ import { z } from 'zod'; diff --git a/src/generators/built-in/reference-generators.ts b/src/generators/built-in/reference-generators.ts index 5aab1626..3b3acb68 100644 --- a/src/generators/built-in/reference-generators.ts +++ b/src/generators/built-in/reference-generators.ts @@ -8,6 +8,8 @@ * * Registers all reference document generators. Each config produces * TWO generators: detailed (docs/) and summary (_claude-md/). + * + * **When to Use:** When adding or modifying reference document generators — register new product-area or reference configs here. */ import type { DocumentGenerator, GeneratorContext, GeneratorOutput } from '../types.js'; @@ -17,7 +19,7 @@ import type { DetailLevel } from '../../renderable/codecs/types/base.js'; import type { RenderableDocument, SectionBlock } from '../../renderable/schema.js'; import { heading, paragraph, separator, table, document } from '../../renderable/schema.js'; import type { GeneratorRegistry } from '../registry.js'; -import { renderToMarkdown, renderToClaudeContext } from '../../renderable/render.js'; +import { renderToMarkdown, renderToClaudeMdModule } from '../../renderable/render.js'; import { createReferenceCodec, PRODUCT_AREA_META, @@ -127,8 +129,8 @@ class ReferenceDocGenerator implements DocumentGenerator { // Cast needed: Zod codec infers optional props as `T | undefined`, // but RenderableDocument uses exactOptionalPropertyTypes const doc = codec.decode(context.masterDataset) as RenderableDocument; - // Summary-level output (for _claude-md/) uses token-efficient renderer - const render = this.detailLevel === 'summary' ? renderToClaudeContext : renderToMarkdown; + // Summary-level output (for _claude-md/) uses modular-claude-md compatible renderer + const render = this.detailLevel === 'summary' ? renderToClaudeMdModule : renderToMarkdown; const content = render(doc); return Promise.resolve({ @@ -201,7 +203,7 @@ class ReferenceDocsGenerator implements DocumentGenerator { const summaryDoc = summaryCodec.decode(context.masterDataset) as RenderableDocument; files.push({ path: `_claude-md/${config.claudeMdSection}/${config.claudeMdFilename}`, - content: renderToClaudeContext(summaryDoc), + content: renderToClaudeMdModule(summaryDoc), }); } @@ -262,7 +264,7 @@ class ProductAreaDocsGenerator implements DocumentGenerator { const summaryDoc = summaryCodec.decode(context.masterDataset) as RenderableDocument; files.push({ path: `_claude-md/${config.claudeMdSection}/${config.claudeMdFilename}`, - content: renderToClaudeContext(summaryDoc), + content: renderToClaudeMdModule(summaryDoc), }); } diff --git a/src/generators/index.ts b/src/generators/index.ts index e1921d44..a275573f 100644 --- a/src/generators/index.ts +++ b/src/generators/index.ts @@ -57,6 +57,8 @@ export { // Pipeline - MasterDataset transformation for ProcessStateAPI usage export { + buildMasterDataset, + type PipelineOptions, mergePatterns, transformToMasterDataset, type RawDataset, diff --git a/src/generators/pipeline/build-pipeline.ts b/src/generators/pipeline/build-pipeline.ts index 6522ecd4..7983b252 100644 --- a/src/generators/pipeline/build-pipeline.ts +++ b/src/generators/pipeline/build-pipeline.ts @@ -15,6 +15,8 @@ * Target: src/generators/pipeline/build-pipeline.ts * See: ADR-006 (Single Read Model Architecture) * See: DD-1, DD-2 (ProcessAPILayeredExtraction) + * + * **When to Use:** When any consumer needs a MasterDataset — call buildMasterDataset() instead of wiring the scan-extract-merge-transform pipeline inline. */ import * as path from 'path'; diff --git a/src/generators/pipeline/merge-patterns.ts b/src/generators/pipeline/merge-patterns.ts index 41358c96..097d28d1 100644 --- a/src/generators/pipeline/merge-patterns.ts +++ b/src/generators/pipeline/merge-patterns.ts @@ -14,6 +14,8 @@ * * Target: src/generators/pipeline/merge-patterns.ts * See: DD-2 (OrchestratorPipelineFactoryMigration) + * + * **When to Use:** When combining TypeScript and Gherkin extracted patterns into a single list with conflict detection. */ import type { ExtractedPattern } from '../../validation-schemas/index.js'; diff --git a/src/renderable/codecs/diagram-utils.ts b/src/renderable/codecs/diagram-utils.ts index 5ff761db..b393d6d2 100644 --- a/src/renderable/codecs/diagram-utils.ts +++ b/src/renderable/codecs/diagram-utils.ts @@ -1,5 +1,7 @@ /** * @libar-docs + * @libar-docs-pattern MermaidDiagramUtils + * @libar-docs-status completed * @libar-docs-used-by Architecture Codec, Reference Codec * @libar-docs-arch-context renderer * @@ -7,6 +9,10 @@ * * Sanitization and formatting helpers shared across architecture.ts and reference.ts * diagram builders. + * + * **When to Use:** When building Mermaid diagram output in a codec — use + * `sanitizeNodeId()`, `EDGE_STYLES`, `NODE_SHAPES`, and `formatNodeDeclaration()` + * rather than inlining diagram syntax in the codec directly. */ import type { ExtractedPattern } from '../../validation-schemas/extracted-pattern.js'; diff --git a/src/renderable/codecs/reference.ts b/src/renderable/codecs/reference.ts index ae520bee..5700ceb0 100644 --- a/src/renderable/codecs/reference.ts +++ b/src/renderable/codecs/reference.ts @@ -56,6 +56,7 @@ import { extractTablesFromDescription, type ConventionBundle, } from './convention-extractor.js'; +import type { BusinessRuleAnnotations } from './helpers.js'; import { parseBusinessRuleAnnotations, truncateText } from './helpers.js'; import { extractShapesFromDataset, filterShapesBySelectors } from './shape-matcher.js'; import type { ShapeSelector } from './shape-matcher.js'; @@ -71,6 +72,7 @@ import { VALID_TRANSITIONS } from '../../validation/fsm/transitions.js'; import { PROTECTION_LEVELS, type ProtectionLevel } from '../../validation/fsm/states.js'; import type { ProcessStatusValue } from '../../taxonomy/index.js'; import type { ExtractedPattern } from '../../validation-schemas/extracted-pattern.js'; +import { camelCaseToTitleCase } from '../../utils/string-utils.js'; import type { ExtractedShape } from '../../validation-schemas/extracted-shape.js'; // ============================================================================ @@ -752,6 +754,13 @@ function decodeProductArea( sections.push(...diagramSections); } } + } else { + // Compact boundary summary for summary-level documents (replaces diagrams) + const scopes: readonly DiagramScope[] = config.diagramScopes ?? meta?.diagramScopes ?? []; + const summary = buildBoundarySummary(dataset, scopes); + if (summary !== undefined) { + sections.push(summary); + } } // 4. Shapes from TypeScript patterns in this product area @@ -808,17 +817,18 @@ function decodeProductArea( } } - // 5. Behavior specifications from area patterns with rules or descriptions - // Optionally exclude source paths (e.g., Tier 1 specs) via config - const behaviorPatterns = areaPatterns.filter( + // 5. Compact business rules index (replaces verbose Behavior Specifications) + // Shows only rule name, invariant, and rationale per rule in tables + const rulesPatterns = areaPatterns.filter( (p) => (config.excludeSourcePaths === undefined || config.excludeSourcePaths.length === 0 || !config.excludeSourcePaths.some((prefix) => p.source.file.startsWith(prefix))) && - (p.directive.description.length > 0 || (p.rules !== undefined && p.rules.length > 0)) + p.rules !== undefined && + p.rules.length > 0 ); - if (behaviorPatterns.length > 0) { - sections.push(...buildBehaviorSectionsFromPatterns(behaviorPatterns, opts.detailLevel)); + if (rulesPatterns.length > 0) { + sections.push(...buildBusinessRulesCompactSection(rulesPatterns, opts.detailLevel)); } if (sections.length === 0) { @@ -994,6 +1004,88 @@ function buildBehaviorSectionsFromPatterns( return sections; } +/** + * Build a compact business rules index section. + * + * Replaces the verbose Behavior Specifications in product area docs. + * Groups rules by pattern, showing only rule name, invariant, and rationale. + * Always renders open H3 headings with tables for immediate scannability. + * + * Detail level controls: + * - summary: Section omitted entirely + * - standard: Rules with invariants only; truncated to 150/120 chars + * - detailed: All rules; full text, no truncation + */ +function buildBusinessRulesCompactSection( + patterns: readonly ExtractedPattern[], + detailLevel: DetailLevel +): SectionBlock[] { + if (detailLevel === 'summary') return []; + + const sections: SectionBlock[] = []; + + // Count totals for header + let totalRules = 0; + let totalInvariants = 0; + const annotationsCache = new Map(); + + for (const p of patterns) { + if (p.rules === undefined) continue; + for (const r of p.rules) { + totalRules++; + const ann = parseBusinessRuleAnnotations(r.description); + annotationsCache.set(`${p.name}::${r.name}`, ann); + if (ann.invariant !== undefined) totalInvariants++; + } + } + + if (totalRules === 0) return sections; + + sections.push(heading(2, 'Business Rules')); + sections.push( + paragraph( + `${String(patterns.length)} patterns, ` + + `${String(totalInvariants)} rules with invariants ` + + `(${String(totalRules)} total)` + ) + ); + + const isDetailed = detailLevel === 'detailed'; + const maxInvariant = isDetailed ? 0 : 150; + const maxRationale = isDetailed ? 0 : 120; + + const sorted = [...patterns].sort((a, b) => a.name.localeCompare(b.name)); + + for (const pattern of sorted) { + if (pattern.rules === undefined) continue; + + const rows: string[][] = []; + for (const rule of pattern.rules) { + const ann = annotationsCache.get(`${pattern.name}::${rule.name}`) ?? {}; + + // At standard level, skip rules without invariant + if (!isDetailed && ann.invariant === undefined) continue; + + const invariantText = ann.invariant ?? ''; + const rationaleText = ann.rationale ?? ''; + + rows.push([ + rule.name, + maxInvariant > 0 ? truncateText(invariantText, maxInvariant) : invariantText, + maxRationale > 0 ? truncateText(rationaleText, maxRationale) : rationaleText, + ]); + } + + if (rows.length === 0) continue; + + sections.push(heading(3, camelCaseToTitleCase(pattern.name))); + sections.push(table(['Rule', 'Invariant', 'Rationale'], rows)); + } + + sections.push(separator()); + return sections; +} + /** * Build sections from extracted TypeScript shapes. * @@ -1059,6 +1151,62 @@ function buildShapeSections( return sections; } +// ============================================================================ +// Boundary Summary Builder +// ============================================================================ + +/** + * Build a compact boundary summary paragraph from diagram scope data. + * + * Groups scope patterns by archContext and produces a text like: + * **Components:** Scanner (PatternA, PatternB), Extractor (PatternC) + * + * Skips scopes with `source` override (hardcoded diagrams like fsm-lifecycle). + * Returns undefined if no patterns found. + */ +function buildBoundarySummary( + dataset: MasterDataset, + scopes: readonly DiagramScope[] +): SectionBlock | undefined { + const allPatterns: ExtractedPattern[] = []; + const seenNames = new Set(); + + for (const scope of scopes) { + // Skip hardcoded source diagrams — they don't represent pattern boundaries + if (scope.source !== undefined) continue; + + for (const pattern of collectScopePatterns(dataset, scope)) { + const name = getPatternName(pattern); + if (!seenNames.has(name)) { + seenNames.add(name); + allPatterns.push(pattern); + } + } + } + + if (allPatterns.length === 0) return undefined; + + // Group by archContext + const byContext = new Map(); + for (const pattern of allPatterns) { + const ctx = pattern.archContext ?? 'Other'; + const group = byContext.get(ctx) ?? []; + group.push(getPatternName(pattern)); + byContext.set(ctx, group); + } + + // Build compact text: "Context (A, B), Context (C)" + const parts: string[] = []; + for (const [context, names] of [...byContext.entries()].sort((a, b) => + a[0].localeCompare(b[0]) + )) { + const label = context.charAt(0).toUpperCase() + context.slice(1); + parts.push(`${label} (${names.join(', ')})`); + } + + return paragraph(`**Components:** ${parts.join(', ')}`); +} + // ============================================================================ // Scoped Diagram Builder // ============================================================================ diff --git a/src/renderable/index.ts b/src/renderable/index.ts index 7c98f9ec..32a55f6b 100644 --- a/src/renderable/index.ts +++ b/src/renderable/index.ts @@ -73,7 +73,12 @@ export { // Renderer Exports // ═══════════════════════════════════════════════════════════════════════════ -export { renderToMarkdown, renderDocumentWithFiles, type OutputFile } from './render.js'; +export { + renderToMarkdown, + renderToClaudeMdModule, + renderDocumentWithFiles, + type OutputFile, +} from './render.js'; // ═══════════════════════════════════════════════════════════════════════════ // Codec Exports diff --git a/src/renderable/render.ts b/src/renderable/render.ts index dc5bdeb9..b9725559 100644 --- a/src/renderable/render.ts +++ b/src/renderable/render.ts @@ -9,17 +9,19 @@ * * ## Universal Renderer * - * Converts RenderableDocument to output strings. Two renderers: + * Converts RenderableDocument to output strings. Three renderers: * - `renderToMarkdown` — Full markdown for human documentation - * - `renderToClaudeContext` — Token-efficient format for LLM consumption + * - `renderToClaudeMdModule` — Standard markdown with H3-rooted headings for modular-claude-md + * - `renderToClaudeContext` — Token-efficient format with section markers (legacy) * - * Both are "dumb printers" — they know nothing about patterns, phases, + * All are "dumb printers" — they know nothing about patterns, phases, * or domain concepts. All logic lives in the codecs; these just render blocks. * * ### When to Use * * - `renderToMarkdown` for human-readable docs (`docs/` output) - * - `renderToClaudeContext` for AI context (`_claude-md/` output) + * - `renderToClaudeMdModule` for AI context (`_claude-md/` output) + * - `renderToClaudeContext` for token-efficient AI context (legacy, not used by generators) * - `renderDocumentWithFiles` for multi-file output with detail files */ @@ -248,6 +250,105 @@ function renderCollapsibleClaudeContext(block: CollapsibleBlock): string[] { return lines; } +// ═══════════════════════════════════════════════════════════════════════════ +// Claude MD Module Renderer +// ═══════════════════════════════════════════════════════════════════════════ + +/** Heading offset for modular-claude-md: H1 → H3, H2 → H4, etc. */ +const CLAUDE_MD_MODULE_HEADING_OFFSET = 2; + +/** + * Render a RenderableDocument to a modular-claude-md compatible module. + * + * Uses standard markdown headings offset by +2 (H1→H3, H2→H4) so the + * output plugs directly into modular-claude-md's H3-rooted module system. + * Omits frontmatter, mermaid blocks, and link-out blocks. Flattens + * collapsible blocks into headings. + * + * @param doc - The document to render + * @returns Markdown string compatible with modular-claude-md + */ +export function renderToClaudeMdModule(doc: RenderableDocument): string { + const lines: string[] = []; + + // Title as H3 (H1 + offset 2) + const titleLevel = Math.min(1 + CLAUDE_MD_MODULE_HEADING_OFFSET, 6); + lines.push(`${'#'.repeat(titleLevel)} ${doc.title}`, ''); + + // Frontmatter intentionally omitted — no Purpose/Detail Level lines + + // Sections + for (const block of doc.sections) { + lines.push(...renderBlockClaudeMdModule(block)); + } + + // Ensure single trailing newline + return lines.join('\n').trimEnd() + '\n'; +} + +/** + * Render a single block for modular-claude-md output. + */ +function renderBlockClaudeMdModule(block: SectionBlock): string[] { + switch (block.type) { + case 'heading': { + const level = Math.min(block.level + CLAUDE_MD_MODULE_HEADING_OFFSET, 6); + return [`${'#'.repeat(level)} ${block.text}`, '']; + } + + case 'paragraph': + return [block.text, '']; + + case 'separator': + return ['']; + + case 'table': + return renderTable(block); + + case 'list': + return renderList(block); + + case 'code': { + const fence = block.content.includes('```') ? '````' : '```'; + return [`${fence}${block.language ?? ''}`, block.content, fence, '']; + } + + case 'mermaid': + // Omit mermaid — modular-claude-md targets LLM context + return []; + + case 'collapsible': + return renderCollapsibleClaudeMdModule(block); + + case 'link-out': + // Omit link-out — file links not useful in CLAUDE.md context + return []; + + default: { + const _exhaustive: never = block; + return [``]; + } + } +} + +/** + * Flatten a collapsible block — summary becomes a heading, inner blocks rendered directly. + */ +function renderCollapsibleClaudeMdModule(block: CollapsibleBlock): string[] { + const lines: string[] = []; + + // Summary becomes a heading at offset level (clamped to 6) + const level = Math.min(2 + CLAUDE_MD_MODULE_HEADING_OFFSET, 6); + lines.push(`${'#'.repeat(level)} ${block.summary}`, ''); + + // Render nested content directly + for (const contentBlock of block.content) { + lines.push(...renderBlockClaudeMdModule(contentBlock)); + } + + return lines; +} + // ═══════════════════════════════════════════════════════════════════════════ // Table Renderer // ═══════════════════════════════════════════════════════════════════════════ diff --git a/src/renderable/schema.ts b/src/renderable/schema.ts index c047c425..82b5be0c 100644 --- a/src/renderable/schema.ts +++ b/src/renderable/schema.ts @@ -181,7 +181,10 @@ export type CollapsibleBlock = { }; export type LinkOutBlock = z.infer; -/** @libar-docs-shape reference-sample */ +/** + * @libar-docs-implements RenderableDocument + * @libar-docs-shape reference-sample + */ export type SectionBlock = | HeadingBlock | ParagraphBlock diff --git a/src/taxonomy/categories.ts b/src/taxonomy/categories.ts index e4b312da..52ef3c63 100644 --- a/src/taxonomy/categories.ts +++ b/src/taxonomy/categories.ts @@ -13,9 +13,14 @@ * Categories are used to classify patterns and organize documentation. * Priority determines display order (lower = higher priority). * The ddd-es-cqrs preset includes all 21 categories; simpler presets use subsets. + * + * **When to Use:** When adding new pattern categories or configuring preset category subsets for tag registries. */ -/** @libar-docs-shape reference-sample */ +/** + * @libar-docs-implements CategoryDefinitions + * @libar-docs-shape reference-sample + */ export interface CategoryDefinition { /** Category tag name without prefix (e.g., "core", "api", "ddd", "saga") */ readonly tag: string; diff --git a/src/taxonomy/deliverable-status.ts b/src/taxonomy/deliverable-status.ts index f15e6916..6eb04674 100644 --- a/src/taxonomy/deliverable-status.ts +++ b/src/taxonomy/deliverable-status.ts @@ -21,6 +21,8 @@ * Previously, deliverable status was z.string() with 29-pattern fuzzy * matching at read-time. This caused 3 real bugs (drift campaign 10bab44). * Now enforced at schema level like pattern status. + * + * **When to Use:** When validating or querying deliverable statuses — import these constants instead of hardcoding status strings. */ /** diff --git a/src/taxonomy/format-types.ts b/src/taxonomy/format-types.ts index fc832d2c..0b27accc 100644 --- a/src/taxonomy/format-types.ts +++ b/src/taxonomy/format-types.ts @@ -9,6 +9,8 @@ * * Defines how tag values are parsed and validated. * Each format type determines the parsing strategy for tag values. + * + * **When to Use:** When defining new tag registry entries — choose the format type that matches the tag's value syntax. */ export const FORMAT_TYPES = [ 'value', // Simple string value diff --git a/src/taxonomy/hierarchy-levels.ts b/src/taxonomy/hierarchy-levels.ts index ce6a3d85..fda4cb0f 100644 --- a/src/taxonomy/hierarchy-levels.ts +++ b/src/taxonomy/hierarchy-levels.ts @@ -11,6 +11,8 @@ * - epic: Multi-quarter strategic initiatives * - phase: Standard work units (2-5 days) * - task: Fine-grained session-level work (1-4 hours) + * + * **When to Use:** When assigning or validating work item granularity in roadmap specs and feature annotations. */ export const HIERARCHY_LEVELS = ['epic', 'phase', 'task'] as const; diff --git a/src/taxonomy/layer-types.ts b/src/taxonomy/layer-types.ts index 31864eb2..62e3130d 100644 --- a/src/taxonomy/layer-types.ts +++ b/src/taxonomy/layer-types.ts @@ -14,6 +14,8 @@ * - e2e: End-to-end user journey tests * - component: Unit/component level tests * - unknown: Cannot determine layer from path + * + * **When to Use:** When categorizing feature files by test layer based on their directory path. */ export const LAYER_TYPES = [ 'timeline', diff --git a/src/taxonomy/normalized-status.ts b/src/taxonomy/normalized-status.ts index d2e6607e..c69dc7fe 100644 --- a/src/taxonomy/normalized-status.ts +++ b/src/taxonomy/normalized-status.ts @@ -17,6 +17,8 @@ * * This separation follows DDD principles - the domain model (raw) is * distinct from the view model (normalized). + * + * **When to Use:** When mapping raw FSM statuses to display buckets for UI or generated documentation output. */ /** diff --git a/src/taxonomy/risk-levels.ts b/src/taxonomy/risk-levels.ts index c32b8ff9..781c0d74 100644 --- a/src/taxonomy/risk-levels.ts +++ b/src/taxonomy/risk-levels.ts @@ -8,6 +8,8 @@ * ## Risk Levels for Planning and Assessment * * Three-tier risk classification for roadmap planning. + * + * **When to Use:** When classifying or validating risk levels in roadmap specs and planning sessions. */ export const RISK_LEVELS = ['low', 'medium', 'high'] as const; diff --git a/src/taxonomy/status-values.ts b/src/taxonomy/status-values.ts index ef6dc7e3..863de1ac 100644 --- a/src/taxonomy/status-values.ts +++ b/src/taxonomy/status-values.ts @@ -9,14 +9,14 @@ * * THE single source of truth for FSM state values in the monorepo (per PDR-005 FSM). * - * FSM transitions: + * FSM transitions (canonical source: src/validation/fsm/transitions.ts): * - roadmap to active (start work) - * - roadmap to deferred (pause before start) + * - roadmap to deferred (postpone) * - deferred to roadmap (resume planning) * - active to completed (finish work) - * - active to deferred (pause work) - * - deferred to active (resume work) - * - active cannot regress to roadmap + * - active to roadmap (blocked/regressed) + * + * **When to Use:** When validating or referencing FSM state values — import these constants instead of hardcoding status strings. */ export const PROCESS_STATUS_VALUES = [ 'roadmap', // Planned work, fully editable diff --git a/src/types/errors.ts b/src/types/errors.ts index 7c7ebeeb..b93ef5c6 100644 --- a/src/types/errors.ts +++ b/src/types/errors.ts @@ -10,6 +10,8 @@ * * Structured, discriminated error types with factory functions. * Each error type has a unique `type` discriminator for exhaustive pattern matching. + * + * **When to Use:** When creating or handling domain-specific errors — use these factory types instead of plain Error for exhaustive matching. */ import type { SourceFilePath } from './branded.js'; diff --git a/src/types/result.ts b/src/types/result.ts index 1955e4be..29990ee2 100644 --- a/src/types/result.ts +++ b/src/types/result.ts @@ -10,6 +10,8 @@ * * Explicit error handling via discriminated union. * Functions return `Result.ok(value)` or `Result.err(error)` instead of throwing. + * + * **When to Use:** When a function can fail with a recoverable error — return Result instead of throwing exceptions. */ /** diff --git a/tests/features/behavior/architecture-diagrams/arch-index.feature b/tests/features/behavior/architecture-diagrams/arch-index.feature index 953fee45..c63d8e1d 100644 --- a/tests/features/behavior/architecture-diagrams/arch-index.feature +++ b/tests/features/behavior/architecture-diagrams/arch-index.feature @@ -83,6 +83,7 @@ Feature: Architecture Index in MasterDataset Rule: archIndex.all contains all patterns with any arch tag **Invariant:** archIndex.all must contain exactly the set of patterns that have at least one arch tag (role, context, or layer). + **Rationale:** Consumers iterating over all architectural patterns need a single canonical list; omitting partially-tagged patterns would silently drop them from diagrams. **Verified by:** archIndex.all includes all annotated patterns The archIndex.all array contains all patterns that have at least diff --git a/tests/features/behavior/architecture-diagrams/arch-tag-extraction.feature b/tests/features/behavior/architecture-diagrams/arch-tag-extraction.feature index 43f1df5b..db5ff20d 100644 --- a/tests/features/behavior/architecture-diagrams/arch-tag-extraction.feature +++ b/tests/features/behavior/architecture-diagrams/arch-tag-extraction.feature @@ -45,6 +45,7 @@ Feature: Architecture Tag Extraction Rule: arch-context tag is defined in the registry **Invariant:** The tag registry must contain an arch-context tag with value format for free-form bounded context names. + **Rationale:** Without a registry-defined arch-context tag, bounded context groupings cannot be validated and diagrams may contain arbitrary context names. **Verified by:** arch-context tag exists with value format Context tags group components into bounded context subgraphs. @@ -60,6 +61,7 @@ Feature: Architecture Tag Extraction Rule: arch-layer tag is defined in the registry **Invariant:** The tag registry must contain an arch-layer tag with enum format and exactly three values: domain, application, infrastructure. + **Rationale:** Allowing arbitrary layer values would break the fixed Clean Architecture ordering that layered diagrams depend on. **Verified by:** arch-layer tag exists with enum format, arch-layer has exactly three values Layer tags enable layered architecture diagrams. @@ -86,6 +88,7 @@ Feature: Architecture Tag Extraction Rule: AST parser extracts arch-role from TypeScript annotations **Invariant:** The AST parser must extract the arch-role value from JSDoc annotations and populate the directive's archRole field. + **Rationale:** If arch-role is not extracted, patterns cannot be classified by architectural role and diagram node styling is lost. **Verified by:** Extract arch-role projection, Extract arch-role command-handler The AST parser must extract arch-role alongside other pattern metadata. @@ -123,6 +126,7 @@ Feature: Architecture Tag Extraction Rule: AST parser extracts arch-context from TypeScript annotations **Invariant:** The AST parser must extract the arch-context value from JSDoc annotations and populate the directive's archContext field. + **Rationale:** If arch-context is not extracted, component diagrams cannot group patterns into bounded context subgraphs. **Verified by:** Extract arch-context orders, Extract arch-context inventory Context values are free-form strings naming the bounded context. @@ -160,6 +164,7 @@ Feature: Architecture Tag Extraction Rule: AST parser extracts arch-layer from TypeScript annotations **Invariant:** The AST parser must extract the arch-layer value from JSDoc annotations and populate the directive's archLayer field. + **Rationale:** If arch-layer is not extracted, layered diagrams cannot group patterns into domain/application/infrastructure subgraphs. **Verified by:** Extract arch-layer application, Extract arch-layer infrastructure Layer tags classify components by architectural layer. @@ -197,6 +202,7 @@ Feature: Architecture Tag Extraction Rule: AST parser handles multiple arch tags together **Invariant:** When a JSDoc block contains arch-role, arch-context, and arch-layer tags, all three must be extracted into the directive. + **Rationale:** Partial extraction would cause components to be missing from role, context, or layer groupings depending on which tag was dropped. **Verified by:** Extract all three arch tags Components often have role + context + layer together. diff --git a/tests/features/behavior/architecture-diagrams/component-diagram.feature b/tests/features/behavior/architecture-diagrams/component-diagram.feature index d8b1a3d7..d643c3c0 100644 --- a/tests/features/behavior/architecture-diagrams/component-diagram.feature +++ b/tests/features/behavior/architecture-diagrams/component-diagram.feature @@ -20,6 +20,7 @@ Feature: Component Diagram Generation Rule: Component diagrams group patterns by bounded context **Invariant:** Each distinct arch-context value must produce exactly one Mermaid subgraph containing all patterns with that context. + **Rationale:** Without subgraph grouping, the visual relationship between components and their bounded context is lost, making the diagram structurally meaningless. **Verified by:** Generate subgraphs for bounded contexts Patterns with arch-context are grouped into Mermaid subgraphs. @@ -115,6 +116,7 @@ Feature: Component Diagram Generation Rule: Component diagram includes summary section **Invariant:** The generated component diagram document must include an Overview section with component count and bounded context count. + **Rationale:** Without summary counts, readers cannot quickly assess diagram scope or detect missing components. **Verified by:** Summary section with counts The generated document starts with an overview section @@ -137,6 +139,7 @@ Feature: Component Diagram Generation Rule: Component diagram includes legend when enabled **Invariant:** When the legend is enabled, the document must include a Legend section explaining relationship arrow styles. + **Rationale:** Without a legend, readers cannot distinguish uses, depends-on, implements, and extends arrows, making relationship semantics ambiguous. **Verified by:** Legend section with arrow explanations The legend explains arrow style meanings for readers. @@ -156,6 +159,7 @@ Feature: Component Diagram Generation Rule: Component diagram includes inventory table when enabled **Invariant:** When the inventory is enabled, the document must include a Component Inventory table with Component, Context, Role, and Layer columns. + **Rationale:** The inventory provides a searchable, text-based alternative to the visual diagram for tooling and accessibility. **Verified by:** Inventory table with component details The inventory lists all components with their metadata. diff --git a/tests/features/behavior/architecture-diagrams/generator-registration.feature b/tests/features/behavior/architecture-diagrams/generator-registration.feature index dea93d3c..37b08edc 100644 --- a/tests/features/behavior/architecture-diagrams/generator-registration.feature +++ b/tests/features/behavior/architecture-diagrams/generator-registration.feature @@ -20,6 +20,7 @@ Feature: Architecture Generator Registration Rule: Architecture generator is registered in the registry **Invariant:** The generator registry must contain an "architecture" generator entry available for CLI invocation. + **Rationale:** Without a registered entry, the CLI cannot discover or invoke architecture diagram generation. **Verified by:** Generator is available in registry The architecture generator must be registered like other built-in @@ -34,6 +35,7 @@ Feature: Architecture Generator Registration Rule: Architecture generator produces component diagram by default **Invariant:** Running the architecture generator without diagram type options must produce a component diagram with bounded context subgraphs. + **Rationale:** A sensible default prevents users from needing to specify options for the most common use case. **Verified by:** Default generation produces component diagram Running the architecture generator without options produces @@ -55,6 +57,7 @@ Feature: Architecture Generator Registration Rule: Architecture generator supports diagram type options **Invariant:** The architecture generator must accept a diagram type option that selects between component and layered diagram output. + **Rationale:** Different architectural perspectives (bounded context vs. layer hierarchy) require different diagram types, and the user must be able to select which to generate. **Verified by:** Generate layered diagram with options The generator accepts options to specify diagram type @@ -74,6 +77,7 @@ Feature: Architecture Generator Registration Rule: Architecture generator supports context filtering **Invariant:** When context filtering is applied, the generated diagram must include only patterns from the specified bounded contexts and exclude all others. + **Rationale:** Without filtering, large monorepos would produce unreadable diagrams with dozens of bounded contexts; filtering enables focused per-context views. **Verified by:** Filter to specific contexts The generator can filter to specific bounded contexts diff --git a/tests/features/behavior/architecture-diagrams/layered-diagram.feature b/tests/features/behavior/architecture-diagrams/layered-diagram.feature index 37d39699..d21b075c 100644 --- a/tests/features/behavior/architecture-diagrams/layered-diagram.feature +++ b/tests/features/behavior/architecture-diagrams/layered-diagram.feature @@ -20,6 +20,7 @@ Feature: Layered Architecture Diagram Generation Rule: Layered diagrams group patterns by arch-layer **Invariant:** Each distinct arch-layer value must produce exactly one Mermaid subgraph containing all patterns with that layer. + **Rationale:** Without layer subgraphs, the Clean Architecture boundary between domain, application, and infrastructure is not visually enforced. **Verified by:** Generate subgraphs for each layer Patterns with arch-layer are grouped into Mermaid subgraphs. @@ -105,6 +106,7 @@ Feature: Layered Architecture Diagram Generation Rule: Layered diagram includes summary section **Invariant:** The generated layered diagram document must include an Overview section with annotated source file count. + **Rationale:** Without summary counts, readers cannot assess diagram completeness or detect missing annotated sources. **Verified by:** Summary section for layered view The generated document starts with an overview section diff --git a/tests/features/behavior/codec-migration.feature b/tests/features/behavior/codec-migration.feature index dfbbfa3c..84206dac 100644 --- a/tests/features/behavior/codec-migration.feature +++ b/tests/features/behavior/codec-migration.feature @@ -27,6 +27,7 @@ Feature: Zod Codec Migration Rule: Input codec parses and validates JSON in a single step **Invariant:** Every JSON string parsed through the input codec is both syntactically valid JSON and schema-conformant before returning a typed value. + **Rationale:** Separating parse from validate allows invalid data to leak past the boundary — a single-step codec ensures callers never hold an unvalidated value. **Verified by:** Input codec parses valid JSON to typed object, Input codec returns error for malformed JSON, Input codec returns validation errors for schema violations, Input codec strips $schema field before validation @@ -75,6 +76,7 @@ Feature: Zod Codec Migration Rule: Output codec validates before serialization **Invariant:** Every object serialized through the output codec is schema-validated before JSON.stringify, preventing invalid data from reaching consumers. + **Rationale:** Serializing without validation can produce JSON that downstream consumers cannot parse, causing failures far from the source of the invalid data. **Verified by:** Output codec serializes valid object to JSON, Output codec returns error for schema violations, Output codec respects indent option @@ -108,6 +110,7 @@ Feature: Zod Codec Migration Rule: LintOutputSchema validates CLI lint output structure **Invariant:** Lint output JSON always conforms to the LintOutputSchema, ensuring consistent structure for downstream tooling. + **Rationale:** Non-conformant lint output breaks CI pipeline parsers and IDE integrations that depend on a stable JSON contract. **Verified by:** LintOutputSchema validates correct lint output, LintOutputSchema rejects invalid severity @@ -134,6 +137,7 @@ Feature: Zod Codec Migration Rule: ValidationSummaryOutputSchema validates cross-source analysis output **Invariant:** Validation summary JSON always conforms to the ValidationSummaryOutputSchema, ensuring consistent reporting of cross-source pattern analysis. + **Rationale:** Inconsistent validation summaries cause miscounted pattern coverage, leading to false confidence or missed gaps in cross-source analysis. **Verified by:** ValidationSummaryOutputSchema validates correct validation output, ValidationSummaryOutputSchema rejects invalid issue source @@ -160,6 +164,7 @@ Feature: Zod Codec Migration Rule: RegistryMetadataOutputSchema accepts arbitrary nested structures **Invariant:** Registry metadata codec accepts any valid JSON-serializable object without schema constraints on nested structure. + **Rationale:** Registry consumers attach domain-specific metadata whose shape varies per preset — constraining the nested structure would break extensibility across presets. **Verified by:** RegistryMetadataOutputSchema accepts arbitrary metadata @@ -173,6 +178,7 @@ Feature: Zod Codec Migration Rule: formatCodecError produces human-readable error output **Invariant:** Formatted codec errors always include the operation context and all validation error details for debugging. + **Rationale:** Omitting the operation context or individual field errors forces developers to reproduce failures manually instead of diagnosing from the error message alone. **Verified by:** formatCodecError includes validation errors in output @@ -193,6 +199,7 @@ Feature: Zod Codec Migration Rule: safeParse returns typed values or undefined without throwing **Invariant:** safeParse never throws exceptions; it returns the typed value on success or undefined on any failure. + **Rationale:** Throwing on invalid input forces every call site to wrap in try/catch — returning undefined lets callers use simple conditional checks and avoids unhandled exception crashes. **Verified by:** safeParse returns typed value on valid JSON, safeParse returns undefined on malformed JSON, safeParse returns undefined on schema violation @@ -222,6 +229,7 @@ Feature: Zod Codec Migration Rule: createFileLoader handles filesystem operations with typed errors **Invariant:** File loader converts all filesystem errors (ENOENT, EACCES, generic) into structured CodecError values with appropriate messages and source paths. + **Rationale:** Propagating raw filesystem exceptions leaks Node.js error internals to consumers and prevents consistent error formatting across parse, validate, and I/O failures. **Verified by:** createFileLoader loads and parses valid JSON file, createFileLoader handles ENOENT error, createFileLoader handles EACCES error, createFileLoader handles general read error, createFileLoader handles invalid JSON in file diff --git a/tests/features/behavior/codecs/composite-codec.feature b/tests/features/behavior/codecs/composite-codec.feature index 75b1ebee..d7275595 100644 --- a/tests/features/behavior/codecs/composite-codec.feature +++ b/tests/features/behavior/codecs/composite-codec.feature @@ -20,6 +20,7 @@ Feature: Composite Codec **Invariant:** Sections from child codecs appear in the composite output in the same order as the codecs array. + **Rationale:** Non-deterministic section ordering would make generated documents unstable across runs, breaking diff-based review workflows. **Verified by:** Sections from two codecs appear in order, Three codecs produce sections in array order @@ -47,6 +48,7 @@ Feature: Composite Codec **Invariant:** By default, a separator block is inserted between each child codec's sections. When separateSections is false, no separators are added. + **Rationale:** Without configurable separators, consumers cannot control visual grouping — some documents need clear boundaries between codec outputs while others need seamless flow. **Verified by:** Default separator between sections, No separator when disabled @@ -73,6 +75,7 @@ Feature: Composite Codec **Invariant:** additionalFiles from all children are merged into a single record. When keys collide, the later codec's value wins. + **Rationale:** Silently dropping colliding keys would lose content without warning, while throwing on collision would prevent composing codecs that intentionally override shared file paths. **Verified by:** Non-overlapping files merged, Colliding keys use last-wins @@ -99,6 +102,7 @@ Feature: Composite Codec **Invariant:** composeDocuments accepts RenderableDocument array and produces a composed RenderableDocument without requiring codecs. + **Rationale:** Requiring a full codec instance for simple document merging would force unnecessary schema definitions when callers already hold pre-rendered documents. **Verified by:** Direct document composition @@ -118,6 +122,7 @@ Feature: Composite Codec **Invariant:** Codecs producing empty sections arrays contribute nothing to the output. No separator is emitted for empty outputs. + **Rationale:** Emitting separators around empty sections would produce orphaned dividers in the generated markdown, creating visual noise with no content between them. **Verified by:** Empty codec skipped without separator diff --git a/tests/features/behavior/codecs/convention-extractor.feature b/tests/features/behavior/codecs/convention-extractor.feature index 123d52a8..2d47d544 100644 --- a/tests/features/behavior/codecs/convention-extractor.feature +++ b/tests/features/behavior/codecs/convention-extractor.feature @@ -15,6 +15,9 @@ Feature: Convention Extractor Rule: Empty and missing inputs produce empty results + **Invariant:** Extraction with no tags or no matching patterns always produces an empty result. + **Rationale:** Callers must be able to distinguish "no conventions found" from errors without special-casing nulls or exceptions. + @happy-path @edge-case Scenario: Empty convention tags returns empty array Given an empty MasterDataset @@ -29,6 +32,9 @@ Feature: Convention Extractor Rule: Convention bundles are extracted from matching patterns + **Invariant:** Each unique convention tag produces exactly one bundle, and patterns sharing a tag are merged into that bundle. + **Rationale:** Without tag-based grouping and merging, convention content would be fragmented across duplicates, making downstream rendering unreliable. + @happy-path Scenario: Single pattern with one convention tag produces one bundle Given a pattern tagged with convention "testing-policy" @@ -54,6 +60,9 @@ Feature: Convention Extractor Rule: Structured content is extracted from rule descriptions + **Invariant:** Invariant, rationale, and table content embedded in rule descriptions must be extracted as structured metadata, not raw text. + **Rationale:** Downstream renderers depend on structured fields to produce consistent documentation; unstructured text would require re-parsing at every consumption point. + @happy-path Scenario: Invariant and rationale are extracted from rule description Given a pattern with convention "fsm-rules" and rule description: @@ -86,6 +95,9 @@ Feature: Convention Extractor Rule: Code examples in rule descriptions are preserved + **Invariant:** Fenced code blocks (including Mermaid diagrams) in rule descriptions must be extracted as typed code examples and never discarded. + **Rationale:** Losing code examples during extraction would silently degrade generated documentation, removing diagrams and samples authors intended to publish. + @happy-path Scenario: Mermaid diagram in rule description is extracted as code example Given a convention pattern with a mermaid diagram in tag "fsm-rules" @@ -106,6 +118,9 @@ Feature: Convention Extractor Rule: TypeScript JSDoc conventions are extracted alongside Gherkin + **Invariant:** TypeScript JSDoc and Gherkin convention sources sharing the same tag must merge into a single bundle with all rules preserved from both sources. + **Rationale:** Conventions are defined across both TypeScript and Gherkin; failing to merge them would split a single logical convention into incomplete fragments. + @happy-path Scenario: TypeScript pattern with heading sections produces multiple rules Given a TypeScript pattern with convention "fsm-rules" and heading sections diff --git a/tests/features/behavior/codecs/dedent.feature b/tests/features/behavior/codecs/dedent.feature index ecefed0f..3ad42b3e 100644 --- a/tests/features/behavior/codecs/dedent.feature +++ b/tests/features/behavior/codecs/dedent.feature @@ -63,6 +63,7 @@ Feature: Dedent Helper Function Edge Cases Rule: Empty lines are handled correctly **Invariant:** Empty lines (including lines with only whitespace) must not affect the minimum indentation calculation and must be preserved in output. + **Rationale:** Counting whitespace-only lines as indented content would inflate the minimum indentation, causing non-empty lines to retain unwanted leading spaces. **Verified by:** Empty lines with trailing spaces are preserved, All empty lines returns original text @edge-case @empty-lines @@ -91,6 +92,7 @@ Feature: Dedent Helper Function Edge Cases Rule: Single line input is handled **Invariant:** Single-line input must have its leading whitespace removed without errors or unexpected transformations. + **Rationale:** Failing or returning empty output on single-line input would break callers that extract individual lines from multi-line DocStrings. **Verified by:** Single line with indentation is dedented, Single line without indentation is unchanged @edge-case @single-line @@ -112,6 +114,7 @@ Feature: Dedent Helper Function Edge Cases Rule: Unicode whitespace is handled **Invariant:** Non-breaking spaces and other Unicode whitespace characters must be treated as content, not as indentation to be removed. + **Rationale:** Stripping Unicode whitespace as indentation would corrupt intentional formatting in source code and documentation content. **Verified by:** Non-breaking space is treated as content @edge-case @unicode @@ -127,6 +130,7 @@ Feature: Dedent Helper Function Edge Cases Rule: Relative indentation is preserved **Invariant:** After removing the common leading whitespace, the relative indentation between lines must remain unchanged. + **Rationale:** Altering relative indentation would break the syntactic structure of extracted code blocks, making them unparseable or semantically incorrect. **Verified by:** Nested code blocks preserve relative indentation, Mixed indentation levels are preserved relatively @happy-path @relative-indent diff --git a/tests/features/behavior/codecs/pr-changes-codec-options.feature b/tests/features/behavior/codecs/pr-changes-codec-options.feature index 59eea1aa..e8b0fb95 100644 --- a/tests/features/behavior/codecs/pr-changes-codec-options.feature +++ b/tests/features/behavior/codecs/pr-changes-codec-options.feature @@ -31,6 +31,7 @@ Feature: PR Changes Codec - Options and Filters Rule: PrChangesCodec generates review checklist when includeReviewChecklist is enabled **Invariant:** When includeReviewChecklist is enabled, the codec must generate a "Review Checklist" section with standard items and context-sensitive items based on pattern state (completed, active, dependencies, deliverables). When disabled, no checklist appears. + **Rationale:** A context-sensitive checklist prevents reviewers from missing state-specific concerns (e.g., verifying completed patterns still work, or that dependencies are satisfied) that a static checklist would not cover. **Verified by:** Review checklist generated with standard items, Review checklist includes completed patterns item when applicable, Review checklist includes active work item when applicable, Review checklist includes dependencies item when patterns have dependencies, Review checklist includes deliverables item when patterns have deliverables, No review checklist when includeReviewChecklist is disabled @happy-path @@ -76,6 +77,7 @@ Feature: PR Changes Codec - Options and Filters Rule: PrChangesCodec generates dependencies section when includeDependencies is enabled **Invariant:** When includeDependencies is enabled and patterns have dependency relationships, the codec must render a "Dependencies" section with "Depends On" and "Enables" subsections. When no dependencies exist or the option is disabled, the section is omitted. + **Rationale:** Dependency visibility in PR reviews prevents merging changes that break upstream or downstream patterns, which would otherwise only surface during integration. **Verified by:** Dependencies section shows depends on relationships, Dependencies section shows enables relationships, No dependencies section when patterns have no dependencies, No dependencies section when includeDependencies is disabled @happy-path @@ -107,6 +109,7 @@ Feature: PR Changes Codec - Options and Filters Rule: PrChangesCodec filters patterns by changedFiles **Invariant:** When changedFiles filter is set, only patterns whose source files match (including partial directory path matches) are included in the output. + **Rationale:** Filtering by changed files scopes the PR document to only the patterns actually touched, preventing reviewers from wading through unrelated patterns. **Verified by:** Patterns filtered by changedFiles match, changedFiles filter matches partial paths @happy-path @@ -123,6 +126,7 @@ Feature: PR Changes Codec - Options and Filters Rule: PrChangesCodec filters patterns by releaseFilter **Invariant:** When releaseFilter is set, only patterns with deliverables matching the specified release version are included. + **Rationale:** Release filtering isolates the patterns scheduled for a specific version, enabling targeted release reviews without noise from other versions' deliverables. **Verified by:** Patterns filtered by release version @happy-path diff --git a/tests/features/behavior/codecs/pr-changes-codec-rendering.feature b/tests/features/behavior/codecs/pr-changes-codec-rendering.feature index 26c15b0a..3ea99bfb 100644 --- a/tests/features/behavior/codecs/pr-changes-codec-rendering.feature +++ b/tests/features/behavior/codecs/pr-changes-codec-rendering.feature @@ -62,6 +62,7 @@ Feature: PR Changes Codec - Core Rendering Rule: PrChangesCodec generates summary with filter information **Invariant:** Every PR changes document must contain a Summary section with pattern counts and active filter information. + **Rationale:** Without a summary, reviewers must scan the entire document to understand the scope and filtering context of the PR changes. **Verified by:** Summary section shows pattern counts, Summary shows release tag when releaseFilter is set, Summary shows files filter count when changedFiles is set @happy-path @@ -95,6 +96,7 @@ Feature: PR Changes Codec - Core Rendering Rule: PrChangesCodec groups changes by phase when sortBy is "phase" **Invariant:** When sortBy is "phase" (the default), patterns must be grouped under phase headings in ascending phase order. + **Rationale:** Phase grouping aligns PR changes with the delivery roadmap, letting reviewers verify that changes belong to the expected implementation phase. **Verified by:** Changes grouped by phase with default sortBy, Pattern details shown within phase groups @happy-path @@ -119,6 +121,7 @@ Feature: PR Changes Codec - Core Rendering Rule: PrChangesCodec groups changes by priority when sortBy is "priority" **Invariant:** When sortBy is "priority", patterns must be grouped under High/Medium/Low priority headings with correct pattern assignment. + **Rationale:** Priority grouping lets reviewers focus on high-impact changes first, ensuring critical patterns receive the most review attention. **Verified by:** Changes grouped by priority, Priority groups show correct patterns @happy-path @@ -162,6 +165,7 @@ Feature: PR Changes Codec - Core Rendering Rule: PrChangesCodec renders pattern details with metadata and description **Invariant:** Each pattern entry must include a metadata table (status, phase, business value when available) and description text. + **Rationale:** Metadata and description provide the context reviewers need to evaluate whether a pattern's implementation aligns with its stated purpose and delivery status. **Verified by:** Pattern detail shows metadata table, Pattern detail shows business value when available, Pattern detail shows description @happy-path @@ -192,6 +196,7 @@ Feature: PR Changes Codec - Core Rendering Rule: PrChangesCodec renders deliverables when includeDeliverables is enabled **Invariant:** Deliverables are only rendered when includeDeliverables is enabled, and when releaseFilter is set, only deliverables matching that release are shown. + **Rationale:** Deliverables add bulk to the PR document; gating them behind a flag keeps default output concise, while release filtering prevents reviewers from seeing unrelated work items. **Verified by:** Deliverables shown when patterns have deliverables, Deliverables filtered by release when releaseFilter is set, No deliverables section when includeDeliverables is disabled @happy-path @@ -217,6 +222,7 @@ Feature: PR Changes Codec - Core Rendering Rule: PrChangesCodec renders acceptance criteria from scenarios **Invariant:** When patterns have associated scenarios, the codec must render an "Acceptance Criteria" section containing scenario names and step lists. + **Rationale:** Acceptance criteria give reviewers a concrete checklist to verify that the PR's implementation satisfies the behavioral requirements defined in the spec. **Verified by:** Acceptance criteria rendered when patterns have scenarios, Acceptance criteria shows scenario steps @happy-path @@ -233,6 +239,7 @@ Feature: PR Changes Codec - Core Rendering Rule: PrChangesCodec renders business rules from Gherkin Rule keyword **Invariant:** When patterns have Gherkin Rule blocks, the codec must render a "Business Rules" section containing rule names and verification information. + **Rationale:** Business rules surface domain invariants directly in the PR review, ensuring reviewers can verify that implementation changes respect the documented constraints. **Verified by:** Business rules rendered when patterns have rules, Business rules show rule names and verification info @happy-path diff --git a/tests/features/behavior/codecs/reference-codec-core.feature b/tests/features/behavior/codecs/reference-codec-core.feature index 784eefa7..3551178c 100644 --- a/tests/features/behavior/codecs/reference-codec-core.feature +++ b/tests/features/behavior/codecs/reference-codec-core.feature @@ -16,6 +16,9 @@ Feature: Reference Codec - Core Behavior Rule: Empty datasets produce fallback content + **Invariant:** A codec must always produce a valid document, even when no matching content exists in the dataset. + **Rationale:** Consumers rely on a consistent document structure; a missing or null document would cause rendering failures downstream. + @happy-path @edge-case Scenario: Codec with no matching content produces fallback message Given a reference config with convention tags "nonexistent" and behavior tags "nonexistent" @@ -26,6 +29,9 @@ Feature: Reference Codec - Core Behavior Rule: Convention content is rendered as sections + **Invariant:** Convention-tagged patterns must render as distinct headed sections with their rule names, invariants, and tables preserved. + **Rationale:** Conventions define project-wide constraints; losing their structure in generated docs would make them unenforceable and undiscoverable. + @happy-path Scenario: Convention rules appear as H2 headings with content Given a reference config with convention tags "fsm-rules" and behavior tags "" @@ -45,6 +51,9 @@ Feature: Reference Codec - Core Behavior Rule: Detail level controls output density + **Invariant:** Each detail level (summary, standard, detailed) must produce a deterministic subset of content, with summary being the most restrictive. + **Rationale:** AI session contexts have strict token budgets; uncontrolled output density wastes context window and degrades session quality. + @happy-path Scenario: Summary level omits narrative and rationale Given a reference config with convention tags "fsm-rules" and behavior tags "" @@ -62,6 +71,9 @@ Feature: Reference Codec - Core Behavior Rule: Behavior sections are rendered from category-matching patterns + **Invariant:** Only patterns whose category matches the configured behavior tags may appear in the Behavior Specifications section. + **Rationale:** Mixing unrelated categories into a single behavior section would produce misleading documentation that conflates distinct concerns. + @happy-path Scenario: Behavior-tagged patterns appear in a Behavior Specifications section Given a reference config with convention tags "" and behavior tags "process-guard" @@ -71,6 +83,9 @@ Feature: Reference Codec - Core Behavior Rule: Shape sources are extracted from matching patterns + **Invariant:** Only shapes from patterns whose file path matches the configured shapeSources glob may appear in the API Types section. + **Rationale:** Including shapes from unrelated source paths would pollute the API Types section with irrelevant type definitions, breaking the scoped documentation contract. + @happy-path Scenario: Shapes appear when source file matches shapeSources glob Given a reference config with shapeSources "src/lint/*.ts" @@ -96,6 +111,9 @@ Feature: Reference Codec - Core Behavior Rule: Convention and behavior content compose in a single document + **Invariant:** Convention and behavior content must coexist in the same RenderableDocument when both are present in the dataset. + **Rationale:** Splitting conventions and behaviors into separate documents would force consumers to cross-reference multiple files, losing the unified view of a product area. + @happy-path Scenario: Both convention and behavior sections appear when data exists Given a reference config with convention tags "fsm-rules" and behavior tags "process-guard" @@ -106,6 +124,9 @@ Feature: Reference Codec - Core Behavior Rule: Composition order follows AD-5: conventions then shapes then behaviors + **Invariant:** Document sections must follow the canonical order: conventions, then API types (shapes), then behavior specifications. + **Rationale:** AD-5 establishes a consistent reading flow (rules, then types, then specs); violating this order would confuse readers who expect a stable document structure. + @happy-path Scenario: Convention headings appear before shapes before behaviors Given a reference config with all three content sources @@ -116,6 +137,9 @@ Feature: Reference Codec - Core Behavior Rule: Convention code examples render as mermaid blocks + **Invariant:** Mermaid diagram content in conventions must render as fenced mermaid blocks, and must be excluded at summary detail level. + **Rationale:** Mermaid diagrams are visual aids that require rendering support; emitting them as plain text would produce unreadable output, and including them in summaries wastes token budget. + @happy-path Scenario: Convention with mermaid content produces mermaid block in output Given a reference config with convention tags "fsm-rules" and behavior tags "" diff --git a/tests/features/behavior/codecs/reference-codec-detail-rendering.feature b/tests/features/behavior/codecs/reference-codec-detail-rendering.feature index 0689064b..08c456f2 100644 --- a/tests/features/behavior/codecs/reference-codec-detail-rendering.feature +++ b/tests/features/behavior/codecs/reference-codec-detail-rendering.feature @@ -16,6 +16,9 @@ Feature: Reference Codec - Detail Level Rendering Rule: Standard detail level includes narrative but omits rationale + **Invariant:** Standard detail level renders narrative prose for convention patterns but excludes rationale sections, reserving rationale for the detailed level only. + **Rationale:** Progressive disclosure prevents information overload at the standard level while ensuring readers who need deeper justification can access it at the detailed level. + @happy-path Scenario: Standard level includes narrative but omits rationale Given a reference config with convention tags "fsm-rules" and behavior tags "" @@ -26,6 +29,9 @@ Feature: Reference Codec - Detail Level Rendering Rule: Deep behavior rendering with structured annotations + **Invariant:** Behavior patterns render structured rule annotations (invariant, rationale, verified-by) at detailed level, invariant-only at standard level, and a truncated table at summary level. + **Rationale:** Structured annotations are the primary mechanism for surfacing business rules from Gherkin sources; inconsistent rendering across detail levels would produce misleading or incomplete documentation. + @happy-path Scenario: Detailed level renders structured behavior rules Given a reference config with convention tags "" and behavior tags "process-guard" @@ -62,6 +68,9 @@ Feature: Reference Codec - Detail Level Rendering Rule: Shape JSDoc prose renders at standard and detailed levels + **Invariant:** Shape patterns with JSDoc prose include that prose in rendered code blocks at standard and detailed levels. Shapes without JSDoc render code blocks only. + **Rationale:** JSDoc prose provides essential context for API types; omitting it would force readers to open source files to understand a shape's purpose, undermining the generated documentation's self-sufficiency. + @happy-path Scenario: Standard level includes JSDoc in code blocks Given a reference config with shapeSources "src/lint/*.ts" @@ -87,6 +96,9 @@ Feature: Reference Codec - Detail Level Rendering Rule: Shape sections render param returns and throws documentation + **Invariant:** Function shapes render parameter, returns, and throws documentation at detailed level. Standard level renders parameter tables but omits throws. Shapes without param docs skip the parameter table entirely. + **Rationale:** Throws documentation is diagnostic detail that clutters standard output; separating it into detailed level keeps standard output focused on the function's contract while preserving full error documentation for consumers who need it. + @happy-path Scenario: Detailed level renders param table for function shapes Given a reference config with shapeSources "src/lint/*.ts" @@ -196,6 +208,7 @@ Feature: Reference Codec - Detail Level Rendering **Invariant:** Patterns with matching include tags appear alongside category-selected patterns in the behavior section. The merging is additive (OR semantics). + **Rationale:** Cross-cutting patterns (e.g., shared utilities, common validators) belong in multiple reference documents; without include-tag routing, these patterns would only appear in their home category, leaving dependent documents incomplete. **Verified by:** Include-tagged pattern appears in behavior section, Include-tagged pattern is additive with category-selected patterns, diff --git a/tests/features/behavior/codecs/reference-codec-diagrams.feature b/tests/features/behavior/codecs/reference-codec-diagrams.feature index 0fd31f07..8168dc88 100644 --- a/tests/features/behavior/codecs/reference-codec-diagrams.feature +++ b/tests/features/behavior/codecs/reference-codec-diagrams.feature @@ -16,6 +16,9 @@ Feature: Reference Codec - Diagram Scoping Rule: Scoped diagrams are generated from diagramScope config + **Invariant:** Diagram content is determined exclusively by diagramScope filters (archContext, include, archLayer, patterns), and filters compose via OR — a pattern matching any single filter appears in the diagram. + **Rationale:** Without filter-driven scoping, diagrams would include all patterns regardless of relevance, producing unreadable visualizations that obscure architectural boundaries. + @happy-path Scenario: Config with diagramScope produces mermaid block at detailed level Given a reference config with diagramScope archContext "lint" @@ -100,6 +103,9 @@ Feature: Reference Codec - Diagram Scoping Rule: Multiple diagram scopes produce multiple mermaid blocks + **Invariant:** Each entry in the diagramScopes array produces an independent Mermaid block with its own title and direction, and legacy singular diagramScope remains supported as a fallback. + **Rationale:** Product areas require multiple architectural views (e.g., system overview and data flow) from a single configuration, and breaking backward compatibility with the singular diagramScope would silently remove diagrams from existing consumers. + @happy-path Scenario: Config with diagramScopes array produces multiple diagrams Given a reference config with two diagramScopes diff --git a/tests/features/behavior/codecs/requirements-adr-codecs.feature b/tests/features/behavior/codecs/requirements-adr-codecs.feature index 5442559b..5bec34d6 100644 --- a/tests/features/behavior/codecs/requirements-adr-codecs.feature +++ b/tests/features/behavior/codecs/requirements-adr-codecs.feature @@ -26,6 +26,7 @@ Feature: Requirements and ADR Document Codecs Rule: RequirementsDocumentCodec generates PRD-style documentation from patterns **Invariant:** RequirementsDocumentCodec transforms MasterDataset patterns into a PRD-style document with flexible grouping (product area, user role, or phase), optional detail file generation, and business value rendering. + **Rationale:** Flexible grouping lets stakeholders view requirements through their preferred lens (area, role, or phase), and detail files provide deep-dive context without bloating the summary document. **Verified by:** No patterns with PRD metadata produces empty message, Summary shows counts and groupings, By product area section groups patterns correctly, By user role section uses collapsible groups, Group by phase option changes primary grouping, Filter by status option limits patterns, All features table shows complete list, Business value rendering when enabled, Generate individual requirement detail files when enabled, Requirement detail file contains acceptance criteria from scenarios, Requirement detail file contains business rules section, Implementation links from relationshipIndex @happy-path @edge-case @@ -120,6 +121,7 @@ Feature: Requirements and ADR Document Codecs Rule: AdrDocumentCodec documents architecture decisions **Invariant:** AdrDocumentCodec transforms MasterDataset ADR patterns into an architecture decision record document with status tracking, category/phase/date grouping, supersession relationships, and optional detail file generation. + **Rationale:** Architecture decisions lose value without status tracking and supersession chains; without them, teams act on outdated decisions and cannot trace why a previous approach was abandoned. **Verified by:** No ADR patterns produces empty message, Summary shows status counts and categories, ADRs grouped by category, ADRs grouped by phase option, ADRs grouped by date (quarter) option, ADR index table with all decisions, ADR entries use clean text without emojis, Context, Decision, Consequences sections from Rule keywords, ADR supersedes rendering, Generate individual ADR detail files when enabled, ADR detail file contains full content @happy-path @edge-case diff --git a/tests/features/behavior/codecs/shape-matcher.feature b/tests/features/behavior/codecs/shape-matcher.feature index fde734a0..e3ff34cc 100644 --- a/tests/features/behavior/codecs/shape-matcher.feature +++ b/tests/features/behavior/codecs/shape-matcher.feature @@ -15,6 +15,7 @@ Feature: Shape Source Pattern Matching Rule: Exact paths match without wildcards **Invariant:** A pattern without glob characters must match only the exact file path, character for character. + **Rationale:** Loose matching on non-glob patterns would silently include unintended files, causing incorrect shapes to appear in generated documentation. **Verified by:** Exact path matches identical path, Exact path does not match different path @happy-path @@ -30,6 +31,7 @@ Feature: Shape Source Pattern Matching Rule: Single-level globs match one directory level **Invariant:** A single `*` glob must match files only within the specified directory, never crossing directory boundaries. + **Rationale:** Crossing directory boundaries would violate standard glob semantics and pull in shapes from nested modules that belong to different product areas. **Verified by:** Single glob matches file in target directory, Single glob does not match nested subdirectory, Single glob does not match wrong extension @happy-path @@ -50,6 +52,7 @@ Feature: Shape Source Pattern Matching Rule: Recursive globs match any depth **Invariant:** A `**` glob must match files at any nesting depth below the specified prefix, while still respecting extension and prefix constraints. + **Rationale:** Recursive globs enable broad subtree selection for shape extraction; failing to respect prefix and extension constraints would leak unrelated shapes into the output. **Verified by:** Recursive glob matches file at target depth, Recursive glob matches file at deeper depth, Recursive glob matches file at top level, Recursive glob does not match wrong prefix @happy-path diff --git a/tests/features/behavior/codecs/shape-selector.feature b/tests/features/behavior/codecs/shape-selector.feature index 160a719b..f9efdc16 100644 --- a/tests/features/behavior/codecs/shape-selector.feature +++ b/tests/features/behavior/codecs/shape-selector.feature @@ -15,6 +15,7 @@ Feature: Shape Selector Filtering **Invariant:** shapeSelectors provides three selection modes: by source path + specific names, by group tag, or by source path alone. + **Rationale:** Multiple selection modes let reference docs curate precisely which shapes appear, preventing either over-inclusion of internal types or under-inclusion of public API surfaces. **Verified by:** Select by source and names, Select by group, diff --git a/tests/features/behavior/context-inference.feature b/tests/features/behavior/context-inference.feature index eb86561d..8186cccf 100644 --- a/tests/features/behavior/context-inference.feature +++ b/tests/features/behavior/context-inference.feature @@ -69,6 +69,7 @@ Feature: Context Auto-Inference from File Paths Rule: matchPattern supports prefix matching **Invariant:** A trailing slash pattern matches any file whose path starts with that directory prefix. + **Rationale:** Without prefix matching, users would need separate wildcard patterns for each nesting depth, making rule configuration verbose and error-prone. **Verified by:** Prefix matching behavior @edge-case @pattern-matching @@ -162,6 +163,7 @@ Feature: Context Auto-Inference from File Paths Rule: Inference works independently of archLayer **Invariant:** Context inference operates on file path alone; the presence or absence of archLayer does not affect context assignment. + **Rationale:** Coupling context inference to archLayer would prevent context-based queries from finding patterns that lack explicit layer annotations. **Verified by:** Pattern without archLayer is still added to byContext if context is inferred @edge-case @inference diff --git a/tests/features/behavior/description-headers.feature b/tests/features/behavior/description-headers.feature index 03e614c5..6e896664 100644 --- a/tests/features/behavior/description-headers.feature +++ b/tests/features/behavior/description-headers.feature @@ -65,6 +65,7 @@ Feature: Description Header Normalization Rule: Edge cases are handled correctly **Invariant:** Header stripping handles degenerate inputs (header-only, whitespace-only, mid-description headers) without data loss or rendering errors. + **Rationale:** Patterns with unusual descriptions (header-only stubs, whitespace padding) are common in early roadmap stages; crashing on these would block documentation generation for the entire dataset. **Verified by:** Empty description after stripping headers, Description with only whitespace and headers, Header in middle of description is preserved Scenario: Empty description after stripping headers @@ -98,6 +99,7 @@ Feature: Description Header Normalization Rule: stripLeadingHeaders removes only leading headers **Invariant:** The helper function strips only headers that appear before any non-header content; headers occurring after body text are preserved. + **Rationale:** Mid-description headers are intentional structural elements authored by the user; stripping them would silently destroy document structure. **Verified by:** Strips h1 header, Strips h2 through h6 headers, Strips leading empty lines before header, Preserves content starting with text, Returns empty string for header-only input, Handles null/undefined input Scenario: Strips h1 header diff --git a/tests/features/behavior/description-quality-foundation.feature b/tests/features/behavior/description-quality-foundation.feature index 1aeabaa3..21ebf18a 100644 --- a/tests/features/behavior/description-quality-foundation.feature +++ b/tests/features/behavior/description-quality-foundation.feature @@ -24,6 +24,7 @@ Feature: Description Quality Foundation Rule: Behavior files are verified during pattern extraction **Invariant:** Every timeline pattern must report whether its corresponding behavior file exists. + **Rationale:** Without verification at extraction time, traceability reports would silently include broken references to non-existent behavior files. **Verified by:** Behavior file existence verified during extraction, Missing behavior file sets verification to false, Explicit behavior file tag skips verification, Behavior file inferred from timeline naming convention @acceptance-criteria @@ -57,6 +58,7 @@ Feature: Description Quality Foundation Rule: Traceability coverage reports verified and unverified behavior files **Invariant:** Coverage reports must distinguish between patterns with verified behavior files and those without. + **Rationale:** Conflating verified and unverified coverage would overstate test confidence, hiding gaps that should be addressed before release. **Verified by:** Traceability shows covered phases with verified behavior files @acceptance-criteria @@ -74,6 +76,7 @@ Feature: Description Quality Foundation Rule: Pattern names are transformed to human-readable display names **Invariant:** Display names must convert CamelCase to title case, handle consecutive capitals, and respect explicit title overrides. + **Rationale:** CamelCase identifiers are unreadable in generated documentation; human-readable names are essential for non-developer consumers of pattern registries. **Verified by:** CamelCase pattern names transformed to title case, PascalCase with consecutive caps handled correctly, Falls back to name when no patternName, Explicit title tag overrides CamelCase transformation @acceptance-criteria @@ -104,6 +107,7 @@ Feature: Description Quality Foundation Rule: PRD acceptance criteria are formatted with numbering and bold keywords **Invariant:** PRD output must number acceptance criteria and bold Given/When/Then keywords when steps are enabled. + **Rationale:** Unnumbered criteria are difficult to reference in reviews; unformatted step keywords blend into prose, making scenarios harder to parse visually. **Verified by:** PRD shows numbered acceptance criteria with bold keywords, PRD respects includeScenarioSteps flag, PRD shows full Feature description without truncation @acceptance-criteria @@ -133,6 +137,7 @@ Feature: Description Quality Foundation Rule: Business values are formatted for human readability **Invariant:** Hyphenated business value tags must be converted to space-separated readable text in all output contexts. + **Rationale:** Raw hyphenated tags like "enable-rich-prd" are annotation artifacts; displaying them verbatim in generated docs confuses readers expecting natural language. **Verified by:** Hyphenated business value converted to spaces, Business value displayed in Next Actionable table, File extensions not treated as sentence endings @acceptance-criteria diff --git a/tests/features/behavior/error-handling.feature b/tests/features/behavior/error-handling.feature index e7232e1b..c37286e7 100644 --- a/tests/features/behavior/error-handling.feature +++ b/tests/features/behavior/error-handling.feature @@ -27,6 +27,7 @@ Feature: Error Handling Unification Rule: isDocError type guard classifies errors correctly **Invariant:** isDocError must return true for valid DocError instances and false for non-DocError values including null and undefined. + **Rationale:** Without a reliable type guard, error handlers cannot safely narrow unknown caught values to DocError, forcing unsafe casts or redundant field checks at every catch site. **Verified by:** isDocError detects valid DocError instances, isDocError rejects non-DocError objects, isDocError rejects null and undefined @@ -51,6 +52,7 @@ Feature: Error Handling Unification Rule: formatDocError produces structured human-readable output **Invariant:** formatDocError must include all context fields (error type, file path, line number) and render validation errors when present on pattern errors. + **Rationale:** Omitting context fields forces developers to cross-reference logs with source files manually; including all fields in a single formatted message makes errors actionable on first read. **Verified by:** formatDocError includes structured context, formatDocError includes validation errors for pattern errors @@ -112,6 +114,7 @@ Feature: Error Handling Unification Rule: CLI error handler formats unknown errors gracefully **Invariant:** Unknown error values (non-DocError, non-Error) must be formatted as "Error: {value}" strings for safe display without crashing. + **Rationale:** CLI commands can receive arbitrary thrown values (strings, numbers, objects); coercing them to a safe string prevents the error handler itself from crashing on unexpected types. **Verified by:** handleCliError formats unknown errors diff --git a/tests/features/behavior/extract-summary.feature b/tests/features/behavior/extract-summary.feature index 8d28e40c..d6cc3aea 100644 --- a/tests/features/behavior/extract-summary.feature +++ b/tests/features/behavior/extract-summary.feature @@ -25,6 +25,7 @@ Feature: Extract Summary from Pattern Descriptions Rule: Single-line descriptions are returned as-is when complete **Invariant:** A single-line description that ends with sentence-ending punctuation is returned verbatim; one without gets an appended ellipsis. + **Rationale:** Summaries appear in pattern tables where readers expect grammatically complete text; an ellipsis signals intentional truncation rather than a rendering bug. **Verified by:** Complete sentence on single line, Single line without sentence ending gets ellipsis Scenario: Complete sentence on single line @@ -49,6 +50,7 @@ Feature: Extract Summary from Pattern Descriptions Rule: Multi-line descriptions are combined until sentence ending **Invariant:** Lines are concatenated until a sentence-ending punctuation mark is found or the character limit is reached, whichever comes first. + **Rationale:** Splitting at arbitrary line breaks produces sentence fragments that lose meaning; combining until a natural boundary preserves semantic completeness. **Verified by:** Two lines combine into complete sentence, Combines lines up to sentence boundary within limit, Long multi-line text truncates when exceeds limit, Multi-line without sentence ending gets ellipsis Scenario: Two lines combine into complete sentence @@ -156,6 +158,7 @@ Feature: Extract Summary from Pattern Descriptions Rule: Edge cases are handled gracefully **Invariant:** Degenerate inputs (empty strings, markdown-only content, bold markers) produce valid output without errors: empty input yields empty string, formatting is stripped, and multiple sentence endings use the first. + **Rationale:** Summary extraction runs on every pattern in the dataset; an unhandled edge case would crash the entire documentation generation pipeline. **Verified by:** Empty description returns empty string, Markdown headers are stripped, Bold markdown is stripped, Multiple sentence endings - takes first complete sentence, Question mark as sentence ending Scenario: Empty description returns empty string diff --git a/tests/features/behavior/implementation-links.feature b/tests/features/behavior/implementation-links.feature index e0cae5a1..a77a4a3a 100644 --- a/tests/features/behavior/implementation-links.feature +++ b/tests/features/behavior/implementation-links.feature @@ -50,6 +50,7 @@ Feature: Implementation Link Path Normalization Rule: All implementation links in a pattern are normalized **Invariant:** Every implementation link in a pattern document must have its path normalized, regardless of how many implementations exist. + **Rationale:** A single un-normalized link in a multi-implementation pattern produces a broken reference that undermines trust in the entire generated document. **Verified by:** Multiple implementations with mixed prefixes Scenario: Multiple implementations with mixed prefixes @@ -73,6 +74,7 @@ Feature: Implementation Link Path Normalization Rule: normalizeImplPath strips known prefixes **Invariant:** normalizeImplPath removes only recognized repository prefixes from the start of a path and leaves all other path segments unchanged. + **Rationale:** Over-stripping would corrupt legitimate path segments that happen to match a prefix name, producing silent broken links. **Verified by:** Strips libar-platform/ prefix, Strips monorepo/ prefix, Returns unchanged path without known prefix, Only strips prefix at start of path Scenario: Strips libar-platform/ prefix diff --git a/tests/features/behavior/kebab-case-slugs.feature b/tests/features/behavior/kebab-case-slugs.feature index c8445ada..486862fc 100644 --- a/tests/features/behavior/kebab-case-slugs.feature +++ b/tests/features/behavior/kebab-case-slugs.feature @@ -21,6 +21,7 @@ Feature: Slug Generation for Progressive Disclosure Rule: CamelCase names convert to kebab-case **Invariant:** CamelCase pattern names must be split at word boundaries and joined with hyphens in lowercase. + **Rationale:** Generated file names and URL fragments must be human-readable and URL-safe; unsplit CamelCase produces opaque slugs that are difficult to scan in directory listings. **Verified by:** Convert pattern names to readable slugs Scenario Outline: Convert pattern names to readable slugs @@ -44,6 +45,7 @@ Feature: Slug Generation for Progressive Disclosure Rule: Edge cases are handled correctly **Invariant:** Slug generation must handle special characters, consecutive separators, and leading/trailing hyphens without producing invalid slugs. + **Rationale:** Unhandled edge cases produce malformed file names (double hyphens, leading dashes) that break cross-platform path resolution and make generated links inconsistent. **Verified by:** Handle edge cases in slug generation Scenario Outline: Handle edge cases in slug generation @@ -62,6 +64,7 @@ Feature: Slug Generation for Progressive Disclosure Rule: Requirements include phase prefix **Invariant:** Requirement slugs must be prefixed with "phase-NN-" where NN is the zero-padded phase number, defaulting to "00" when no phase is assigned. + **Rationale:** Phase prefixes enable lexicographic sorting of requirement files by delivery order, so directory listings naturally reflect the roadmap sequence. **Verified by:** Requirement slugs include phase number, Requirement without phase uses phase 00 Scenario Outline: Requirement slugs include phase number @@ -84,6 +87,7 @@ Feature: Slug Generation for Progressive Disclosure Rule: Phase slugs use kebab-case for names **Invariant:** Phase slugs must combine a zero-padded phase number with the kebab-case name in the format "phase-NN-name", defaulting to "unnamed" when no name is provided. + **Rationale:** A consistent "phase-NN-name" format ensures phase files sort numerically and remain identifiable even when the phase number alone would be ambiguous across roadmap versions. **Verified by:** Phase slugs combine number and kebab-case name, Phase without name uses "unnamed" Scenario Outline: Phase slugs combine number and kebab-case name diff --git a/tests/features/behavior/layer-inference.feature b/tests/features/behavior/layer-inference.feature index a05007ff..2f16f3be 100644 --- a/tests/features/behavior/layer-inference.feature +++ b/tests/features/behavior/layer-inference.feature @@ -25,6 +25,7 @@ Feature: Layer Inference from Feature File Paths Rule: Timeline layer is detected from /timeline/ directory segments **Invariant:** Any feature file path containing a /timeline/ directory segment is classified as timeline layer. + **Rationale:** Timeline features track phased delivery progress and must be grouped separately for roadmap generation and phase filtering. **Verified by:** Detect timeline features from /timeline/ path, Detect timeline features regardless of parent directories, Detect timeline features in delivery-process package @happy-path @timeline @@ -48,6 +49,7 @@ Feature: Layer Inference from Feature File Paths Rule: Domain layer is detected from business context directory segments **Invariant:** Feature files in /deciders/, /orders/, or /inventory/ directories are classified as domain layer. + **Rationale:** Domain features define core business rules and must be distinguished from infrastructure tests for accurate coverage reporting. **Verified by:** Detect decider features as domain, Detect orders features as domain, Detect inventory features as domain @happy-path @domain @@ -71,6 +73,7 @@ Feature: Layer Inference from Feature File Paths Rule: Integration layer is detected and takes priority over domain directories **Invariant:** Paths containing /integration-features/ or /integration/ are classified as integration, even when they also contain domain directory names. + **Rationale:** Integration tests nested under domain directories (e.g., /integration/orders/) would be misclassified as domain without explicit priority, skewing layer coverage metrics. **Verified by:** Detect integration-features directory as integration, Detect /integration/ directory as integration, Integration takes priority over orders subdirectory, Integration takes priority over inventory subdirectory @happy-path @integration @@ -100,6 +103,7 @@ Feature: Layer Inference from Feature File Paths Rule: E2E layer is detected from /e2e/ directory segments **Invariant:** Any feature file path containing an /e2e/ directory segment is classified as e2e layer. + **Rationale:** E2E tests require separate execution infrastructure and longer timeouts; misclassification would mix them into faster test suites. **Verified by:** Detect e2e features from /e2e/ path, Detect e2e features in frontend app, Detect e2e-journeys as e2e @happy-path @e2e @@ -123,6 +127,7 @@ Feature: Layer Inference from Feature File Paths Rule: Component layer is detected from tool-specific directory segments **Invariant:** Feature files in /scanner/ or /lint/ directories are classified as component layer. + **Rationale:** Tool-specific features test internal pipeline stages and must be isolated from business domain and integration layers in documentation grouping. **Verified by:** Detect scanner features as component, Detect lint features as component @happy-path @component @@ -140,6 +145,7 @@ Feature: Layer Inference from Feature File Paths Rule: Unknown layer is the fallback for unclassified paths **Invariant:** Any feature file path that does not match a known layer pattern is classified as unknown. + **Rationale:** Silently dropping unclassified features would create invisible gaps in test coverage; the unknown fallback ensures every feature is accounted for. **Verified by:** Return unknown for unclassified paths, Return unknown for root-level features, Return unknown for generic test paths @edge-case @unknown @@ -163,6 +169,7 @@ Feature: Layer Inference from Feature File Paths Rule: Path normalization handles cross-platform and case differences **Invariant:** Layer inference produces correct results regardless of path separators, case, or absolute vs relative paths. + **Rationale:** The consumer monorepo runs on multiple platforms; platform-dependent classification would produce inconsistent documentation across developer machines and CI. **Verified by:** Handle Windows-style paths with backslashes, Be case-insensitive, Handle mixed path separators, Handle absolute Unix paths, Handle Windows absolute paths, Timeline in filename only should not match, Timeline detected even with deep nesting @edge-case @normalization @@ -210,6 +217,7 @@ Feature: Layer Inference from Feature File Paths Rule: FEATURE_LAYERS constant provides validated layer enumeration **Invariant:** FEATURE_LAYERS is a readonly array containing exactly all 6 valid layer values. + **Rationale:** Consumers iterate over FEATURE_LAYERS for exhaustive layer handling; a mutable or incomplete array would cause missed layers at runtime. **Verified by:** FEATURE_LAYERS contains all valid layer values, FEATURE_LAYERS has exactly 6 layers, FEATURE_LAYERS is a readonly array @constant @validation diff --git a/tests/features/behavior/pattern-relationships/depends-on-tag.feature b/tests/features/behavior/pattern-relationships/depends-on-tag.feature index 2b6ab146..324e952c 100644 --- a/tests/features/behavior/pattern-relationships/depends-on-tag.feature +++ b/tests/features/behavior/pattern-relationships/depends-on-tag.feature @@ -16,6 +16,7 @@ Feature: Planning Dependency Tags Rule: Depends-on tag is defined in taxonomy registry **Invariant:** The depends-on and enables tags must exist in the taxonomy registry with CSV format. + **Rationale:** Without registry definitions, the data-driven AST parser cannot discover or extract these planning dependency tags from source files. **Verified by:** Depends-on tag exists in registry, Enables tag exists in registry @unit @@ -41,6 +42,7 @@ Feature: Planning Dependency Tags Rule: Depends-on tag is extracted from Gherkin files **Invariant:** The Gherkin parser must extract depends-on values from feature file tags, including CSV multi-value lists. + **Rationale:** Missing dependency extraction causes the dependency tree and blocking-pattern queries to return incomplete results. **Verified by:** Depends-on extracted from feature file, Multiple depends-on values extracted as CSV @acceptance-criteria @happy-path @@ -96,6 +98,7 @@ Feature: Planning Dependency Tags Rule: Enables tag is extracted from Gherkin files **Invariant:** The Gherkin parser must extract enables values from feature file tags, including CSV multi-value lists. + **Rationale:** Missing enables extraction breaks forward-looking dependency queries, hiding which patterns are unblocked when a prerequisite completes. **Verified by:** Enables extracted from feature file, Multiple enables values extracted as CSV @acceptance-criteria @happy-path @@ -131,6 +134,7 @@ Feature: Planning Dependency Tags Rule: Planning dependencies are stored in relationship index **Invariant:** The relationship index must store dependsOn and enables relationships extracted from pattern metadata. + **Rationale:** Omitting planning dependencies from the index causes blocking-pattern and critical-path queries to return incomplete results. **Verified by:** DependsOn relationships stored in relationship index, Enables relationships stored explicitly The relationship index stores dependsOn and enables relationships diff --git a/tests/features/behavior/pattern-relationships/extends-tag.feature b/tests/features/behavior/pattern-relationships/extends-tag.feature index 57bf44b8..01c083d9 100644 --- a/tests/features/behavior/pattern-relationships/extends-tag.feature +++ b/tests/features/behavior/pattern-relationships/extends-tag.feature @@ -15,6 +15,7 @@ Feature: Extends Tag Extraction and Processing Rule: Extends tag is defined in taxonomy registry **Invariant:** The extends tag must exist in the taxonomy registry with single-value format. + **Rationale:** Without a registry definition, the data-driven AST parser cannot discover or extract the extends tag from source files. **Verified by:** Extends tag exists in registry @unit @@ -63,6 +64,7 @@ Feature: Extends Tag Extraction and Processing Rule: Transform builds extendedBy reverse lookup **Invariant:** The transform must compute an extendedBy reverse index so base patterns know which patterns extend them. + **Rationale:** Without the reverse index, base patterns cannot discover their extensions, breaking generalization hierarchy navigation in generated docs. **Verified by:** Extended pattern knows its extensions @unit diff --git a/tests/features/behavior/pattern-relationships/implements-tag.feature b/tests/features/behavior/pattern-relationships/implements-tag.feature index 6f2a09e8..62c33ce8 100644 --- a/tests/features/behavior/pattern-relationships/implements-tag.feature +++ b/tests/features/behavior/pattern-relationships/implements-tag.feature @@ -15,6 +15,7 @@ Feature: Implements Tag Extraction and Processing Rule: Implements tag is defined in taxonomy registry **Invariant:** The implements tag must exist in the taxonomy registry with CSV format. + **Rationale:** Without a registry definition, the data-driven AST parser cannot discover or extract the implements tag from source files. **Verified by:** Implements tag exists in registry The tag registry defines `implements` with CSV format, enabling the @@ -35,6 +36,7 @@ Feature: Implements Tag Extraction and Processing Rule: Files can implement a single pattern **Invariant:** The AST parser must extract a single implements value and preserve it through the extraction pipeline. + **Rationale:** Lost implements values sever the link between implementation files and their roadmap specs, breaking traceability. **Verified by:** Parse implements with single pattern, Implements preserved through extraction pipeline @unit @@ -64,6 +66,7 @@ Feature: Implements Tag Extraction and Processing Rule: Files can implement multiple patterns using CSV format **Invariant:** The AST parser must split CSV implements values into individual pattern references with whitespace trimming. + **Rationale:** Unsplit or untrimmed CSV values produce invalid pattern references that fail relationship index lookups. **Verified by:** Parse implements with multiple patterns, CSV values are trimmed @unit @@ -92,6 +95,7 @@ Feature: Implements Tag Extraction and Processing Rule: Transform builds implementedBy reverse lookup **Invariant:** The transform must compute an implementedBy reverse index so spec patterns know which files implement them. + **Rationale:** Without the reverse index, roadmap specs cannot discover their implementation files, breaking traceability and DoD validation. **Verified by:** Single implementation creates reverse lookup, Multiple implementations aggregate @unit @@ -121,6 +125,7 @@ Feature: Implements Tag Extraction and Processing Rule: Schemas validate implements field correctly **Invariant:** The Zod schemas must accept implements and implementedBy fields with correct array-of-string types. + **Rationale:** Schema rejection of valid implements/implementedBy values causes runtime parse failures that silently drop traceability links. **Verified by:** DocDirective schema accepts implements, RelationshipEntry schema accepts implementedBy @unit diff --git a/tests/features/behavior/pattern-relationships/linter-validation.feature b/tests/features/behavior/pattern-relationships/linter-validation.feature index 07797402..d329fb1c 100644 --- a/tests/features/behavior/pattern-relationships/linter-validation.feature +++ b/tests/features/behavior/pattern-relationships/linter-validation.feature @@ -116,6 +116,7 @@ Feature: Linter Rules for Relationship Validation Rule: Parent references must be valid **Invariant:** A pattern's parent reference must point to an existing epic pattern in the registry. + **Rationale:** Dangling parent references break the epic-to-pattern hierarchy, causing patterns to appear orphaned in roadmap views and losing rollup visibility. **Verified by:** Invalid parent reference detected, Valid parent reference passes @validation diff --git a/tests/features/behavior/pattern-relationships/mermaid-rendering.feature b/tests/features/behavior/pattern-relationships/mermaid-rendering.feature index 36ca70f3..85921ee2 100644 --- a/tests/features/behavior/pattern-relationships/mermaid-rendering.feature +++ b/tests/features/behavior/pattern-relationships/mermaid-rendering.feature @@ -50,6 +50,7 @@ Feature: Mermaid Graph Rendering for Relationships Rule: Pattern names are sanitized for Mermaid node IDs **Invariant:** Pattern names must be transformed into valid Mermaid node IDs by replacing special characters (dots, hyphens, spaces) with underscores. + **Rationale:** Unsanitized names containing dots, hyphens, or spaces produce invalid Mermaid syntax that fails to render. **Verified by:** Special characters are replaced @unit @@ -71,6 +72,7 @@ Feature: Mermaid Graph Rendering for Relationships Rule: All relationship types appear in single graph **Invariant:** The generated Mermaid graph must combine all relationship types (uses, depends-on, implements, extends) into a single top-down graph. + **Rationale:** Splitting relationship types into separate graphs would fragment the dependency picture and hide cross-type interactions. **Verified by:** Complete dependency graph with all relationship types @unit diff --git a/tests/features/behavior/pattern-relationships/uses-tag.feature b/tests/features/behavior/pattern-relationships/uses-tag.feature index 358085eb..a5b01ce9 100644 --- a/tests/features/behavior/pattern-relationships/uses-tag.feature +++ b/tests/features/behavior/pattern-relationships/uses-tag.feature @@ -16,6 +16,7 @@ Feature: Uses Tag Extraction Rule: Uses tag is defined in taxonomy registry **Invariant:** The uses and used-by tags must be registered in the taxonomy with CSV format and dependency-related purpose descriptions. + **Rationale:** Without registry definitions, the data-driven AST parser cannot discover or extract these tags from source files. **Verified by:** Uses tag exists in registry, Used-by tag exists in registry @unit @@ -41,6 +42,7 @@ Feature: Uses Tag Extraction Rule: Uses tag is extracted from TypeScript files **Invariant:** The AST parser must extract single and comma-separated uses values from TypeScript JSDoc annotations. + **Rationale:** Missing or malformed uses extraction breaks runtime dependency tracking and produces incomplete relationship diagrams. **Verified by:** Single uses value extracted, Multiple uses values extracted as CSV @acceptance-criteria @happy-path @@ -80,6 +82,7 @@ Feature: Uses Tag Extraction Rule: Used-by tag is extracted from TypeScript files **Invariant:** The AST parser must extract single and comma-separated used-by values from TypeScript JSDoc annotations. + **Rationale:** Missing used-by extraction prevents reverse dependency lookups, leaving consumers unable to discover which patterns depend on them. **Verified by:** Single used-by value extracted, Multiple used-by values extracted as CSV @acceptance-criteria @happy-path @@ -119,6 +122,7 @@ Feature: Uses Tag Extraction Rule: Uses relationships are stored in relationship index **Invariant:** All declared uses and usedBy relationships must be stored in the relationship index as explicitly declared entries. + **Rationale:** Omitting relationships from the index causes dependency diagrams and impact-analysis queries to silently miss connections. **Verified by:** Uses relationships stored in relationship index, UsedBy relationships stored explicitly The relationship index stores uses and usedBy relationships directly @@ -149,6 +153,7 @@ Feature: Uses Tag Extraction Rule: Schemas validate uses field correctly **Invariant:** DocDirective and RelationshipEntry schemas must accept uses and usedBy fields as valid CSV string values. + **Rationale:** Schema rejection of valid uses/usedBy values causes runtime parse failures that silently drop relationship data. **Verified by:** DocDirective schema accepts uses, RelationshipEntry schema accepts usedBy @unit diff --git a/tests/features/behavior/pattern-tag-extraction.feature b/tests/features/behavior/pattern-tag-extraction.feature index 5eff03e7..de904a68 100644 --- a/tests/features/behavior/pattern-tag-extraction.feature +++ b/tests/features/behavior/pattern-tag-extraction.feature @@ -25,6 +25,7 @@ Feature: Pattern Tag Extraction from Gherkin Feature Tags Rule: Single value tags produce scalar metadata fields **Invariant:** Each single-value tag (pattern, phase, status, brief) maps to exactly one metadata field with the correct type. + **Rationale:** Incorrect type coercion (e.g., phase as string instead of number) causes downstream pipeline failures in filtering and sorting. **Verified by:** Extract pattern name tag, Extract phase number tag, Extract status roadmap tag, Extract status deferred tag, Extract status completed tag, Extract status active tag, Extract brief path tag @happy-path @single-tag @@ -72,6 +73,7 @@ Feature: Pattern Tag Extraction from Gherkin Feature Tags Rule: Array value tags accumulate into list metadata fields **Invariant:** Tags for depends-on and enables split comma-separated values and accumulate across multiple tag occurrences. + **Rationale:** Missing a dependency value silently breaks the dependency graph, causing incorrect build ordering and orphaned pattern references. **Verified by:** Extract single dependency, Extract comma-separated dependencies, Extract comma-separated enables @happy-path @dependencies @@ -98,6 +100,7 @@ Feature: Pattern Tag Extraction from Gherkin Feature Tags Rule: Category tags are colon-free tags filtered against known non-categories **Invariant:** Tags without colons become categories, except known non-category tags (acceptance-criteria, happy-path) and the libar-docs opt-in marker. + **Rationale:** Including test-control tags (acceptance-criteria, happy-path) as categories pollutes the pattern taxonomy with non-semantic values. **Verified by:** Extract category tags (no colon), libar-docs opt-in marker is NOT a category @happy-path @categories @@ -120,6 +123,7 @@ Feature: Pattern Tag Extraction from Gherkin Feature Tags Rule: Complex tag lists produce fully populated metadata **Invariant:** All tag types (scalar, array, category) are correctly extracted from a single mixed tag list. + **Rationale:** Real feature files combine many tag types; extraction must handle all types simultaneously without interference between parsers. **Verified by:** Extract all metadata from complex tag list @happy-path @complex @@ -139,6 +143,7 @@ Feature: Pattern Tag Extraction from Gherkin Feature Tags Rule: Edge cases produce safe defaults **Invariant:** Empty or invalid inputs produce empty metadata or omit invalid fields rather than throwing errors. + **Rationale:** Throwing on malformed tags would abort extraction for the entire file, losing valid metadata from well-formed tags. **Verified by:** Empty tag list returns empty metadata, Invalid phase number is ignored @edge-case @empty @@ -156,6 +161,7 @@ Feature: Pattern Tag Extraction from Gherkin Feature Tags Rule: Convention tags support CSV values with whitespace trimming **Invariant:** Convention tags split comma-separated values and trim whitespace from each value. + **Rationale:** Untrimmed whitespace creates distinct values for the same convention, causing false negatives in convention-based filtering and validation. **Verified by:** Extract single convention tag, Extract CSV convention tags, Convention tag trims whitespace in CSV values @happy-path @convention @@ -182,6 +188,7 @@ Feature: Pattern Tag Extraction from Gherkin Feature Tags Rule: Registry-driven extraction handles enums, transforms, and value constraints **Invariant:** Tags defined in the registry use data-driven extraction with enum validation, CSV accumulation, value transforms, and constraint checking. + **Rationale:** Hard-coded if/else branches for each tag type cannot scale; registry-driven extraction ensures new tags are supported by configuration, not code changes. **Verified by:** Registry-driven enum tag without prior if/else branch, Registry-driven enum rejects invalid value, Registry-driven CSV tag accumulates values, Transform applies hyphen-to-space on business value, Transform applies ADR number padding, Transform strips quotes from title tag, Repeatable value tag accumulates multiple occurrences, CSV with values constraint rejects invalid values @happy-path @registry-driven diff --git a/tests/features/behavior/patterns-codec.feature b/tests/features/behavior/patterns-codec.feature index ae6c8676..d663125f 100644 --- a/tests/features/behavior/patterns-codec.feature +++ b/tests/features/behavior/patterns-codec.feature @@ -96,6 +96,7 @@ Feature: Patterns Document Codec Rule: Category sections group patterns by domain **Invariant:** Each category in the dataset must produce an H3 section listing its patterns, and the filterCategories option must restrict output to only the specified categories. + **Rationale:** Without category grouping, consumers must scan the entire flat pattern list to find domain-relevant patterns; filtering avoids noise in focused documentation. **Verified by:** Category sections with pattern lists, Filter to specific categories @happy-path @@ -126,6 +127,7 @@ Feature: Patterns Document Codec Rule: Dependency graph visualizes pattern relationships **Invariant:** A Mermaid dependency graph must be included when pattern relationships exist and the includeDependencyGraph option is not disabled; it must be omitted when no relationships exist or when explicitly disabled. + **Rationale:** Dependency relationships are invisible in flat pattern lists; the graph reveals implementation ordering and coupling that affects planning decisions. **Verified by:** Dependency graph included when relationships exist, No dependency graph when no relationships, Dependency graph disabled by option Scenario: Dependency graph included when relationships exist diff --git a/tests/features/behavior/pr-changes-generation.feature b/tests/features/behavior/pr-changes-generation.feature index 66509e40..7d97d167 100644 --- a/tests/features/behavior/pr-changes-generation.feature +++ b/tests/features/behavior/pr-changes-generation.feature @@ -24,6 +24,7 @@ Feature: PR Changes Generation Rule: Release version filtering controls which phases appear in output **Invariant:** Only phases with deliverables matching the releaseFilter are included; roadmap phases are always excluded. + **Rationale:** Including unrelated releases or unstarted roadmap items in a PR description misleads reviewers about the scope of actual changes. **Verified by:** Filter phases by specific release version, Show all active and completed phases when no releaseFilter, Active phases with matching deliverables are included, Roadmap phases are excluded even with matching deliverables @happy-path @release-filter @@ -77,6 +78,7 @@ Feature: PR Changes Generation Rule: Patterns are grouped by phase number in the output **Invariant:** Each phase number produces a separate heading section in the generated output. + **Rationale:** Without phase grouping, reviewers cannot distinguish which changes belong to which delivery phase, making incremental review impossible. **Verified by:** Patterns grouped by phase number @happy-path @phase-grouping @@ -97,6 +99,7 @@ Feature: PR Changes Generation Rule: Summary statistics provide a high-level overview of the PR **Invariant:** Summary section always shows pattern counts and release tag when a releaseFilter is active. + **Rationale:** Without a summary, reviewers must read the entire document to understand the PR's scope; the release tag anchors the summary to a specific version. **Verified by:** Summary shows pattern counts in table format, Summary shows release tag when filtering @happy-path @summary @@ -123,6 +126,7 @@ Feature: PR Changes Generation Rule: Deliverables are displayed inline with their parent patterns **Invariant:** When includeDeliverables is enabled, each pattern lists its deliverables with name, status, and release tag. + **Rationale:** Hiding deliverables forces reviewers to cross-reference feature files to verify completion; inline display makes review self-contained. **Verified by:** Deliverables shown inline with patterns, Deliverables show release tags @happy-path @deliverables @@ -150,6 +154,7 @@ Feature: PR Changes Generation Rule: Review checklist includes standard code quality verification items **Invariant:** Review checklist always includes code conventions, tests, documentation, and completed pattern verification items. + **Rationale:** Omitting the checklist means quality gates depend on reviewer memory; a consistent checklist ensures no standard verification step is skipped. **Verified by:** Review checklist includes standard code quality items, Review checklist includes completed pattern verification @happy-path @review-checklist @@ -175,6 +180,7 @@ Feature: PR Changes Generation Rule: Dependencies section shows inter-pattern relationships **Invariant:** Dependencies section surfaces both what patterns enable and what they depend on. + **Rationale:** Hidden dependencies cause merge-order mistakes and broken builds; surfacing them in the PR lets reviewers verify prerequisite work is complete. **Verified by:** Dependencies shows what patterns enable, Dependencies shows what patterns depend on @happy-path @enables @@ -202,6 +208,7 @@ Feature: PR Changes Generation Rule: Business value can be included or excluded from pattern metadata **Invariant:** Business value display is controlled by the includeBusinessValue option. + **Rationale:** Not all consumers need business value context; making it opt-in keeps the default output concise for technical reviewers. **Verified by:** Pattern metadata includes business value when enabled, Business value can be excluded @happy-path @business-value @@ -225,6 +232,7 @@ Feature: PR Changes Generation Rule: Output can be sorted by phase number or priority **Invariant:** Sorting is deterministic and respects the configured sortBy option. + **Rationale:** Non-deterministic ordering produces diff noise between regenerations, making it impossible to tell if content actually changed. **Verified by:** Phases sorted by phase number, Phases sorted by priority @config @sort-by-phase @@ -251,6 +259,7 @@ Feature: PR Changes Generation Rule: Edge cases produce graceful output **Invariant:** The generator handles missing phases, missing deliverables, and missing phase numbers without errors. + **Rationale:** Crashing on incomplete data prevents PR generation entirely; graceful degradation ensures output is always available even with partial inputs. **Verified by:** No matching phases produces no changes message, Patterns without deliverables still display, Patterns without phase show in phase 0 group @edge-case @no-phases @@ -282,6 +291,7 @@ Feature: PR Changes Generation Rule: Deliverable-level filtering shows only matching deliverables within a phase **Invariant:** When a phase contains deliverables with different release tags, only those matching the releaseFilter are shown. + **Rationale:** Showing all deliverables regardless of release tag pollutes the PR with unrelated work, obscuring what actually shipped in the target release. **Verified by:** Mixed releases within single phase shows only matching deliverables @happy-path @mixed-release @deliverable-level diff --git a/tests/features/behavior/remaining-work-enhancement.feature b/tests/features/behavior/remaining-work-enhancement.feature index e7c3bdfd..86eed2fa 100644 --- a/tests/features/behavior/remaining-work-enhancement.feature +++ b/tests/features/behavior/remaining-work-enhancement.feature @@ -24,6 +24,7 @@ Feature: Remaining Work Enhancement Rule: Priority-based sorting surfaces critical work first **Invariant:** Phases with higher priority always appear before lower-priority phases when sorting by priority. + **Rationale:** Without priority sorting, critical work gets buried under low-priority items, delaying urgent deliverables. **Verified by:** Next Actionable sorted by priority, Undefined priority sorts last, Priority icons displayed in table @acceptance-criteria @@ -60,6 +61,7 @@ Feature: Remaining Work Enhancement Rule: Effort parsing converts duration strings to comparable hours **Invariant:** Effort strings must be parsed to a common unit (hours) for accurate sorting across different time scales. + **Rationale:** Comparing raw strings like "2h" and "3d" lexicographically produces incorrect ordering; normalization to hours ensures consistent comparison. **Verified by:** Phases sorted by effort ascending, Effort parsing handles hours, Effort parsing handles days, Effort parsing handles weeks, Effort parsing handles months Scenario: Phases sorted by effort ascending @@ -94,6 +96,7 @@ Feature: Remaining Work Enhancement Rule: Quarter grouping organizes planned work into time-based buckets **Invariant:** Phases with a quarter tag are grouped under their quarter heading; phases without a quarter appear under Unscheduled. + **Rationale:** Flat lists obscure time-based planning; grouping by quarter lets planners see what is committed per period and what remains unscheduled. **Verified by:** Planned phases grouped by quarter, Quarters sorted chronologically @acceptance-criteria @@ -122,6 +125,7 @@ Feature: Remaining Work Enhancement Rule: Priority grouping organizes phases by urgency level **Invariant:** Phases are grouped under their priority heading; phases without priority appear under Unprioritized. + **Rationale:** Mixing priority levels in a flat list forces readers to visually scan for urgency; grouping by priority makes triage immediate. **Verified by:** Planned phases grouped by priority Scenario: Planned phases grouped by priority @@ -138,6 +142,7 @@ Feature: Remaining Work Enhancement Rule: Progressive disclosure prevents information overload in large backlogs **Invariant:** When the backlog exceeds maxNextActionable, only the top N phases are shown with a link or count for the remainder. + **Rationale:** Displaying hundreds of phases in the summary overwhelms planners; progressive disclosure keeps the summary scannable while preserving access to the full backlog. **Verified by:** Large backlog uses progressive disclosure, Moderate backlog shows count without link @acceptance-criteria @@ -163,6 +168,7 @@ Feature: Remaining Work Enhancement Rule: Edge cases are handled gracefully **Invariant:** Empty or fully-blocked backlogs produce meaningful output instead of errors or blank sections. + **Rationale:** Blank or errored output when the backlog is empty confuses users into thinking the generator is broken rather than reflecting a genuinely empty state. **Verified by:** Empty backlog handling, All phases blocked Scenario: Empty backlog handling @@ -182,6 +188,7 @@ Feature: Remaining Work Enhancement Rule: Default behavior preserves backward compatibility **Invariant:** Without explicit sortBy or groupPlannedBy options, phases are sorted by phase number in a flat list. + **Rationale:** Changing default behavior would break existing consumers that rely on phase-number ordering without specifying options. **Verified by:** Default sorting is by phase number, Default grouping is none (flat list) Scenario: Default sorting is by phase number diff --git a/tests/features/behavior/remaining-work-totals.feature b/tests/features/behavior/remaining-work-totals.feature index 3ebb0c86..bfc1030e 100644 --- a/tests/features/behavior/remaining-work-totals.feature +++ b/tests/features/behavior/remaining-work-totals.feature @@ -118,6 +118,7 @@ Feature: Remaining Work Summary Accuracy Rule: All phases with incomplete patterns are shown **Invariant:** The phase table must include every phase that contains at least one incomplete pattern, and phases with only completed patterns must be excluded. + **Rationale:** Showing fully completed phases inflates the remaining work view, while omitting phases with incomplete patterns hides outstanding work. **Verified by:** Multiple phases shown in order, Completed phases not shown in remaining work Scenario: Multiple phases shown in order diff --git a/tests/features/behavior/render-blocks.feature b/tests/features/behavior/render-blocks.feature index 24d3b885..ecc21440 100644 --- a/tests/features/behavior/render-blocks.feature +++ b/tests/features/behavior/render-blocks.feature @@ -15,6 +15,8 @@ Feature: Universal Markdown Renderer - Block Types Rule: Document metadata renders as frontmatter before sections **Invariant:** Title always renders as H1, purpose and detail level render as bold key-value pairs separated by horizontal rule. + **Rationale:** Consistent frontmatter structure allows downstream tooling and readers to reliably locate the document title and metadata without parsing the full body. + **Verified by:** Render minimal document with title only, Render document with purpose, Render document with detail level, Render document with purpose and detail level @happy-path @@ -48,6 +50,8 @@ Feature: Universal Markdown Renderer - Block Types Rule: Headings render at correct markdown levels with clamping **Invariant:** Heading levels are clamped to the valid range 1-6 regardless of input value. + **Rationale:** Markdown only supports heading levels 1-6; unclamped values would produce invalid syntax that renders as plain text in all markdown processors. + **Verified by:** Render headings at different levels, Clamp heading level 0 to 1, Clamp heading level 7 to 6 Scenario Outline: Render headings at different levels @@ -79,6 +83,8 @@ Feature: Universal Markdown Renderer - Block Types Rule: Paragraphs and separators render as plain text and horizontal rules **Invariant:** Paragraph content passes through unmodified, including special markdown characters. Separators render as horizontal rules. + **Rationale:** The renderer is a dumb printer; altering paragraph content would break codec-controlled formatting and violate the separation between codec logic and rendering. + **Verified by:** Render paragraph, Render paragraph with special characters, Render separator Scenario: Render paragraph @@ -99,6 +105,8 @@ Feature: Universal Markdown Renderer - Block Types Rule: Tables render with headers, alignment, and cell escaping **Invariant:** Tables must escape pipe characters, convert newlines to line breaks, and pad short rows to match column count. + **Rationale:** Unescaped pipes corrupt table column boundaries, raw newlines break row parsing, and short rows cause column misalignment in every markdown renderer. + **Verified by:** Render basic table, Render table with alignment, Render empty table (no columns), Render table with pipe character in cell, Render table with newline in cell, Render table with short row (fewer cells than columns) @happy-path @@ -148,6 +156,8 @@ Feature: Universal Markdown Renderer - Block Types Rule: Lists render in unordered, ordered, checkbox, and nested formats **Invariant:** List type determines prefix: dash for unordered, numbered for ordered, checkbox syntax for checked items. Nesting adds two-space indentation per level. + **Rationale:** Incorrect prefixes or indentation levels cause markdown parsers to break list continuity, rendering nested items as separate top-level lists or plain text. + **Verified by:** Render unordered list, Render ordered list, Render checkbox list with checked items, Render nested list @happy-path diff --git a/tests/features/behavior/render-output.feature b/tests/features/behavior/render-output.feature index 2550eaba..dd7fdeb7 100644 --- a/tests/features/behavior/render-output.feature +++ b/tests/features/behavior/render-output.feature @@ -14,6 +14,8 @@ Feature: Universal Markdown Renderer - Output Formats Rule: Code blocks and mermaid diagrams render with fenced syntax **Invariant:** Code blocks use triple backtick fencing with optional language hint. Mermaid blocks use mermaid as the language hint. + **Rationale:** Inconsistent fencing breaks syntax highlighting in GitHub/IDE markdown previews and prevents Mermaid renderers from detecting diagram blocks. + **Verified by:** Render code block with language, Render code block without language, Render mermaid diagram Scenario: Render code block with language @@ -55,6 +57,8 @@ Feature: Universal Markdown Renderer - Output Formats Rule: Collapsible blocks render as HTML details elements **Invariant:** Summary text is HTML-escaped to prevent injection. Collapsible content renders between details tags. + **Rationale:** Unescaped HTML in summary text enables XSS when generated markdown is rendered in browsers; malformed details tags break progressive disclosure in documentation. + **Verified by:** Render collapsible block, Render collapsible with HTML entities in summary, Render nested collapsible content @happy-path @@ -83,6 +87,8 @@ Feature: Universal Markdown Renderer - Output Formats Rule: Link-out blocks render as markdown links with URL encoding **Invariant:** Link paths with spaces are percent-encoded for valid URLs. + **Rationale:** Unencoded spaces produce broken links in markdown renderers, making cross-document navigation fail silently for files with spaces in their paths. + **Verified by:** Render link-out block, Render link-out with spaces in path Scenario: Render link-out block @@ -98,6 +104,8 @@ Feature: Universal Markdown Renderer - Output Formats Rule: Multi-file documents produce correct output file collections **Invariant:** Output file count equals 1 (main) plus additional file count. The first output file always uses the provided base path. + **Rationale:** A mismatch between expected and actual file count causes the orchestrator to write orphaned files or miss outputs, corrupting the generated documentation directory. + **Verified by:** Render document with additional files, Render document without additional files @happy-path @@ -115,6 +123,8 @@ Feature: Universal Markdown Renderer - Output Formats Rule: Complex documents render all block types in sequence **Invariant:** Multiple block types in a single document render in order without interference. + **Rationale:** Block ordering reflects the codec's semantic structure; out-of-order or swallowed blocks would produce misleading documentation that diverges from the source of truth. + **Verified by:** Render complex document with multiple block types Scenario: Render complex document with multiple block types @@ -140,6 +150,8 @@ Feature: Universal Markdown Renderer - Output Formats Rule: Claude context renderer produces compact AI-optimized output **Invariant:** Claude context replaces markdown syntax with section markers, omits visual-only blocks (mermaid, separators), flattens collapsible content, and produces shorter output than markdown. + **Rationale:** LLM context windows are token-limited; visual-only blocks waste tokens without adding semantic value, and verbose markdown syntax inflates context size unnecessarily. + **Verified by:** Claude context renders title and headings as section markers, Claude context renders sub-headings with different markers, Claude context omits mermaid blocks, Claude context flattens collapsible blocks, Claude context renders link-out as plain text, Claude context omits separator tokens, Claude context produces fewer characters than markdown @happy-path @@ -214,3 +226,73 @@ Feature: Universal Markdown Renderer - Output Formats When rendering to markdown And rendering to claude context Then the claude context output is shorter than the markdown output + + Rule: Claude MD module renderer produces modular-claude-md compatible output + + **Invariant:** Title renders as H3 (offset +2), section headings are offset by +2 clamped at H6, frontmatter is omitted, mermaid blocks are omitted, link-out blocks are omitted, and collapsible blocks are flattened to headings. + **Rationale:** The modular-claude-md system manages CLAUDE.md as composable H3-rooted modules. Generating incompatible formats (like section markers) produces orphaned files that are never consumed. + + **Verified by:** Module title renders as H3, Module section headings offset by plus 2, Module frontmatter is omitted, Module mermaid blocks are omitted, Module link-out blocks are omitted, Module collapsible blocks flatten to headings, Module heading level clamped at H6 + + @happy-path + Scenario: Module title renders as H3 + Given a document with title "Annotation Overview" + And the document has sections: + | type | content | + | paragraph | Area overview | + When rendering to claude md module + Then the claude md module output contains "### Annotation Overview" + And the claude md module output does not contain "# Annotation Overview" + + Scenario: Module section headings offset by plus 2 + Given a document with title "Doc" + And the document has sections: + | type | content | + | heading | Section One | + | paragraph | Body text | + When rendering to claude md module + Then the claude md module output contains "#### Section One" + + Scenario: Module frontmatter is omitted + Given a document with: + | field | value | + | title | My Module | + | purpose | Test frontmatter | + When rendering to claude md module + Then the claude md module output does not contain "Purpose:" + And the claude md module output does not contain "Detail Level:" + + Scenario: Module mermaid blocks are omitted + Given a document with title "Diagram Doc" + And the document has a mermaid block: + """ + graph TD + A --> B + """ + When rendering to claude md module + Then the claude md module output does not contain any of: + | text | + | mermaid | + | graph TD | + + Scenario: Module link-out blocks are omitted + Given a document with title "Link Doc" + And the document has a link-out "See details" to "patterns/core.md" + When rendering to claude md module + Then the claude md module output does not contain "See details" + And the claude md module output does not contain "patterns/core.md" + + Scenario: Module collapsible blocks flatten to headings + Given a document with title "Collapsible Doc" + And a collapsible block with summary "Click to expand" + And the collapsible contains a paragraph "Hidden content here" + When rendering to claude md module + Then the claude md module output contains "#### Click to expand" + And the claude md module output contains "Hidden content here" + And the claude md module output does not contain "
" + + Scenario: Module heading level clamped at H6 + Given a document with title "Doc" + And the document has a heading at level 5 with text "Deep Heading" + When rendering to claude md module + Then the claude md module output contains "###### Deep Heading" diff --git a/tests/features/behavior/rich-content-helpers.feature b/tests/features/behavior/rich-content-helpers.feature index a08ab3fb..8fd46845 100644 --- a/tests/features/behavior/rich-content-helpers.feature +++ b/tests/features/behavior/rich-content-helpers.feature @@ -19,6 +19,7 @@ Feature: Rich Content Rendering Helpers Rule: DocString parsing handles edge cases **Invariant:** DocString parsing must gracefully handle empty input, missing language hints, unclosed delimiters, and non-LF line endings without throwing errors. + **Rationale:** Codecs receive uncontrolled user content from feature file descriptions; unhandled edge cases would crash document generation for the entire pipeline. **Verified by:** Empty description returns empty array, Description with no DocStrings returns single paragraph, Single DocString parses correctly, DocString without language hint uses text, Unclosed DocString returns plain paragraph fallback, Windows CRLF line endings are normalized Scenario: Empty description returns empty array @@ -60,6 +61,7 @@ Feature: Rich Content Rendering Helpers Rule: DataTable rendering produces valid markdown **Invariant:** DataTable rendering must produce a well-formed table block for any number of rows, substituting empty strings for missing cell values. + **Rationale:** Malformed tables break markdown rendering and downstream tooling; missing cells would produce undefined values that corrupt table alignment. **Verified by:** Single row DataTable renders correctly, Multi-row DataTable renders correctly, Missing cell values become empty strings Scenario: Single row DataTable renders correctly @@ -86,6 +88,7 @@ Feature: Rich Content Rendering Helpers Rule: Scenario content rendering respects options **Invariant:** Scenario rendering must honor the includeSteps option, producing step lists only when enabled, and must include embedded DataTables when present. + **Rationale:** Ignoring the includeSteps option would bloat summary views with unwanted detail, and dropping embedded DataTables would lose structured test data. **Verified by:** Render scenario with steps, Skip steps when includeSteps is false, Render scenario with DataTable in step Scenario: Render scenario with steps @@ -112,6 +115,7 @@ Feature: Rich Content Rendering Helpers Rule: Business rule rendering handles descriptions **Invariant:** Business rule rendering must always include the rule name as a bold paragraph, and must parse descriptions for embedded DocStrings when present. + **Rationale:** Omitting the rule name makes rendered output unnavigable, and skipping DocString parsing would output raw delimiter syntax instead of formatted code blocks. **Verified by:** Rule with simple description, Rule with no description, Rule with embedded DocString in description Scenario: Rule with simple description @@ -139,6 +143,7 @@ Feature: Rich Content Rendering Helpers Rule: DocString content is dedented when parsed **Invariant:** DocString code blocks must be dedented to remove common leading whitespace while preserving internal relative indentation, empty lines, and trimming trailing whitespace from each line. + **Rationale:** Without dedentation, code blocks inherit the Gherkin indentation level, rendering as deeply indented and unreadable in generated markdown. **Verified by:** Code block preserves internal relative indentation, Empty lines in code block are preserved, Trailing whitespace is trimmed from each line, Code with mixed indentation is preserved Scenario: Code block preserves internal relative indentation diff --git a/tests/features/behavior/scanner-core.feature b/tests/features/behavior/scanner-core.feature index 2a69d672..7561b55e 100644 --- a/tests/features/behavior/scanner-core.feature +++ b/tests/features/behavior/scanner-core.feature @@ -156,6 +156,7 @@ Feature: Scanner Core Integration Rule: Pattern matching and exclusion filtering **Invariant:** Glob patterns control file discovery and exclusion patterns remove matched files before scanning. + **Rationale:** Without exclusion filtering, internal directories and generated files would pollute the pattern registry with false positives and slow down scanning. **Verified by:** Return empty results when no patterns match, Respect exclusion patterns, Handle multiple files with multiple directives each diff --git a/tests/features/behavior/session-file-lifecycle.feature b/tests/features/behavior/session-file-lifecycle.feature index 82a2828a..2ce21835 100644 --- a/tests/features/behavior/session-file-lifecycle.feature +++ b/tests/features/behavior/session-file-lifecycle.feature @@ -29,6 +29,7 @@ Feature: Session File Lifecycle Management Rule: Orphaned session files are removed during generation **Invariant:** Only session files for active phases are preserved; all other phase files must be deleted during cleanup and replaced with fresh content. + **Rationale:** Stale session files for completed or deferred phases mislead LLMs that read the sessions directory for context, causing incorrect planning decisions. **Verified by:** Orphaned session files are deleted during generation, Active phase session files are preserved and regenerated @@ -84,6 +85,7 @@ Feature: Session File Lifecycle Management Rule: Deleted files are tracked in cleanup results **Invariant:** The cleanup result must include the relative paths of all deleted session files for transparency and debugging. + **Rationale:** Without deletion tracking, operators cannot audit what the generator removed, making it impossible to diagnose missing file issues after a run. **Verified by:** Deleted files are tracked in generator output diff --git a/tests/features/behavior/session-handoffs.feature b/tests/features/behavior/session-handoffs.feature index 1a5dce6f..c452fbfa 100644 --- a/tests/features/behavior/session-handoffs.feature +++ b/tests/features/behavior/session-handoffs.feature @@ -26,6 +26,7 @@ Feature: Session Handoffs and Multi-Developer Coordination Rule: Handoff context generation captures session state **Invariant:** Active phases with handoff context enabled must include session handoff sections with template and checklist links. + **Rationale:** Without structured handoff sections, LLM sessions lose context between runs and developers waste time re-discovering phase state. **Verified by:** SESSION-CONTEXT.md includes handoff section for active phases, Discovery tags appear in handoff context section, Paused phase shows status indicator @@ -59,6 +60,7 @@ Feature: Session Handoffs and Multi-Developer Coordination Rule: Handoff templates and checklists contain required sections **Invariant:** Session handoff template and retrospective checklist must exist and contain all required sections for structured knowledge transfer. + **Rationale:** Missing template sections cause incomplete handoffs, leading to lost context and repeated work when a new session resumes. **Verified by:** Handoff template exists and contains required sections, Retrospective checklist exists and contains required sections @@ -87,6 +89,7 @@ Feature: Session Handoffs and Multi-Developer Coordination Rule: PROCESS_SETUP.md documents handoff and coordination protocols **Invariant:** PROCESS_SETUP.md must document both session handoff protocol and multi-developer coordination patterns. + **Rationale:** Without a single authoritative coordination reference, parallel developers follow ad-hoc processes that cause merge conflicts and duplicated effort. **Verified by:** PROCESS_SETUP.md documents handoff protocol, PROCESS_SETUP.md documents multi-developer coordination @@ -109,6 +112,7 @@ Feature: Session Handoffs and Multi-Developer Coordination Rule: Edge cases and acceptance criteria ensure robustness **Invariant:** Handoff context must degrade gracefully when no discoveries exist and must be disableable. Mid-phase handoffs, multi-developer coordination, and retrospective capture must all preserve context. + **Rationale:** If handoff generation crashes on empty state or cannot be disabled, it blocks unrelated generation workflows and erodes trust in the automation. **Verified by:** Fresh phase shows no previous context message, Handoff context can be disabled, Mid-phase handoff preserves context, Multiple developers can coordinate, Session retrospective captures learnings diff --git a/tests/features/behavior/transform-dataset.feature b/tests/features/behavior/transform-dataset.feature index 7d8b8c01..6ae4c62c 100644 --- a/tests/features/behavior/transform-dataset.feature +++ b/tests/features/behavior/transform-dataset.feature @@ -25,6 +25,7 @@ Feature: Transform Dataset Pipeline Rule: Empty dataset produces valid zero-state views **Invariant:** An empty input produces a MasterDataset with all counts at zero and no groupings. + **Rationale:** Generators must handle the zero-state gracefully; a missing or malformed empty dataset would cause null-reference errors across all rendering codecs. **Verified by:** Transform empty dataset @@ -107,6 +108,7 @@ Feature: Transform Dataset Pipeline Rule: Quarter and category grouping organizes by timeline and domain **Invariant:** Patterns are grouped by quarter and category, with only patterns bearing the relevant metadata included in each view. + **Rationale:** Timeline and domain views must exclude patterns without the relevant metadata to prevent misleading counts and empty groupings in generated documentation. **Verified by:** Group patterns by quarter, Patterns without quarter are not in byQuarter, Group patterns by category @@ -148,6 +150,7 @@ Feature: Transform Dataset Pipeline Rule: Source grouping separates TypeScript and Gherkin origins **Invariant:** Patterns are partitioned by source file type, and patterns with phase metadata appear in the roadmap view. + **Rationale:** Codecs that render TypeScript-specific or Gherkin-specific views depend on pre-partitioned sources; mixing sources would produce incorrect per-origin statistics and broken cross-references. **Verified by:** Group patterns by source file type, Patterns with phase are also in roadmap view @@ -224,6 +227,7 @@ Feature: Transform Dataset Pipeline Rule: Completion tracking computes project progress **Invariant:** Completion percentage is rounded to the nearest integer, and fully-completed requires all patterns in completed status with a non-zero total. + **Rationale:** Inconsistent rounding or a false-positive fully-completed signal on an empty dataset would misrepresent project health in dashboards and generated progress reports. **Verified by:** Calculate completion percentage, Check if fully completed @@ -260,6 +264,7 @@ Feature: Transform Dataset Pipeline Rule: Workflow integration conditionally includes delivery process data **Invariant:** The workflow is included in the MasterDataset only when provided, and phase names are resolved from the workflow configuration. + **Rationale:** Projects without a delivery workflow must still produce valid datasets; unconditionally requiring workflow data would break standalone documentation generation. **Verified by:** Include workflow in result when provided, Result omits workflow when not provided diff --git a/tests/features/cli/process-api-core.feature b/tests/features/cli/process-api-core.feature index 05e32bd8..e9ab484c 100644 --- a/tests/features/cli/process-api-core.feature +++ b/tests/features/cli/process-api-core.feature @@ -17,6 +17,9 @@ Feature: Process API CLI - Core Infrastructure Rule: CLI displays help and version information + **Invariant:** The CLI must always provide discoverable usage and version information via standard flags. + **Rationale:** Without accessible help and version output, users cannot self-serve CLI usage or report issues with a specific version. + @happy-path Scenario: Display help with --help flag When running "process-api --help" @@ -40,6 +43,9 @@ Feature: Process API CLI - Core Infrastructure Rule: CLI requires input flag for subcommands + **Invariant:** Every data-querying subcommand must receive an explicit `--input` glob specifying the source files to scan. + **Rationale:** Without an input source, the pipeline has no files to scan and would produce empty or misleading results instead of a clear error. + @validation Scenario: Fail without --input flag when running status When running "process-api status" @@ -58,6 +64,9 @@ Feature: Process API CLI - Core Infrastructure Rule: CLI status subcommand shows delivery state + **Invariant:** The status subcommand must return structured JSON containing delivery progress derived from the MasterDataset. + **Rationale:** Consumers depend on machine-readable status output for scripting and CI integration; unstructured output breaks downstream automation. + @happy-path Scenario: Status shows counts and completion percentage Given TypeScript files with pattern annotations @@ -71,6 +80,9 @@ Feature: Process API CLI - Core Infrastructure Rule: CLI query subcommand executes API methods + **Invariant:** The query subcommand must dispatch to any public Data API method by name and pass positional arguments through. + **Rationale:** The CLI is the primary interface for ad-hoc queries; failing to resolve a valid method name or its arguments silently drops the user's request. + @happy-path Scenario: Query getStatusCounts returns count object Given TypeScript files with pattern annotations @@ -98,6 +110,9 @@ Feature: Process API CLI - Core Infrastructure Rule: CLI pattern subcommand shows pattern detail + **Invariant:** The pattern subcommand must return the full JSON detail for an exact pattern name match, or a clear error if not found. + **Rationale:** Pattern lookup is the primary debugging tool for annotation issues; ambiguous or silent failures waste investigation time. + @happy-path Scenario: Pattern lookup returns full detail Given TypeScript files with pattern annotations @@ -119,6 +134,9 @@ Feature: Process API CLI - Core Infrastructure Rule: CLI arch subcommand queries architecture + **Invariant:** The arch subcommand must expose role, bounded context, and layer queries over the MasterDataset's architecture metadata. + **Rationale:** Architecture queries replace manual exploration of annotated sources; missing or incorrect results lead to wrong structural assumptions during design sessions. + @happy-path Scenario: Arch roles lists roles with counts Given TypeScript files with architecture annotations @@ -146,6 +164,9 @@ Feature: Process API CLI - Core Infrastructure Rule: CLI shows errors for missing subcommand arguments + **Invariant:** Subcommands that require arguments must reject invocations with missing arguments and display usage guidance. + **Rationale:** Silent acceptance of incomplete input would produce confusing pipeline errors instead of actionable feedback at the CLI boundary. + @validation Scenario: Query without method name shows error Given TypeScript files with pattern annotations @@ -173,6 +194,9 @@ Feature: Process API CLI - Core Infrastructure Rule: CLI handles argument edge cases + **Invariant:** The CLI must gracefully handle non-standard argument forms including numeric coercion and the `--` pnpm separator. + **Rationale:** Real-world invocations via pnpm pass `--` separators and numeric strings; mishandling these causes silent data loss or crashes in automated workflows. + @edge-case Scenario: Integer arguments are coerced for phase queries Given TypeScript files with pattern annotations diff --git a/tests/features/cli/process-api-subcommands.feature b/tests/features/cli/process-api-subcommands.feature index 11fd84a7..cab28ae1 100644 --- a/tests/features/cli/process-api-subcommands.feature +++ b/tests/features/cli/process-api-subcommands.feature @@ -17,6 +17,9 @@ Feature: Process API CLI - Discovery Subcommands Rule: CLI list subcommand filters patterns + **Invariant:** The list subcommand must return a valid JSON result for valid filters and a non-zero exit code with a descriptive error for invalid filters. + **Rationale:** Consumers parse list output programmatically; malformed JSON or silent failures cause downstream tooling to break without diagnosis. + @happy-path Scenario: List all patterns returns JSON array Given TypeScript files with pattern annotations @@ -37,6 +40,9 @@ Feature: Process API CLI - Discovery Subcommands Rule: CLI search subcommand finds patterns by fuzzy match + **Invariant:** The search subcommand must require a query argument and return only patterns whose names match the query. + **Rationale:** Missing query validation would produce unfiltered result sets, defeating the purpose of search and wasting context budget in AI sessions. + @happy-path Scenario: Search returns matching patterns Given TypeScript files with pattern annotations @@ -58,6 +64,9 @@ Feature: Process API CLI - Discovery Subcommands Rule: CLI context assembly subcommands return text output + **Invariant:** Context assembly subcommands (context, overview, dep-tree) must produce non-empty human-readable text containing the requested pattern or summary, and require a pattern argument where applicable. + **Rationale:** These subcommands replace manual file reads in AI sessions; empty or off-target output forces expensive explore-agent fallbacks that consume 5-10x more context. + @happy-path Scenario: Context returns curated text bundle Given TypeScript files with pattern annotations @@ -94,6 +103,9 @@ Feature: Process API CLI - Discovery Subcommands Rule: CLI tags and sources subcommands return JSON + **Invariant:** The tags and sources subcommands must return valid JSON with the expected top-level structure (data key for tags, array for sources). + **Rationale:** Annotation exploration depends on machine-parseable output; invalid JSON prevents automated enrichment workflows from detecting unannotated files and tag gaps. + @happy-path Scenario: Tags returns tag usage counts Given TypeScript files with pattern annotations @@ -114,6 +126,9 @@ Feature: Process API CLI - Discovery Subcommands Rule: CLI extended arch subcommands query architecture relationships + **Invariant:** Extended arch subcommands (neighborhood, compare, coverage) must return valid JSON reflecting the actual architecture relationships present in the scanned sources. + **Rationale:** Architecture queries drive design-session decisions; stale or structurally invalid output leads to incorrect dependency analysis and missed coupling between bounded contexts. + @happy-path Scenario: Arch neighborhood returns pattern relationships Given TypeScript files with architecture annotations and dependencies @@ -142,6 +157,9 @@ Feature: Process API CLI - Discovery Subcommands Rule: CLI unannotated subcommand finds files without annotations + **Invariant:** The unannotated subcommand must return valid JSON listing every TypeScript file that lacks the `@libar-docs` opt-in marker. + **Rationale:** Files missing the opt-in marker are invisible to the scanner; without this subcommand, unannotated files silently drop out of generated documentation and validation. + @happy-path Scenario: Unannotated finds files missing libar-docs marker Given TypeScript files with mixed annotations diff --git a/tests/features/extractor/declaration-level-shape-tagging.feature b/tests/features/extractor/declaration-level-shape-tagging.feature index 182648e9..1d37b9a1 100644 --- a/tests/features/extractor/declaration-level-shape-tagging.feature +++ b/tests/features/extractor/declaration-level-shape-tagging.feature @@ -15,6 +15,7 @@ Feature: Declaration-Level Shape Tagging - Extraction **Invariant:** Only declarations with the libar-docs-shape tag in their immediately preceding JSDoc are collected as tagged shapes. + **Rationale:** Extracting shapes without an explicit opt-in tag would surface internal implementation details in generated API documentation, violating information hiding. **Verified by:** Tagged declaration is extracted, Untagged export is ignored, @@ -137,6 +138,7 @@ Feature: Declaration-Level Shape Tagging - Extraction **Invariant:** The discoverTaggedShapes function uses the existing typescript-estree parse() and extractPrecedingJsDoc() approach. + **Rationale:** Introducing a second parser would create divergent AST behavior — reusing the established parser ensures consistent JSDoc handling and avoids subtle extraction differences. **Verified by:** All 5 declaration kinds supported, JSDoc gap enforcement, diff --git a/tests/features/extractor/dual-source-extraction.feature b/tests/features/extractor/dual-source-extraction.feature index 1b9fd1dc..e7b9e692 100644 --- a/tests/features/extractor/dual-source-extraction.feature +++ b/tests/features/extractor/dual-source-extraction.feature @@ -230,6 +230,7 @@ Feature: Dual-Source Extraction Rule: Include tags are extracted from Gherkin feature tags **Invariant:** Include tags are parsed as comma-separated values; absence of the tag means the pattern has no includes. + **Rationale:** Include tags control which patterns appear in scoped diagrams — incorrect parsing drops patterns from diagrams or includes unrelated ones. **Verified by:** Single include tag is extracted, CSV include tag produces multiple values, Feature without include tag has no include field @happy-path diff --git a/tests/features/extractor/extraction-pipeline-enhancements.feature b/tests/features/extractor/extraction-pipeline-enhancements.feature index 863dc229..972a5e31 100644 --- a/tests/features/extractor/extraction-pipeline-enhancements.feature +++ b/tests/features/extractor/extraction-pipeline-enhancements.feature @@ -16,6 +16,7 @@ Feature: Extraction Pipeline Enhancements **Invariant:** ExportInfo.signature shows full parameter types and return type instead of the placeholder value. + **Rationale:** Reference documentation renders signatures verbatim — placeholder values instead of real types make the API docs unusable for consumers. **Verified by:** Simple function signature, Async function keeps async prefix, Multi-parameter function, Function with object parameter type @@ -92,6 +93,7 @@ Feature: Extraction Pipeline Enhancements **Invariant:** Property-level JSDoc preserves full multi-line content without first-line truncation. + **Rationale:** Truncated property descriptions lose important behavioral details (defaults, units, constraints) that consumers rely on when integrating with the API. **Verified by:** Multi-line property JSDoc preserved, Single-line property JSDoc unchanged @@ -136,6 +138,7 @@ Feature: Extraction Pipeline Enhancements **Invariant:** JSDoc param, returns, and throws tags are extracted and stored on ExtractedShape for function-kind shapes. + **Rationale:** Function reference docs require parameter, return, and exception documentation — missing extraction means consumers must read source code instead of generated docs. **Verified by:** Param tags extracted, Returns tag extracted, Throws tags extracted, TypeScript-style params without braces @@ -223,6 +226,7 @@ Feature: Extraction Pipeline Enhancements **Invariant:** When extract-shapes tag value is the wildcard character, all exported declarations are extracted without listing names. + **Rationale:** Requiring explicit names for every export creates maintenance burden and stale annotations — wildcard discovery keeps shape docs in sync as exports are added or removed. **Verified by:** Wildcard extracts all exports, Non-exported declarations excluded, diff --git a/tests/features/extractor/shape-extraction-rendering.feature b/tests/features/extractor/shape-extraction-rendering.feature index 067f2b72..4deeccb7 100644 --- a/tests/features/extractor/shape-extraction-rendering.feature +++ b/tests/features/extractor/shape-extraction-rendering.feature @@ -19,6 +19,9 @@ Feature: TypeScript Shape Extraction - Rendering and Validation Rule: Multiple shapes are extracted in specified order + **Invariant:** Extracted shapes appear in the order specified by the tag list, not in source file declaration order. + **Rationale:** Documentation consumers rely on tag-specified ordering for consistent, predictable layout regardless of how source files are organized. + @acceptance-criteria @unit Scenario: Shapes appear in tag order not source order Given TypeScript source code: @@ -53,6 +56,9 @@ Feature: TypeScript Shape Extraction - Rendering and Validation Rule: Extracted shapes render as fenced code blocks + **Invariant:** Every extracted shape renders as a fenced TypeScript code block in the markdown output. + **Rationale:** Fenced code blocks provide syntax highlighting and preserve type definition formatting, which is essential for readable API documentation. + @acceptance-criteria @unit Scenario: Render shapes as markdown Given TypeScript source code: @@ -72,6 +78,9 @@ Feature: TypeScript Shape Extraction - Rendering and Validation Rule: Imported and re-exported shapes are tracked separately + **Invariant:** Shapes resolved via import or re-export statements are classified distinctly from locally declared shapes. + **Rationale:** Silently extracting imported types as if they were local declarations would produce duplicate or misleading documentation, since the canonical definition lives in another file. + @acceptance-criteria @validation Scenario: Imported shape produces warning Given TypeScript source code: @@ -100,6 +109,9 @@ Feature: TypeScript Shape Extraction - Rendering and Validation Rule: Invalid TypeScript produces error result + **Invariant:** Malformed TypeScript source returns an error Result instead of throwing or producing partial shapes. + **Rationale:** Unhandled parse exceptions would crash the pipeline mid-run, preventing all subsequent files from being processed. + @acceptance-criteria @validation Scenario: Malformed TypeScript returns error Given TypeScript source code: @@ -115,6 +127,9 @@ Feature: TypeScript Shape Extraction - Rendering and Validation Rule: Shape rendering supports grouping options + **Invariant:** The `groupInSingleBlock` option controls whether shapes render in one combined code fence or in separate per-shape code fences. + **Rationale:** Different documentation layouts require different grouping strategies; a single block provides compact overviews while separate blocks allow per-type commentary. + @acceptance-criteria @unit Scenario: Grouped rendering in single code block Given TypeScript source code: @@ -226,6 +241,9 @@ Feature: TypeScript Shape Extraction - Rendering and Validation Rule: Large source files are rejected to prevent memory exhaustion + **Invariant:** Source files exceeding 5MB are rejected before parsing begins. + **Rationale:** Feeding unbounded input to the TypeScript parser risks out-of-memory crashes that would halt the entire extraction pipeline. + @acceptance-criteria @unit @security Scenario: Source code exceeding 5MB limit returns error Given TypeScript source code larger than 5MB diff --git a/tests/features/extractor/shape-extraction-types.feature b/tests/features/extractor/shape-extraction-types.feature index 847da64a..aad422e9 100644 --- a/tests/features/extractor/shape-extraction-types.feature +++ b/tests/features/extractor/shape-extraction-types.feature @@ -18,6 +18,9 @@ Feature: TypeScript Shape Extraction - Type Extraction Rule: extract-shapes tag exists in registry with CSV format + **Invariant:** The `extract-shapes` tag must be registered with CSV format so multiple shape names can be specified in a single annotation. + **Rationale:** Without CSV format registration, the tag parser cannot split comma-separated shape lists, causing only the first shape to be extracted. + @acceptance-criteria @unit Scenario: Tag registry contains extract-shapes with correct format Given the tag registry is loaded @@ -29,6 +32,9 @@ Feature: TypeScript Shape Extraction - Type Extraction Rule: Interfaces are extracted from TypeScript AST + **Invariant:** Every named interface declaration in a TypeScript source file must be extractable as a shape with kind `interface`, including generics, extends clauses, and JSDoc. + **Rationale:** Interfaces are the primary API surface for TypeScript libraries; failing to extract them leaves the most important type contracts undocumented. + @acceptance-criteria @unit Scenario: Extract simple interface Given TypeScript source code: @@ -97,6 +103,9 @@ Feature: TypeScript Shape Extraction - Type Extraction Rule: Property-level JSDoc is extracted for interface properties + **Invariant:** Property-level JSDoc must be attributed only to the immediately adjacent property, never inherited from the parent interface declaration. + **Rationale:** Misattributing interface-level JSDoc to the first property produces incorrect per-field documentation and misleads consumers about individual property semantics. + The extractor uses strict adjacency (gap = 1 line) to prevent interface-level JSDoc from being misattributed to the first property. @@ -158,6 +167,9 @@ Feature: TypeScript Shape Extraction - Type Extraction Rule: Type aliases are extracted from TypeScript AST + **Invariant:** Union types, mapped types, and conditional types must all be extractable as shapes with kind `type`, preserving their full type expression. + **Rationale:** Type aliases encode domain constraints (e.g., discriminated unions, mapped utilities) that are essential for API documentation; omitting them hides the type-level design. + @acceptance-criteria @unit Scenario: Extract union type alias Given TypeScript source code: @@ -194,6 +206,9 @@ Feature: TypeScript Shape Extraction - Type Extraction Rule: Enums are extracted from TypeScript AST + **Invariant:** Both regular and const enums must be extractable as shapes with kind `enum`, including their member values. + **Rationale:** Enums define finite value sets used in validation and serialization; missing them from documentation forces consumers to read source code to discover valid values. + @acceptance-criteria @unit Scenario: Extract string enum Given TypeScript source code: @@ -229,6 +244,9 @@ Feature: TypeScript Shape Extraction - Type Extraction Rule: Function signatures are extracted with body omitted + **Invariant:** Extracted function shapes must include the full signature (name, parameters, return type, async modifier) but never the implementation body. + **Rationale:** Including function bodies in documentation exposes implementation details, inflates output size, and creates a maintenance burden when internals change without signature changes. + @acceptance-criteria @unit Scenario: Extract function signature Given TypeScript source code: @@ -261,6 +279,9 @@ Feature: TypeScript Shape Extraction - Type Extraction Rule: Const declarations are extracted from TypeScript AST + **Invariant:** Const declarations must be extractable as shapes with kind `const`, whether or not they carry an explicit type annotation. + **Rationale:** Constants define configuration defaults, version strings, and sentinel values that consumers depend on; excluding them creates documentation gaps for public API surface. + @acceptance-criteria @unit Scenario: Extract const with type annotation Given TypeScript source code: @@ -287,6 +308,9 @@ Feature: TypeScript Shape Extraction - Type Extraction Rule: Non-exported shapes are extractable + **Invariant:** Shape extraction must succeed for declarations regardless of export status, with the `exported` flag accurately reflecting visibility. + **Rationale:** Internal types often define the core domain model; restricting extraction to exports only would omit types that are essential for understanding module internals. + @acceptance-criteria @unit Scenario: Extract non-exported interface Given TypeScript source code: diff --git a/tests/features/generators/business-rules-codec.feature b/tests/features/generators/business-rules-codec.feature index ce62010a..ea2493c9 100644 --- a/tests/features/generators/business-rules-codec.feature +++ b/tests/features/generators/business-rules-codec.feature @@ -17,6 +17,9 @@ Feature: Business Rules Document Codec Rule: Extracts Rule blocks with Invariant and Rationale + **Invariant:** Annotated Rule blocks must have their Invariant, Rationale, and Verified-by fields faithfully extracted and rendered. + **Rationale:** These structured annotations are the primary content of business rules documentation; losing them silently produces incomplete output. + Scenario: Extracts annotated Rule with Invariant and Rationale Given a pattern with a rule containing: | Field | Value | @@ -46,6 +49,9 @@ Feature: Business Rules Document Codec Rule: Organizes rules by product area and phase + **Invariant:** Rules must be grouped by product area and ordered by phase number within each group. + **Rationale:** Ungrouped or misordered rules make it impossible to find domain-specific constraints or understand their delivery sequence. + Scenario: Groups rules by product area and phase Given patterns with rules in these categories: | Category | Rule Name | @@ -70,6 +76,9 @@ Feature: Business Rules Document Codec Rule: Summary mode generates compact output + **Invariant:** Summary mode must produce only a statistics line and omit all detailed rule headings and content. + **Rationale:** AI context windows have strict token limits; including full detail in summary mode wastes context budget and degrades session quality. + Scenario: Summary mode includes statistics line Given multiple patterns with a total of 5 rules When decoding with BusinessRulesCodec in summary mode @@ -86,6 +95,9 @@ Feature: Business Rules Document Codec Rule: Preserves code examples and tables in detailed mode + **Invariant:** Code examples must appear only in detailed mode and must be excluded from standard mode output. + **Rationale:** Code blocks in standard mode clutter the overview and push important rule summaries out of view; detailed mode is the opt-in path for full content. + Scenario: Code examples included in detailed mode Given a pattern with a rule containing code examples When decoding with BusinessRulesCodec in detailed mode with code examples enabled @@ -102,6 +114,9 @@ Feature: Business Rules Document Codec Rule: Generates scenario traceability links + **Invariant:** Verification links must include the source file path so readers can locate the verifying scenario. + **Rationale:** Links without file paths are unresolvable, breaking the traceability chain between business rules and their executable specifications. + Scenario: Verification links include file path Given a pattern with scenarios in "reservation-pattern.feature" at line 42 When decoding with BusinessRulesCodec in detailed mode with verification enabled @@ -113,6 +128,9 @@ Feature: Business Rules Document Codec Rule: Progressive disclosure generates detail files per product area + **Invariant:** Each product area with rules must produce a separate detail file, and the main document must link to all detail files via an index table. + **Rationale:** A single monolithic document becomes unnavigable at scale; progressive disclosure lets readers drill into only the product area they need. + Scenario: Detail files are generated per product area Given patterns with rules in product areas: | ProductArea | RuleName | @@ -144,6 +162,9 @@ Feature: Business Rules Document Codec Rule: Empty rules show placeholder instead of blank content + **Invariant:** Rules with no invariant, description, or scenarios must render a placeholder message; rules with scenarios but no invariant must show the verified-by list instead. + **Rationale:** Blank rule sections are indistinguishable from rendering bugs; explicit placeholders signal intentional incompleteness versus broken extraction. + Scenario: Rule without invariant or description or scenarios shows placeholder Given a pattern with a rule containing: | Field | Value | @@ -164,6 +185,9 @@ Feature: Business Rules Document Codec Rule: Rules always render flat for full visibility + **Invariant:** Rule output must never use collapsible blocks regardless of rule count; all rule headings must be directly visible. + **Rationale:** Business rules are compliance-critical content; hiding them behind collapsible sections risks rules being overlooked during review. + Scenario: Features with many rules render flat without collapsible blocks Given a pattern with 4 rules each having 2 scenarios When decoding with BusinessRulesCodec in standard mode @@ -176,6 +200,9 @@ Feature: Business Rules Document Codec Rule: Source file shown as filename text + **Invariant:** Source file references must render as plain filename text, not as markdown links. + **Rationale:** Markdown links to local file paths break in every viewer except the local filesystem, producing dead links that erode trust in the documentation. + Scenario: Source file rendered as plain text not link Given a pattern with a rule in file "tests/features/my-feature.feature" When decoding with BusinessRulesCodec in standard mode @@ -187,6 +214,9 @@ Feature: Business Rules Document Codec Rule: Verified-by renders as checkbox list at standard level + **Invariant:** Verified-by must render as a checkbox list of scenario names, with duplicate names deduplicated. + **Rationale:** Duplicate entries inflate the checklist and mislead reviewers into thinking more verification exists than actually does. + Scenario: Rules with scenarios show verified-by checklist Given a pattern with a rule having scenarios "Create order" and "Cancel order" When decoding with BusinessRulesCodec in standard mode @@ -203,6 +233,9 @@ Feature: Business Rules Document Codec Rule: Feature names are humanized from camelCase pattern names + **Invariant:** CamelCase pattern names must be converted to space-separated headings with trailing "Testing" suffixes stripped. + **Rationale:** Raw camelCase names are unreadable in documentation headings, and "Testing" suffixes leak implementation concerns into user-facing output. + Scenario: CamelCase pattern name becomes spaced heading Given a pattern named "ConfigResolution" with a rule When decoding with BusinessRulesCodec in standard mode diff --git a/tests/features/generators/prd-implementation-section.feature b/tests/features/generators/prd-implementation-section.feature index 3ae591bb..22bc2fc3 100644 --- a/tests/features/generators/prd-implementation-section.feature +++ b/tests/features/generators/prd-implementation-section.feature @@ -82,6 +82,7 @@ Feature: PRD Implementation Section Rule: Patterns without implementations omit the section **Invariant:** The Implementations heading must not appear in pattern documents when no implementing files exist. + **Rationale:** Rendering an empty Implementations section misleads readers into thinking implementations were expected but are missing, rather than simply not applicable. **Verified by:** No implementations section when none exist Scenario: No implementations section when none exist diff --git a/tests/features/generators/registry.feature b/tests/features/generators/registry.feature index 5e1e2fa6..bb18a129 100644 --- a/tests/features/generators/registry.feature +++ b/tests/features/generators/registry.feature @@ -18,6 +18,7 @@ Feature: Generator Registry Rule: Registry manages generator registration and retrieval **Invariant:** Each generator name is unique within the registry; duplicate registration is rejected and lookup of unknown names returns undefined. + **Rationale:** Allowing duplicate names would silently overwrite an existing generator, causing previously registered behavior to disappear without warning. **Verified by:** Register generator with unique name, Duplicate registration throws error, Get registered generator, Get unknown generator returns undefined, Available returns sorted list @acceptance-criteria @happy-path diff --git a/tests/features/generators/table-extraction.feature b/tests/features/generators/table-extraction.feature index a6f8d509..5fc5616a 100644 --- a/tests/features/generators/table-extraction.feature +++ b/tests/features/generators/table-extraction.feature @@ -48,6 +48,7 @@ Feature: Table Extraction Without Duplication Rule: Multiple tables in description each render exactly once **Invariant:** When a rule description contains multiple markdown tables, each table renders as a separate formatted table block with no merging or duplication. + **Rationale:** Merging or dropping tables would lose distinct data structures that the author intentionally separated, corrupting the rendered documentation. **Verified by:** Two tables in description render as two separate tables Scenario: Two tables in description render as two separate tables @@ -75,6 +76,7 @@ Feature: Table Extraction Without Duplication Rule: stripMarkdownTables removes table syntax from text **Invariant:** stripMarkdownTables removes all pipe-delimited table syntax from input text while preserving all surrounding content unchanged. + **Rationale:** If table syntax is not stripped from the raw text, the same table data appears twice in the rendered output -- once from the extracted table block and once as raw pipe characters in the description. **Verified by:** Strips single table from text, Strips multiple tables from text, Preserves text without tables Scenario: Strips single table from text diff --git a/tests/features/lint/lint-engine.feature b/tests/features/lint/lint-engine.feature index 8ea663e4..9db7e618 100644 --- a/tests/features/lint/lint-engine.feature +++ b/tests/features/lint/lint-engine.feature @@ -21,6 +21,7 @@ Feature: Lint Engine Rule: Single directive linting validates annotations against rules **Invariant:** Every directive is checked against all provided rules and violations include source location. + **Rationale:** Skipping rules or omitting source locations makes violations unactionable, as developers cannot locate or understand the issue. **Verified by:** Return empty array when all rules pass, Return violations for failing rules, Run all provided rules, Include correct file and line in violations @function:lintDirective @happy-path @@ -70,6 +71,7 @@ Feature: Lint Engine Rule: Multi-file batch linting aggregates results across files **Invariant:** All files and directives are scanned, violations are collected per file, and severity counts are accurate. + **Rationale:** Missing files or inaccurate severity counts cause silent rule violations in CI and undermine trust in the linting pipeline. **Verified by:** Return empty results for clean files, Collect violations by file, Count violations by severity, Handle multiple directives per file @function:lintFiles @happy-path @@ -128,6 +130,7 @@ Feature: Lint Engine Rule: Failure detection respects strict mode for severity escalation **Invariant:** Errors always indicate failure. Warnings only indicate failure in strict mode. Info never indicates failure. + **Rationale:** Without correct severity-to-exit-code mapping, CI pipelines either miss real errors or block on informational messages, eroding developer trust in the linter. **Verified by:** Return true when there are errors, Return false for warnings only in non-strict mode, Return true for warnings in strict mode, Return false for info only, Return false when no violations @function:hasFailures @@ -171,6 +174,7 @@ Feature: Lint Engine Rule: Violation sorting orders by severity then by line number **Invariant:** Sorted output places errors first, then warnings, then info, with stable line-number ordering within each severity. Sorting does not mutate the original array. + **Rationale:** Unsorted output forces developers to manually scan for critical errors among lower-severity noise, and mutating the original array would break callers that hold a reference to it. **Verified by:** Sort errors first then warnings then info, Sort by line number within same severity, Not mutate original array @function:sortViolationsBySeverity @@ -218,6 +222,7 @@ Feature: Lint Engine Rule: Pretty formatting produces human-readable output with severity counts **Invariant:** Pretty output includes file paths, line numbers, severity labels, rule IDs, and summary counts. Quiet mode suppresses non-error violations. + **Rationale:** Incomplete formatting (missing file paths or line numbers) prevents developers from navigating directly to violations, and noisy output in quiet mode defeats its purpose. **Verified by:** Show success message when no violations, Format violations with file line severity and message, Show summary line with counts, Filter out warnings and info in quiet mode @function:formatPretty @happy-path @@ -274,6 +279,7 @@ Feature: Lint Engine Rule: JSON formatting produces machine-readable output with full details **Invariant:** JSON output is valid, includes all summary fields, and preserves violation details including file, line, severity, rule, and message. + **Rationale:** Machine consumers (CI pipelines, IDE integrations) depend on valid JSON with complete fields; missing or malformed output breaks automated tooling downstream. **Verified by:** Return valid JSON, Include all summary fields, Include violation details @function:formatJson diff --git a/tests/features/poc/rule-keyword-poc.feature b/tests/features/poc/rule-keyword-poc.feature index 6feae068..b361cbd8 100644 --- a/tests/features/poc/rule-keyword-poc.feature +++ b/tests/features/poc/rule-keyword-poc.feature @@ -11,6 +11,10 @@ Feature: PoC - Rule Keyword Support Given a test context is initialized Rule: Basic arithmetic operations work correctly + + **Invariant:** Arithmetic operations must return mathematically correct results for all valid inputs. + **Rationale:** Incorrect arithmetic results silently corrupt downstream calculations, making errors undetectable at their source. + The calculator should perform standard math operations with correct results. @@ -29,6 +33,10 @@ Feature: PoC - Rule Keyword Support Then the result should be 6 Rule: Division has special constraints + + **Invariant:** Division operations must reject a zero divisor before execution. + **Rationale:** Unguarded division by zero causes runtime exceptions that crash the process instead of returning a recoverable error. + Division by zero must be handled gracefully to prevent system errors. diff --git a/tests/features/poc/test-content-blocks.feature b/tests/features/poc/test-content-blocks.feature index 36718a87..091e24cd 100644 --- a/tests/features/poc/test-content-blocks.feature +++ b/tests/features/poc/test-content-blocks.feature @@ -29,6 +29,9 @@ Feature: Test Content Blocks Rule: Business rules appear as a separate section + **Invariant:** Every Rule block must produce a distinct Business Rule entry containing its description and associated scenarios. + **Rationale:** Without guaranteed capture, rule descriptions and rich content (DocStrings, DataTables) would be silently dropped from generated documentation. + Rule descriptions provide context for why this business rule exists. You can include multiple paragraphs here. @@ -65,6 +68,9 @@ Feature: Test Content Blocks Rule: Multiple rules create multiple Business Rule entries + **Invariant:** Each Rule keyword in a feature file must produce its own independent Business Rule entry in generated output. + **Rationale:** Merging rules into a single entry would collapse distinct business domains, making it impossible to trace scenarios back to their governing constraint. + Each Rule keyword creates a separate entry in the Business Rules section. This helps organize complex features into logical business domains. diff --git a/tests/features/scanner/ast-parser-exports.feature b/tests/features/scanner/ast-parser-exports.feature index e3499533..f5314bd4 100644 --- a/tests/features/scanner/ast-parser-exports.feature +++ b/tests/features/scanner/ast-parser-exports.feature @@ -15,6 +15,7 @@ Feature: TypeScript AST Parser - Export Type Identification Rule: Export types are correctly identified from TypeScript declarations **Invariant:** Every exported TypeScript declaration type (function, type, interface, const, class, enum, abstract class, arrow function, async function, generic function, default export, re-export) is correctly classified. + **Rationale:** Export type classification drives how codecs render API documentation — misclassifying a function as a const (or vice versa) produces incorrect signatures and misleading docs. **Verified by:** Parse function export with directive, Parse type export with directive, Parse interface export with directive, Parse const export with directive, Parse class export with directive, Parse enum export with directive, Parse const enum export with directive, Parse abstract class export with directive, Parse arrow function export with directive, Parse async function export with directive, Parse generic function export with directive, Parse default export with directive, Parse re-exports with directive, Parse multiple exports in single statement, Parse multiple directives in same file @function:parseFileDirectives @happy-path diff --git a/tests/features/scanner/ast-parser-metadata.feature b/tests/features/scanner/ast-parser-metadata.feature index f75a49ee..1cdc7095 100644 --- a/tests/features/scanner/ast-parser-metadata.feature +++ b/tests/features/scanner/ast-parser-metadata.feature @@ -15,6 +15,7 @@ Feature: TypeScript AST Parser - Metadata Extraction Rule: Metadata is correctly extracted from JSDoc comments **Invariant:** Examples, multi-line descriptions, line numbers, function signatures, and standard JSDoc tags are all correctly parsed and separated. + **Rationale:** Downstream codecs render each metadata field independently — incorrect parsing causes examples to leak into descriptions or signatures to be lost in generated documentation. **Verified by:** Extract examples from directive, Extract multi-line description, Track line numbers correctly, Extract function signature information, Ignore @param and @returns in description @function:parseFileDirectives @metadata @@ -134,6 +135,7 @@ Feature: TypeScript AST Parser - Metadata Extraction Rule: Tags are extracted only from the directive section, not from description or examples **Invariant:** Only tags appearing in the directive section (before the description) are extracted. Tags mentioned in description prose or example code blocks are ignored. + **Rationale:** Tags control taxonomy classification and pattern routing — extracting them from prose or examples would create phantom patterns and corrupt the registry. **Verified by:** Extract multiple tags from directive section, Extract tag with description on same line, NOT extract tags mentioned in description, NOT extract tags mentioned in @example sections @function:parseFileDirectives @tags @@ -228,6 +230,7 @@ Feature: TypeScript AST Parser - Metadata Extraction Rule: When to Use sections are extracted in all supported formats **Invariant:** When to Use content is extracted from heading format with bullet points, inline bold format, and asterisk bullet format. When no When to Use section exists, the field is undefined. + **Rationale:** Generated pattern documentation includes a When to Use section — failing to recognize any supported format means valid guidance silently disappears from output. **Verified by:** Extract When to Use heading format with bullet points, Extract When to use inline format, Extract asterisk bullets in When to Use section, Not set whenToUse when section is missing @function:parseFileDirectives @when-to-use diff --git a/tests/features/scanner/ast-parser-relationships-edges.feature b/tests/features/scanner/ast-parser-relationships-edges.feature index 58a20a1f..f6b2b073 100644 --- a/tests/features/scanner/ast-parser-relationships-edges.feature +++ b/tests/features/scanner/ast-parser-relationships-edges.feature @@ -15,6 +15,7 @@ Feature: TypeScript AST Parser - Relationships and Edge Cases Rule: Relationship tags extract uses and usedBy dependencies **Invariant:** The uses and usedBy relationship arrays are populated from directive tags, not from description content. When no relationship tags exist, the fields are undefined. + **Rationale:** Relationship data drives dependency diagrams and impact analysis — extracting from prose would produce false edges from incidental mentions. **Verified by:** Extract @libar-docs-uses with single value, Extract @libar-docs-uses with comma-separated values, Extract @libar-docs-used-by with single value, Extract @libar-docs-used-by with comma-separated values, Extract both uses and usedBy from same directive, NOT capture uses/usedBy values in description, Not set uses/usedBy when no relationship tags exist @function:parseFileDirectives @relationships @@ -178,6 +179,7 @@ Feature: TypeScript AST Parser - Relationships and Edge Cases Rule: Edge cases and malformed input are handled gracefully **Invariant:** The parser never crashes on invalid input. Files without directives return empty results. Malformed TypeScript returns a structured error with the file path. + **Rationale:** The scanner processes hundreds of files in bulk — a single malformed file must not abort the entire pipeline or produce an undiagnosable crash. **Verified by:** Skip comments without @libar-docs-* tags, Skip invalid directive with incomplete tag, Handle malformed TypeScript gracefully, Handle empty file gracefully, Handle whitespace-only file, Handle file with only comments and no exports, Skip inline comments (non-block), Handle unicode characters in descriptions @function:parseFileDirectives @edge-case diff --git a/tests/features/scanner/docstring-mediatype.feature b/tests/features/scanner/docstring-mediatype.feature index 409339d1..dc3a3575 100644 --- a/tests/features/scanner/docstring-mediatype.feature +++ b/tests/features/scanner/docstring-mediatype.feature @@ -51,6 +51,7 @@ Feature: DocString MediaType Preservation Rule: MediaType is used when rendering code blocks **Invariant:** The rendered code block language must match the DocString mediaType; when mediaType is absent, the renderer falls back to a caller-specified default language. + **Rationale:** Using the wrong language hint causes syntax highlighters to misrender code blocks, and losing mediaType entirely can trigger incorrect escaping (e.g., asterisks in JSDoc). **Verified by:** TypeScript mediaType renders as typescript code block, JSDoc mediaType prevents asterisk escaping, Missing mediaType falls back to default language Scenario: TypeScript mediaType renders as typescript code block diff --git a/tests/features/scanner/file-discovery.feature b/tests/features/scanner/file-discovery.feature index 3040d889..e20dba9d 100644 --- a/tests/features/scanner/file-discovery.feature +++ b/tests/features/scanner/file-discovery.feature @@ -126,6 +126,7 @@ Feature: File Discovery Rule: Custom configuration extends discovery behavior **Invariant:** User-provided exclude patterns must be applied in addition to (not replacing) the default exclusions. + **Rationale:** Replacing defaults with custom patterns would silently re-include node_modules and dist, causing false positives in the pattern registry. **Verified by:** Respect custom exclude patterns, Return empty array when no files match, Handle nested directory structures @function:findFilesToScan @exclusions diff --git a/tests/features/types/error-factories.feature b/tests/features/types/error-factories.feature index ef2928b6..b6096339 100644 --- a/tests/features/types/error-factories.feature +++ b/tests/features/types/error-factories.feature @@ -53,6 +53,7 @@ Feature: Error Factory Functions Rule: createDirectiveValidationError formats file location with line number **Invariant:** Every DirectiveValidationError must include the source file path, line number, and reason, with the message formatted as "file:line" for IDE-clickable error output. + **Rationale:** The "file:line" format enables click-to-navigate in IDEs and terminals, turning validation errors into actionable links rather than requiring manual file/line lookup. **Verified by:** createDirectiveValidationError includes line number in message, createDirectiveValidationError includes optional directive snippet, createDirectiveValidationError omits directive when not provided @function:createDirectiveValidationError @happy-path @@ -77,6 +78,7 @@ Feature: Error Factory Functions Rule: createPatternValidationError captures pattern identity and validation details **Invariant:** Every PatternValidationError must include the pattern name, source file path, and reason, with an optional array of specific validation errors for detailed diagnostics. + **Rationale:** Pattern names appear across many source files; without the pattern name and file path in the error, developers cannot locate which annotation triggered the validation failure. **Verified by:** createPatternValidationError formats pattern name and file, createPatternValidationError includes validation errors array, createPatternValidationError omits validationErrors when not provided @function:createPatternValidationError @happy-path @@ -109,6 +111,7 @@ Feature: Error Factory Functions Rule: createProcessMetadataValidationError validates Gherkin process metadata **Invariant:** Every ProcessMetadataValidationError must include the feature file path and a reason describing which metadata field failed validation. + **Rationale:** Process metadata (status, phase, deliverables) drives FSM validation and documentation generation; silent metadata errors propagate incorrect state across all downstream consumers. **Verified by:** createProcessMetadataValidationError formats file and reason, createProcessMetadataValidationError includes readonly validation errors @function:createProcessMetadataValidationError @happy-path @@ -131,6 +134,7 @@ Feature: Error Factory Functions Rule: createDeliverableValidationError tracks deliverable-specific failures **Invariant:** Every DeliverableValidationError must include the feature file path and reason, with optional deliverableName for pinpointing which deliverable failed validation. + **Rationale:** Features often contain multiple deliverables; without the deliverable name in the error, developers must manually inspect the entire Background table to find the failing row. **Verified by:** createDeliverableValidationError formats file and reason, createDeliverableValidationError includes optional deliverableName, createDeliverableValidationError omits deliverableName when not provided, createDeliverableValidationError includes validation errors @function:createDeliverableValidationError @happy-path diff --git a/tests/features/types/result-monad.feature b/tests/features/types/result-monad.feature index ed6d6cfc..b1823291 100644 --- a/tests/features/types/result-monad.feature +++ b/tests/features/types/result-monad.feature @@ -20,6 +20,7 @@ Feature: Result Monad Rule: Result.ok wraps values into success results **Invariant:** Result.ok always produces a result where isOk is true, regardless of the wrapped value type (primitives, objects, null, undefined). + **Rationale:** Consumers rely on isOk to branch logic; if Result.ok could produce an ambiguous state, every call site would need defensive checks beyond the type guard. **Verified by:** Result.ok wraps a primitive value, Result.ok wraps an object value, Result.ok wraps null value, Result.ok wraps undefined value @function:Result.ok @happy-path @@ -52,6 +53,7 @@ Feature: Result Monad Rule: Result.err wraps values into error results **Invariant:** Result.err always produces a result where isErr is true, supporting Error instances, strings, and structured objects as error values. + **Rationale:** Supporting multiple error value types allows callers to propagate rich context (structured objects) or simple messages (strings) without forcing a single error representation. **Verified by:** Result.err wraps an Error instance, Result.err wraps a string error, Result.err wraps a structured error object @function:Result.err @happy-path @@ -79,6 +81,7 @@ Feature: Result Monad Rule: Type guards distinguish success from error results **Invariant:** isOk and isErr are mutually exclusive: exactly one returns true for any Result value. + **Rationale:** If both guards could return true (or both false), TypeScript type narrowing would break, leaving the value/error branch unreachable or unsound. **Verified by:** Type guards correctly identify success results, Type guards correctly identify error results @function:Result.isOk @function:Result.isErr @@ -96,6 +99,7 @@ Feature: Result Monad Rule: unwrap extracts the value or throws the error **Invariant:** unwrap on a success result returns the value; unwrap on an error result always throws an Error instance (wrapping non-Error values for stack trace preservation). + **Rationale:** Wrapping non-Error values in Error instances ensures stack traces are always available for debugging, preventing the loss of call-site context when string or object errors are thrown. **Verified by:** unwrap extracts value from success result, unwrap throws the Error from error result, unwrap wraps non-Error in Error for proper stack trace, unwrap serializes object error to JSON in message @function:Result.unwrap @happy-path @@ -132,6 +136,7 @@ Feature: Result Monad Rule: unwrapOr extracts the value or returns a default **Invariant:** unwrapOr on a success result returns the contained value (ignoring the default); on an error result it returns the provided default value. + **Rationale:** Providing a safe fallback path avoids forcing callers to handle errors explicitly when a sensible default exists, reducing boilerplate in non-critical error recovery. **Verified by:** unwrapOr returns value from success result, unwrapOr returns default from error result, unwrapOr returns numeric default from error result @function:Result.unwrapOr @happy-path @@ -155,6 +160,7 @@ Feature: Result Monad Rule: map transforms the success value without affecting errors **Invariant:** map applies the transformation function only to success results; error results pass through unchanged. Multiple maps can be chained. + **Rationale:** Skipping the transformation on error results enables chained pipelines to short-circuit on the first failure without requiring explicit error checks at each step. **Verified by:** map transforms success value, map passes through error unchanged, map chains multiple transformations @function:Result.map @happy-path @@ -181,6 +187,7 @@ Feature: Result Monad Rule: mapErr transforms the error value without affecting successes **Invariant:** mapErr applies the transformation function only to error results; success results pass through unchanged. Error types can be converted. + **Rationale:** Allowing error-type conversion at boundaries (e.g., low-level I/O errors to domain errors) keeps success paths untouched and preserves the original value through error-handling layers. **Verified by:** mapErr transforms error value, mapErr passes through success unchanged, mapErr converts error type @function:Result.mapErr @happy-path diff --git a/tests/features/validation/config-schemas.feature b/tests/features/validation/config-schemas.feature index 22465901..7a50b56c 100644 --- a/tests/features/validation/config-schemas.feature +++ b/tests/features/validation/config-schemas.feature @@ -129,6 +129,8 @@ Feature: Configuration Schema Validation **Invariant:** isScannerConfig returns true only for objects that have a non-empty patterns array and a string baseDir. + **Rationale:** Without a reliable type guard, callers cannot safely narrow unknown config objects and risk accessing properties on incompatible types at runtime. + **Verified by:** isScannerConfig returns true for valid config, isScannerConfig returns false for invalid config, isScannerConfig returns false for null, isScannerConfig returns false for non-object @function:isScannerConfig @happy-path @@ -159,6 +161,8 @@ Feature: Configuration Schema Validation **Invariant:** isGeneratorConfig returns true only for objects that have a string outputDir and a .json registryPath. + **Rationale:** Without a reliable type guard, callers cannot safely narrow unknown config objects and risk passing malformed generator configs that bypass schema validation. + **Verified by:** isGeneratorConfig returns true for valid config, isGeneratorConfig returns false for invalid config, isGeneratorConfig returns false for non-json registry @function:isGeneratorConfig @happy-path diff --git a/tests/steps/behavior/render-output.steps.ts b/tests/steps/behavior/render-output.steps.ts index 88a1cb44..914c30d0 100644 --- a/tests/steps/behavior/render-output.steps.ts +++ b/tests/steps/behavior/render-output.steps.ts @@ -12,6 +12,7 @@ import { initState, renderToMarkdown, renderToClaudeContext, + renderToClaudeMdModule, renderDocumentWithFiles, heading, paragraph, @@ -575,4 +576,239 @@ describeFeature(feature, ({ Rule, Background, AfterEachScenario }) => { } ); }); + + // =========================================================================== + // Claude MD Module Renderer + // =========================================================================== + + Rule( + 'Claude MD module renderer produces modular-claude-md compatible output', + ({ RuleScenario }) => { + RuleScenario('Module title renders as H3', ({ Given, When, Then, And }) => { + Given('a document with title {string}', (_ctx: unknown, title: string) => { + state!.sections = []; + state!.doc = document(title, []); + }); + + And('the document has sections:', (_ctx: unknown, dataTable: DataTableRow[]) => { + for (const row of dataTable) { + switch (row.type) { + case 'heading': + state!.sections.push(heading(2, row.content)); + break; + case 'paragraph': + state!.sections.push(paragraph(row.content)); + break; + case 'separator': + state!.sections.push(separator()); + break; + } + } + state!.doc = document(state!.doc!.title, state!.sections); + }); + + When('rendering to claude md module', () => { + state!.claudeMdModule = renderToClaudeMdModule(state!.doc!); + }); + + Then('the claude md module output contains {string}', (_ctx: unknown, expected: string) => { + expect(state!.claudeMdModule).toContain(expected); + }); + + And( + 'the claude md module output does not contain {string}', + (_ctx: unknown, notExpected: string) => { + // Check that the exact H1 form doesn't appear (but H3 does) + // Use line-start matching to avoid substring false positives + const lines = state!.claudeMdModule.split('\n'); + const hasExact = lines.some((line) => line.trim() === notExpected.trim()); + expect(hasExact).toBe(false); + } + ); + }); + + RuleScenario('Module section headings offset by plus 2', ({ Given, When, Then, And }) => { + Given('a document with title {string}', (_ctx: unknown, title: string) => { + state!.sections = []; + state!.doc = document(title, []); + }); + + And('the document has sections:', (_ctx: unknown, dataTable: DataTableRow[]) => { + for (const row of dataTable) { + switch (row.type) { + case 'heading': + state!.sections.push(heading(2, row.content)); + break; + case 'paragraph': + state!.sections.push(paragraph(row.content)); + break; + case 'separator': + state!.sections.push(separator()); + break; + } + } + state!.doc = document(state!.doc!.title, state!.sections); + }); + + When('rendering to claude md module', () => { + state!.claudeMdModule = renderToClaudeMdModule(state!.doc!); + }); + + Then('the claude md module output contains {string}', (_ctx: unknown, expected: string) => { + expect(state!.claudeMdModule).toContain(expected); + }); + }); + + RuleScenario('Module frontmatter is omitted', ({ Given, When, Then, And }) => { + Given('a document with:', (_ctx: unknown, dataTable: DataTableRow[]) => { + const fields: Record = {}; + for (const row of dataTable) { + fields[row.field] = row.value; + } + state!.doc = document(fields.title, [], { + purpose: fields.purpose, + }); + }); + + When('rendering to claude md module', () => { + state!.claudeMdModule = renderToClaudeMdModule(state!.doc!); + }); + + Then( + 'the claude md module output does not contain {string}', + (_ctx: unknown, notExpected: string) => { + expect(state!.claudeMdModule).not.toContain(notExpected); + } + ); + + And( + 'the claude md module output does not contain {string}', + (_ctx: unknown, notExpected: string) => { + expect(state!.claudeMdModule).not.toContain(notExpected); + } + ); + }); + + RuleScenario('Module mermaid blocks are omitted', ({ Given, When, Then, And }) => { + Given('a document with title {string}', (_ctx: unknown, title: string) => { + state!.doc = document(title, []); + }); + + And('the document has a mermaid block:', (_ctx: unknown, docString: string) => { + state!.doc = document(state!.doc!.title, [mermaid(docString.trim())]); + }); + + When('rendering to claude md module', () => { + state!.claudeMdModule = renderToClaudeMdModule(state!.doc!); + }); + + Then( + 'the claude md module output does not contain any of:', + (_ctx: unknown, dataTable: DataTableRow[]) => { + for (const row of dataTable) { + expect(state!.claudeMdModule).not.toContain(row.text); + } + } + ); + }); + + RuleScenario('Module link-out blocks are omitted', ({ Given, When, Then, And }) => { + Given('a document with title {string}', (_ctx: unknown, title: string) => { + state!.doc = document(title, []); + }); + + And( + 'the document has a link-out {string} to {string}', + (_ctx: unknown, text: string, path: string) => { + state!.doc = document(state!.doc!.title, [linkOut(text, path)]); + } + ); + + When('rendering to claude md module', () => { + state!.claudeMdModule = renderToClaudeMdModule(state!.doc!); + }); + + Then( + 'the claude md module output does not contain {string}', + (_ctx: unknown, notExpected: string) => { + expect(state!.claudeMdModule).not.toContain(notExpected); + } + ); + + And( + 'the claude md module output does not contain {string}', + (_ctx: unknown, notExpected: string) => { + expect(state!.claudeMdModule).not.toContain(notExpected); + } + ); + }); + + RuleScenario( + 'Module collapsible blocks flatten to headings', + ({ Given, When, Then, And }) => { + Given('a document with title {string}', (_ctx: unknown, title: string) => { + state!.doc = document(title, []); + }); + + And('a collapsible block with summary {string}', (_ctx: unknown, summary: string) => { + state!.collapsibleSummary = summary; + state!.collapsibleContent = []; + }); + + And('the collapsible contains a paragraph {string}', (_ctx: unknown, text: string) => { + state!.collapsibleContent.push(paragraph(text)); + state!.doc = document(state!.doc!.title, [ + collapsible(state!.collapsibleSummary, state!.collapsibleContent), + ]); + }); + + When('rendering to claude md module', () => { + state!.claudeMdModule = renderToClaudeMdModule(state!.doc!); + }); + + Then( + 'the claude md module output contains {string}', + (_ctx: unknown, expected: string) => { + expect(state!.claudeMdModule).toContain(expected); + } + ); + + And( + 'the claude md module output contains {string}', + (_ctx: unknown, expected: string) => { + expect(state!.claudeMdModule).toContain(expected); + } + ); + + And( + 'the claude md module output does not contain {string}', + (_ctx: unknown, notExpected: string) => { + expect(state!.claudeMdModule).not.toContain(notExpected); + } + ); + } + ); + + RuleScenario('Module heading level clamped at H6', ({ Given, When, Then, And }) => { + Given('a document with title {string}', (_ctx: unknown, title: string) => { + state!.doc = document(title, []); + }); + + And( + 'the document has a heading at level {int} with text {string}', + (_ctx: unknown, level: number, text: string) => { + state!.doc = document(state!.doc!.title, [{ type: 'heading', level, text }]); + } + ); + + When('rendering to claude md module', () => { + state!.claudeMdModule = renderToClaudeMdModule(state!.doc!); + }); + + Then('the claude md module output contains {string}', (_ctx: unknown, expected: string) => { + expect(state!.claudeMdModule).toContain(expected); + }); + }); + } + ); }); diff --git a/tests/support/helpers/render-state.ts b/tests/support/helpers/render-state.ts index c437eff0..24453e94 100644 --- a/tests/support/helpers/render-state.ts +++ b/tests/support/helpers/render-state.ts @@ -7,6 +7,7 @@ import { renderToMarkdown, renderToClaudeContext, + renderToClaudeMdModule, renderDocumentWithFiles, type OutputFile, } from '../../../src/renderable/render.js'; @@ -31,6 +32,7 @@ import type { DataTableRow } from '../world.js'; export { renderToMarkdown, renderToClaudeContext, + renderToClaudeMdModule, renderDocumentWithFiles, heading, paragraph, @@ -57,6 +59,7 @@ export interface RenderScenarioState { // Results markdown: string; claudeContext: string; + claudeMdModule: string; outputFiles: OutputFile[]; // Collapsible builder state @@ -70,6 +73,7 @@ export function initState(): RenderScenarioState { sections: [], markdown: '', claudeContext: '', + claudeMdModule: '', outputFiles: [], collapsibleSummary: '', collapsibleContent: [],