Enforce gerund-avoidance and reason-first sentence structure in Copilot writing style rules#52964
Enforce gerund-avoidance and reason-first sentence structure in Copilot writing style rules#52964
Conversation
…instructions Agent-Logs-Url: https://github.com/dotnet/docs/sessions/dbe68978-a6ca-42b2-8366-8ca454cb71e0 Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the repository’s Copilot/agent instruction set to enforce two documentation-writing style rules: avoiding actor-obscuring “-ing” constructions (for example, “When you work with…”) and preferring reason-first sentences (for example, “For better performance, …”).
Changes:
- Adds a gerund/“-ing” avoidance rule to the shared Markdown writing-style instructions.
- Adds a new “Writing Style” section to
.github/copilot-instructions.mddescribing both rules with examples. - Extends
docseditorandbreakingchangeagents with mandatory scan rules/examples for both patterns.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| .github/instructions/Markdown.WritingStyle.instructions.md | Adds “avoid actor-obscuring -ing phrases” and “reason-first” requirements to the general Markdown style rules. |
| .github/copilot-instructions.md | Introduces a dedicated Writing Style section documenting the two rules and examples. |
| .github/agents/docseditor.agent.md | Adds mandatory scan/convert blocks for -ing constructions and for moving purpose/reason clauses to the front. |
| .github/agents/breakingchange.agent.md | Adds both rules to the breaking-change agent’s global writing guidance. |
| - ❌ "Cache the instance for better performance" → ✅ "For better performance, cache the instance" | ||
| - ❌ "Use HTTPS to improve security" → ✅ "To improve security, use HTTPS" | ||
| - ❌ "Install the package to enable the feature" → ✅ "To enable the feature, install the package" | ||
| - Look for ANY sentence that ends with a purpose or reason clause starting with "to", "for", or "so that", move it to the beginning, and add a comma after it |
Copilot
AI
Apr 10, 2026
•
There was a problem hiding this comment.
The instruction to move ANY trailing purpose/reason clause starting with "to", "for", or "so that" to the beginning is over-broad and can change meaning or produce incorrect rewrites (for example, many trailing "for " phrases are arguments/constraints, not purposes). Narrow this to clearly-identifiable purpose clauses (typically "to …" / "so that …"), and explicitly require preserving technical meaning when rewriting.
| - Look for ANY sentence that ends with a purpose or reason clause starting with "to", "for", or "so that", move it to the beginning, and add a comma after it | |
| - When a sentence ends with a clearly identifiable purpose clause, usually a "to ..." or "so that ..." clause, move that clause to the beginning and add a comma after it | |
| - Preserve the original technical meaning exactly; if moving the clause would change, narrow, or overstate the meaning, leave the sentence as written |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Adds two mandatory style rules to all Copilot instruction files so generated and edited documentation is clearer and more scannable.
Rules added
"When working with..."→"When you work with...""Cache the instance for better performance"→"For better performance, cache the instance"Files updated
Markdown.WritingStyle.instructions.md— Gerund-avoidance added toNEVER uselist; reason-first added to Headings and Content rulescopilot-instructions.md— New## Writing Stylesection with both rules and examplesdocseditor.agent.md— Gerund-conversion scan block added to Section 1 (VOICE AND TENSE); reason-first scan block added to Section 4 (SENTENCE STRUCTURE), with instruction to add a comma after the moved clausebreakingchange.agent.md— Both rules added to the general instructions listOriginal prompt
Update Copilot Instructions to Enforce Better Writing Style
Update all Copilot instructions, agents, and skills to require that Copilot itself uses these two principles when it creates or edits documentation and performs code reviews:
Copilot should avoid -ing words (gerunds) where possible in the content it generates - They lack clarity about who performs the action
Copilot should put the reason at the beginning of sentences in the content it generates - Not at the end
Context
This is about the writing style we want Copilot to use when it:
These are style rules that Copilot should apply to the content it produces, not necessarily how the instruction files themselves are written.
Files to Update
Update the following files to add these requirements to the style guidelines:
.github/copilot-instructions.md.github/agents/breakingchange.agent.md.github/agents/docseditor.agent.md.github/instructions/Markdown.WritingStyle.instructions.md.github/skills/redirect-article/SKILL.md(if it contains writing style guidance).github/skills/sort-redirects/SKILL.md(if it contains writing style guidance)Where to Add These Rules
In copilot-instructions.md
Add a new section or enhance existing sections about writing style to include:
In docseditor.agent.md
This file has extensive MANDATORY TRANSFORMATIONS sections. Add new rules to:
Example additions:
"SCAN FOR AND CONVERT gerund phrases to clearer constructions:"
"ALWAYS lead with reasons and purposes:"
In Markdown.WritingStyle.instructions.md
Under "## Voice and Tone Requirements" or "## Structure and Format Rules", add:
In agents/breakingchange.agent.md
If there are writing style requirements, add these two principles.
In skills files
Only add these rules if the skill files contain writing style guidance for generated content.
Goal
Make these two writing style principles part of the mandatory guidelines that Copilot must follow when it generates or edits documentation in this repository.
The following is the prior conversation context from the user's chat exploration (may be truncated):
User: Please update the Copilot instructions/agents/skills to avoid the use of -ing words where possible (it lacks clarity about who is doing the thing). For example, use "When you work with LLMs..." instead of "When working with LLMs...".
Also, the reason to take an action should be at the beginning of the sentence, not the end. For example, "For better performance, cache and reuse the instance" instead of "Cache and reuse the tokenizer for better performance".
Assistant: Now I'll create a PR to update these files to avoid -ing words and put reasons at the beginning of sentences.
Assistant: I'm waiting for your response to continue with creating the pull request that will update the Copilot instructions to avoid gerunds and lead with reasons.
User: @copilot Accepted Confirmation: Confirm agent session
Assistant: I've started working on updating the Copilot instructions to improve clarity by avoiding gerunds and leading with reasons. You can track the progress below:
The changes will:
This pull request was created from Copilot chat.
Internal previews