Skip to content

refactor: Ubiquitous Language — MasterDataset → PatternGraph, ProcessStateAPI → PatternGraphAPI#42

Merged
darko-mijic merged 6 commits intomainfrom
refactor/master-dataset-to-pattern-graph
Apr 2, 2026
Merged

refactor: Ubiquitous Language — MasterDataset → PatternGraph, ProcessStateAPI → PatternGraphAPI#42
darko-mijic merged 6 commits intomainfrom
refactor/master-dataset-to-pattern-graph

Conversation

@darko-mijic
Copy link
Copy Markdown
Contributor

Summary

Aligns internal code vocabulary with the product's ubiquitous language. Every type, function, file, annotation, test, spec, and documentation reference now speaks the same language as the product, the customer-facing materials, and the engineering team.

The Problem

The codebase used MasterDataset for its core data structure and ProcessStateAPI for its query interface — generic internal names that communicated nothing about the product's domain. Every AI session and every new contributor had to maintain a mental translation layer between what the code said and what the product meant. In a project whose core principle is "code is the single source of truth," the code's vocabulary was contradicting the product's vocabulary.

The Principle

Domain-Driven Design's ubiquitous language: code, documentation, and conversation should all use the same vocabulary. When product docs say "pattern graph" but the code says MasterDataset, every interaction — human or AI — pays a translation tax.

What Changed

Core abstraction rename:

Before After Why
MasterDataset PatternGraph The product's core concept — a computed graph of all patterns and their relationships
MasterDatasetSchema PatternGraphSchema Zod schema that defines the PatternGraph shape
RuntimeMasterDataset RuntimePatternGraph Runtime extension with non-serializable workflow data
buildMasterDataset() buildPatternGraph() The 8-step pipeline factory
transformToMasterDataset() transformToPatternGraph() Core single-pass transformer
GeneratorContext.masterDataset GeneratorContext.patternGraph Struct field accessed by every codec and generator

API layer rename:

Before After Why
ProcessStateAPI PatternGraphAPI The 25-method query interface — queries the pattern graph
createProcessStateAPI() createPatternGraphAPI() Factory function
ProcessAPICLIImpl PatternGraphCLIImpl CLI implementation pattern
ProcessApiReferenceGenerator CliReferenceGenerator Reference doc generator

File renames (21 total):

Source files:

  • validation-schemas/master-dataset.tspattern-graph.ts
  • api/process-state.tspattern-graph-api.ts
  • cli/process-api.tspattern-graph-cli.ts
  • generators/built-in/process-api-reference-generator.tscli-reference-generator.ts

Spec and test files:

  • process-state-api-*.featurepattern-graph-api-*.feature
  • process-api-*.featurepattern-graph-cli-*.feature
  • Matching step definitions and test helpers renamed correspondingly

Documentation:

  • docs/PROCESS-API.mddocs/CLI.md
  • PROCESS-API-REFERENCE.mdCLI-REFERENCE.md
  • PROCESS-API-RECIPES.mdCLI-RECIPES.md

Scope

Metric Value
Files changed ~320
File renames 21 (all tracked by git)
Net lines ~0 (mechanical rename)
Test files 142 passed
Tests 8,808 passed

What Did NOT Change

Stable API Reason
MCP tool names (architect_*) User-facing API consumed by AI agents
CLI binary name (architect) Published npm binary
Tag prefix (@architect-*) Ecosystem annotation convention
npm package name (@libar-dev/architect) Published artifact
architect.config.ts format User-facing configuration API
ProcessState (lint module) Different concept — delivery process state for Process Guard
DeriveProcessState (lint module) Process Guard's state derivation — distinct from the query API

Breaking Changes

All consumer repos need updating. The public API exports changed:

  • PatternGraphAPI (was ProcessStateAPI)
  • createPatternGraphAPI() (was createProcessStateAPI())
  • PatternGraph (was MasterDataset)
  • buildPatternGraph() (was buildMasterDataset())
  • Import paths: pattern-graph.js (was master-dataset.js), pattern-graph-api.js (was process-state.js)

No backward-compatibility aliases. No deprecation period.

Design Decisions

  1. "PatternGraph" over "PatternDataset" — The product vocabulary uses "pattern graph" in all customer-facing materials. Structural accuracy ("it's a dataset with optional graph indexes") yields to ubiquitous language alignment ("customers think in terms of a pattern graph").

  2. Single atomic commit per rename wave — No intermediate states with mixed vocabulary. git blame cost is acceptable for a mechanical rename.

  3. CliReferenceGenerator over PatternGraphReferenceGenerator — The generator produces CLI documentation, not pattern graph documentation. The name describes what it generates.

  4. ProcessState kept in lint moduleProcessState in src/lint/process-guard/ represents the actual delivery process state (files, sessions, FSM). This is a different concept from the PatternGraphAPI query interface. Renaming it would be semantically wrong.

Post-Review Fixes (commit 55562f4)

Multi-agent code review identified 3 stale content-string references missed by the initial rename:

  • cli-reference-generator.ts linked generated output to deprecated docs/PROCESS-API.md — fixed to link to CLI-RECIPES.md
  • cli-schema.ts comments referenced old file path — updated
  • Renamed docs/PROCESS-API.mddocs/CLI.md and updated 60+ references across specs, stubs, and docs
  • Updated .coderabbit.yaml to exclude all .md files from review (reduces reviewable file count below CodeRabbit's 150-file limit)

Test Plan

  • pnpm build — zero TypeScript compilation errors
  • pnpm typecheck — all type references resolve
  • pnpm lint — no unused imports or naming violations
  • pnpm test — 8,808 tests passing (142 test files)
  • pnpm validate:all — 0 errors (anti-pattern + DoD validation)
  • pnpm docs:all — all generated docs use new terminology
  • Grep audit: zero occurrences of old names in source, test, spec, and config files
  • Git tracks all 21 file renames correctly (not delete+create)

…lignment

Align internal code vocabulary with product terminology per the naming
review (ideation docs 04-05). "PatternGraph" communicates structure and
content; "MasterDataset" was generic and required translation in every
AI session.

Tier 1 (core types):
- MasterDataset → PatternGraph (type, schema, all references)
- RuntimeMasterDataset → RuntimePatternGraph
- buildMasterDataset() → buildPatternGraph()
- transformToMasterDataset() → transformToPatternGraph()
- GeneratorContext.masterDataset → GeneratorContext.patternGraph
- @architect-shape master-dataset → @architect-shape pattern-graph

Tier 2 (API layer):
- ProcessStateAPI → PatternGraphAPI
- createProcessStateAPI() → createPatternGraphAPI()

File renames:
- master-dataset.ts → pattern-graph.ts
- process-state.ts → pattern-graph-api.ts
- process-state-api test/spec files → pattern-graph-api

No logic changes. No backward compatibility. All 8,808 tests pass.
304 files changed across source, tests, specs, and documentation.
…cli rename

Wave 2: Renamed ProcessStateAPI implementation layer
- ProcessAPICLIImpl → PatternGraphCLIImpl (type + annotations)
- ProcessApiReferenceGenerator → CliReferenceGenerator
- ProcessStateTypes → PatternGraphAPITypes
- process-api.ts → pattern-graph-cli.ts (CLI entry point)
- PROCESS-API-REFERENCE.md → CLI-REFERENCE.md (output file)
- 14 file renames (source, specs, tests, docs-sources)

Wave 3: CLI test infrastructure
- All test command strings: "process-api ..." → "pattern-graph-cli ..."
- @process-api tags → @pattern-graph-cli
- loadFeature() paths updated for renamed test files

Wave 4: Documentation and natural language
- Stale JSDoc "Master Dataset" → "PatternGraph" in schema
- Stale comments in barrel exports and spec text
- Broken import path in docs/ARCHITECTURE.md
- All remaining "process-api" in CLAUDE.md, specs, docs

All 8,808 tests pass. 152 files changed.
…enames, external agent gaps

- Rename MasterPhaseGroup → SchemaPhaseGroup (vestige of old naming in import alias)
- Fix "Process API Reference/Recipes" → "CLI Reference/Recipes" in doc index tables
- Fix "Process API coverage" → "Pattern Graph CLI coverage" in SESSION-WORKFLOW-GUIDE
- Accept external agent fixes: Process State API → Pattern Graph API in comments,
  ProcessAPILayeredExtraction → PatternGraphLayeredExtraction in specs/tags,
  generator titles, config paths, and PROCESS-API-RECIPES.md deletion
…d modules

Sweep residual stale terminology from two rename waves:
- MasterDataset→PatternGraph, ProcessStateAPI→PatternGraphAPI (this PR)
- process:query→architect:query, lint-process→architect-guard (prior rebrand)

Manual fixes: 7 _claude-md modules, 5 feature specs (with unlock-reason
tags for completed specs), AGENTS.md paths, 4 docs/ files, memory files.
Regenerated CLAUDE.md and all docs-live/ from updated sources.
- Rename deprecated PROCESS-API.md pointer file to CLI.md
- Update all 60+ references across src, specs, stubs, and docs
- Fix cli-reference-generator link to point to non-deprecated CLI-RECIPES.md
- Update .coderabbit.yaml to exclude all .md files from review (reduces
  file count below 150-file limit that caused "Review skipped")
- Regenerate all docs to propagate rename through pipeline
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 2, 2026

Important

Review skipped

Too many files!

This PR contains 225 files, which is 75 over the limit of 150.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: cd62a8d1-30b9-4be3-aa65-8d37f40fcdf5

📥 Commits

Reviewing files that changed from the base of the PR and between 0bf7f92 and 55562f4.

⛔ Files ignored due to path filters (75)
  • .coderabbit.yaml is excluded by none and included by none
  • AGENTS.md is excluded by none and included by none
  • CHANGELOG.md is excluded by none and included by none
  • _claude-md/api/data-api-cli.md is excluded by none and included by none
  • _claude-md/api/dual-source.md is excluded by none and included by none
  • _claude-md/api/mcp-server.md is excluded by none and included by none
  • _claude-md/core/architecture.md is excluded by none and included by none
  • _claude-md/core/context-protocol.md is excluded by none and included by none
  • _claude-md/core/project-overview.md is excluded by none and included by none
  • _claude-md/guides/product-area-enrichment.md is excluded by none and included by none
  • _claude-md/metadata.json is excluded by none and included by none
  • _claude-md/testing/test-implementation.md is excluded by none and included by none
  • _claude-md/testing/testing-policy.md is excluded by none and included by none
  • _claude-md/workflow/session-workflows.md is excluded by none and included by none
  • architect.config.ts is excluded by none and included by none
  • architect/design-reviews/mcp-server-integration.md is excluded by none and included by none
  • architect/design-reviews/setup-command.md is excluded by none and included by none
  • architect/stubs/DataAPIDesignSessionSupport/handoff-generator.ts is excluded by none and included by none
  • architect/stubs/DataAPIDesignSessionSupport/scope-validator.ts is excluded by none and included by none
  • architect/stubs/cli-recipe-codec/cli-recipe-generator.ts is excluded by none and included by none
  • architect/stubs/cli-recipe-codec/recipe-data.ts is excluded by none and included by none
  • architect/stubs/cli-recipe-codec/recipe-schema.ts is excluded by none and included by none
  • architect/stubs/data-api-architecture-queries/arch-queries.ts is excluded by none and included by none
  • architect/stubs/data-api-architecture-queries/coverage-analyzer.ts is excluded by none and included by none
  • architect/stubs/data-api-context-assembly/context-assembler.ts is excluded by none and included by none
  • architect/stubs/data-api-context-assembly/context-formatter.ts is excluded by none and included by none
  • architect/stubs/data-api-output-shaping/fuzzy-match.ts is excluded by none and included by none
  • architect/stubs/data-api-output-shaping/output-pipeline.ts is excluded by none and included by none
  • architect/stubs/data-api-output-shaping/summarize.ts is excluded by none and included by none
  • architect/stubs/data-api-stub-integration/stub-resolver.ts is excluded by none and included by none
  • architect/stubs/enhanced-index-generation/index-codec-options.ts is excluded by none and included by none
  • architect/stubs/enhanced-index-generation/index-codec.ts is excluded by none and included by none
  • architect/stubs/enhanced-index-generation/index-preamble-config.ts is excluded by none and included by none
  • architect/stubs/mcp-server-integration/file-watcher.ts is excluded by none and included by none
  • architect/stubs/mcp-server-integration/pipeline-session.ts is excluded by none and included by none
  • architect/stubs/mcp-server-integration/tool-registry.ts is excluded by none and included by none
  • architect/stubs/procedural-guide-codec/annotation-guide-preamble.ts is excluded by none and included by none
  • architect/stubs/procedural-guide-codec/procedural-codec.ts is excluded by none and included by none
  • docs-inbox/architectural-review-progressive-disclosure-and-codecs.md is excluded by none and included by none
  • docs-inbox/codebase-exploration-findings.md is excluded by none and included by none
  • docs-inbox/refactoring-execution-guide.md is excluded by none and included by none
  • docs-inbox/reimplementation-drift-analysis.md is excluded by none and included by none
  • docs-inbox/session-prompt-generator-architecture-review.md is excluded by none and included by none
  • docs-inbox/session-prompt-generator-brief.md is excluded by none and included by none
  • docs-inbox/session-prompt-generator-manual.md is excluded by none and included by none
  • docs-live/ARCHITECTURE.md is excluded by none and included by none
  • docs-live/CHANGELOG-GENERATED.md is excluded by none and included by none
  • docs-live/INDEX.md is excluded by none and included by none
  • docs-live/PRODUCT-AREAS.md is excluded by none and included by none
  • docs-live/_claude-md/annotation/annotation-reference.md is excluded by none and included by none
  • docs-live/_claude-md/architecture/architecture-types.md is excluded by none and included by none
  • docs-live/_claude-md/architecture/reference-sample.md is excluded by none and included by none
  • docs-live/_claude-md/core-types/core-types-overview.md is excluded by none and included by none
  • docs-live/_claude-md/data-api/data-api-overview.md is excluded by none and included by none
  • docs-live/_claude-md/generation/generation-overview.md is excluded by none and included by none
  • docs-live/_claude-md/process/process-overview.md is excluded by none and included by none
  • docs-live/business-rules/data-api.md is excluded by none and included by none
  • docs-live/business-rules/generation.md is excluded by none and included by none
  • docs-live/decisions/adr-003-source-first-pattern-architecture.md is excluded by none and included by none
  • docs-live/decisions/adr-005-codec-based-markdown-rendering.md is excluded by none and included by none
  • docs-live/decisions/adr-006-single-read-model-architecture.md is excluded by none and included by none
  • docs-live/product-areas/CONFIGURATION.md is excluded by none and included by none
  • docs-live/product-areas/CORE-TYPES.md is excluded by none and included by none
  • docs-live/product-areas/DATA-API.md is excluded by none and included by none
  • docs-live/product-areas/GENERATION.md is excluded by none and included by none
  • docs-live/product-areas/PROCESS.md is excluded by none and included by none
  • docs-live/product-areas/VALIDATION.md is excluded by none and included by none
  • docs-live/reference/ANNOTATION-REFERENCE.md is excluded by none and included by none
  • docs-live/reference/ARCHITECTURE-CODECS.md is excluded by none and included by none
  • docs-live/reference/ARCHITECTURE-TYPES.md is excluded by none and included by none
  • docs-live/reference/CLI-RECIPES.md is excluded by none and included by none
  • docs-live/reference/CLI-REFERENCE.md is excluded by none and included by none
  • docs-live/reference/REFERENCE-SAMPLE.md is excluded by none and included by none
  • docs-live/reference/SESSION-WORKFLOW-GUIDE.md is excluded by none and included by none
  • package.json is excluded by none and included by none
📒 Files selected for processing (225)
  • CLAUDE.md
  • README.md
  • architect/decisions/adr-003-source-first-pattern-architecture.feature
  • architect/decisions/adr-005-codec-based-markdown-rendering.feature
  • architect/decisions/adr-006-single-read-model-architecture.feature
  • architect/decisions/pdr-001-session-workflow-commands.feature
  • architect/ideations/2026-02-16-process-api-layered-extraction-findings.feature
  • architect/specs/architecture-diagram-core.feature
  • architect/specs/architecture-doc-refactoring.feature
  • architect/specs/cli-recipe-codec.feature
  • architect/specs/cli-reference-generation.feature
  • architect/specs/codec-behavior-testing.feature
  • architect/specs/codec-driven-reference-generation.feature
  • architect/specs/config-based-workflow-definition.feature
  • architect/specs/cross-cutting-document-inclusion.feature
  • architect/specs/data-api-architecture-queries.feature
  • architect/specs/data-api-cli-ergonomics.feature
  • architect/specs/data-api-context-assembly.feature
  • architect/specs/data-api-output-shaping.feature
  • architect/specs/data-api-platform-integration.feature
  • architect/specs/data-api-relationship-graph.feature
  • architect/specs/data-api-session-support.feature
  • architect/specs/data-api-stub-integration.feature
  • architect/specs/declaration-level-shape-tagging.feature
  • architect/specs/design-review-generation.feature
  • architect/specs/docs-consolidation-strategy.feature
  • architect/specs/enhanced-index-generation.feature
  • architect/specs/generated-doc-quality.feature
  • architect/specs/generator-infrastructure-testing.feature
  • architect/specs/mcp-server-integration.feature
  • architect/specs/monorepo-support.feature
  • architect/specs/orchestrator-pipeline-factory-migration.feature
  • architect/specs/pattern-graph-api-cli.feature
  • architect/specs/pattern-graph-api-relationship-queries.feature
  • architect/specs/pattern-graph-layered-extraction.feature
  • architect/specs/pattern-relationship-model.feature
  • architect/specs/phase-state-machine.feature
  • architect/specs/procedural-guide-codec.feature
  • architect/specs/readme-rationalization.feature
  • architect/specs/reference-doc-showcase.feature
  • architect/specs/session-guides-module-source.feature
  • architect/specs/setup-command.feature
  • architect/specs/step-definition-completion.feature
  • architect/specs/traceability-generator.feature
  • architect/specs/validator-read-model-consolidation.feature
  • docs-sources/annotation-guide.md
  • docs-sources/cli-recipes.md
  • docs-sources/index-navigation.md
  • docs/ANNOTATION-GUIDE.md
  • docs/ARCHITECTURE.md
  • docs/CLI.md
  • docs/CONFIGURATION.md
  • docs/DOCS-GAP-ANALYSIS.md
  • docs/INDEX.md
  • docs/MCP-SETUP.md
  • docs/METHODOLOGY.md
  • docs/SESSION-GUIDES.md
  • docs/VALIDATION.md
  • src/api/arch-queries.ts
  • src/api/context-assembler.ts
  • src/api/context-formatter.ts
  • src/api/coverage-analyzer.ts
  • src/api/fuzzy-match.ts
  • src/api/handoff-generator.ts
  • src/api/index.ts
  • src/api/pattern-graph-api.ts
  • src/api/pattern-helpers.ts
  • src/api/rules-query.ts
  • src/api/scope-validator.ts
  • src/api/stub-resolver.ts
  • src/api/summarize.ts
  • src/api/types.ts
  • src/cli/cli-schema.ts
  • src/cli/dataset-cache.ts
  • src/cli/output-pipeline.ts
  • src/cli/pattern-graph-cli.ts
  • src/cli/repl.ts
  • src/cli/validate-patterns.ts
  • src/generators/built-in/cli-recipe-generator.ts
  • src/generators/built-in/cli-reference-generator.ts
  • src/generators/built-in/codec-generators.ts
  • src/generators/built-in/design-review-generator.ts
  • src/generators/built-in/index.ts
  • src/generators/built-in/reference-generators.ts
  • src/generators/codec-based.ts
  • src/generators/index.ts
  • src/generators/orchestrator.ts
  • src/generators/pipeline/build-pipeline.ts
  • src/generators/pipeline/index.ts
  • src/generators/pipeline/relationship-resolver.ts
  • src/generators/pipeline/sequence-utils.ts
  • src/generators/pipeline/transform-dataset.ts
  • src/generators/pipeline/transform-types.ts
  • src/generators/types.ts
  • src/index.ts
  • src/mcp/file-watcher.ts
  • src/mcp/pipeline-session.ts
  • src/mcp/tool-registry.ts
  • src/renderable/codecs/adr.ts
  • src/renderable/codecs/architecture.ts
  • src/renderable/codecs/business-rules.ts
  • src/renderable/codecs/claude-module.ts
  • src/renderable/codecs/composite.ts
  • src/renderable/codecs/convention-extractor.ts
  • src/renderable/codecs/design-review.ts
  • src/renderable/codecs/index-codec.ts
  • src/renderable/codecs/index.ts
  • src/renderable/codecs/patterns.ts
  • src/renderable/codecs/planning.ts
  • src/renderable/codecs/pr-changes.ts
  • src/renderable/codecs/product-area-metadata.ts
  • src/renderable/codecs/reference-builders.ts
  • src/renderable/codecs/reference-diagrams.ts
  • src/renderable/codecs/reference-types.ts
  • src/renderable/codecs/reference.ts
  • src/renderable/codecs/reporting.ts
  • src/renderable/codecs/requirements.ts
  • src/renderable/codecs/session.ts
  • src/renderable/codecs/shape-matcher.ts
  • src/renderable/codecs/taxonomy.ts
  • src/renderable/codecs/timeline.ts
  • src/renderable/codecs/types/base.ts
  • src/renderable/codecs/validation-rules.ts
  • src/renderable/generate.ts
  • src/renderable/index.ts
  • src/renderable/schema.ts
  • src/validation-schemas/index.ts
  • src/validation-schemas/pattern-graph.ts
  • tests/features/api/context-assembly/context-assembler.feature
  • tests/features/api/pattern-graph-api.feature
  • tests/features/api/session-support/handoff-generator.feature
  • tests/features/api/stub-integration/stub-resolver.feature
  • tests/features/behavior/architecture-diagrams/arch-index.feature
  • tests/features/behavior/cli/cli-reference.feature
  • tests/features/behavior/codecs/convention-extractor.feature
  • tests/features/behavior/codecs/generated-doc-quality.feature
  • tests/features/behavior/codecs/planning-codecs.feature
  • tests/features/behavior/codecs/pr-changes-codec-options.feature
  • tests/features/behavior/codecs/pr-changes-codec-rendering.feature
  • tests/features/behavior/codecs/reference-codec-core.feature
  • tests/features/behavior/codecs/reference-codec-detail-rendering.feature
  • tests/features/behavior/codecs/reference-codec-diagram-types.feature
  • tests/features/behavior/codecs/reference-codec-diagrams.feature
  • tests/features/behavior/codecs/reference-generators.feature
  • tests/features/behavior/codecs/reporting-codecs.feature
  • tests/features/behavior/codecs/requirements-adr-codecs.feature
  • tests/features/behavior/codecs/session-codecs.feature
  • tests/features/behavior/codecs/shape-matcher.feature
  • tests/features/behavior/codecs/shape-selector.feature
  • tests/features/behavior/codecs/timeline-codecs.feature
  • tests/features/behavior/context-inference.feature
  • tests/features/behavior/patterns-codec.feature
  • tests/features/behavior/transform-dataset.feature
  • tests/features/cli/data-api-cache.feature
  • tests/features/cli/data-api-dryrun.feature
  • tests/features/cli/data-api-help.feature
  • tests/features/cli/data-api-metadata.feature
  • tests/features/cli/data-api-repl.feature
  • tests/features/cli/pattern-graph-cli-core.feature
  • tests/features/cli/pattern-graph-cli-modifiers-rules.feature
  • tests/features/cli/pattern-graph-cli-subcommands.feature
  • tests/features/doc-generation/architecture-doc-refactoring.feature
  • tests/features/doc-generation/index-codec.feature
  • tests/features/doc-generation/taxonomy-codec.feature
  • tests/features/doc-generation/validation-rules-codec.feature
  • tests/features/generation/design-review.feature
  • tests/features/generators/business-rules-codec.feature
  • tests/features/generators/codec-based.feature
  • tests/features/mcp/mcp-server.feature
  • tests/fixtures/dataset-factories.ts
  • tests/steps/api/architecture-queries/arch-queries.steps.ts
  • tests/steps/api/context-assembly/context-assembler.steps.ts
  • tests/steps/api/output-shaping/output-pipeline.steps.ts
  • tests/steps/api/output-shaping/pattern-helpers.steps.ts
  • tests/steps/api/pattern-graph-api.steps.ts
  • tests/steps/api/session-support/handoff-generator.steps.ts
  • tests/steps/api/session-support/scope-validator.steps.ts
  • tests/steps/api/stub-integration/stub-resolver.steps.ts
  • tests/steps/architecture/arch-index.steps.ts
  • tests/steps/architecture/component-diagram.steps.ts
  • tests/steps/architecture/generator-registration.steps.ts
  • tests/steps/architecture/layered-diagram.steps.ts
  • tests/steps/behavior/cli/cli-reference.steps.ts
  • tests/steps/behavior/codecs/composite-codec.steps.ts
  • tests/steps/behavior/codecs/convention-extractor.steps.ts
  • tests/steps/behavior/codecs/generated-doc-quality.steps.ts
  • tests/steps/behavior/codecs/planning-codecs.steps.ts
  • tests/steps/behavior/codecs/pr-changes-codec-options.steps.ts
  • tests/steps/behavior/codecs/pr-changes-codec-rendering.steps.ts
  • tests/steps/behavior/codecs/reference-codec-core.steps.ts
  • tests/steps/behavior/codecs/reference-codec-detail-rendering.steps.ts
  • tests/steps/behavior/codecs/reference-codec-diagram-types.steps.ts
  • tests/steps/behavior/codecs/reference-codec-diagrams.steps.ts
  • tests/steps/behavior/codecs/reference-generators.steps.ts
  • tests/steps/behavior/codecs/reporting-codecs.steps.ts
  • tests/steps/behavior/codecs/requirements-adr-codecs.steps.ts
  • tests/steps/behavior/codecs/session-codecs.steps.ts
  • tests/steps/behavior/codecs/shape-matcher.steps.ts
  • tests/steps/behavior/codecs/shape-selector.steps.ts
  • tests/steps/behavior/codecs/timeline-codecs.steps.ts
  • tests/steps/behavior/context-inference.steps.ts
  • tests/steps/behavior/description-headers.steps.ts
  • tests/steps/behavior/description-quality-foundation.steps.ts
  • tests/steps/behavior/implementation-links.steps.ts
  • tests/steps/behavior/pattern-relationships/depends-on-tag.steps.ts
  • tests/steps/behavior/pattern-relationships/extends-tag.steps.ts
  • tests/steps/behavior/pattern-relationships/implements-tag.steps.ts
  • tests/steps/behavior/pattern-relationships/mermaid-rendering.steps.ts
  • tests/steps/behavior/pattern-relationships/uses-tag.steps.ts
  • tests/steps/behavior/patterns-codec.steps.ts
  • tests/steps/behavior/pr-changes-generation.steps.ts
  • tests/steps/behavior/remaining-work-enhancement.steps.ts
  • tests/steps/behavior/remaining-work-totals.steps.ts
  • tests/steps/behavior/session-handoffs.steps.ts
  • tests/steps/behavior/transform-dataset.steps.ts
  • tests/steps/cli/data-api-cache.steps.ts
  • tests/steps/cli/data-api-dryrun.steps.ts
  • tests/steps/cli/data-api-help.steps.ts
  • tests/steps/cli/data-api-metadata.steps.ts
  • tests/steps/cli/data-api-repl.steps.ts
  • tests/steps/cli/pattern-graph-cli-core.steps.ts
  • tests/steps/cli/pattern-graph-cli-modifiers-rules.steps.ts
  • tests/steps/cli/pattern-graph-cli-subcommands.steps.ts
  • tests/steps/doc-generation/architecture-doc-refactoring.steps.ts
  • tests/steps/doc-generation/index-codec.steps.ts

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/master-dataset-to-pattern-graph

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@darko-mijic
Copy link
Copy Markdown
Contributor Author

@coderabbitai, how many files are not configured in your config to ignore?

This PR contains 225 files, which is 75 over the limit of 150.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 2, 2026

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Get the CodeRabbit config
cat .coderabbit.yaml

echo "---"

# Get the list of files changed in the PR
gh pr view 42 --repo libar-dev/architect --json files --jq '.files[].path' | sort

Length of output: 4916


🏁 Script executed:

#!/bin/bash
# Get total file count in the PR
TOTAL=$(gh pr view 42 --repo libar-dev/architect --json files --jq '.files | length')
echo "Total files in PR: $TOTAL"

echo "---"

# Get .coderabbit.yaml content from the PR branch via GitHub API
gh api repos/libar-dev/architect/contents/.coderabbit.yaml \
  --jq '.content' | base64 -d

echo "---"

# List all files in the PR
gh pr view 42 --repo libar-dev/architect --json files --jq '[.files[].path] | sort[]'

Length of output: 9633


🏁 Script executed:

#!/bin/bash
# Use Python to paginate all PR files and apply path_filter logic
python3 << 'EOF'
import subprocess
import json
import fnmatch

# Get all PR files via pagination
all_files = []
page = 1
while True:
    result = subprocess.run(
        ['gh', 'api', f'repos/libar-dev/architect/pulls/42/files?per_page=100&page={page}'],
        capture_output=True, text=True
    )
    files = json.loads(result.stdout)
    if not files:
        break
    all_files.extend(f['filename'] for f in files)
    if len(files) < 100:
        break
    page += 1

print(f"Total PR files: {len(all_files)}")

# CodeRabbit path_filters from .coderabbit.yaml
include_patterns = [
    'README.md',
    'CLAUDE.md',
    'docs-sources/**',
    'src/**',
    'tests/**',
    'docs/**',
    '.github/**',
    'architect/**/*.feature',
]

exclude_patterns = [
    'dist/**',
    'node_modules/**',
    '*.tsbuildinfo',
    'pnpm-lock.yaml',
    'docs-generated/**',
    'catalogue/artefact-sets/**',
]

def matches_pattern(path, pattern):
    # Handle ** glob patterns
    if '**' in pattern:
        # Simple approach: split and check prefix/suffix
        parts = pattern.split('**')
        if len(parts) == 2:
            prefix, suffix = parts
            if prefix and not path.startswith(prefix):
                return False
            if suffix and not path.endswith(suffix.lstrip('/')):
                return False
            return True
    return fnmatch.fnmatch(path, pattern)

def is_included(path):
    # Check exclusions first
    for pat in exclude_patterns:
        if matches_pattern(path, pat):
            return False
    # If any include pattern matches, include it
    for pat in include_patterns:
        if matches_pattern(path, pat):
            return True
    # No include pattern matched → excluded
    return False

included = [f for f in all_files if is_included(f)]
excluded = [f for f in all_files if not is_included(f)]

print(f"Files matched by include patterns (would be reviewed): {len(included)}")
print(f"Files NOT matched (excluded from review): {len(excluded)}")
print()
print("=== INCLUDED files ===")
for f in sorted(included):
    print(f"  {f}")
print()
print("=== EXCLUDED files (not covered by path_filters) ===")
for f in sorted(excluded):
    print(f"  {f}")
EOF

Length of output: 15165


🏁 Script executed:

#!/bin/bash
python3 << 'EOF'
import subprocess, json, fnmatch, re

# Get all PR files via pagination
all_files = []
page = 1
while True:
    result = subprocess.run(
        ['gh', 'api', f'repos/libar-dev/architect/pulls/42/files?per_page=100&page={page}'],
        capture_output=True, text=True
    )
    files = json.loads(result.stdout)
    if not files:
        break
    all_files.extend(f['filename'] for f in files)
    if len(files) < 100:
        break
    page += 1

print(f"Total PR files: {len(all_files)}")

def glob_match(path, pattern):
    """Match path against a glob pattern supporting **"""
    # Convert glob pattern to regex
    # Escape everything, then convert * and ** back
    regex = ''
    i = 0
    while i < len(pattern):
        if pattern[i:i+2] == '**':
            regex += '.*'
            i += 2
            if i < len(pattern) and pattern[i] == '/':
                i += 1  # skip slash after **
        elif pattern[i] == '*':
            regex += '[^/]*'
            i += 1
        elif pattern[i] == '?':
            regex += '[^/]'
            i += 1
        else:
            regex += re.escape(pattern[i])
            i += 1
    return re.fullmatch(regex, path) is not None

include_patterns = [
    'README.md',
    'CLAUDE.md',
    'docs-sources/**',
    'src/**',
    'tests/**',
    'docs/**',
    '.github/**',
    'architect/**/*.feature',
]

exclude_patterns = [
    'dist/**',
    'node_modules/**',
    '*.tsbuildinfo',
    'pnpm-lock.yaml',
    'docs-generated/**',
    'catalogue/artefact-sets/**',
]

def is_included(path):
    for pat in exclude_patterns:
        if glob_match(path, pat):
            return False
    for pat in include_patterns:
        if glob_match(path, pat):
            return True
    return False

included = [f for f in all_files if is_included(f)]
excluded = [f for f in all_files if not is_included(f)]

print(f"Files included for review (matched by path_filters): {len(included)}")
print(f"Files excluded from review (not matched): {len(excluded)}")

# Break down excluded by category
cats = {}
for f in excluded:
    top = f.split('/')[0] if '/' in f else '(root)'
    cats[top] = cats.get(top, 0) + 1
print("\nExcluded files by top-level directory:")
for k, v in sorted(cats.items(), key=lambda x: -x[1]):
    print(f"  {k}: {v}")

print("\n=== EXCLUDED FILES ===")
for f in sorted(excluded):
    print(f"  {f}")
EOF

Length of output: 3822


@darko-mijic Here's the full picture from the current .coderabbit.yaml path_filters, analysed against all 315 files in the PR:

Count
Total files in PR 315
Excluded by path_filters 75
Not excluded (eligible for review) 240

So 240 files are not configured to be ignored — which is 90 over the 150-file limit (CodeRabbit's "225" figure likely reflects a slightly earlier commit state before the 55562f4 post-review fixes landed).

The 75 currently-excluded files break down as:

Directory Excluded files
docs-live/** 29
architect/stubs/** + architect/design-reviews/** 23
_claude-md/** 11
docs-inbox/** 7
Root (AGENTS.md, CHANGELOG.md, .coderabbit.yaml, architect.config.ts, package.json) 5

To get under 150, you'd need to push at least 90 more files into the excluded set. The biggest levers among the currently-included 240:

  • architect/**/*.feature (43 files — specs, decisions, ideations) — adding '!architect/**' or narrowing the include would cut these
  • docs/** (10 files) — removing the docs/** include pattern
  • docs-sources/** (3 files) + README.md + CLAUDE.md (2 files)

That's 58 files — still ~32 short. You'd also need to trim some tests/** or src/** subdirectories to fully land under 150.

Would you like me to draft an updated path_filters config that brings the reviewable file count under 150?


🧠 Learnings used
Learnt from: darko-mijic
Repo: libar-dev/architect PR: 40
File: tests/features/doc-generation/index-codec.feature:1-6
Timestamp: 2026-04-01T14:42:18.034Z
Learning: The `libar-docs-*` tag prefix (e.g., `libar-docs`, `libar-docs-team`, `libar-docs-quarter`, `libar-docs-depends-on`, `libar-docs-unlock-reason`) does not exist in the libar-dev/architect codebase. It was renamed to `architect-*` during a rebrand. Feature files and TypeScript source files use `architect-pattern`, `architect-status`, `architect-product-area`, `architect-unlock-reason`, etc. Flagging missing `libar-docs-*` tags is always incorrect for this repository.

@darko-mijic
Copy link
Copy Markdown
Contributor Author

Tip

For best results, initiate chat on the files or code changes.
🧩 Analysis chain
@darko-mijic Here's the full picture from the current .coderabbit.yaml path_filters, analysed against all 315 files in the PR:

Count
Total files in PR 315
Excluded by path_filters 75
Not excluded (eligible for review) 240
So 240 files are not configured to be ignored — which is 90 over the 150-file limit (CodeRabbit's "225" figure likely reflects a slightly earlier commit state before the 55562f4 post-review fixes landed).

The 75 currently-excluded files break down as:

Directory Excluded files
docs-live/** 29
architect/stubs/** + architect/design-reviews/** 23
_claude-md/** 11
docs-inbox/** 7
Root (AGENTS.md, CHANGELOG.md, .coderabbit.yaml, architect.config.ts, package.json) 5
To get under 150, you'd need to push at least 90 more files into the excluded set. The biggest levers among the currently-included 240:

  • architect/**/*.feature (43 files — specs, decisions, ideations) — adding '!architect/**' or narrowing the include would cut these
  • docs/** (10 files) — removing the docs/** include pattern
  • docs-sources/** (3 files) + README.md + CLAUDE.md (2 files)

That's 58 files — still ~32 short. You'd also need to trim some tests/** or src/** subdirectories to fully land under 150.

Would you like me to draft an updated path_filters config that brings the reviewable file count under 150?

🧠 Learnings used


Do you have the same limis for OSS compared to paid accounts? We have a paid account which is almost unused. Would we get PRs reviewed if we used paid account on this repo? Give that almost all PR reviews are skipped with your OSS offering we will disable CoedrabbitAI reviews because we are not getting any value... just skipped reviews.

@darko-mijic darko-mijic merged commit cd30304 into main Apr 2, 2026
7 checks passed
@darko-mijic darko-mijic deleted the refactor/master-dataset-to-pattern-graph branch April 2, 2026 02:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant