Skip to content

docs: the contract, the seam list and the @experimental tags name different interfaces #340

Closed

Description

@schlessera

Context

Part of #56. Found by the 1.0 surface audit (#319), against main @ 550a41ef.

Three documents each list the extension interfaces 1.0 would freeze, and they
list different sets:

  • docs/integration-contract.md:574-576 names EmbeddingProvider,
    CompletionProvider, AgentRunner, SkillEmitter "and the ui-sdk
    interfaces". It does not name SiteAdapter (packages/scrape/src/adapter/types.ts:66)
    at all, and "the ui-sdk interfaces" does not say which of the package's
    ~1,050 exported names (api-report/ui-sdk.txt) it means.
  • docs/extending/README.md:62 says "All seams are marked @experimental until
    1.0". Of the nine seams it documents at :69-108, none carries its own tag:
    • the four core seams (packages/core/src/lib/seams.ts:22, :37, :54,
      :97) are covered only by a file-header comment at seams.ts:2, which a
      type checker and an editor tooltip never attach to the symbol;
    • AgentBackend (packages/ui-sdk/src/server/backend.ts:371), and the
      BackendBridge (:123) and BackendCapabilities (:51) it is made of,
      are untagged, while eight of their members and helpers are tagged
      (:98, :254-287, :335, :359, :422);
    • SpeechProvider (packages/ui-sdk/src/server/speech.ts:20), AsrClient
      (packages/ui-sdk/src/client/asr.ts:15), ToolRenderer and RendererPack
      (packages/ui-sdk/src/client/renderers.ts:44, :68) and SiteAdapter
      are untagged. Only BackendModule (packages/ui-sdk/src/server/backend-module.ts:151)
      is tagged the way the Stability section says every seam is.
  • Nothing checks that the three agree, so they drifted apart one additive
    change at a time.

The same pass found three stale statements in the documents 1.0 would freeze:

  • packages/ui-sdk/README.md:25 says "Protocol rev 3"; PROTOCOL_REV is 4
    (packages/ui-sdk/src/protocol.ts:44).
  • The brain jobs scrape --json example at docs/integration-contract.md:135
    and :172 uses remoteineurope, the board 97d19d9 retired.
  • The Consumers table (docs/integration-contract.md:25) says brain.db is read
    for voice keyterms; packages/ui-server/src/graph/reader.ts also reads the
    graph_* tables the brain.db section documents.

Which exports belong in the frozen set beyond the nine documented seams (the
permission-gate, confirm-pattern and subprocess-env helpers, VOICE_ALLOWED_TOOLS,
DocumentRenderer, the module manifest) is a judgement. It is not part of
this issue. #343 holds those questions.

Scope

  • Put an individual @experimental TSDoc tag on each declaration of the nine
    documented seams, and on the types a seam is made of (BackendBridge,
    BackendCapabilities, StartTurnRequest, RendererPack, SpeechSession,
    AsrClientOptions, AdapterResult, ScrapeContext). The per-symbol tags
    replace the file-header comment in seams.ts.
  • Rewrite docs/integration-contract.md "Extension interfaces" to name every
    seam and the package that exports it, instead of "the ui-sdk interfaces".
  • Fix the three stale statements above.
  • Add a test that reads the seam list in docs/extending/README.md, the list in
    docs/integration-contract.md "Extension interfaces", and the
    @experimental tags on exported declarations, and fails naming any seam
    that appears in one and not the others.

Out of scope

Acceptance criteria

  • Every declaration listed under Scope carries its own @experimental tag,
    and seams.ts no longer relies on a file-header comment.
  • docs/integration-contract.md "Extension interfaces" names each of the
    nine seams by interface and package.
  • packages/ui-sdk/README.md states rev 4; the scrape example names a board
    that exists; the Consumers row names the graph reader.
  • The new test fails when the tag is removed from one seam (for example
    SiteAdapter), and when a seam is deleted from either document. Each
    mutation and its failing assertion is recorded in the PR.

Verification

bun run test including the new test; the mutation receipts in the PR.

Contract impact

  • This touches the integration contract, so it needs the contract label, a CONTRACT: commit prefix, and the doc updated in the same commit.
  • This changes a published package's behaviour, so it needs a changeset.

The contract edit is wording and classification only: no shape changes.

Activity

  1. added
    area: corepackages/core: the brain CLI, indexer, hybrid search, config, taxonomy, skills.
    area: ui-sdkWire protocol, runtime schemas, the server and client SDK surfaces.
    area: scrapePolite HTTP, robots.txt, headless Chrome, site adapters.
    area: docsThe docs/ tree and the README / AGENTS / CONTRIBUTING surfaces.
    agent-readyContext and acceptance criteria are complete enough for an agent to take this unattended.
    contractTouches the integration contract: CONTRACT: commit, contract doc updated in the same commit.
    on Sep 25, 2026
  2. added this to the 0.38.0 milestone on Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readyContext and acceptance criteria are complete enough for an agent to take this unattended.area: corepackages/core: the brain CLI, indexer, hybrid search, config, taxonomy, skills.area: docsThe docs/ tree and the README / AGENTS / CONTRIBUTING surfaces.area: scrapePolite HTTP, robots.txt, headless Chrome, site adapters.area: ui-sdkWire protocol, runtime schemas, the server and client SDK surfaces.contractTouches the integration contract: CONTRACT: commit, contract doc updated in the same commit.type: docsDocumentation only.

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions