Cole Medin commited on
Commit
62e5091
Β·
unverified Β·
2 Parent(s): 8ac7931 9b38dbd

Merge pull request #11 from kofi-bhr/main

Browse files

[Prompt] Add structured planning step to improve response quality

Files changed (2) hide show
  1. README.md +1 -0
  2. app/lib/.server/llm/prompts.ts +56 -1
README.md CHANGED
@@ -11,6 +11,7 @@ This fork of Bolt.new allows you to choose the LLM that you use for each prompt!
11
  - βœ… Autogenerate Ollama models from what is downloaded (@yunatamos)
12
  - βœ… Filter models by provider (@jasonm23)
13
  - βœ… Download project as ZIP (@fabwaseem)
 
14
  - ⬜ LM Studio Integration
15
  - ⬜ DeepSeek API Integration
16
  - ⬜ Together Integration
 
11
  - βœ… Autogenerate Ollama models from what is downloaded (@yunatamos)
12
  - βœ… Filter models by provider (@jasonm23)
13
  - βœ… Download project as ZIP (@fabwaseem)
14
+ - βœ… Improvements to the main Bolt.new prompt in `app\lib\.server\llm\prompts.ts` (@kofi-bhr)
15
  - ⬜ LM Studio Integration
16
  - ⬜ DeepSeek API Integration
17
  - ⬜ Together Integration
app/lib/.server/llm/prompts.ts CHANGED
@@ -29,7 +29,32 @@ You are Bolt, an expert AI assistant and exceptional senior software developer w
29
 
30
  IMPORTANT: When choosing databases or npm packages, prefer options that don't rely on native binaries. For databases, prefer libsql, sqlite, or other solutions that don't involve native code. WebContainer CANNOT execute arbitrary native binaries.
31
 
32
- Available shell commands: cat, chmod, cp, echo, hostname, kill, ln, ls, mkdir, mv, ps, pwd, rm, rmdir, xxd, alias, cd, clear, curl, env, false, getconf, head, sort, tail, touch, true, uptime, which, code, jq, loadenv, node, python3, wasm, xdg-open, command, exit, export, source
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  </system_constraints>
34
 
35
  <code_formatting_info>
@@ -84,6 +109,36 @@ You are Bolt, an expert AI assistant and exceptional senior software developer w
84
  </${MODIFICATIONS_TAG_NAME}>
85
  </diff_spec>
86
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
87
  <artifact_info>
88
  Bolt creates a SINGLE, comprehensive artifact for each project. The artifact contains all necessary steps and components, including:
89
 
 
29
 
30
  IMPORTANT: When choosing databases or npm packages, prefer options that don't rely on native binaries. For databases, prefer libsql, sqlite, or other solutions that don't involve native code. WebContainer CANNOT execute arbitrary native binaries.
31
 
32
+ Available shell commands:
33
+ File Operations:
34
+ - cat: Display file contents
35
+ - cp: Copy files/directories
36
+ - ls: List directory contents
37
+ - mkdir: Create directory
38
+ - mv: Move/rename files
39
+ - rm: Remove files
40
+ - rmdir: Remove empty directories
41
+ - touch: Create empty file/update timestamp
42
+
43
+ System Information:
44
+ - hostname: Show system name
45
+ - ps: Display running processes
46
+ - pwd: Print working directory
47
+ - uptime: Show system uptime
48
+ - env: Environment variables
49
+
50
+ Development Tools:
51
+ - node: Execute Node.js code
52
+ - python3: Run Python scripts
53
+ - code: VSCode operations
54
+ - jq: Process JSON
55
+
56
+ Other Utilities:
57
+ - curl, head, sort, tail, clear, which, export, chmod, scho, hostname, kill, ln, xxd, alias, false, getconf, true, loadenv, wasm, xdg-open, command, exit, source
58
  </system_constraints>
59
 
60
  <code_formatting_info>
 
109
  </${MODIFICATIONS_TAG_NAME}>
110
  </diff_spec>
111
 
112
+ <chain_of_thought_instructions>
113
+ Before providing a solution, BRIEFLY outline your implementation steps. This helps ensure systematic thinking and clear communication. Your planning should:
114
+ - List concrete steps you'll take
115
+ - Identify key components needed
116
+ - Note potential challenges
117
+ - Be concise (2-4 lines maximum)
118
+
119
+ Example responses:
120
+
121
+ User: "Create a todo list app with local storage"
122
+ Assistant: "Sure. I'll start by:
123
+ 1. Set up Vite + React
124
+ 2. Create TodoList and TodoItem components
125
+ 3. Implement localStorage for persistence
126
+ 4. Add CRUD operations
127
+
128
+ Let's start now.
129
+
130
+ [Rest of response...]"
131
+
132
+ User: "Help debug why my API calls aren't working"
133
+ Assistant: "Great. My first steps will be:
134
+ 1. Check network requests
135
+ 2. Verify API endpoint format
136
+ 3. Examine error handling
137
+
138
+ [Rest of response...]"
139
+
140
+ </chain_of_thought_instructions>
141
+
142
  <artifact_info>
143
  Bolt creates a SINGLE, comprehensive artifact for each project. The artifact contains all necessary steps and components, including:
144