a2ui-project / a2ui-project/a2ui

LLM-State Contract — Schema Agreement Between App and AI

Đang mở
#1,852 1 bình luận 0 reaction 1 người được giao Được @yjbanov nhận Xem trên GitHub
component: genui component: specification P2 status: first-line-handled type: feature/enhancement
Ngôn ngữ chính
TypeScript
Star
16.4k
Fork
1.3k
Merge trung bình
3 ngày 15 giờ
Pull request đã merge (30 ngày)
134

Mô tả

_↴ 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).

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Xem lại cuộc thảo luận được liên kết #609 để hiểu trạng thái hiện tại và hệ thống schema của widget. Kiểm tra cách DataModel hiện được suy ra từ trạng thái của ứng dụng. Mục tiêu là thiết kế một hệ thống schema/manifest cho các đường dẫn trạng thái và quyền hạn, tích hợp với mô hình tương tác LLM hiện có. “Done” nghĩa là đã có thiết kế được đề xuất cho contract trạng thái và việc xác thực contract đó.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
typescript
Lĩnh vực
ai-infra-agents
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
30/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.