refactor: Ubiquitous Language — MasterDataset → PatternGraph, ProcessStateAPI → PatternGraphAPI#42
Conversation
…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
|
Important Review skippedToo many files! This PR contains 225 files, which is 75 over the limit of 150. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: ⛔ Files ignored due to path filters (75)
📒 Files selected for processing (225)
You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
@coderabbitai, how many files are not configured in your config to ignore?
|
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: Length of output: 4916 🏁 Script executed: Length of output: 9633 🏁 Script executed: Length of output: 15165 🏁 Script executed: Length of output: 3822
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 The 75 currently-excluded files break down as:
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:
That's 58 files — still ~32 short. You'd also need to trim some Would you like me to draft an updated 🧠 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. |
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
MasterDatasetfor its core data structure andProcessStateAPIfor 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:
MasterDatasetPatternGraphMasterDatasetSchemaPatternGraphSchemaRuntimeMasterDatasetRuntimePatternGraphbuildMasterDataset()buildPatternGraph()transformToMasterDataset()transformToPatternGraph()GeneratorContext.masterDatasetGeneratorContext.patternGraphAPI layer rename:
ProcessStateAPIPatternGraphAPIcreateProcessStateAPI()createPatternGraphAPI()ProcessAPICLIImplPatternGraphCLIImplProcessApiReferenceGeneratorCliReferenceGeneratorFile renames (21 total):
Source files:
validation-schemas/master-dataset.ts→pattern-graph.tsapi/process-state.ts→pattern-graph-api.tscli/process-api.ts→pattern-graph-cli.tsgenerators/built-in/process-api-reference-generator.ts→cli-reference-generator.tsSpec and test files:
process-state-api-*.feature→pattern-graph-api-*.featureprocess-api-*.feature→pattern-graph-cli-*.featureDocumentation:
docs/PROCESS-API.md→docs/CLI.mdPROCESS-API-REFERENCE.md→CLI-REFERENCE.mdPROCESS-API-RECIPES.md→CLI-RECIPES.mdScope
What Did NOT Change
architect_*)architect)@architect-*)@libar-dev/architect)architect.config.tsformatProcessState(lint module)DeriveProcessState(lint module)Breaking Changes
All consumer repos need updating. The public API exports changed:
PatternGraphAPI(wasProcessStateAPI)createPatternGraphAPI()(wascreateProcessStateAPI())PatternGraph(wasMasterDataset)buildPatternGraph()(wasbuildMasterDataset())pattern-graph.js(wasmaster-dataset.js),pattern-graph-api.js(wasprocess-state.js)No backward-compatibility aliases. No deprecation period.
Design Decisions
"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").
Single atomic commit per rename wave — No intermediate states with mixed vocabulary.
git blamecost is acceptable for a mechanical rename.CliReferenceGeneratoroverPatternGraphReferenceGenerator— The generator produces CLI documentation, not pattern graph documentation. The name describes what it generates.ProcessStatekept in lint module —ProcessStateinsrc/lint/process-guard/represents the actual delivery process state (files, sessions, FSM). This is a different concept from thePatternGraphAPIquery 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.tslinked generated output to deprecateddocs/PROCESS-API.md— fixed to link toCLI-RECIPES.mdcli-schema.tscomments referenced old file path — updateddocs/PROCESS-API.md→docs/CLI.mdand updated 60+ references across specs, stubs, and docs.coderabbit.yamlto exclude all.mdfiles from review (reduces reviewable file count below CodeRabbit's 150-file limit)Test Plan
pnpm build— zero TypeScript compilation errorspnpm typecheck— all type references resolvepnpm lint— no unused imports or naming violationspnpm 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