From fb2be271cc2dcb9869b3cfe7b5fc853e89b9c353 Mon Sep 17 00:00:00 2001 From: Justin Yoo Date: Wed, 2 Jul 2025 13:04:09 +0900 Subject: [PATCH 01/10] Add custom instruction for localisation --- instructions/localization.md | 39 ++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 instructions/localization.md diff --git a/instructions/localization.md b/instructions/localization.md new file mode 100644 index 0000000..0fbac95 --- /dev/null +++ b/instructions/localization.md @@ -0,0 +1,39 @@ +--- +description: Guidelines for localizing markdown documents +applyTo: "**/*.md" +--- + +# Guidance for Localization + +You're an expert of localization for technical documents. Follow the instruction to localize documents. + +## Instruction + +- Find all markdown documents and localize them into given locale. +- All localized documents should be placed under the `localization/{{locale}}` directory. +- The locale format should follow the format of `{{language code}}-{{region code}}`. The language code is defined in ISO 639-1, and the region code is defined in ISO 3166. Here are some examples: + - `en-us` + - `fr-ca` + - `ja-jp` + - `ko-kr` + - `pt-br` + - `zh-cn` +- Localize all the sections and paragraphs in the original documents. +- DO NOT miss any sections nor any paragraphs while localizing. +- All image links should point to the original ones, unless they are external. +- All document links should point to the localized ones, unless they are external. +- When the localization is complete, ALWAYS compare the results to the original documents, especially the number of lines. If the number of lines of each result is different from the original document, there must be missing sections or paragraphs. Review line-by-line and update it. + +## Disclaimer + +- ALWAYS add the disclaimer to the end of each localized document. +- Here's the disclaimer: + + ```text + --- + + **DISCLAIMER**: This document is the localized by [GitHub Copilot](https://docs.github.com/copilot/about-github-copilot/what-is-github-copilot). Therefore, it may contain mistakes. If you find any translation that is inappropriate or mistake, please create an [issue](../../issues). + ``` + +- The disclaimer should also be localized. +- Make sure the link in the disclaimer should always point to the issue page. From 340636d13e88ce4b5124622210353ab56173d627 Mon Sep 17 00:00:00 2001 From: ambilykk Date: Wed, 2 Jul 2025 10:36:02 +0530 Subject: [PATCH 02/10] Add 'Refine Requirement or Issue' chat mode to enhance issue analysis and detail enrichment --- README.md | 1 + chatmodes/refine-issue.chatmode.md | 34 ++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 chatmodes/refine-issue.chatmode.md diff --git a/README.md b/README.md index 59584ae..4972d90 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,7 @@ Custom chat modes define specific behaviors and tools for GitHub Copilot Chat, e - [4.1 Beast Mode](chatmodes/4.1-Beast.chatmode.md) - A custom prompt to get GPT 4.1 to behave like a top-notch coding agent. - [Database Administrator Chat Mode](chatmodes/PostgreSQL%20DBA.chatmode.md) - Work with PostgreSQL databases using the PostgreSQL extension. - [Planning mode instructions](chatmodes/planner.chatmode.md) - Generate an implementation plan for new features or refactoring existing code. +- [Refine Requirement or Issue Chat Mode](chatmodes/refine-issue.chatmode.md) - Analyze and enrich existing issues with structured details. > 💡 **Usage**: Create new chat modes using the command `Chat: Configure Chat Modes...`, then switch your chat mode in the Chat input from _Agent_ or _Ask_ to your own mode. diff --git a/chatmodes/refine-issue.chatmode.md b/chatmodes/refine-issue.chatmode.md new file mode 100644 index 0000000..ad3b103 --- /dev/null +++ b/chatmodes/refine-issue.chatmode.md @@ -0,0 +1,34 @@ +--- +description: 'Refine the requirment or issue with Acceptance Criteria, Technical Considerations, Edge Cases, and NFRs' +tools: [ 'list_issues','githubRepo', 'search', 'add_issue_comment','create_issue','create_issue_comment','update_issue','delete_issue','get_issue', 'search_issues'] +--- + +# Refine Requirement or Issue Chat Mode + +When activated, this mode allows GitHub Copilot to analyze an existing issue and enrich it with structured details including: + +- Detailed description with context and background +- Acceptance criteria in a testable format +- Technical considerations and dependencies +- Potential edge cases and risks +- Expected NFR (Non-Functional Requirements) + +## Steps to Run +1. Read the issue description and understand the context. +2. Modify the issue description to include more details. +3. Add acceptance criteria in a testable format. +4. Include technical considerations and dependencies. +5. Add potential edge cases and risks. +6. Provide suggestions for effort estimation. +7. Review the refined requirement and make any necessary adjustments. + +## Usage + +To activate Requirement Refinement mode: + +1. Refer an existing issue in your prompt as `refine ` +2. Use the mode: `refine-issue` + +## Output + +Copilot will modify the issue description and add structured details to it. From f077b5b15da77ee24fc9feef81b371cda614fa94 Mon Sep 17 00:00:00 2001 From: Aaron Powell Date: Wed, 2 Jul 2025 17:58:13 +1000 Subject: [PATCH 03/10] Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- chatmodes/refine-issue.chatmode.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chatmodes/refine-issue.chatmode.md b/chatmodes/refine-issue.chatmode.md index ad3b103..71f5124 100644 --- a/chatmodes/refine-issue.chatmode.md +++ b/chatmodes/refine-issue.chatmode.md @@ -1,5 +1,5 @@ --- -description: 'Refine the requirment or issue with Acceptance Criteria, Technical Considerations, Edge Cases, and NFRs' +description: 'Refine the requirement or issue with Acceptance Criteria, Technical Considerations, Edge Cases, and NFRs' tools: [ 'list_issues','githubRepo', 'search', 'add_issue_comment','create_issue','create_issue_comment','update_issue','delete_issue','get_issue', 'search_issues'] --- From 0844c87740b0e48f8eb06fb60cf6ed971eefcccb Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Wed, 2 Jul 2025 03:36:53 -0700 Subject: [PATCH 04/10] Update genaiscript.md Pointing to online llms.txt source. --- instructions/genaiscript.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/instructions/genaiscript.md b/instructions/genaiscript.md index adc96ab..7a14eeb 100644 --- a/instructions/genaiscript.md +++ b/instructions/genaiscript.md @@ -10,8 +10,7 @@ or answer questions about GenAIScript. ## Reference -- [GenAIScript docs](../../.genaiscript/docs/llms-full.txt) -- [GenAIScript ambient type definitions](../../.genaiscript/genaiscript.d.ts) +- [GenAIScript llms.txt](https://microsoft.github.io/genaiscript/llms.txt) ## Guidance for Code Generation @@ -19,4 +18,4 @@ or answer questions about GenAIScript. - you prefer using APIs from GenAIScript 'genaiscript.d.ts' rather node.js. Avoid node.js imports. - you keep the code simple, avoid exception handlers or error checking. - you add TODOs where you are unsure so that the user can review them -- you use the global types in genaiscript.d.ts are already loaded in the global context, no need to import them. \ No newline at end of file +- you use the global types in genaiscript.d.ts are already loaded in the global context, no need to import them. From 9b202e88d521f179dac97176eb0cfb9bf3b5dc3b Mon Sep 17 00:00:00 2001 From: Aaron Powell Date: Wed, 2 Jul 2025 20:39:00 +1000 Subject: [PATCH 05/10] C# member documentatino prompt --- prompts/csharp-docs.prompt.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 prompts/csharp-docs.prompt.md diff --git a/prompts/csharp-docs.prompt.md b/prompts/csharp-docs.prompt.md new file mode 100644 index 0000000..6f82916 --- /dev/null +++ b/prompts/csharp-docs.prompt.md @@ -0,0 +1,23 @@ +--- +mode: "agent" +tools: ["changes", "codebase", "editFiles", "problems"] +description: "Ensure that C# types are documented with XML comments and follow best practices for documentation." +--- + +# C# Documentation Best Practices + +- Public members should be documented with XML comments. +- It is encouraged to document internal members as well, especially if they are complex or not self-explanatory. +- Use `` for method descriptions. This should be a brief overview of what the method does. +- Use `` for method parameters. +- Use `` for method return values. +- Use `` for additional information, which can include implementation details, usage notes, or any other relevant context. +- Use `` for usage examples on how to use the the member. +- Use `` to document exceptions thrown by methods. +- Use `` and `` for references to other types or members. +- Use `` to inherit documentation from base classes or interfaces. + - Unless there is major behavior change, in which case you should document the differences. +- Use `` for type parameters in generic types or methods. +- Use `` to reference type parameters in documentation. +- Use `` for inline code snippets. +- Use `` for code blocks. From eddac3934f017ed37568f434c6ca4c9facd205bb Mon Sep 17 00:00:00 2001 From: Aaron Powell Date: Wed, 2 Jul 2025 20:40:25 +1000 Subject: [PATCH 06/10] Updating readme --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 3b7ac47..7aafecc 100644 --- a/README.md +++ b/README.md @@ -60,12 +60,11 @@ Ready-to-use prompt templates for specific development scenarios and tasks, defi - [Generate Specs as Issues](prompts/gen-specs-as-issues.prompt.md) - Convert requirements into GitHub issues - [My Issues](prompts/my-issues.prompt.md) - [My Pull Requests](prompts/my-pull-requests.prompt.md) +- [C# Documentation Best Practices](prompts/csharp-docs.prompt.md) - Ensure that C# types are documented with XML comments and follow best practices for documentation. ### FinOps - [Azure Cost Optimize](prompts/az-cost-optimize.prompt.md) - Analyze Azure resources used in the app (IaC files and/or resources in a target rg) and optimize costs - creating GitHub issues for identified optimizations. - - > 💡 **Usage**: Use `/prompt-name` in VS Code chat, run `Chat: Run Prompt` command, or hit the run button while you have a prompt open. ## 🧩 Custom Chat Modes From e30b801289139663a651b2865cd53e6be5d9d8ca Mon Sep 17 00:00:00 2001 From: Aaron Powell Date: Wed, 2 Jul 2025 20:40:53 +1000 Subject: [PATCH 07/10] fixing grammar --- prompts/csharp-docs.prompt.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prompts/csharp-docs.prompt.md b/prompts/csharp-docs.prompt.md index 6f82916..39b672a 100644 --- a/prompts/csharp-docs.prompt.md +++ b/prompts/csharp-docs.prompt.md @@ -12,7 +12,7 @@ description: "Ensure that C# types are documented with XML comments and follow b - Use `` for method parameters. - Use `` for method return values. - Use `` for additional information, which can include implementation details, usage notes, or any other relevant context. -- Use `` for usage examples on how to use the the member. +- Use `` for usage examples on how to use the member. - Use `` to document exceptions thrown by methods. - Use `` and `` for references to other types or members. - Use `` to inherit documentation from base classes or interfaces. From d793144695ab655339160ea39a5a609de1693c15 Mon Sep 17 00:00:00 2001 From: Aaron Powell Date: Wed, 2 Jul 2025 20:46:26 +1000 Subject: [PATCH 08/10] Handling workflow runs from external contributors --- .github/workflows/validate-readme.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/validate-readme.yml b/.github/workflows/validate-readme.yml index e469a65..94e8db0 100644 --- a/.github/workflows/validate-readme.yml +++ b/.github/workflows/validate-readme.yml @@ -43,8 +43,17 @@ jobs: echo "EOF" >> $GITHUB_OUTPUT fi + - name: Output diff to logs for non-write users + if: steps.check-diff.outputs.status == 'failure' && github.event.pull_request.head.repo.permissions.push != true + run: | + echo "::group::README.md diff (changes needed)" + echo "The following changes need to be made to README.md:" + echo "" + git diff README.md + echo "::endgroup::" + - name: Comment on PR if README.md needs updating - if: steps.check-diff.outputs.status == 'failure' + if: steps.check-diff.outputs.status == 'failure' && github.event.pull_request.head.repo.permissions.push == true uses: marocchino/sticky-pull-request-comment@v2 with: header: readme-validation From 2d1f10280c7ca7031df255c5b093a08d4e987702 Mon Sep 17 00:00:00 2001 From: Aaron Powell Date: Wed, 2 Jul 2025 22:55:30 +1000 Subject: [PATCH 09/10] README update --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 7aafecc..ec76a3c 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,7 @@ Team and project-specific instructions to enhance GitHub Copilot's behavior for - [Dotnet Maui](instructions/dotnet-maui.md) - MAUI component and application patterns - [Genaiscript](instructions/genaiscript.md) - AI-powered script generation guidelines - [Generate Modern Terraform Code For Azure](instructions/generate-modern-terraform-code-for-azure.md) - Guidelines for generating modern Terraform code for Azure +- [Guidance for Localization](instructions/localization.md) - Guidelines for localizing markdown documents - [Markdown](instructions/markdown.md) - Documentation and content creation standards - [Next.js + Tailwind Development Instructions](instructions/nextjs-tailwind.md) - Next.js + Tailwind development standards and instructions - [Python Coding Conventions](instructions/python.md) - Python coding conventions and guidelines From ef097542b4cd8b0709ca7b7389b21f8c86c1b449 Mon Sep 17 00:00:00 2001 From: Aaron Powell Date: Wed, 2 Jul 2025 22:56:53 +1000 Subject: [PATCH 10/10] README update --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4972d90..2a9b5f5 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ Custom chat modes define specific behaviors and tools for GitHub Copilot Chat, e - [4.1 Beast Mode](chatmodes/4.1-Beast.chatmode.md) - A custom prompt to get GPT 4.1 to behave like a top-notch coding agent. - [Database Administrator Chat Mode](chatmodes/PostgreSQL%20DBA.chatmode.md) - Work with PostgreSQL databases using the PostgreSQL extension. - [Planning mode instructions](chatmodes/planner.chatmode.md) - Generate an implementation plan for new features or refactoring existing code. -- [Refine Requirement or Issue Chat Mode](chatmodes/refine-issue.chatmode.md) - Analyze and enrich existing issues with structured details. +- [Refine Requirement or Issue Chat Mode](chatmodes/refine-issue.chatmode.md) - Refine the requirement or issue with Acceptance Criteria, Technical Considerations, Edge Cases, and NFRs > 💡 **Usage**: Create new chat modes using the command `Chat: Configure Chat Modes...`, then switch your chat mode in the Chat input from _Agent_ or _Ask_ to your own mode.