Skip to content

Commit da0e098

Browse files
hotlongclaude
andcommitted
docs(design): reuse-first core constraint + committed wireframe
Add the fourth core constraint — reuse Studio's protocol-generated metadata forms, never hand-roll config UI — and a Build-boundary section that answers how code written against this doc stays correct: the novel surface is only the shell/composition; the grid (ListView) and every inspector panel (protocol forms) are reused by reference. Commit an SVG wireframe of the Data pillar shell (rail/tabs/grid/inspector) with a solid=built / dashed=reused legend, embedded in the doc as the visual target. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 855e9ad commit da0e098

2 files changed

Lines changed: 176 additions & 45 deletions

File tree

docs/design/builder-ui.md

Lines changed: 47 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,18 @@ records the *decisions and rejected alternatives* (the information architecture)
66
this doc records *how it looks and flows* — it iterates as the UI is built, and is
77
not a binding contract.
88

9-
The atomic config panels (object designer, field editor, validation-rule editor,
10-
form designer, …) already exist. This doc is about the **overall layout** that
11-
composes them into one coherent builder, optimized for operation experience.
9+
This doc specifies the **shell and layout** — how the builder composes surfaces. It
10+
does **not** re-specify the per-item config panels: those are Studio's existing
11+
protocol-generated metadata forms, reused as-is (§1.4). What the builder actually
12+
builds is the composition; the panels are dropped in.
1213

1314
---
1415

15-
## 1. Core constraint — AI-first, human-confirmable authoring
16+
## 1. Core constraints — AI-first, human-confirmable, reuse-first
1617

17-
Every layout and interaction decision in the builder is judged against three
18-
requirements. They are the north star: a design that fails any of them is wrong,
19-
however convenient it looks. Each pillar's design (below) is checked against them.
18+
Every layout and interaction decision in the builder is judged against these. They
19+
are the north star: a design that fails any of them is wrong, however convenient it
20+
looks. Each pillar's design (below) is checked against them.
2021

2122
1. **AI generates it in one shot.** The builder must let the agent produce a whole,
2223
correct artifact — an object with its fields, validations, and layout — in a
@@ -27,7 +28,7 @@ however convenient it looks. Each pillar's design (below) is checked against the
2728

2829
2. **The design prevents AI mistakes.** Constrain the space so an invalid result is
2930
hard to express: declarative over code (a condition builder, not hand-written CEL,
30-
§3 Validation), typed and enumerated inputs, and the pre-publish validation gates
31+
§4 Validation), typed and enumerated inputs, and the pre-publish validation gates
3132
(`os validate` / `os build`). Nothing the AI writes goes live implicitly — it lands
3233
as a **draft** (ADR-0033), never auto-published.
3334

@@ -36,27 +37,35 @@ however convenient it looks. Each pillar's design (below) is checked against the
3637
canvas (the grid + inspector) with no modals hiding state (§3.7) and a non-blocking
3738
inspector, so the whole thing stays visible while it is reviewed.
3839

39-
These three are *why* the shell is what it is — same-renderer, declarative surfaces,
40-
no-modal, draft/publish all fall out of them.
40+
4. **Reuse, never rebuild.** Every per-item config panel — the field editor, the
41+
validation-rule editor, object settings, and every other metadata form — **is
42+
Studio's existing protocol-generated form**, generated from the metadata-type
43+
schemas, and is dropped into the inspector unchanged. The builder does **not**
44+
hand-roll config UI. This is not just tidiness: reused, already-verified panels are
45+
panels the AI cannot get wrong and a human has seen before, which is what makes
46+
constraints 1–3 achievable in practice.
47+
48+
### Build boundary — what the builder builds vs. reuses
49+
This is the answer to *"how do we ensure code written against this doc is correct?"*
50+
shrink the novel surface to almost nothing:
51+
52+
- **Built here (the shell / composition):** the top bar + pillar tabs, the left rail,
53+
the per-object facet tab bar, the work-surface chrome, and the wiring that routes a
54+
selection into the inspector and edits into draft metadata.
55+
- **Reused (not rebuilt):** the data grid (the existing ListView renderer), and every
56+
config panel in the inspector (Studio protocol-generated forms). These are
57+
referenced by name; the builder composes them, it does not reimplement them.
58+
59+
Solid vs. dashed in the wireframes marks this boundary.
4160

4261
---
4362

4463
## 2. The shell (every pillar shares it)
4564

46-
```
47-
┌───────────────────────────────────────────────────────────────────┐
48-
│ app ▾ Data · Automation · Interface · Access ⚙ Save · Publish │ ← top bar
49-
├─────────┬───────────────────────────────────────────┬──────────────┤
50-
│ left │ main (the work surface) │ right │
51-
│ rail │ │ inspector │
52-
│ │ grid / canvas / builder / matrix │ = selected │
53-
│ entities │ + a per-entity facet tab bar (see Data) │ item's │
54-
│ + search │ │ config │
55-
│ + new │ │ (non-block) │
56-
├─────────┴───────────────────────────────────────────┴──────────────┤
57-
│ breadcrumb · hints │
58-
└───────────────────────────────────────────────────────────────────┘
59-
```
65+
![Data pillar shell — rail, facet tabs, grid, inspector](./builder-ui/data-pillar.svg)
66+
67+
*Solid frame = shell/composition built in the builder; dashed frame = existing Studio
68+
component (grid = ListView; inspector = protocol-generated form) reused as-is.*
6069

6170
- **Top bar** — the four pillar tabs (Data / Automation / Interface / Access), the
6271
⚙ Settings entry, the app switcher, and the draft indicator + Save draft /
@@ -68,7 +77,7 @@ no-modal, draft/publish all fall out of them.
6877
- **Right inspector** — a *persistent, consistent* slot that shows the config panel
6978
for whatever is selected in the main zone. Non-blocking (the main surface stays
7079
visible); slides in on select, closable. This is the universal "inspector"
71-
(Figma / Retool pattern).
80+
(Figma / Retool pattern). Its contents are always reused protocol forms (§1.4).
7281

7382
## 3. Design principles (for best operation experience)
7483

@@ -94,6 +103,8 @@ no-modal, draft/publish all fall out of them.
94103
7. **No modals.** Config surfaces in the inspector or as a focused sub-view with a
95104
breadcrumb; the work surface never fully disappears. Draft/publish is always
96105
visible.
106+
8. **Reuse, never rebuild (§1.4).** Config panels are Studio protocol-generated
107+
forms; the builder composes, it does not reimplement.
97108

98109
---
99110

@@ -104,18 +115,6 @@ and validations, and work with records. Data owns the *data layer and the field
104115
designer*; runtime presentation surfaces (saved grid views, kanban, calendar, pages,
105116
dashboards) belong to Interface.
106117

107-
### Layout
108-
109-
```
110-
┌ objects ─┬ Task ┈ Records · Fields · Validations │ Actions · Hooks · ⋯ ┬ inspector ┐
111-
│ Account │ ┌ filter · sort · hide ─────────────────────────────────┐ │ Edit field │
112-
│ Task ◄ │ │ # Title Status [Priority ▾] + │ │ Priority │
113-
│ Project │ │ 1 Audit IA In review ● Medium │ │ type: select│
114-
│ Invoice │ │ 2 Design system In progress ● High │ │ options … │
115-
│ + New │ │ + New record │ │ required │
116-
└──────────┴─┴───────────────────────────────────────────────────────┴─┴────────────┘
117-
```
118-
119118
### Left rail
120119
The app's objects (v1: owned objects only), with search + New object.
121120

@@ -166,10 +165,10 @@ Fields is the **pure field/layout** designer. They are also the conventional ter
166165
| **Relationships** | lookup / master-detail fields + reverse relationships (list / graph). Relationships are created by adding a `lookup` field type. |
167166
| **Actions / Hooks / Views / Forms / Permissions** | the object's scoped instances, opened in-context. |
168167

169-
### Right inspector (per-item config — the existing panels)
170-
Selecting an item in the main zone opens its existing config panel in the inspector,
171-
non-blocking. The field editor is shared by both Records (selected column) and Fields
172-
(selected field):
168+
### Right inspector (per-item config — reused protocol forms, §1.4)
169+
Selecting an item in the main zone opens its **existing Studio protocol-generated
170+
form** in the inspector, non-blocking. Nothing here is bespoke to the builder. The
171+
field editor is shared by both Records (selected column) and Fields (selected field):
173172
- a column / field → the **field editor** (type, options, required/unique, field-level validation)
174173
- a validation rule → the **rule editor** (condition builder + message + severity + events)
175174
- a record → record detail
@@ -217,7 +216,10 @@ union of six declarative rule types (`packages/spec/src/data/validation.zod.ts`)
217216

218217
---
219218

220-
## Mockups
221-
Interactive layout mockups were produced during the design session (grid + inspector,
222-
form-style field designer, validation rule builder, object facet tabs). The ASCII
223-
sketches above capture their structure.
219+
## Wireframes
220+
- [`builder-ui/data-pillar.svg`](./builder-ui/data-pillar.svg) — the Data pillar shell
221+
(rail · facet tabs · Records grid · field inspector), with the solid/dashed
222+
build-boundary legend.
223+
224+
Wireframes are committed as SVG so they render on GitHub and stay the unambiguous
225+
visual target for implementation. More are added per pillar as they are designed.
Lines changed: 129 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)