From 7c956a1575604e90f633e3853dbd27ab2010be38 Mon Sep 17 00:00:00 2001 From: "Leilei Zhang (from Dev Box)" Date: Fri, 30 Oct 2026 12:04:06 +0800 Subject: [PATCH 1/2] Add pull request template and writing skill Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .github/PULL_REQUEST_TEMPLATE.md | 70 ++++++++++++++++++++++++++++++ .github/copilot-instructions.md | 6 +++ .github/skills/pr-writing/SKILL.md | 65 +++++++++++++++++++++++++++ 3 files changed, 141 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/skills/pr-writing/SKILL.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..a5ce96e6 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,70 @@ +## Summary + + + +## Reproduction or usage + + + +**Prerequisites:** + +... + +**Steps or example:** + +1. ... +2. ... + +**Before:** + +... + +**After:** + +... + +## Validation + + + +## Compatibility and risks + + diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 83baa5ab..59beaa4c 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -14,6 +14,12 @@ Classic COM and flat Win32 have separate JavaScript/TypeScript projections and runtime subpaths. Flat Win32 uses its own native ABI, resource, and contract model; see [the Win32 architecture](../docs/architecture/flat-win32-contracts.md). +## Pull request writing + +When preparing, writing, or revising a PR title or body, follow +[`pr-writing`](skills/pr-writing/SKILL.md) and use the +[PR template](PULL_REQUEST_TEMPLATE.md) for the body structure. + ## Build & Test Commands ```bash diff --git a/.github/skills/pr-writing/SKILL.md b/.github/skills/pr-writing/SKILL.md new file mode 100644 index 00000000..a9cd85cc --- /dev/null +++ b/.github/skills/pr-writing/SKILL.md @@ -0,0 +1,65 @@ +--- +name: pr-writing +description: Use when preparing, writing, or revising a pull request title or body in dynwinrt. +--- + +# Pull request writing + +Use the repository's [PR template](../../PULL_REQUEST_TEMPLATE.md) as the +single source of truth for the body structure. Read it each time; do not +substitute a remembered template. This skill governs PR writing, not code +review, CI operation, merging, or release. + +## Before writing + +1. Read the actual diff against the intended PR base, including pending changes + that will be part of the PR. For an existing PR, also read its current title + and body. Do not summarize only commit subjects or session history. +2. Identify whether the change fixes a bug, adds a feature, changes documentation, + or is internal-only. For mixed changes, cover each relevant behavior without + repeating shared context. +3. Check the relevant code, documentation, issue, and validation evidence. + Distinguish observed behavior from expectations and unverified claims. + Never invent a root cause, reproduction, or successful check. +4. Write a concise title naming the change or outcome, rather than a work log. + +## Fill the template + +Keep all of the template's section headings in their original order. Replace +placeholders with meaningful content; adapt the subordinate labels to the change +type and explain non-applicable items rather than inventing an example. + +- In the summary, explain what changes for users or contributors and why. + For a bug, include the supported root cause and the key fix; if the cause + remains uncertain, state that explicitly. For a feature, explain its purpose + and implementation approach. Include only implementation details that aid + review, not a file-by-file change list. Link a relevant issue if one exists. +- Make a bug reproducible: separate necessary prerequisites from exact steps or + runnable code, then describe the behavior before and after the fix. Give a + feature's minimal usage example and expected result. For documentation or + internal-only changes without a runnable example, explain why it does not + apply; do not invent one or silently omit the section. +- Report focused validation as what was exercised and what was observed. Refer + back to the reproduction instead of copying it. Include relevant edge cases or + manual checks when they add evidence, and explain any necessary check not run. + Do not include CI status, workflow/job names, test counts, coverage statistics, + full logs, or a chronological command list. A minimal reproduction command + and its result are useful evidence, not an execution diary. +- Explain compatibility impact, upgrade actions, limitations, and unverified + behavior only when they matter to this change. Write "None" when there are + none. Do not list unrelated subsystems or internal session coordination. + Mention dependencies only when they affect review or merge order; omit + irrelevant base hashes and independence statements. Keep versions or revision + identifiers when they are actually needed to reproduce the behavior. + +## Before submitting or updating + +Run the proportionate checks required by the repository; keeping CI reporting +out of the body does not remove the obligation to validate the change. Keep raw +logs and coordination evidence outside the PR description. + +Reread the title and body against the diff and template. Confirm the sections +are complete and ordered, the reproduction or non-applicability explanation is +usable, claims match the evidence, and placeholders, repetition, and work-log +details are gone. When updating an existing PR, preserve still-relevant content +and make sure the description reflects the current change. From cda6a099bae765e08dfd4fadee1feaa228a2a2f4 Mon Sep 17 00:00:00 2001 From: "Leilei Zhang (from Dev Box)" Date: Fri, 30 Oct 2026 12:24:35 +0800 Subject: [PATCH 2/2] Select PR sections by change type Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .github/PULL_REQUEST_TEMPLATE.md | 64 ++++++++++++++-------- .github/skills/pr-writing/SKILL.md | 86 +++++++++++++++++------------- 2 files changed, 90 insertions(+), 60 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index a5ce96e6..40322049 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,3 +1,15 @@ + + ## Summary -## Reproduction or usage +## Reproduction **Prerequisites:** ... -**Steps or example:** +**Steps:** 1. ... 2. ... -**Before:** +**Actual behavior:** ... -**After:** +**After the fix:** ... -## Validation +## Usage + +... + +## Validation + + @@ -59,11 +79,9 @@ statistics, full logs, or a chronological list of commands. ## Compatibility and risks