Skip to content

Commit c6137bf

Browse files
authored
Clean up #new Instructions (#386)
1 parent 3ad0fee commit c6137bf

File tree

1 file changed

+79
-61
lines changed

1 file changed

+79
-61
lines changed

src/extension/tools/node/newWorkspace/newWorkspaceTool.tsx

Lines changed: 79 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,6 @@ export class NewWorkspaceCreationResult extends PromptElement<NewWorkspaceElemen
141141
}
142142

143143
const useContext7 = this.configurationService.getConfig(ConfigKey.NewWorkspaceUseContext7);
144-
const context7ToolInstructions = useContext7
145-
? "Use get-library-docs and resolve-library-id to search documentation and identify the correct library for scaffolding the project"
146-
: "If applicable, call project setup tool with:\n\t\t- projectType: e.g. 'python-script', 'mcp-server', 'next-js'\n\t\t- language: e.g. 'python', 'typescript'";
147144
return <>
148145
<TextChunk>
149146
The user has opened the workspace folder {this.promptPathRepresentationService.getFilePath(workspaceUri)}<br />
@@ -152,73 +149,81 @@ export class NewWorkspaceCreationResult extends PromptElement<NewWorkspaceElemen
152149
- If the user has requested a VS Code extension: Add a note at the top to use {ToolName.VSCodeAPI} tool<br />
153150
- If the user has requested an MCP server: Add a link at the top to https://modelcontextprotocol.io/llms-full.txt<br />
154151
- Include this comment at the top of the file {`<!-- Use this file to provide workspace-specific custom instructions to Copilot. For more details, visit https://code.visualstudio.com/docs/copilot/copilot-customization#_use-a-githubcopilotinstructionsmd-file -->`}<br />
155-
- Include the below markdown content in the file including the comments <br />
152+
- Copy the entire markdown content below including all tasks and their comments exactly as shown<br />
153+
- If vscode_manageTodoList tool is available, use it to manage this checklist throughout the process<br />
154+
- After completing each step, mark it as done and update your progress (use vscode_manageTodoList if available)<br />
156155
</TextChunk>
157156
<UnsafeCodeBlock code={`
158-
- [ ] Clarify Project Requirements (If Not Provided)**
159-
- If the user hasn't already specified, ask:
160-
- What is the goal or type of the project? (e.g. CLI tool, web app, VS Code extension)
161-
- What language should be used? (e.g. Python, TypeScript)
162-
- Any specific frameworks/technologies? (e.g. Flask, React, Next.js, Vite)
163-
- Use this to guide project setup
164-
- If already provided, skip this step
165-
166-
- [ ] Scaffold the Project**
167-
${context7ToolInstructions}
168-
- Run the scaffolding command from setup info
169-
- Use '.' as the working directory
170-
- Fall back to default scaffolding if needed
171-
172-
- [ ] Customize the project
173-
- Develop a plan to modify the codebase according to the user's requirements. Ignore this step for a "Hello World" project.
174-
- Apply the modifications in the plan to the codebase using the right tools and user-provided references below.
175-
176-
- [ ] Install required VS Code extensions using the extension installer tool (if \`requiredExtensions\` is defined)
177-
178-
- [ ] Compile the project
179-
- Install any missing dependencies.
180-
- Run diagnostics and resolve any issues.
181-
- Check for markdown files in the project folder that may contain relevant instructions to help with this step.
182-
183-
- [ ] Create and run a task based on project structure and metadata using the right tool
184-
<!-- Create a task based on the package.json, README.md, and project structure and pass that as input to the tool. -->
185-
186-
- [ ] Launch the project (prompt user for debug mode, launch only if confirmed)
187-
188-
- [ ] Ensure README.md exists and is up to date
189-
190-
## Execution Guidelines
191-
- After completing each step, check it off and add a one-line summary
192-
- Avoid verbose explanations or printing full command outputs
193-
- If a step is skipped, state that briefly (e.g. "No extensions needed")
194-
- Use '.' as the working directory unless user specifies otherwise
195-
- Do not explain project structure unless asked
196-
- Do not create folders unless user instructs
197-
- Avoid adding media or external links unless explicitly requested
198-
- Use placeholders only with a note that they should be replaced
199-
- Use VS Code API tool only for VS Code extension projects
200-
- Completion = project scaffolded, copilot-instructions + README exist, task runnable, debug launch offered
157+
- [ ] Clarify Project Requirements
158+
<!-- Ask for project type, language, and frameworks if not specified. Skip if already provided. -->
159+
160+
- [ ] Scaffold the Project
161+
<!--
162+
${useContext7 ? 'MANDATORY Context7 Usage: Call mcp_context7_resolve-library-id with your project requirements, then call mcp_context7_get-library-docs to get scaffolding instructions. Review the Context7 documentation carefully and use it to scaffold the project.' : 'Call project setup tool with projectType and language parameters.'}
163+
Run scaffolding command to create project files and folders.
164+
Use '.' as the working directory.
165+
-->
166+
167+
- [ ] Customize the Project
168+
<!--
169+
Develop a plan to modify codebase according to user requirements.
170+
Apply modifications using appropriate tools and user-provided references.
171+
Skip this step for "Hello World" projects.
172+
-->
173+
174+
- [ ] Install Required Extensions
175+
<!-- Use extension installer tool if requiredExtensions is defined in project setup. -->
176+
177+
- [ ] Compile the Project
178+
<!--
179+
Install any missing dependencies.
180+
Run diagnostics and resolve any issues.
181+
Check for markdown files in project folder for relevant instructions on how to do this.
182+
-->
183+
184+
- [ ] Create and Run Task
185+
<!-- Create task based on package.json, README.md, and project structure. -->
186+
187+
- [ ] Launch the Project
188+
<!-- Prompt user for debug mode, launch only if confirmed. -->
189+
190+
- [ ] Ensure Documentation is Complete
191+
<!-- Verify README.md exists and is up to date. -->
201192
202193
<!--
203-
# Rules
194+
## Execution Guidelines
195+
PROGRESS TRACKING:
196+
- If vscode_manageTodoList tool is available, use it to track progress through this checklist.
197+
- After completing each step, mark it complete and add a summary.
198+
- Read current todo list status before starting each new step.
199+
200+
COMMUNICATION RULES:
201+
- Avoid verbose explanations or printing full command outputs.
202+
- If a step is skipped, state that briefly (e.g. "No extensions needed").
203+
- Do not explain project structure unless asked.
204+
- Keep explanations concise and focused.
205+
206+
DEVELOPMENT RULES:
204207
- Always start executing the plan by calling the tool to get the project template.
205-
- Before executing, provide the user with a high-level plan outlining the steps and the command that you will use to create the project. Do not list unnecessary details—keep it concise and actionable.
206-
- Help the user execute this plan by calling the appropriate tools.
208+
- Use '.' as the working directory unless user specifies otherwise.
209+
- Do not create folders unless user instructs.
210+
- Avoid adding media or external links unless explicitly requested.
211+
- Use placeholders only with a note that they should be replaced.
212+
- Use VS Code API tool only for VS Code extension projects.
207213
- Once the project is created, it is already opened in Visual Studio Code—do not suggest commands to open this project in Visual Studio again.
208214
- Do not print and explain the project structure to the user unless explicitly requested.
209215
- If the project setup information has additional rules, follow them strictly.
210-
- Follow the rules below strictly.
211216
212-
## Folder Creation Rules
217+
FOLDER CREATION RULES:
213218
- Always use the current directory as the project root.
214219
- If you are running any terminal commands, use the '.' argument to ensure that the current working directory is used ALWAYS.
215220
- Do not create a new folder unless the user explicitly requests it besides a .vscode folder for a tasks.json file.
216221
- If any of the scaffolding commands mention that the folder name is not correct, let the user know to create a new folder with the correct name and then reopen it again in vscode. Do not attempt to move it yourself. And do not proceed with next steps.
217222
218-
## Extension Installation Rules
219-
- If the project setup lists \`requiredExtensions\`, use extension installer tool to check and install ALL the listed \`requiredExtensions\` before proceeding.
223+
EXTENSION INSTALLATION RULES:
224+
- If the project setup lists requiredExtensions, use extension installer tool to check and install ALL the listed requiredExtensions before proceeding.
220225
221-
## Project Content Rules
226+
PROJECT CONTENT RULES:
222227
- If the user has not specified project details, assume they want a "Hello World" project as a starting point.
223228
- Avoid adding links of any type (URLs, files, folders, etc.) or integrations that are not explicitly required.
224229
- Avoid generating images, videos, or any other media files unless explicitly requested.
@@ -227,22 +232,35 @@ export class NewWorkspaceCreationResult extends PromptElement<NewWorkspaceElemen
227232
- If a feature is assumed but not confirmed, prompt the user for clarification before including it.
228233
- If you are working on a VS Code extension, use the VS Code API tool with a query to find relevant VS Code API references and samples related to that query.
229234
230-
## Task Completion Rules
235+
TASK COMPLETION RULES:
231236
- Your task is complete when:
232237
- The project is successfully created without errors.
233238
- The user has clear instructions on how to launch their code in debug mode within Visual Studio Code.
234-
- A \`copilot-instructions.md\` exists in the project root under the \`.github\` directory.
239+
- A copilot-instructions.md exists in the project root under the .github directory.
235240
- A README.md file in the root of the project is up to date.
236-
- A \`tasks.json\` file exists in the project root under the \`.vscode\` directory.
237-
-->
241+
- A tasks.json file exists in the project root under the .vscode directory.
242+
243+
SUCCESS CRITERIA:
244+
- Completion = project scaffolded, copilot-instructions + README exist, task runnable, debug launch offered.
238245
239246
Before starting a new task in the above plan, update progress in the plan.
247+
-->
248+
- Work through each checklist item systematically.
249+
- Keep communication concise and focused.
250+
- Follow development best practices.
240251
`} languageId='markdown'></UnsafeCodeBlock>
241252
<TextChunk>
242253
<br />
243254
Step 2: Execute the Plan<br />
244-
After creating the .github/copilot-instructions.md file with the above content, continue with executing each step of the plan systematically.<br />
245-
Update the .github/copilot-instructions.md with progress as you exectue the plan<br />
255+
After creating the .github/copilot-instructions.md file, systematically work through each item.<br />
256+
If vscode_manageTodoList tool is available, use it to read status, mark items complete, and track progress.<br />
257+
Update the .github/copilot-instructions.md file directly as you complete each step.<br />
258+
<br />
259+
Step 3: Finalize Instructions<br />
260+
Once all tasks are complete, update the .github/copilot-instructions.md file:<br />
261+
- Remove all HTML comments from the completed tasks<br />
262+
- Replace the comments with a brief description of the project structure and key files<br />
263+
- Add any project-specific instructions or conventions that future developers should know<br />
246264
<br />
247265
If the user asks to "continue," refer to the previous steps and proceed accordingly.
248266
</TextChunk>

0 commit comments

Comments
 (0)