@lark-apaas/coding-miaoda-sandbox-skills 0.1.0-dev.6f4e4bc → 0.1.0-dev.72ac425
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/miaoda/ai-data-processing/SKILL.md +4 -1
- package/miaoda/charts-skill/SKILL.md +1 -1
- package/miaoda/creative-to-fullstack/SKILL.md +38 -226
- package/miaoda/feishu/SKILL.md +4 -4
- package/miaoda/forms-skill/SKILL.md +9 -0
- package/miaoda/lark-apps-db/SKILL.md +6 -4
- package/miaoda/lark-apps-db/references/full-reference.md +13 -4
- package/miaoda/lark-apps-ops/SKILL.md +2 -1
- package/miaoda/lark-apps-ops/references/lark-apps-export.md +46 -0
- package/miaoda/lark-design-prototype/DESIGN.md +603 -0
- package/miaoda/lark-design-prototype/SKILL.md +85 -0
- package/miaoda/lark-design-prototype/references/assets/card-illustration-library.md +113 -0
- package/miaoda/lark-design-prototype/references/case-matching.md +53 -0
- package/miaoda/lark-design-prototype/references/cases/conversational-ai-home.md +27 -0
- package/miaoda/lark-design-prototype/references/cases/data-table.md +30 -0
- package/miaoda/lark-design-prototype/references/cases/official-home.md +26 -0
- package/miaoda/lark-design-prototype/references/cases/workspace-home.md +34 -0
- package/miaoda/lark-design-prototype/references/color-roles.md +163 -0
- package/miaoda/lark-design-prototype/references/component-selection.md +134 -0
- package/miaoda/lark-design-prototype/references/design-quality-checklist.md +156 -0
- package/miaoda/lark-design-prototype/references/form-shell-patterns.md +77 -0
- package/miaoda/lark-design-prototype/references/icon-semantics.md +237 -0
- package/miaoda/lark-design-prototype/references/layout-interaction.md +164 -0
- package/miaoda/lark-design-prototype/references/page-contract.md +281 -0
- package/miaoda/lark-design-prototype/references/product-patterns.md +93 -0
- package/miaoda/lark-design-prototype/references/prompt-expansion.md +107 -0
- package/miaoda/lark-design-prototype/references/restoration-traps.md +113 -0
- package/miaoda/lark-design-prototype/references/token-semantics.md +112 -0
- package/miaoda/lark-design-prototype/references/visual-brief.md +125 -0
- package/miaoda/lark-design-prototype/references/visual-style-prompts.md +61 -0
- package/miaoda/lark-design-prototype/scripts/icon-query.mjs +272 -0
- package/miaoda/lark-design-prototype/scripts/token-query.mjs +76 -0
- package/miaoda/lark-design-prototype/scripts/verify-static-html.mjs +117 -0
- package/miaoda/performance-review/SKILL.md +3 -3
- package/miaoda/semantic-search/SKILL.md +6 -3
- package/miaoda/testing-guide/SKILL.md +116 -12
- package/miaoda-modern/charts-skill/SKILL.md +1 -1
- package/miaoda-modern/forms-skill/SKILL.md +33 -3
- package/miaoda-modern/lark-apps-ops/SKILL.md +2 -1
- package/miaoda-modern/lark-apps-ops/references/lark-apps-export.md +46 -0
- package/miaoda-modern/lark-design-prototype/DESIGN.md +603 -0
- package/miaoda-modern/lark-design-prototype/SKILL.md +85 -0
- package/miaoda-modern/lark-design-prototype/references/assets/card-illustration-library.md +113 -0
- package/miaoda-modern/lark-design-prototype/references/case-matching.md +53 -0
- package/miaoda-modern/lark-design-prototype/references/cases/conversational-ai-home.md +27 -0
- package/miaoda-modern/lark-design-prototype/references/cases/data-table.md +30 -0
- package/miaoda-modern/lark-design-prototype/references/cases/official-home.md +26 -0
- package/miaoda-modern/lark-design-prototype/references/cases/workspace-home.md +34 -0
- package/miaoda-modern/lark-design-prototype/references/color-roles.md +163 -0
- package/miaoda-modern/lark-design-prototype/references/component-selection.md +134 -0
- package/miaoda-modern/lark-design-prototype/references/design-quality-checklist.md +156 -0
- package/miaoda-modern/lark-design-prototype/references/form-shell-patterns.md +77 -0
- package/miaoda-modern/lark-design-prototype/references/icon-semantics.md +237 -0
- package/miaoda-modern/lark-design-prototype/references/layout-interaction.md +164 -0
- package/miaoda-modern/lark-design-prototype/references/page-contract.md +281 -0
- package/miaoda-modern/lark-design-prototype/references/product-patterns.md +93 -0
- package/miaoda-modern/lark-design-prototype/references/prompt-expansion.md +107 -0
- package/miaoda-modern/lark-design-prototype/references/restoration-traps.md +113 -0
- package/miaoda-modern/lark-design-prototype/references/token-semantics.md +112 -0
- package/miaoda-modern/lark-design-prototype/references/visual-brief.md +125 -0
- package/miaoda-modern/lark-design-prototype/references/visual-style-prompts.md +61 -0
- package/miaoda-modern/lark-design-prototype/scripts/icon-query.mjs +272 -0
- package/miaoda-modern/lark-design-prototype/scripts/token-query.mjs +76 -0
- package/miaoda-modern/lark-design-prototype/scripts/verify-static-html.mjs +117 -0
- package/miaoda-modern/performance-review/SKILL.md +3 -3
- package/miaoda-modern/reviewer-usage/SKILL.md +2 -0
- package/package.json +1 -1
- package/shared/attachment/SKILL.md +5 -1
- package/miaoda/creative-to-fullstack/references/artifact-signals.md +0 -46
- package/miaoda/creative-to-fullstack/references/ui-to-function.md +0 -134
- package/miaoda-modern/testing-guide/SKILL.md +0 -218
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
# Layout And Interaction
|
|
2
|
+
|
|
3
|
+
Figma, screenshots, and design drafts provide layout evidence. The goal is to convert the source into a responsive, interactive product interface that keeps the Feishu feel.
|
|
4
|
+
|
|
5
|
+
## Figma / Screenshot Evidence
|
|
6
|
+
|
|
7
|
+
Write `source_layout_evidence` first:
|
|
8
|
+
|
|
9
|
+
- frame scope, scroll areas, and cropping relationship;
|
|
10
|
+
- reading order and primary / secondary regions;
|
|
11
|
+
- auto layout direction, padding, gap, alignment, wrap;
|
|
12
|
+
- constraints, fill / hug, min / max, resize behavior;
|
|
13
|
+
- recognizable component instances, states, variants, prototype hints;
|
|
14
|
+
- color, radius, border, shadow, text style, and variable clues;
|
|
15
|
+
- media slots, image ratio, and cropping method;
|
|
16
|
+
- which regions enter normal document flow, and which are floating or locally positioned.
|
|
17
|
+
|
|
18
|
+
When source evidence conflicts with cases, keep source evidence. Cases only provide risk reminders and transferable experience.
|
|
19
|
+
|
|
20
|
+
## Source Viewport Contract
|
|
21
|
+
|
|
22
|
+
For screenshot restoration, write `source_viewport_contract` before implementation:
|
|
23
|
+
|
|
24
|
+
```md
|
|
25
|
+
source_viewport_contract:
|
|
26
|
+
source_image_px:
|
|
27
|
+
inferred_dpr:
|
|
28
|
+
target_css_viewport:
|
|
29
|
+
browser_preview_viewport:
|
|
30
|
+
delivery_fit_rule: responsive_web_page | fixed_artboard
|
|
31
|
+
scale_rule: do not use raw screenshot pixels as CSS px
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Do not infer the target CSS viewport from source image pixels with a single fixed DPR assumption. Browser preview must use `browser_preview_viewport`, not the default browser size.
|
|
35
|
+
|
|
36
|
+
`target_css_viewport` is a calibration and browser-preview contract, not a required fixed deliverable canvas. Use it to infer proportions, typography scale, spacing, and the preview viewport. The delivered page should still render at normal browser zoom in the current viewport unless the user explicitly asks for a fixed artboard. Do not solve screenshot restoration by hard-coding the whole app shell to the target CSS viewport when the result is meant to be used as a web page.
|
|
37
|
+
|
|
38
|
+
Use `delivery_fit_rule: responsive_web_page` for normal web demos, products, dashboards, tools, and IM / Docs / collaboration surfaces. In this mode, the app shell should use responsive sizing such as `100vw`, `100vh`, flex, grid, `minmax`, and breakpoints while keeping the source proportions calibrated. Use `delivery_fit_rule: fixed_artboard` only when the user explicitly asks for a fixed canvas, export board, slide-like frame, or exact-size artboard.
|
|
39
|
+
|
|
40
|
+
Calibrate with stable evidence: app chrome height, sidebar width, list column width, top bar height, avatar diameter, list row height, control height, message spacing, and body text size.
|
|
41
|
+
|
|
42
|
+
## Scale Calibration
|
|
43
|
+
|
|
44
|
+
For screenshot restoration, run a brief scale calibration pass before full implementation:
|
|
45
|
+
|
|
46
|
+
- Identify a few stable UI anchors in the source, such as navigation width, list column width, header height, avatar size, control height, message spacing, and body text size.
|
|
47
|
+
- Use the anchors to choose the target viewport and base scale; do not rely on screenshot pixel dimensions alone.
|
|
48
|
+
- During preview, check whether the page feels correctly scaled at normal browser zoom. If it only looks right after manual browser zoom, revisit the scale calibration before making local CSS tweaks.
|
|
49
|
+
|
|
50
|
+
## Layout Conversion
|
|
51
|
+
|
|
52
|
+
- Page body uses flex, grid, gap, padding, margin, min/max-width, and overflow.
|
|
53
|
+
- Avoid copying full-page `top/left` coordinates or fixed canvas size.
|
|
54
|
+
- Fixed dimensions are only for base elements: icons, avatars, control height, hairline borders, and local media ratios.
|
|
55
|
+
- Absolute positioning is only for badges, tooltip, popover, dropdown, local visual anchors, and other truly floating elements.
|
|
56
|
+
- Work pages prefer a vertical main spine; a right rail appears only when the source or information architecture clearly needs it.
|
|
57
|
+
- The main workspace uses responsive width and fills the available space after the navigation shell. `main-workspace`, `main-content`, and the right content area use `width: 100%`, responsive padding, grid / flex / minmax, and breakpoints.
|
|
58
|
+
- Max reading width is only for local reading content such as long-form text, settings forms, and detail descriptions. Workspaces, tables, boards, CRM, admin pages, and data pages must not apply a fixed `max-width` to the whole main workspace. Wide-screen readability is controlled through column count, table column width, right auxiliary rail, local reading width, and whitespace rhythm.
|
|
59
|
+
- Layout aligns to the 4px base grid. The main content container, module titles, tables, card grids, and right rail use stable left edges, column widths, and gaps. Avoid random values and temporary offsets. Implementation should reuse spacing variables or constants. Common values are 16 / 24 / 32 / 40px. Except for font line-height, 0.5px borders, and optical icon corrections, layout values should not leave the 4px grid.
|
|
60
|
+
- Page title, module title, Hero, quick entry, card grid, table container, and right rail should inherit the same content wrapper padding and left edge. Do not repair alignment with a single module's `margin-left`, temporary `width`, or offset.
|
|
61
|
+
- Hover, selected, loading, error hints, and dynamic numbers must not change card height, column width, toolbar height, or the overall page rhythm.
|
|
62
|
+
|
|
63
|
+
## Shell Conversion
|
|
64
|
+
|
|
65
|
+
Choose the shell pattern based on the source and product semantics before handling content:
|
|
66
|
+
|
|
67
|
+
- `side-nav-primary`: Side navigation is the main app anchor and usually occupies `100vh`. At standard width it stays expanded, width 224–280px. At `narrow`, it may shrink to a 64–72px icon rail; at `compact`, it becomes a drawer, top entry, or bottom entry. The right workspace should prefer white or nearly white `bg-body`; the main workspace stretches responsively within the remaining space and does not get an extra page-level large rounded content shell or light-gray backing layer.
|
|
68
|
+
- `top-nav-primary`: Top navigation is the main app anchor, usually 64px high, with a `bg-body` surface and 0.5px bottom divider. Main content starts below the top bar. If an auxiliary sidebar exists, it starts below the top bar, has height `calc(100vh - 64px)`, usually uses `bg-body`, and is separated from content by a 0.5px vertical divider.
|
|
69
|
+
|
|
70
|
+
Do not mix the backing relationships of `side-nav-primary` and `top-nav-primary`. In particular, do not add an extra rounded shell or gray backing layer to the right main content by default just because a page has a sidebar.
|
|
71
|
+
|
|
72
|
+
## Spacing And Sectioning
|
|
73
|
+
|
|
74
|
+
Feishu pages separate modules with whitespace. Common rhythm:
|
|
75
|
+
|
|
76
|
+
- First-level content groups: 40px;
|
|
77
|
+
- Large horizontal blocks: 24px;
|
|
78
|
+
- Same-group cards or grids: 16–24px;
|
|
79
|
+
- Title to content: 16px;
|
|
80
|
+
- Inline icon and label: 4–8px.
|
|
81
|
+
|
|
82
|
+
Quick-entry grids only fix column width and gap, not row height. The parent uses `grid-auto-rows: auto`, allowing cards in the same row to stretch to the tallest card in that row. Do not use `grid-auto-rows: 1fr`, `grid-auto-rows: minmax(...)`, `place-items: center`, `aspect-ratio`, or fixed height classes to make all rows equally tall.
|
|
83
|
+
|
|
84
|
+
40px is the default vertical spacing between content groups. Local structures such as table rows, menu items, and tag groups may stay tight. Other content areas should avoid over-compression.
|
|
85
|
+
|
|
86
|
+
Table rows need to be stable and single-line. Body cells use `white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`. Do not stack primary and secondary information vertically inside a cell. Auxiliary information should move into separate columns, tooltip, right detail drawer, or row details. Long-text ellipsis, hover, selected, and loading should not change table row height.
|
|
87
|
+
|
|
88
|
+
Content sections default to an external header and content container. The header is on top and carries the module title, description, and optional tools. The content container below carries a table, list, card grid, or business surface. Header and content container usually keep 12–16px spacing, and the content container border must not wrap the section title. Hero, floating layers, navigation, and a single detail card may use internal titles.
|
|
89
|
+
|
|
90
|
+
## Responsive Expectations
|
|
91
|
+
|
|
92
|
+
- `standard`: Keep the full shell, multi-column layout, and right auxiliary area. Search, filters, Tabs, and actions stay as a stable one-row toolbar.
|
|
93
|
+
- `narrow`: Reduce column count, merge the right auxiliary area into the main content flow, allow tool areas to wrap, and collapse filters first into icon buttons or Dropdown.
|
|
94
|
+
- `compact`: Single-column content flow, sidebar becomes an explicit entry, and complex filters collapse into IconButton + Drawer / Popover.
|
|
95
|
+
|
|
96
|
+
The main workspace stays responsive at all three breakpoints: standard fills the available width after the navigation shell; narrow preserves readability through fewer columns, a moved-down right rail, and wrapping tool areas; compact becomes a single column. Do not use fixed canvas width or whole-page `max-width` that creates large meaningless whitespace on wide screens.
|
|
97
|
+
|
|
98
|
+
Page-level search goes by default at the leftmost position of the `top-nav` right tool button group. Content sections only contain local search and filters, and their scope should be the current table, list, or board.
|
|
99
|
+
|
|
100
|
+
When a title area contains local search, filters, Select, Tabs, or action buttons, title and tools need clear responsive responsibilities. At standard width, the toolbar stays on one row: search input is usually 280–360px, Select / DatePicker usually 160–220px, and Tabs align with filters. When space is tight, switch to wrapping or a vertical layout. Filters first become icon buttons, Dropdown, Popover, or Drawer. Do not compress long text in any language into character-by-character columns, vertical text, or one-character rows.
|
|
101
|
+
|
|
102
|
+
Avoid these triggers:
|
|
103
|
+
|
|
104
|
+
- Title block has no minimum readable width;
|
|
105
|
+
- Search input has fixed width and cannot wrap;
|
|
106
|
+
- Select / DatePicker uses `width: 100%` or `flex: 1` to occupy a whole row;
|
|
107
|
+
- Filters and Tabs split into unrelated rows, breaking toolbar hierarchy;
|
|
108
|
+
- `word-break: break-all` or `overflow-wrap: anywhere` is used on regular text;
|
|
109
|
+
- flex children lack `min-width: 0` and a reasonable wrapping strategy;
|
|
110
|
+
- Very narrow fixed-width containers carry long titles, buttons, tags, or table fields;
|
|
111
|
+
- Table cells use two-line text for primary / secondary information, making row height unstable.
|
|
112
|
+
|
|
113
|
+
## Collision Guard
|
|
114
|
+
|
|
115
|
+
Before implementation, reserve fixed slots and wrapping rules for collision-prone areas:
|
|
116
|
+
|
|
117
|
+
- top conversation header: avatar, title, metadata, badges, and right actions;
|
|
118
|
+
- tabs and local toolbar;
|
|
119
|
+
- side navigation selected rows, unread badges, and bottom dock entries;
|
|
120
|
+
- chat / list rows: avatar, title, preview, date, status, and badges;
|
|
121
|
+
- message cards, image previews, inline chips, and floating action buttons.
|
|
122
|
+
|
|
123
|
+
Use flex or grid areas with `min-width: 0` for text containers. Single-line labels use `white-space: nowrap; overflow: hidden; text-overflow: ellipsis`. Multiline areas need explicit line clamp, max width, or wrapping boundaries. Avoid temporary absolute offsets for badges, avatars, and titles that belong to row layout.
|
|
124
|
+
|
|
125
|
+
## Surfaces And Depth
|
|
126
|
+
|
|
127
|
+
Ordinary business cards, Hero, metric cards, quick entries, table containers, right summaries, stage pipelines, and insight panels have no shadows by default. They express hierarchy through `bg-body`, 0.5px `line-border-card`, radius, title hierarchy, and whitespace.
|
|
128
|
+
|
|
129
|
+
Shadows are only for floating layers outside document flow, such as dropdown, popover, tooltip, dialog, drawer, and floating menu. If a UD Card has a default shadow, override it to no shadow.
|
|
130
|
+
|
|
131
|
+
Regular workspaces should usually stay within two layers: page base plus content surface. Introduce light gray backing only for clear backing, nested editing areas, or floating-layer relationships. Do not use gray backing with white cards, white cards with gray blocks, gray blocks with smaller cards, or card-in-card layouts to express hierarchy. Side navigation uses a near-white neutral background, with neutral selected fill and 500 text weight, not light-blue selected fill by default.
|
|
132
|
+
|
|
133
|
+
## Interaction Conversion
|
|
134
|
+
|
|
135
|
+
- Button triggers visible actions, state changes, navigation, submit, reset, drawer, dialog, or toast.
|
|
136
|
+
- Tabs switch content and do more than show active styling.
|
|
137
|
+
- Search and filter controls update query state, visible data, or empty state.
|
|
138
|
+
- Drawer, Dialog, Dropdown, Popover, and Menu prefer component-provided APIs.
|
|
139
|
+
- Tables and lists keep expected row actions, filtering, sorting, pagination, or details entry.
|
|
140
|
+
- Icon-only actions need accessible names and hover / focus states.
|
|
141
|
+
|
|
142
|
+
## Static Exceptions
|
|
143
|
+
|
|
144
|
+
Static behavior is allowed when:
|
|
145
|
+
|
|
146
|
+
- The user explicitly asks for a static mock;
|
|
147
|
+
- The element is only decoration or information display;
|
|
148
|
+
- Production integration is blocked and noted in the final response;
|
|
149
|
+
- The source is a purely visual brand mock.
|
|
150
|
+
|
|
151
|
+
## Check Questions
|
|
152
|
+
|
|
153
|
+
- Has the page body moved away from fixed Figma coordinates?
|
|
154
|
+
- Does screenshot restoration have `source_viewport_contract`, and does browser preview use the target CSS viewport?
|
|
155
|
+
- Does the restored page feel correctly scaled at normal browser zoom based on stable source anchors?
|
|
156
|
+
- Does the main workspace use responsive width and fill the available space after the navigation shell?
|
|
157
|
+
- Is max reading width used only in local reading areas such as long-form text, forms, or detail descriptions?
|
|
158
|
+
- Is there about 40px of visible whitespace between first-level content groups?
|
|
159
|
+
- Does the title-area toolbar wrap at narrow widths?
|
|
160
|
+
- Is long text still readable?
|
|
161
|
+
- Are top bars, navigation, list rows, badges, tabs, and message cards free from visible collisions?
|
|
162
|
+
- Do ordinary business surfaces have no shadows?
|
|
163
|
+
- Has the page avoided multiple nested backgrounds, excessive accent colors, and multiple bold text layers in the same group?
|
|
164
|
+
- Are visible controls interactive or covered by a static exception?
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
# Feishu Lightweight Design Contract
|
|
2
|
+
|
|
3
|
+
Use this contract when the task comes from natural language, Figma, screenshots, or design drafts and needs a Feishu / Lark style page. The contract helps design decisions carry into implementation and prevents the page from turning into a template.
|
|
4
|
+
|
|
5
|
+
## Core Principles
|
|
6
|
+
|
|
7
|
+
- Write enough to drive implementation, and avoid unrelated fields.
|
|
8
|
+
- Record source evidence, visual recipe, control style strategy, media strategy, and verification focus.
|
|
9
|
+
- Figma / screenshot evidence has priority over cases; cases only provide inspiration and risk reminders.
|
|
10
|
+
- Recognizable system controls should follow UD visual language and interaction semantics first; custom areas need a clear responsibility.
|
|
11
|
+
|
|
12
|
+
## Recommended Fields
|
|
13
|
+
|
|
14
|
+
```md
|
|
15
|
+
source_of_truth:
|
|
16
|
+
scope_sketch:
|
|
17
|
+
source_layout_evidence:
|
|
18
|
+
source_viewport_contract:
|
|
19
|
+
scale_calibration:
|
|
20
|
+
product_surface:
|
|
21
|
+
main_user_flow:
|
|
22
|
+
content_fill_policy:
|
|
23
|
+
lark_style_recipe:
|
|
24
|
+
layout_model:
|
|
25
|
+
surface_family:
|
|
26
|
+
spacing_rhythm:
|
|
27
|
+
section_header_policy:
|
|
28
|
+
toolbar_policy:
|
|
29
|
+
top_nav_policy:
|
|
30
|
+
right_rail_policy:
|
|
31
|
+
typography_hierarchy:
|
|
32
|
+
emphasis_budget:
|
|
33
|
+
table_policy:
|
|
34
|
+
control_candidates:
|
|
35
|
+
ud_control_coverage:
|
|
36
|
+
layout_signature_usage:
|
|
37
|
+
icon_plan:
|
|
38
|
+
media_decision:
|
|
39
|
+
media_plan:
|
|
40
|
+
states:
|
|
41
|
+
responsive_plan:
|
|
42
|
+
case_reference:
|
|
43
|
+
style_boundaries:
|
|
44
|
+
acceptance_criteria:
|
|
45
|
+
verification_plan:
|
|
46
|
+
open_questions:
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Small tasks can keep 5–8 key fields. Page-level, Figma / screenshot, high-fidelity, and runnable demo tasks need a more complete contract.
|
|
50
|
+
|
|
51
|
+
## Field Guide
|
|
52
|
+
|
|
53
|
+
- `source_of_truth`: User input, Figma, screenshot, design draft, existing code, or combined sources. Explain tradeoffs when sources conflict.
|
|
54
|
+
- `scope_sketch`: Scope sketch for natural-language tasks, including page, primary user task, main regions, key interactions, and scope boundaries.
|
|
55
|
+
- `source_layout_evidence`: Required for Figma / screenshot tasks. Record reading order, main regions, auto layout, padding, gap, alignment, constraints, component instances, style clues, media slots, and responsive evidence.
|
|
56
|
+
- `source_viewport_contract`: Required for screenshot restoration. Record source image pixels, inferred DPR, target CSS viewport, browser preview viewport, `delivery_fit_rule`, and the rule that raw screenshot pixels must not become CSS pixels. `target_css_viewport` is used for calibration and browser preview, not as a fixed app-shell size unless `delivery_fit_rule: fixed_artboard` is explicitly chosen. Normal web demos use `delivery_fit_rule: responsive_web_page` and should render at normal browser zoom in the current viewport.
|
|
57
|
+
- `scale_calibration`: Optional but recommended for screenshot restoration. Keep it brief: record the stable source anchors used to judge scale, the base scale decision, and whether normal browser zoom feels correct. Use anchors such as navigation width, list width, header height, avatar size, control height, message spacing, and body text size; do not rely on source pixel dimensions alone.
|
|
58
|
+
- `product_surface`: Product surface such as workspace, CRM, data table, AI, Docs, approval, admin console, or official site.
|
|
59
|
+
- `main_user_flow`: The 1–3 most important actions after the user enters the page.
|
|
60
|
+
- `content_fill_policy`: Use when the user does not clearly define content scope in a natural-language task. Record which core content stays, which modules are not proactively added, and the minimum sample-data count.
|
|
61
|
+
- `lark_style_recipe`: Lightweight visual recipe. Include surfaces, color restraint, accent-color budget, no gradients, spacing grid, radius, borders, shadows, typography weight, controls, media, visual restraint, and anti-patterns.
|
|
62
|
+
- `layout_model`: Document-flow structure, main columns, scroll areas, right auxiliary area, responsive main workspace width, shared content container line, responsive tracks, and floating-layer relationships.
|
|
63
|
+
- `surface_family`: Background relationship among page root, sidebar, content area, cards, and floating layers. body / app-root / main-workspace / main-content / right content area should prefer white or nearly white `bg-body`. One area usually keeps at most page base and content surface; avoid multiple nested background layers.
|
|
64
|
+
- `spacing_rhythm`: Spacing rhythm between first-level content groups, internal cards, title-to-content, and controls. Content groups default to 40px. Record page-level gap tokens such as `section_gap: 40px`, `module_gap: 16px`, `card_gap: 16–24px`, `rail_gap: 24px`, and note that quick entries use equal height within the same row, with row height determined by the tallest card in that row.
|
|
65
|
+
- `section_header_policy`: Record whether content section titles are external. Except for Hero, overview summary cards, small KPI cards, floating layers, navigation, and single detail cards, module titles should sit outside bordered content containers.
|
|
66
|
+
- `toolbar_policy`: Record placement relationships for search, filters, Tabs, view switches, and local actions. Page-level search goes by default at the leftmost position of the `top-nav` right tool group; local filters and Tabs align as a toolbar.
|
|
67
|
+
- `top_nav_policy`: Use when a top bar is present or shell quality matters. Record shell role, height, left identity, right utilities, divider, search placement, and whether business actions stay in the page title area.
|
|
68
|
+
- `right_rail_policy`: Use when a right auxiliary area is present or considered. Record necessity, role, width, surface pattern, text weight, rail groups, responsive merge behavior, and what should remain in the main flow.
|
|
69
|
+
- `typography_hierarchy`: Font size / weight / color for page title, module title, card title, body text, metadata, and numbers.
|
|
70
|
+
- `emphasis_budget`: Use when typography feels heavy or the page has forms, tables, cards, or right rails. Record which single layer may use 600 / 500 in each region, and which labels, descriptions, button text, links, metadata, and body copy stay 400.
|
|
71
|
+
- `table_policy`: When the page includes tables, record single-line cells, 400 body weight, long-text ellipsis / tooltip / detail handling, and stable row height.
|
|
72
|
+
- `control_candidates`: Needed control patterns such as Menu, Button, Input, Table, Tabs, Card, Tag, Avatar, Drawer, Dialog, and Empty.
|
|
73
|
+
- `ud_control_coverage`: Required for Figma / screenshot / high-fidelity tasks. Record whether visible system controls follow UD visual language, interaction semantics, states, tokens, and accessibility, and where custom code is allowed.
|
|
74
|
+
- `layout_signature_usage`: Record only matched framework signatures such as top-nav, side-navigation, quick-action-module, and hero-card. When top-nav or side-navigation is matched, add `shell_pattern: side-nav-primary / top-nav-primary`. Omit when not matched.
|
|
75
|
+
- `icon_plan`: Record when the page contains icons. Regular page UI icons choose catalog `outlined`, preferably v2 when semantically suitable. Record area-level strategy, source visual type when restoring, matched catalog `name`, description match reason, color semantic, `hash` / `darkHash`, family, visual type, and final SVG URL. Natural-language generation must match catalog descriptions by action / object / state semantics and keep the same family / type within a group. Figma / screenshot restoration must preserve source visual type: outlined, filled, or colorful. File-type identification may use File v2 colorful and must additionally record `usage: file_type_identification`, file type, shape normal / round, and consistency within the same area.
|
|
76
|
+
- `media_decision`: Decide which regions need illustrations, thumbnails, avatars, product images, important entry icons, or empty-state images. When Hero, welcome areas, recommended content, product entries, empty states, workspace home pages, or business summaries carry first-glance explanation, plan a visual anchor by default; if no media is used, explain why.
|
|
77
|
+
- `media_plan`: When media is needed, record asset source, match reason, target slot, ratio, cropping, and fallback.
|
|
78
|
+
- `states`: loading, empty, disabled, error, success, selected, expanded, drawer-open, dialog-open, and similar states.
|
|
79
|
+
- `responsive_plan`: Layout changes under standard, narrow, and compact widths, especially how the main workspace fills available space, how title area + search / filters / action buttons wrap, and where local max reading width is allowed.
|
|
80
|
+
- `case_reference`: Matched case, reference weight, borrowed points, and avoided points. Use `none` when no case matches.
|
|
81
|
+
- `style_boundaries`: Boundaries that strongly affect Feishu style, such as fewer dividers, no ordinary card shadows, left-aligned entries, and media only when needed.
|
|
82
|
+
- `acceptance_criteria`: User-visible acceptance criteria.
|
|
83
|
+
- `verification_plan`: Build, browser, breakpoint, interaction, and visual checks.
|
|
84
|
+
- `open_questions`: Only record questions that affect implementation.
|
|
85
|
+
|
|
86
|
+
## Figma / Screenshot Writing Pattern
|
|
87
|
+
|
|
88
|
+
```md
|
|
89
|
+
source_layout_evidence:
|
|
90
|
+
reading_order: sidebar -> top tools -> hero -> primary list -> right summary
|
|
91
|
+
layout: shell grid, content stack, optional right rail
|
|
92
|
+
container_line: page title, hero, section headers, card grid and table align to one wrapper
|
|
93
|
+
grid_tracks: main minmax(0, 1fr), optional rail 320-384px, rail gap 24px
|
|
94
|
+
auto_layout: major modules use vertical stack; card group wraps
|
|
95
|
+
components: Menu, Button, Input, Table, Tag, Avatar, custom hero media slot
|
|
96
|
+
visual_signals: white workspace, light borders, 8px cards, no card shadow
|
|
97
|
+
responsive: right rail merges below narrow width; toolbar wraps before title compresses
|
|
98
|
+
|
|
99
|
+
source_viewport_contract:
|
|
100
|
+
source_image_px: source image dimensions
|
|
101
|
+
inferred_dpr: inferred from source context and anchors
|
|
102
|
+
target_css_viewport: target CSS viewport
|
|
103
|
+
browser_preview_viewport: preview viewport
|
|
104
|
+
delivery_fit_rule: responsive_web_page
|
|
105
|
+
scale_rule: do not use raw screenshot pixels as CSS px
|
|
106
|
+
|
|
107
|
+
scale_calibration:
|
|
108
|
+
source_anchors: navigation width, list width, header height, avatar size, control height, body text
|
|
109
|
+
scale_basis: chosen from stable anchors, not source pixels alone
|
|
110
|
+
normal_zoom_check: page should feel correctly scaled without manual browser zoom
|
|
111
|
+
|
|
112
|
+
ud_control_coverage:
|
|
113
|
+
- detected: primary action
|
|
114
|
+
follow_ud_style: Button
|
|
115
|
+
custom_allowed: false
|
|
116
|
+
- detected: search
|
|
117
|
+
follow_ud_style: Input
|
|
118
|
+
custom_allowed: false
|
|
119
|
+
- detected: hero composition
|
|
120
|
+
follow_ud_style: Card + custom media slot
|
|
121
|
+
custom_allowed: true
|
|
122
|
+
reason: business composition and media placement need custom layout; inner CTA follows UD-style button styling.
|
|
123
|
+
|
|
124
|
+
layout_signature_usage:
|
|
125
|
+
- component: side-navigation
|
|
126
|
+
shell_pattern: side-nav-primary
|
|
127
|
+
signature: full-height left rail, 224-280px expanded, 38-40px left-aligned icon + label rows
|
|
128
|
+
- component: top-nav
|
|
129
|
+
shell_pattern: top-nav-primary
|
|
130
|
+
signature: 64px bg-body bar, page search at right tool group leftmost, unified 28px icon buttons
|
|
131
|
+
|
|
132
|
+
top_nav_policy:
|
|
133
|
+
role: product / space identity and low-emphasis utilities
|
|
134
|
+
height: 56-64px
|
|
135
|
+
business_actions: page title area by default
|
|
136
|
+
|
|
137
|
+
right_rail_policy:
|
|
138
|
+
role: helper rules / approval path only when useful
|
|
139
|
+
width: 320-360px
|
|
140
|
+
surface: plain_helper_rail or light_panel_rail
|
|
141
|
+
responsive: merge below main flow at narrow width
|
|
142
|
+
|
|
143
|
+
emphasis_budget:
|
|
144
|
+
page_title: one 600 layer
|
|
145
|
+
section_and_labels: 500 only for titles / form labels / selected state
|
|
146
|
+
body_and_actions: descriptions, helper text, button labels, links, metadata stay 400
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
## Media Writing Pattern
|
|
150
|
+
|
|
151
|
+
```md
|
|
152
|
+
media_decision:
|
|
153
|
+
- region: hero visual
|
|
154
|
+
media_needed: true
|
|
155
|
+
reason: welcome / summary needs a visual anchor
|
|
156
|
+
|
|
157
|
+
media_plan:
|
|
158
|
+
- region: hero visual
|
|
159
|
+
source_order: card-illustration-library -> UD illustration -> product asset -> generated_bitmap
|
|
160
|
+
library_lookup:
|
|
161
|
+
searched_keywords:
|
|
162
|
+
candidate_assets:
|
|
163
|
+
decision: use_library / reject_library
|
|
164
|
+
reject_reason:
|
|
165
|
+
selected_source:
|
|
166
|
+
slot_ratio:
|
|
167
|
+
handling: cover / contain / transparent
|
|
168
|
+
fallback:
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Whenever illustrations, avatars, product images, entry icons, or empty-state images are needed, record `library_lookup` first. If the library has a semantically fitting and accessible asset, use the library first. Use `generated_bitmap` only when the library is unsuitable, inaccessible, or the current slot needs a more specific asset. If recommended content, product entries, or workspace home pages become only text and outlined icons, reevaluate whether a visual anchor is missing.
|
|
172
|
+
|
|
173
|
+
Generated images only create the independent visual element needed by the current media slot, such as a data visual, light illustration, avatar, product image, entry icon, empty-state graphic, or recommendation cover. Content must match the current module theme. The style should be polished, minimal, and light, and may become a local visual focus, but must not overpower the title, main content, or actions. Do not generate a full page UI, complete dashboard, navigation bar, sidebar, table page, or browser shell.
|
|
174
|
+
|
|
175
|
+
## Content Filling Pattern
|
|
176
|
+
|
|
177
|
+
When the user only gives a page direction, business name, or broad goal, start with the minimum content set.
|
|
178
|
+
|
|
179
|
+
```md
|
|
180
|
+
content_fill_policy:
|
|
181
|
+
confidence: low
|
|
182
|
+
initial_screen_budget:
|
|
183
|
+
visible_content_groups: 2-3
|
|
184
|
+
table_or_list_samples: 5-8
|
|
185
|
+
card_samples: 3-4
|
|
186
|
+
kpi_count: 0-3, only when tied to the main task
|
|
187
|
+
auxiliary_regions: 0-1, only when useful
|
|
188
|
+
keep:
|
|
189
|
+
- product identity and primary task
|
|
190
|
+
- optional Hero or primary task area
|
|
191
|
+
- one main content area
|
|
192
|
+
- necessary primary action
|
|
193
|
+
- a small set of realistic samples
|
|
194
|
+
hold_back:
|
|
195
|
+
- KPI wall
|
|
196
|
+
- long list
|
|
197
|
+
- right-side insights
|
|
198
|
+
- recommended content
|
|
199
|
+
- recent visits
|
|
200
|
+
- multi-level navigation
|
|
201
|
+
sample_limit: only enough to show structure
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
When the user provides explicit data, a complete business flow, Figma / screenshot evidence, or specified modules, fill content according to the source. Without evidence, keep the page clean and avoid filling the canvas for a sense of completeness. The first pass may keep obvious whitespace, then expand based on user feedback.
|
|
205
|
+
|
|
206
|
+
Write `hero-card` decisions into `layout_signature_usage`. It suits welcome, task reminders, smart suggestions, CRM / sales summaries, data-insight entries, recommendations, and empty states. Table directories, settings, audits, approval details, member permissions, and strong operation forms default to no Hero.
|
|
207
|
+
|
|
208
|
+
## Section Header Pattern
|
|
209
|
+
|
|
210
|
+
Content sections default to an external header plus content container:
|
|
211
|
+
|
|
212
|
+
```md
|
|
213
|
+
section_header_policy:
|
|
214
|
+
- section: Customer List
|
|
215
|
+
header: outside_surface
|
|
216
|
+
surface_contains: filters + table
|
|
217
|
+
exception: false
|
|
218
|
+
- section: Today Summary
|
|
219
|
+
header: internal_allowed
|
|
220
|
+
exception: overview_card
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
The external header can contain the module title, description, more entry, filter summary, view switch, or right-side tools. The content container below carries the table, list, card grid, or business surface. Do not let one border wrap both "section title + content".
|
|
224
|
+
|
|
225
|
+
## Toolbar Pattern
|
|
226
|
+
|
|
227
|
+
```md
|
|
228
|
+
toolbar_policy:
|
|
229
|
+
page_search:
|
|
230
|
+
placement: top-nav right tool group, leftmost
|
|
231
|
+
scope: page/global
|
|
232
|
+
local_toolbar:
|
|
233
|
+
items: Tabs + filters + view switch + actions
|
|
234
|
+
alignment: one row on standard width
|
|
235
|
+
control_width:
|
|
236
|
+
search: 280-360px when local search is required
|
|
237
|
+
select: 160-220px
|
|
238
|
+
narrow_behavior: filters collapse to IconButton + Dropdown / Popover / Drawer
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
Only keep search inside a content section when it has a clear local scope. Do not stretch filter controls with `width: 100%` or `flex: 1`; when space is tight, collapse filters into icon buttons instead of placing a long Select on its own row.
|
|
242
|
+
|
|
243
|
+
## Acceptance Criteria
|
|
244
|
+
|
|
245
|
+
Acceptance criteria should be judged from the user's view:
|
|
246
|
+
|
|
247
|
+
```md
|
|
248
|
+
acceptance_criteria:
|
|
249
|
+
- The first screen identifies product identity, primary task, and main content.
|
|
250
|
+
- Top navigation, when present, identifies product / space and low-emphasis utilities; page-level business actions stay in the page title or primary task area unless source evidence places them in the top bar.
|
|
251
|
+
- Right helper rail, when present, has a clear helper role, low visual weight, 320-360px standard width, and merges into the main flow at narrow width.
|
|
252
|
+
- Primary controls are interactive or clearly marked as static display.
|
|
253
|
+
- Text is not compressed at standard / narrow / compact widths, and title toolbars can wrap.
|
|
254
|
+
- Page title, module title, Hero, quick entry, card grid, and table left edges align to the same content container line; main gaps, padding, column widths, and offsets follow the 4px base grid.
|
|
255
|
+
- Page-level search sits at the leftmost position of the top-nav right tool group; filters, Tabs, and view switches align as one toolbar group.
|
|
256
|
+
- When top-nav / side-navigation is matched, it follows the corresponding `shell_pattern`: navigation position, background, size, selected state, collapse behavior, and search placement are not mixed.
|
|
257
|
+
- Ordinary business cards have no shadow, borders are light, content groups are about 40px apart, and information feels clean.
|
|
258
|
+
- Quick entries and lightweight recommendation entries use equal height within the same row. The parent uses `grid-auto-rows: auto`, and every card in one row takes the height of the tallest card in that row. There is no fixed height or whole-group large height causing bottom whitespace. Icon containers may use low-saturation, low-opacity blue fills.
|
|
259
|
+
- Table body cells are single-line; customer names, amounts, owners, times, and action links stay 400 weight, with ellipsis or detail handling for long text.
|
|
260
|
+
- Side navigation uses a near-white neutral background and selected state uses neutral fill plus 500 text weight, not light-blue fill or brand-blue text by default.
|
|
261
|
+
- Blue and other accent colors are only used for primary actions, links, focus, current state, real status, and a small amount of brand identification, not ordinary decoration or large backgrounds.
|
|
262
|
+
- Page UI icons come from the catalog; regular icons use `outlined`, match catalog descriptions by semantic intent, and color matches action, status, current, disabled, or emphasis semantics. File-type identification may use File v2 colorful as a whole group with the same type and same shape.
|
|
263
|
+
- Page UI has no gradients.
|
|
264
|
+
- The main workspace stretches responsively within the available space after the navigation shell; the whole `main-workspace` / `main-content` has no fixed max width.
|
|
265
|
+
- Default body text, descriptions, table content, and card descriptions stay 400. One information group does not have multiple bold text layers.
|
|
266
|
+
- Emphasis budget is visible in the result: one page-level 600 title, limited 500 labels / section titles, and 400 body, helper, button, link, and metadata text by default.
|
|
267
|
+
- One area usually keeps only page base and content surface. There is no gray backing with white cards, white cards with gray blocks, or gray blocks with smaller cards.
|
|
268
|
+
- Except for Hero, overview summary cards, small KPI cards, floating layers, navigation, and single detail cards, content sections have an external header and the title is not wrapped inside a bordered container.
|
|
269
|
+
- When the user request is vague, page content stays restrained: the first screen usually has only 2–3 visible content groups and does not proactively stack unrelated modules or large sample data.
|
|
270
|
+
- System controls in Figma / screenshots follow UD visual language, states, and semantics first.
|
|
271
|
+
- Hero, welcome area, recommended content, product entry, or empty state that needs a visual anchor has checked the illustration library or recorded generated-image fallback.
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
## Avoid Recording
|
|
275
|
+
|
|
276
|
+
- Implementation details that the page will not actually use;
|
|
277
|
+
- Directly copied raw Figma colors as implementation tokens;
|
|
278
|
+
- Fixed page-template order;
|
|
279
|
+
- Unrelated modules added only because a case has them;
|
|
280
|
+
- Images with no source or responsibility;
|
|
281
|
+
- Audit fields unrelated to the current task.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Product Patterns
|
|
2
|
+
|
|
3
|
+
Read only the sections relevant to the current task. Product patterns help judge the primary task and component tendency, not fixed module order.
|
|
4
|
+
|
|
5
|
+
## App Shell / Side Navigation
|
|
6
|
+
|
|
7
|
+
Persistent side navigation suits primary entries, space switching, and long-running workflows. Use icon + label by default, keep left alignment, and maintain a single current item. At standard width, the sidebar is usually 224–280px; navigation items are 38–40px high, 6px radius, 8px horizontal padding, 18–24px icons, 10–12px icon-to-text gap, and 2px vertical spacing between items. At compact viewports, it can become a top entry, drawer, or bottom navigation, but current page identity must stay visible. Collapsed state must not compress text navigation into initials or single characters.
|
|
8
|
+
|
|
9
|
+
When the top bar is the main frame, the left sidebar is only auxiliary navigation. It starts below the top bar, usually uses `bg-body`, and is separated from content by a 0.5px vertical divider.
|
|
10
|
+
|
|
11
|
+
## Workspace / Portal
|
|
12
|
+
|
|
13
|
+
Suitable for office home pages, collaboration entries, and portal aggregation pages. You can read `references/cases/workspace-home.md` for low-weight inspiration.
|
|
14
|
+
|
|
15
|
+
Tendencies:
|
|
16
|
+
|
|
17
|
+
- vertical main spine;
|
|
18
|
+
- light welcome Hero or key summary appears only when needed;
|
|
19
|
+
- quick entries, recommended content, and recent visits are decided by the task;
|
|
20
|
+
- right auxiliary area remains only when it has a clear information responsibility;
|
|
21
|
+
- large workspaces keep light surfaces and few dividers.
|
|
22
|
+
|
|
23
|
+
## CRM / Sales Workspace
|
|
24
|
+
|
|
25
|
+
Suitable for customer operations, sales dashboards, opportunity progression, and follow-up tasks.
|
|
26
|
+
|
|
27
|
+
Tendencies:
|
|
28
|
+
|
|
29
|
+
- the main anchor is customers, opportunities, follow-up tasks, forecast summary, or stage progress;
|
|
30
|
+
- CRM home pages, sales dashboards, and growth summaries may use Hero to carry one key judgment, a small set of actions, and optional data visual;
|
|
31
|
+
- data lists keep fields that drive action;
|
|
32
|
+
- metrics and summaries stay light, with no ordinary card shadows;
|
|
33
|
+
- illustrations appear only in Hero, empty states, entries, or explanatory summaries when needed;
|
|
34
|
+
- sidebars and top tools keep a clean work-product rhythm.
|
|
35
|
+
|
|
36
|
+
## Data Table / Directory
|
|
37
|
+
|
|
38
|
+
Suitable for Base, file directories, data views, and knowledge-base directories. You can read `references/cases/data-table.md`.
|
|
39
|
+
|
|
40
|
+
Tendencies:
|
|
41
|
+
|
|
42
|
+
- table, list, or directory grid is the primary path;
|
|
43
|
+
- filters, search, view switches, and pagination follow UD-style control patterns;
|
|
44
|
+
- table body stays single-line and 400 weight. Do not stack customer name + industry, object name + description, or time + note inside one cell; move auxiliary information into columns, tooltip, or detail panel.
|
|
45
|
+
- thumbnails, file icons, and metadata enhance realism;
|
|
46
|
+
- avoid turning the data primary path into a decorative dashboard.
|
|
47
|
+
|
|
48
|
+
## AI / Conversational Tools
|
|
49
|
+
|
|
50
|
+
Suitable for AI assistants, knowledge Q&A, agent entries, and generation tools. You can read `references/cases/conversational-ai-home.md`.
|
|
51
|
+
|
|
52
|
+
Tendencies:
|
|
53
|
+
|
|
54
|
+
- the main anchor is input area, assistant identity, recommended questions, or response stream;
|
|
55
|
+
- home-style AI assistants can use Hero to express assistant identity, capability boundary, and one main input / primary action;
|
|
56
|
+
- AI visuals stay restrained and only serve real intelligent capability;
|
|
57
|
+
- recommended questions need to be specific and executable;
|
|
58
|
+
- sidebar history and tool entries stay clean and clear.
|
|
59
|
+
|
|
60
|
+
## Docs / CCM
|
|
61
|
+
|
|
62
|
+
Document surfaces express ownership, recent use, sharing state, and create entries. Lists and directories should be scannable. Document categories can use tabs, filters, or directory tree.
|
|
63
|
+
|
|
64
|
+
Typical components: Table / List, Tabs, Button, Dropdown, Tag, Empty, Dialog, Drawer, Upload.
|
|
65
|
+
|
|
66
|
+
## Calendar
|
|
67
|
+
|
|
68
|
+
Calendar pages emphasize time hierarchy. Event cards need clear encoding of state, time, participants, location, or meeting entry.
|
|
69
|
+
|
|
70
|
+
Typical components: Calendar / DatePicker, Card, Tag, Avatar, Popover, Drawer, Button.
|
|
71
|
+
|
|
72
|
+
## Approval / Workflow
|
|
73
|
+
|
|
74
|
+
Approval pages emphasize current state, process chain, risk fields, attachments, and operation history. The primary action area should be stable.
|
|
75
|
+
|
|
76
|
+
Typical components: Form, Steps, Timeline, DetailsDisplay, Table, Tag, Button, Dialog, Drawer.
|
|
77
|
+
|
|
78
|
+
## Admin / Settings
|
|
79
|
+
|
|
80
|
+
Settings and admin pages should be quiet and practical. Fields are organized by section, and members, permissions, apps, audit logs, and policies prefer tables.
|
|
81
|
+
|
|
82
|
+
Typical components: Layout, Menu, Form, Table, Switch, Select, Button, Dialog, Drawer.
|
|
83
|
+
|
|
84
|
+
## Official Site / Solution Center
|
|
85
|
+
|
|
86
|
+
Official sites and solution centers can be more expressive, while still staying clean, trustworthy, and product-signaling. You can read `references/cases/official-home.md`.
|
|
87
|
+
|
|
88
|
+
Tendencies:
|
|
89
|
+
|
|
90
|
+
- first screen clearly states product or solution theme;
|
|
91
|
+
- single primary CTA;
|
|
92
|
+
- product UI image, solution graphic, or real business thumbnail as visual anchor;
|
|
93
|
+
- lower sections provide functions, scenarios, customer trust, and entries.
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# Prompt Expansion
|
|
2
|
+
|
|
3
|
+
Use this reference when the source of truth is natural language and the prompt is vague, implies multiple pages, or gives detailed layout without interaction details. Clear single-page requests only need a short `scope_sketch` before entering the contract.
|
|
4
|
+
|
|
5
|
+
## Tiers
|
|
6
|
+
|
|
7
|
+
- Tier 1, clear single page: The user clearly states the page or component and it maps directly to a Feishu enterprise pattern, such as an approval list, user detail drawer, or permission management page. Write a brief 3–5 line sketch.
|
|
8
|
+
- Tier 2, vague single page: The user only says CRM, data dashboard, workspace, and similar terms, and the primary view or primary object is not clear enough. First reference `product-patterns.md`, choose the most conservative main pattern, and write the inference into `conservative_assumptions`. Use only the minimum first-pass content set and keep the view clean.
|
|
9
|
+
- Tier 3, detailed layout: The user has already provided a structure such as left navigation, top toolbar, and main content area, but has not specified interactions, states, or responsive behavior. Keep the structure and fill behavior and states for every region.
|
|
10
|
+
- Tier 4, multi-page or system-level: The user asks for a complete system, platform, or admin suite. First define the page list and scope boundaries, then write a sketch for the primary page.
|
|
11
|
+
|
|
12
|
+
## Scope Sketch
|
|
13
|
+
|
|
14
|
+
Natural-language tasks need `scope_sketch` before the contract. It acts like visible layout evidence from a screenshot and locks intent and scope.
|
|
15
|
+
|
|
16
|
+
```md
|
|
17
|
+
scope_sketch:
|
|
18
|
+
pages:
|
|
19
|
+
- name:
|
|
20
|
+
primary_task:
|
|
21
|
+
key_regions:
|
|
22
|
+
key_interactions:
|
|
23
|
+
key_states:
|
|
24
|
+
flow_relationships:
|
|
25
|
+
scope_boundary:
|
|
26
|
+
in:
|
|
27
|
+
out:
|
|
28
|
+
conservative_assumptions:
|
|
29
|
+
must_resolve:
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Field guide:
|
|
33
|
+
|
|
34
|
+
- `pages`: Pages or top-level views in scope. A single-page task has one item.
|
|
35
|
+
- `primary_task`: The primary work the user completes on the page, not a component list.
|
|
36
|
+
- `key_regions`: Shell, navigation, header, filters, content, side rail, floating layers, and feedback.
|
|
37
|
+
- `key_interactions`: Triggered actions and state changes, such as filters updating a table or row click opening a drawer.
|
|
38
|
+
- `key_states`: loading, empty, filtered-empty, error, selected, drawer-open, dialog-open, and similar states.
|
|
39
|
+
- `flow_relationships`: Navigation or state transitions between pages; omit for a single-page task.
|
|
40
|
+
- `scope_boundary.in`: Pages, views, and capabilities completed in this round.
|
|
41
|
+
- `scope_boundary.out`: Related capabilities clearly excluded, with reason.
|
|
42
|
+
- `conservative_assumptions`: Conservative inferences based on common Feishu patterns.
|
|
43
|
+
- `must_resolve`: Questions that affect page structure, navigation, or primary interaction and cannot be conservatively filled.
|
|
44
|
+
|
|
45
|
+
## Expansion Methods
|
|
46
|
+
|
|
47
|
+
Tier 1: Write a compact sketch including primary task, key regions, key interactions, and key states.
|
|
48
|
+
|
|
49
|
+
```md
|
|
50
|
+
scope_sketch:
|
|
51
|
+
pages:
|
|
52
|
+
- name: Approval List
|
|
53
|
+
primary_task: users view, filter, and operate pending approval records
|
|
54
|
+
key_regions: content header, search/filter toolbar, data table, pagination, row detail drawer
|
|
55
|
+
key_interactions: search / filters update table, row click opens detail drawer, batch selection triggers batch actions
|
|
56
|
+
key_states: loading, empty, filtered-empty, selected, drawer-open
|
|
57
|
+
scope_boundary:
|
|
58
|
+
out: approval initiation flow keeps only an entry point
|
|
59
|
+
conservative_assumptions:
|
|
60
|
+
- approval statuses default to pending, approved, rejected, and withdrawn
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Tier 2: Choose the main pattern from `product-patterns.md`. If two patterns are both reasonable, prefer the one with clearer data and a more stable primary path, and keep the other as an open question.
|
|
64
|
+
|
|
65
|
+
For vague single pages, add a default `content_fill_policy`: keep product identity, primary task, optional Hero or primary task area, one main content area, necessary primary action, and a small set of samples. Do not proactively add KPI walls, long lists, right-side insights, recommended content, recent visits, quick entries, or multi-level navigation unless the primary task needs them. First stabilize the main content white base, neutral sidebar selected state, a small amount of accent color, restrained font weight, at most two surface layers, and the 4px grid. Then add content.
|
|
66
|
+
|
|
67
|
+
First-pass content budget:
|
|
68
|
+
|
|
69
|
+
- The first screen usually has only 2–3 visible content groups.
|
|
70
|
+
- Table / list samples use 5–8 rows; card samples use 3–4 items.
|
|
71
|
+
- KPIs appear only when the primary task needs them, with 1–3 items, and no full metric wall.
|
|
72
|
+
- Right auxiliary areas and recent visits are added only when directly needed by the primary task. Omit by default first.
|
|
73
|
+
- The bottom of the page may keep whitespace. Do not fill the view with unsupported content.
|
|
74
|
+
|
|
75
|
+
When the page name or scene naturally needs first-glance intent, the opening can become `hero-card`, such as workspace, portal, home page, launch page, AI assistant, CRM / sales summary, data-insight entry, recommendation, and empty state. Strong table, settings, audit, approval detail, and form tasks default to title-area openings.
|
|
76
|
+
|
|
77
|
+
Tier 3: Accept the user-provided layout structure and fill four things:
|
|
78
|
+
|
|
79
|
+
- Whether every region is static display, clickable entry, or dynamic data list.
|
|
80
|
+
- Which regions need loading, empty, error, and filtered-empty states.
|
|
81
|
+
- Ownership of hover, active, selected, and disabled states for every control.
|
|
82
|
+
- How regions collapse, wrap, or move at the compact breakpoint.
|
|
83
|
+
|
|
84
|
+
Tier 4: First build a page list:
|
|
85
|
+
|
|
86
|
+
- `primary`: primary page fully implemented in this round.
|
|
87
|
+
- `secondary`: placeholder pages connected by navigation.
|
|
88
|
+
- `out`: pages or capabilities clearly excluded.
|
|
89
|
+
|
|
90
|
+
A complete interactive primary page is usually better than multiple half-finished pages. Every navigation item needs a target, even if that target is a recorded placeholder page.
|
|
91
|
+
|
|
92
|
+
## Ambiguity Handling
|
|
93
|
+
|
|
94
|
+
Ask the user first when:
|
|
95
|
+
|
|
96
|
+
- The number of top-level pages is unclear and affects navigation structure.
|
|
97
|
+
- The primary task cannot be reasonably inferred from the prompt.
|
|
98
|
+
- User constraints directly conflict with mature Feishu / UD patterns and affect component candidates.
|
|
99
|
+
|
|
100
|
+
Fill conservatively when:
|
|
101
|
+
|
|
102
|
+
- Field names, status labels, and a small set of sample data are needed.
|
|
103
|
+
- A secondary function can use a drawer or placeholder page.
|
|
104
|
+
- Icon intent has a common default.
|
|
105
|
+
- Mock data and real data source are unspecified.
|
|
106
|
+
|
|
107
|
+
Record conservative fill-ins in `conservative_assumptions` so the user can correct them later.
|