Skip to content

Commit 1cb1dda

Browse files
committed
update UXSMD and S
1 parent 6f92d88 commit 1cb1dda

File tree

5 files changed

+242
-197
lines changed

5 files changed

+242
-197
lines changed

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

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export class UXSMDHandler implements BuildHandler<string> {
2020
const prdContent = context.getNodeData('op:PRD');
2121

2222
// Generate the prompt dynamically
23-
const prompt = prompts.generateUxsmdrompt(projectName, platform);
23+
const prompt = prompts.generateUxsmdPrompt(projectName, platform);
2424

2525
// Send the prompt to the LLM server and process the response
2626
const uxsmdContent = await this.generateUXSMDFromLLM(prompt, prdContent);
@@ -47,26 +47,34 @@ export class UXSMDHandler implements BuildHandler<string> {
4747
{
4848
role: 'user',
4949
content: `
50-
Here is the Product Requirements Document (PRD):
50+
Here is the **Product Requirements Document (PRD)**:
5151
5252
${prdContent}
5353
5454
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',
58-
content: `Check if you meet all PRD details, add more pages, and details if needed. Focus on MVP (Minimum Viable Product).`,
58+
content: `**Validation Step:**
59+
- **Review your output** to ensure **100% coverage** of the PRD.
60+
- Make sure you covered all global_view_* and page_view_* in UX Sitemap Document, If any of them is missing add them based on the system prompt.
61+
- If any critical pages, features, or flows are **missing**, **add them**.
62+
- Adjust for **navigation completeness**, making sure all interactions and workflows are **correctly linked**.`,
5963
},
6064
{
6165
role: 'user',
62-
content: `Please add more detail about the Sub-section in each <gen_page>.
63-
Focus on step-by-step actions the user takes, and any alternative paths mentioned in the PRD.
64-
Also, expand on how these components interrelate to the page's primary features.`,
66+
content: `**Final Refinement:**
67+
- **Expand the Unique UI Pages **, adding page_view_* if needed:
68+
- **Expand the page_views **, adding more details on:
69+
- **Step-by-step user actions** within each page.
70+
- **Alternative user paths** (e.g., different ways a user might complete an action).
71+
- **How components within the page interact** with each other and primary features.
72+
- **Ensure clarity** so developers can implement the structure **without assumptions**.`,
6573
},
6674
];
6775

6876
const modelProvider = ModelProvider.getInstance();
69-
const model = 'gpt-4o-mini';
77+
const model = 'gpt-4o';
7078

7179
const uxsmdContent = await modelProvider.chatSync({
7280
model,
Lines changed: 65 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,82 @@
11
// Define and export the system prompts object
22
export const prompts = {
3-
generateUxsmdrompt: (projectName: string, platform: string): string => {
3+
generateUxsmdPrompt: (projectName: string, platform: string): string => {
44
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:
55
- Project name: ${projectName}
66
- Platform: ${platform}
7-
- product requirements document: (Provided by the user next)
7+
- product requirements document
88
9-
Follow these rules as a guide to ensure clarity and completeness in your UX Sitemap Document.
10-
1. Your reply should start with : "<UXSitemap>" and end with "</UXSitemap> ", Use plain text (no Markdown).
11-
2. Use <page_gen> tags for each main page or section within the sitemap.
12-
3. Use <user_journeys_gen> tags for whole User Journeys
13-
4. **Comprehensive Analysis**: Thoroughly parse the PRD to identify all core features, functionalities, and user stories.
14-
- Focus on creating a hierarchical sitemap that covers each major section, with relevant sub-sections, pages, and key interactions.
15-
- Ensure all primary and secondary user journeys identified in the PRD are clearly reflected.
9+
Your primary goal is to create a fully comprehensive, development-ready UX Sitemap Document that will be directly transferred to the development team for implementation.
10+
This document will be used for an application expected to serve thousands of users, and it must cover all use cases, ensuring a complete and detailed roadmap of all UI components and navigation.
1611
12+
Formatting & Output Guidelines:
13+
1, Use Markdown for structuring the document.
14+
2, Your reply should start with : "\`\`\`UXSitemap" and end with "\`\`\`", Use proper markdown syntax for headings, subheadings, and hierarchical lists.
15+
3, Ensure proper markdown syntax for headings, subheadings, and hierarchical lists.
16+
4, Strict Naming Conventions:
17+
Global Shared UI Views → Prefix with global_view_* .
18+
Unique UI Pages → Prefix with page_view_* .
19+
No "Container" Views → Do not create abstract container views .
20+
global_view_* and page_view_* must be independent → page_view_* does not embed global_view_*, but they share screen space.
1721
18-
5. **Page and Navigation Structure**: Break down the sitemap into main sections, sub sections, and individual screens.
19-
- Identify all main and nested pages.
20-
- **Main Sections**: Identify primary sections (e.g., Home, User Account, Product Catalog) based on project requirements.
21-
- **Sub Sections**: Include sub-sections under each main section (e.g., "Profile" and "Order History" under "User Account").
22-
- **Screens and Interactions**: List specific screens and interactions that users encounter within each flow.
22+
UX Sitemap Requirements:
23+
Your UX Sitemap Document should include detailed breakdowns of:
2324
24-
6. **Detailed User Journeys**:
25-
- For every user story described in the PRD, map out the step-by-step navigation path.
26-
- Highlight sequences (e.g., 1. Home > 1.1. Explore > 1.1.1. Product Details).
25+
1, Global Shared UI Views (global_view_*)
26+
Definition: Shared UI components (e.g., navigation, footers, side menus) used across multiple pages.
27+
Structure:
28+
Each must have a unique ID (global_view_*).
29+
Clearly describe authentication conditions:
30+
Logged-in users (full access, personalized elements).
31+
Logged-out users (restricted access, call-to-actions).
32+
Document all shared elements and their variations:
33+
Example: global_view_top_nav (changes based on authentication state).
2734
28-
7. **Thorough Coverage**:
29-
- Ensure the sitemap is fully comprehensive. If any feature from the PRD is not covered or any user journey is missing, add it to the sitemap.
30-
- Consider the target audience and validate that all expected navigation flows and screens meet user needs.
35+
2, Unique UI Pages (page_view_*)
36+
Definition: Individual, standalone pages (e.g., page_view_home, page_view_settings).
37+
Structure:
38+
Path (URL Route): Clearly define the URL structure of the page.
39+
Example: /home
40+
Covers all unique screens (e.g., page_view_home, page_view_onboarding, page_view_settings).
41+
Describe authentication conditions, permissions, and state dependencies:
42+
What features are available to guest vs. logged-in users?
43+
Are any actions restricted based on user type (e.g., admin, regular user)?
44+
Ensure no duplicate inclusion of global_view_* views (they only share screen space).
45+
Components:
46+
List all UI components that appear on this page.
47+
Describe their functionality and interaction behavior.
48+
Provide detailed descriptions of features, interactions, and user flows.
3149
32-
8. Ask Your self:
33-
- Am I cover all the product requirement document?
34-
- Am I Cover all the gloabal UI?
35-
- Am I Cover all unique UI?
36-
- Am I cover all the view that expect by user?
37-
- what is all the details about UI?
38-
- Am I cover all the cases? Is the final result 100% complete?
50+
3, Functional & Feature Analysis
51+
Break down each UI page before detailing its components.
52+
Clearly map features to UI views.
53+
Ensure that:
54+
Every feature described in the PRD has a corresponding page (page_view_*).
55+
Features are not missing any expected UI elements.
3956
40-
9. Example output:
41-
<UXSitemap>
42-
<page_gen>
43-
N. [Main Section Title]
44-
Description: (Brief description of page purpose)
45-
N.1. [Sub-section Title]
46-
N.1.1. [Further Detail]
47-
N.1.2. [Further Detail]
48-
N.2. [Another Sub-section Title]
49-
</page_gen>
57+
4, Navigation & User Journey Mapping
58+
Map each user journey from the PRD into a step-by-step navigation path.
59+
Example format:
5060
51-
<page_gen>
52-
2. [Another Main Section]
53-
Description: (Brief description of page purpose)
54-
2.1 [Sub-section Title]
55-
...
56-
</page_gen>
61+
1. page_view_home → page_view_explore → page_view_product_details → ....
5762
58-
<user_journeys_gen>
59-
Highlight sequences for user journey
60-
</user_journeys_gen>
63+
Cover both static and dynamic navigation flows.
6164
62-
</UXSitemap>
63-
64-
Remeber your result will be directly be use in the deveolpment. Make sure is 100% complete.`;
65+
Final Instructions:
66+
Self Check Before finalizing, ask yourself:
67+
Did I cover all global shared UI views (global_view_*) separately?
68+
Did I assign unique and expressive IDs (global_view_* for shared views, page_view_* for unique pages)?
69+
Did I avoid embedding global_view_* inside page_view_*?
70+
Did I ensure authentication-based conditions (logged-in vs. guest)?
71+
Did I extensively describe every UI element, interaction, and user flow?
72+
Did I include URL paths for all pages?
73+
Did I include 100% of views required by all features?
74+
Did I avoid unnecessary secondary/tertiary features?
75+
Did I describe inter-app linking and navigation comprehensively?
76+
Strictly follow the naming and formatting conventions.
77+
No extra comments or surrounding text—your reply will be directly used as the final UX Sitemap Analysis Document.
78+
Your response should only contain the markdown-formatted UX Sitemap Document.
79+
Your final document must be exhaustive and 100% complete for development use.
80+
`;
6581
},
6682
};

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export class UXSitemapStructureHandler implements BuildHandler<string> {
7070
];
7171

7272
const uxStructureContent = await context.model.chatSync({
73-
model: 'gpt-4o-mini',
73+
model: 'gpt-4o',
7474
messages,
7575
});
7676

0 commit comments

Comments
 (0)