architext 0.0.3 → 0.0.5
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/CHANGELOG.md +56 -1
- package/README.md +94 -12
- package/README.zh-CN.md +94 -12
- package/dist/index.js +43 -39
- package/dist/templates/en/briefs/_base.md +44 -11
- package/dist/templates/en/briefs/_modules.md +31 -4
- package/dist/templates/en/docs/global/api_snapshot.json +24 -0
- package/dist/templates/en/docs/global/command_api.json +26 -0
- package/dist/templates/en/docs/global/env_registry.json +12 -0
- package/dist/templates/en/docs/global/map.json +5 -0
- package/dist/templates/en/docs/global/public_api.json +12 -0
- package/dist/templates/en/docs/prompts/audit.md +80 -94
- package/dist/templates/en/docs/prompts/code.md +100 -109
- package/dist/templates/en/docs/prompts/edit.md +52 -47
- package/dist/templates/en/docs/prompts/fix.md +49 -42
- package/dist/templates/en/docs/prompts/help.md +23 -31
- package/dist/templates/en/docs/prompts/inherit.md +110 -116
- package/dist/templates/en/docs/prompts/map.md +47 -69
- package/dist/templates/en/docs/prompts/plan.md +160 -171
- package/dist/templates/en/docs/prompts/recover.md +48 -0
- package/dist/templates/en/docs/prompts/ref.md +163 -0
- package/dist/templates/en/docs/prompts/remove.md +55 -107
- package/dist/templates/en/docs/prompts/revise.md +63 -106
- package/dist/templates/en/docs/prompts/scope.md +77 -117
- package/dist/templates/en/docs/prompts/start.md +93 -139
- package/dist/templates/en/docs/shared/verify-result-handling.md +6 -0
- package/dist/templates/en/docs/templates/design.template.md +77 -0
- package/dist/templates/en/docs/templates/spec.template.md +60 -25
- package/dist/templates/en/rules/00_system.md +36 -79
- package/dist/templates/en/rules/01_workflow.md +59 -57
- package/dist/templates/en/rules/03_data_governance.md +46 -42
- package/dist/templates/en/skills/archi-data-sync/SKILL.md +83 -0
- package/dist/templates/en/skills/archi-decompose-roadmap/SKILL.md +166 -151
- package/dist/templates/en/skills/archi-design-patterns/SKILL.md +140 -0
- package/dist/templates/en/skills/archi-feature-relations/SKILL.md +118 -0
- package/dist/templates/en/skills/archi-interview-protocol/SKILL.md +2 -1
- package/dist/templates/en/skills/archi-plan-options/SKILL.md +4 -3
- package/dist/templates/en/skills/archi-silent-audit/SKILL.md +118 -0
- package/dist/templates/en/skills/archi-ui-wireframe/SKILL.md +315 -270
- package/dist/templates/zh/briefs/_base.md +46 -14
- package/dist/templates/zh/briefs/_modules.md +29 -2
- package/dist/templates/zh/docs/global/api_snapshot.json +24 -0
- package/dist/templates/zh/docs/global/command_api.json +26 -0
- package/dist/templates/zh/docs/global/data_snapshot.json +0 -1
- package/dist/templates/zh/docs/global/design_tokens.json +0 -1
- package/dist/templates/zh/docs/global/dictionary.json +1 -1
- package/dist/templates/zh/docs/global/env_registry.json +12 -0
- package/dist/templates/zh/docs/global/error_codes.json +0 -8
- package/dist/templates/zh/docs/global/map.json +28 -3
- package/dist/templates/zh/docs/global/public_api.json +12 -0
- package/dist/templates/zh/docs/global/vision.md +1 -1
- package/dist/templates/zh/docs/prompts/audit.md +43 -57
- package/dist/templates/zh/docs/prompts/code.md +68 -77
- package/dist/templates/zh/docs/prompts/edit.md +44 -39
- package/dist/templates/zh/docs/prompts/fix.md +33 -26
- package/dist/templates/zh/docs/prompts/help.md +13 -21
- package/dist/templates/zh/docs/prompts/inherit.md +81 -87
- package/dist/templates/zh/docs/prompts/map.md +23 -45
- package/dist/templates/zh/docs/prompts/plan.md +134 -146
- package/dist/templates/zh/docs/prompts/recover.md +48 -0
- package/dist/templates/zh/docs/prompts/ref.md +163 -0
- package/dist/templates/zh/docs/prompts/remove.md +31 -83
- package/dist/templates/zh/docs/prompts/revise.md +43 -84
- package/dist/templates/zh/docs/prompts/scope.md +53 -93
- package/dist/templates/zh/docs/prompts/start.md +75 -121
- package/dist/templates/zh/docs/shared/verify-result-handling.md +6 -0
- package/dist/templates/zh/docs/templates/design.template.md +77 -0
- package/dist/templates/zh/docs/templates/spec.template.md +60 -25
- package/dist/templates/zh/rules/00_system.md +37 -80
- package/dist/templates/zh/rules/01_workflow.md +60 -58
- package/dist/templates/zh/rules/02_tech_stack.md +7 -6
- package/dist/templates/zh/rules/03_data_governance.md +43 -39
- package/dist/templates/zh/rules/99_context_glue.md +2 -2
- package/dist/templates/zh/skills/archi-data-sync/SKILL.md +83 -0
- package/dist/templates/zh/skills/archi-decompose-roadmap/SKILL.md +70 -56
- package/dist/templates/zh/skills/archi-design-patterns/SKILL.md +140 -0
- package/dist/templates/zh/skills/archi-feature-relations/SKILL.md +118 -0
- package/dist/templates/zh/skills/archi-interview-protocol/SKILL.md +2 -1
- package/dist/templates/zh/skills/archi-plan-options/SKILL.md +26 -25
- package/dist/templates/zh/skills/archi-silent-audit/SKILL.md +118 -0
- package/dist/templates/zh/skills/archi-ui-wireframe/SKILL.md +317 -269
- package/package.json +1 -1
- package/dist/templates/zh-Hant/briefs/_base.md +0 -115
- package/dist/templates/zh-Hant/briefs/_modules.md +0 -173
- package/dist/templates/zh-Hant/docs/global/data_snapshot.json +0 -31
- package/dist/templates/zh-Hant/docs/global/design_tokens.json +0 -135
- package/dist/templates/zh-Hant/docs/global/dictionary.json +0 -35
- package/dist/templates/zh-Hant/docs/global/error_codes.json +0 -19
- package/dist/templates/zh-Hant/docs/global/map.json +0 -94
- package/dist/templates/zh-Hant/docs/global/roadmap.json +0 -39
- package/dist/templates/zh-Hant/docs/global/vision.md +0 -82
- package/dist/templates/zh-Hant/docs/prompts/audit.md +0 -150
- package/dist/templates/zh-Hant/docs/prompts/code.md +0 -160
- package/dist/templates/zh-Hant/docs/prompts/edit.md +0 -87
- package/dist/templates/zh-Hant/docs/prompts/fix.md +0 -86
- package/dist/templates/zh-Hant/docs/prompts/help.md +0 -69
- package/dist/templates/zh-Hant/docs/prompts/inherit.md +0 -270
- package/dist/templates/zh-Hant/docs/prompts/map.md +0 -131
- package/dist/templates/zh-Hant/docs/prompts/plan.md +0 -252
- package/dist/templates/zh-Hant/docs/prompts/remove.md +0 -162
- package/dist/templates/zh-Hant/docs/prompts/revise.md +0 -160
- package/dist/templates/zh-Hant/docs/prompts/scope.md +0 -198
- package/dist/templates/zh-Hant/docs/prompts/start.md +0 -258
- package/dist/templates/zh-Hant/docs/templates/plan.template.json +0 -88
- package/dist/templates/zh-Hant/docs/templates/scope-brief.template.md +0 -58
- package/dist/templates/zh-Hant/docs/templates/spec.template.md +0 -51
- package/dist/templates/zh-Hant/docs/templates/ui.template.md +0 -51
- package/dist/templates/zh-Hant/rules/00_system.md +0 -123
- package/dist/templates/zh-Hant/rules/01_workflow.md +0 -93
- package/dist/templates/zh-Hant/rules/02_tech_stack.md +0 -192
- package/dist/templates/zh-Hant/rules/03_data_governance.md +0 -102
- package/dist/templates/zh-Hant/rules/04_cli_tools.md +0 -50
- package/dist/templates/zh-Hant/rules/90_custom_rules.md +0 -21
- package/dist/templates/zh-Hant/rules/99_context_glue.md +0 -53
- package/dist/templates/zh-Hant/skills/archi-decompose-roadmap/SKILL.md +0 -293
- package/dist/templates/zh-Hant/skills/archi-interview-protocol/SKILL.md +0 -86
- package/dist/templates/zh-Hant/skills/archi-plan-options/SKILL.md +0 -364
- package/dist/templates/zh-Hant/skills/archi-ui-wireframe/SKILL.md +0 -337
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: archi-ui-wireframe
|
|
3
|
-
|
|
3
|
+
type: subagent
|
|
4
|
+
description: UI concept design expert. Generates hi-fi ui_concept.html — when tokens are sufficient, outputs colored hi-fi design directly; when tokens are incomplete, guides user to fill them first. Supports adopt mode to reverse-capture UI state from existing code. The output is the single visual source of truth for the entire project UI; all Task-level ui.md files reference this file for their screen scope.
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
# UI Concept Design
|
|
@@ -14,6 +15,12 @@ description: UI concept design expert. Generates ui_concept.html in two phases
|
|
|
14
15
|
reads: vision.md + roadmap.json + design_tokens.json + 02_tech_stack.md
|
|
15
16
|
writes: [[__DOCS_DIR__]]/global/ui_concept.html
|
|
16
17
|
↓
|
|
18
|
+
/archi.inherit → code analysis + design_tokens.json
|
|
19
|
+
↓
|
|
20
|
+
[This Skill] archi-ui-wireframe (adopt mode)
|
|
21
|
+
reads: code routes/components/layouts + design_tokens.json
|
|
22
|
+
writes: [[__DOCS_DIR__]]/global/ui_concept.html
|
|
23
|
+
↓
|
|
17
24
|
/archi.plan <ID>
|
|
18
25
|
reads: ui_concept.html (locates screens/components this task covers)
|
|
19
26
|
writes: ui.md (scope declaration only — no global layout duplication)
|
|
@@ -32,311 +39,349 @@ description: UI concept design expert. Generates ui_concept.html in two phases
|
|
|
32
39
|
| Mode | Trigger source | Scope |
|
|
33
40
|
|:---|:---|:---|
|
|
34
41
|
| Initial generation | After `/archi.start` completes | Full generation — all screens |
|
|
42
|
+
| Reverse adoption | After `/archi.inherit` completes | Reverse-generate all screens from code routes/components |
|
|
35
43
|
| Regeneration | Manual user invocation | Full rewrite (global UI redesign) |
|
|
36
44
|
| Append screens | After `/archi.scope` adds new tasks | Add new pages only; existing pages untouched |
|
|
37
45
|
| Plan refinement | `/archi.plan` discovers UI divergence | Update only the affected screen (new states / sub-screens / layout corrections) |
|
|
38
46
|
| Modify screens | After `/archi.edit` changes a task | Update only affected screens; leave others intact |
|
|
39
47
|
| Remove screens | After `/archi.remove` retires a task | Remove corresponding screens and control bar entries |
|
|
40
48
|
|
|
41
|
-
> **Phase 2 (visual styling) timing**: Phase 2 does not need to immediately follow Phase 1. Recommended to run after core tasks (≥ 50% of Roadmap tasks) have completed planning, ensuring the styled prototype is based on a stable screen structure. If a screen is updated by Plan Refinement after Phase 2, only that screen needs re-styling — a full Phase 2 rerun is not required.
|
|
42
|
-
|
|
43
49
|
---
|
|
44
50
|
|
|
45
|
-
##
|
|
51
|
+
## Generation Protocol
|
|
46
52
|
|
|
47
|
-
###
|
|
53
|
+
### Step 1 — Load Context
|
|
48
54
|
|
|
49
|
-
**
|
|
55
|
+
**Action**:
|
|
56
|
+
- `vision.md` → extract: target platform, user roles, north-star metric
|
|
57
|
+
- `roadmap.json` → extract: all UI tasks, map to screen/state list
|
|
58
|
+
- `design_tokens.json` → extract: `mode.default`, `illustration.iconLibrary`, aesthetic direction
|
|
59
|
+
- Rule file `02_tech_stack` → extract: target platform (Web/Mobile/Desktop), navigation framework
|
|
50
60
|
|
|
51
|
-
|
|
61
|
+
### Step 2 — Plan Screen Inventory
|
|
52
62
|
|
|
53
|
-
|
|
63
|
+
(Internal step, do not output to user):
|
|
54
64
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
- Rule file `02_tech_stack` → extract: target platform (Web/Mobile/Desktop), navigation framework
|
|
60
|
-
|
|
61
|
-
2. **Plan screen inventory** (internal step, do not output to user):
|
|
62
|
-
|
|
63
|
-
| Screen ID | Screen name | Roadmap task | State list |
|
|
64
|
-
|:---|:---|:---|:---|
|
|
65
|
-
| S-01 | [name] | [task ID] | default, loading, empty, error |
|
|
66
|
-
| ... | | | |
|
|
67
|
-
|
|
68
|
-
> **Screen ID Stability Rule** (CRITICAL): Screen IDs are permanent once assigned. Deleted screen IDs are retired — new screens must use new IDs (e.g., after S-07 is deleted, the next screen is S-08, not S-07). Never reuse or renumber existing IDs. All `ui.md` files reference screens by ID; any ID change will break those references.
|
|
69
|
-
|
|
70
|
-
3. **Select HTML skeleton spec** (auto-adapt by target platform):
|
|
71
|
-
|
|
72
|
-
| Platform | Viewport | Top bar | Navigation |
|
|
73
|
-
|:---|:---|:---|:---|
|
|
74
|
-
| Web / Desktop SaaS | 1280×800px | Fixed header | Left sidebar |
|
|
75
|
-
| Web / Marketing | 1440×900px | Transparent→fixed header | Top horizontal nav |
|
|
76
|
-
| Mobile Web / Mini-app | 390×844px | Status bar + nav bar | Bottom TabBar |
|
|
77
|
-
| Tablet / Dashboard | 1024×768px | Fixed header | Collapsible sidebar |
|
|
78
|
-
|
|
79
|
-
> Platform inferred from `02_tech_stack` or vision.md target device; default to Web / Desktop SaaS if unclear.
|
|
80
|
-
|
|
81
|
-
4. **Generate wireframe HTML** — write to `[[__DOCS_DIR__]]/global/ui_concept.html`:
|
|
82
|
-
|
|
83
|
-
**HTML structure spec**:
|
|
84
|
-
```
|
|
85
|
-
<html>
|
|
86
|
-
<head>
|
|
87
|
-
<!-- Inline CSS: wireframe style (grayscale, no brand colors) -->
|
|
88
|
-
<!-- Wireframe palette: bg=#f5f5f5, surface=#fff, border=#d0d0d0,
|
|
89
|
-
text=#333, muted=#888, accent=#555 -->
|
|
90
|
-
</head>
|
|
91
|
-
<body style="margin:0; display:flex; flex-direction:column; height:100vh; overflow:hidden;">
|
|
92
|
-
<!-- Top bar: project name + current screen path (fixed, not scrollable) -->
|
|
93
|
-
<header class="wf-topbar">...</header>
|
|
94
|
-
|
|
95
|
-
<!-- Content area: scrollable, renders currently active screen -->
|
|
96
|
-
<main class="wf-content" style="flex:1; overflow:auto;">
|
|
97
|
-
<!-- Each screen: <section class="wf-screen" id="S-XX" data-states="default,loading,empty,error"> -->
|
|
98
|
-
<!-- Each state: <div class="wf-state" data-state="default"> -->
|
|
99
|
-
</main>
|
|
100
|
-
|
|
101
|
-
<!-- Control bar: left=state switch, center=file label, right=page switch (fixed bottom, wireframe style) -->
|
|
102
|
-
<footer class="wf-ctrl-bar">
|
|
103
|
-
<div class="ctrl-group">
|
|
104
|
-
<span class="ctrl-lbl">STATE</span>
|
|
105
|
-
<!-- State pills for current screen, rendered by JS -->
|
|
106
|
-
</div>
|
|
107
|
-
<div class="wf-file-label">Low-fi Wireframe · [Project Name]</div>
|
|
108
|
-
<div class="ctrl-group">
|
|
109
|
-
<span class="ctrl-lbl">PAGE</span>
|
|
110
|
-
<!-- All screen page pills, rendered by JS -->
|
|
111
|
-
</div>
|
|
112
|
-
</footer>
|
|
113
|
-
</body>
|
|
114
|
-
</html>
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
**Element labeling spec** (`data-el` attribute):
|
|
118
|
-
- Every interactive element or semantic block must have `data-el="[user-language label]"`
|
|
119
|
-
- Label language = Brief's primary language (Chinese project → Chinese labels, English project → English)
|
|
120
|
-
- Labels shown on hover via CSS `::before`, hidden by default
|
|
121
|
-
- When a parent is hovered, child labels auto-hide via `:has([data-el]:hover)::before { opacity:0 }`
|
|
122
|
-
|
|
123
|
-
**Interaction spec** (CSS + minimal JS, no external dependencies):
|
|
124
|
-
- Page switch: click PAGE pill → toggle `.wf-screen` display; JS syncs STATE pills
|
|
125
|
-
- State switch: click STATE pill → toggle `.wf-state` display within current screen
|
|
126
|
-
- Active style: `.pill.on-page` / `.pill.on-state` → `background:#444; color:#fff`
|
|
127
|
-
- Control bar must stay wireframe-style (grayscale, uppercase label, dashed border-top); no color
|
|
128
|
-
|
|
129
|
-
**Wireframe content rules** (Content Wireframe — grayscale with real-feeling content):
|
|
130
|
-
- Full grayscale; brand colors deferred to Phase 2
|
|
131
|
-
- **No pure gray rectangle placeholders** — use realistic placeholder content so users can genuinely evaluate whether the layout works:
|
|
132
|
-
|
|
133
|
-
| Element type | Rule |
|
|
134
|
-
|:---|:---|
|
|
135
|
-
| Headings / nav labels | Use real business names from roadmap task titles, e.g. "Dashboard", "Project List", "Settings" |
|
|
136
|
-
| Buttons | Write specific action text, e.g. "Create Project", "Sign In", "Save Changes" — never write "[Button]" |
|
|
137
|
-
| Inputs | Write placeholder text, e.g. "Search project name…", "Enter email address" |
|
|
138
|
-
| Lists / tables | Generate at least 3–4 rows of example data (realistic fake data in the project's domain: names, dates, statuses) |
|
|
139
|
-
| Chart / image areas | Use labeled rectangles, but label with the actual content type, e.g. "Line chart: visits last 7 days" not "[Chart]" |
|
|
140
|
-
| Empty state | Write specific empty state copy, e.g. "No projects yet — click 'Create Project' to get started" |
|
|
141
|
-
| Error state | Write specific error copy, e.g. "Connection failed. Please check your network and try again" |
|
|
142
|
-
|
|
143
|
-
- Typography must have hierarchy: page title large (20–24px) → section heading medium (16px) → body small (14px) → caption smaller (12px)
|
|
144
|
-
- Spacing must breathe: component gap > element gap > line height (no crowding)
|
|
145
|
-
- Each screen must include all core interaction entry points from its Roadmap task
|
|
146
|
-
|
|
147
|
-
5. **Generate AI Index** — write `[[__DOCS_DIR__]]/global/ui_context.md`:
|
|
148
|
-
|
|
149
|
-
Extract a structured navigation index from the screen plan in step 2 (the sole AI entry point for UI structure):
|
|
150
|
-
|
|
151
|
-
```markdown
|
|
152
|
-
# UI Context
|
|
153
|
-
> Platform: [platform] | Phase: Phase 1 Wireframe (updated after Phase 2 coloring)
|
|
154
|
-
> Updated: YYYY-MM-DD | Generated by archi-ui-wireframe Skill — do not edit manually
|
|
155
|
-
|
|
156
|
-
## Screen Inventory
|
|
157
|
-
| ID | Name | Route | States |
|
|
158
|
-
|:---|:---|:---|:---|
|
|
159
|
-
| S-01 | [name] | [route] | default, loading, ... |
|
|
160
|
-
|
|
161
|
-
## Navigation Graph
|
|
162
|
-
S-XX →([trigger])→ S-YY
|
|
163
|
-
|
|
164
|
-
## Global Shared Components
|
|
165
|
-
| Component | Appears On |
|
|
166
|
-
|:---|:---|
|
|
167
|
-
| [component] | S-XX, S-YY |
|
|
168
|
-
|
|
169
|
-
## Screen Structure Summary
|
|
170
|
-
> Extracted from wireframe data-el in Phase 1; refreshed to final layout after Phase 2 coloring.
|
|
171
|
-
> When writing ui.md Section 2, align with this section — do not invent layout that diverges from confirmed structure.
|
|
172
|
-
|
|
173
|
-
### S-XX · [Screen name]
|
|
174
|
-
**Layout**: [e.g. "centered single-column max-w-400px" or "240px left sidebar + right content area"]
|
|
175
|
-
**States**: default ([core entry points]) | loading (skeleton) | empty / error (if applicable)
|
|
176
|
-
**Key regions**: [semantic blocks + interactive elements from data-el, e.g.: top nav bar, main form area, submit button, error message area]
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
> `ui_context.md` is the sole entry point for all AI commands reading UI structure; `ui_concept.html` is for human browser preview only.
|
|
180
|
-
|
|
181
|
-
6. **Output Gate**:
|
|
182
|
-
|
|
183
|
-
After generating the wireframe, output screen coverage summary:
|
|
184
|
-
```
|
|
185
|
-
### ui_concept.html generated (Phase 1 Wireframe)
|
|
186
|
-
### ui_context.md generated (AI screen index)
|
|
187
|
-
|
|
188
|
-
**Screen coverage** (N screens total):
|
|
189
|
-
| Screen | Name | States |
|
|
190
|
-
|:---|:---|:---|
|
|
191
|
-
| S-01 | [name] | N |
|
|
192
|
-
| ... | | |
|
|
193
|
-
|
|
194
|
-
**Navigation structure**: [e.g. "Left sidebar + top breadcrumb"]
|
|
195
|
-
**Platform**: [Web Desktop 1280px / Mobile 390px / ...]
|
|
196
|
-
|
|
197
|
-
> Open `[[__DOCS_DIR__]]/global/ui_concept.html` in a browser to verify information architecture.
|
|
198
|
-
> Reply **OK** to proceed to Phase 2 visual styling; or describe layout/screen adjustments needed.
|
|
199
|
-
```
|
|
200
|
-
|
|
201
|
-
**Gate**: Phase 2 starts only after user replies **OK**; no styling until confirmed.
|
|
65
|
+
| Screen ID | Screen name | Roadmap task | State list |
|
|
66
|
+
|:---|:---|:---|:---|
|
|
67
|
+
| S-01 | [name] | [task ID] | default, loading, empty, error |
|
|
68
|
+
| ... | | | |
|
|
202
69
|
|
|
203
|
-
|
|
70
|
+
> **Screen ID Stability Rule** (CRITICAL): Screen IDs are permanent once assigned. Deleted screen IDs are retired — new screens must use new IDs (e.g., after S-07 is deleted, the next screen is S-08, not S-07). Never reuse or renumber existing IDs. All `ui.md` files reference screens by ID; any ID change will break those references.
|
|
204
71
|
|
|
205
|
-
###
|
|
72
|
+
### Step 3 — Select HTML Skeleton Spec
|
|
206
73
|
|
|
207
|
-
|
|
208
|
-
**Trigger**: User reply is not OK — contains layout adjustments, screen additions/removals, navigation changes.
|
|
209
|
-
**Action**: Incorporate feedback, update only the affected parts of `ui_concept.html` (no full rewrite), sync `ui_context.md` (keep screen index consistent with `ui_concept.html`), re-display summary, await confirmation.
|
|
74
|
+
(Auto-adapt by target platform):
|
|
210
75
|
|
|
211
|
-
|
|
76
|
+
| Platform | Viewport | Top bar | Navigation |
|
|
77
|
+
|:---|:---|:---|:---|
|
|
78
|
+
| Web / Desktop SaaS | 1280×800px | Fixed header | Left sidebar |
|
|
79
|
+
| Web / Marketing | 1440×900px | Transparent→fixed header | Top horizontal nav |
|
|
80
|
+
| Mobile Web / Mini-app | 390×844px | Status bar + nav bar | Bottom TabBar |
|
|
81
|
+
| Tablet / Dashboard | 1024×768px | Fixed header | Collapsible sidebar |
|
|
82
|
+
|
|
83
|
+
> Platform inferred from `02_tech_stack` or vision.md target device; default to Web / Desktop SaaS if unclear.
|
|
84
|
+
|
|
85
|
+
### Step 4 — Tokens Prerequisite Check + Guidance
|
|
86
|
+
|
|
87
|
+
Read `design_tokens.json` and check key field completeness:
|
|
212
88
|
|
|
213
|
-
|
|
89
|
+
| Field path | Pass condition | When insufficient |
|
|
90
|
+
|:---|:---|:---|
|
|
91
|
+
| `aestheticDirection.preset` | Non-empty | Include in guidance Q1 |
|
|
92
|
+
| `primitivePalette.brand` | At least 1 non-empty color value | Include in guidance Q2 |
|
|
93
|
+
| `semanticTokens.colors` | At least `bg`/`surface`/`text` semantic mappings | Include in guidance Q2 |
|
|
94
|
+
| `semanticTokens.typography` | At least 1 font family declaration | AI picks from aesthetic direction (non-blocking) |
|
|
95
|
+
| `motion.preference` | Non-empty | Defaults to `subtle` (non-blocking) |
|
|
96
|
+
| `illustration.iconLibrary` | Non-empty | Fall back to self-drawn inline SVG (non-blocking); emoji substitution forbidden |
|
|
214
97
|
|
|
215
|
-
**
|
|
98
|
+
**Tokens sufficient** → proceed directly to Step 5 hi-fi generation.
|
|
216
99
|
|
|
217
|
-
**
|
|
100
|
+
**Tokens insufficient** → output structured guidance questions (max 3), then AI auto-fills tokens after user answers:
|
|
218
101
|
|
|
219
|
-
|
|
102
|
+
```
|
|
103
|
+
### Visual Style Confirmation
|
|
220
104
|
|
|
221
|
-
|
|
105
|
+
**[Q1] Aesthetic direction**
|
|
106
|
+
| ID | Option | Reference products |
|
|
222
107
|
|:---|:---|:---|
|
|
223
|
-
|
|
|
224
|
-
|
|
|
225
|
-
|
|
|
226
|
-
|
|
|
227
|
-
|
|
228
|
-
|
|
108
|
+
| A | saas-dark | Linear, Vercel |
|
|
109
|
+
| B | saas-light [Recommended] | Notion, Stripe |
|
|
110
|
+
| C | dashboard | Grafana, Datadog |
|
|
111
|
+
| D | Other | (Please describe) |
|
|
112
|
+
|
|
113
|
+
**[Q2] Brand primary color**
|
|
114
|
+
> Enter Hex value (e.g. #4F46E5), or reply "no preference" for AI to generate based on aesthetic direction
|
|
115
|
+
|
|
116
|
+
**[Q3] Information density**
|
|
117
|
+
| ID | Option |
|
|
118
|
+
|:---|:---|
|
|
119
|
+
| A | Generous whitespace / immersive |
|
|
120
|
+
| B | Moderate [Recommended] |
|
|
121
|
+
| C | Information-dense / dashboard style |
|
|
122
|
+
|
|
123
|
+
**INPUT**: `Q1 answer | Q2 answer | Q3 answer`
|
|
124
|
+
```
|
|
229
125
|
|
|
230
|
-
|
|
126
|
+
AI fills `design_tokens.json` (writes to file) based on answers, then continues generation. Fields already extracted from code CSS variables/theme are preserved, not overwritten.
|
|
231
127
|
|
|
232
|
-
|
|
128
|
+
### Step 5 — Generate Hi-fi HTML
|
|
129
|
+
|
|
130
|
+
Write to `[[__DOCS_DIR__]]/global/ui_concept.html`:
|
|
131
|
+
|
|
132
|
+
**HTML structure spec**:
|
|
133
|
+
```
|
|
134
|
+
<html>
|
|
135
|
+
<head>
|
|
136
|
+
<!-- Inline CSS: hi-fi visual style based on design_tokens.json -->
|
|
137
|
+
</head>
|
|
138
|
+
<body style="margin:0; display:flex; flex-direction:column; height:100vh; overflow:hidden;">
|
|
139
|
+
<!-- Top bar: project name + current screen path (fixed, not scrollable) -->
|
|
140
|
+
<header class="wf-topbar">...</header>
|
|
141
|
+
|
|
142
|
+
<!-- Content area: scrollable, renders currently active screen -->
|
|
143
|
+
<main class="wf-content" style="flex:1; overflow:auto;">
|
|
144
|
+
<!-- Each screen: <section class="wf-screen" id="S-XX" data-states="default,loading,empty,error"> -->
|
|
145
|
+
<!-- Each state: <div class="wf-state" data-state="default"> -->
|
|
146
|
+
</main>
|
|
147
|
+
|
|
148
|
+
<!-- Control bar: left=state switch, center=file label, right=page switch (fixed bottom, wireframe style) -->
|
|
149
|
+
<footer class="wf-ctrl-bar">
|
|
150
|
+
<div class="ctrl-group">
|
|
151
|
+
<span class="ctrl-lbl">STATE</span>
|
|
152
|
+
<!-- State pills for current screen, rendered by JS -->
|
|
153
|
+
</div>
|
|
154
|
+
<div class="wf-file-label">UI Concept · [Project Name]</div>
|
|
155
|
+
<div class="ctrl-group">
|
|
156
|
+
<span class="ctrl-lbl">PAGE</span>
|
|
157
|
+
<!-- All screen page pills, rendered by JS -->
|
|
158
|
+
</div>
|
|
159
|
+
</footer>
|
|
160
|
+
</body>
|
|
161
|
+
</html>
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
**Element labeling spec** (`data-el` attribute):
|
|
165
|
+
- Every interactive element or semantic block must have `data-el="[user-language label]"`
|
|
166
|
+
- Label language = Brief's primary language (Chinese project → Chinese labels, English project → English)
|
|
167
|
+
- Labels shown on hover via CSS `::before`, hidden by default
|
|
168
|
+
- When a parent is hovered, child labels auto-hide via `:has([data-el]:hover)::before { opacity:0 }`
|
|
169
|
+
|
|
170
|
+
**Interaction spec** (CSS + minimal JS, no external dependencies):
|
|
171
|
+
- Page switch: click PAGE pill → toggle `.wf-screen` display; JS syncs STATE pills
|
|
172
|
+
- State switch: click STATE pill → toggle `.wf-state` display within current screen
|
|
173
|
+
- Active style: `.pill.on-page` / `.pill.on-state` → `background:#444; color:#fff`
|
|
174
|
+
- Control bar must stay wireframe-style (grayscale, uppercase label, dashed border-top); no color
|
|
175
|
+
|
|
176
|
+
**UI Quality Standards** (CRITICAL):
|
|
177
|
+
|
|
178
|
+
| Dimension | Requirement |
|
|
179
|
+
|:---|:---|
|
|
180
|
+
| Positioning | Hi-fi interface, polished enough for developer handoff — not a wireframe |
|
|
181
|
+
| Card hierarchy | Use soft shadows for depth; do not substitute hard borders for shadows |
|
|
182
|
+
| Primary color usage | Only for CTAs and key status feedback; no more than 10% of total area |
|
|
183
|
+
| Global consistency | Border radius, icon sizes, spacing must be globally uniform |
|
|
184
|
+
| Typography | Ample whitespace, clear font size hierarchy (at least 3 levels of contrast) |
|
|
185
|
+
| Interaction states | All interactive elements must have hover / focus / disabled styles |
|
|
186
|
+
| Content fill | Use realistic content; no Lorem ipsum / "Title" / placeholder text |
|
|
187
|
+
|
|
188
|
+
**Content rules**:
|
|
189
|
+
|
|
190
|
+
| Element type | Rule |
|
|
191
|
+
|:---|:---|
|
|
192
|
+
| Headings / nav labels | Use real business names from roadmap task titles, e.g. "Dashboard", "Project List", "Settings" |
|
|
193
|
+
| Buttons | Write specific action text, e.g. "Create Project", "Sign In", "Save Changes" — never write "[Button]" |
|
|
194
|
+
| Inputs | Write placeholder text, e.g. "Search project name…", "Enter email address" |
|
|
195
|
+
| Lists / tables | Generate at least 3–4 rows of example data (realistic fake data in the project's domain: names, dates, statuses) |
|
|
196
|
+
| Chart / image areas | Use labeled rectangles, but label with the actual content type, e.g. "Line chart: visits last 7 days" not "[Chart]" |
|
|
197
|
+
| Empty state | Write specific empty state copy, e.g. "No projects yet — click 'Create Project' to get started" |
|
|
198
|
+
| Error state | Write specific error copy, e.g. "Connection failed. Please check your network and try again" |
|
|
199
|
+
|
|
200
|
+
**Aesthetic direction → design parameter mapping**:
|
|
201
|
+
|
|
202
|
+
Use `aestheticDirection.preset` to determine baseline values for design parameters (explicit Token values take priority; baselines fill empty Tokens):
|
|
203
|
+
|
|
204
|
+
| Preset | Background tone | Radius | Shadow | Font strategy | Layout traits | Reference products |
|
|
205
|
+
|:---|:---|:---|:---|:---|:---|:---|
|
|
206
|
+
| `saas-dark` | Dark (#0a-#15 range) | sm:4px md:8px | Near-zero, use borders for layering | Sans-serif, compact | High contrast, sharp edges, tight spacing | Linear, Vercel, Raycast |
|
|
207
|
+
| `saas-light` | White (#fafafa-#fff) | sm:6px md:12px | Soft (0 1px 3px rgba(0,0,0,0.08)) | System font or sans-serif | Breathing room, thin borders, whitespace | Notion, Stripe, GitHub |
|
|
208
|
+
| `dashboard` | Dark gray / dark blue | sm:8px md:12px | Card elevation (0 2px 8px) | Tabular nums + sans-serif | Card grids, info-dense, compact tables | Grafana, Datadog |
|
|
209
|
+
| `marketing` | Gradient / bold color blocks | lg:16px+ | Dramatic (0 8px 32px) | Large display font + refined body font | Big headings, full-width sections, visual narrative | Loom, Framer |
|
|
210
|
+
| `mobile-app` | Soft background | lg:16px xl:24px | Soft diffused (0 4px 16px) | System font -apple-system | Large touch targets, wide spacing, card-based | Telegram, Bear |
|
|
211
|
+
| `editorial` | Warm white / cream | Near-zero 0-4px | None or very faint | Serif display + sans-serif body | Narrow column, tall line-height, typography-driven | Medium, Substack |
|
|
212
|
+
| `brutalist` | Pure white or pure black | 0px | None | Monospace or system font | No decoration, dense, function-first | Craigslist, HN |
|
|
213
|
+
|
|
214
|
+
> `custom`: read `aestheticDirection.customDescription`, extract keywords, map to nearest preset, then layer custom adjustments on top.
|
|
215
|
+
|
|
216
|
+
**Anti-AI aesthetic blacklist** (CRITICAL — never violate during generation):
|
|
217
|
+
|
|
218
|
+
| Category | Forbidden | Use instead |
|
|
219
|
+
|:---|:---|:---|
|
|
220
|
+
| Typography | Inter, Roboto, Arial as heading font | Characterful fonts for headings (e.g. Cal Sans, General Sans, Satoshi, Outfit); body text may use system fonts |
|
|
221
|
+
| Colors | Purple gradient on white (signature AI default aesthetic) | Derive from `aestheticDirection`; palette must have hierarchy — one dominant color + sharp accent > evenly-distributed timid palette |
|
|
222
|
+
| Layout | Every screen uses the same centered card layout | Different screen types need layout variation: list vs detail vs form each have distinct character |
|
|
223
|
+
| Radius | Uniform rounded-lg on everything | Radius must have hierarchy: containers large, buttons medium, badges small (or uniformly 0/sm per aesthetic direction) |
|
|
224
|
+
| Shadow | Identical shadow-md everywhere | Shadow must match aesthetic direction: dark themes barely use shadow; light themes use layered shadow |
|
|
225
|
+
| Motion | Scattered transition-all everywhere | Focus on high-impact moments: orchestrated page load (staggered reveals via animation-delay) > scattered micro-interactions |
|
|
226
|
+
| Emoji | Using emoji as icons (🔔📁⚙️✅ etc.) → inconsistent cross-platform rendering, clashes with the overall design language | Use the icon library declared in `illustration.iconLibrary`, or plain text/symbols with `data-el` annotation |
|
|
227
|
+
| Overall | Every generation converges to the same look | Each project's design MUST differ by aesthetic direction — two different projects' ui_concept.html must be instantly distinguishable |
|
|
228
|
+
|
|
229
|
+
**Styling rules** (execute within aesthetic direction baseline + blacklist constraints):
|
|
230
|
+
|
|
231
|
+
| Styling dimension | Rule |
|
|
232
|
+
|:---|:---|
|
|
233
|
+
| Colors | Map with `semanticTokens.colors`; brand from `primitivePalette.brand`; empty tokens filled from aesthetic direction baseline |
|
|
234
|
+
| Typography | Use declared fonts from `semanticTokens.typography`; if empty, pick from aesthetic direction strategy (Google Fonts CDN), blacklisted fonts forbidden |
|
|
235
|
+
| Radius/Shadow | Per `layout.radius` / `layout.shadow`; empty values filled from aesthetic direction baseline |
|
|
236
|
+
| Motion | Apply CSS transition/animation per `motion.patterns`; prioritize orchestrated page-load staggered reveal (animation-delay) |
|
|
237
|
+
| Icons | `illustration.iconLibrary` set → import CDN; not set or style=none → self-drawn inline SVG (see spec below); **emoji as icons is forbidden** |
|
|
238
|
+
| Mode | If `mode.support` includes dark, add CSS `@media (prefers-color-scheme: dark)` + toggle button |
|
|
239
|
+
| Forbidden | Follow "Forbidden styles" from vision.md Visual Reference |
|
|
240
|
+
| Space | Create breathing room or controlled density (per aesthetic direction), avoid mechanical uniform spacing |
|
|
241
|
+
| Background | No flat solid-color fills — add subtle texture/gradient mesh/noise/geometric pattern per aesthetic direction |
|
|
242
|
+
|
|
243
|
+
**Self-drawn SVG spec** (use only when no `illustration.iconLibrary` is set):
|
|
244
|
+
|
|
245
|
+
```html
|
|
246
|
+
<!-- Stroke style (saas-dark / saas-light / dashboard) -->
|
|
247
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none"
|
|
248
|
+
stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"
|
|
249
|
+
style="width:1em;height:1em;vertical-align:-0.125em">…</svg>
|
|
250
|
+
|
|
251
|
+
<!-- Fill style (mobile-app / marketing) -->
|
|
252
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"
|
|
253
|
+
fill="currentColor" style="width:1em;height:1em;vertical-align:-0.125em">…</svg>
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
Rules: ① Color 100% via `currentColor`, controlled by parent CSS `color`; ② Size follows font size (`1em`), no hardcoded px; ③ stroke-width: saas-dark/brutalist → `2`, all others → `1.5`; ④ When a complex icon is too hard to draw, use the simplest geometric substitute — emoji as fallback is forbidden.
|
|
257
|
+
|
|
258
|
+
### Step 6 — Generate AI Index
|
|
259
|
+
|
|
260
|
+
Write `[[__DOCS_DIR__]]/global/ui_context.md`:
|
|
261
|
+
|
|
262
|
+
```markdown
|
|
263
|
+
# UI Context
|
|
264
|
+
> Platform: [platform] | Generated by archi-ui-wireframe Skill
|
|
265
|
+
> Updated: YYYY-MM-DD | Do not edit manually
|
|
266
|
+
|
|
267
|
+
## Screen Inventory
|
|
268
|
+
| ID | Name | Route | States |
|
|
269
|
+
|:---|:---|:---|:---|
|
|
270
|
+
| S-01 | [name] | [route] | default, loading, ... |
|
|
271
|
+
|
|
272
|
+
## Navigation Graph
|
|
273
|
+
S-XX →([trigger])→ S-YY
|
|
274
|
+
|
|
275
|
+
## Global Shared Components
|
|
276
|
+
| Component | Appears On |
|
|
277
|
+
|:---|:---|
|
|
278
|
+
| [component] | S-XX, S-YY |
|
|
279
|
+
|
|
280
|
+
## Screen Structure Summary
|
|
281
|
+
> Extracted from ui_concept.html data-el. When writing ui.md Section 2, align with this section — do not invent layout that diverges from confirmed structure.
|
|
233
282
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
| Forbidden | Strictly follow "Forbidden styles" from vision.md Visual Reference |
|
|
285
|
-
| Space | Create breathing room or controlled density (per aesthetic direction), avoid mechanical uniform spacing |
|
|
286
|
-
| Background | No flat solid-color fills — add subtle texture/gradient mesh/noise/geometric pattern per aesthetic direction |
|
|
287
|
-
|
|
288
|
-
5. **Post-styling checklist**:
|
|
289
|
-
- [ ] All screen colors from semanticTokens or aesthetic direction baseline — no arbitrary hardcoded Hex
|
|
290
|
-
- [ ] All motion durations from `motion.duration.*` — no magic numbers
|
|
291
|
-
- [ ] Page/state control bar remains wireframe-style grayscale (no coloring — debug tool identity)
|
|
292
|
-
- [ ] `data-el` labels fully preserved
|
|
293
|
-
- [ ] Every state (default/loading/empty/error) of every screen visually implemented
|
|
294
|
-
- [ ] **Anti-AI aesthetic check**: no blacklisted fonts, no purple-gradient-on-white, layout variety, radius hierarchy
|
|
295
|
-
- [ ] **Identity check**: opening the HTML, one can instantly tell which aesthetic direction this follows — not a generic template
|
|
296
|
-
|
|
297
|
-
6. **Output**:
|
|
298
|
-
- Update `[[__DOCS_DIR__]]/global/ui_concept.html` (colored version overwrites wireframe)
|
|
299
|
-
- **Sync `ui_context.md` Screen Structure Summary**:
|
|
300
|
-
- Update phase label from `Phase 1 Wireframe` to `Phase 2 Visual Styling`
|
|
301
|
-
- Re-extract Layout and Key regions for each screen based on final HTML structure, ensuring summary matches the colored `ui_concept.html`
|
|
302
|
-
- Screen Inventory / Navigation Graph / Global Shared Components: leave unchanged unless structure changed
|
|
303
|
-
- Output summary:
|
|
304
|
-
```
|
|
305
|
-
### ui_concept.html updated (Phase 2 Visual Styling)
|
|
306
|
-
### ui_context.md synced (Screen Structure Summary refreshed to Phase 2)
|
|
307
|
-
|
|
308
|
-
**Aesthetic direction**: [preset value] — [reference products]
|
|
309
|
-
**Applied visual spec**:
|
|
310
|
-
- Primary color: [Primary token value]
|
|
311
|
-
- Font: [display font + body font]
|
|
312
|
-
- Radius: [sm/md/lg values]
|
|
313
|
-
- Motion: [preference value]
|
|
314
|
-
- Icons: [iconLibrary] / style: [style]
|
|
315
|
-
- Theme: [default + support list]
|
|
316
|
-
- Background treatment: [texture/gradient/solid description]
|
|
317
|
-
|
|
318
|
-
> Open `[[__DOCS_DIR__]]/global/ui_concept.html` in a browser to review visual output.
|
|
319
|
-
> `/archi.plan <ID>` will read `ui_context.md` to determine each task's UI scope.
|
|
320
|
-
```
|
|
283
|
+
### S-XX · [Screen name]
|
|
284
|
+
**Layout**: [e.g. "centered single-column max-w-400px" or "240px left sidebar + right content area"]
|
|
285
|
+
**States**: default ([core entry points]) | loading (skeleton) | empty / error (if applicable)
|
|
286
|
+
**Key regions**: [semantic blocks + interactive elements from data-el, e.g.: top nav bar, main form area, submit button, error message area]
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
> `ui_context.md` is the sole entry point for all AI commands reading UI structure; `ui_concept.html` is for human browser preview only.
|
|
290
|
+
|
|
291
|
+
### Step 7 — Verification Checklist
|
|
292
|
+
|
|
293
|
+
- [ ] All screen colors from semanticTokens or aesthetic direction baseline — no arbitrary hardcoded Hex
|
|
294
|
+
- [ ] All motion durations from `motion.duration.*` — no magic numbers
|
|
295
|
+
- [ ] Page/state control bar remains wireframe-style grayscale (no coloring — debug tool identity)
|
|
296
|
+
- [ ] `data-el` labels fully preserved
|
|
297
|
+
- [ ] Every state (default/loading/empty/error) of every screen visually implemented
|
|
298
|
+
- [ ] **Icon check**: icon library set → CDN used; no icon library → self-drawn SVG used; **zero emoji**
|
|
299
|
+
- [ ] **Anti-AI aesthetic check**: no blacklisted fonts, no purple-gradient-on-white, layout variety, radius hierarchy
|
|
300
|
+
- [ ] **Identity check**: opening the HTML, one can instantly tell which aesthetic direction this follows — not a generic template
|
|
301
|
+
- [ ] **UI quality check**: no pure black text, layered backgrounds, soft card shadows, primary color ≤10%, interaction states complete, realistic content fill
|
|
302
|
+
|
|
303
|
+
### Step 8 — Output Gate
|
|
304
|
+
|
|
305
|
+
Output coverage summary:
|
|
306
|
+
|
|
307
|
+
```
|
|
308
|
+
### ui_concept.html generated
|
|
309
|
+
### ui_context.md generated (AI screen index)
|
|
310
|
+
|
|
311
|
+
**Aesthetic direction**: [preset value] — [reference products]
|
|
312
|
+
**Screen coverage** (N screens total):
|
|
313
|
+
| Screen | Name | States |
|
|
314
|
+
|:---|:---|:---|
|
|
315
|
+
| S-01 | [name] | N |
|
|
316
|
+
| ... | | |
|
|
317
|
+
|
|
318
|
+
**Applied visual spec**:
|
|
319
|
+
- Primary color: [Primary token value]
|
|
320
|
+
- Font: [display font + body font]
|
|
321
|
+
- Radius: [sm/md/lg values]
|
|
322
|
+
- Motion: [preference value]
|
|
323
|
+
- Theme: [default + support list]
|
|
324
|
+
|
|
325
|
+
**Navigation structure**: [e.g. "Left sidebar + top breadcrumb"]
|
|
326
|
+
**Platform**: [Web Desktop 1280px / Mobile 390px / ...]
|
|
327
|
+
|
|
328
|
+
> Open `[[__DOCS_DIR__]]/global/ui_concept.html` in a browser to review layout and visual output.
|
|
329
|
+
> Reply **OK** to confirm; or describe screen/layout/visual adjustments needed.
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
**Gate**: Complete after user replies **OK**; otherwise enter Refinement.
|
|
321
333
|
|
|
322
334
|
---
|
|
323
335
|
|
|
324
|
-
###
|
|
336
|
+
### Refinement — Iterative Polish (optional)
|
|
325
337
|
|
|
326
|
-
**Trigger**:
|
|
338
|
+
**Trigger**: User reply is not OK — contains layout adjustments, screen additions/removals, navigation changes, visual modifications.
|
|
339
|
+
**Action**: Incorporate feedback, update only the affected parts of `ui_concept.html` (no full rewrite), sync `ui_context.md` (keep screen index consistent with `ui_concept.html`), re-display summary, await confirmation.
|
|
327
340
|
|
|
328
|
-
|
|
341
|
+
---
|
|
342
|
+
|
|
343
|
+
### Incremental Update
|
|
344
|
+
|
|
345
|
+
**Trigger**: A screen is updated by Plan Refinement / Edit / Revise and new content needs to match the current visual spec.
|
|
329
346
|
|
|
330
347
|
**Action**:
|
|
331
348
|
|
|
332
|
-
1. Receive the list of screen IDs to
|
|
349
|
+
1. Receive the list of screen IDs to update from the caller (e.g., `S-03`, `S-07`).
|
|
333
350
|
2. Process only the specified screens:
|
|
334
|
-
-
|
|
335
|
-
-
|
|
351
|
+
- Preserve existing content within `.wf-screen#S-XX`
|
|
352
|
+
- Generate new additions per current visual spec (`semanticTokens` / `motion` / `illustration`)
|
|
336
353
|
- Leave all other screen content untouched
|
|
337
|
-
3.
|
|
354
|
+
3. If new states added → sync `ui_context.md` to update the states column for the affected screen(s).
|
|
338
355
|
4. Output change summary:
|
|
339
|
-
- `MODIFIED: ui_concept.html S-XX (incremental
|
|
356
|
+
- `MODIFIED: ui_concept.html S-XX (incremental update, [N] new states/regions)`
|
|
340
357
|
- `MODIFIED: ui_context.md S-XX (updated states list)` (only if new states were added)
|
|
341
358
|
|
|
342
|
-
> **Forbidden**: Never
|
|
359
|
+
> **Forbidden**: Never do a full rewrite for incremental updates. Never touch screens not in the specified list.
|
|
360
|
+
|
|
361
|
+
---
|
|
362
|
+
|
|
363
|
+
### Adopt — Reverse Adoption (Legacy UI Capture)
|
|
364
|
+
|
|
365
|
+
**Trigger**: After `/archi.inherit` completes, invoked for UI projects.
|
|
366
|
+
**Input**: Existing code (route definitions, page components, layout files) + design_tokens.json (may be incomplete)
|
|
367
|
+
|
|
368
|
+
**Action**:
|
|
369
|
+
|
|
370
|
+
1. **Scan UI structure**:
|
|
371
|
+
- Extract page list from route definitions (React Router / Vue Router / Next.js pages / SvelteKit routes etc.)
|
|
372
|
+
- Identify navigation structure from layout components (sidebar / navbar / tabbar)
|
|
373
|
+
- Identify core regions and states from page components
|
|
374
|
+
|
|
375
|
+
2. **Plan screen inventory**: Same as standard flow Step 2 (assign S-XX IDs, map to LEG-xx tasks)
|
|
376
|
+
|
|
377
|
+
3. **Tokens check + guidance**: Same as standard flow Step 4
|
|
378
|
+
- Prioritize extracting CSS variables / Tailwind config / theme files from existing code
|
|
379
|
+
- Run guidance question flow for insufficient fields
|
|
380
|
+
|
|
381
|
+
4. **Generate HTML**: Same as standard flow Step 5 (hi-fi quality standards)
|
|
382
|
+
- Use existing code UI structure as layout reference (restore, not invent from scratch)
|
|
383
|
+
- Details and states may be supplemented (e.g. original code lacks empty/error states)
|
|
384
|
+
|
|
385
|
+
5. **Generate ui_context.md**: Same as standard flow Step 6
|
|
386
|
+
|
|
387
|
+
6. **Output**: Same as standard flow Step 8
|