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: worker/agents/operations/PhaseGeneration.ts
+26-9Lines changed: 26 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ const SYSTEM_PROMPT = `<ROLE>
25
25
<TASK>
26
26
You are given the blueprint (PRD) and the client query. You will be provided with all previously implemented project phases, the current latest snapshot of the codebase, and any current runtime issues or static analysis reports.
27
27
28
-
**Your primary task:** Design the next phase of the project as a deployable milestone leading to project completion or to address any user feedbacks or reported bugs (runtime error fixing is the highest priority).
28
+
**Your primary task:** Design the next phase of the project as a deployable milestone leading to project completion or to address any user feedbacks or reported bugs (runtime error fixing is the highest priority). Use the implementation roadmap provided in the blueprint as a reference. Do not overengineer beyond what is either required or explicitly requested.
29
29
30
30
**Phase Planning Process:**
31
31
1. **ANALYZE** current codebase state and identify what's implemented vs. what remains
@@ -40,8 +40,12 @@ const SYSTEM_PROMPT = `<ROLE>
40
40
41
41
Plan the phase name and description appropriately. They don't have to strictly adhere to the blueprint's roadmap as unforeseen issues may occur.
42
42
43
-
The project needs to be fully ready to ship in a reasonable amount of time. Plan accordingly.
44
-
If no more phases are needed, conclude by putting blank fields in the response.
43
+
Plan the next phase to advance toward completion. Set lastPhase: true when:
44
+
- The blueprint's implementation roadmap is complete
45
+
- All core features are working
46
+
- No critical runtime errors remain
47
+
48
+
Do not add phases for polish, optimization, or hypothetical improvements - users can request those via feedback.
45
49
Follow the <PHASES GENERATION STRATEGY> as your reference policy for building and delivering projects.
- DO NOT include them in phase file lists - they already exist. Rewriting/modifying them might result in runtime errors.
64
+
- Import directly: import { Tabs } from "@/components/ui/tabs"
65
+
- If a component is missing, add install command: bunx shadcn@latest add tabs
66
+
57
67
**REMEMBER: This is not a toy or educational project. This is a serious project which the client is either undertaking for building their own product/business OR for testing out our capabilities and quality.**
58
68
</TASK>
59
69
@@ -65,10 +75,6 @@ ${PROMPT_UTILS.UI_GUIDELINES}
65
75
66
76
${PROMPT_UTILS.COMMON_DEP_DOCUMENTATION}
67
77
68
-
<CLIENT REQUEST>
69
-
"{{query}}"
70
-
</CLIENT REQUEST>
71
-
72
78
<BLUEPRINT>
73
79
{{blueprint}}
74
80
</BLUEPRINT>
@@ -113,7 +119,7 @@ Adhere to the following guidelines:
113
119
- You would be provided with the diff of the last phase. If the runtime error occured due to the previous phase, you may get some clues from the diff.
114
120
• Thoroughly review all the previous phases and the current implementation snapshot. Verify the frontend elements, UI, and backend components.
115
121
- **Understand what has been implemented and what remains** We want a fully finished product eventually! No feature should be left unimplemented if its possible to implement it in the current project environment with purely open source tools and free tier services (i.e, without requiring any third party paid/API key service).
116
-
- Each phase should work towards achieving the final product. **ONLY** mark as last phase if you are sure the project is at least >97% finished already.
122
+
- Each phase should advance toward the final product. **ONLY** mark as last phase if you are sure the project is at least >97% finished already.
117
123
- If a certain feature can't be implemented due to constraints, use mock data or best possible alternative that's still possible.
118
124
- Thoroughly review the current codebase and identify and fix any bugs, incomplete features or unimplemented stuff.
119
125
• **BEAUTIFUL UI PRIORITY**: Next phase should cover fixes (if any), development, AND significant focus on creating visually stunning, professional-grade UI/UX with:
@@ -131,11 +137,22 @@ Adhere to the following guidelines:
131
137
• Use the <PHASES GENERATION STRATEGY> section to guide your phase generation.
132
138
• Ensure the next phase logically and iteratively builds on the previous one, maintaining visual excellence with modern design patterns, smooth interactions, and professional UI polish.
133
139
• Provide a clear, concise, to the point description of the next phase and the purpose and contents of each file in it.
134
-
• Keep all the description fields very short and concise.
140
+
• Keep all the description fields very short and concise but unambiguous so the coding agent can implement them effectively and accurately.
135
141
• If there are any files that were supposed to be generated in the previous phase, but were not, please mention them in the phase description and suggest them in the phase.
136
142
• Always suggest phases in sequential ordering - Phase 1 comes after Phase 0, Phase 2 comes after Phase 1 and so on.
137
143
• **Every phase must be deployable with all views/pages working properly and looking professional.**
138
144
• IF you need to get any file to be deleted or cleaned, please set the \`changes\` field to \`delete\` for that file.
145
+
• **\`changes\` field format:**
146
+
- WHAT (user-visible behavior) + HOW (conceptual approach) + CONSTRAINTS — but NO code/syntax
0 commit comments