architext 0.0.2

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.
Files changed (115) hide show
  1. package/CHANGELOG.md +63 -0
  2. package/LICENSE +21 -0
  3. package/README.md +326 -0
  4. package/README.zh-CN.md +326 -0
  5. package/dist/index.d.ts +1 -0
  6. package/dist/index.js +46 -0
  7. package/dist/templates/en/briefs/_base.md +115 -0
  8. package/dist/templates/en/briefs/_modules.md +173 -0
  9. package/dist/templates/en/docs/global/data_snapshot.json +31 -0
  10. package/dist/templates/en/docs/global/design_tokens.json +150 -0
  11. package/dist/templates/en/docs/global/dictionary.json +35 -0
  12. package/dist/templates/en/docs/global/error_codes.json +19 -0
  13. package/dist/templates/en/docs/global/map.json +94 -0
  14. package/dist/templates/en/docs/global/roadmap.json +39 -0
  15. package/dist/templates/en/docs/global/vision.md +82 -0
  16. package/dist/templates/en/docs/prompts/audit.md +150 -0
  17. package/dist/templates/en/docs/prompts/code.md +160 -0
  18. package/dist/templates/en/docs/prompts/edit.md +87 -0
  19. package/dist/templates/en/docs/prompts/fix.md +86 -0
  20. package/dist/templates/en/docs/prompts/help.md +69 -0
  21. package/dist/templates/en/docs/prompts/inherit.md +270 -0
  22. package/dist/templates/en/docs/prompts/map.md +131 -0
  23. package/dist/templates/en/docs/prompts/plan.md +252 -0
  24. package/dist/templates/en/docs/prompts/remove.md +162 -0
  25. package/dist/templates/en/docs/prompts/revise.md +160 -0
  26. package/dist/templates/en/docs/prompts/scope.md +198 -0
  27. package/dist/templates/en/docs/prompts/start.md +258 -0
  28. package/dist/templates/en/docs/templates/plan.template.json +113 -0
  29. package/dist/templates/en/docs/templates/scope-brief.template.md +58 -0
  30. package/dist/templates/en/docs/templates/spec.template.md +51 -0
  31. package/dist/templates/en/docs/templates/ui.template.md +51 -0
  32. package/dist/templates/en/rules/00_system.md +123 -0
  33. package/dist/templates/en/rules/01_workflow.md +93 -0
  34. package/dist/templates/en/rules/02_tech_stack.md +197 -0
  35. package/dist/templates/en/rules/03_data_governance.md +102 -0
  36. package/dist/templates/en/rules/04_cli_tools.md +50 -0
  37. package/dist/templates/en/rules/90_custom_rules.md +22 -0
  38. package/dist/templates/en/rules/99_context_glue.md +53 -0
  39. package/dist/templates/en/skills/archi-decompose-roadmap/SKILL.md +292 -0
  40. package/dist/templates/en/skills/archi-interview-protocol/SKILL.md +86 -0
  41. package/dist/templates/en/skills/archi-plan-options/SKILL.md +364 -0
  42. package/dist/templates/en/skills/archi-ui-wireframe/SKILL.md +342 -0
  43. package/dist/templates/zh/briefs/_base.md +116 -0
  44. package/dist/templates/zh/briefs/_modules.md +173 -0
  45. package/dist/templates/zh/docs/global/data_snapshot.json +31 -0
  46. package/dist/templates/zh/docs/global/design_tokens.json +135 -0
  47. package/dist/templates/zh/docs/global/dictionary.json +35 -0
  48. package/dist/templates/zh/docs/global/error_codes.json +19 -0
  49. package/dist/templates/zh/docs/global/map.json +94 -0
  50. package/dist/templates/zh/docs/global/roadmap.json +39 -0
  51. package/dist/templates/zh/docs/global/vision.md +82 -0
  52. package/dist/templates/zh/docs/prompts/audit.md +150 -0
  53. package/dist/templates/zh/docs/prompts/code.md +160 -0
  54. package/dist/templates/zh/docs/prompts/edit.md +87 -0
  55. package/dist/templates/zh/docs/prompts/fix.md +86 -0
  56. package/dist/templates/zh/docs/prompts/help.md +69 -0
  57. package/dist/templates/zh/docs/prompts/inherit.md +270 -0
  58. package/dist/templates/zh/docs/prompts/map.md +131 -0
  59. package/dist/templates/zh/docs/prompts/plan.md +253 -0
  60. package/dist/templates/zh/docs/prompts/remove.md +162 -0
  61. package/dist/templates/zh/docs/prompts/revise.md +160 -0
  62. package/dist/templates/zh/docs/prompts/scope.md +198 -0
  63. package/dist/templates/zh/docs/prompts/start.md +258 -0
  64. package/dist/templates/zh/docs/templates/plan.template.json +88 -0
  65. package/dist/templates/zh/docs/templates/scope-brief.template.md +58 -0
  66. package/dist/templates/zh/docs/templates/spec.template.md +51 -0
  67. package/dist/templates/zh/docs/templates/ui.template.md +51 -0
  68. package/dist/templates/zh/rules/00_system.md +123 -0
  69. package/dist/templates/zh/rules/01_workflow.md +93 -0
  70. package/dist/templates/zh/rules/02_tech_stack.md +192 -0
  71. package/dist/templates/zh/rules/03_data_governance.md +102 -0
  72. package/dist/templates/zh/rules/04_cli_tools.md +50 -0
  73. package/dist/templates/zh/rules/90_custom_rules.md +21 -0
  74. package/dist/templates/zh/rules/99_context_glue.md +53 -0
  75. package/dist/templates/zh/skills/archi-decompose-roadmap/SKILL.md +293 -0
  76. package/dist/templates/zh/skills/archi-interview-protocol/SKILL.md +86 -0
  77. package/dist/templates/zh/skills/archi-plan-options/SKILL.md +364 -0
  78. package/dist/templates/zh/skills/archi-ui-wireframe/SKILL.md +339 -0
  79. package/dist/templates/zh-Hant/briefs/_base.md +115 -0
  80. package/dist/templates/zh-Hant/briefs/_modules.md +173 -0
  81. package/dist/templates/zh-Hant/docs/global/data_snapshot.json +31 -0
  82. package/dist/templates/zh-Hant/docs/global/design_tokens.json +135 -0
  83. package/dist/templates/zh-Hant/docs/global/dictionary.json +35 -0
  84. package/dist/templates/zh-Hant/docs/global/error_codes.json +19 -0
  85. package/dist/templates/zh-Hant/docs/global/map.json +94 -0
  86. package/dist/templates/zh-Hant/docs/global/roadmap.json +39 -0
  87. package/dist/templates/zh-Hant/docs/global/vision.md +82 -0
  88. package/dist/templates/zh-Hant/docs/prompts/audit.md +150 -0
  89. package/dist/templates/zh-Hant/docs/prompts/code.md +160 -0
  90. package/dist/templates/zh-Hant/docs/prompts/edit.md +87 -0
  91. package/dist/templates/zh-Hant/docs/prompts/fix.md +86 -0
  92. package/dist/templates/zh-Hant/docs/prompts/help.md +69 -0
  93. package/dist/templates/zh-Hant/docs/prompts/inherit.md +270 -0
  94. package/dist/templates/zh-Hant/docs/prompts/map.md +131 -0
  95. package/dist/templates/zh-Hant/docs/prompts/plan.md +252 -0
  96. package/dist/templates/zh-Hant/docs/prompts/remove.md +162 -0
  97. package/dist/templates/zh-Hant/docs/prompts/revise.md +160 -0
  98. package/dist/templates/zh-Hant/docs/prompts/scope.md +198 -0
  99. package/dist/templates/zh-Hant/docs/prompts/start.md +258 -0
  100. package/dist/templates/zh-Hant/docs/templates/plan.template.json +88 -0
  101. package/dist/templates/zh-Hant/docs/templates/scope-brief.template.md +58 -0
  102. package/dist/templates/zh-Hant/docs/templates/spec.template.md +51 -0
  103. package/dist/templates/zh-Hant/docs/templates/ui.template.md +51 -0
  104. package/dist/templates/zh-Hant/rules/00_system.md +123 -0
  105. package/dist/templates/zh-Hant/rules/01_workflow.md +93 -0
  106. package/dist/templates/zh-Hant/rules/02_tech_stack.md +192 -0
  107. package/dist/templates/zh-Hant/rules/03_data_governance.md +102 -0
  108. package/dist/templates/zh-Hant/rules/04_cli_tools.md +50 -0
  109. package/dist/templates/zh-Hant/rules/90_custom_rules.md +21 -0
  110. package/dist/templates/zh-Hant/rules/99_context_glue.md +53 -0
  111. package/dist/templates/zh-Hant/skills/archi-decompose-roadmap/SKILL.md +293 -0
  112. package/dist/templates/zh-Hant/skills/archi-interview-protocol/SKILL.md +86 -0
  113. package/dist/templates/zh-Hant/skills/archi-plan-options/SKILL.md +364 -0
  114. package/dist/templates/zh-Hant/skills/archi-ui-wireframe/SKILL.md +337 -0
  115. package/package.json +85 -0
@@ -0,0 +1,342 @@
1
+ ---
2
+ name: archi-ui-wireframe
3
+ description: UI concept design expert. Generates ui_concept.html in two phases — Phase 1 outputs a grayscale wireframe (validates information architecture and screen coverage); Phase 2 applies visual styling from design_tokens.json (colors / typography / motion / illustration). 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
+
6
+ # UI Concept Design
7
+
8
+ ## System Flow
9
+
10
+ ```
11
+ /archi.start → roadmap.json + design_tokens.json
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
22
+ ```
23
+
24
+ > **Skill boundary**:
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
27
+
28
+ ---
29
+
30
+ ## Invocation Modes
31
+
32
+ | Mode | Trigger source | Scope |
33
+ |:---|:---|:---|
34
+ | Initial generation | After `/archi.start` completes | Full generation — all screens |
35
+ | Regeneration | Manual user invocation | Full rewrite (global UI redesign) |
36
+ | Append screens | After `/archi.scope` adds new tasks | Add new pages only; existing pages untouched |
37
+ | Plan refinement | `/archi.plan` discovers UI divergence | Update only the affected screen (new states / sub-screens / layout corrections) |
38
+ | Modify screens | After `/archi.edit` changes a task | Update only affected screens; leave others intact |
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.
42
+
43
+ ---
44
+
45
+ ## Two-Phase Protocol
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.
202
+
203
+ ---
204
+
205
+ ### Phase 1.5 — Wireframe Refinement (optional)
206
+
207
+ **Role**: Consulting Advisor
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.
210
+
211
+ ---
212
+
213
+ ### Phase 2 — Visual Styling (Hi-fi Coloring)
214
+
215
+ **Role**: You are a visual designer with a strong personal style. You don't follow conventions — you think in feelings, textures, and rhythm, not components and layouts. You pursue not "correct" but "makes someone stop and look twice." Every decision is intentional: spacing is never arbitrary, colors are never defaults, fonts are never the first in the list. You combine an artist's intuition with an engineer's precision.
216
+
217
+ **Goal**: Style the confirmed wireframe into a hi-fi prototype that has identity — opening it should immediately signal this was designed for THIS project, not generated from a template.
218
+
219
+ **Prerequisite check** (must validate before styling):
220
+
221
+ | Field path | Pass condition | Blocking action |
222
+ |:---|:---|:---|
223
+ | `aestheticDirection.preset` | Non-empty | Warning (non-blocking) — AI infers from project context, notes inference in output |
224
+ | `primitivePalette.brand` | At least 1 non-empty color value | Blocking — prompt user to fill brand color |
225
+ | `semanticTokens.colors` | At least `bg`/`surface`/`text` semantic mappings | Blocking — prompt user to define base semantic colors |
226
+ | `semanticTokens.typography` | At least 1 font family declaration | Warning (non-blocking) — AI picks from aesthetic direction |
227
+ | `motion.preference` | Non-empty | Warning (non-blocking) — defaults to `subtle` |
228
+ | `illustration.iconLibrary` | Non-empty | Warning (non-blocking) — no icon library imported |
229
+
230
+ > On any blocking item: stop immediately, output the list of missing fields, and wait for the user to fill them before re-running.
231
+
232
+ **Action**:
233
+
234
+ 1. **Load visual spec**:
235
+ - `design_tokens.json` → read in full:
236
+ - `aestheticDirection` → preset + custom description
237
+ - `primitivePalette` → CSS variable definitions
238
+ - `semanticTokens.colors` → semantic color mappings
239
+ - `semanticTokens.typography` → font families / sizes
240
+ - `mode` → theme mode (light/dark)
241
+ - `motion` → timing, easing, pattern names
242
+ - `illustration` → icon style, library
243
+ - `layout` → radius / shadow / spacing
244
+ - `vision.md` → extract Visual Reference section (brand colors, competitor screenshot descriptions, forbidden styles)
245
+
246
+ 2. **Aesthetic direction → concrete design parameter mapping**:
247
+
248
+ Use `aestheticDirection.preset` to determine baseline values for design parameters (explicit Token values take priority; baselines fill empty Tokens):
249
+
250
+ | Preset | Background tone | Radius | Shadow | Font strategy | Layout traits | Reference products |
251
+ |:---|:---|:---|:---|:---|:---|:---|
252
+ | `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 |
253
+ | `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 |
254
+ | `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 |
255
+ | `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 |
256
+ | `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 |
257
+ | `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 |
258
+ | `brutalist` | Pure white or pure black | 0px | None | Monospace or system font | No decoration, dense, function-first | Craigslist, HN |
259
+
260
+ > `custom`: read `aestheticDirection.customDescription`, extract keywords, map to nearest preset, then layer custom adjustments on top.
261
+
262
+ 3. **Anti-AI aesthetic blacklist** (CRITICAL — never violate during styling):
263
+
264
+ | Category | Forbidden | Use instead |
265
+ |:---|:---|:---|
266
+ | 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 |
267
+ | 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 |
268
+ | Layout | Every screen uses the same centered card layout | Different screen types need layout variation: list vs detail vs form each have distinct character |
269
+ | Radius | Uniform rounded-lg on everything | Radius must have hierarchy: containers large, buttons medium, badges small (or uniformly 0/sm per aesthetic direction) |
270
+ | Shadow | Identical shadow-md everywhere | Shadow must match aesthetic direction: dark themes barely use shadow; light themes use layered shadow |
271
+ | Motion | Scattered transition-all everywhere | Focus on high-impact moments: orchestrated page load (staggered reveals via animation-delay) > scattered micro-interactions |
272
+ | Overall | Every generation converges to the same look | Each project's styling MUST differ by aesthetic direction — two different projects' ui_concept.html must be instantly distinguishable |
273
+
274
+ 4. **Styling rules** (execute within aesthetic direction baseline + blacklist constraints):
275
+
276
+ | Styling dimension | Rule |
277
+ |:---|:---|
278
+ | Colors | Replace grayscale with `semanticTokens.colors`; brand from `primitivePalette.brand`; empty tokens filled from aesthetic direction baseline |
279
+ | Typography | Use declared fonts from `semanticTokens.typography`; if empty, pick from aesthetic direction strategy (Google Fonts CDN), blacklisted fonts forbidden |
280
+ | Radius/Shadow | Per `layout.radius` / `layout.shadow`; empty values filled from aesthetic direction baseline |
281
+ | Motion | Apply CSS transition/animation per `motion.patterns`; prioritize orchestrated page-load staggered reveal (animation-delay) |
282
+ | Icons | Import CDN per `illustration.iconLibrary`; if style=none, no illustrations |
283
+ | Mode | If `mode.support` includes dark, add CSS `@media (prefers-color-scheme: dark)` + toggle button |
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
+ ```
321
+
322
+ ---
323
+
324
+ ### Phase 2.5 — Incremental Re-coloring
325
+
326
+ **Trigger**: After Phase 2 is complete, a screen is updated by Plan Refinement / Edit / Revise and its new content needs to be styled to match the hi-fi standard.
327
+
328
+ **Role**: Visual Designer
329
+
330
+ **Action**:
331
+
332
+ 1. Receive the list of screen IDs to re-color from the caller (e.g., `S-03`, `S-07`).
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)
341
+
342
+ > **Forbidden**: Never re-run the full Phase 2 for incremental re-coloring. Never touch screens not in the specified list.
@@ -0,0 +1,116 @@
1
+ # Project Brief: [项目名称]
2
+
3
+ > 尽量填写,不确定的留空即可。完成后运行 `/archi.start project-brief.md`,AI 会通过选择题补全缺失信息。
4
+
5
+ ---
6
+
7
+ ## 项目概述
8
+
9
+ **项目名称**:
10
+ **一句话描述**: [项目是什么、为谁服务、解决什么问题]
11
+ **问题陈述**: [目标用户遇到的核心痛点?现有方案哪里不足?]
12
+
13
+ **目标用户**:
14
+ - **核心用户**: [角色/群体]
15
+ - **关键特征**: [技术水平、使用场景、行为习惯]
16
+
17
+ **成功指标**: [怎样算做成了?例:DAU 1000 / 被 100+ 项目采用 / P99 < 200ms]
18
+
19
+ ---
20
+
21
+ ## 核心任务
22
+
23
+ > MVP 必须实现的任务(建议 3-7 个),每项一句话描述预期行为。
24
+ > 详细 Spec 在 `/archi.plan` 阶段定义,此处只需明确"做什么"。
25
+
26
+ 1.
27
+ 2.
28
+ 3.
29
+
30
+ ---
31
+
32
+ ## 已有设计决策
33
+
34
+ > 如果你对某些任务/页面/流程已有明确想法,在此描述。AI 在后续 plan 阶段会以此为准,不会推翻。
35
+ > 没有的话留空即可。
36
+ >
37
+ > 写法参考:
38
+ > - **[任务/页面名]**: 描述具体行为、流程、约束
39
+ > - 可附截图/草图链接
40
+
41
+ ---
42
+
43
+ ## 技术栈
44
+
45
+ > 已确定的直接填写。不确定的留空或写"推荐",AI 会基于项目特征推荐。
46
+
47
+ **项目类型**: [[__PROJECT_TYPE__]]
48
+ <!-- archi init 自动填入;手动填写时参考 templates/archi-decompose-roadmap SKILL 中的类型表 -->
49
+ **语言/运行时**: [例:TypeScript + Node.js 22]
50
+ **核心框架**: [例:Next.js 15 / Fastify / Tauri]
51
+ **包管理器**: [例:pnpm / npm / yarn / cargo]
52
+ **构建工具**: [例:Vite / tsup / Webpack / esbuild / cargo / go build]
53
+ **Linter / Formatter**: [例:ESLint + Prettier / Biome / ruff / clippy + rustfmt]
54
+ <!-- @slot:tech -->
55
+ **部署目标**: [例:Vercel / Docker / npm publish / 二进制分发]
56
+ **关键第三方库**: [例:Zod, TanStack Query, Lucia Auth]
57
+
58
+ **技术红线** (禁用的技术/方案):
59
+ - [例:不用 jQuery;不用 CSS-in-JS]
60
+
61
+ ---
62
+
63
+ ## 工程规范
64
+
65
+ > 团队已有的工程约定。不确定的留空,AI 会基于技术栈推荐合理默认值。
66
+
67
+ **仓库形态**: [Monorepo (Turborepo/Nx/pnpm workspaces) / 单体仓库]
68
+ **架构模式**: [例:MFA / FSD / Clean Architecture / 分层架构 / 无偏好(AI 推荐)]
69
+ **目录结构**: [已有明确结构 → 简述关键目录 / 无(AI 基于架构模式生成)]
70
+ **分支策略**: [例:Trunk-based / Git Flow / GitHub Flow]
71
+ **Commit 规范**: [例:Conventional Commits (feat/fix/chore) / 自定义 → 简述]
72
+ **测试偏好**: [例:Vitest / Jest / pytest / 无特殊要求]
73
+
74
+ ---
75
+
76
+ ## 已有资源与上下文
77
+
78
+ > AI 需要知道哪些东西已经存在——避免重复造轮子或做出冲突决策。
79
+
80
+ **项目起点**: [全新项目 / 基于已有代码库(简述现状和技术债)]
81
+ **设计资产**: [Figma 链接 / 设计稿截图 / 无(AI 自行设计)]
82
+ **品牌规范**: [已有 Logo/配色/字体 → 描述或附链接 / 无]
83
+ **已有 API/后端**: [接口文档链接 / 简述可用端点 / 无(需从零搭建)]
84
+ **第三方服务**: [已确定使用的服务,例:Auth0, Stripe, AWS S3, Resend...]
85
+ **现有数据**: [已有数据库/数据源?格式?需要迁移?/ 无]
86
+
87
+ ---
88
+
89
+ <!-- @slot:style -->
90
+
91
+ ## 边界与约束
92
+
93
+ **明确不做的事** (反目标):
94
+ - [例:本期不做国际化 / 不做移动端适配 / 不做付费功能]
95
+
96
+ **硬性约束**:
97
+ - **时间**: [例:4 周 MVP / 无硬性 deadline]
98
+ - **兼容性**: [例:Chrome 90+ / Node 18+ / iOS 15+]
99
+ - **性能**: [例:首屏 < 2s / API P99 < 500ms / 无特殊要求]
100
+ - **合规/无障碍**: [例:WCAG 2.1 AA / GDPR / 无]
101
+
102
+ ---
103
+
104
+ ## 参考与灵感
105
+
106
+ | 参考项目 | 参考维度 |
107
+ |:---|:---|
108
+ | [例:Linear] | [交互体验、任务管理逻辑] |
109
+ | | |
110
+
111
+ ---
112
+
113
+ ## 补充说明
114
+
115
+ > 任何上述未涵盖的信息:背景故事、特殊需求、已有决策的原因、团队技术偏好等。
116
+
@@ -0,0 +1,173 @@
1
+ <!-- @tech:ui -->
2
+ **CSS/UI 方案**: [例:TailwindCSS + Shadcn/UI / Ant Design / 原生 CSS]
3
+ <!-- @end -->
4
+
5
+ <!-- @tech:data -->
6
+ **数据库**: [例:PostgreSQL / MongoDB / SQLite]
7
+ **ORM / Query Builder**: [例:Prisma / Drizzle / TypeORM]
8
+ <!-- @end -->
9
+
10
+ <!-- @tech:api -->
11
+ **API 风格**: [例:RESTful / GraphQL / gRPC / tRPC]
12
+ <!-- @end -->
13
+
14
+ <!-- @tech:cli -->
15
+ **CLI 框架**: [例:cac / commander / clap (Rust) / cobra (Go)]
16
+ **分发方式**: [例:npm publish / GitHub Releases / 二进制]
17
+ <!-- @end -->
18
+
19
+ <!-- @tech:lib -->
20
+ **模块格式**: [例:ESM / CJS + ESM 双出]
21
+ **目标平台**: [例:浏览器 + Node.js / 仅 Node.js]
22
+ **分发渠道**: [例:npm / PyPI / crates.io]
23
+ <!-- @end -->
24
+
25
+ <!-- @style:ui -->
26
+ ## 风格与调性
27
+
28
+ **审美方向** (选一个最接近的,不确定就留空让 AI 推荐):
29
+ <!-- 选一个填入,或写 custom 并在下方描述 -->
30
+ <!-- saas-dark — 类似 Linear/Vercel/Raycast:深色背景、高对比、极简、锐利边缘 -->
31
+ <!-- saas-light — 类似 Notion/Stripe/GitHub:白底、细边框、系统字体、呼吸感 -->
32
+ <!-- dashboard — 类似 Grafana/Datadog:信息密集、卡片网格、数据优先 -->
33
+ <!-- marketing — 类似 Loom/Framer:大标题、渐变、视觉冲击、叙事感 -->
34
+ <!-- mobile-app — 类似 Telegram/Bear:圆角大、间距宽、触控友好 -->
35
+ <!-- editorial — 类似 Medium/Substack:排版优先、衬线字体、阅读沉浸 -->
36
+ <!-- brutalist — 类似 Craigslist/HN:功能极简、无装饰、原始感 -->
37
+ <!-- custom — 在「自定义描述」中写你想要的风格 -->
38
+
39
+ **审美方向**: [例:saas-dark / saas-light / dashboard / marketing / mobile-app / editorial / brutalist / custom]
40
+ **自定义描述**: [仅 custom 时填写,例:"类似 Spotify 的深色 + 绿色强调 + 卡片式布局"]
41
+
42
+ **信息密度**: [大留白/沉浸式 / 信息密集/仪表盘风格]
43
+ **动效偏好**: [轻微微交互 / 丰富动画 / 无动画]
44
+
45
+ ### 视觉参考 (Visual Reference)
46
+
47
+ > 为 AI 提供审美输入,直接影响 `ui_concept.html` 的视觉质量。
48
+ > 以下任填一项即有效,填得越多 AI 越能还原你的期望风格。
49
+
50
+ **竞品/灵感截图**: [可粘贴图片 / Figma 链接 / URL]
51
+ **品牌色板**: [主色 Hex / 渐变描述 / 无(AI 基于审美方向生成)]
52
+ **字体偏好**: [例:JetBrains Mono + Space Grotesk / Playfair Display / 无偏好(AI 基于审美方向选择)]
53
+ **图标库**: [例:Lucide / Heroicons / Tabler / 无偏好]
54
+ **禁用风格**: [例:禁渐变背景 / 禁卡通插画 / 无限制]
55
+ <!-- @end -->
56
+
57
+ <!-- @style:cli -->
58
+ ## 风格与调性
59
+
60
+ **输出风格**: [简洁单行 / 结构化彩色 / JSON 机器可读]
61
+ **交互模式**: [纯参数驱动 / 交互式提示 / 混合]
62
+ **错误展示**: [简洁提示 / 详细堆栈 / 分级(--verbose)]
63
+ <!-- @end -->
64
+
65
+ <!-- @style:api -->
66
+ ## 风格与调性
67
+
68
+ **文档方案**: [OpenAPI/Swagger / GraphQL Schema / 手写文档]
69
+ **错误响应格式**: [RFC 7807 / 自定义 JSON / GraphQL errors]
70
+ **版本策略**: [URL 路径 /v1 / Header / 无版本控制]
71
+ <!-- @end -->
72
+
73
+ <!-- @tech:mobile -->
74
+ **移动端运行时**: [例:React Native 0.76 / Flutter 3 / Expo SDK 52]
75
+ **UI 组件库**: [例:RN Paper / NativeWind / NativeBase / 原生组件]
76
+ **导航方案**: [例:React Navigation 7 / Expo Router / Go Router]
77
+ **原生能力**: [例:摄像头、推送通知、生物识别——列出需要的]
78
+ **分发渠道**: [例:App Store + Play Store / Expo Go / TestFlight]
79
+ **OTA 热更新**: [例:Expo Updates / CodePush / 不需要]
80
+ <!-- @end -->
81
+
82
+ <!-- @tech:miniapp -->
83
+ **小程序平台**: [例:微信 / 支付宝 / 抖音 / uni-app(多端)]
84
+ **基础库版本**: [例:微信基础库 3.x / uni-app Vue3]
85
+ **UI 组件库**: [例:Vant Weapp / TDesign MiniProgram / 原生组件]
86
+ **云开发**: [例:微信云开发 / 不使用]
87
+ **分发**: [例:微信公众平台发布 / 审核周期约定]
88
+ <!-- @end -->
89
+
90
+ <!-- @style:miniapp -->
91
+ ## 风格与调性
92
+
93
+ **视觉规范**: [遵循平台设计规范(微信 Weui / 支付宝 / 抖音)/ 自定义品牌风]
94
+ **色调倾向**: [品牌主色 / 跟随平台默认 / 深色模式(需平台支持)]
95
+ **组件风格**: [原生组件为主 / 定制组件 / 混合]
96
+ **动效偏好**: [系统默认页面切换 / 自定义过渡 / 无特殊要求]
97
+ <!-- @end -->
98
+
99
+ <!-- @tech:desktop -->
100
+ **桌面运行时**: [例:Tauri 2 / Electron 33]
101
+ **IPC 通信**: [例:Tauri invoke/command / Electron ipcMain+ipcRenderer]
102
+ **系统级能力**: [例:系统托盘、全局热键、文件关联、剪贴板——列出需要的]
103
+ **打包分发**: [例:tauri-bundler (.dmg/.msi/.deb) / electron-builder / GitHub Releases]
104
+ **自动更新**: [例:tauri-updater / electron-updater / 不需要]
105
+ <!-- @end -->
106
+
107
+ <!-- @tech:extension -->
108
+ **目标浏览器**: [例:Chrome + Edge / Firefox / 全平台]
109
+ **Manifest 版本**: [V3(推荐)/ V2(Firefox 需兼容)]
110
+ **扩展结构**: [例:仅 Popup / Popup + Content Script / Background + Content Script + Popup]
111
+ **权限声明**: [例:storage、tabs、activeTab——列出需要的]
112
+ **发布渠道**: [例:Chrome Web Store / Firefox Add-ons / 私有分发]
113
+ <!-- @end -->
114
+
115
+ <!-- @tech:realtime -->
116
+ **实时传输方案**: [例:Socket.io / 原生 WebSocket / SSE / WebRTC]
117
+ **实时框架/托管**: [例:Ably / Pusher / Liveblocks / 自建]
118
+ **房间/频道模型**: [例:按用户 ID 订阅 / 按文档 ID 房间 / 广播]
119
+ **[?CRDT] 协作冲突解决**: [例:Yjs / Automerge / 不需要(仅广播)]
120
+ **离线支持**: [例:离线队列 + 重连同步 / 不需要]
121
+ <!-- @end -->
122
+
123
+ <!-- @tech:ai -->
124
+ **LLM 提供商**: [例:OpenAI GPT-4o / Anthropic Claude / Gemini / 本地 Ollama]
125
+ **AI 框架**: [例:Vercel AI SDK / LangChain / LlamaIndex / 无框架直调 API]
126
+ **Tool/Function Calling**: [例:需要(列出工具名称)/ 不需要]
127
+ **Memory 方案**: [例:向量数据库(pgvector/Pinecone)/ 滑动窗口历史 / 无]
128
+ **[?MCP] MCP 协议**: [例:@modelcontextprotocol/sdk / 不需要]
129
+ **流式输出**: [例:SSE 流式 / 批量返回]
130
+ <!-- @end -->
131
+
132
+ <!-- @style:mobile -->
133
+ ## 风格与调性
134
+
135
+ **视觉关键词**: [例:原生感、轻量、沉浸式]
136
+ **适配方案**: [例:响应式 dp/sp / 固定设计稿 375pt]
137
+ **深色模式**: [跟随系统 / 仅浅色 / 仅深色]
138
+ **动效偏好**: [系统原生动效 / 自定义过渡 / 无特殊要求]
139
+ **无障碍**: [例:VoiceOver / TalkBack 支持 / 无特殊要求]
140
+ <!-- @end -->
141
+
142
+ <!-- @style:desktop -->
143
+ ## 风格与调性
144
+
145
+ **视觉风格**: [例:原生系统风(Fluent/HIG)/ 自定义品牌风]
146
+ **窗口管理**: [例:单主窗口 + 托盘 / 多窗口 / 全屏优先]
147
+ **深色模式**: [跟随系统 / 固定深色 / 固定浅色]
148
+ **菜单栏/系统托盘**: [例:菜单栏图标 + 快捷操作 / 仅托盘图标 / 不需要]
149
+ <!-- @end -->
150
+
151
+ <!-- @style:extension -->
152
+ ## 风格与调性
153
+
154
+ **Popup 尺寸约定**: [例:320×480px / 400×600px / 自适应]
155
+ **视觉风格**: [例:极简卡片 / 与目标网站融合 / 独立品牌]
156
+ **Content Script 注入样式**: [例:悬浮按钮 / 侧边栏 / 高亮遮罩]
157
+ <!-- @end -->
158
+
159
+ <!-- @style:realtime -->
160
+ ## 风格与调性
161
+
162
+ **协作感知 UI**: [例:实时光标、用户头像列表、打字指示器——列出需要的]
163
+ **冲突/同步状态展示**: [例:乐观更新 + 静默同步 / 明确显示"正在同步"]
164
+ **离线提示**: [例:顶部 Banner 提示 / 静默重连]
165
+ <!-- @end -->
166
+
167
+ <!-- @style:ai -->
168
+ ## 风格与调性
169
+
170
+ **交互模式**: [对话型(聊天 UI)/ 工具型(命令+结果)/ 混合]
171
+ **流式输出展示**: [例:逐字打印效果 / 分段加载 / 批量返回]
172
+ **错误/降级提示**: [例:显示 fallback 模型 / 重试按钮 / 静默降级]
173
+ <!-- @end -->
@@ -0,0 +1,31 @@
1
+ {
2
+ "scope": "[?Data]",
3
+ "models": [
4
+ {
5
+ "name": "[ModelName]",
6
+ "description": "[一句话说明]",
7
+ "fields": [
8
+ {
9
+ "name": "id",
10
+ "type": "string",
11
+ "modifiers": "PK",
12
+ "description": "唯一标识"
13
+ },
14
+ {
15
+ "name": "[fieldName]",
16
+ "type": "[type]",
17
+ "modifiers": "[nullable | unique | index | ...]",
18
+ "description": "[字段说明]"
19
+ }
20
+ ]
21
+ }
22
+ ],
23
+ "relationships": [
24
+ {
25
+ "from": "[ModelA]",
26
+ "to": "[ModelB]",
27
+ "type": "[1:1 | 1:N | M:N | self-ref]",
28
+ "description": "[关系说明]"
29
+ }
30
+ ]
31
+ }