Skip to content

Adapter Authoring

An adapter is the unit of UMMAYA expansion. One adapter should wrap one public-service channel, mockable policy shape, or official handoff path as one tool entry with schema, citation, state label, and permission metadata.

Adapter authoring is not only backend work. The adapter determines what the docs may honestly claim, what the model may call, what permission the user sees, and what evidence the final answer can cite.

Before writing code, classify the channel.

StateUse whenDocumentation consequence
Liveofficial callable channel and credential path existdocs may describe evidence-backed execution within scope
Mockchannel shape is known or policy-mandated, but live access is unavailabledocs must label simulation
Handoffnext step belongs to an opaque official servicedocs should prepare the path and stop
Plannedtarget-state demand exists but shape/evidence is not readydocs may describe roadmap, not current capability

This decision must happen first because it changes schema, tests, permission wording, and user-facing claims.

A useful adapter needs enough structure for the query engine and docs to agree.

RequirementWhy it matters
primitiveties the adapter to locate, find, check, or send
input/output schemaprevents plausible but invalid tool calls
Live/Mock/Handoff statecontrols user-facing authority language
permission tierseparates public lookup from protected action
public or policy citationprevents UMMAYA-invented authority
fixture or artifactmakes Mock or Live behavior inspectable
search hintslets retrieval find the adapter from citizen language

If the adapter lacks these fields, the docs should not promote it as evidence for a user workflow.

Every adapter that affects user-facing coverage needs prose. The prose should say what the adapter can support, what it cannot support, what status label applies, and what answer language is safe.

For example, a public weather adapter can support Live weather lookup. It cannot support personal disaster benefit eligibility unless a separate protected path exists. The docs should keep those claims separate.

Promotion from Mock to Live requires evidence, not optimism. The project needs official endpoint or channel validation, credential handling, schema validation, permission metadata, sanitized request/response artifacts, and tests that do not call live citizen infrastructure from CI.

After promotion, regenerate the docs surfaces and review affected pages:

Terminal window
npm run docs:generate
npm run docs:check

If the generated adapter metadata changes, user docs and LLM-readable docs must change with it.

The common failure is adding a tool and then writing broad marketing copy. UMMAYA should do the reverse: prove the channel shape, define the boundary, then let the docs claim only what the evidence supports.