mirror of
https://github.com/vczh-libraries/Release.git
synced 2026-03-23 07:42:52 +08:00
5.4 KiB
5.4 KiB
Execution
- 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_Execution.mdfile should already exist. - If you cannot find the file, you are looking at a wrong 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
- You are going to apply changes to the source code following
Copilot_Execution.md.
Copilot_Execution.md Structure
# !!!EXECUTION!!!: This file always begins with this title.# UPDATES:## 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 execution document is in
Copilot_Execution.md - Find
# Updatein the LATEST chat message.- Ignore any of these titles in the chat history.
Execute the Plan (only when no title appears in the LATEST chat message)
Ignore this section if there is any title in the LATEST chat message I am starting a fresh new request.
- Apply all code changes in
Copilot_Execution.mdto the source code.- Make sure indentation and line breaks are applied correctly, following the same style in the target file.
- After applying each step in
Copilot_Execution.md, mark the step as completed by appending[DONE]after the step title. This allows you to find where you are if you are interrupted.
Update the Source Code and 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 the source code.
- Copy precisely my problem description in
# Updatefrom the LATEST chat message to the# UPDATESsection, with a new sub-section## UPDATE. - Follow my update to change the source code.
- Update the document to keep it consistent with the source code.
Step 2. Make Sure the Code Compiles
- Check out
External Tools Environment and ContextinREPO-ROOT/.github/copilot-instructions.mdfor accessing scripts for building.- Strictly follow the instruction above as this repo does not use ordinary tools.
- Each attempt of build-fix process should be executed in a sub agent.
- One build-fix process includes one attempt with the following instructions.
- The main agent should call different sub agent for each build-fix process.
- Do not build and retrieve build results in the main agent.
Use a sub agent to run all following instructions (Build the Solution, Fix Compile Errors, Code Generation, Finishing Code Change)
Build the Solution
- Check out
# AFFECTED PROJECTSinCopilot_Execution.mdto find out what solutions you need to build. - Find out if there is any warning or error.
External Tools Environment and ContextinREPO-ROOT/.github/copilot-instructions.mdhas the instruction about how to check compile result.
Fix Compile Errors
- If there is any compilation error, address all of them:
- If there is any compile warning, only fix warnings that caused by your code change. Do not fix any other warnings.
- If there is any compile error, you need to carefully identify, is the issue in the callee side or the caller side. Check out similar code before making a decision.
- For every attempt of fixing the source code:
- Explain why the original change did not work.
- Explain what you need to do.
- Explain why you think it would solve the build break.
- Log these in
Copilot_Execution.md, with section## Fixing attempt No.<attempt_number>in# FIXING ATTEMPTS.
Code Generation
- Check out
## Projects for VerificationinREPO-ROOT/Project.md. - Check out
# AFFECTED PROJECTSinCopilot_Execution.md. - Find out if any code generation is necessary.
- If there is no need to run any code generation, you can skip this step.
- Otherwise, pay attention to:
- What configuration is needed to build the solution.
- What project should be executed, and what configuration is needed.
- It is possible that a project needs to be executed multiple times in different configuration.
- It is possible that building is required between two runs of code generation projects.
- The building and future code generation project execution should be handled by the next sub agent.
- If a unit test project is also a code generation project, execute it accordingly.
- If a unit test project is not a code generation project, DO NOT execute it. Pure unit test projects will be executed in the future.
Finishing Code Change
- Exit the current sub agent and tell the main agent to go back to
Step 2. Make Sure the Code Compiles.- If there is any unfinished work according to
Code Generation, make sure to tell the main agent about them.
- If there is any unfinished work according to
Step 4. Verify Coding Style
- Code changes in
Copilot_Execution.mdmay not have correct indentation and coding style.- Go over each code change and ensure:
- Indentation is correct and consistent with the surrounding code.
- Coding style especially line breaks follows the same conventions as the surrounding code.
- Go over each code change and ensure:
- Ensure any empty line does not contain spaces or tabs.