|
1 | 1 | export const prompts = { |
2 | 2 | generateUXSiteMapStructrePrompt: ( |
3 | 3 | projectName: string, |
4 | | - sitemapDoc: string, |
5 | 4 | platform: string, |
6 | 5 | ): string => { |
7 | | - return `You are an expert UX Designer. Your task is to analyze the provided sitemap documentation and generate a Detailed UX Structure Map to support the user experience and frontend implementation. The output should address all aspects of user interaction, content layout, based on the following inputs: |
8 | | - |
9 | | - - Project name: ${projectName} |
10 | | - - Sitemap Documentation: ${sitemapDoc} |
11 | | - - Platform: ${platform} |
12 | | - |
13 | | - Follow these guidelines to analyze requirements from a UX perspective: |
14 | | - |
15 | | - ### Instructions and Rules: |
16 | | - |
17 | | - 1, Your job is to analyzing how the ui element should be layed out and distributed on the page based on the Sitemap Documentation. |
18 | | - 2, You need to ensure all features from the sitemap documentation are addressed. |
19 | | - 3, You need to identify and define every page/screen required for the application. |
20 | | - 4, Detailed Breakdown for Each Page/Screen: |
21 | | - Page name: ## {index}. Name page |
22 | | - Page Purpose: Clearly state the user goal for the page. |
23 | | - Core Elements: |
24 | | - List all components (e.g., headers, buttons, sidebars) and explain their role on the page. |
25 | | - Include specific interactions and behaviors for each element. |
26 | | - Content Display: |
27 | | - Identify the information that needs to be visible on the page and why it's essential for the user. |
28 | | - Navigation and Routes: |
29 | | - Specify all frontend routes required to navigate to this page. |
30 | | - Include links or actions that lead to other pages or states. |
31 | | - Restrictions: |
32 | | - Note any restrictions or conditions for accessing the page (e.g., login required, specific user roles). |
| 6 | + return `You are an expert frontend develper and ux designer. Your job is to analyze and expand upon the details provided, generating a Full UX Sitemap Document based on the following inputs: |
| 7 | + - Project name: ${projectName} |
| 8 | + - Platform: ${platform} |
| 9 | + - Product Requirements Document: (Provided by the user next) |
| 10 | + - Goal: MVP (Minimum Viable Product) |
33 | 11 |
|
34 | | - 5, Focus on Detail: |
35 | | - Provide a component-level breakdown for each page, including layouts. |
36 | | - Explain how the design supports user goals and aligns with their journey. |
| 12 | + Follow these rules as a guide to ensure clarity and completeness in your UX Sitemap Document. |
| 13 | + Output Requirements: |
| 14 | + Use plain text (no Markdown). |
| 15 | + Begin with <UXSitemap> and end with </UXSitemap>. |
| 16 | + Within <UXSitemap>, generate multiple <gen_page> blocks, one for each page. |
| 17 | + Each <gen_page> must follow this structure exactly: |
37 | 18 |
|
38 | | - 6. For each page/screen in the sitemap: |
39 | | - - How the block should be place on the view? |
40 | | - - What information does the user need to see? |
41 | | - - What elements should be on the page? |
42 | | - - What are all the routes require for the frontend? |
43 | | - - What dynamic content needs to be displayed? |
44 | | - - What are the restriction for the page? |
45 | | - |
46 | | - 7. Consider: |
47 | | - - User goals on each page |
48 | | - - User journy |
49 | | - - Element purposes |
50 | | - - Content that needs to be displayed |
| 19 | +<gen_page> |
| 20 | +P#. [Page Name] |
| 21 | + URL Path: /[path] |
| 22 | + Description: [Brief description of page purpose] |
| 23 | + Parent Page: [Parent page if nested, or "None" if top-level] |
| 24 | + Access Level: [e.g., Public/Private/Admin] |
51 | 25 |
|
52 | | - Your reply must start with: "\`\`\`UXStructureMap" and end with "\`\`\`". |
| 26 | +#### Core Components |
| 27 | + C#.1. [Component Name] |
| 28 | + - Definition: Core Components are **distinct UI elements** or **functional blocks** on the page that have a clear, identifiable role. Each component must include: |
| 29 | + 1. **Type** (Layout, Interactive, Display, Input, etc.) |
| 30 | + 2. **Purpose** (What does it do for the user or the interface?) |
| 31 | + 3. **States** (Possible UI states: Default, Hover, Clicked, Expanded, Loading, etc.) |
| 32 | + 4. **Interactions** (User actions or system responses: clicking, hovering, dragging, scrolling, etc.) |
53 | 33 |
|
54 | | - Focus on describing the UX Structure from a user experience perspective. For each page: |
55 | | - 1. What element appear on each page and why |
56 | | - 2. What information needs to be displayed and why |
57 | | - 3. How the element supports user goals |
| 34 | +#### Features & Functionality |
| 35 | + - Focus on how these features tie back to user stories, and which **Core Components** are used to achieve them |
| 36 | + F#.1. [Feature Name] |
| 37 | + Description: [Brief feature description] |
| 38 | + User Stories: [Related user stories from PRD] |
| 39 | + Components Used: [Which components implement this feature?] |
| 40 | +
|
| 41 | +#### Page-Specific User Flows |
| 42 | + Step-by-step sequences describing user interactions and system responses |
| 43 | + Flow #. [Flow Name] |
| 44 | + [Step 1] |
| 45 | + [Step 2] |
| 46 | +</gen_page> |
| 47 | +
|
| 48 | +1. **Goal**: Produce a complete UX Structure Map describing how each page/screen is laid out, including which global components are reused across pages. |
| 49 | +
|
| 50 | +2. **Global Components**: |
| 51 | + - Mark all reusable or site-wide elements with \`<global_comp>\` tags and end tag </global_comp>. |
| 52 | + - Provide a short but clear definition for each global component (e.g., Navigation Bar, Footer, etc.). |
| 53 | + - Explain how/why these components appear on multiple pages (if applicable). |
| 54 | +
|
| 55 | +3. **Page Definitions**: |
| 56 | + - Use \`<page_gen>\` tags to define each individual page or screen from the Sitemap Documentation. |
| 57 | + - For each \`<page_gen>\`, provide: |
| 58 | + - **Page name** (P#). |
| 59 | + - **URL Path**: The route or path used to access this page. |
| 60 | + - **Description**: Explain the purpose of the page, the users goal, and how it supports the user journey. |
| 61 | + - **Core Elements**: List and describe the UI elements on this page (headers, buttons, sidebars, etc.). |
| 62 | + - Explain their states and interactions. |
| 63 | + - Reference **global components** (if used) plus any page-specific components. |
| 64 | + - **Content Display**: What information is shown, and why is it essential? |
| 65 | + - **Navigation and Routes**: Which routes lead here? Which links or buttons lead out? |
| 66 | + - **Restrictions**: Note if login is required, or if only certain user roles can access. |
| 67 | +
|
| 68 | +4. **Focus on Detail**: |
| 69 | + - Provide a component-level breakdown for each pages layout and user interactions. |
| 70 | + - Address all features from the Sitemap Documentation; confirm no item is missed. |
| 71 | + - Make sure each pages structure is thorough enough for front-end implementation. |
| 72 | +
|
| 73 | +5. **Consider**: |
| 74 | + - User goals on each page. |
| 75 | + - The user journey and how each page supports it. |
| 76 | + - The purpose of each element (why it exists, how it helps the user). |
| 77 | + - The presence of dynamic or personalized content. |
| 78 | +
|
| 79 | + 6. **Output Format**: |
| 80 | + - Your reply must begin with: <UXSitemapStructre> and end with </UXSitemapStructre> (plain text, no Markdown headings). |
| 81 | + - Inside, you must include: |
| 82 | + 1. One or more \`<global_comp>\` blocks (if relevant). |
| 83 | + 2. Multiple \`<page_gen>\` blocks (one per page). |
| 84 | + - Each \`<global_comp>\` or \`<page_gen>\` should include all relevant fields as stated above. |
| 85 | + **Number** pages sequentially (P1., P2., etc.). |
| 86 | + **Number** each component and feature sequentially within that page (C1.1, C1.2, F1.1, F1.2, etc.). |
| 87 | + Thoroughly parse the PRD to include: |
| 88 | + - **All** pages. |
| 89 | + - **All** features, functionalities, user stories, and flows. |
| 90 | + - **All** major/minor navigation and user journeys. |
| 91 | +
|
| 92 | +Sitemap Coverage |
| 93 | +
|
| 94 | + Comprehensive Analysis: |
| 95 | + Capture all features, functionalities, and user stories. |
| 96 | + Represent all primary and secondary user flows. |
| 97 | +
|
| 98 | + Page & Navigation Structure: |
| 99 | + Identify all main and nested pages. |
| 100 | + Ensure clear parent-child relationships. |
| 101 | +
|
| 102 | + Detailed User Journeys: |
| 103 | + Provide step-by-step navigational flows unique to each page. |
| 104 | +
|
| 105 | + Thorough Coverage: |
| 106 | + Verify every requirement, global UI element, unique UI, and user expectation from the PRD is addressed. |
| 107 | + No user flow or screen should be missing. |
| 108 | +
|
| 109 | +Self-Check Before Submitting |
| 110 | +
|
| 111 | + Have you accounted for all sitemap details? |
| 112 | + Have you included all major and minor pages/screens? |
| 113 | + Have you detailed each page's components, features, and flows completely? |
| 114 | + Is every page from the Sitemap Documentation represented in a \`<page_gen>\` block? |
| 115 | + Are all global components defined in \`<global_comp>\` blocks? |
| 116 | + Are user flows, interactions, and relevant content needs included? |
| 117 | +
|
| 118 | +Deliver a single XML-like document that strictly follows the structure above. Start with <UXSitemap> and close with </UXSitemap>, containing one <gen_page> block per page. |
58 | 119 |
|
59 | | - Make sure is 100% completed. It will be directly be use in development. |
60 | 120 | `; |
61 | 121 | }, |
62 | 122 | generateLevel2UXSiteMapStructrePrompt: ( |
@@ -100,6 +160,11 @@ export const prompts = { |
100 | 160 | Restrictions: |
101 | 161 | Note any restrictions or conditions for accessing the page (e.g., login required, specific user roles). |
102 | 162 |
|
| 163 | + 2. **Global Components**: |
| 164 | + - Mark all reusable or site-wide elements with \`<global_comp>\` tags. |
| 165 | + - Provide a short but clear definition for each global component (e.g., Navigation Bar, Footer, etc.). |
| 166 | + - Explain how/why these components appear on multiple pages (if applicable). |
| 167 | +
|
103 | 168 | 5, Focus on Detail: |
104 | 169 | Provide a component-level breakdown for each page, including layouts. |
105 | 170 | Explain how the design supports user goals and aligns with their journey. |
|
0 commit comments