Skip to content

Commit 74d4610

Browse files
committed
improved prompt
1 parent e5cc2ed commit 74d4610

File tree

1 file changed

+71
-30
lines changed
  • backend/src/build-system/handlers/ux/sitemap-document

1 file changed

+71
-30
lines changed
Lines changed: 71 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,81 @@
11
// Define and export the system prompts object
22
export const prompts = {
33
generateUxsmdrompt: (projectName: string, platform: string): string => {
4-
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 provide later:
4+
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}
6-
- product requirements document: {}
76
- Platform: ${platform}
7+
- Product Requirements Document: (Provided by the user next)
8+
- Goal: MVP (Minimum Viable Product)
89
910
Follow these rules as a guide to ensure clarity and completeness in your UX Sitemap Document.
10-
1, Write you result in markdown
11-
2, Your reply should start with : "\`\`\`UXSitemap" and end with "\`\`\`", Use proper markdown syntax for headings, subheadings, and hierarchical lists.
12-
3. **Comprehensive Analysis**: Thoroughly parse the PRD to identify all core features, functionalities, and user stories.
13-
- Focus on creating a hierarchical sitemap that covers each major section, with relevant sub-sections, pages, and key interactions.
14-
- Ensure all primary and secondary user journeys identified in the PRD are clearly reflected.
15-
16-
4. **Page and Navigation Structure**: Break down the sitemap into main sections, secondary sections, and individual screens.
17-
- **Main Sections**: Identify primary sections (e.g., Home, User Account, Product Catalog) based on project requirements.
18-
- **Secondary Sections**: Include sub-sections under each main section (e.g., "Profile" and "Order History" under "User Account").
19-
- **Screens and Interactions**: List specific screens and interactions that users encounter within each flow.
20-
21-
5. **Detailed User Journeys**:
22-
- For every user story described in the PRD, map out the step-by-step navigation path.
23-
- Highlight sequences (e.g., 1. Home > 1.1. Explore > 1.1.1. Product Details).
24-
25-
6. **Thorough Coverage**:
26-
- 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.
27-
- Consider the target audience and validate that all expected navigation flows and screens meet user needs.
28-
29-
7. Ask Your self:
30-
- Am I cover all the product requirement document?
31-
- Am I Cover all the gloabal UI?
32-
- Am I Cover all unique UI?
33-
- Am I cover all the view that expect by user?
34-
- what is all the details about UI?
35-
- Am I cover all the cases? Is the final result 100% complete?
36-
37-
Remeber your result will be directly be use in the deveolpment. Make sure is 100% complete.
11+
Output Requirements:
12+
Use plain text (no Markdown).
13+
Begin with <UXSitemap> and end with </UXSitemap>.
14+
Within <UXSitemap>, generate multiple <gen_page> blocks, one for each page.
15+
Each <gen_page> must follow this structure exactly:
16+
17+
<gen_page>
18+
P#. [Page Name]
19+
20+
URL Path: /[path]
21+
Description: [Brief description of page purpose]
22+
Parent Page: [Parent page if nested, or "None" if top-level]
23+
Access Level: [e.g., Public/Private/Admin]
24+
25+
#### Core Components
26+
27+
C#.1. [Component Name]
28+
Type: [Layout/Interactive/Display/etc.]
29+
Purpose: [What does it do?]
30+
States: [Possible states, e.g., Default/Hovered/Expanded...]
31+
Interactions: [User interactions]
32+
33+
#### Features & Functionality
34+
35+
F#.1. [Feature Name]
36+
Description: [Brief feature description]
37+
User Stories: [Related user stories from PRD]
38+
Components Used: [Which components implement this feature?]
39+
40+
#### Page-Specific User Flows
41+
42+
Flow #. [Flow Name]
43+
[Step 1]
44+
[Step 2]
45+
</gen_page>
46+
47+
4. **Number** pages sequentially (P1., P2., etc.).
48+
5. **Number** each component and feature sequentially within that page (C1.1, C1.2, F1.1, F1.2, etc.).
49+
6. Thoroughly parse the PRD to include:
50+
- **All** pages.
51+
- **All** features, functionalities, user stories, and flows.
52+
- **All** major/minor navigation and user journeys.
53+
54+
55+
Sitemap Coverage
56+
57+
Comprehensive Analysis:
58+
Capture all features, functionalities, and user stories.
59+
Represent all primary and secondary user flows.
60+
61+
Page & Navigation Structure:
62+
Identify all main and nested pages.
63+
Ensure clear parent-child relationships.
64+
65+
Detailed User Journeys:
66+
Provide step-by-step navigational flows unique to each page.
67+
68+
Thorough Coverage:
69+
Verify every requirement, global UI element, unique UI, and user expectation from the PRD is addressed.
70+
No user flow or screen should be missing.
71+
72+
Self-Check Before Submitting
73+
74+
Have you accounted for all PRD details?
75+
Have you included all major and minor pages/screens?
76+
Have you detailed each page's components, features, and flows completely?
77+
78+
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.
3879
`;
3980
},
4081
};

0 commit comments

Comments
 (0)