RFC 001: Run invocation I/O and MAG tool_calls - #2
Conversation
Introduces contracts/rfcs with an index and the first platform-alignment draft. Co-authored-by: Cursor <cursoragent@cursor.com>
brettin
left a comment
There was a problem hiding this comment.
Review: RFC 001 — Run invocation I/O and MAG tool_calls
Overall this is a well-motivated RFC that correctly identifies two real gaps between the core-v3 spec and the ARIAPlatform_v0 wire format. The scaffolding (RFC index, merge-order table, cross-link from contracts/README.md) is clean and makes the process discoverable. A few observations and suggestions below.
✅ What works well
-
Gap identification is accurate. The spec's
execution-context.schema.jsonis strictly reproducibility-oriented (configHash,environmentHash,seedList,dataVersion) withadditionalProperties: false. The platform'sExecutionContext(in both serverruns.pyand clientcommon.py) carriesinputs,parameters,environment,artifacts, anddatasets— none of which the spec accommodates. This RFC correctly calls that out. -
tool_callsshape is documented. The MAG service (mag.py) normalizes all provider responses to[{ id, name, input }]vianormalize_openai_tool_calls(). The RFC captures that canonical shape. -
Dual-path proposal (companion schema vs.
x-gmpextension block) is pragmatic — it acknowledges the spine-vs-companion tension without prematurely committing. -
The RFC index and merge-order table in
rfcs/README.mdgive good visibility into the full alignment series.
🔍 Suggestions
-
Pick a recommended disposition. The RFC presents companion schema vs.
x-gmpbut doesn't stake a recommendation. Given theGAP_DISPOSITION_REGISTER.mdpattern of routing invocation-level concerns to "companion" disposition, a companion schema (run-invocation.schema.json) seems more aligned with the spine philosophy. Consider adding a "Recommended approach" subsection with a rationale. -
The gap is wider than described. Cross-referencing the platform code reveals additional wire-format fields not mentioned in the RFC:
- Server-side
RunResponse(inaria-server) includesinputs,parameters,outputs,artifacts, anderror— all absent from the spec'srun.schema.json. - Client-side
ExecutionContext(inaria-client) hascontext_hash,inputs,parameters,environment,artifacts,datasets— substantially richer than the spec's four required fields. - The RFC focuses on
inputs/parametersandoutputs.tool_calls. Shouldartifacts,datasets,environment, anderrorbe in-scope here, or are they intentionally deferred? A one-line "Out of scope" note would clarify.
- Server-side
-
Flesh out the interop section. The proposal says "Document OpenAI/Anthropic interop and MAG normalization" but doesn't elaborate. The MAG service already handles this: OpenAI tool calls use
arguments(JSON string), Anthropic usesinput(object), MAG normalizes to{id, name, input}. Even a brief mapping table would strengthen the RFC:Provider Field Type MAG normalized OpenAI argumentsJSON string input(parsed object)Anthropic inputobject input(pass-through) -
Add a concrete schema sketch. A draft JSON Schema fragment — even a few lines showing the
inputs,parameters, andoutputs.tool_callsshape — would make the RFC much easier to evaluate and would give downstream RFC authors (002–006) something concrete to reference. -
Status enum heads-up. While reviewing platform code for context, I noticed the spec's Run status enum is
["queued", "running", "succeeded", "failed", "cancelled"]but the platform uses["pending", "planning", "running", "paused", "completed", "failed", "cancelled"]. This is presumably RFC 003's territory, but worth a cross-reference note in RFC 001 since the Run schema is touched by both. -
Broken reference? The RFC index links to
spec-implementation-gap-register.jsonin ARIAPlatform_v0'sreference/directory, but that file doesn't appear to exist at that path currently. Worth verifying the link is still valid.
Summary
Strong start — the gap analysis is correct and the RFC addresses a real alignment need. Main suggestions: (a) add an "out of scope" note for the fields not covered, (b) flesh out the interop/normalization section, (c) include a draft schema sketch, and (d) recommend a disposition (companion schema vs. x-gmp).
Happy to discuss any of these points.
Recommended approachDisposition: companion_spec — add companion/schemas/run-invocation.schema.json and link it from spine Run / submitRun via invocationRef and invocationDigest (same pattern as planRef / planDigest for CampaignPlan). Rationale: Invocation I/O (inputs, parameters, outputs.tool_calls) is portable interchange data for agent/LLM runs, not spine infrastructure. Keeping execution-context.schema.json hash-only preserves reproducibility semantics; optional adoption via core-v3-companion avoids widening mandatory GA for non-agent deployments. Not chosen: x-gmp inline fields are a possible short-term bridge for platform v0, but execution-context.schema.json and run.schema.json use additionalProperties: false, so experimental extensions still require a schema change and do not graduate cleanly to interop. A direct spine patch would make LLM payloads mandatory core surface — out of step with the spine charter. |
Out of scopeShould artifacts, datasets, environment, and error be in-scope here, or are they intentionally deferred? They should be intentionally deferred from RFC 001. That matches the PR’s gap IDs (xrun-execution-context-io, xrun-outputs-tool-calls) and keeps the RFC focused on one alignment problem: what you send to invoke an LLM run and what MAG returns as model-requested tool calls. |
RFC 001 scope: in-scope vs deferredRFC 001 should own "invoke the model" (prompt/messages, tools, model params →
Optional later: if platform |
|
I think RFC001 identifies the right gap and the companion-schema direction is the right split: literal invocation I/O should not widen the core spine One thing I would tighten before treating the RFC as accepted: it should explicitly define the boundary between three records that are easy to conflate:
That distinction is mostly implied by RFC001 + the implementation PR, but spelling it out in RFC001 would make RFC002 much cleaner and avoid another round of ambiguity around where arguments/results belong. |
Oaklight
left a comment
There was a problem hiding this comment.
Approved.
RFC001 correctly identifies the run invocation I/O gap, and the companion-schema disposition has now been implemented concretely in #8 as RunInvocation.
The remaining details that were open in the RFC discussion are addressed by the implementation PR:
- literal invocation payloads stay outside the mandatory spine;
outputs.tool_calls[]is defined as{ id, name, input };- MAG/model-turn records are separated from executed-tool telemetry, leaving the latter for RFC002;
- sensitivity/retention guidance is included in the companion interop note.
I think this PR is useful to merge as the RFC record before #8, since #8 links back to contracts/rfcs/001-run-invocation-and-tool-use.md.
Summary
Adds
contracts/rfcs/with an index and RFC 001, proposing how core-v3 should represent run invocation inputs/outputs (including MAGtool_calls) beyond execution-context hashes alone.Gap IDs
xrun-execution-context-ioxrun-outputs-tool-callsTracking
Part of #1 (platform v0 alignment RFC series). Merge before RFC 002.
Test plan
execution-context.schema.jsonandrun.schema.jsonMade with Cursor