---
title: Agent and workflow change checklist
summary: Pre-merge engineering checklist for Conversational agents, routing guardrails, governance policies, and MCP/A2A contracts.
version: 1.0.0
type: engineering
order: 2
badges:
  - content: Architecture
    backgroundColor: green
    textColor: green
---

## Purpose & Scope

This checklist defines the mandatory pre-merge verification steps for engineers modifying [[service|chat-api]], [[service|mcp-server]], or any specialist agent in the [[domain|conversational]] subdomain. Use it whenever changing agent instructions, routing thresholds, governance policies, MCP tool signatures, or A2A gRPC integrations.

## Core Invariants & Design Rules

- **Preserve domain ownership:** [[service|catalog-api]], [[service|basket-api]], [[service|order-api]], and [[service|rating-api]] remain the sole authoritative owners of catalog, basket, order, and [[entity|feedback]] state.
- **Grounding & uncertainty:** [[agent|book-agent]], [[agent|book-catalog-researcher]], and [[agent|book-recommendation-researcher]] must cite only [[service|mcp-server]] results and report missing prices, availability, or ratings as unavailable rather than guessing.
- **Inline sentiment without persistence:** Emotional book feedback is handled inline by [[agent|book-agent]] without adding a separate sentiment agent or implying that a Reviews [[entity|feedback]] record was persisted.
- **Policy-only support:** [[agent|qa-agent]] must answer strictly from static store-policy guidance and never claim live access to customer accounts, baskets, or orders.

:::warning
**Governance rules default to deny.** Adding a tool to an agent prompt or [[service|mcp-server]] without updating the corresponding agent's governance allowlist will silently block or reject tool execution at runtime.
:::

## Boundaries & Guarantees

| Concern                      | Strategy & Guarantee                                                                                                                                                                                                                                                                        | Failure / Edge-Case Behavior                                                                                                                                             | Related Resources                                                                                                                                                                                                                                                                                                      |
| :--------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Persistence**              | AG-UI sessions persist in <ResourceLink id="chat-session-blob" type="container">chat-session-blob</ResourceLink> (`ag-ui/`) per Entra ID user; Foundry memory stores reading preferences; local file memory is ephemeral.                                                                   | Session blobs survive container restarts; local research scratchpads do not.                                                                                             | <ResourceLink id="chat-session-blob" type="container">chat-session-blob</ResourceLink>, <ResourceLink id="adr-006-user-scoped-episodic-and-semantic-memory" type="adr">adr-006-user-scoped-episodic-and-semantic-memory</ResourceLink>                                                                                 |
| **Caching & Contracts**      | <ResourceLink id="mcp-server" type="service">mcp-server</ResourceLink> tool schemas (`search_catalog`, `get_book`, `list_categories`, `list_authors`) must stay aligned with agent definitions and <ResourceLink id="catalog-api" type="service">catalog-api</ResourceLink> gRPC contracts. | Schema drift between <ResourceLink id="mcp-server" type="service">mcp-server</ResourceLink> and agent definitions breaks tool invocation or degrades research synthesis. | <ResourceLink id="mcp-server" type="service">mcp-server</ResourceLink>, <ResourceLink id="adr-004-use-domain-apis-as-mcp-backends" type="adr">adr-004-use-domain-apis-as-mcp-backends</ResourceLink>                                                                                                                   |
| **Messaging & Protocols**    | Handoff to <ResourceLink id="rating-agent" type="agent">rating-agent</ResourceLink> uses A2A gRPC (`2m` timeout, Entra Agent Identity token exchange); Storefront UI tools execute client-side with user confirmation.                                                                      | Unresolved book IDs must block `Book -> Rating` handoff; `Rating` remains terminal with no back-handoff.                                                                 | <ResourceLink id="chat-api" type="service">chat-api</ResourceLink>, <ResourceLink id="rating-agent" type="agent">rating-agent</ResourceLink>, <ResourceLink id="adr-003-separate-interactive-and-agent-protocols" type="adr">adr-003-separate-interactive-and-agent-protocols</ResourceLink>                           |
| **Concurrency & Governance** | Input truncation (`> 2000` → `1900`), decision guardrails (`< 0.5` reject, `< 0.6` HITL pause), Presidio PII redaction, and `PerUserRateLimit` protect every turn.                                                                                                                          | Multi-turn injection patterns or turn/retry limits (`30` turns / `3` retries) halt execution safely before tool misuse.                                                  | <ResourceLink id="presidio-api" type="service">presidio-api</ResourceLink>, <ResourceLink id="adr-002-fail-closed-pii-middleware" type="adr">adr-002-fail-closed-pii-middleware</ResourceLink>, <ResourceLink id="adr-005-govern-agent-tools-per-agent" type="adr">adr-005-govern-agent-tools-per-agent</ResourceLink> |

## Safe Change & Verification Checklist

<Steps title="Pre-merge verification workflow">
	<Step title="Audit workflow layer & boundary impact">
		Confirm whether the change affects input validation, decision routing/disambiguation, specialist
		sub-workflows, or response formatting, and verify no backend write clients or databases were
		introduced.
	</Step>
	<Step title="Update governance allowlists & PII/auth middleware">
		Add explicit allow rules in the agent governance policy for any new tools, preserve `qa-agent`
		Catalog tool denials, and keep Presidio PII middleware, Entra ID `customer` authorization, and
		`PerUserRateLimit` active.
	</Step>
	<Step title="Verify MCP Tools & Rating A2A contracts">
		Confirm [[service|mcp-server]] tool signatures match specialist definitions and
		[[service|rating-api]] A2A gRPC token exchange remains intact.
	</Step>
	<Step title="Validate routing, handoff, and session test cases">
		Run `mise run format`, `mise run build`, and `mise run test` to verify input validation,
		decision thresholds (`0.5` / `0.6`), HITL resume normalization, handoff preconditions,
		formatting fallbacks, and [[container|chat-session-blob]] round-trips.
	</Step>
</Steps>

## Related Resources

- [[service|chat-api]] — Conversational workflow host
- [[service|mcp-server]] — Read-only Catalog MCP server
- [[agent|book-agent]], [[agent|qa-agent]], [[agent|rating-agent]] — Primary conversational specialists
- [[flow|agent-orchestration]] — End-to-end conversational orchestration flow
- [[adr|adr-001-chat-agent-orchestration-boundary]], [[adr|adr-005-govern-agent-tools-per-agent]], [[adr|adr-007-system-one-decision-model-routing-and-tool-selection]]
