# Field — Contract Translation and Operational Cautions

The HAWK paper supplies an architectural vocabulary. Miadi turns that
vocabulary into software contracts and runtime choices. Keeping the translation
visible prevents local behavior from acquiring borrowed authority.

## Source-to-implementation crosswalk

| Concern | HAWK directly supplies | Miadi authors |
|---|---|---|
| Architecture | five layers, twenty modules, separation of concerns | package boundaries, route ownership, runtime placement |
| Interfaces | I1–I16 adjacency and purpose | TypeScript request/response fields and discriminated maps |
| Message identity | no wire envelope | `messageId`, `traceId`, timestamps, layer/module addresses, session and idempotency metadata |
| Transport | protocol-agnostic positioning above MCP/ANP/A2A | Redis-backed broker, polling, acknowledgement, HTTP routes |
| Reliability | monitoring and optimization concepts | queue semantics, retries, deduplication, expiry, error handling, delivery evidence |
| Security | an Operator Security module | authentication tiers, authorization rules, caller identity, audit behavior |
| Narrative state | versioned environment and character memory | `@miadi/episodic-memory-schema` and its broader provenance/continuity model |
| Evaluation | ten predicates and DNF-based candidate selection | schema representation, reviewer ownership, scoring policy, human gates |

## Current Miadi truth

- `@miadi/a2a-contracts` is a contract-focused, zero-dependency package. Its
  I1–I16 payloads and `makeRequest` constructor helper are useful Miadi
  contracts, not schemas copied from the paper.
- `lib/a2a-v2` wraps those contracts around Miadi's v1 Redis broker. Typed
  envelopes do not by themselves provide runtime validation or delivery
  guarantees.
- `app/api/a2a/v2/send`, `inbox`, and `health` expose that coordination surface.
- `app/api/a2a/v2/worker-stopped` is an adjacent Miadi operational receipt; it
  is not one of HAWK's sixteen interfaces.
- The deployed Hermes-derived herd currently coordinates through conductor
  receipts and gateway webhook ingress, not through A2A v2. A2A v2 remains a
  reusable contract surface rather than the assumed production substrate.

## Assurance requirements HAWK leaves open

Before an interface can claim production interoperability, Miadi must define and
test:

1. schema versions and runtime validation;
2. identity, authentication, and authorization;
3. timeout, retry, acknowledgement, ordering, and deduplication semantics;
4. error and cancellation envelopes;
5. correlation, replay, retention, and audit rules;
6. authority over semantic or execution-state transitions;
7. compatibility tests across independently implemented modules.

## Failure-aware adoption

Research on multi-agent LLM failures groups common breakdowns around
specification/system design, inter-agent misalignment, and verification or
termination. Those categories align with HAWK's open edges: a layer diagram
cannot replace precise role contracts, shared state cannot replace alignment,
and an LLM ending check cannot replace auditable termination authority.

The practical adoption rule is therefore: use HAWK to name stable boundaries;
use Miadi contracts and evidence to make each boundary executable; and do not
claim the latter merely because the former exists.
