Skip to content

fix: correct fabricated contract/workflow JSON shapes on concepts page - #45

Merged
enricopiovesan merged 1 commit into
mainfrom
fix/concepts-real-schema
Jul 30, 2026
Merged

fix: correct fabricated contract/workflow JSON shapes on concepts page#45
enricopiovesan merged 1 commit into
mainfrom
fix/concepts-real-schema

Conversation

@enricopiovesan

Copy link
Copy Markdown
Collaborator

Summary

docs/concepts.astro's two illustrative JSON examples didn't match the real runtime schema:

  • Contract anatomy: used a flat "binary_format": "wasm32-wasi" / "entrypoint": "function_name" and top-level inputs/outputs, instead of the real CapabilityContract shape ("wasm" binary format, an entrypoint object, inputs.schema/outputs.schema nesting, top-level emits/consumes). It also never showed preconditions/postconditions at all, despite the surrounding prose naming them as the whole point of a contract.
  • Workflow definition excerpt: used a graph.capabilities + terminal_conditions shape that doesn't exist anywhere in the real runtime. The actual schema is nodes/edges/start_node/terminal_nodes, verified against the real workflows/examples/expedition/plan-expedition/workflow.json in traverse-framework/traverse. This fabricated shape is the likely source of an AI agent independently inventing the identical wrong schema when asked to build a Traverse workflow with only this page as reference.

Also fixes a stale placement-targets claim ("only local is fully implemented") that predates the browser embedder SDK shipping — see /platforms.html.

Test plan

  • npm run build — 86 pages, no errors
  • Verified via DOM query that the corrected JSON blocks render ("kind": "workflow_definition", "start_node" present) and the new /platforms.html link resolves correctly
  • Confirmed zero remaining occurrences of the stale wasm32-wasi string in the file

The contract.json anatomy example used a flat "wasm32-wasi"/function-
name entrypoint and top-level inputs/outputs instead of the real
CapabilityContract shape (nested inputs.schema/outputs.schema, an
entrypoint object, top-level emits/consumes), and omitted precondi-
tions/postconditions entirely despite the surrounding prose naming
them as the core concept.

The workflow definition excerpt was worse: a graph.capabilities +
terminal_conditions shape that doesn't exist anywhere in the real
runtime. The actual schema is nodes/edges/start_node/terminal_nodes,
verified against workflows/examples/expedition/plan-expedition/
workflow.json in traverse-framework/traverse. This fabricated shape
was traced back as the likely source of an AI agent independently
inventing the same wrong schema when asked to build a Traverse
workflow without more accurate reference material.

Also fixes a stale placement-targets claim ("only local is fully
implemented") that predates the browser embedder SDK shipping.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@enricopiovesan
enricopiovesan merged commit 9032bc3 into main Jul 30, 2026
2 checks passed
@enricopiovesan
enricopiovesan deleted the fix/concepts-real-schema branch July 30, 2026 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant