architext 0.0.4 → 0.0.6
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 +55 -1
- package/README.md +93 -14
- package/README.zh-CN.md +92 -14
- package/dist/index.js +53 -39
- package/dist/templates/en/briefs/_base.md +53 -13
- package/dist/templates/en/briefs/_modules.md +31 -4
- package/dist/templates/en/docs/global/error_memory.json +40 -0
- package/dist/templates/en/docs/global/map.json +46 -90
- package/dist/templates/en/{rules/04_cli_tools.md → docs/global/references/cli_reference.md} +6 -13
- package/dist/templates/en/{rules/02_tech_stack.md → docs/global/tech_stack.md} +7 -18
- package/dist/templates/en/docs/global/vision.md +1 -1
- package/dist/templates/en/docs/prompts/audit.md +80 -94
- package/dist/templates/en/docs/prompts/code.md +99 -89
- package/dist/templates/en/docs/prompts/edit.md +61 -51
- package/dist/templates/en/docs/prompts/fix.md +59 -43
- package/dist/templates/en/docs/prompts/help.md +23 -31
- package/dist/templates/en/docs/prompts/inherit.md +97 -117
- package/dist/templates/en/docs/prompts/map.md +48 -69
- package/dist/templates/en/docs/prompts/plan.md +141 -240
- package/dist/templates/en/docs/prompts/recover.md +19 -34
- package/dist/templates/en/docs/prompts/ref.md +43 -138
- package/dist/templates/en/docs/prompts/remove.md +63 -110
- package/dist/templates/en/docs/prompts/revise.md +71 -106
- package/dist/templates/en/docs/prompts/scope.md +78 -117
- package/dist/templates/en/docs/prompts/script.md +102 -0
- package/dist/templates/en/docs/prompts/start.md +98 -132
- package/dist/templates/en/docs/prompts/ui.md +113 -0
- package/dist/templates/en/docs/shared/ui-redlines.md +7 -0
- package/dist/templates/en/docs/templates/spec.template.md +1 -1
- package/dist/templates/en/docs/templates/ui.template.md +8 -8
- package/dist/templates/en/rules/00_system.md +268 -117
- package/dist/templates/en/rules/90_custom_rules.md +3 -1
- package/dist/templates/en/skills/archi-data-sync/SKILL.md +37 -23
- package/dist/templates/en/skills/archi-decompose-roadmap/SKILL.md +138 -240
- package/dist/templates/en/skills/archi-design-patterns/SKILL.md +6 -1
- package/dist/templates/en/skills/archi-feature-relations/SKILL.md +10 -6
- package/dist/templates/en/skills/archi-interview-protocol/SKILL.md +2 -2
- package/dist/templates/en/skills/archi-plan-options/SKILL.md +77 -301
- package/dist/templates/en/skills/archi-silent-audit/SKILL.md +24 -25
- package/dist/templates/en/skills/archi-ui-wireframe/SKILL.md +175 -305
- package/dist/templates/icon.svg +16 -0
- package/dist/templates/zh/briefs/_base.md +56 -17
- package/dist/templates/zh/briefs/_modules.md +28 -1
- package/dist/templates/zh/docs/global/error_memory.json +40 -0
- package/dist/templates/zh/docs/global/map.json +39 -109
- package/dist/templates/zh/{rules/04_cli_tools.md → docs/global/references/cli_reference.md} +0 -7
- package/dist/templates/zh/{rules/02_tech_stack.md → docs/global/tech_stack.md} +9 -20
- 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 +66 -56
- package/dist/templates/zh/docs/prompts/edit.md +52 -42
- package/dist/templates/zh/docs/prompts/fix.md +39 -29
- package/dist/templates/zh/docs/prompts/help.md +13 -21
- package/dist/templates/zh/docs/prompts/inherit.md +67 -86
- package/dist/templates/zh/docs/prompts/map.md +28 -50
- package/dist/templates/zh/docs/prompts/plan.md +100 -199
- package/dist/templates/zh/docs/prompts/recover.md +9 -24
- package/dist/templates/zh/docs/prompts/ref.md +11 -106
- package/dist/templates/zh/docs/prompts/remove.md +39 -74
- package/dist/templates/zh/docs/prompts/revise.md +47 -88
- package/dist/templates/zh/docs/prompts/scope.md +52 -91
- package/dist/templates/zh/docs/prompts/script.md +102 -0
- package/dist/templates/zh/docs/prompts/start.md +75 -110
- package/dist/templates/zh/docs/prompts/ui.md +113 -0
- package/dist/templates/zh/docs/shared/ui-redlines.md +7 -0
- package/dist/templates/zh/docs/templates/spec.template.md +1 -1
- package/dist/templates/zh/docs/templates/ui.template.md +8 -8
- package/dist/templates/zh/rules/00_system.md +252 -131
- package/dist/templates/zh/rules/90_custom_rules.md +2 -1
- package/dist/templates/zh/skills/archi-data-sync/SKILL.md +27 -13
- package/dist/templates/zh/skills/archi-decompose-roadmap/SKILL.md +133 -235
- package/dist/templates/zh/skills/archi-design-patterns/SKILL.md +6 -1
- package/dist/templates/zh/skills/archi-feature-relations/SKILL.md +6 -2
- package/dist/templates/zh/skills/archi-interview-protocol/SKILL.md +2 -2
- package/dist/templates/zh/skills/archi-plan-options/SKILL.md +77 -301
- package/dist/templates/zh/skills/archi-silent-audit/SKILL.md +4 -5
- package/dist/templates/zh/skills/archi-ui-wireframe/SKILL.md +174 -301
- package/package.json +3 -1
- package/dist/templates/en/rules/01_workflow.md +0 -93
- package/dist/templates/en/rules/03_data_governance.md +0 -102
- package/dist/templates/en/rules/99_context_glue.md +0 -53
- package/dist/templates/zh/rules/01_workflow.md +0 -94
- package/dist/templates/zh/rules/03_data_governance.md +0 -133
- package/dist/templates/zh/rules/99_context_glue.md +0 -53
|
@@ -1,342 +1,212 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: archi-ui-wireframe
|
|
3
|
-
description: UI concept
|
|
3
|
+
description: Generate UI concept designs and wireframes as multi-file screens/ directory. Do not auto-trigger.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# UI Concept Design
|
|
7
7
|
|
|
8
|
-
## System Flow
|
|
8
|
+
## System Flow Position
|
|
9
9
|
|
|
10
10
|
```
|
|
11
|
-
/archi.
|
|
12
|
-
|
|
13
|
-
[This Skill] archi-ui-wireframe
|
|
14
|
-
reads: vision.md + roadmap.json + design_tokens.json + 02_tech_stack.md
|
|
15
|
-
writes: [[__DOCS_DIR__]]/global/ui_concept.html
|
|
16
|
-
↓
|
|
17
|
-
/archi.plan <ID>
|
|
18
|
-
reads: ui_concept.html (locates screens/components this task covers)
|
|
19
|
-
writes: ui.md (scope declaration only — no global layout duplication)
|
|
20
|
-
↓
|
|
21
|
-
/archi.code → reads spec.md + ui.md + ui_concept.html → writes code
|
|
11
|
+
/archi.ui → [This Skill] → screens/ (multi-file directory) → /archi.plan → ui.md (task scope)
|
|
12
|
+
/archi.ui (adopt mode) → [This Skill] → screens/ (reverse from code)
|
|
22
13
|
```
|
|
23
14
|
|
|
24
|
-
> **
|
|
25
|
-
> - Responsible for: visual concept of all user-visible screens (information architecture, layout, states, transitions)
|
|
26
|
-
> - Not responsible for: Task-level interface contracts (spec.md), task steps (plan.json), business code
|
|
15
|
+
> **Outputs**: `screens/` directory (`index.html` navigation hub + `S-XX.html` independent screens + `_shared.css` shared styles) + `ui_context.md` (AI index)
|
|
27
16
|
|
|
28
17
|
---
|
|
29
18
|
|
|
30
19
|
## Invocation Modes
|
|
31
20
|
|
|
32
|
-
| Mode | Trigger
|
|
21
|
+
| Mode | Trigger | Scope |
|
|
33
22
|
|:---|:---|:---|
|
|
34
|
-
| Initial
|
|
35
|
-
|
|
|
36
|
-
|
|
|
37
|
-
|
|
|
38
|
-
|
|
|
39
|
-
| Remove screens | After `/archi.remove` retires a task | Remove corresponding screens and control bar entries |
|
|
40
|
-
|
|
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.
|
|
23
|
+
| Initial | `/archi.ui` | Full — all screens |
|
|
24
|
+
| Adopt | `/archi.ui` (auto-detected when code exists) | Reverse from code routes/components |
|
|
25
|
+
| Regenerate | Manual | Full rewrite (global redesign) |
|
|
26
|
+
| Append/Modify | `/archi.scope/edit` or `/archi.ui` (incremental mode) | Specified screens only |
|
|
27
|
+
| Update | `/archi.plan` divergence | Affected screens only |
|
|
42
28
|
|
|
43
29
|
---
|
|
44
30
|
|
|
45
|
-
##
|
|
46
|
-
|
|
47
|
-
### Phase 1 — Wireframe (Low-fi)
|
|
48
|
-
|
|
49
|
-
**Role**: Information Architect
|
|
50
|
-
|
|
51
|
-
**Goal**: Validate screen coverage completeness and navigation structure; visual details deferred to Phase 2.
|
|
52
|
-
|
|
53
|
-
**Action**:
|
|
54
|
-
|
|
55
|
-
1. **Load context**:
|
|
56
|
-
- `[[__DOCS_DIR__]]/global/vision.md` → extract: target platform, user roles, north-star metric
|
|
57
|
-
- `[[__DOCS_DIR__]]/global/roadmap.json` → extract: all [?UI] tasks, map to screen/state list
|
|
58
|
-
- `[[__DOCS_DIR__]]/global/design_tokens.json` → extract: `mode.default`, `illustration.iconLibrary`
|
|
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.
|
|
31
|
+
## Generation Protocol
|
|
202
32
|
|
|
203
|
-
|
|
33
|
+
### Step 1 — Load Context
|
|
204
34
|
|
|
205
|
-
|
|
35
|
+
**Load**: vision.md (platform/users/north-star), roadmap.json (UI tasks → screen mapping),
|
|
36
|
+
design_tokens.json (aesthetic/brand), tech_stack.md (platform/nav framework).
|
|
206
37
|
|
|
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.
|
|
38
|
+
### Step 2 — Plan Screen Inventory
|
|
210
39
|
|
|
211
|
-
|
|
40
|
+
Assign screen IDs (S-01, S-02...), map to Roadmap tasks. IDs are permanent.
|
|
41
|
+
|
|
42
|
+
| Screen ID | Name | Task | States |
|
|
43
|
+
|:---|:---|:---|:---|
|
|
44
|
+
| S-01 | [name] | [task ID] | default, loading, empty, error |
|
|
45
|
+
|
|
46
|
+
### Step 3 — Tokens Check + Guidance
|
|
47
|
+
|
|
48
|
+
check `design_tokens.json`:
|
|
49
|
+
- `aestheticDirection.preset` empty → guide selection (saas-dark/saas-light/dashboard/marketing/mobile-app/editorial/brutalist)
|
|
50
|
+
- `primitivePalette.brand` empty → guide for Hex
|
|
51
|
+
- Other empty → AI infers, non-blocking
|
|
52
|
+
|
|
53
|
+
### Step 4 — Generate Multi-file HTML
|
|
54
|
+
|
|
55
|
+
**Output directory**: `[[__DOCS_DIR__]]/global/screens/`
|
|
56
|
+
|
|
57
|
+
#### 4.1 `_shared.css` — Shared Styles
|
|
58
|
+
|
|
59
|
+
Extract CSS variables from `design_tokens.json` + base layout + bottom control panel styles. All `S-XX.html` reference via `<link href="_shared.css">`.
|
|
212
60
|
|
|
213
|
-
|
|
61
|
+
**Bottom Control Panel**: fixed bottom, floating toggle button (60×16px, centered top), ▲/▼ symbols. 3-column: ← index jump | page info | state buttons. Collapsed hides content, button stays visible.
|
|
214
62
|
|
|
215
|
-
|
|
63
|
+
#### 4.2 `S-XX.html` — Independent Screen Files
|
|
216
64
|
|
|
217
|
-
|
|
65
|
+
One self-contained HTML file per screen, structure:
|
|
218
66
|
|
|
219
|
-
|
|
67
|
+
```html
|
|
68
|
+
<body>
|
|
69
|
+
<header class="wf-topbar">...</header>
|
|
70
|
+
<main class="wf-content">...state divs...</main>
|
|
220
71
|
|
|
221
|
-
|
|
72
|
+
<!-- Bottom Control Panel -->
|
|
73
|
+
<aside class="wf-panel" id="wfPanel">
|
|
74
|
+
<button class="wf-panel-toggle" id="toggleBtn" onclick="togglePanel()">▼</button>
|
|
75
|
+
<div class="wf-panel-content">
|
|
76
|
+
<span>Jump</span> <a href="index.html">← Index</a>
|
|
77
|
+
<span>Page</span> <span>[description]</span>
|
|
78
|
+
<span>State</span> <div class="wf-states">...</div>
|
|
79
|
+
</div>
|
|
80
|
+
</aside>
|
|
81
|
+
|
|
82
|
+
<script>
|
|
83
|
+
function togglePanel() {
|
|
84
|
+
var panel = document.getElementById('wfPanel');
|
|
85
|
+
var btn = document.getElementById('toggleBtn');
|
|
86
|
+
panel.classList.toggle('collapsed');
|
|
87
|
+
btn.textContent = panel.classList.contains('collapsed') ? '▲' : '▼';
|
|
88
|
+
}
|
|
89
|
+
</script>
|
|
90
|
+
</body>
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
#### 4.3 `index.html` — Navigation Hub
|
|
94
|
+
|
|
95
|
+
List all screens, each linking to corresponding `S-XX.html`:
|
|
96
|
+
|
|
97
|
+
```html
|
|
98
|
+
<!DOCTYPE html>
|
|
99
|
+
<html lang="en">
|
|
100
|
+
<head>
|
|
101
|
+
<meta charset="UTF-8">
|
|
102
|
+
<title>[Project Name] — UI Concept Design</title>
|
|
103
|
+
<link rel="stylesheet" href="_shared.css">
|
|
104
|
+
</head>
|
|
105
|
+
<body>
|
|
106
|
+
<header class="wf-topbar">
|
|
107
|
+
<span>[Project Name] — UI Concept Design Index</span>
|
|
108
|
+
</header>
|
|
109
|
+
<main class="wf-index">
|
|
110
|
+
<div class="wf-screen-card">
|
|
111
|
+
<a href="S-01.html">S-01 · [Screen Name]</a>
|
|
112
|
+
<p>[One-line description]</p>
|
|
113
|
+
</div>
|
|
114
|
+
<!-- More screen cards -->
|
|
115
|
+
</main>
|
|
116
|
+
</body>
|
|
117
|
+
</html>
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
**Interactive Display Principles** (visual feedback, NOT real business logic):
|
|
121
|
+
- Buttons/links/inputs drawn with click events
|
|
122
|
+
- Click triggers **visual feedback** (modal show/hide, panel expand, state switch), NOT **real business logic**
|
|
123
|
+
- **Cross-screen navigation**: Sidebar, tabs, breadcrumbs, card clicks → link to corresponding `S-XX.html`
|
|
124
|
+
- **Modal forms**: Focusable, clickable, but submission doesn't process data
|
|
125
|
+
- **Goal**: complete display of interaction flow and interface in various states
|
|
126
|
+
|
|
127
|
+
**Built-in Validation & Self-Repair Loop** (AI self-checks and fixes until all pass):
|
|
128
|
+
|
|
129
|
+
| Check | Pass Criteria | Repair Action |
|
|
222
130
|
|:---|:---|:---|
|
|
223
|
-
|
|
|
224
|
-
|
|
|
225
|
-
|
|
|
226
|
-
| `
|
|
227
|
-
|
|
|
228
|
-
|
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
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
|
-
|
|
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
|
-
```
|
|
131
|
+
| **Clickability** | All elements with `onclick` must have `cursor: pointer` | Add CSS `cursor: pointer` |
|
|
132
|
+
| **data-el completeness** | All interactive elements must have `data-el` | Add `data-el` description |
|
|
133
|
+
| **State coverage** | Each screen must include default/loading/empty (as applicable) | Add missing state divs |
|
|
134
|
+
| **Cross-file link validity** | `index.html` links point to existing `S-XX.html`; each `S-XX.html` contains back-to-index link | Fix link paths |
|
|
135
|
+
| **Anti-pattern red lines** | No purple gradient, no emoji, not pure black/white | Replace with aesthetic-compliant colors |
|
|
136
|
+
| **Spacing consistency** | Use CSS variables, no hardcoded magic numbers | Replace with `var(--space-*)` |
|
|
137
|
+
|
|
138
|
+
**Repair Loop** (internal execution):
|
|
139
|
+
```
|
|
140
|
+
Generate HTML → Run checks → Any failures?
|
|
141
|
+
├── Yes → Repair → Regenerate → Check again
|
|
142
|
+
└── No → Passed
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
**Check Method**: Scan HTML file elements, verify against checklist, output to comment (`<!-- Check: 6/6 passed -->`), repair if failed.
|
|
146
|
+
|
|
147
|
+
[[INCLUDE: shared/ui-redlines.md]]
|
|
148
|
+
|
|
149
|
+
**Content Fill**:
|
|
150
|
+
- Real business names from roadmap, never "Title" placeholders
|
|
151
|
+
- Buttons with specific actions, never "[Button]"
|
|
152
|
+
- Lists/tables with 3-4 rows realistic fake data
|
|
153
|
+
- Empty states with specific copy, never "No data"
|
|
154
|
+
|
|
155
|
+
**Self-drawn SVG** (no icon library): stroke="currentColor", stroke-width 1.5-2, fill="currentColor", width="1em" height="1em"
|
|
156
|
+
|
|
157
|
+
### Step 5 — Generate AI Index
|
|
158
|
+
|
|
159
|
+
**Output**: `[[__DOCS_DIR__]]/global/ui_context.md`
|
|
160
|
+
|
|
161
|
+
```markdown
|
|
162
|
+
# UI Context
|
|
163
|
+
> Platform: [type] | Generated: YYYY-MM-DD
|
|
164
|
+
|
|
165
|
+
## Screen Inventory
|
|
166
|
+
| ID | Name | Route | File | States |
|
|
167
|
+
|:---|:---|:---|:---|:---|
|
|
168
|
+
| S-01 | [name] | [route] | screens/S-01.html | default, loading, empty, error |
|
|
169
|
+
|
|
170
|
+
## Navigation Graph
|
|
171
|
+
S-XX →(trigger)→ S-YY
|
|
172
|
+
|
|
173
|
+
## Screen Structure Summary
|
|
174
|
+
### S-XX · [Screen name]
|
|
175
|
+
**Layout**: [e.g. "240px left sidebar + right content"]
|
|
176
|
+
**File**: screens/S-XX.html
|
|
177
|
+
**States**: default (core actions) | loading (skeleton) | empty | error
|
|
178
|
+
**Key regions**: [from data-el: top nav, main form, submit button, error area]
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### Step 6 — Output Gate
|
|
182
|
+
|
|
183
|
+
Output summary: aesthetic direction + reference products, screen coverage list (N screens), visual spec, navigation structure.
|
|
184
|
+
|
|
185
|
+
**User confirmation**: Reply **OK** to complete; otherwise enter Refinement.
|
|
186
|
+
|
|
187
|
+
## Output Verification
|
|
188
|
+
|
|
189
|
+
□ `global/screens/index.html` generated with all screen links listed
|
|
190
|
+
□ `global/screens/_shared.css` generated with design_tokens CSS variables
|
|
191
|
+
□ `global/screens/S-XX.html` independent file generated for each screen
|
|
192
|
+
□ `global/ui_context.md` generated with screen inventory containing `screens/S-XX.html` paths
|
|
321
193
|
|
|
322
194
|
---
|
|
323
195
|
|
|
324
|
-
|
|
196
|
+
## Refinement (User Feedback)
|
|
325
197
|
|
|
326
|
-
|
|
198
|
+
User reply contains layout/visual adjustments → partial update corresponding `screens/S-XX.html` + sync `ui_context.md` → re-display summary, await confirmation.
|
|
327
199
|
|
|
328
|
-
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
## Incremental Update
|
|
203
|
+
|
|
204
|
+
Input screen ID list → process specified screens only: preserve existing files, generate new/updated `S-XX.html` per current visual spec; if new states → sync update `ui_context.md`. Update `index.html` navigation list.
|
|
329
205
|
|
|
330
|
-
|
|
206
|
+
Output: `MODIFIED: screens/S-XX.html` (annotated per file)
|
|
207
|
+
|
|
208
|
+
---
|
|
331
209
|
|
|
332
|
-
|
|
333
|
-
2. Process only the specified screens:
|
|
334
|
-
- Locate new wireframe-style additions within `.wf-screen#S-XX`
|
|
335
|
-
- Apply Phase 2 styling rules (`semanticTokens` / `motion` / `illustration`) to the new additions only
|
|
336
|
-
- Leave all other screen content untouched
|
|
337
|
-
3. [?new states] If new states are added in this re-color → sync `ui_context.md` to update the states column for the affected screen(s).
|
|
338
|
-
4. Output change summary:
|
|
339
|
-
- `MODIFIED: ui_concept.html S-XX (incremental re-color, [N] new states/regions)`
|
|
340
|
-
- `MODIFIED: ui_context.md S-XX (updated states list)` (only if new states were added)
|
|
210
|
+
## Adopt (Reverse from Code)
|
|
341
211
|
|
|
342
|
-
|
|
212
|
+
Input existing code + design_tokens.json → extract: routes → screen inventory, layout components → navigation structure, page components → core regions and states → generate `screens/` directory + ui_context.md per standard flow.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="none">
|
|
2
|
+
<!-- Background -->
|
|
3
|
+
<rect width="32" height="32" rx="7" fill="#141210"/>
|
|
4
|
+
|
|
5
|
+
<!-- Corner registration marks (architectural reference) -->
|
|
6
|
+
<circle cx="5" cy="5" r="1.2" fill="#b88a3f" opacity="0.5"/>
|
|
7
|
+
<circle cx="27" cy="5" r="1.2" fill="#b88a3f" opacity="0.5"/>
|
|
8
|
+
<circle cx="5" cy="27" r="1.2" fill="#b88a3f" opacity="0.5"/>
|
|
9
|
+
<circle cx="27" cy="27" r="1.2" fill="#b88a3f" opacity="0.5"/>
|
|
10
|
+
|
|
11
|
+
<!-- Geometric "A" letterform -->
|
|
12
|
+
<path d="M 8 25 L 16 7 L 24 25" stroke="#b88a3f" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
13
|
+
|
|
14
|
+
<!-- Crossbar -->
|
|
15
|
+
<line x1="11.5" y1="19" x2="20.5" y2="19" stroke="#b88a3f" stroke-width="2" stroke-linecap="round"/>
|
|
16
|
+
</svg>
|