Skip to content

Commit 6f92d88

Browse files
committed
update
1 parent 7eecfe4 commit 6f92d88

File tree

3 files changed

+41
-23
lines changed

3 files changed

+41
-23
lines changed

backend/src/build-system/handlers/ux/sitemap-document/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@ export class UXSMDHandler implements BuildHandler<string> {
5151
5252
${prdContent}
5353
54-
Please generate the Full UX Sitemap Document now, focusing on MVP features but ensuring each page (especially Home) has enough detail to be functional.`,
54+
Please generate the Full UX Sitemap Document now, focusing on MVP features but ensuring each page has enough detail to be functional.`,
5555
},
5656
{
5757
role: 'user',
5858
content: `Check if you meet all PRD details, add more pages, and details if needed. Focus on MVP (Minimum Viable Product).`,
5959
},
6060
{
6161
role: 'user',
62-
content: `Please add more detail about the Core Components in each <gen_page>.
62+
content: `Please add more detail about the Sub-section in each <gen_page>.
6363
Focus on step-by-step actions the user takes, and any alternative paths mentioned in the PRD.
6464
Also, expand on how these components interrelate to the page's primary features.`,
6565
},

backend/src/build-system/handlers/ux/sitemap-structure/prompt.ts

Lines changed: 37 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ export const prompts = {
1313
Output Requirements:
1414
Use plain text (no Markdown).
1515
Begin with <UXSitemap> and end with </UXSitemap>.
16-
Within <UXSitemap>, start with <global_comp>, and generate multiple <gen_page> blocks, one for each page.
17-
Each <gen_page> must follow this structure exactly:
16+
Within <UXSitemap>, start with <global_comp>, and generate multiple <page_gen> blocks, one for each page.
17+
Each <page_gen> must follow this structure exactly:
1818
19-
<gen_page id="[id]">
19+
<page_gen id="[id]">
2020
P#. [Page Name]
2121
URL Path: /[path]
2222
Description: [Brief description of page purpose]
@@ -43,7 +43,7 @@ P#. [Page Name]
4343
Flow #. [Flow Name]
4444
[Step 1]
4545
[Step 2]
46-
</gen_page>
46+
</page_gen>
4747
4848
1. **Goal**: Produce a complete UX Structure Map describing how each page/screen is laid out, including which global components are reused across pages.
4949
@@ -117,7 +117,7 @@ Self-Check Before Submitting
117117
Are all global components defined in \`<global_comp>\` blocks?
118118
Are user flows, interactions, and relevant content needs included?
119119
120-
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.
120+
Deliver a single XML-like document that strictly follows the structure above. Start with <UXSitemap> and close with </UXSitemap>, containing one <page_gen> block per page.
121121
122122
`;
123123
},
@@ -133,11 +133,41 @@ Deliver a single XML-like document that strictly follows the structure above. St
133133
- Project name: ${projectName}
134134
- Platform: ${platform}
135135
- Sitemap Documentation: (Provided by the user next)
136-
- UX SiteMap Structure: (Provided by the user next)
136+
- UX SiteMap Structure Section: (Provided by the user next)
137137
138138
Follow these guidelines to analyze requirements from a UX perspective:
139139
140140
### Instructions and Rules:
141+
UX SiteMap Structure Section will follow this structure exactly and your output should follow this exactly:
142+
<page_gen id="[id]">
143+
P#. [Page Name]
144+
URL Path: /[path]
145+
Description: [Brief description of page purpose]
146+
Parent Page: [Parent page if nested, or "None" if top-level]
147+
Access Level: [e.g., Public/Private/Admin]
148+
149+
#### Core Components
150+
C#.1. [Component Name]
151+
- Definition: Core Components are **distinct UI elements** or **functional blocks** on the page that have a clear, identifiable role. Each component must include:
152+
1. **Type** (Layout, Interactive, Display, Input, etc.)
153+
2. **Purpose** (What does it do for the user or the interface?)
154+
3. **States** (Possible UI states: Default, Hover, Clicked, Expanded, Loading, etc.)
155+
4. **Interactions** (User actions or system responses: clicking, hovering, dragging, scrolling, etc.)
156+
157+
#### Features & Functionality
158+
- Focus on how these features tie back to user stories, and which **Core Components** are used to achieve them
159+
F#.1. [Feature Name]
160+
Description: [Brief feature description]
161+
User Stories: [Related user stories from PRD]
162+
Components Used: [Which components implement this feature?]
163+
164+
#### Page-Specific User Flows
165+
Step-by-step sequences describing user interactions and system responses
166+
Flow #. [Flow Name]
167+
[Step 1]
168+
[Step 2]
169+
</page_gen>
170+
141171
142172
1, Analyze the Target Section:
143173
Focus on the specific part of the page provided in the UX Structure document.
@@ -154,17 +184,9 @@ Deliver a single XML-like document that strictly follows the structure above. St
154184
Include specific interactions and behaviors for each element.
155185
Content Display:
156186
Identify the information that needs to be visible on the page and why it's essential for the user.
157-
Navigation and Routes:
158-
Specify all frontend routes required to navigate to this page.
159-
Include links or actions that lead to other pages or states.
160187
Restrictions:
161188
Note any restrictions or conditions for accessing the page (e.g., login required, specific user roles).
162189
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-
168190
5, Focus on Detail:
169191
Provide a component-level breakdown for each page, including layouts.
170192
Explain how the design supports user goals and aligns with their journey.
@@ -188,7 +210,7 @@ Deliver a single XML-like document that strictly follows the structure above. St
188210
2. What information needs to be displayed and why
189211
3. How the element supports user goals
190212
191-
Make sure is 100% completed. It will be directly be use in development.
213+
Make sure is 100% completed. It will be directly be use in development, Do not explain what part you changed.
192214
`;
193215
},
194216
};

backend/src/build-system/handlers/ux/sitemap-structure/sms-page.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,7 @@ export class UXSitemapStructurePagebyPageHandler
7575
},
7676
{
7777
role: 'user',
78-
content: `Please add more detail about the Core Components within each <page_gen>.
79-
Specifically:
80-
- Provide a descriptive name for each Core Component (e.g., “C1.1. SearchBar”).
81-
- List possible states (Default, Hover, etc.) and typical user interactions (click, scroll, etc.).
82-
- Clarify how these components support user goals and why they exist on that page.`,
78+
content: `Please add more detail about the Core Components within each <page_gen>.`,
8379
},
8480
];
8581

@@ -108,7 +104,7 @@ export class UXSitemapStructurePagebyPageHandler
108104
* @returns Array of extracted sections as full strings.
109105
*/
110106
private extractAllSections(text: string): string[] {
111-
const pageRegex = /<gen_page id="[^"]+">[\s\S]*?<\/gen_page>/g;
107+
const pageRegex = /<page_gen id="[^"]+">[\s\S]*?<\/page_gen>/g;
112108
return text.match(pageRegex) || [];
113109
}
114110
}

0 commit comments

Comments
 (0)