|
| 1 | +# Agent Interface Efficiency |
| 2 | + |
| 3 | +Status: Verifying |
| 4 | +Acceptance: pending |
| 5 | +Base: `34c2dcbaf9aa7ade5589ae5c88383719dda81200` |
| 6 | +Operation: implement this plan; user-authorized continuation of the MCP simplification. |
| 7 | + |
| 8 | +## Objective and admission |
| 9 | + |
| 10 | +Reduce repeated schema descriptions, route/read round trips, and repeated evidence |
| 11 | +references without changing policy, exact authority, review or publication meaning. |
| 12 | +The first workflow simplification is already integrated; retain its immutable |
| 13 | +contexts, bounded work pages, explicit decisions and lightweight status reads. |
| 14 | + |
| 15 | +The executable Router was run against the base with explicit task facts and no |
| 16 | +unresolved conditions. Selected concerns: implementation, verification, planning, |
| 17 | +documentation, build, development proportionality; library; generated-contract and |
| 18 | +IPC boundaries; contracts, architecture, dependencies, security, diagnostics and |
| 19 | +performance; code design, replay, schemas, protocol adapters, evolution and test |
| 20 | +oracles. No dependency, normative-policy or persistence-format change is planned. |
| 21 | + |
| 22 | +The existing schema/compiler, facade, navigation projection and MCP transport own |
| 23 | +this work. No workflow store, evidence registry, model evaluator, session pointer, |
| 24 | +new authorization mechanism or general-purpose orchestration language is admitted. |
| 25 | +The composed design has three independent presentation concerns; existing domain |
| 26 | +operations still own routing, reads, evidence verification and decisions. |
| 27 | + |
| 28 | +## Decisions |
| 29 | + |
| 30 | +1. Host-selected MCP schema presentation: compatibility remains the default for |
| 31 | + known clients with incomplete nested-schema rendering. Native presentation uses |
| 32 | + the smaller complete inline/reference projection without schema text in descriptions. |
| 33 | + Both modes validate exactly the same inputs. No client-name heuristic or hidden |
| 34 | + downgrade; a restart chooses another catalog and its existing digest identifies it. |
| 35 | +2. Optional `route.content` requests a bounded page of selected exact compact reads. |
| 36 | + Route and reads share one snapshot and compiled input. Page count is bounded; |
| 37 | + byte pressure returns fewer whole items with an exact snapshot/facts continuation. |
| 38 | + Unknown facts, full dependency qualification and purpose filtering are unchanged. |
| 39 | + An oversized first record returns a bounded typed limit rejection, never a |
| 40 | + truncated policy. Plain route and explicit single/grouped reads remain supported. |
| 41 | +3. Authoring agent inputs may supply a request-local `evidence` table and typed |
| 42 | + `evidence_ref` uses. Generated agent input variants preserve native domain input |
| 43 | + types; the facade validates and expands only typed reference positions, then |
| 44 | + validates the native call before dispatch. Every use explicitly selects evidence. |
| 45 | + Missing/unused entries reject before effects; native evidence uniqueness is enforced after expansion. |
| 46 | + Provider/digest/current-authorization checks and expanded batch limits are unchanged. |
| 47 | + |
| 48 | +## Compatibility and state |
| 49 | + |
| 50 | +Interface 39 is an additive request capability and coordinated catalog update. |
| 51 | +Native authoring request types, Analysis request/state versions, all handles, SQLite, |
| 52 | +readiness, application and recovery representations stay unchanged. Application |
| 53 | +catalogs contain no authoring evidence variants. Native schema mode is opt-in until |
| 54 | +actual configured-client qualification is available. Restart/reconnect clients; |
| 55 | +preserve stores, proposals and exact contexts. No automatic retries or publication. |
| 56 | + |
| 57 | +## Write set |
| 58 | + |
| 59 | +- Engine canonical schema/interface and generated model/tool projections. |
| 60 | +- `tools.py`, `mcp.py`, `agent_navigation.py`, `context_projection.py`, plus one |
| 61 | + request-local evidence normalization module if required by its separate concern. |
| 62 | +- Focused contract, navigation, evidence and MCP tests; affected catalog consumers, |
| 63 | + examples and optional configured-client harness. |
| 64 | +- Engine READMEs/PURPOSE-SEPARATION and authoring/navigation/environment skill references. |
| 65 | +- This plan, ledger, issues and verification; generated suite-input manifest. |
| 66 | + |
| 67 | +Directly affected consumers inside these owners may be added in the ledger. |
| 68 | +Normative content, approvals, provenance, locks and user stores are outside the write set. |
| 69 | + |
| 70 | +## Acceptance |
| 71 | + |
| 72 | +- Canonical native/agent schema validation and independent Draft 2020-12 validation |
| 73 | + agree for valid and malformed fixtures in both presentation modes; generated |
| 74 | + outputs are fresh. Input fields, omissions, recursion and extra-field rejection |
| 75 | + retain meaning. Runtime catalog identity tracks actual definitions; equivalent catalogs share an identity. |
| 76 | +- Route-content equals ordinary exact reads, including all pages; known missing |
| 77 | + facts stay unresolved; partial pages, oversized records, invalid selections, |
| 78 | + unavailable qualifications and snapshot lifecycle changes are explicit. |
| 79 | + One compiled input is used per call, without additional snapshot capture. |
| 80 | +- Shared and inline evidence produce identical exact native decisions/analysis and |
| 81 | + review outcomes. Alias errors, stale evidence, unsupported providers, foreign work, |
| 82 | + native uniqueness violations after expansion and expanded-size overflow publish nothing. Cold process |
| 83 | + reconstruction needs no alias table. Caller inputs remain unchanged. |
| 84 | +- Real stdio traces compare call counts and serialized request/result/catalog bytes |
| 85 | + against the base. Report tradeoffs; byte counts do not claim token/billing savings. |
| 86 | +- Focused and affected package suites, structural checkpoint and patch reconstruction |
| 87 | + pass. Supported locked Python 3.11/3.12, configured-client qualification and |
| 88 | + independent review remain separately named gates when unavailable locally. |
| 89 | + |
| 90 | +## Sequence and next slice |
| 91 | + |
| 92 | +Implement the three bounded concerns with tests, regenerate contracts, run integrated |
| 93 | +checks and measurements, then package changed files and review evidence. Current next |
| 94 | +slice: integration qualification and independent review after the local verification |
| 95 | +and base-pinned delivery. Implementation of the three admitted concerns is complete; |
| 96 | +remaining acceptance gates are tracked in issues.md and verification.md. |
0 commit comments