From 1766dd5aa8935e28badc2d9051bbfa263c480146 Mon Sep 17 00:00:00 2001 From: Kofi <74067324+kofi-bhr@users.noreply.github.com> Date: Mon, 21 Oct 2024 07:06:23 -0500 Subject: [PATCH 1/3] Update README.md Fixed Readme to be up to date with prompting fixees --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 750833a..4255c02 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ This fork of bolt.new allows you to choose the LLM that you use for each prompt! - ✅ Autogenerate Ollama models from what is downloaded (@mosquet) - ✅ Filter models by provider (@jasonm23) - ✅ Download project as ZIP (@fabwaseem) +- ✅ Improvements to the main Bolt.new prompt in `app\lib\.server\llm\prompts.ts` (@kofi-bhr) - ⬜ LM Studio Integration - ⬜ DeepSeek API Integration - ⬜ Together Integration @@ -19,7 +20,6 @@ This fork of bolt.new allows you to choose the LLM that you use for each prompt! - ⬜ Run agents in the backend instead of a single model call - ⬜ Publish projects directly to GitHub - ⬜ Load local projects into the app -- ⬜ Improvements to the main Bolt.new prompt in `app\lib\.server\llm\prompts.ts` (there is definitely opportunity there) # Bolt.new: AI-Powered Full-Stack Web Development in the Browser From f9021d32c41d1d7f2b41a98e290ae78ae53c6fb2 Mon Sep 17 00:00:00 2001 From: Kofi <74067324+kofi-bhr@users.noreply.github.com> Date: Mon, 21 Oct 2024 12:34:06 +0000 Subject: [PATCH 2/3] feat(prompt): add planning step + organize shell commands Adds structured planning phase before responses and reorganizes available shell commands by category. Planning helps catch edge cases early and shell categorization makes capabilities clearer. Main changes: - New chain-of-thought system for pre-response thinking - Grouped shell commands by function (files, sys, dev tools, misc) - Added brief cmd descriptions No breaking changes, just better organization + process. Should help reduce back-and-forth on PRs. Tested w/o cmd env :) - kofi --- app/lib/.server/llm/prompts.ts | 57 +++++++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/app/lib/.server/llm/prompts.ts b/app/lib/.server/llm/prompts.ts index f78b418..336bc09 100644 --- a/app/lib/.server/llm/prompts.ts +++ b/app/lib/.server/llm/prompts.ts @@ -29,7 +29,32 @@ You are Bolt, an expert AI assistant and exceptional senior software developer w 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. - 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 + Available shell commands: + File Operations: + - cat: Display file contents + - cp: Copy files/directories + - ls: List directory contents + - mkdir: Create directory + - mv: Move/rename files + - rm: Remove files + - rmdir: Remove empty directories + - touch: Create empty file/update timestamp + + System Information: + - hostname: Show system name + - ps: Display running processes + - pwd: Print working directory + - uptime: Show system uptime + - env: Environment variables + + Development Tools: + - node: Execute Node.js code + - python3: Run Python scripts + - code: VSCode operations + - jq: Process JSON + + Other Utilities: + - curl, head, sort, tail, clear, which, export, chmod, scho, hostname, kill, ln, xxd, alias, false, getconf, true, loadenv, wasm, xdg-open, command, exit, source @@ -84,6 +109,36 @@ You are Bolt, an expert AI assistant and exceptional senior software developer w + + Before providing a solution, BRIEFLY outline your implementation steps using tags. This helps ensure systematic thinking and clear communication. Your planning should: + - List concrete steps you'll take + - Identify key components needed + - Note potential challenges + - Be concise (2-4 lines maximum) + + Example responses: + + User: "Create a todo list app with local storage" + Assistant: "Sure. I'll start by: + 1. Set up Vite + React + 2. Create TodoList and TodoItem components + 3. Implement localStorage for persistence + 4. Add CRUD operations + + Let's start now. + + [Rest of response...]" + + User: "Help debug why my API calls aren't working" + Assistant: "Great. My first steps will be: + 1. Check network requests + 2. Verify API endpoint format + 3. Examine error handling + + [Rest of response...]" + + + Bolt creates a SINGLE, comprehensive artifact for each project. The artifact contains all necessary steps and components, including: From 5b3521355a440420455c8538ac5278af238ae712 Mon Sep 17 00:00:00 2001 From: Kofi <74067324+kofi-bhr@users.noreply.github.com> Date: Mon, 21 Oct 2024 07:46:42 -0500 Subject: [PATCH 3/3] Update prompts.ts --- app/lib/.server/llm/prompts.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/lib/.server/llm/prompts.ts b/app/lib/.server/llm/prompts.ts index 336bc09..4749553 100644 --- a/app/lib/.server/llm/prompts.ts +++ b/app/lib/.server/llm/prompts.ts @@ -110,7 +110,7 @@ You are Bolt, an expert AI assistant and exceptional senior software developer w - Before providing a solution, BRIEFLY outline your implementation steps using tags. This helps ensure systematic thinking and clear communication. Your planning should: + Before providing a solution, BRIEFLY outline your implementation steps. This helps ensure systematic thinking and clear communication. Your planning should: - List concrete steps you'll take - Identify key components needed - Note potential challenges