mirror of
https://github.com/vczh-libraries/Release.git
synced 2026-03-23 15:52:56 +08:00
6.1 KiB
6.1 KiB
Summarizing
- Check out
Accessing Task DocumentsandAccessing Script FilesinREPO-ROOT/.github/copilot-instructions.mdfor context about mentioned*.mdand*.ps1files. - All
*.mdand*.ps1files should exist; you should not create any new files unless explicitly instructed.- The
Copilot_Planning.mdfile should already exist. - If you cannot find the file, you are looking at a wrong folder.
Copilot_Execution.mdshould be put in the same folder.
- The
- Following
Leveraging the Knowledge BaseinREPO-ROOT/.github/copilot-instructions.md, find knowledge and documents for this project inREPO-ROOT/.github/KnowledgeBase/Index.md.
Goal and Constraints
- Your goal is to finish an execution document in
Copilot_Execution.mdaccording toCopilot_Task.mdandCopilot_Planning.md. - You are only allowed to update
Copilot_Execution.md. - You are not allowed to modify any other files.
- The phrasing of the request may look like asking for code change, but your actual work is to write the execution document.
Copilot_Execution.md Structure
# !!!EXECUTION!!!: This file always begins with this title.# UPDATES: For multiple## UPDATEsections. It should always exist even there is no update.## UPDATE: There could be multiple occurrences. Each one has an exact copy of the update description I gave you.
# AFFECTED PROJECTS.# EXECUTION PLAN.# FIXING ATTEMPTS.
Step 1. Identify the Problem
- The design document is in
Copilot_Task.md, the planning document is inCopilot_Planning.md. - Find
# Problemor# Updatein the LATEST chat message.- Ignore any of these titles in the chat history.
- If there is nothing:
- If there is a
# !!!FINISHED!!!mark inCopilot_Execution.md, it means you are accidentally stopped while changing the source code. Please continue your work. - If there is no
# !!!FINISHED!!!mark inCopilot_Execution.md, it means you are accidentally stopped while finishing the document. Please continue your work.
- If there is a
Create new Document (only when "# Problem" appears in the LATEST chat message)
Ignore this section if there is no "# Problem" in the LATEST chat message I am starting a fresh new request.
- Add an empty
# UPDATESsection after# !!!EXECUTION!!!. - You are going to complete an execution document according to
Copilot_Planning.md.
Update current Document (only when "# Update" appears in the LATEST chat message)
Ignore this section if there is no "# Update" in the LATEST chat message
I am going to propose some change to Copilot_Execution.md.
- Copy precisely my problem description in
# Updatefrom the LATEST chat message to the# UPDATESsection, with a new sub-section## UPDATE. - The new
## UPDATEshould be appended to the end of the existing# UPDATESsection (aka before# AFFECTED PROJECTS).- NOTICE: When the update is triggered by the automatic review process (aka
review.prompt.md), do not insert such## UPDATE.
- NOTICE: When the update is triggered by the automatic review process (aka
- Follow my update to change the execution document.
Step 2. Finish the Document
- You need to summarize code change in
Copilot_Execution.md. - All changes you need to make are already in
Copilot_Planning.md, but it contains many explanations. - Read
Copilot_Planning.md, copy the following parts toCopilot_Execution.md:# EXECUTION PLAN- Copy EVERY code block exactly as written
- If Planning has 1000 lines of test code, Execution must have those same 1000 lines
- Remove only the explanatory text between code blocks
- Keep ALL actual code
- DO NOT copy
# UPDATESfromCopilot_Planning.mdtoCopilot_Execution.md. The# UPDATESinCopilot_Execution.mdis for update requests forCopilot_Execution.mdand the actual source code. - In each code change, ensure the context information is complete:
- Which file to edit?
- Insert/Delete/Update which part of the file? Is it better to define "which part" by line number or surrounding code?
- The code block to be written to the file.
- In
Copilot_Planning.md, the code block might be incomplete or containing above metadata, do not updateCopilot_Planning.mdbut instead fix them inCopilot_Execution.mdfollowing the rule:- Each code block only contain consecutive code to be written to the file.
- If the original code block contains metadata, do not include it.
- If the original code block contains code change in multiple places or even multiple files, split it.
- If the original code block omits surrounding code that is necessary to understand the change, expand it to complete.
Step 3. Document Quality Check List
- Is
Copilot_Execution.mdcontains enough information so that one can follow the document to make actual code change, without having to refer toCopilot_Planning.md? - Does
Copilot_Execution.mdinclude all code changes mentioned inCopilot_Planning.md?
Step 3.1. Fill the "# AFFECTED PROJECTS" section
- Solutions and projects you need to work on could be found in
REPO-ROOT/Project.md. - When creating
Copilot_Execution.mdfrom the first time, copy# AFFECTED PROJECTSsection fromCopilot_Planning.md. - When updating
Copilot_Execution.md, carefully review# AFFECTED PROJECTSand fix this section if necessary.- According to what you need to change, selectively fill this section using bullet-list, each item could be one of the following:
- Build the solution in folder <SOLUTION-ROOT>.- When the configuration is important, also specify the configuration, e.g.,
Debug|x64.
- When the configuration is important, also specify the configuration, e.g.,
- Run CLI|UnitTest project <PROJECT-NAME>.- When the configuration is important, also specify the configuration, e.g.,
Debug|x64.
- When the configuration is important, also specify the configuration, e.g.,
- If a project could be skipped conditionally, write down what should trigger the running, usually it should be a list of files or projects. But you can describe it in a high level instead of listing all files.
- If a project should always run, use
Always Runinstead of justRun.
- The bullet-list will be executed in its order in the future.
- According to what you need to change, selectively fill this section using bullet-list, each item could be one of the following:
Step 4. Completion
- Ensure there is a
# !!!FINISHED!!!mark at the end ofCopilot_Execution.mdto indicate the document reaches the end.