The application compose stack (Kafka, PostgreSQL, Apicurio, Keycloak, Ollama) and the separate observability compose stack (Grafana LGTM), with the request path and the OTLP path between them
Figure 0.1: Two stacks, started and stopped independently
Download .excalidraw source
·
Edit on excalidraw.com
The bad granular contract costs five tool calls, two argument errors and 3185 tokens and never completes the refund; the good intent tool costs one call and 759 tokens and completes it
Figure 1.1: Same task, same model, two contracts
Download .excalidraw source
·
Edit on excalidraw.com
The sections of one catalog entry in order: Name, Problem, Solution, How Quarkus and Camel model it, Build run observe ending in a negative witness, When not to use it, References, with an optional cross-stack callout
Figure 2.1: The anatomy of one catalog entry
Download .excalidraw source
·
Edit on excalidraw.com
Lifecycle (build, consume, test, ship, run) as the primary axis, sync versus async as the secondary axis inside build, and the seven forces as the third dimension every entry declares
Figure 2.2: Lifecycle, then sync or async, then the forces on every entry
Download .excalidraw source
·
Edit on excalidraw.com
Chatty CRUD cancels the order and refunds the payment as two calls with a crash window between them; the intent endpoint moves both in one call, one transaction
Figure 3.1: One business operation, atomic or not
Download .excalidraw source
·
Edit on excalidraw.com
A raw pagination sweep pulling six pages to find three matching rows, versus one typed search call that isolates the same three rows directly
Figure 4.1: Same 60-row table, two ways to find 3 rows
Download .excalidraw source
·
Edit on excalidraw.com
Ten single-id GETs and a fetch-all count on one side, one batch-get call and one count-flag call on the other, with the measured call counts and byte totals
Figure 5.1: Two shapes, two measured contrasts, same table
Download .excalidraw source
·
Edit on excalidraw.com
A retried POST with no idempotency key creates a duplicate order and event; the same retry carrying an Idempotency-Key replays the stored response with a single effect
Figure 6.1: Safety comes from the server's own guard, not caller discipline
Download .excalidraw source
·
Edit on excalidraw.com
A hand-maintained contract loses its enum, required fields and operationId over time; a contract generated from annotated code on every build carries all three because there is nothing else to fall out of sync
Figure 7.1: A generated contract cannot drift from the code, because it is the code
Download .excalidraw source
·
Edit on excalidraw.com
Two independently maintained write-ups of the same API drift apart over time; one shared metadata bean rendering both the plain-text and HTML surfaces keeps them naming exactly the same operations
Figure 8.1: One source, two renderings, never two sources
Download .excalidraw source
·
Edit on excalidraw.com
The full payload wrapped under a friendlier name still carries every heavy and internal field; a purpose-built projection, read by its own narrow query, carries only what the task needs, and GraphQL field selection narrows it further still
Figure 9.1: Reshape the read, do not just rename the response
Download .excalidraw source
·
Edit on excalidraw.com
An opaque error returns a bare status code with nothing an agent can act on; an RFC 9457 problem response names what was wrong and a remedy specific to it, such as the current state and the transitions still allowed
Figure 10.1: A remedy is not the same information as a status code
Download .excalidraw source
·
Edit on excalidraw.com
A fire-and-forget write commits the moment it is called, with no way to see the effect first; the same intent endpoint with a dryRun flag returns a structured review with zero writes, a commit applies it, and a REJECTED_BY_USER decision is a graceful no-op
Figure 11.1: See the effect before it becomes permanent
Download .excalidraw source
·
Edit on excalidraw.com
Three faces reimplementing the same read independently can drift from each other silently; three faces delegating to one shared CDI bean return the same result by construction, because there is only one implementation to call
Figure 12.1: One bean behind three transports never drifts, because it never duplicates
Download .excalidraw source
·
Edit on excalidraw.com
A naive 1:1 API-to-MCP wrap leaves an agent to call three separate tools and assemble the answer itself; the tool/resource/prompt triad composes the same three reads into one tool response, backs it with a resource fetched once, and a prompt reading the same composed data
Figure 13.1: Compose for the question, not for the endpoint
Download .excalidraw source
·
Edit on excalidraw.com
Two small, domain-namespaced servers keep each tools/list short; a shared catalog resource holds the full twenty-operation set, with searchTools resolving a query to either a live tool or a catalog-only operation
Figure 14.1: Small live toolsets, a shared catalog for the rest
Download .excalidraw source
·
Edit on excalidraw.com
A separate gRPC payment-service image sits behind an MCP tool facade; the facade reshapes a decimal amount to int64 cents on the way in and back to decimal on the way out, and turns a gRPC status into an instructive tool error instead of leaking the protocol across
Figure 15.1: Reshape at the boundary, never wrap a heterogeneous protocol through unchanged
Download .excalidraw source
·
Edit on excalidraw.com
Three stacked guards in front of a two-tool MCP surface: an unauthenticated call is rejected before the MCP dispatcher runs, a role gates the read, and a scope plus an Elicitation confirm gate the write
Figure 16.1: Each tool adds its own requirement on top of the endpoint's own gate
Download .excalidraw source
·
Edit on excalidraw.com
A poll loop either sits idle on a timer or finds out late; the Camel Kafka consumer on apa.payments.processed wakes the agent's own call path the instant a payment is processed, and the tool call it makes is what the checks observe
Figure 17.1: The event wakes the agent; the tool call it makes is what the checks observe
Download .excalidraw source
·
Edit on excalidraw.com
Three agents coordinate only through events on shared topics, with no orchestrator; dropping the one link between shipping and notification stalls exactly that hop, leaving the earlier two agents' own work untouched
Figure 18.1: Cutting one link stalls one hop; the agents before it finish their own work regardless
Download .excalidraw source
·
Edit on excalidraw.com
The gate timeline from trigger to agent classification to a held PENDING row to a human decision that resumes it exactly once, compared against three other mechanisms for the same pattern across wait duration, durability, in-session versus out-of-band and who holds the state
Figure 19.1: A Kafka gate durably outlasts a restart, at the cost of answering out-of-band
Download .excalidraw source
·
Edit on excalidraw.com
The outer Camel Saga block runs three nested steps in order, reserve stock, take payment, an agent books a carrier; a declined payment throws, and the saga compensates every step enlisted so far, in reverse order
Figure 20.1: Every compensation is a guarded, idempotent UPDATE: calling it twice changes nothing the second time
Download .excalidraw source
·
Edit on excalidraw.com
An append-only Kafka log folds into a live projection; a replay reads the same log from the beginning and must reproduce it exactly, while a direct mutation that bypasses the log breaks that agreement until the live projection is rebuilt from the untouched log
Figure 21.1: The log is the durable record; rebuilding live from it erases a direct mutation's effect
Download .excalidraw source
·
Edit on excalidraw.com
Claude Code picks up the committed .mcp.json and negotiates initialize, tools/list, resources/list and prompts/list against a packaged MCP tool server; a scripted JSON-RPC client drives the identical lifecycle as a deterministic, repeatable check, and a tool absent from tools/list is rejected rather than driven
Figure 22.1: The same client lifecycle, driven by a human session and by a deterministic script
Download .excalidraw source
·
Edit on excalidraw.com
SKILL.md with frontmatter plus references/ and scripts/ is read directly from the repo as a project skill, and the same directory is packaged by package-skill.sh into a .skill zip bundle for distribution elsewhere; order-status.sh checks tools/list before calling an operation and refuses one absent from it
Figure 23.1: One skill directory, two distribution channels, one script that refuses to fabricate
Download .excalidraw source
·
Edit on excalidraw.com
The model's own retelling of a tool result is nondeterministic and unverifiable; the framework's captured tool-execution result is read and parsed server side before any model prose touches it, and the recorded tracking number is a value the model has no way to produce except by actually reaching the remote tool
Figure 24.1: The durable record comes from the captured tool result, never from the model's own retelling of it
Download .excalidraw source
·
Edit on excalidraw.com
A disabled consumer leaves a delivered event sitting unconsumed on its topic, never lost; the active consumer wakes a composing agent, builds the durable record from the event's own fields and writes it under a conflict guard keyed on order id and event type, so a redelivered event adds no second row
Figure 25.1: The event wakes the agent; the record it writes is keyed so a repeat of the same event is a safe no-op
Download .excalidraw source
·
Edit on excalidraw.com
An agent proposes a refund; DecisionRuleReviewer evaluates it against the committed rule's ordered clauses and records APPROVE or REJECT with the failed clause; pointing the same reviewer at the weakened rule, with the amount-ceiling clause removed, flips the identical violating proposal from REJECT to APPROVE, and restoring the rule rejects it again
Figure 26.1: The proposal varies; the committed rule and its verdict do not
Download .excalidraw source
·
Edit on excalidraw.com
A readiness probe confirms the process answers; a conformance check runs the committed OpenAPI contract through Schemathesis against the running service by its network name, diffs the served document against the committed one, and diffs the served MCP tools list against the committed manifest, with a drifted copy of each fixture proving the checks actually fail when the contract disagrees with the service
Figure 27.1: A conformance check compares what a service actually serves against what it commits to, and a drifted fixture proves the comparison bites
Download .excalidraw source
·
Edit on excalidraw.com
A live model run and a replayed fixture both produce the same transcript shape, a tool-call sequence, token usage and a durable outcome, which a deterministic evaluator scores against a committed eval spec by checking six ordered assertions and naming the first one a transcript violates
Figure 28.1: The evaluator scores the same transcript shape whether it came from a live run or a replayed fixture
Download .excalidraw source
·
Edit on excalidraw.com
An exit-code-judged run passes whether or not the contract held, while a pinned Newman container drives the committed collection and the run is judged by the JSON report's assertion counts and the named unknown-order 404 problem+json assertion
Figure 29.1: The report, not the exit code, is what the checks read
Download .excalidraw source
·
Edit on excalidraw.com
A trigger answers 202 in every case while the real outcome lands later as a gate row, order and payment rows and topic offsets; the harness polls those effects and confirms a dropped decision leaves no effect across a bounded window
Figure 30.1: The 202 is the same in every case; the durable effect is what distinguishes them
Download .excalidraw source
·
Edit on excalidraw.com