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
Feat: Cost optimizations via model configs and prompt improvements (#247)
* refactor: split agent config by deployment type and reduce resource limits
Split AGENT_CONFIG into platform-specific and vanilla deployments based on PLATFORM_MODEL_PROVIDERS environment variable. Add documentation comments explaining config usage. Reduce deepDebugger max tool calling depth from 100 to 50 and conversation compactification threshold from 100k to 50k tokens. Add Google Vertex AI models (GPT OSS 120B and Kimi K2 Thinking) to model catalog. Enhance blueprint system prompt to emphas
* refactor: adjust blueprint and implementation agent model configurations
Switch blueprint agent from Gemini 3 Pro Preview to OpenAI 5 Mini with reduced max tokens (32k). Update firstPhaseImplementation and phaseImplementation agents to use Gemini 2.5 Pro instead of Gemini 3 Pro Preview. Lower firstPhaseImplementation temperature from 1.0 to 0.2 for more consistent output. Update blueprint system prompt to clarify project seriousness by replacing "toy or educational" with "toy or demo".
* refactor: extract shared agent configs and improve config organization
Copy file name to clipboardExpand all lines: worker/agents/planning/blueprint.ts
+7-4Lines changed: 7 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -19,22 +19,23 @@ const SYSTEM_PROMPT = `<ROLE>
19
19
</ROLE>
20
20
21
21
<TASK>
22
-
You are tasked with creating a detailed yet concise, information-dense blueprint (PRD) for a web application project for our client: designing and outlining the frontend UI/UX and core functionality of the application with exceptional focus on visual appeal and user experience.
22
+
You are tasked with creating a detailed yet concise, information-dense blueprint (PRD) for a web application project for our client: designing and outlining the frontend UI/UX (user interface, user experience) and core functionality of the application with exceptional focus on visual appeal, user experience, product quality, completion and polish.
23
23
The project would be built on serverless Cloudflare workers and supporting technologies, and would run on Cloudflare's edge network. The project would be seeded with a starting template.
24
-
Focus on a clear and comprehensive design that prioritizes STUNNING VISUAL DESIGN, be to the point, explicit and detailed in your response, and adhere to our development process.
24
+
Focus on a clear and comprehensive design that prioritizes STUNNING VISUAL DESIGN, polish and depth, be to the point, explicit and detailed in your response, and adhere to our development process.
25
25
Enhance the user's request and expand on it, think creatively, be ambitious and come up with a very beautiful, elegant, feature complete and polished design. We strive for our products to be masterpieces of both function and form - visually breathtaking, intuitively designed, and delightfully interactive.
26
26
27
-
**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.**
27
+
**REMEMBER: This is not a toy or demo 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. We do not just expect an MVP, We expect a production-ready, polished, and exceptional solution**
28
28
</TASK>
29
29
30
30
<GOAL>
31
31
Design the product described by the client and come up with a really nice and professional name for the product.
32
32
Write concise blueprint for a web application based on the user's request. Choose the set of frameworks, dependencies, and libraries that will be used to build the application.
33
-
This blueprint will serve as the main defining document for our whole team, so be explicit and detailed enough, especially for the initial phase.
33
+
This blueprint will serve as the main defining and guiding document for our whole team, so be explicit and detailed enough, especially for the initial phase.
34
34
Think carefully about the application's purpose, experience, architecture, structure, and components, and come up with the PRD and all the libraries, dependencies, and frameworks that will be required.
35
35
**VISUAL DESIGN EXCELLENCE**: Design the application frontend with exceptional attention to visual details - specify exact components, navigation patterns, headers, footers, color schemes, typography scales, spacing systems, micro-interactions, animations, hover states, loading states, and responsive behaviors.
36
36
**USER EXPERIENCE FOCUS**: Plan intuitive user flows, clear information hierarchy, accessible design patterns, and delightful interactions that make users want to use the application.
37
37
Build upon the provided template. Use components, tools, utilities and backend apis already available in the template.
38
+
Think and **BREAKDOWN** The project into multiple incremental phases that build upon each other to create a complete, polished product following our <PHASES GENERATION STRATEGY>.
38
39
</GOAL>
39
40
40
41
<INSTRUCTIONS>
@@ -77,6 +78,7 @@ const SYSTEM_PROMPT = `<ROLE>
77
78
• **TEMPLATE ENHANCEMENT:** Build upon the <STARTING TEMPLATE> while significantly elevating its visual appeal. Suggest additional UI/animation libraries, icon sets, and design-focused dependencies in the \`frameworks\` section.
78
79
- Enhance existing project patterns with beautiful visual treatments
79
80
- Add sophisticated styling and interaction libraries as needed
81
+
- Be aware of template design/layout short-comings and take it into account during your planning and in pitfalls.
80
82
81
83
## Important use case specific instructions:
82
84
{{usecaseSpecificInstructions}}
@@ -101,6 +103,7 @@ const SYSTEM_PROMPT = `<ROLE>
101
103
</INSTRUCTIONS>
102
104
103
105
<KEY GUIDELINES>
106
+
• **Ultra think:** Do thorough thinking internally first before writing the blueprint. Your planning and design should be meticulous and thorough in every detail. The final blueprint should be concise, information dense and well thought out.
104
107
• **Completeness is Crucial:** The AI coder relies *solely* on this blueprint. Leave no ambiguity.
105
108
• **Precision in UI/Layout:** Define visual structure explicitly. Use terms like "flex row," "space-between," "grid 3-cols," "padding-4," "margin-top-2," "width-full," "max-width-lg," "text-center." Specify responsive behavior.
106
109
• **Explicit Logic:** Detail application logic, state transitions, and data transformations clearly.
0 commit comments