- Read through
REPO-ROOT/.github/copilot-instructions.mdbefore performing any work.copilot-instructions.mdis the guideline you should follow.- MUST READ
Coding Guidelines and Toolsbefore touching the source code. - MUST READ
Leveraging the Knowledge Baseand find the knowledge you may need before making any decision.
- Read through
REPO-ROOT/Project.mdbefore performing any work. - When
job:*is mentioned, it means eitherREPO-ROOT/.github/Jobs/job.*.prompt.mdorREPO-ROOT/.github/Jobs/job.Windows.*.prompt.md. - Python scripts are strong recommended not to commit, we prefer powershell/bash/javascript.
- Absolute paths are forbidden in any documents:
- Referencing to any file outside of the
KnowledgeBasefolder should starts with<XXX repo>/.... <any-repo>/.githubdocuments are all copied fromTools/Copilot, make sure any path storing on these documents will not confuse readers working with any other repos.
- Referencing to any file outside of the
- When commit and/or push are required, you should always commit and push once finishing a request, no matter whatever is pending or not. Github repos and clones are more for the backup purpose, there is no strong requirement of completeness of tasks before committing.
- Computer Use:
- You are most of the time running in a locked session, or a remote desktop session when the host machine is locked. Deny of computer use is very common, this should not become a reason to avoid any request.
- For any GacUI app, the first choise is always automation service, then UI Automation, then general computer use, checkout
REPO-ROOT/.github/Guidelines/Running-GacUI.mdfor details. - For any CLI app, the first choise is always starting it in an interactive CLI session, checkout
REPO-ROOT/.github/Guidelines/Running-CLI.mdfor details. - For any TUI app, when interacting with OS terminal host is not doable due to computer use failure, you can still start it in an interactive CLI session, checkout
REPO-ROOT/.github/Guidelines/Running-CLI.mdfor details. - For OS native dialog, for Windows try UIA first, checkout
REPO-ROOT/.github/Guidelines/Running-ComputerUse.mdfor details.
- Interpret the request (in the latest chat message, not including conversation history) following the steps:
Read the first phrase of the request, and read an additional instruction file if it is:
- "ask": REPO-ROOT/.github/prompts/ask.prompt.md
- "investigate": REPO-ROOT/.github/prompts/investigate.prompt.md
- "review": REPO-ROOT/.github/prompts/review.prompt.md
- "refine": REPO-ROOT/.github/prompts/refine.prompt.md
- "kb": REPO-ROOT/.github/prompts/kb.prompt.md
- "kb refine": REPO-ROOT/.github/prompts/kb-refine.prompt.md
The following rules apply when the first phrase is not in the list:
- If the request looks like a research or question, treat the request as if it begins with "ask".
- If the request looks like a coding work, treat the request as if it begins with "investigate repro".
- If the request looks like other non-coding work, just execute the request directly. Such works usually include but not limit to:
- Planning.
- Document refining.
- Daily maintenance.
- Script fixing, especially for build/CI.
- Only applies when the first phrase is:
- "investigate"
- "kb"
- Read the next word if it exists, convert it to a title
# THE-WORD.
- Keep the remaining as is.
- Special treatment only for
investigate repro:- If the remaining is just tagging a file, replace the tagging with the content of the file.
- If the remaining is empty, use the content of
REPO-ROOT/TODO_TASK.md.
- Special treatment only for
review:- If the remaining is empty, tag
REPO-ROOT/TODO_TASK.md.
- If the remaining is empty, tag
- Special treatment only for
- Treat the processed request as "the LATEST chat message" in the additional instruction file.
- Follow the additional instruction file and start working immediately, there will be no more input.
If the whole request has almost no new lines or punctuation, it means I am typing the text by voice, which would introduce a huge amount of typos, you need to carefully consider possible words with similar pronunciation.
When the request is refine, follow refine.prompt.md and "the LATEST chat message" becomes empty.
When the request is kb execute, follow kb.prompt.md and "the LATEST chat message" becomes
# Execute
When the request is review, follow review.prompt.md and "the LATEST chat message" becomes
<tagging REPO-ROOT/TODO_TASK.md>
Special treatment applied
When the request is investigate repro <tagging REPO-ROOT/TODO_ANOTHER_TASK.md>, follow investigate.prompt.md and "the LATEST chat message" becomes
# Repro
<CONTENT OF REPO-ROOT/TODO_ANOTHER_TASK.md>
Special treatment applied
When the request is investigate repro this issue, follow investigate.prompt.md and "the LATEST chat message" becomes
# Repro
this issue
When the request is do this and do that, because the first phrase is not in the list, follow investigate.prompt.md; "the LATEST chat message" becomes
# Repro
do this and do that