You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/ai_builder/overview/best_practices.md
+44-28Lines changed: 44 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ Once generated, copy each prompt into the AI Builder to execute them in sequence
33
33
**Example workflow:**
34
34
35
35
1. Switch to Chat Mode and paste your full app specification
36
-
2. Ask: *"Break this into a series of buildable prompts I can feed into the Agent Mode."*
36
+
2. Ask**"Break this into a series of buildable prompts I can feed into the Agent Mode."**
37
37
3. Copy each generated prompt into Agent Mode one by one
38
38
4. Build iteratively using the structured prompts
39
39
@@ -43,20 +43,22 @@ If you have a structured app specification, don't paste the entire document into
43
43
44
44
**Pro tip:** Use **Chat Mode** to help prepare prompts:
45
45
46
-
- Paste your full app spec and ask: *"Break this into buildable prompts I can feed into the builder."*
47
-
- Or ask: *"Write one prompt per feature/page to build this app."*
46
+
Paste your full app spec and ask:
47
+
48
+
-**"Break this into buildable prompts I can feed into the builder."**
49
+
-**"Write one prompt per feature/page to build this app."**
48
50
49
51
This hybrid approach — planning in **Chat Mode**, then building in **Agent Mode** — lets you move faster and build smarter.
50
52
51
53
### Writing Clear, Task-Oriented Prompts
52
54
53
55
The AI performs best when it receives **specific, outcome-driven instructions**. Avoid vague, broad prompts.
54
56
55
-
❌ **Bad:**
56
-
> "Build me an admin dashboard."
57
57
58
-
✅ **Good:**
59
-
> "Create a 2-column layout with a sidebar for navigation and a top navbar."
58
+
```diff
59
+
- Build me an admin dashboard. # <- Bad
60
+
+ Create a 2-column layout with a sidebar for navigation and a top navbar. # <- Good
61
+
```
60
62
61
63
Whenever possible, split large tasks into smaller steps:
62
64
@@ -66,9 +68,13 @@ Whenever possible, split large tasks into smaller steps:
66
68
- Use follow-ups to style and polish
67
69
68
70
Use precise styling language, for example:
69
-
> "Add medium spacing between grid items and use large rounded corners on cards"
70
71
71
-
Avoid subjective terms like "nice," "modern," or "clean." Treat your prompt as interface documentation for the builder.
72
+
```diff
73
+
- Grid items have small spacing and sharp corners.
74
+
+ Add medium spacing between grid items and use large rounded corners on cards.
75
+
```
76
+
77
+
Avoid subjective terms like "**nice**," "**modern**," or "**clean**." Treat your prompt as interface documentation for the builder.
72
78
73
79
### Working with Images and Visual References
74
80
@@ -82,9 +88,12 @@ You can drop in screenshots of websites, dashboards, apps, or even hand-drawn wi
82
88
83
89
**Get UI/UX feedback using Chat Mode:**
84
90
85
-
- Upload a screenshot and ask: *"What are 5 things I could do to improve the UI/UX of this?"*
86
-
- Follow up with: *"Implement items 1, 2, and 4 in the builder."*
87
-
- Or request specific improvements: *"Make this more minimal and mobile-first."*
91
+
Upload a screenshot and ask: **"What are 5 things I could do to improve the UI/UX of this?"**
92
+
93
+
94
+
Follow up with: **Implement items 1, 2, and 4 in the builder.**
95
+
96
+
Or request specific improvements: **Make this more minimal and mobile-first.**
88
97
89
98
---
90
99
@@ -101,50 +110,57 @@ Trying to generate your full app in a single prompt almost never works well. Ins
101
110
102
111
At each stage, give feedback and iterate. If the AI builder makes something close, you can say:
103
112
104
-
> "Reuse this structure but remove the modal and make the sidebar collapsible."
113
+
```diff
114
+
- Modal is included and sidebar is static.
115
+
+ Remove modal and make sidebar collapsible.
116
+
117
+
- Buttons vary across pages.
118
+
+ Use same button style from home page.
105
119
106
-
**Reuse and reference earlier outputs:**
120
+
- Card layout differs across sections.
121
+
+ Repeat card layout from dashboard section.
122
+
```
107
123
108
-
-*"Use the same button style from the home page here."*
109
-
-*"Repeat the card layout from the dashboard section."*
110
-
-*"Match the data table structure from the 'Users' tab."*
111
124
112
125
### Improving UI/UX
113
126
114
127
To improve your design, ask the builder for more polished layouts, better structure, or more modern styles.
115
128
116
-
**Examples:**
129
+
```diff
130
+
- Layout feels cluttered with small headings and dense sections.
131
+
+ Increase heading sizes and spacing between sections for better hierarchy.
117
132
118
-
-*"Make this more minimal."*
119
-
-*"Improve visual hierarchy."*
120
-
-*"This page feels dense. Add more spacing and reduce visual clutter."*
121
-
-*"Make this more mobile-first."*
133
+
- Navigation buttons are inconsistent.
134
+
+ Standardize button sizes and colors for consistent UX.
135
+
```
122
136
123
137
**Suggested workflow:**
124
138
125
139
1. In Chat Mode, upload an image or describe the layout.
126
-
2. Ask: *"Tell me 5 things that would improve the UI/UX of this page."*
140
+
2. Ask: **"Tell me 5 things that would improve the UI/UX of this page."**
127
141
3. Review the suggestions and decide which ones you want to apply.
128
-
4. Switch to Agent Mode and implement: *"Improve visual hierarchy by increasing heading sizes and adding more spacing between sections."*
142
+
4. Switch to Agent Mode and implement: **"Improve visual hierarchy by increasing heading sizes and adding more spacing between sections."**
129
143
130
144
### Using Knowledge to Guide the Build
131
145
132
146
The **Knowledge** panel lets you provide long-form references that influence how the agent builds your app. Add design systems, style guides, brand guidelines, or architecture rules.
133
147
134
148
Once added, the builder will try to honor these rules throughout the session, ensuring consistency without repeating instructions.
135
149
136
-
**Try combining Knowledge with Chat Mode:**
150
+
Try combining Knowledge with Chat Mode:
151
+
152
+
-**Use the style guide in Knowledge to improve this page.**
153
+
154
+
-**Is the current layout aligned with our design system in Knowledge?**
137
155
138
-
-*"Use the style guide in Knowledge to improve this page."*
139
-
-*"Is the current layout aligned with our design system in Knowledge?"*
140
156
141
157
### Local Development Integration
142
158
143
159
We have an MCP server available for enterprise customers to connect local AI development tools such as Claude Desktop, Windsurf, or Codex.
144
160
145
161
This enables a hybrid workflow: generate your app and make major changes in the App Builder, then move to local development for detailed refinements and custom functionality.
146
162
147
-
> **🏢 Enterprise Feature:** The Reflex MCP integration is currently only available for enterprise customers. [Book a demo](https://reflex.dev/pricing/) to discuss access.
163
+
> **Enterprise Feature:** The Reflex MCP integration is currently only available for enterprise customers. [Book a demo](https://reflex.dev/pricing/) to discuss access.
0 commit comments