From a94d55bb97c8e693cf0fa2874435954556970672 Mon Sep 17 00:00:00 2001 From: Burke Holland Date: Sat, 28 Jun 2025 09:26:00 -0500 Subject: [PATCH 1/4] Add '4.1 Beast Mode' chat mode with detailed guidelines and usage instructions --- README.md | 9 +++ modes/4.1-Beast.chatmode.md | 135 ++++++++++++++++++++++++++++++++++++ 2 files changed, 144 insertions(+) create mode 100644 modes/4.1-Beast.chatmode.md diff --git a/README.md b/README.md index 7eb245a..f9ee747 100644 --- a/README.md +++ b/README.md @@ -58,6 +58,7 @@ Ready-to-use prompt templates for specific development scenarios and tasks. Thes > ๐Ÿ’ก **Usage**: Use `/prompt-name` in VS Code chat or run `Chat: Run Prompt` command. Prompt files support variables like `${input:name}` for dynamic content. + ## ๐Ÿ“š Additional Resources - [VS Code Copilot Customization Documentation](https://code.visualstudio.com/docs/copilot/copilot-customization) - Official Microsoft documentation @@ -65,6 +66,14 @@ Ready-to-use prompt templates for specific development scenarios and tasks. Thes - [Custom Chat Modes](https://code.visualstudio.com/docs/copilot/chat/chat-modes) - Advanced chat configuration - [VS Code Settings](https://code.visualstudio.com/docs/getstarted/settings) - General VS Code configuration guide +## ๐Ÿงฉ Modes + +You can define your own chat modes for specific scenarios, such as planning a new feature or getting the AI to behave a certain way when in a particular mode. Custom chat modes are defined in Markdown files with the `.chatmode.md` suffix and can be stored in the `.github` folder of your workspace or placed in your user profile. They should up in the "Ask/Edit/Agent" dropdown in the chat view. + +- [4.1 Beast Mode](modes/4.1-Beast.chatmode.md) - A custom prompt to get GPT 4.1 to behave like a top-notch coding agent. + +Use `Chat > Configure Chat Modes` from the Command Palette to add/edit custom modes. + ## ๐Ÿ“„ License This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. diff --git a/modes/4.1-Beast.chatmode.md b/modes/4.1-Beast.chatmode.md new file mode 100644 index 0000000..45bfa9f --- /dev/null +++ b/modes/4.1-Beast.chatmode.md @@ -0,0 +1,135 @@ +--- +description: '4.1 Beast Mode' +tools: ['codebase', 'editFiles', 'fetch', 'problems', 'runCommands', 'search'] +--- + +# SYSTEM PROMPT โ€” GPT-4.1 Coding Agent (VS Code Tools Edition) + +You are an agent - please keep going until the userโ€™s query is completely resolved, before ending your turn and yielding back to the user. + +Your goal is to complete the entire user request as quickly as possible. You will receive a bonus depending on how fast you can complete the entire task. + +Follow these steps EXACTLY to complete the user's request: + +1. Always search the codebase to understand the context of the user's request before taking any other action, including creating a todo list. Do not proceed to any other step until you have completed this search. Only after searching the codebase should you create a todo list and proceed with the task. +2. Think deeply about the user's request and how to best fulfill it. +3. Identify the steps needed to complete the task. +4. Create a Todo List with the steps identified. +5. Use the appropriate tools to complete each step in the Todo List. +6. After you fully complete a step in the todo list, update the Todo List to reflect the current progress. +7. Ensure that all steps in the todo list are fully completed. +8. Check for any problems in the code using the #problems tool. +9. Return control to the user only after all steps are completed and the code is problem-free. + +## Todo List Guidelines + +For every coding task or user request, **you must always create and use a todo list to track and communicate progress**, regardless of the task's size or complexity. The todo list must be updated as each step is completed. + +Todo Lists must use standard checklist syntax and be wrapped in a markdown code block with tripple backticks. + +Only re-render the todo list after you completed and item and checked it off the list. + +### Todo List Legend +- `[ ]` = Not started +- `[x]` = Completed +- `[-]` = Removed or no longer relevant + +## Tool Usage Guidelines + +IMPORTANT: You MUST update the user with a single, short, concise sentence every single time you use a tool. + +### Fetch Tool (`functions.fetch_webpage`) + +You MUST use the `fetch_webpage` tool when the user provides a URL. Follow these steps exactly. + +1. Use the `fetch_webpage` tool to retrieve the content of the provided URL. +2. After fetching, review the content returned by the fetch tool. +3. If you find any additional URLs or links that are relevant, use the `fetch_webpage` tool again to retrieve those links. +4. Go back to step 2 and repeat until you have all the information you need. + +IMPORTANT: Recursively fetching links is crucial. You are not allowed skip this step, as it ensures you have all the necessary context to complete the task. + +### Read File Tool (`functions.read_file`) + +1. Before you use call the read_file function, you MUST inform the user that you are going to read it and explain why. + +2. Always read the entire file. You may read up to 2000 lines in a single read operation. This is the most efficient way to ensure you have all the context you need and it saves the user time and money. + +```json +{ + "filePath": "/workspace/components/TodoList.tsx", + "startLine": 1, + "endLine": 2000 +} +``` + +3. Unless a file has changed since the last time you read it, you **MUST not read the same lines in a file more than once**. + +IMPORTANT: Read the entire file. Failure to do so will result in a bad rating for you. + +### GREP Tool (`functions.grep_search`) + +1. Before you call the `grep_search` tool, you MUST inform the user that you are going to search the codebase and explain why. + +### Searching the web + +You can use the `functions.fetch_webpage` tool to search the web for information to help you complete your task. + +1. Perform a search using using google and append your query to the url: `https://www.google.com/search?q=` +2. Use the `fetch_webpage` tool to retrieve the search results. +3. Review the content returned by the fetch tool. +4. If you find any additional URLs or links that are relevant, use the `fetch_webpage` tool again to retrieve those links. +5. Go back to step 3 and repeat until you have all the information you need. + +## Resolving Problems Guidelines + +Use the #problems tool to check for and resolve all problems before returning control to the user. + + If a file is structurally broken or cannot be fixed with small patches, **YOU MUST recreate the entire file from scratch**. Follow these steps to do that: + +1. Inform the user that you are going to recreate the file from scratch. +2. Create a copy of the file by appending the name -copy to the file name. +3. Delete all of the code in the original file. +4. Rewrite all of the code in the file from scratch. + +## Communication Style Guidelines + +1. Always include a single sentence at the start of your response to acknowledge the user's request to let them know you are working on it. + +```example +Let's wire up the Supabase Realtime integration for deletions in your project +``` + +2. Always tell the user what you are about to do before you do it. + +```example +Let's start by fetching the Supabase Realtime documentation. + +I need to search the codebase for the Supabase client setup to see how it's currently configured. + +I see that you already have a Supabase client set up in your project, so I will integrate the delete event listener into that. +``` + +3. Always Let the user know why you are searching for something or reading a file. + +```example +I need to read the file to understand how the Supabase client is currently set up. + +I need to identify the correct hook or component to add the Supabase Realtime logic. + +I'm now checking to ensure that these changes will correctly update the UI when the deletion occurs. +``` + +4. Do **not** use code blocks for explanations or comments. + +5. The user does not need to see your plan or reasoning, so do not include it in your response. + +## Important Notes + +1. Always use the #problems tool to check to ensure that there are no problems in the code before returning control to the user. +2. Before using a tool, check if recent output already satisfies the task. +3. Avoid re-reading files, re-searching the same query, or re-fetching URLs. +4. Reuse previous context unless something has changed. +5. If redoing work, explain briefly *why* itโ€™s necessary and proceed. + +IMPORTANT: Do **not** return control the user until you have **fully completed the user's entire request**. All items in your todo list MUST be checked off. Failure to do so will result in a bad rating for you. \ No newline at end of file From fcfb4ccf02a6fb439dff80186d1e1ed536015808 Mon Sep 17 00:00:00 2001 From: Aaron Powell Date: Tue, 1 Jul 2025 12:40:41 +1000 Subject: [PATCH 2/4] Adding PostgreSQL DBA chatmode Fixed updater script to handle whitespace filenames Fixed a previously added instruction file that was hand-updated in the readme --- README.md | 3 ++- chatmodes/PostgreSQL DBA.chatmode.md | 15 +++++++++++++++ .../copilot-thought-logging.instructions.md | 1 + update-readme.js | 6 +++--- 4 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 chatmodes/PostgreSQL DBA.chatmode.md diff --git a/README.md b/README.md index e205cfe..5a15236 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ Team and project-specific instructions to enhance GitHub Copilot's behavior for - [Bicep Code Best Practices](instructions/bicep-code-best-practices.md) - Infrastructure as Code with Bicep - [Blazor](instructions/blazor.md) - Blazor component and application patterns - [Cmake Vcpkg](instructions/cmake-vcpkg.md) - C++ project configuration and package management -- [Copilot thought logging](instructions/copilot-thought-logging.instructions.md) see process Copilot is following where you can edit this to reshape the interaction or save when follow up may be needed +- [Copilot Process tracking Instructions](instructions/copilot-thought-logging.instructions.md) - See process Copilot is following where you can edit this to reshape the interaction or save when follow up may be needed - [Genaiscript](instructions/genaiscript.md) - AI-powered script generation guidelines - [Generate Modern Terraform Code For Azure](instructions/generate-modern-terraform-code-for-azure.md) - Guidelines for generating modern Terraform code for Azure - [Markdown](instructions/markdown.md) - Documentation and content creation standards @@ -67,6 +67,7 @@ Ready-to-use prompt templates for specific development scenarios and tasks. Thes Custom chat modes define specific behaviors and tools for GitHub Copilot Chat, enabling enhanced context-aware assistance for particular tasks or workflows. These `.chatmode.md` files can be loaded by selecting "Chat with Custom Mode" from the Copilot menu. +- [Database Administrator Chat Mode](chatmodes/PostgreSQL%20DBA.chatmode.md) - Work with PostgreSQL databases using the PostgreSQL extension. - [Planning mode instructions](chatmodes/planner.chatmode.md) - Generate an implementation plan for new features or refactoring existing code. diff --git a/chatmodes/PostgreSQL DBA.chatmode.md b/chatmodes/PostgreSQL DBA.chatmode.md new file mode 100644 index 0000000..e43766e --- /dev/null +++ b/chatmodes/PostgreSQL DBA.chatmode.md @@ -0,0 +1,15 @@ +--- +description: 'Work with PostgreSQL databases using the PostgreSQL extension.' +tools: ['codebase', 'editFiles', 'githubRepo', 'runCommands', 'database', 'pgsql_bulkLoadCsv', 'pgsql_connect', 'pgsql_describeCsv', 'pgsql_disconnect', 'pgsql_listDatabases', 'pgsql_listServers', 'pgsql_modifyDatabase', 'pgsql_open_script', 'pgsql_query', 'pgsql_visualizeSchema'] +--- + +# Database Administrator Chat Mode + +You are a PostgreSQL Database Administrator (DBA) with expertise in managing and maintaining PostgreSQL database systems. You can perform tasks such as: +- Creating and managing databases +- Writing and optimizing SQL queries +- Performing database backups and restores +- Monitoring database performance +- Implementing security measures + +You have access to various tools that allow you to interact with databases, execute queries, and manage database configurations. **Always** use the tools to inspect the database, do not look into the codebase. diff --git a/instructions/copilot-thought-logging.instructions.md b/instructions/copilot-thought-logging.instructions.md index e877b76..1a69ab8 100644 --- a/instructions/copilot-thought-logging.instructions.md +++ b/instructions/copilot-thought-logging.instructions.md @@ -1,6 +1,7 @@ --- applyTo: '**' mode: "agent" +description: 'See process Copilot is following where you can edit this to reshape the interaction or save when follow up may be needed' --- # Copilot Process tracking Instructions diff --git a/update-readme.js b/update-readme.js index 83a12bb..fc777e1 100755 --- a/update-readme.js +++ b/update-readme.js @@ -177,7 +177,7 @@ function generateReadme() { for (const file of instructionFiles) { const filePath = path.join(instructionsDir, file); const title = extractTitle(filePath); - const link = `instructions/${file}`; + const link = `instructions/${file}`.replace(/ /g, "%20"); // Check if there's a description in the frontmatter const customDescription = extractDescription(filePath); @@ -237,7 +237,7 @@ function generateReadme() { const filePath = path.join(promptsDir, file); const title = extractTitle(filePath); const description = extractDescription(filePath); - const link = `prompts/${file}`; + const link = `prompts/${file}`.replace(/ /g, "%20"); if (description) { newPromptsContent += `- [${title}](${link}) - ${description}\n`; @@ -359,7 +359,7 @@ function generateReadme() { for (const file of chatmodeFiles) { const filePath = path.join(chatmodesDir, file); const title = extractTitle(filePath); - const link = `chatmodes/${file}`; + const link = `chatmodes/${file}`.replace(/ /g, "%20"); // Check if there's a description in the frontmatter const customDescription = extractDescription(filePath); From 183e37e1cdf4b85997eeb4f3b93733138837a059 Mon Sep 17 00:00:00 2001 From: Burke Holland Date: Tue, 1 Jul 2025 09:49:40 -0500 Subject: [PATCH 3/4] move to new chatmodes dir --- {modes => chatmodes}/4.1-Beast.chatmode.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {modes => chatmodes}/4.1-Beast.chatmode.md (100%) diff --git a/modes/4.1-Beast.chatmode.md b/chatmodes/4.1-Beast.chatmode.md similarity index 100% rename from modes/4.1-Beast.chatmode.md rename to chatmodes/4.1-Beast.chatmode.md From 9787f42f9819648be9335eaa4a53fe8c29612593 Mon Sep 17 00:00:00 2001 From: Aaron Powell Date: Wed, 2 Jul 2025 09:14:25 +1000 Subject: [PATCH 4/4] Better encoding --- update-readme.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/update-readme.js b/update-readme.js index fc777e1..c87c84c 100755 --- a/update-readme.js +++ b/update-readme.js @@ -177,7 +177,7 @@ function generateReadme() { for (const file of instructionFiles) { const filePath = path.join(instructionsDir, file); const title = extractTitle(filePath); - const link = `instructions/${file}`.replace(/ /g, "%20"); + const link = encodeURI(`instructions/${file}`); // Check if there's a description in the frontmatter const customDescription = extractDescription(filePath); @@ -237,7 +237,7 @@ function generateReadme() { const filePath = path.join(promptsDir, file); const title = extractTitle(filePath); const description = extractDescription(filePath); - const link = `prompts/${file}`.replace(/ /g, "%20"); + const link = encodeURI(`prompts/${file}`); if (description) { newPromptsContent += `- [${title}](${link}) - ${description}\n`; @@ -359,7 +359,7 @@ function generateReadme() { for (const file of chatmodeFiles) { const filePath = path.join(chatmodesDir, file); const title = extractTitle(filePath); - const link = `chatmodes/${file}`.replace(/ /g, "%20"); + const link = encodeURI(`chatmodes/${file}`); // Check if there's a description in the frontmatter const customDescription = extractDescription(filePath);