Storefront has been decoupled into micro-frontends with a dedicated commerce app and shared shell.

Read the architecture guide →

ADR-BW-014: Compose shared governance on each enabled AI path

Reuse privacy, guardrail, and policy mechanisms across Chat and Rating while verifying registration and permissions on each model and tool path.

November 7, 2026Proposed
FieldValue
StatusProposed
Date2026-11-07
OwnersAI Capabilities TeamTeamAI Capabilities TeamComplicated-Subsystem team owning BookWorm's multi-agent conversational discovery, MCP/A2A protocols, vector ingestion, ...Open docs
Affected ResourcesBookWormDomainv1.0.0BookWormCore e-commerce domain for the BookWorm online bookstore, coordinating catalog discovery, customer baskets, order fulfil...Ownerarchitecture-enabling-teamDiagramRepositoryOpen docs, Chat SystemSystemv1.0.0Chat SystemInternal system that hosts BookWorm's conversational workflow and specialist AI agents for customer support and catalog-...Ownerai-capabilities-teamDiagramRepositoryOpen docs, Rating SystemSystemv1.0.0Rating SystemInternal Reviews system that owns customer feedback, publishes rating changes to Catalog, and provides read-time feedbac...Ownercatalog-experience-teamDiagramRepositoryOpen docs, Chat APIServicev1.0.0Chat APIInternal HTTP host for BookWorm's interactive multi-agent chat workflow, agent discovery, and session persistence. Ownerai-capabilities-teamDiagramRepositoryOpen docs, Rating APIServicev1.0.0Rating APIInternal HTTP and A2A gRPC service for collecting, listing, deleting, and summarizing customer feedback for Catalog book...PublishesFeedbackCreatedIntegrationEvent, FeedbackDeletedIntegrationEventSubscribesCreateFeedback, DeleteFeedback +3APIsOpenAPI, AsyncAPIOwnercatalog-experience-teamDiagramRepositoryOpen docs, MCP ServerServicev1.0.0MCP ServerInternal stateless Streamable HTTP MCP service that exposes read-only Catalog lookup tools and reusable AI prompts. PublishesListBooksGrpc, GetBookDetailsGrpc +2Ownerai-capabilities-teamDiagramRepositoryOpen docs, Presidio APIServicev1.0.0Presidio APIExternal HTTP sidecar API for detecting PII in text and anonymizing detected entities in the Chat and Rating AI agent pi...SubscribesAnalyzeText, AnonymizeText +3APIsOpenAPIOwnerplatform-engineering-teamDiagramOpen docs
Related ADRsADR-002: Apply PII filtering to agent input and outputDecision Recordv1.0.0ADR-002: Apply PII filtering to agent input and outputChat agents use Presidio middleware to analyze and anonymize sensitive text, and privacy-processing failures are not byp...Ownerai-capabilities-teamOpen docs, ADR-005: Grant tools according to each agent's responsibilityDecision Recordv1.0.0ADR-005: Grant tools according to each agent's responsibilityChat agents receive only the MCP tools or delegated capabilities needed for their role, with governance policies limitin...Ownerai-capabilities-teamOpen docs, ADR-004: Keep AI feedback summarization read-only and governedDecision Recordv1.0.0ADR-004: Keep AI feedback summarization read-only and governedRating generates feedback insights at read time with allow-listed read tools, PII redaction, and rate limits, without pe...Ownercatalog-experience-teamOpen docs, ADR-001: Use Presidio Analyze for PII detectionDecision Recordv1.0.0ADR-001: Use Presidio Analyze for PII detectionPresidio's Analyze API identifies email addresses, phone numbers, and credit-card information in feedback before it reac...Ownerplatform-engineering-teamOpen docs, ADR-002: Anonymize detected PII before model processingDecision Recordv1.0.0ADR-002: Anonymize detected PII before model processingDetected PII is anonymized through Presidio before feedback is sent to the model or returned, without changing persisted...Ownerplatform-engineering-teamOpen docs

Context & Problem Statement

Chat APIServicev1.0.0Chat APIInternal HTTP host for BookWorm's interactive multi-agent chat workflow, agent discovery, and session persistence. Ownerai-capabilities-teamDiagramRepositoryOpen docs, Rating APIServicev1.0.0Rating APIInternal HTTP and A2A gRPC service for collecting, listing, deleting, and summarizing customer feedback for Catalog book...PublishesFeedbackCreatedIntegrationEvent, FeedbackDeletedIntegrationEventSubscribesCreateFeedback, DeleteFeedback +3APIsOpenAPI, AsyncAPIOwnercatalog-experience-teamDiagramRepositoryOpen docs, and MCP ServerServicev1.0.0MCP ServerInternal stateless Streamable HTTP MCP service that exposes read-only Catalog lookup tools and reusable AI prompts. PublishesListBooksGrpc, GetBookDetailsGrpc +2Ownerai-capabilities-teamDiagramRepositoryOpen docs process customer prompts and review text using foundation models and external tools. Relying solely on system prompts is not a security boundary, while re-implementing PII detection and tool authorization per agent invites drift and privilege leaks.

Decision Drivers

  • Defense in depth: Enforce PII redaction, prompt-injection guardrails, and tool policies before and after model calls.
  • Least privilege: Grant each agent identity only the exact tools and scopes it requires.
  • Explicit opt-in verification: Require every AI path to declare and test its governance registration.

Options Considered

OptionProsCons
Composable shared governance + per-agent policy declarationsConsistent PII/guardrail reuse with strict per-agent least privilegeAdds middleware latency; requires per-path policy maintenance
Prompt-only safety instructionsZero middleware overheadEasily bypassed by prompt injection; not an enforceable boundary
Custom per-agent safety codeFull local controlDuplicates Presidio/guardrail logic and drifts over time
Implicit global package protectionFast initial wiringDirect model calls or missed registrations silently bypass controls

Decision & Consequences

Chosen Option: Compose shared AI governance—Presidio APIServicev1.0.0Presidio APIExternal HTTP sidecar API for detecting PII in text and anonymizing detected entities in the Chat and Rating AI agent pi...SubscribesAnalyzeText, AnonymizeText +3APIsOpenAPIOwnerplatform-engineering-teamDiagramOpen docs PII anonymization, input/output guardrails, and default-deny tool policies—explicitly on every enabled AI path across Chat SystemSystemv1.0.0Chat SystemInternal system that hosts BookWorm's conversational workflow and specialist AI agents for customer support and catalog-...Ownerai-capabilities-teamDiagramRepositoryOpen docs, Rating SystemSystemv1.0.0Rating SystemInternal Reviews system that owns customer feedback, publishes rating changes to Catalog, and provides read-time feedbac...Ownercatalog-experience-teamDiagramRepositoryOpen docs, and MCP ToolsSystemv1.0.0MCP ToolsInternal stateless MCP server that exposes read-only Catalog tools and reusable AI prompts to BookWorm AI clients. Ownerai-capabilities-teamDiagramRepositoryOpen docs.

  • Positive: Consistent privacy and safety enforcement without granting one agent another’s tool permissions.
  • Negative: Additional middleware hops add measurable latency to AI turns.

Compliance Criteria