architext 0.0.5 → 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 +29 -1
- package/README.md +18 -16
- package/README.zh-CN.md +15 -14
- package/dist/index.js +43 -29
- package/dist/templates/en/briefs/_base.md +13 -6
- package/dist/templates/en/briefs/_modules.md +2 -2
- 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 +5 -5
- package/dist/templates/en/docs/prompts/code.md +23 -11
- package/dist/templates/en/docs/prompts/edit.md +21 -7
- package/dist/templates/en/docs/prompts/fix.md +11 -2
- package/dist/templates/en/docs/prompts/inherit.md +18 -13
- package/dist/templates/en/docs/prompts/map.md +4 -3
- package/dist/templates/en/docs/prompts/plan.md +11 -5
- package/dist/templates/en/docs/prompts/remove.md +13 -8
- package/dist/templates/en/docs/prompts/revise.md +10 -2
- package/dist/templates/en/docs/prompts/scope.md +4 -3
- package/dist/templates/en/docs/prompts/script.md +102 -0
- package/dist/templates/en/docs/prompts/start.md +20 -14
- 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 +245 -51
- package/dist/templates/en/rules/90_custom_rules.md +3 -1
- package/dist/templates/en/skills/archi-data-sync/SKILL.md +26 -12
- package/dist/templates/en/skills/archi-decompose-roadmap/SKILL.md +137 -208
- package/dist/templates/en/skills/archi-design-patterns/SKILL.md +6 -2
- package/dist/templates/en/skills/archi-feature-relations/SKILL.md +6 -2
- package/dist/templates/en/skills/archi-interview-protocol/SKILL.md +1 -2
- package/dist/templates/en/skills/archi-plan-options/SKILL.md +77 -302
- package/dist/templates/en/skills/archi-silent-audit/SKILL.md +4 -5
- package/dist/templates/en/skills/archi-ui-wireframe/SKILL.md +131 -306
- package/dist/templates/icon.svg +16 -0
- package/dist/templates/zh/briefs/_base.md +17 -10
- package/dist/templates/zh/briefs/_modules.md +2 -2
- 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 +5 -5
- package/dist/templates/zh/docs/prompts/code.md +22 -10
- package/dist/templates/zh/docs/prompts/edit.md +20 -6
- package/dist/templates/zh/docs/prompts/fix.md +10 -1
- package/dist/templates/zh/docs/prompts/inherit.md +18 -13
- package/dist/templates/zh/docs/prompts/map.md +5 -4
- package/dist/templates/zh/docs/prompts/plan.md +11 -5
- package/dist/templates/zh/docs/prompts/remove.md +13 -8
- package/dist/templates/zh/docs/prompts/revise.md +12 -4
- package/dist/templates/zh/docs/prompts/scope.md +4 -3
- package/dist/templates/zh/docs/prompts/script.md +102 -0
- package/dist/templates/zh/docs/prompts/start.md +19 -15
- 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 +243 -49
- 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 -204
- package/dist/templates/zh/skills/archi-design-patterns/SKILL.md +6 -2
- package/dist/templates/zh/skills/archi-feature-relations/SKILL.md +6 -2
- package/dist/templates/zh/skills/archi-interview-protocol/SKILL.md +1 -2
- package/dist/templates/zh/skills/archi-plan-options/SKILL.md +77 -302
- package/dist/templates/zh/skills/archi-silent-audit/SKILL.md +4 -5
- package/dist/templates/zh/skills/archi-ui-wireframe/SKILL.md +131 -306
- package/package.json +3 -1
- package/dist/templates/en/rules/01_workflow.md +0 -95
- package/dist/templates/en/rules/03_data_governance.md +0 -106
- package/dist/templates/en/rules/99_context_glue.md +0 -53
- package/dist/templates/zh/rules/01_workflow.md +0 -95
- package/dist/templates/zh/rules/03_data_governance.md +0 -106
- package/dist/templates/zh/rules/99_context_glue.md +0 -53
|
@@ -1,50 +1,30 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: archi-ui-wireframe
|
|
3
|
-
|
|
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.
|
|
3
|
+
description: Generate UI concept designs and wireframes as multi-file screens/ directory. Do not auto-trigger.
|
|
5
4
|
---
|
|
6
5
|
|
|
7
6
|
# UI Concept Design
|
|
8
7
|
|
|
9
|
-
## System Flow
|
|
8
|
+
## System Flow Position
|
|
10
9
|
|
|
11
10
|
```
|
|
12
|
-
/archi.
|
|
13
|
-
|
|
14
|
-
[This Skill] archi-ui-wireframe
|
|
15
|
-
reads: vision.md + roadmap.json + design_tokens.json + 02_tech_stack.md
|
|
16
|
-
writes: [[__DOCS_DIR__]]/global/ui_concept.html
|
|
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
|
-
↓
|
|
24
|
-
/archi.plan <ID>
|
|
25
|
-
reads: ui_concept.html (locates screens/components this task covers)
|
|
26
|
-
writes: ui.md (scope declaration only — no global layout duplication)
|
|
27
|
-
↓
|
|
28
|
-
/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)
|
|
29
13
|
```
|
|
30
14
|
|
|
31
|
-
> **
|
|
32
|
-
> - Responsible for: visual concept of all user-visible screens (information architecture, layout, states, transitions)
|
|
33
|
-
> - 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)
|
|
34
16
|
|
|
35
17
|
---
|
|
36
18
|
|
|
37
19
|
## Invocation Modes
|
|
38
20
|
|
|
39
|
-
| Mode | Trigger
|
|
21
|
+
| Mode | Trigger | Scope |
|
|
40
22
|
|:---|:---|:---|
|
|
41
|
-
| Initial
|
|
42
|
-
|
|
|
43
|
-
|
|
|
44
|
-
| Append
|
|
45
|
-
|
|
|
46
|
-
| Modify screens | After `/archi.edit` changes a task | Update only affected screens; leave others intact |
|
|
47
|
-
| Remove screens | After `/archi.remove` retires a task | Remove corresponding screens and control bar entries |
|
|
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 |
|
|
48
28
|
|
|
49
29
|
---
|
|
50
30
|
|
|
@@ -52,336 +32,181 @@ description: UI concept design expert. Generates hi-fi ui_concept.html — when
|
|
|
52
32
|
|
|
53
33
|
### Step 1 — Load Context
|
|
54
34
|
|
|
55
|
-
**
|
|
56
|
-
|
|
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
|
|
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).
|
|
60
37
|
|
|
61
38
|
### Step 2 — Plan Screen Inventory
|
|
62
39
|
|
|
63
|
-
(
|
|
40
|
+
Assign screen IDs (S-01, S-02...), map to Roadmap tasks. IDs are permanent.
|
|
64
41
|
|
|
65
|
-
| Screen ID |
|
|
42
|
+
| Screen ID | Name | Task | States |
|
|
66
43
|
|:---|:---|:---|:---|
|
|
67
44
|
| S-01 | [name] | [task ID] | default, loading, empty, error |
|
|
68
|
-
| ... | | | |
|
|
69
45
|
|
|
70
|
-
|
|
46
|
+
### Step 3 — Tokens Check + Guidance
|
|
71
47
|
|
|
72
|
-
|
|
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
|
|
73
52
|
|
|
74
|
-
|
|
53
|
+
### Step 4 — Generate Multi-file HTML
|
|
75
54
|
|
|
76
|
-
|
|
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.
|
|
55
|
+
**Output directory**: `[[__DOCS_DIR__]]/global/screens/`
|
|
84
56
|
|
|
85
|
-
|
|
57
|
+
#### 4.1 `_shared.css` — Shared Styles
|
|
86
58
|
|
|
87
|
-
|
|
59
|
+
Extract CSS variables from `design_tokens.json` + base layout + bottom control panel styles. All `S-XX.html` reference via `<link href="_shared.css">`.
|
|
88
60
|
|
|
89
|
-
|
|
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 |
|
|
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.
|
|
97
62
|
|
|
98
|
-
|
|
63
|
+
#### 4.2 `S-XX.html` — Independent Screen Files
|
|
99
64
|
|
|
100
|
-
|
|
65
|
+
One self-contained HTML file per screen, structure:
|
|
101
66
|
|
|
67
|
+
```html
|
|
68
|
+
<body>
|
|
69
|
+
<header class="wf-topbar">...</header>
|
|
70
|
+
<main class="wf-content">...state divs...</main>
|
|
71
|
+
|
|
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>
|
|
102
91
|
```
|
|
103
|
-
### Visual Style Confirmation
|
|
104
92
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
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
|
-
```
|
|
93
|
+
#### 4.3 `index.html` — Navigation Hub
|
|
94
|
+
|
|
95
|
+
List all screens, each linking to corresponding `S-XX.html`:
|
|
125
96
|
|
|
126
|
-
|
|
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
|
+
```
|
|
127
119
|
|
|
128
|
-
|
|
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
|
|
129
126
|
|
|
130
|
-
|
|
127
|
+
**Built-in Validation & Self-Repair Loop** (AI self-checks and fixes until all pass):
|
|
131
128
|
|
|
132
|
-
|
|
129
|
+
| Check | Pass Criteria | Repair Action |
|
|
130
|
+
|:---|:---|:---|
|
|
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):
|
|
133
139
|
```
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
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>
|
|
140
|
+
Generate HTML → Run checks → Any failures?
|
|
141
|
+
├── Yes → Repair → Regenerate → Check again
|
|
142
|
+
└── No → Passed
|
|
162
143
|
```
|
|
163
144
|
|
|
164
|
-
**
|
|
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):
|
|
145
|
+
**Check Method**: Scan HTML file elements, verify against checklist, output to comment (`<!-- Check: 6/6 passed -->`), repair if failed.
|
|
244
146
|
|
|
245
|
-
|
|
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
|
-
```
|
|
147
|
+
[[INCLUDE: shared/ui-redlines.md]]
|
|
255
148
|
|
|
256
|
-
|
|
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"
|
|
257
154
|
|
|
258
|
-
|
|
155
|
+
**Self-drawn SVG** (no icon library): stroke="currentColor", stroke-width 1.5-2, fill="currentColor", width="1em" height="1em"
|
|
259
156
|
|
|
260
|
-
|
|
157
|
+
### Step 5 — Generate AI Index
|
|
158
|
+
|
|
159
|
+
**Output**: `[[__DOCS_DIR__]]/global/ui_context.md`
|
|
261
160
|
|
|
262
161
|
```markdown
|
|
263
162
|
# UI Context
|
|
264
|
-
> Platform: [
|
|
265
|
-
> Updated: YYYY-MM-DD | Do not edit manually
|
|
163
|
+
> Platform: [type] | Generated: YYYY-MM-DD
|
|
266
164
|
|
|
267
165
|
## Screen Inventory
|
|
268
|
-
| ID | Name | Route | States |
|
|
269
|
-
|
|
270
|
-
| S-01 | [name] | [route] | default, loading,
|
|
166
|
+
| ID | Name | Route | File | States |
|
|
167
|
+
|:---|:---|:---|:---|:---|
|
|
168
|
+
| S-01 | [name] | [route] | screens/S-01.html | default, loading, empty, error |
|
|
271
169
|
|
|
272
170
|
## Navigation Graph
|
|
273
|
-
S-XX →(
|
|
274
|
-
|
|
275
|
-
## Global Shared Components
|
|
276
|
-
| Component | Appears On |
|
|
277
|
-
|:---|:---|
|
|
278
|
-
| [component] | S-XX, S-YY |
|
|
171
|
+
S-XX →(trigger)→ S-YY
|
|
279
172
|
|
|
280
173
|
## 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.
|
|
282
|
-
|
|
283
174
|
### S-XX · [Screen name]
|
|
284
|
-
**Layout**: [e.g. "
|
|
285
|
-
**
|
|
286
|
-
**
|
|
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]
|
|
287
179
|
```
|
|
288
180
|
|
|
289
|
-
|
|
181
|
+
### Step 6 — Output Gate
|
|
290
182
|
|
|
291
|
-
|
|
183
|
+
Output summary: aesthetic direction + reference products, screen coverage list (N screens), visual spec, navigation structure.
|
|
292
184
|
|
|
293
|
-
|
|
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
|
|
185
|
+
**User confirmation**: Reply **OK** to complete; otherwise enter Refinement.
|
|
302
186
|
|
|
303
|
-
|
|
187
|
+
## Output Verification
|
|
304
188
|
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
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.
|
|
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
|
|
333
193
|
|
|
334
194
|
---
|
|
335
195
|
|
|
336
|
-
|
|
196
|
+
## Refinement (User Feedback)
|
|
337
197
|
|
|
338
|
-
|
|
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.
|
|
198
|
+
User reply contains layout/visual adjustments → partial update corresponding `screens/S-XX.html` + sync `ui_context.md` → re-display summary, await confirmation.
|
|
340
199
|
|
|
341
200
|
---
|
|
342
201
|
|
|
343
|
-
|
|
202
|
+
## Incremental Update
|
|
344
203
|
|
|
345
|
-
|
|
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.
|
|
346
205
|
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
1. Receive the list of screen IDs to update from the caller (e.g., `S-03`, `S-07`).
|
|
350
|
-
2. Process only the specified screens:
|
|
351
|
-
- Preserve existing content within `.wf-screen#S-XX`
|
|
352
|
-
- Generate new additions per current visual spec (`semanticTokens` / `motion` / `illustration`)
|
|
353
|
-
- Leave all other screen content untouched
|
|
354
|
-
3. If new states added → sync `ui_context.md` to update the states column for the affected screen(s).
|
|
355
|
-
4. Output change summary:
|
|
356
|
-
- `MODIFIED: ui_concept.html S-XX (incremental update, [N] new states/regions)`
|
|
357
|
-
- `MODIFIED: ui_context.md S-XX (updated states list)` (only if new states were added)
|
|
358
|
-
|
|
359
|
-
> **Forbidden**: Never do a full rewrite for incremental updates. Never touch screens not in the specified list.
|
|
206
|
+
Output: `MODIFIED: screens/S-XX.html` (annotated per file)
|
|
360
207
|
|
|
361
208
|
---
|
|
362
209
|
|
|
363
|
-
|
|
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
|
|
210
|
+
## Adopt (Reverse from Code)
|
|
386
211
|
|
|
387
|
-
|
|
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>
|
|
@@ -18,14 +18,14 @@
|
|
|
18
18
|
|
|
19
19
|
---
|
|
20
20
|
|
|
21
|
-
##
|
|
21
|
+
## 功能需求
|
|
22
22
|
|
|
23
|
-
>
|
|
24
|
-
>
|
|
23
|
+
> 必须实现的核心能力,描述"做什么"而非"怎么做"。
|
|
24
|
+
> AI 会据此分解为具体的实现任务,此处只需明确业务目标。
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
-
|
|
27
|
+
-
|
|
28
|
+
-
|
|
29
29
|
|
|
30
30
|
---
|
|
31
31
|
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
|
|
34
34
|
> 如果你的项目有明确的用户旅程或核心工作流,在此描述。
|
|
35
35
|
> 不需要画图——用文字描述步骤即可,AI 会据此理解系统行为。
|
|
36
|
-
> 没有的话留空,AI
|
|
36
|
+
> 没有的话留空,AI 会从核心功能中推导。
|
|
37
37
|
|
|
38
38
|
<!-- 写法参考:
|
|
39
39
|
### [流程名称]
|
|
@@ -46,11 +46,11 @@
|
|
|
46
46
|
|
|
47
47
|
## 已有设计决策
|
|
48
48
|
|
|
49
|
-
>
|
|
49
|
+
> 如果你对某些功能/页面/流程已有明确想法,在此描述。AI 在后续 plan 阶段会以此为准,不会推翻。
|
|
50
50
|
> 没有的话留空即可。
|
|
51
51
|
>
|
|
52
52
|
> 写法参考:
|
|
53
|
-
> - **[
|
|
53
|
+
> - **[功能/页面名]**: 描述具体行为、流程、约束
|
|
54
54
|
> - 可附截图/草图(见下方"设计资产")
|
|
55
55
|
|
|
56
56
|
---
|
|
@@ -84,6 +84,13 @@
|
|
|
84
84
|
**目录结构**: [已有明确结构 → 简述关键目录 / 无(AI 基于架构模式生成)]
|
|
85
85
|
**分支策略**: [例:Trunk-based / Git Flow / GitHub Flow]
|
|
86
86
|
**Commit 规范**: [例:Conventional Commits (feat/fix/chore) / 自定义 → 简述]
|
|
87
|
+
|
|
88
|
+
**AI Git 工作流** (AI 执行 `/archi.code` 时的提交约定):
|
|
89
|
+
- **自动提交**: [是 - 每个 Task 完成后自动 git commit / 否 - 仅生成 commit message,用户手动提交]
|
|
90
|
+
- **提交粒度**: [Per Task - 每个 Task 一个 commit / Per Phase - 每个 Phase 一个 commit / 按需]
|
|
91
|
+
- **分支策略**: [直接在 main 分支工作 / 每个 Task 新建分支 `feat/{task-id}`]
|
|
92
|
+
- **自动推送**: [是 / 否]
|
|
93
|
+
|
|
87
94
|
**测试偏好**: [例:Vitest / Jest / pytest / 无特殊要求]
|
|
88
95
|
|
|
89
96
|
---
|
|
@@ -138,7 +145,7 @@
|
|
|
138
145
|
|
|
139
146
|
| 参考项目 | 参考维度 |
|
|
140
147
|
|:---|:---|
|
|
141
|
-
| [例:Linear] | [
|
|
148
|
+
| [例:Linear] | [交互体验、功能管理逻辑] |
|
|
142
149
|
| | |
|
|
143
150
|
|
|
144
151
|
---
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
> 如果你已经知道核心数据实体和关系,在此描述。不需要写完整 Schema——列出实体名和关键字段即可。
|
|
12
12
|
> AI 会在 `/archi.plan` 阶段据此生成详细的数据模型,此处只需明确"有什么数据"。
|
|
13
|
-
> 没有的话留空,AI
|
|
13
|
+
> 没有的话留空,AI 会从核心功能中推导。
|
|
14
14
|
|
|
15
15
|
<!-- 写法参考:
|
|
16
16
|
- **用户 (User)**: email, name, role (admin/user), avatar
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
|
|
72
72
|
### 视觉参考 (Visual Reference)
|
|
73
73
|
|
|
74
|
-
> 为 AI 提供审美输入,直接影响 `
|
|
74
|
+
> 为 AI 提供审美输入,直接影响 `screens/` 目录下各屏幕原型的视觉质量。
|
|
75
75
|
> 以下任填一项即有效,填得越多 AI 越能还原你的期望风格。
|
|
76
76
|
|
|
77
77
|
**竞品/灵感截图**: [可粘贴图片 / Figma 链接 / URL]
|