Skip to content

Enhance documentation#109

Merged
foxminchan merged 1 commit into
mainfrom
docs/enhance-docs
Aug 16, 2025
Merged

Enhance documentation#109
foxminchan merged 1 commit into
mainfrom
docs/enhance-docs

Conversation

@foxminchan

@foxminchan foxminchan commented Aug 13, 2025

Copy link
Copy Markdown
Owner

Pull Request Description

  • Created introductory documentation for Docusaurus.
  • Added tutorial sections for creating documents, blog posts, and pages.
  • Implemented versioning and localization features in the documentation.
  • Configured Docusaurus with a custom theme and sidebar structure.
  • Included CSS styles for homepage and components.
  • Added logo and favicon for branding.
  • Updated RequestManager class to change access modifier for IdempotencySerializationContext.

Checklist

  • My code follows the DDD principles
  • I've used the latest C# features and idioms
  • I've added/updated unit tests for business logic
  • Service boundaries are maintained (no cross-service direct dependencies)
  • Repository pattern is used for data access
  • Domain Events are used for cross-service communication
  • I've registered new services in AppHost project (if applicable)
  • I've updated both entities and DTOs (if applicable)

Summary by CodeRabbit

  • New Features

    • Introduced a Docusaurus-powered documentation site with themed homepage, navigation, blog, authors/tags, and image optimization.
    • Added an OpenAPI spec for the MCP Tools Server.
  • Documentation

    • Major expansion: architecture (intro, constraints, context, strategy), building blocks, runtime, deployment, cross‑cutting (API, security, observability, etc.), ADRs (001–021), quality requirements, risks/debts, glossary.
    • New blog posts (K6 performance, Keycloak); updated EventCatalog links.
  • Chores

    • CI migrated to build Docusaurus; developer commands renamed to update-docusaurus.
    • Updated test dependencies; removed VuePress configuration; adjusted README links; added docs .gitignore.

@foxminchan foxminchan self-assigned this Aug 13, 2025
@netlify

netlify Bot commented Aug 13, 2025

Copy link
Copy Markdown

Deploy Preview for bookwormdev ready!

Name Link
🔨 Latest commit b96459f
🔍 Latest deploy log https://app.netlify.com/projects/bookwormdev/deploys/68a0aeaeee6f6c0008f46c08
😎 Deploy Preview https://deploy-preview-109--bookwormdev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 95
Accessibility: 94
Best Practices: 100
SEO: 100
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Aug 13, 2025

Copy link
Copy Markdown

Walkthrough

Migrates documentation from VuePress to Docusaurus. Adds a full Docusaurus site (config, package.json, components, pages), extensive architecture docs/blog content, updates CI workflow and Justfile paths/commands to use Docusaurus, adjusts README links, bumps testing packages, updates EventCatalog links and adds an OpenAPI spec, and removes VuePress files.

Changes

Cohort / File(s) Summary
• CI & Automation
.github/workflows/docs.yaml, .justfile
Workflow and Justfile retargeted from docs/vuepress to docs/docusaurus; install/build/upload paths updated; recipes renamed (update-vuepress -> update-docusaurus); bun update command adjusted.
• Testing Packages
Directory.Packages.props
Updated Testing deps: TUnit 0.55.6 -> 0.56.5; Verify.TUnit 30.6.1 -> 30.7.2.
• Root Docs Mentions
README.md
Removed two external doc links (Keycloak, k6) from bullets.
• Docusaurus Scaffold & Config
docs/docusaurus/package.json, docs/docusaurus/docusaurus.config.ts, docs/docusaurus/sidebars.ts, docs/docusaurus/tsconfig.json, docs/docusaurus/.gitignore, docs/docusaurus/README.md, docs/docusaurus/src/...
Introduced Docusaurus v3 project with config, sidebar, TypeScript setup, homepage component/styles, global CSS, and index page.
• Docusaurus Blog
docs/docusaurus/blog/*, docs/docusaurus/blog/authors.yml, docs/docusaurus/blog/tags.yml
Added blog posts (k6 suite, Keycloak), authors, and tags; content and media references updated to Docusaurus/MDX patterns.
• Docusaurus Docs Content (Architecture)
docs/docusaurus/docs/...
Added comprehensive architecture documentation: Introduction & Goals, Architecture Constraints, Context & Scope, Solution Strategy, Building Block View, Runtime View, Deployment View, Cross-Cutting Concepts, Architecture Decisions (ADRs 001–021), Quality Requirements, Risks & Technical Debts, Glossary, Intro; category JSONs included.
• EventCatalog Updates
docs/eventcatalog/domains/..., docs/eventcatalog/openapi-files/mcp-tools-server.yaml
Updated internal links from architecture/adr/... to architecture-decisions/...; added OpenAPI spec for MCP Tools Server; minor content tweaks.
• VuePress Removal
docs/vuepress/*
Removed VuePress package, configuration, navbar/sidebar, styles, and ignores.

Sequence Diagram(s)

sequenceDiagram
  participant Dev as Developer
  participant GH as GitHub Actions
  participant Dcs as Docusaurus (docs/docusaurus)
  participant Art as Artifact Store

  Dev->>GH: Push/PR (docs paths)
  GH->>Dcs: bun install (docs/docusaurus)
  GH->>Dcs: bun run build
  Dcs-->>GH: build output (docs/docusaurus/build)
  GH->>Art: Upload artifact
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~30 minutes

Possibly related PRs

Suggested labels

.NET

Poem

Docs sail from Vue’s old seas, to Docusaurus light,
A gleaming ark of ADRs, diagrams taking flight.
Pipelines point the way, with bun to build and run,
Event maps, OpenAPI—threads now weave as one.
Farewell, VuePress harbor—hello, brighter sun! 🌞📚

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs/enhance-docs

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions

github-actions Bot commented Aug 13, 2025

Copy link
Copy Markdown

Test Results

949 tests  ±0   949 ✅ ±0   8m 30s ⏱️ -8s
  8 suites ±0     0 💤 ±0 
  8 files   ±0     0 ❌ ±0 

Results for commit 975164e. ± Comparison against base commit 40c7e5e.

♻️ This comment has been updated with latest results.

@foxminchan foxminchan added the documentation Improvements or additions to documentation label Aug 16, 2025
…l Documentation #61

- Created introductory documentation for Docusaurus.
- Added tutorial sections for creating documents, blog posts, and pages.
- Implemented versioning and localization features in the documentation.
- Configured Docusaurus with a custom theme and sidebar structure.
- Included CSS styles for homepage and components.
- Added logo and favicon for branding.
- Updated RequestManager class to change access modifier for IdempotencySerializationContext.
@foxminchan
foxminchan marked this pull request as ready for review August 16, 2025 16:15
Copilot AI review requested due to automatic review settings August 16, 2025 16:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request documents the migration from VuePress to Docusaurus for the BookWorm architecture documentation and includes several improvements to the codebase. The PR enhances documentation infrastructure by implementing a modern, maintainable documentation framework with improved versioning and localization capabilities, while also addressing production readiness concerns and configuration improvements.

Key Changes

  • Complete migration from VuePress to Docusaurus documentation framework with custom theme and components
  • Production readiness improvements including security configurations and environment-specific settings
  • Infrastructure configuration enhancements with versioning for external dependencies

Reviewed Changes

Copilot reviewed 138 out of 176 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/Services/Ordering/BookWorm.Ordering/Infrastructure/Idempotency/RequestManager.cs Changed access modifier from public to internal for better encapsulation
src/Services/*/Grpc/Extensions.cs Enabled detailed errors only in development environment
src/BuildingBlocks/BookWorm.Constants/Aspire/Components.cs Added version management for VectorDb component
src/Aspire/BookWorm.AppHost/AppHost.cs Updated to use centralized component configuration
docs/docusaurus/ Complete new Docusaurus documentation setup with custom theme
docs/vuepress/ Removed legacy VuePress documentation files

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

Comment thread src/Services/Ordering/BookWorm.Ordering/Grpc/Extensions.cs
@foxminchan foxminchan changed the title [WIP] Enhance documentation Enhance documentation Aug 16, 2025
@sonarqubecloud

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 57

🔭 Outside diff range comments (3)
docs/eventcatalog/domains/Store/subdomains/Orders/services/NotificationService/index.mdx (1)

151-181: Inconsistency: Text says Azure Service Bus, diagram shows RabbitMQ

Line 153 states Azure Service Bus, but the architecture diagram labels the bus as RabbitMQ in both prod/dev. Pick one and make it consistent to avoid operational confusion.

Apply this diff to align with Azure Service Bus:

-    service bus(logos:rabbitmq)[RabbitMQ] in prod
+    service bus(logos:microsoft-azure)[Azure Service Bus] in prod
@@
-    service busDev(logos:rabbitmq)[RabbitMQ] in dev
+    service busDev(logos:microsoft-azure)[Azure Service Bus] in dev
docs/eventcatalog/domains/Store/index.mdx (1)

271-275: Align Identity Provider References Across Documentation

There’s a mismatch between Keycloak and Azure AD mentions that could confuse readers:

• docs/eventcatalog/domains/Store/index.mdx (line 271) references Keycloak for JWT auth
• docs/eventcatalog/domains/Store/subdomains/Catalog/services/ProductService/index.mdx (lines 220–222) specifies Azure AD integration

Please standardize on one identity provider or explicitly call out when each is used (e.g., “Catalog uses Azure AD in prod; Store uses Keycloak”) so the docs remain consistent and clear.

docs/docusaurus/docs/09-architecture-decisions/overview.mdx (1)

291-294: Fix relative links to cross-section docs (missing numeric prefixes).

Docusaurus slugs include the numeric folder prefixes. Current links will break.

-- [Technical Risks and Debts](../risks-and-technical-debts): Risk analysis related to architectural decisions
-- [Quality Requirements](../quality-requirements/overview): Quality attributes addressed by ADRs
-- [Building Block View](../building-block-view/glassbox-overall-system): How ADRs shape system components
+- [Technical Risks and Debts](../11-risks-and-technical-debts): Risk analysis related to architectural decisions
+- [Quality Requirements](../10-quality-requirements/overview): Quality attributes addressed by ADRs
+- [Building Block View](../05-building-block-view/glassbox-overall-system): How ADRs shape system components

Comment on lines +144 to +150
```bash
# Install K6 with dashboard support
k6 run --out dashboard dist/main.js

# Or use the web dashboard
k6 run --out web-dashboard=port=3000 dist/main.js
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Clarify dashboard output dependencies (xk6 extensions vs built-in outputs)

--out dashboard and --out web-dashboard=port=3000 typically require xk6 extensions (e.g., xk6-dashboard/web-dashboard). Stock k6 doesn’t ship these outputs.

Please add a short note and install instructions, for example:

  • Use xk6 to build k6 with the required dashboard extension(s), or
  • Link to the repo(s) for the dashboard outputs you expect (and pin versions).
    Alternatively, show a default path with built-in outputs (json, csv, cloud) and make dashboard optional.

🌐 Web query:

Do the k6 CLI options --out dashboard and --out web-dashboard require xk6 extensions?

💡 Result:

The --out dashboard and --out web-dashboard CLI options in k6 historically required the installation of an xk6 extension (specifically, the xk6-dashboard) to be available[10][3]. However, this has changed in recent k6 releases:

  • Modern k6 (v0.49.0 and later):

    • The web dashboard is now built into the core k6 binary—it no longer requires any xk6 extension for standard dashboard functionality.
    • To enable the built-in dashboard, set the environment variable K6_WEB_DASHBOARD=true when running your test, rather than using a --out dashboard or --out web-dashboard flag[4][1][6].
    • The web dashboard will be available at http://localhost:5665 by default. You can configure host/port with other environment variables[4][6].
    • No custom k6 build, xk6, or additional plugin is required to use this built-in dashboard from k6 v0.49.0 onward[6][4].
  • Older k6 (< v0.49.0):

    • The web dashboard was not built-in, so you would need to create a custom k6 binary using xk6 and the xk6-dashboard extension:
      • Use xk6 build --with github.com/grafana/xk6-dashboard@latest to build a compatible binary.
      • Then, you could use --out dashboard or --out web-dashboard to invoke it[10][3][6].

Summary Table

k6 Version Requires xk6 extension for dashboard? How to enable dashboard
v0.49.0 and later No Set K6_WEB_DASHBOARD=true, use built-in
Prior to v0.49.0 Yes Custom build with xk6-dashboard, use --out dashboard

Additional considerations:

  • Some documentation and external guides may still refer to the --out dashboard syntax, but if you are using a modern k6 release, prefer the environment variable-based approach for dashboard access[4][1][6].
  • Legacy support for output plugins still exists for other specialized outputs via xk6 (e.g., Prometheus, Loki), but built-in dashboards now work out-of-the-box in official k6 releases[2][4][6].
  • If you use experimental or offline tools (like k6-web-dashboard CLI), those may relate to dashboard data replay and are separate from live built-in dashboard output[7].

Conclusion:
As of k6 v0.49.0 and newer, you do not need xk6 extensions for dashboard features—it's built in; enable it with the K6_WEB_DASHBOARD environment variable. For older k6 versions, the dashboard required the xk6-dashboard extension and a custom-built binary[6][4][10][3].

Citations:


Clarify dashboard support across k6 versions

The current snippet assumes dashboards require xk6 extensions, but modern k6 (v0.49.0+) ships a built-in web dashboard. Update the docs to cover both cases:

• In k6 v0.49.0 and later, no custom build is needed—enable it via environment variables.
• In k6 < v0.49.0, you must build a custom k6 binary with the xk6-dashboard extension.

Affected file:

  • docs/docusaurus/blog/2025-07-12-k6-test-suite/index.mdx (lines 144–150)

Proposed diff:

@@ lines 144-150
- # Install K6 with dashboard support
- k6 run --out dashboard dist/main.js
-
- # Or use the web dashboard
- k6 run --out web-dashboard=port=3000 dist/main.js
+ # Built-in web dashboard (k6 v0.49.0+)
+ export K6_WEB_DASHBOARD=true
+ # Optional: set address/port
+ export K6_WEB_DASHBOARD_ADDR=localhost
+ export K6_WEB_DASHBOARD_PORT=5665
+ k6 run dist/main.js
+
+ # Legacy dashboards (k6 < v0.49.0)
+ xk6 build --with github.com/grafana/xk6-dashboard@latest -o k6-dashboard
+ ./k6-dashboard run --out dashboard dist/main.js
📝 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.

Suggested change
```bash
# Install K6 with dashboard support
k6 run --out dashboard dist/main.js
# Or use the web dashboard
k6 run --out web-dashboard=port=3000 dist/main.js
```
🤖 Prompt for AI Agents
In docs/docusaurus/blog/2025-07-12-k6-test-suite/index.mdx around lines 144–150,
the snippet assumes dashboards require xk6 but newer k6 (v0.49.0+) includes a
built-in web dashboard; update the text to present two options: (1) for k6
v0.49.0 and later, remove the xk6 build step and show how to run with the
built-in web dashboard (e.g., enable the web dashboard via the built-in --out
web-dashboard option or relevant env var and run your script), and (2) for k6 <
v0.49.0, explain that you must build a custom k6 binary with the xk6-dashboard
extension and then run that binary with the dashboard output; replace the
existing single code block with brief guidance for both cases and example
commands for each.

Comment on lines +22 to +23
{/* truncate */}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Use the correct Docusaurus excerpt marker.

The truncate marker should be an HTML comment, not a JSX comment, otherwise the excerpt won’t be generated.

Apply this change:

-{/* truncate */}
+<!--truncate-->
📝 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.

Suggested change
{/* truncate */}
<!--truncate-->
🤖 Prompt for AI Agents
In docs/docusaurus/blog/2025-07-25-keycloak/index.mdx around lines 22-23, the
excerpt/truncate marker is using a JSX comment (e.g. {/* truncate */}) which
prevents Docusaurus from generating the excerpt; replace that JSX comment with
an HTML comment <!-- truncate --> so the extractor recognizes the marker and the
blog excerpt is generated.

Comment on lines +165 to +167
💡 **Repository Location**: The complete Keycloak conf
suite is available at [BookWorm/src/Aspire/BookWorm.AppHost/Container/keycloak](https://github.com/foxminchan/BookWorm/tree/main/src/Aspire/BookWorm.AppHost/Container/keycloak)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix broken sentence (“conf suite”) and keep it on a single line.

This is user-facing content; fix the truncation/wording.

-💡 **Repository Location**: The complete Keycloak conf
- suite is available at [BookWorm/src/Aspire/BookWorm.AppHost/Container/keycloak](https://github.com/foxminchan/BookWorm/tree/main/src/Aspire/BookWorm.AppHost/Container/keycloak)
+💡 **Repository Location**: The complete Keycloak configuration suite is available at [BookWorm/src/Aspire/BookWorm.AppHost/Container/keycloak](https://github.com/foxminchan/BookWorm/tree/main/src/Aspire/BookWorm.AppHost/Container/keycloak)
📝 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.

Suggested change
💡 **Repository Location**: The complete Keycloak conf
suite is available at [BookWorm/src/Aspire/BookWorm.AppHost/Container/keycloak](https://github.com/foxminchan/BookWorm/tree/main/src/Aspire/BookWorm.AppHost/Container/keycloak)
💡 **Repository Location**: The complete Keycloak configuration suite is available at [BookWorm/src/Aspire/BookWorm.AppHost/Container/keycloak](https://github.com/foxminchan/BookWorm/tree/main/src/Aspire/BookWorm.AppHost/Container/keycloak)

Comment on lines +98 to +99
| **Security** | Zero data breaches | Security audit compliance |
| **Usability** | Checkout completion rate above 85% | User analytics tracking |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Make the security goal measurable and realistic.

“Zero data breaches” is aspirational but not measurable. Use an objective target with monitoring.

-| **Security**      | Zero data breaches                 | Security audit compliance     |
+| **Security**      | No P1 security incidents; 0 credential leaks | Continuous vuln mgmt + third‑party audits |
📝 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.

Suggested change
| **Security** | Zero data breaches | Security audit compliance |
| **Usability** | Checkout completion rate above 85% | User analytics tracking |
| **Security** | No P1 security incidents; 0 credential leaks | Continuous vuln mgmt + third-party audits |
| **Usability** | Checkout completion rate above 85% | User analytics tracking |
🧰 Tools
🪛 LanguageTool

[grammar] ~98-~98: There might be a mistake here.
Context: ... | Security audit compliance | | Usability | Checkout completio...

(QB_NEW_EN)

Comment on lines +14 to +15
- **[Business Context](./bussiness-context)** - Business partners, interfaces, and data exchanges
- **[Technical Context](./technical-context)** - Technical interfaces, protocols, and system boundaries

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix typo in link: “bussiness-context” → “business-context” and rename file accordingly

User-facing typo and URL shape should be corrected. Please also rename the file to keep paths consistent.

-- **[Business Context](./bussiness-context)** - Business partners, interfaces, and data exchanges
+- **[Business Context](./business-context)** - Business partners, interfaces, and data exchanges

Follow-up:

  • Rename file: docs/docusaurus/docs/03-context-and-scope/bussiness-context.mdx → business-context.mdx
  • Update any inbound links accordingly
    Would you like me to prepare a patch to rename and update references?
📝 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.

Suggested change
- **[Business Context](./bussiness-context)** - Business partners, interfaces, and data exchanges
- **[Technical Context](./technical-context)** - Technical interfaces, protocols, and system boundaries
- **[Business Context](./business-context)** - Business partners, interfaces, and data exchanges
- **[Technical Context](./technical-context)** - Technical interfaces, protocols, and system boundaries
🧰 Tools
🪛 LanguageTool

[grammar] ~14-~14: There might be a mistake here.
Context: ...partners, interfaces, and data exchanges - **Technical Context*...

(QB_NEW_EN)

🤖 Prompt for AI Agents
In docs/docusaurus/docs/03-context-and-scope/overview.mdx around lines 14 to 15,
the link text and target path contain a typo "bussiness-context" that should be
"business-context"; update the markdown line to use **[Business
Context](./business-context)**, rename the file
docs/docusaurus/docs/03-context-and-scope/bussiness-context.mdx →
docs/docusaurus/docs/03-context-and-scope/business-context.mdx, and update all
inbound references across the repo (docs, sidebars, and any imports) to point to
the new path so links resolve correctly.

Comment on lines +74 to 75
3. **Chat Service**: Provides AI-powered conversational capabilities for book recommendations and customer support, implementing our [AI Integration Strategy](https://foxminchan.github.io/BookWorm/architecture-decisions/adr-009-ai-integration).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix broken ADR links (missing /docs path segment)

The absolute URLs to the Docusaurus ADR pages omit the /docs route base. As-is, these will 404 on GitHub Pages. Patch below fixes the paths.

-3. **Chat Service**: Provides AI-powered conversational capabilities for book recommendations and customer support, implementing our [AI Integration Strategy](https://foxminchan.github.io/BookWorm/architecture-decisions/adr-009-ai-integration).
+3. **Chat Service**: Provides AI-powered conversational capabilities for book recommendations and customer support, implementing our [AI Integration Strategy](https://foxminchan.github.io/BookWorm/docs/architecture-decisions/adr-009-ai-integration).

-Data persistence follows our [PostgreSQL database strategy](https://foxminchan.github.io/BookWorm/architecture-decisions/adr-004-postgresql-database), while service communication uses [event-driven patterns](https://foxminchan.github.io/BookWorm/architecture-decisions/adr-002-event-driven-cqrs) for loose coupling.
+Data persistence follows our [PostgreSQL database strategy](https://foxminchan.github.io/BookWorm/docs/architecture-decisions/adr-004-postgresql-database), while service communication uses [event-driven patterns](https://foxminchan.github.io/BookWorm/docs/architecture-decisions/adr-002-event-driven-cqrs) for loose coupling.

Also applies to: 78-79

🤖 Prompt for AI Agents
In docs/eventcatalog/domains/Store/subdomains/Catalog/index.mdx around lines
74-75 (and also update the other occurrences at lines 78-79), the absolute ADR
URLs are missing the required "/docs" path segment causing 404s on GitHub Pages;
update each ADR link to include the "/docs" prefix (e.g. change
https://foxminchan.github.io/BookWorm/architecture-decisions/... to
https://foxminchan.github.io/BookWorm/docs/architecture-decisions/...) so all
ADR links resolve correctly.

Comment on lines +55 to 56
The Ordering domain represents a strategic core domain within the BookWorm system, responsible for managing the complete lifecycle of customer orders from creation through fulfillment. Built on our [microservices architecture](https://foxminchan.github.io/BookWorm/architecture-decisions/adr-001-microservices-architecture), it embodies critical business capabilities that directly impact the organization's competitive advantage.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Correct ADR URLs (add /docs prefix) to prevent 404s

These external links should point to the Docusaurus site’s /docs route. Without it, users will land on 404 pages.

-Built on our [microservices architecture](https://foxminchan.github.io/BookWorm/architecture-decisions/adr-001-microservices-architecture), it embodies critical business capabilities that directly impact the organization's competitive advantage.
+Built on our [microservices architecture](https://foxminchan.github.io/BookWorm/docs/architecture-decisions/adr-001-microservices-architecture), it embodies critical business capabilities that directly impact the organization's competitive advantage.

-... via our [API Gateway](https://foxminchan.github.io/BookWorm/architecture-decisions/adr-008-api-gateway).
+... via our [API Gateway](https://foxminchan.github.io/BookWorm/docs/architecture-decisions/adr-008-api-gateway).

-... following our [event-driven CQRS pattern](https://foxminchan.github.io/BookWorm/architecture-decisions/adr-002-event-driven-cqrs), storing the complete history ...
+... following our [event-driven CQRS pattern](https://foxminchan.github.io/BookWorm/docs/architecture-decisions/adr-002-event-driven-cqrs), storing the complete history ...

-**Data Storage**: Uses [PostgreSQL as the primary database](https://foxminchan.github.io/BookWorm/architecture-decisions/adr-004-postgresql-database) for transactional data and Redis for caching and session management.
+**Data Storage**: Uses [PostgreSQL as the primary database](https://foxminchan.github.io/BookWorm/docs/architecture-decisions/adr-004-postgresql-database) for transactional data and Redis for caching and session management.

Also applies to: 74-75, 83-86

🤖 Prompt for AI Agents
docs/eventcatalog/domains/Store/subdomains/Orders/index.mdx lines 55-56 (and
also update occurrences at 74-75 and 83-86): the ADR links point to
/architecture-decisions/... and cause 404s; update each ADR link to include the
Docusaurus /docs prefix (e.g. change /architecture-decisions/adr-001-... to
/docs/architecture-decisions/adr-001-...) so they resolve correctly on the site,
and verify all three locations are updated consistently.

Comment on lines +46 to +74
requestBody:
content:
application/json:
schema:
required:
- method
- params
- jsonrpc
- id
type: object
properties:
method:
type: string
params:
type: object
properties:
name:
type: string
arguments:
type: object
jsonrpc:
enum:
- "1.0"
- "2.0"
type: string
default: "2.0"
id:
type: integer
responses:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

⚠️ Potential issue

Make requestBody required and strengthen schema (JSON-RPC semantics, id types, required params)

  • requestBody is not marked required: true.
  • JSON-RPC 2.0 mandates jsonrpc: "2.0" (JSON-RPC 1.0 didn’t use the jsonrpc field). Allowing "1.0" here is misleading.
  • JSON-RPC id can be string, number, or null; the current spec restricts to integer only.
  • params’s name and arguments aren’t required; make intent explicit.
       operationId: InvokeMCP
       requestBody:
+        required: true
         content:
           application/json:
             schema:
-              required:
-                - method
-                - params
-                - jsonrpc
-                - id
+              required: [method, params, jsonrpc, id]
               type: object
               properties:
                 method:
                   type: string
                 params:
                   type: object
                   properties:
                     name:
                       type: string
                     arguments:
                       type: object
+                  required: [name, arguments]
                 jsonrpc:
-                  enum:
-                    - "1.0"
-                    - "2.0"
-                  type: string
-                  default: "2.0"
+                  type: string
+                  enum: ["2.0"]
                 id:
-                  type: integer
+                  oneOf:
+                    - type: integer
+                    - type: string
+                    - type: 'null'
📝 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.

Suggested change
requestBody:
content:
application/json:
schema:
required:
- method
- params
- jsonrpc
- id
type: object
properties:
method:
type: string
params:
type: object
properties:
name:
type: string
arguments:
type: object
jsonrpc:
enum:
- "1.0"
- "2.0"
type: string
default: "2.0"
id:
type: integer
responses:
requestBody:
required: true
content:
application/json:
schema:
required: [method, params, jsonrpc, id]
type: object
properties:
method:
type: string
params:
type: object
properties:
name:
type: string
arguments:
type: object
required: [name, arguments]
jsonrpc:
type: string
enum: ["2.0"]
id:
oneOf:
- type: integer
- type: string
- type: 'null'
responses:
🤖 Prompt for AI Agents
In docs/eventcatalog/openapi-files/mcp-tools-server.yaml around lines 46 to 74,
the requestBody must be marked required and the JSON-RPC schema tightened: set
requestBody.required: true; change jsonrpc enum to only "2.0" (or replace enum
with const "2.0"); update id schema to allow string, number, or null instead of
integer-only (use a oneOf/type union or nullable); and inside params add a
required list with "name" and "arguments" so those properties are mandatory.
Ensure the top-level required array still includes method, params, jsonrpc and
id.

Comment on lines +74 to +81
responses:
"200":
description: Success
"400":
description: Bad Request
"406":
description: Not Acceptable
x-ms-agentic-protocol: mcp-streamable-1.0

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Define explicit response content and error payloads

Responses currently have only descriptions. Add media types and basic schemas (success/result vs. error) so clients can generate types and handle errors consistently.

       responses:
         "200":
-          description: Success
+          description: Success
+          content:
+            application/json:
+              schema:
+                type: object
+                properties:
+                  jsonrpc:
+                    type: string
+                    enum: ["2.0"]
+                  id:
+                    oneOf:
+                      - type: integer
+                      - type: string
+                      - type: 'null'
+                  result:
+                    type: object
+                required: [jsonrpc, id, result]
         "400":
-          description: Bad Request
+          description: Bad Request
+          content:
+            application/json:
+              schema:
+                type: object
+                properties:
+                  jsonrpc: { type: string, enum: ["2.0"] }
+                  id:
+                    oneOf:
+                      - type: integer
+                      - type: string
+                      - type: 'null'
+                  error:
+                    type: object
+                    properties:
+                      code: { type: integer }
+                      message: { type: string }
+                      data: { type: object }
+                    required: [code, message]
+                required: [jsonrpc, error]
         "406":
-          description: Not Acceptable
+          description: Not Acceptable
+          content:
+            application/json:
+              schema:
+                type: object
+                properties:
+                  jsonrpc: { type: string, enum: ["2.0"] }
+                  error:
+                    type: object
+                    properties:
+                      code: { type: integer }
+                      message: { type: string }
+                    required: [code, message]
+                required: [jsonrpc, error]
📝 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.

Suggested change
responses:
"200":
description: Success
"400":
description: Bad Request
"406":
description: Not Acceptable
x-ms-agentic-protocol: mcp-streamable-1.0
responses:
"200":
description: Success
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
enum:
- "2.0"
id:
oneOf:
- type: integer
- type: string
- type: "null"
result:
type: object
required:
- jsonrpc
- id
- result
"400":
description: Bad Request
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
enum:
- "2.0"
id:
oneOf:
- type: integer
- type: string
- type: "null"
error:
type: object
properties:
code:
type: integer
message:
type: string
data:
type: object
required:
- code
- message
required:
- jsonrpc
- error
"406":
description: Not Acceptable
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
enum:
- "2.0"
error:
type: object
properties:
code:
type: integer
message:
type: string
required:
- code
- message
required:
- jsonrpc
- error
x-ms-agentic-protocol: mcp-streamable-1.0
🤖 Prompt for AI Agents
In docs/eventcatalog/openapi-files/mcp-tools-server.yaml around lines 74 to 81,
the response objects only include descriptions; update each response to include
explicit content media types (e.g., application/json) and reference simple
schemas for success and error payloads so clients can generate types and handle
errors. Add a success schema (e.g., { code, message, data }) or specific result
schema for 200, and a reusable error schema (e.g., { errorCode, message, details
}) for 4xx/5xx responses; register those schemas under components/schemas and
reference them via $ref in each response content. Ensure Content-Type is
declared and reuse the error schema for 400 and 406 to keep payloads consistent
across endpoints.

Comment on lines +82 to +83
components: {}
tags:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

⚠️ Potential issue

Add global security and securitySchemes to satisfy security requirements

The spec has no global security requirements and no components.securitySchemes. This will fail many tooling checks and exposes ambiguity around authentication. Recommend defining a scheme (e.g., HTTP bearer JWT) and applying it globally.

 externalDocs:
   description: Documentation
   url: https://github.com/foxminchan/BookWorm
 servers:
+security:
+  - bearerAuth: [ ]
+  # Optionally support API keys for internal automation:
+  # - internalApiKey: [ ]
 paths:
@@
-components: {}
+components:
+  securitySchemes:
+    bearerAuth:
+      type: http
+      scheme: bearer
+      bearerFormat: JWT
+    # Optional: api key for internal/service-to-service calls
+    # internalApiKey:
+    #   type: apiKey
+    #   in: header
+    #   name: X-API-Key
📝 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.

Suggested change
components: {}
tags:
externalDocs:
description: Documentation
url: https://github.com/foxminchan/BookWorm
servers:
security:
- bearerAuth: [ ]
# Optionally support API keys for internal automation:
# - internalApiKey: [ ]
paths:
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
# Optional: api key for internal/service-to-service calls
# internalApiKey:
# type: apiKey
# in: header
# name: X-API-Key
tags:
🤖 Prompt for AI Agents
In docs/eventcatalog/openapi-files/mcp-tools-server.yaml around lines 82 to 83,
the OpenAPI spec lacks a global security declaration and
components.securitySchemes, so tooling will fail and auth is ambiguous; add a
components.securitySchemes entry (e.g., an HTTP bearer JWT scheme named
bearerAuth with type: http and scheme: bearer and bearerFormat: JWT) and add a
top-level security array that references that scheme (e.g., - bearerAuth: []) to
apply authentication globally.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review continued from previous batch...

Comment on lines +1 to +8
---
sidebar_position: 2
title: Business Context
last_update:
author: Nhan Nguyen
---

## Business Context Diagram

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Rename file: fix “bussiness” typo in path

Please rename to business-context.mdx and update incoming links (overview.mdx references “./bussiness-context”).


🏁 Script executed:

#!/bin/bash
# Find references to "bussiness-context" before renaming
rg -nP 'bussiness-context' -C2

Length of output: 633


Rename “bussiness-context.mdx” to “business-context.mdx”

The file name contains a typo and will break the link in overview.mdx. Please apply these critical fixes before merging:

  • Rename the file
    docs/docusaurus/docs/03-context-and-scope/bussiness-context.mdx → business-context.mdx
  • Update the reference in overview.mdx (line 14)
    docs/docusaurus/docs/03-context-and-scope/overview.mdx
- **[Business Context](./bussiness-context)**
+ **[Business Context](./business-context)**

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In docs/docusaurus/docs/03-context-and-scope/bussiness-context.mdx lines 1-8,
the filename contains a typo and must be renamed to business-context.mdx; rename
the file to docs/docusaurus/docs/03-context-and-scope/business-context.mdx and
update the import/link in docs/docusaurus/docs/03-context-and-scope/overview.mdx
at line 14 to point to the new filename so the overview link resolves correctly.

Comment on lines +12 to +39
```mermaid
C4Context
title System Context Diagram for BookWorm

Person(customer, "Customer", "Browses and purchases books, seeks support")
Person(admin, "Administrator", "Manages system and monitors operations")

Boundary(b1, "BookWorm Organization", "Internal Systems") {
System(bookworm, "BookWorm System", "Digital bookstore platform providing book discovery, purchasing, and customer support")
}

Boundary(b2, "External Partners", "Third-party Services") {
System_Ext(bookDataProvider, "Book Data Provider", "Provides book metadata, covers, descriptions, and pricing information")
System_Ext(emailService, "Email Service", "Delivers transactional and marketing emails")
System_Ext(aiProvider, "AI/LLM Provider", "Provides AI-powered chat support and recommendations")
System_Ext(identityProvider, "Identity Provider", "Handles user authentication and authorization")
}

Rel(customer, bookworm, "Browses catalog, places orders, uses chat support", "HTTPS")
Rel(admin, bookworm, "Manages system, monitors operations", "HTTPS")

Rel(bookworm, bookDataProvider, "Retrieves book information", "REST API")
Rel(bookworm, emailService, "Sends notifications", "SMTP/API")
Rel(bookworm, aiProvider, "Gets AI responses", "REST API")
Rel(bookworm, identityProvider, "Authenticates users", "OIDC")

UpdateLayoutConfig($c4ShapeInRow="2", $c4BoundaryInRow="1")
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

C4 Mermaid syntax will not render without the mermaid-c4 extension

Standard Mermaid doesn’t support C4Context or UpdateLayoutConfig. Either:

  • Enable the mermaid-c4 plugin in Docusaurus, or
  • Convert to standard Mermaid “graph” syntax.

Example conversion (standard Mermaid):

graph TB
  customer[Customer]
  admin[Administrator]
  bookworm[BookWorm System]
  bookDataProvider((Book Data Provider))
  emailService((Email Service))
  aiProvider((AI/LLM Provider))
  identityProvider((Identity Provider))

  customer -->|Browses, orders, chat| bookworm
  admin -->|Manage & monitor| bookworm
  bookworm -->|Retrieve book info| bookDataProvider
  bookworm -->|Send notifications| emailService
  bookworm -->|AI responses| aiProvider
  bookworm -->|Authenticate (OIDC)| identityProvider
Loading
🤖 Prompt for AI Agents
In docs/docusaurus/docs/03-context-and-scope/bussiness-context.mdx around lines
12-39, the Mermaid block uses C4Context and UpdateLayoutConfig which standard
Mermaid (and default Docusaurus) won't render; either enable the mermaid-c4
extension in your Docusaurus config (add the mermaid-c4 plugin to the site's
mermaid/remark/rehype plugins and rebuild) or replace the C4 syntax with an
equivalent standard Mermaid graph (e.g., convert C4 elements to nodes and arrows
in a graph TB diagram) so the diagram renders without the plugin.

Comment on lines +81 to +126
graph TB
subgraph Internet["🌐 Internet Zone"]
Users[End Users]
ExternalAPIs[External APIs]
end

subgraph DMZ["🛡️ DMZ Zone"]
WAF[Web Application Firewall]
LB[Load Balancer]
CDN[Content Delivery Network]
end

subgraph AppZone["🏗️ Application Zone"]
Gateway[API Gateway]
Services[Microservices]
Cache[Redis Cache]
end

subgraph DataZone["🗄️ Data Zone"]
Database[(PostgreSQL)]
Storage[(Blob Storage)]
MessageBroker[Message Broker]
end

subgraph Monitoring["📊 Monitoring Zone"]
Metrics[Metrics Collection]
Logs[Log Aggregation]
Alerts[Alert Manager]
end

Users -->|HTTPS:443| WAF
ExternalAPIs -->|HTTPS:443| WAF
WAF --> LB
LB --> CDN
LB --> Gateway

Gateway -->|HTTP| Services
Services -->|TCP:6379| Cache
Services -->|TCP:5432| Database
Services -->|TCP:5672| MessageBroker
Services -->|HTTPS| Storage

Services --> Metrics
Services --> Logs
Logs --> Alerts
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Network diagram routing is inaccurate (WAF/CDN order and egress).

  • CDN typically fronts the WAF/LB; origin fetch routes CDN → WAF → LB → Gateway.
  • External APIs are usually egress from Services, not inbound through WAF.

Suggest correcting edges to reflect realistic flows.

-    Users -->|HTTPS:443| WAF
-    ExternalAPIs -->|HTTPS:443| WAF
-    WAF --> LB
-    LB --> CDN
-    LB --> Gateway
+    Users -->|HTTPS:443| CDN
+    CDN -->|HTTPS:443| WAF
+    WAF -->|HTTPS:443| LB
+    LB -->|HTTPS:443| Gateway
@@
-    Gateway -->|HTTP| Services
+    Gateway -->|HTTP/HTTPS| Services
@@
-    Services --> Metrics
-    Services --> Logs
+    Services --> Metrics
+    Services --> Logs
+    
+    %% Egress to external APIs typically bypasses WAF and goes via egress/NAT
+    Services -->|HTTPS:443| ExternalAPIs
📝 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.

Suggested change
graph TB
subgraph Internet["🌐 Internet Zone"]
Users[End Users]
ExternalAPIs[External APIs]
end
subgraph DMZ["🛡️ DMZ Zone"]
WAF[Web Application Firewall]
LB[Load Balancer]
CDN[Content Delivery Network]
end
subgraph AppZone["🏗️ Application Zone"]
Gateway[API Gateway]
Services[Microservices]
Cache[Redis Cache]
end
subgraph DataZone["🗄️ Data Zone"]
Database[(PostgreSQL)]
Storage[(Blob Storage)]
MessageBroker[Message Broker]
end
subgraph Monitoring["📊 Monitoring Zone"]
Metrics[Metrics Collection]
Logs[Log Aggregation]
Alerts[Alert Manager]
end
Users -->|HTTPS:443| WAF
ExternalAPIs -->|HTTPS:443| WAF
WAF --> LB
LB --> CDN
LB --> Gateway
Gateway -->|HTTP| Services
Services -->|TCP:6379| Cache
Services -->|TCP:5432| Database
Services -->|TCP:5672| MessageBroker
Services -->|HTTPS| Storage
Services --> Metrics
Services --> Logs
Logs --> Alerts
```
graph TB
subgraph Internet["🌐 Internet Zone"]
Users[End Users]
ExternalAPIs[External APIs]
end
subgraph DMZ["🛡️ DMZ Zone"]
WAF[Web Application Firewall]
LB[Load Balancer]
CDN[Content Delivery Network]
end
subgraph AppZone["🏗️ Application Zone"]
Gateway[API Gateway]
Services[Microservices]
Cache[Redis Cache]
end
subgraph DataZone["🗄️ Data Zone"]
Database[(PostgreSQL)]
Storage[(Blob Storage)]
MessageBroker[Message Broker]
end
subgraph Monitoring["📊 Monitoring Zone"]
Metrics[Metrics Collection]
Logs[Log Aggregation]
Alerts[Alert Manager]
end
Users -->|HTTPS:443| CDN
CDN -->|HTTPS:443| WAF
WAF -->|HTTPS:443| LB
LB -->|HTTPS:443| Gateway
Gateway -->|HTTP/HTTPS| Services
Services -->|TCP:6379| Cache
Services -->|TCP:5432| Database
Services -->|TCP:5672| MessageBroker
Services -->|HTTPS| Storage
Services --> Metrics
Services --> Logs
Logs --> Alerts
%% Egress to external APIs typically bypasses WAF and goes via egress/NAT
Services -->|HTTPS:443| ExternalAPIs
🤖 Prompt for AI Agents
In docs/docusaurus/docs/03-context-and-scope/technical-context.mdx around lines
81 to 126, the network diagram routes are inaccurate; update the edges so the
CDN fronts the WAF and LB (Users and any public clients should point to CDN, and
CDN should point to WAF which then points to LB and LB to Gateway) instead of LB
-> CDN, and remove ExternalAPIs as an inbound source through the WAF; instead
represent ExternalAPIs as an egress from Services (add Services -> ExternalAPIs)
to show outbound calls. Ensure origin fetch flows read CDN -> WAF -> LB ->
Gateway and update or remove the incorrect ExternalAPIs -->|HTTPS:443| WAF edge
accordingly.

Comment on lines +12 to +15
```mermaid
C4Container
title Container Diagram for BookWorm Store System

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

C4Container is not part of core Mermaid; likely won’t render in Docusaurus.

Unless you’ve added the mermaid-c4 extension, this block will render as plain text. Either configure the plugin or convert to standard Mermaid.

To verify plugin support:

If pluginless, consider converting to a standard Mermaid graph or embedding a generated diagram image to keep the doc readable.


🏁 Script executed:

#!/bin/bash
rg -n -C2 'mermaid-c4|c4' docs docusaurus.config.* package.json
rg -n -C2 '@docusaurus/theme-mermaid|mermaid:\s*true' docusaurus.config.*

Length of output: 91047


🏁 Script executed:

#!/bin/bash
# Check for mermaid-c4 extension or C4 support in the Docusaurus site config
rg -n -C2 'mermaid-c4|C4Container' docs/docusaurus/package.json docs/docusaurus/docusaurus.config.*
# Check that @docusaurus/theme-mermaid is enabled and mermaid is turned on
rg -n -C2 '@docusaurus/theme-mermaid|mermaid:\s*true' docs/docusaurus/docusaurus.config.*

Length of output: 311


Enable C4 support or replace with core-Mermaid syntax

I see you’ve enabled Mermaid in docs/docusaurus/docusaurus.config.ts (mermaid: true, theme @docusaurus/theme-mermaid) but haven’t installed or registered the mermaid-c4 extension. C4Container isn’t part of core Mermaid, so your container diagrams will fall back to plain text.

• In docs/docusaurus/docusaurus.config.ts (≈ lines 223–225), register the mermaid-c4 plugin or a custom Mermaid plugin loader.
• Alternatively, convert your C4Container blocks in docs/docusaurus/docs/05-building-block-view/glassbox-overall-system.mdx (lines 12–15) to standard Mermaid (e.g., classDiagram or graph LR) or embed the rendered diagram as an image.

🤖 Prompt for AI Agents
In docs/docusaurus/docs/05-building-block-view/glassbox-overall-system.mdx
around lines 12 to 15 the file uses a C4Container block which is not supported
by core Mermaid; either register and load the mermaid-c4 extension in
docs/docusaurus/docusaurus.config.ts (around lines ~223–225) so Docusaurus can
render C4Container blocks, or replace the C4Container block in this MDX with a
core-Mermaid diagram (e.g., graph LR or classDiagram) or a pre-rendered image;
implement one of these fixes and ensure the config change properly
imports/initializes the plugin or that the converted diagram syntax matches
Mermaid core features.

Comment on lines +25 to +37
System_Boundary(catalog, "Catalog Domain") {
Container(catalog, "Catalog Service", ".NET", "Manages product catalog and inventory")
Container(rating, "Rating Service", ".NET", "Manages product ratings and reviews")
Container(chat, "Chat Service", ".NET", "Manages chat interactions and conversations")
}

System_Boundary(order, "Order Domain") {
Container(notification, "Notification Service", ".NET", "Sends notifications to users")
Container(order, "Order Service", ".NET", "Handles order processing")
Container(basket, "Basket Service", ".NET", "Manages shopping cart")
Container(finance, "Finance Service", ".NET", "Handles payment processing")
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Identifier collisions: boundary IDs equal container IDs (“catalog”, “order”).

Mermaid/C4 requires unique IDs; duplicates can break rendering and relations.

-        System_Boundary(catalog, "Catalog Domain") {
+        System_Boundary(catalogDomain, "Catalog Domain") {
           Container(catalog, "Catalog Service", ".NET", "Manages product catalog and inventory")
           Container(rating, "Rating Service", ".NET", "Manages product ratings and reviews")
           Container(chat, "Chat Service", ".NET", "Manages chat interactions and conversations")
         }
@@
-        System_Boundary(order, "Order Domain") {
+        System_Boundary(orderDomain, "Order Domain") {
           Container(notification, "Notification Service", ".NET", "Sends notifications to users")
           Container(order, "Order Service", ".NET", "Handles order processing")
           Container(basket, "Basket Service", ".NET", "Manages shopping cart")
           Container(finance, "Finance Service", ".NET", "Handles payment processing")
         }

Also applies to: 39-53

🤖 Prompt for AI Agents
In docs/docusaurus/docs/05-building-block-view/glassbox-overall-system.mdx
around lines 25 to 37 (and similarly lines 39 to 53), the System_Boundary IDs
collide with Container IDs ("catalog" and "order"), which breaks Mermaid/C4
rendering; rename the boundary IDs to unique identifiers (for example
"catalogBoundary" and "orderBoundary" or similar) and keep container IDs
unchanged (or vice versa), and update any other references in the file to the
new IDs so all IDs are globally unique.

Comment on lines +64 to +65
4. **Mirrored Queues**: Queue replication across cluster nodes for fault tolerance
5. **Transaction Support**: AMQP transactions for critical message operations

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Correct RabbitMQ feature claims: mirrored queues deprecated; no built-in dedup

  • “Mirrored Queues” are legacy. Use quorum queues for HA in modern RabbitMQ.
  • RabbitMQ does not provide built-in message deduplication. Implement idempotency at the consumer (Inbox) and/or publisher (Outbox with unique keys), or use a broker plugin at your own risk.

Suggested edits:

  • Replace “Mirrored Queues” with “Quorum Queues”
  • Replace “Built-in support for message deduplication” with “Idempotent consumers and Outbox/Inbox patterns for deduplication”

Also applies to: 73-74

🤖 Prompt for AI Agents
In docs/docusaurus/docs/09-architecture-decisions/adr-011-rabbitmq-message.mdx
around lines 64-65 (also apply the same change to lines 73-74), the document
incorrectly references legacy "Mirrored Queues" and claims built-in message
deduplication; update the text to replace "Mirrored Queues" with "Quorum Queues"
and replace "Built-in support for message deduplication" with a note
recommending idempotent consumers and Outbox/Inbox patterns (or caution about
using broker plugins) so the ADR accurately reflects modern RabbitMQ features
and practices.

Comment on lines +118 to +124
```csharp
public abstract record IntegrationEvent
{
public Guid Id { get; } = Guid.CreateVersion7();
public DateTime CreationDate { get; } = DateTimeHelper.UtcNow();
}
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

⚠️ Potential issue

Make IntegrationEvent deserializable and time-zone safe

Read-only properties will not round-trip via MassTransit’s System.Text.Json serializer. Consumers won’t receive the original Id/CreationDate values.

  • Expose init/set accessors (or a [JsonConstructor]) so deserialization preserves values
  • Prefer DateTimeOffset for clock/offset preservation
  • Validate Guid.CreateVersion7 availability (requires modern TFMs)

Suggested update:

-public abstract record IntegrationEvent
-{
-    public Guid Id { get; } = Guid.CreateVersion7();
-    public DateTime CreationDate { get; } = DateTimeHelper.UtcNow();
-}
+public abstract record IntegrationEvent
+{
+    public Guid Id { get; init; } = Guid.CreateVersion7();
+    public DateTimeOffset CreationDate { get; init; } = DateTimeOffset.UtcNow;
+}
📝 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.

Suggested change
```csharp
public abstract record IntegrationEvent
{
public Guid Id { get; } = Guid.CreateVersion7();
public DateTime CreationDate { get; } = DateTimeHelper.UtcNow();
}
```
public abstract record IntegrationEvent
{
public Guid Id { get; init; } = Guid.CreateVersion7();
public DateTimeOffset CreationDate { get; init; } = DateTimeOffset.UtcNow;
}
🤖 Prompt for AI Agents
In docs/docusaurus/docs/09-architecture-decisions/adr-011-rabbitmq-message.mdx
around lines 118 to 124, the IntegrationEvent sample uses read-only properties
and DateTime which prevents System.Text.Json (used by MassTransit) from
restoring Id/CreationDate and loses offset information; update the type to use
DateTimeOffset for CreationDate, make Id and CreationDate settable (prefer
init-accessors) or add a [JsonConstructor] so deserialization preserves original
values, and either confirm Guid.CreateVersion7 is available on your target TFMs
or replace with a compatible fallback (e.g., Guid.NewGuid()/polyfill) and
mention that requirement in the ADR.

Comment on lines +178 to +209
public class RabbitMQTopologyConfiguration
{
public static void ConfigureTopology(IBusRegistrationConfigurator configurator)
{
// Configure main topic exchange for domain events
configurator.UsingRabbitMq((context, cfg) =>
{
cfg.Host("rabbitmq-cluster", "/bookworm", h =>
{
h.Username("bookworm");
h.Password("secure-password");
h.Heartbeat(TimeSpan.FromSeconds(30));
h.RequestedConnectionTimeout(TimeSpan.FromSeconds(30));
});

// Configure exchanges
cfg.Publish<BookCreatedIntegrationEvent>(p => p.ExchangeType = ExchangeType.Topic);
cfg.Publish<OrderPlacedIntegrationEvent>(p => p.ExchangeType = ExchangeType.Topic);
cfg.Publish<PaymentProcessedIntegrationEvent>(p => p.ExchangeType = ExchangeType.Topic);

// Configure dead letter handling
cfg.ReceiveEndpoint("bookworm.failed", e =>
{
e.ConfigureDeadLetterExchange("bookworm.events.failed");
e.Consumer<DeadLetterConsumer>();
});

cfg.ConfigureEndpoints(context);
});
}
}
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

MassTransit dead-letter config example likely incorrect; show a working pattern

IReceiveEndpointConfigurator doesn’t expose ConfigureDeadLetterExchange in MT v8. Use queue arguments or delayed redelivery with a dedicated error endpoint.

Example that sets DLX via arguments and a dedicated dead-letter queue:

configurator.ReceiveEndpoint("bookworm.events", e =>
{
    e.ConfigureConsumeTopology = false;

    // DLX configuration for the main queue
    e.SetQueueArgument("x-dead-letter-exchange", "bookworm.events.failed");
    e.SetQueueArgument("x-dead-letter-routing-key", "bookworm.events.failed");

    e.ConfigureConsumer<BookCreatedConsumer>(context);
});

// Dead-letter endpoint
configurator.ReceiveEndpoint("bookworm.events.failed", e =>
{
    e.PrefetchCount = 16;
    e.Consumer<DeadLetterConsumer>(context);
});

Alternatively, leverage UseDelayedRedelivery + Retry and keep error queues for poison messages.

Consider consolidating the “advanced” and “core” UsingRabbitMq samples to avoid double-registration confusion in real codebases.


🏁 Script executed:

#!/bin/bash
set -e
# Search entire repository for ConfigureDeadLetterExchange usage or definition
rg -n "ConfigureDeadLetterExchange" -C3

Length of output: 864


🌐 Web query:

MassTransit v8 IReceiveEndpointConfigurator ConfigureDeadLetterExchange

💡 Result:

Short answer — there is no single IReceiveEndpointConfigurator.ConfigureDeadLetterExchange method. MassTransit exposes two different ways to work with “dead‑lettering”:

  • transport‑independent: configure the receive endpoint’s dead‑letter pipeline (what MassTransit does with skipped/unhandled messages) with ConfigureDeadLetter(...). (masstransit.io)
  • transport‑specific (RabbitMQ): configure the broker dead‑letter exchange/queue using the RabbitMQ receive endpoint API (BindDeadLetterQueue / related members) so broker TTL / x-dead-letter-exchange behavior routes expired messages to the DLX you want. (docs.dndocs.com, masstransit.io)

How to use each (examples)

  1. Configure the MassTransit dead‑letter pipeline (transport independent)
  • Use ConfigureDeadLetter to add filters / middleware to the dead‑letter pipe. This is useful if you want to run custom logic when MassTransit routes a message to the dead‑letter pipeline (skipped messages, etc.).

Example:
services.AddMassTransit(x =>
{
x.UsingRabbitMq((context, cfg) =>
{
cfg.ReceiveEndpoint("my_queue", e =>
{
// run arbitrary code when a message hits the dead-letter pipeline
e.ConfigureDeadLetter(deadLetter =>
{
deadLetter.UseExecute(ctx =>
{
// ctx is ReceiveContext or similar depending on the filter
Console.WriteLine($"Message dead-lettered: {ctx.GetBody()}");
return Task.CompletedTask;
});
});

        e.ConfigureConsumer<MyConsumer>(context);
    });
});

});
(See ConfigureDeadLetter usage in the MassTransit Exceptions / Dead‑Letter docs.) (masstransit.io)

  1. Configure RabbitMQ broker DLX / dead‑letter queue (transport specific)
  • Cast the endpoint configurator (or use the RabbitMQ-specific configurator parameter) and call the RabbitMQ helpers such as BindDeadLetterQueue (or the transport-specific DeadLetterExchange/DeadLetterExchangeName settings depending on API version). This makes the broker move expired messages (message TTL) or messages dead‑lettered by the broker (rejected/expired/length limit, etc.) to the exchange/queue you specify.

Example (RabbitMQ):
services.AddMassTransit(x =>
{
x.UsingRabbitMq((context, cfg) =>
{
cfg.Host("rabbit", "/", h => { h.Username("guest"); h.Password("guest"); });

    cfg.ReceiveEndpoint("my_queue", e =>
    {
        // create/bind a dead-letter exchange & queue
        // overloads exist; here is the common pattern:
        e.BindDeadLetterQueue("my_queue_dlx", "my_queue_dlx", bind =>
        {
            bind.Durable = true;
            bind.AutoDelete = false;
        });

        // optionally set message expiration so messages expire to the DLX
        // (either via queue args or a MassTransit helper if available for your transport)
        // e.UseMessageExpiration(exp => exp.SetMessageTimeToLive(TimeSpan.FromMinutes(5)));

        e.ConfigureConsumer<MyConsumer>(context);
    });
});

});

Notes / gotchas

  • “Skipped” vs broker dead‑letter: MassTransit has its own dead‑letter pipe (skipped messages go to an internal _skipped queue by default). Broker dead‑lettering (RabbitMQ’s DLX/x-dead-letter-exchange) is separate: it is the broker re‑publishing expired/rejected messages to the exchange you configure. Make sure you’re targeting the right mechanism for your needs. (masstransit.io, rabbitmq.com)
  • Overriding MassTransit’s default _skipped name: historically MassTransit created its own _skipped queue name for skipped messages (and it wasn’t changeable in older versions) — if you rely on that behavior, be explicit about whether you want MassTransit’s skipped pipeline or the broker DLX. (stackoverflow.com)
  • If you disable ConfigureConsumeTopology or PublishFaults you may need to manually bind exchanges/queues (and ensure routing keys) — otherwise messages routed to the DLX may return NO_ROUTE. See the GitHub discussion and the StackOverflow examples where missing bindings caused MessageReturned/NO_ROUTE. (github.com, stackoverflow.com)

If you want, tell me:

  • whether you’re using RabbitMQ (or another transport), and
  • whether you want broker-level DLX (expired messages) or MassTransit’s skipped/error pipeline handled differently — and I’ll give a copy-paste-ready code snippet exactly tuned to your scenario and MassTransit v8.

Citations:


Correct RabbitMQ Dead-Letter Setup for MassTransit v8

The current ADR snippet uses e.ConfigureDeadLetterExchange, which isn’t part of the MT v8 RabbitMQ API. To ensure broker-level dead-lettering, update your example to one of these patterns:

• Broker DLX via queue arguments

configurator.ReceiveEndpoint("bookworm.events", e =>
{
    e.ConfigureConsumeTopology = false;

    // Broker-level DLX settings
    e.SetQueueArgument("x-dead-letter-exchange",    "bookworm.events.failed");
    e.SetQueueArgument("x-dead-letter-routing-key", "bookworm.events.failed");

    e.ConfigureConsumer<BookCreatedConsumer>(context);
});

// Dead-letter queue
configurator.ReceiveEndpoint("bookworm.events.failed", e =>
{
    e.PrefetchCount = 16;
    e.Consumer<DeadLetterConsumer>(context);
});

• Broker DLX via MassTransit RabbitMQ helper

configurator.ReceiveEndpoint("bookworm.events", e =>
{
    // Bind an exchange+queue for DLX
    e.BindDeadLetterQueue("bookworm.events", "bookworm.events.failed", bind =>
    {
        bind.Durable   = true;
        bind.AutoDelete= false;
    });

    e.ConfigureConsumer<BookCreatedConsumer>(context);
});

Alternatively, for transport-independent dead-letter handling (skipped/unhandled messages), use e.ConfigureDeadLetter(...).

Also, consider consolidating the “core” and “advanced” UsingRabbitMq examples to prevent duplicated registrations and clarify which approach you’re illustrating.

🤖 Prompt for AI Agents
In docs/docusaurus/docs/09-architecture-decisions/adr-011-rabbitmq-message.mdx
around lines 178 to 209, the example uses the non-existent
e.ConfigureDeadLetterExchange API from MassTransit v8; replace that call with a
correct broker-level DLX setup (either set queue arguments
x-dead-letter-exchange and x-dead-letter-routing-key on the main receive
endpoint, or use the MassTransit RabbitMQ helper BindDeadLetterQueue to bind a
DLX queue), or if you intend transport-independent handling use
e.ConfigureDeadLetter(...); also remove or consolidate duplicate UsingRabbitMq
examples so the ADR shows a single clear recommended pattern.

Comment on lines +242 to +266
public sealed class AgentOrchestrationService : IAgentOrchestrationService
{
public async Task<string> ProcessAgentsSequentiallyAsync(
string userMessage,
Guid conversationId,
Guid assistantReplyId,
CancellationToken cancellationToken = default)
{
var runtime = new InProcessRuntime();
await runtime.StartAsync(cancellationToken);

SequentialOrchestration orchestration = new(
orchestrateAgents.LanguageAgent,
orchestrateAgents.SummarizeAgent,
orchestrateAgents.SentimentAgent,
orchestrateAgents.BookAgent)
{
ResponseCallback = ResponseCallbackAsync,
};

var result = await orchestration.InvokeAsync(userMessage, runtime, cancellationToken);
var finalResults = await result.GetValueAsync(TimeSpan.FromSeconds(60), cancellationToken);


```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

❓ Verification inconclusive

Agent orchestration snippet is incomplete; return value and dependencies are missing

The sample references orchestrateAgents.* and ResponseCallbackAsync without showing their definitions. Method returns string but never returns a value.

Tighten the example to avoid misleading readers:

 public sealed class AgentOrchestrationService : IAgentOrchestrationService
 {
     public async Task<string> ProcessAgentsSequentiallyAsync(
         string userMessage,
         Guid conversationId,
         Guid assistantReplyId,
         CancellationToken cancellationToken = default)
     {
         var runtime = new InProcessRuntime();
         await runtime.StartAsync(cancellationToken);

-        SequentialOrchestration orchestration = new(
-            orchestrateAgents.LanguageAgent,
-            orchestrateAgents.SummarizeAgent,
-            orchestrateAgents.SentimentAgent,
-            orchestrateAgents.BookAgent)
-        {
-            ResponseCallback = ResponseCallbackAsync,
-        };
+        // Pseudocode: inject IOrchestrateAgents and IResponseCallback in the actual implementation
+        SequentialOrchestration orchestration = new(LanguageAgent, SummarizeAgent, SentimentAgent, BookAgent)
+        {
+            ResponseCallback = OnAgentResponseAsync,
+        };

         var result = await orchestration.InvokeAsync(userMessage, runtime, cancellationToken);
         var finalResults = await result.GetValueAsync(TimeSpan.FromSeconds(60), cancellationToken);
-
-
+        return finalResults?.ToString() ?? string.Empty;
     }
 }

Fix incomplete code snippet in ADR-012

The example in docs/docusaurus/docs/09-architecture-decisions/adr-012-ollama-llm-runtime.mdx (lines 242–266) omits:

  • Definitions or injection of orchestrateAgents and ResponseCallbackAsync
  • A return statement, even though the method’s signature expects Task<string>

Please tighten the sample to avoid confusion. For example:

 public sealed class AgentOrchestrationService : IAgentOrchestrationService
 {
     public async Task<string> ProcessAgentsSequentiallyAsync(
         string userMessage,
         Guid conversationId,
         Guid assistantReplyId,
         CancellationToken cancellationToken = default)
     {
         var runtime = new InProcessRuntime();
         await runtime.StartAsync(cancellationToken);

-        SequentialOrchestration orchestration = new(
-            orchestrateAgents.LanguageAgent,
-            orchestrateAgents.SummarizeAgent,
-            orchestrateAgents.SentimentAgent,
-            orchestrateAgents.BookAgent)
-        {
-            ResponseCallback = ResponseCallbackAsync,
-        };
+        // In real code, inject IOrchestrateAgents and IResponseCallback via constructor
+        SequentialOrchestration orchestration = new(
+            LanguageAgent,
+            SummarizeAgent,
+            SentimentAgent,
+            BookAgent)
+        {
+            ResponseCallback = OnAgentResponseAsync,
+        };

         var result = await orchestration.InvokeAsync(userMessage, runtime, cancellationToken);
         var finalResults = await result.GetValueAsync(TimeSpan.FromSeconds(60), cancellationToken);
-
-        // Missing return in original snippet
+        return finalResults?.ToString() ?? string.Empty;
     }
 }

[must address undefined symbols and missing return]

Committable suggestion skipped: line range outside the PR's diff.

Comment on lines +33 to +56
## Decision

Adopt **Model Context Protocol (MCP)** as the standardized framework for AI model integration, enabling secure access to BookWorm's data sources, tools, and services while maintaining fine-grained permission control and comprehensive audit capabilities.

### MCP Integration Strategy

#### Secure AI Data Access

- **Resource Servers**: MCP servers providing secure access to BookWorm's databases, APIs, and services
- **Permission Framework**: Fine-grained permissions controlling AI model access to different data sources
- **Context Management**: Persistent context across AI interactions with conversation state management
- **Audit Logging**: Comprehensive logging of all AI data access and tool usage

#### AI Tool Integration

- **Tool Servers**: MCP servers exposing BookWorm tools and automation capabilities to AI models
- **Function Calling**: Standardized function calling interface for AI models to invoke business operations
- **Error Handling**: Robust error handling and fallback mechanisms for tool integration failures
- **Rate Limiting**: Resource usage controls to prevent AI model abuse of system resources

## Decision

Adopt **Model Context Protocol (MCP) Tools** as the foundational framework for standardizing development tools, workflows, and integrations across the BookWorm development ecosystem.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Duplicate “## Decision” sections create ambiguity.

Two separate “Decision” sections conflict (MCP integration vs MCP Tools standardization). Consolidate or rename the second to clarify scope.

-## Decision
+## Decision

 Adopt **Model Context Protocol (MCP)** as the standardized framework for AI model integration, enabling secure access to BookWorm's data sources, tools, and services while maintaining fine-grained permission control and comprehensive audit capabilities.
@@
-## Decision
-
-Adopt **Model Context Protocol (MCP) Tools** as the foundational framework for standardizing development tools, workflows, and integrations across the BookWorm development ecosystem.
+## Tooling Standardization
+
+Adopt **Model Context Protocol (MCP) Tools** to standardize development tools, workflows, and integrations across the BookWorm ecosystem, complementing the AI integration decision above.
📝 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.

Suggested change
## Decision
Adopt **Model Context Protocol (MCP)** as the standardized framework for AI model integration, enabling secure access to BookWorm's data sources, tools, and services while maintaining fine-grained permission control and comprehensive audit capabilities.
### MCP Integration Strategy
#### Secure AI Data Access
- **Resource Servers**: MCP servers providing secure access to BookWorm's databases, APIs, and services
- **Permission Framework**: Fine-grained permissions controlling AI model access to different data sources
- **Context Management**: Persistent context across AI interactions with conversation state management
- **Audit Logging**: Comprehensive logging of all AI data access and tool usage
#### AI Tool Integration
- **Tool Servers**: MCP servers exposing BookWorm tools and automation capabilities to AI models
- **Function Calling**: Standardized function calling interface for AI models to invoke business operations
- **Error Handling**: Robust error handling and fallback mechanisms for tool integration failures
- **Rate Limiting**: Resource usage controls to prevent AI model abuse of system resources
## Decision
Adopt **Model Context Protocol (MCP) Tools** as the foundational framework for standardizing development tools, workflows, and integrations across the BookWorm development ecosystem.
## Decision
Adopt **Model Context Protocol (MCP)** as the standardized framework for AI model integration, enabling secure access to BookWorm's data sources, tools, and services while maintaining fine-grained permission control and comprehensive audit capabilities.
### MCP Integration Strategy
#### Secure AI Data Access
- **Resource Servers**: MCP servers providing secure access to BookWorm's databases, APIs, and services
- **Permission Framework**: Fine-grained permissions controlling AI model access to different data sources
- **Context Management**: Persistent context across AI interactions with conversation state management
- **Audit Logging**: Comprehensive logging of all AI data access and tool usage
#### AI Tool Integration
- **Tool Servers**: MCP servers exposing BookWorm tools and automation capabilities to AI models
- **Function Calling**: Standardized function calling interface for AI models to invoke business operations
- **Error Handling**: Robust error handling and fallback mechanisms for tool integration failures
- **Rate Limiting**: Resource usage controls to prevent AI model abuse of system resources
## Tooling Standardization
Adopt **Model Context Protocol (MCP) Tools** to standardize development tools, workflows, and integrations across the BookWorm ecosystem, complementing the AI integration decision above.
🧰 Tools
🪛 LanguageTool

[grammar] ~41-~41: There might be a mistake here.
Context: ...BookWorm's databases, APIs, and services - Permission Framework: Fine-grained per...

(QB_NEW_EN)


[grammar] ~42-~42: There might be a mistake here.
Context: ...I model access to different data sources - Context Management: Persistent context...

(QB_NEW_EN)


[grammar] ~43-~43: There might be a mistake here.
Context: ...tions with conversation state management - Audit Logging: Comprehensive logging o...

(QB_NEW_EN)


[grammar] ~48-~48: There might be a mistake here.
Context: ...and automation capabilities to AI models - Function Calling: Standardized functio...

(QB_NEW_EN)


[grammar] ~49-~49: There might be a mistake here.
Context: ... AI models to invoke business operations - Error Handling: Robust error handling ...

(QB_NEW_EN)


[grammar] ~50-~50: There might be a mistake here.
Context: ...mechanisms for tool integration failures - Rate Limiting: Resource usage controls...

(QB_NEW_EN)

🤖 Prompt for AI Agents
In
docs/docusaurus/docs/09-architecture-decisions/adr-020-mcp-tools-standardize.mdx
around lines 33 to 56, there are two "## Decision" headings that create
ambiguity; consolidate them into a single decision section or rename the second
heading to reflect its specific scope (e.g., "## Tooling Decision" or "##
Decision: MCP Tools Standardization") and merge or move overlapping text so the
document has one clear decision statement followed by distinct subsections for
integration strategy and tools standardization.

@foxminchan
foxminchan merged commit 44decbb into main Aug 16, 2025
15 of 16 checks passed
@foxminchan
foxminchan deleted the docs/enhance-docs branch August 16, 2025 16:26
@coderabbitai coderabbitai Bot mentioned this pull request Aug 31, 2025
8 tasks
@coderabbitai coderabbitai Bot mentioned this pull request Oct 2, 2025
8 tasks
@coderabbitai coderabbitai Bot mentioned this pull request Oct 23, 2025
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhance Documentation Centralize and Standardize Technical Documentation

2 participants