Update prompt

This commit is contained in:
vczh
2026-02-19 04:50:04 -08:00
parent 48bbc69219
commit bb624af606
6 changed files with 58 additions and 32 deletions

View File

@@ -32,3 +32,4 @@ cd SOLUTION-ROOT
- "Build succeeded." - "Build succeeded."
- "0 Warning(s)" - "0 Warning(s)"
- "0 Error(s)" - "0 Error(s)"
- DO NOT delete the log file by yourself unless explicitly required.

View File

@@ -54,3 +54,4 @@ Ignore `LocalDebuggerCommandArgumentsHistory` in `*.vcxproj.user`.
- When all test cases pass, the last several lines of `Execute.log` should be in the following pattern; otherwise it crashed at the last shown test case: - When all test cases pass, the last several lines of `Execute.log` should be in the following pattern; otherwise it crashed at the last shown test case:
- "Passed test files: X/X" - "Passed test files: X/X"
- "Passed test cases: Y/Y" - "Passed test cases: Y/Y"
- DO NOT delete the log file by yourself unless explicitly required.

View File

@@ -7,7 +7,7 @@ Remove-Item -Path $logFile, $logFileUnfinished -Force -ErrorAction SilentlyConti
# Find the solution folder by looking for *.sln files # Find the solution folder by looking for *.sln files
$solutionFolder = GetSolutionDir $solutionFolder = GetSolutionDir
$solutionFile = "$solutionFolder\$((Get-ChildItem -Path $solutionFolder -Filter "*.sln" -ErrorAction SilentlyContinue)[0])" $solutionFile = "$solutionFolder\$((Get-ChildItem -Path $solutionFolder -Filter "*.sln" -ErrorAction SilentlyContinue)[0].Name)"
$vsdevcmd = $env:VLPP_VSDEVCMD_PATH $vsdevcmd = $env:VLPP_VSDEVCMD_PATH
if ($vsdevcmd -eq $null) { if ($vsdevcmd -eq $null) {

View File

@@ -0,0 +1,12 @@
# Prepare Copilot review files
$taskLogsDir = "$PSScriptRoot\..\TaskLogs"
# Delete all Copilot_Review_Finished_*.md files
Remove-Item -Path "$taskLogsDir\Copilot_Review_Finished_*.md" -Force -ErrorAction SilentlyContinue
# Rename all Copilot_Review_Writing_*.md files to Copilot_Review_Finished_*.md
Get-ChildItem -Path "$taskLogsDir\Copilot_Review_Writing_*.md" -ErrorAction SilentlyContinue | ForEach-Object {
$newName = $_.Name -replace '^Copilot_Review_Writing_', 'Copilot_Review_Finished_'
Rename-Item -Path $_.FullName -NewName $newName
}

View File

@@ -81,6 +81,7 @@ If you need to find any document for the current working task, they are in the `
If you need to find any script or log files, they are in the `REPO-ROOT/.github/Scripts` folder: If you need to find any script or log files, they are in the `REPO-ROOT/.github/Scripts` folder:
- `copilotPrepare.ps1` - `copilotPrepare.ps1`
- `copilotPrepareReview.ps1`
- `copilotBuild.ps1` - `copilotBuild.ps1`
- `copilotExecute.ps1` - `copilotExecute.ps1`
- `copilotDebug_Start.ps1` - `copilotDebug_Start.ps1`

View File

@@ -6,22 +6,28 @@
## Goal and Constraints ## Goal and Constraints
- Your goal is to review a document as one member of a 4-model review panel. - Your goal is to review a document as one member of a review panel.
- The `KnowledgeBase` and `Learning` folders mentioned in this document are in `REPO-ROOT/.github/`. - The `KnowledgeBase` and `Learning` folders mentioned in this document are in `REPO-ROOT/.github/`.
- The mentioned `Copilot_Review.md` and `Copilot_Review_*_*.md` files are in `REPO-ROOT/.github/TaskLogs/`. - The mentioned `Copilot_Review.md` and `Copilot_Review_*_*.md` files are in `REPO-ROOT/.github/TaskLogs/`.
- Each model writes its review to a separate file. - Each model writes its review to a separate file.
- When you are asked to create a `Copilot_Review_*_*.md`, You are only allowed to create your own review file. - When you are asked to create a `Copilot_Review_*_*.md`, You are only allowed to create your own review file.
- Each round of review should consider knowledges from the knowledge base. - Document review should consider knowledges from the knowledge base.
- Each round of review should consider learnings from `KnowledgeBase/Learning.md`, `KnowledgeBase/Learning.md`, `Learning/Learning_Coding.md`, and `Learning/Learning_Testing.md` if they exist. - Document review should consider learnings from `KnowledgeBase/Learning.md`, `KnowledgeBase/Learning.md`, `Learning/Learning_Coding.md`, and `Learning/Learning_Testing.md` if they exist.
## Identify Yourself ## Identify the Review Board Team
- You are one of the 4 models in the review panel. Identify yourself: - In the LATEST chat message there should be a section called `## Reviewer Board Files`.
- If you are GPT, your file name fragment is `GPT`. - Model and their file name fragment is bullet-listed in this format:
- If you are Claude (Opus), your file name fragment is `Opus`. - `{ModelName} -> Copilot_Review_{Finished|Writing}_{FileNameFragment}.md`.
- If you are Grok, your file name fragment is `Grok`. - If you cannot find this section, stops immediately.
- If you are Gemini, your file name fragment is `Gemini`.
- Use your file name fragment in all file operations below. ## Copilot_Review_*_*.md Structure
- `# Review Target: {TargetDocumentName}`
- `## Opinion`: Your opinion to the target document.
- `## Replies`
- `### AGREE with {ModelName}` without content.
- `### DISAGREE with {ModelName}`: your opinion to other models' opinion or replying to you in the PREVIOUS ROUND.
## Step 1. Identify the Target Document to Review ## Step 1. Identify the Target Document to Review
@@ -29,44 +35,44 @@
- `# Scrum`: review `Copilot_Scrum.md`, begins from `# TASKS` until the end, focus only on unfinished tasks (those marked `- [ ]` instead of `- [*]`). - `# Scrum`: review `Copilot_Scrum.md`, begins from `# TASKS` until the end, focus only on unfinished tasks (those marked `- [ ]` instead of `- [*]`).
- `# Design`: review `Copilot_Task.md`, begins from `# INSIGHTS AND REASONING` until the end. - `# Design`: review `Copilot_Task.md`, begins from `# INSIGHTS AND REASONING` until the end.
- `# Plan`: review `Copilot_Planning.md`, begins from `# EXECUTION PLAN` until the end. - `# Plan`: review `Copilot_Planning.md`, begins from `# EXECUTION PLAN` until the end.
- `# Execution`: review `Copilot_Execution.md`, begins from `# EXECUTION PLAN` until the end. - `# Summary`: review `Copilot_Execution.md`, begins from `# EXECUTION PLAN` until the end.
- `# Final`: skip all remaining steps and go to the `Final Review` section. - `# Final`: skip all remaining steps and go to the `Final Review` section.
- `# Apply`: skip all remaining steps and go to the `Apply Review` section. - `# Apply`: skip all remaining steps and go to the `Apply Review` section.
- If there is nothing: it means you are accidentally stopped. Please continue your work. - If there is nothing: it means you are accidentally stopped. Please continue your work.
## Step 2. Determine the Current Round Index ## Step 2. Identify Documents from the Review Board
- Look for your own `Copilot_Review_PREVIOUSINDEX_{YourFileNameFragment}.md` file. - You are one of the models in the review board. `YourFileNameFragment` is your own file name fragment in all file operations below.
- If it exists, the current round index is biggest `PREVIOUSINDEX` + 1. - All reviews from the PREVIOUS ROUND should be `Copilot_Review_Finished_{FileNameFragment}.md`.
- If none exists, the current round index is `1`. - You are going to write `Copilot_Review_Writing_{FileNameFragment}.md` in the CURRENT ROUND.
- If the current round index is greater that 1, here are a list of review files from the previous round:
- `Copilot_Review_PREVIOUSINDEX_GPT.md`
- `Copilot_Review_PREVIOUSINDEX_Opus.md`
- `Copilot_Review_PREVIOUSINDEX_Grok.md`
- `Copilot_Review_PREVIOUSINDEX_Gemini.md`
## Step 3. Read Context ## Step 3. Read Context
- Read the target document identified in Step 1. - Read the target document identified in Step 1.
- For `Copilot_Scrum.md`, focus only on unfinished tasks. - For `Copilot_Scrum.md`, focus only on unfinished tasks.
- If the current round index is greater than `1`, read all review files from the previous round to collect other models' opinions. - Read all `Reviewer Board Files` except yours from the PREVIOUS ROUND to collect other models' opinions:
- If you can't find a file from the previous model, you need to disagree with that model and explain that you cannot find their review file.
- Their opinion of the review. - Their opinion of the review.
- Their replies to you. - Their replies to you.
## Step 4. Write Your Review ## Step 4. Write Your Review
- Create file: `Copilot_Review_{RoundIndex}_{YourFileNameFragment}.md` - Create a new file: `Copilot_Review_Writing_{FileNameFragment}.md`
- If this file already exists, it means you have already completed the review, stops.
- You need to consolidate all information from Step 3. - You need to consolidate all information from Step 3.
- Find what inspires you, what you agree with, and what you disagree with. - Find what inspires you, what you agree with, and what you disagree with.
- Complete the document following the format: - Complete the document following the format:
- `# Review Target: {TargetDocumentName}`: the name of the document you are reviewing. - `# Review Target: {TargetDocumentName}`: the name of the document you are reviewing.
- `## Opinion`: - `## Opinion`:
- Your complete summarized feedback and suggestions for the target document. - Your complete summarized feedback and suggestions for the target document.
- You should not omit anything what is in any documents in the previous round, this is what complete means. - You should not omit anything what is in any documents in the PREVIOUS ROUND, this is what "complete" means.
- `## Replies`: this section exists only when the current round index is greater than `1`. - `## Replies`:
- Find `## Opinion` in every `Copilot_Review_{RoundIndex-1}_{ModelName}.md` except yours. - In every `Copilot_Review_Finished_{FileNameFragment}.md` except yours.
- Find `## Opinion`.
- Find `## Replies` to you.
- If you totally agree with a model, add this section: `### AGREE with {ModelName}` with no content. If you have anything to add, put them in your own `## Opinion`. - If you totally agree with a model, add this section: `### AGREE with {ModelName}` with no content. If you have anything to add, put them in your own `## Opinion`.
- If you partially or totally disagree with a model, add this section: `### DISAGREE with {ModelName}` and explain why you disagree and what you think is correct. - If you partially or totally disagree with a model, add this section: `### DISAGREE with {ModelName}` and explain why you disagree and what you think is correct.
- If the file does not exist, add this section: `### DISAGREE with {ModelName}` and explain that you cannot find their review file.
- The following sections are about what you need to pay attention to when reviewing the target document. - The following sections are about what you need to pay attention to when reviewing the target document.
- After finishing the review document, stops. - After finishing the review document, stops.
@@ -132,17 +138,22 @@ Ignore this section if there is no `# Final` in the LATEST chat message.
### Step F1. Verify Convergence ### Step F1. Verify Convergence
- Find the latest round of review files. - Find and execute `copilotPrepareReview.ps1`, it will do the following things:
- Check that in the latest round, every models agree with each other. - Delete all `Copilot_Review_Finished_{FileNameFragment}.md` files.
- If any reply is not agree, report that the review has not converged and stop. - Rename all `Copilot_Review_Writing_{FileNameFragment}.md` files to `Copilot_Review_Finished_{FileNameFragment}.md`.
- Collect all new `Copilot_Review_Finished_{FileNameFragment}.md` files as `Review Board Files`.
- Ensure all conditions below are satisfied, otherwise report the problem and stop:
- `Review Board Files` has files from all models in the review board.
- `Review Board Files` all have the same target document.
- `Review Board Files` have no disagreement in their `## Replies` section.
### Step F2. Identify the Target Document ### Step F2. Identify the Target Document
- Identify all review files from the last round. Read their `# Review Target`, they should be the same. - Identify all `Review Board Files`. Read their `# Review Target`, they should be the same.
### Step F3. Create the Summary ### Step F3. Create the Summary
- Read the `## Opinion` section from each review file from the last round. - Read the `## Opinion` section from all `Review Board Files`.
- Consolidate all options into a single review opinion. - Consolidate all options into a single review opinion.
- Write the review opinion to `Copilot_Review.md` as a cohesive set of actionable feedback. - Write the review opinion to `Copilot_Review.md` as a cohesive set of actionable feedback.
- The only title in this file should be `# Review Target: {TargetDocumentName}`. - The only title in this file should be `# Review Target: {TargetDocumentName}`.
@@ -162,7 +173,7 @@ Ignore this section if there is no `# Apply` in the LATEST chat message.
- For `Copilot_Scrum.md`, follow `REPO-ROOT/.github/prompts/0-scrum.prompt.md`. - For `Copilot_Scrum.md`, follow `REPO-ROOT/.github/prompts/0-scrum.prompt.md`.
- For `Copilot_Task.md`, follow `REPO-ROOT/.github/prompts/1-design.prompt.md`. - For `Copilot_Task.md`, follow `REPO-ROOT/.github/prompts/1-design.prompt.md`.
- For `Copilot_Planning.md`, follow `REPO-ROOT/.github/prompts/2-planning.prompt.md`. - For `Copilot_Planning.md`, follow `REPO-ROOT/.github/prompts/2-planning.prompt.md`.
- For `Copilot_Execution.md`, follow `REPO-ROOT/.github/prompts/4-execution.prompt.md`. - For `Copilot_Execution.md`, follow `REPO-ROOT/.github/prompts/3-summarizing.prompt.md`.
### Step A2. Apply the Review ### Step A2. Apply the Review