Skip to content

Conversation

@gspencergoog
Copy link
Collaborator

@gspencergoog gspencergoog commented Sep 19, 2025

Description

This pull request adds comprehensive documentation for two UI streaming protocols, GSP and GULF. The GULF protocol, a key focus, is tailored for generative AI models, emphasizing simplicity, progressive rendering, and a clear separation of concerns between UI layout and data. It outlines a unidirectional server-to-client JSONL stream for UI updates and a separate mechanism for client-initiated events.

Highlights

  • New Protocol Documentation Added: This pull request introduces two new markdown documents detailing UI streaming protocols: the GenUI Streaming Protocol (GSP) and the GULF (Generative UI Language Format) Protocol.
  • GULF Protocol Focus: The GULF Protocol is specifically designed with 'LLM-friendliness' in mind, featuring a declarative, flat component structure and progressive rendering over JSONL streams. It separates UI structure from dynamic data and handles client-to-server events via a distinct REST API.
  • Review Feedback on GULF Protocol Doc: Initial review comments highlight several inconsistencies and errors in the gulf_protocol.md document, including conflicting definitions for StateUpdate messages, incorrect protocol naming in the JSON schema, and minor formatting issues.
Changelog
  • packages/spikes/gulf_client/docs/genui_streaming_protocol.md
    • Added documentation for the GenUI Streaming Protocol (GSP).
    • Details the core philosophy of decoupling Catalog, Layout, State, and Data Model.
    • Describes communication via JSONL stream with message types like StreamHeader, Layout, LayoutRoot, and StateUpdate.
    • Outlines the data flow model from client initialization to server-side logic and UI updates.
    • Includes sections on Widget Catalog, UI Composition (Adjacency List Model, List Rendering), State Management (Data Binding with Transformations), Event Handling, and complete JSON Schema definitions.
    • Discusses client-side implementation best practices, progressive rendering, performance, and error handling.
    • Introduces an optional delta update mechanism for StateUpdate and LayoutUpdate payloads.
  • packages/spikes/gulf_client/docs/gulf_protocol.md
    • Added documentation for the GULF (Generative UI Language Format) Protocol.
    • Defines design requirements focusing on LLM-friendliness, progressive rendering, platform-agnosticism, efficient state management, and robust communication architecture.
    • Describes the JSONL stream for server-to-client communication with message types: streamHeader, componentUpdate, dataModelUpdate, and beginRendering.
    • Explains client-to-server event handling via a separate REST API using ClientEvent messages.
    • Details the Component Model, including componentUpdate messages, Component Objects, and componentProperties using a discriminated union pattern.
    • Covers UI Composition with an Adjacency List Model and dynamic list rendering using template.
    • Explains Dynamic Data & State Management through dataModelUpdate messages and BoundValue objects for data binding.
    • Provides a complete GULF JSON Schema for message validation.

gemini-code-assist[bot]

This comment was marked as resolved.

@flutter flutter deleted a comment from gemini-code-assist bot Sep 23, 2025
@gspencergoog
Copy link
Collaborator Author

(The GSP document is outdated, but I wanted to commit it somewhere for posterity).

Copy link
Collaborator

@jacobsimionato jacobsimionato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay!

@gspencergoog
Copy link
Collaborator Author

gspencergoog commented Sep 23, 2025

Delay? I literally just assigned it to you to review. :-)

@gspencergoog gspencergoog merged commit 76beacc into main Sep 23, 2025
13 checks passed
@gspencergoog gspencergoog deleted the add_gulf_protocol_doc branch September 23, 2025 20:49
redbrogdon pushed a commit to redbrogdon/genui that referenced this pull request Sep 30, 2025
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.

2 participants