a2ui-project / a2ui-project/a2ui
LLM-State Contract — Schema Agreement Between App and AI
- 主要語言
- TypeScript
- 星號
- 16.4k
- 分支
- 1.3k
- 平均合併
- 3 天 15 小時
- 30 天內合併 PR
- 134
描述
_↴ Ported from [flutter/genui#640](https://github.com/flutter/genui/issues/640) — originally opened by [leoafarias](https://github.com/leoafarias) on 2025-12-23._
_Original labels: front-line-handled_
---
**Is your feature request related to a problem? Please describe.**
There is no agreement between app and AI about state structure. The LLM receives widget schemas but not a state manifest, so it guesses paths, can create arbitrary ones, and can vary paths between turns. Ownership of state structure (app vs. AI) is undefined.
**Describe the solution you'd like**
A defined state contract: a discoverable schema/manifest of allowed paths, plus guidance on ownership. Preferably, app state is the source of truth and `DataModel` is a derived view, with validation for path creation.
**Describe alternatives you've considered**
Letting the LLM create state freely, or constraining via prompt-only guidance. Both lead to brittle results (non-reactive UIs, invented paths, or inconsistent regeneration).
**Additional context**
Discussion: https://github.com/flutter/genui/discussions/609
---
### 1 comment(s) from the original issue
**[yjbanov](https://github.com/yjbanov)** commented on 2025-12-29:
An agreement system between the app and the AI on data structure, but also read/write permissions, makes sense. Treating app state as the source of truth with `DataModel` being a derived view is an interesting idea. I can actually see this extending into a wider "BusinessModel" containing both data and business logic (actions/events), with structure and rules defined in a way that's easy to describe to the LLM (like we do for the widget catalog) and, crucially, easy to enforce (e.g. as part of upholding the required trust model and/or as protection for certains kinds of hallucinations).
貢獻指南
研究方向
查看連結的討論 #609,以了解目前狀態和 widget schema 系統。檢查 DataModel 目前如何從應用程式狀態衍生。目標是為狀態路徑和權限設計一個 schema/manifest 系統,並將其整合到現有的 LLM 互動模型中。「Done」表示已提出狀態契約及其驗證的設計。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- typescript
- 領域
- ai-infra-agents
- Issue 類型
- 功能
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 30/100