feat: Add CQRS semantic anchor#137
Conversation
Adds CQRS as a standalone semantic anchor covering Greg Young's architectural pattern for separating read and write models. Distinct from Event Sourcing (optional complement) and GoF Command Pattern (OO encapsulation, not architectural segregation).
WalkthroughDer Pull Request ergänzt die Dokumentation um ein neues CQRS-Anker (Command Query Responsibility Segregation). Dazu wird eine neue Dokumentationsdatei hinzugefügt, die Referenz in die Anker-Übersicht aufgenommen und ein Katalognintrag für die Semantic Anchor Translator erstellt. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/anchors/cqrs.adoc`:
- Around line 46-48: Die internen AsciiDoc-Links
`<<domain-driven-design,Domain-Driven Design>>`,
`<<hexagonal-architecture,Hexagonal Architecture>>` und
`<<fowler-patterns,Fowler Patterns>>` verweisen auf Anchor-IDs, die offenbar in
den Zieldateien fehlen; fix das, indem du entweder in den jeweiligen Ziel-Docs
die entsprechenden Anchors `[[domain-driven-design]]`,
`[[hexagonal-architecture]]` und `[[fowler-patterns]]` direkt vor den
zugehörigen Abschnittsüberschriften einfügst, oder passe die Links hier an die
tatsächlich vorhandenen Anchor-IDs in den Zieldateien an so dass
`<<anchor-id,Link Text>>` auf existierende `[[anchor-id]]` verweist.
- Around line 2-3: Die Metadaten in docs/anchors/cqrs.adoc verwenden nicht die
vorgegebenen Kanon-Werte: ersetze die aktuellen Slug-Werte in den Attributen
:categories: und :roles: durch die erlaubten, komma-separierten Kanon-Namen aus
dem Projektstandard (verwende genau eine oder mehrere der 10 definierten
Kategorien im :categories:-Feld und eine oder mehrere der 12 definierten Rollen
im :roles:-Feld), prüfe und korrigiere die Schreibweise/Groß-/Kleinschreibung so
sie exakt mit den definierten Werten übereinstimmt und behalte die vorhandene
Attribut-Syntax unverändert (z. B. aktualisiere die Zeilen mit :categories: und
:roles: im Header von cqrs.adoc).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yml
Review profile: CHILL
Plan: Pro
Run ID: 99c2147c-63bb-4bcc-865a-4015d07453ab
📒 Files selected for processing (3)
docs/all-anchors.adocdocs/anchors/cqrs.adocskill/semantic-anchor-translator/references/catalog.md
| :categories: software-architecture | ||
| :roles: software-architect, software-developer |
There was a problem hiding this comment.
Metadaten bitte auf die erlaubten Kanon-Werte umstellen.
:categories: und :roles: verwenden hier Slugs statt der im Repo vorgegebenen Bezeichnungen. Damit fällt der Anchor aus dem einheitlichen Metadaten-Schema.
Vorgeschlagene Anpassung
-:categories: software-architecture
-:roles: software-architect, software-developer
+:categories: Architecture & Design
+:roles: Software Architect, Software Developer/EngineerAs per coding guidelines, docs/anchors/*.adoc: Use categories (comma-separated in :categories: attribute) from the 10 defined categories … and use roles (comma-separated in :roles: attribute) from the 12 defined professional roles.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| :categories: software-architecture | |
| :roles: software-architect, software-developer | |
| :categories: Architecture & Design | |
| :roles: Software Architect, Software Developer/Engineer |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/anchors/cqrs.adoc` around lines 2 - 3, Die Metadaten in
docs/anchors/cqrs.adoc verwenden nicht die vorgegebenen Kanon-Werte: ersetze die
aktuellen Slug-Werte in den Attributen :categories: und :roles: durch die
erlaubten, komma-separierten Kanon-Namen aus dem Projektstandard (verwende genau
eine oder mehrere der 10 definierten Kategorien im :categories:-Feld und eine
oder mehrere der 12 definierten Rollen im :roles:-Feld), prüfe und korrigiere
die Schreibweise/Groß-/Kleinschreibung so sie exakt mit den definierten Werten
übereinstimmt und behalte die vorhandene Attribut-Syntax unverändert (z. B.
aktualisiere die Zeilen mit :categories: und :roles: im Header von cqrs.adoc).
| * <<domain-driven-design,Domain-Driven Design>> - Often combined with CQRS for complex domains | ||
| * <<hexagonal-architecture,Hexagonal Architecture>> - Ports and adapters complement CQRS separation | ||
| * <<fowler-patterns,Fowler Patterns>> - CQRS builds on enterprise application patterns |
There was a problem hiding this comment.
Die Related-Links zeigen auf vermutlich nicht existente Anchor-IDs.
<<domain-driven-design,...>>, <<hexagonal-architecture,...>> und <<fowler-patterns,...>> referenzieren IDs, die in den verknüpften Dateien laut den bereitgestellten Snippets nicht explizit definiert sind. So brechen die internen Links leicht. Entweder die Ziel-Dateien mit [[...]]-IDs versehen oder hier auf die tatsächlich vorhandenen IDs verlinken.
As per coding guidelines, **/*.adoc: Create internal links in AsciiDoc using anchor IDs with [[anchor-id]] before section headers and links using <<anchor-id,Link Text>> syntax.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/anchors/cqrs.adoc` around lines 46 - 48, Die internen AsciiDoc-Links
`<<domain-driven-design,Domain-Driven Design>>`,
`<<hexagonal-architecture,Hexagonal Architecture>>` und
`<<fowler-patterns,Fowler Patterns>>` verweisen auf Anchor-IDs, die offenbar in
den Zieldateien fehlen; fix das, indem du entweder in den jeweiligen Ziel-Docs
die entsprechenden Anchors `[[domain-driven-design]]`,
`[[hexagonal-architecture]]` und `[[fowler-patterns]]` direkt vor den
zugehörigen Abschnittsüberschriften einfügst, oder passe die Links hier an die
tatsächlich vorhandenen Anchor-IDs in den Zieldateien an so dass
`<<anchor-id,Link Text>>` auf existierende `[[anchor-id]]` verweist.
|
Regarding the two CodeRabbit findings: 1. "Use canon category/role names instead of slugs" — Not a valid finding. All existing anchor files in this repo use slug format (e.g. 2. "Related links point to non-existent anchor IDs" — Not a valid finding. The exact same |
|
Review: ✅ Good anchor, merge-ready. CQRS is a well-defined, attributable term (Greg Young) that activates rich context in LLMs. Structure follows our template correctly, content is solid. Post-merge TODO:
Merging now, translation will be added in a follow-up batch (see #149). |
LLM-Coding#138, LLM-Coding#139) Content from @Nantero1's original PRs LLM-Coding#138 and LLM-Coding#139, rebased on current main after merging LLM-Coding#137, LLM-Coding#140, LLM-Coding#142, LLM-Coding#143. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
Why this anchor?
CQRS activates a rich set of concepts: immutable commands, separate read/write models, commands return void, queries return data with no side effects, eventual consistency, independent scalability. Attributable to Greg Young, Bertrand Meyer (CQS origin), and Udi Dahan.
Distinct from: Event Sourcing (CQRS doesn't require it), GoF Command Pattern (OO encapsulation, not architectural segregation), Fowler Patterns (enterprise app architecture).
Files changed
docs/anchors/cqrs.adoc— new anchor filedocs/all-anchors.adoc— added include in Software Architecture sectionskill/semantic-anchor-translator/references/catalog.md— added catalog entrySummary by CodeRabbit
Release Notes