|
| 1 | +--- |
| 2 | +name: F# Release Announcement |
| 3 | +description: Craft F# release announcements for .NET preview/release milestones by tracing SDK→VMR→dotnet/fsharp commit ranges, analyzing release notes, PRs, and issues, then producing a markdown article. |
| 4 | +--- |
| 5 | + |
| 6 | +# 0. Resolve SDK branch names |
| 7 | + |
| 8 | +User provides only a target release name (e.g., ".NET 11 Preview 2"). Derive everything else. |
| 9 | + |
| 10 | +```bash |
| 11 | +# List all release branches in dotnet/sdk |
| 12 | +gh api repos/dotnet/sdk/branches --paginate -q '.[].name' | grep '^release/' | sort -V |
| 13 | +``` |
| 14 | + |
| 15 | +Branch naming pattern: `release/<major>.0.<band>xx-preview<N>` or `release/<major>.0.<band>xx` |
| 16 | + |
| 17 | +From the listing, identify: |
| 18 | +1. **Target branch**: match release name to branch (e.g., ".NET 11 Preview 2" → `release/11.0.1xx-preview2`) |
| 19 | +2. **Previous branch**: prior preview or prior milestone (e.g., preview1 for preview2, or last stable for preview1) |
| 20 | +3. **Parallel stable branch**: highest `<major-1>.0.Xxx` branch (for exclusivity check) |
| 21 | + |
| 22 | +# 1. Fetch previous announcement — DO NOT REPEAT |
| 23 | + |
| 24 | +``` |
| 25 | +gh api repos/dotnet/core/contents/release-notes -q '.[].name' |
| 26 | +``` |
| 27 | + |
| 28 | +Navigate to latest published `fsharp.md` under `release-notes/<major>/preview/*/`. Fetch it. Every item in it is excluded from output. |
| 29 | + |
| 30 | +# 2. Resolve F# commit range |
| 31 | + |
| 32 | +**CRITICAL**: Use SDK, not VMR branch. VMR branch may have newer F# than what SDK locked in. |
| 33 | + |
| 34 | +### Get F# end commit (target release) |
| 35 | + |
| 36 | +``` |
| 37 | +# 1. SDK → VMR hash (find the Dependency for Microsoft.FSharp.Compiler, extract its Sha) |
| 38 | +gh api repos/dotnet/sdk/contents/eng/Version.Details.xml?ref=release/11.0.1xx-preview2 | jq -r '.content' | base64 -d | grep -A2 'Microsoft.FSharp.Compiler' | grep Sha | sed 's/.*>\([a-f0-9]*\)<.*/\1/' |
| 39 | +# Result: VMR_HASH |
| 40 | +
|
| 41 | +# 2. VMR → F# hash |
| 42 | +gh api repos/dotnet/dotnet/contents/src/source-manifest.json?ref=VMR_HASH | jq -r '.content' | base64 -d | jq -r '.repositories[] | select(.path=="fsharp") | .commitSha' |
| 43 | +# Result: FSHARP_END |
| 44 | +``` |
| 45 | + |
| 46 | +### Get F# start commit (previous release) |
| 47 | + |
| 48 | +Repeat above with previous SDK branch (e.g., `release/11.0.1xx-preview1`). |
| 49 | +Result: `FSHARP_START` |
| 50 | + |
| 51 | +### Cross-check with parallel SDK branch |
| 52 | + |
| 53 | +Repeat for `release/10.0.3xx` (or current stable band). Compare F# hash. Determine if features are shared or exclusive. |
| 54 | + |
| 55 | +# 3. Diff release notes |
| 56 | + |
| 57 | +```bash |
| 58 | +git diff FSHARP_START..FSHARP_END -- docs/release-notes/ | grep '^+' | grep -v '^+++' |
| 59 | +``` |
| 60 | + |
| 61 | +Source files: |
| 62 | +- `docs/release-notes/.FSharp.Compiler.Service/*.md` |
| 63 | +- `docs/release-notes/.FSharp.Core/*.md` |
| 64 | +- `docs/release-notes/.Language/*.md` |
| 65 | +- `docs/release-notes/.VisualStudio/*.md` |
| 66 | + |
| 67 | +### EXCLUDE |
| 68 | + |
| 69 | +- Already in previous announcement |
| 70 | +- CI, infra, test-only, repo maintenance, dependency updates, localization |
| 71 | +- FCS-internal API (unless enables user scenario) |
| 72 | +- xUnit migration, build scripts, baseline updates |
| 73 | + |
| 74 | +# 4. Investigate each entry via sub-agents |
| 75 | + |
| 76 | +For each user-facing release note entry, spawn a sub-agent (explore or general-purpose) to investigate it independently. Each sub-agent writes its findings to a temp file. |
| 77 | + |
| 78 | +``` |
| 79 | +For each entry with PR #NUMBER: |
| 80 | +
|
| 81 | + Launch sub-agent with prompt: |
| 82 | + """ |
| 83 | + Investigate dotnet/fsharp PR #NUMBER. |
| 84 | + 1. Get PR author, title, description, linked issues |
| 85 | + 2. Get files changed — classify as: feature / bugfix / test-only / infra |
| 86 | + 3. If feature or significant bugfix: |
| 87 | + - Find test files: git diff-tree --no-commit-id -r <MERGE_SHA> --name-only | grep -i test |
| 88 | + - Extract the most illustrative code sample from the tests (real F# code, not test harness) |
| 89 | + - Note benchmark data if PR description has any |
| 90 | + 4. If author is NOT T-Gro, Copilot, or abonie → mark as community contributor |
| 91 | + 5. Write findings to /tmp/release-notes/pr-NUMBER.md in this format: |
| 92 | +
|
| 93 | + ## PR #NUMBER: <title> |
| 94 | + - Author: <login> (community: yes/no) |
| 95 | + - Type: feature | bugfix | api | perf | infra |
| 96 | + - One-line summary: <what changed for users> |
| 97 | + - Issue(s): #X, #Y |
| 98 | + - Code sample (if feature/api): |
| 99 | + ```fsharp |
| 100 | + <code from tests> |
| 101 | + ``` |
| 102 | + - Benchmark (if perf): |
| 103 | + <table or numbers from PR> |
| 104 | + """ |
| 105 | +``` |
| 106 | +
|
| 107 | +Run sub-agents in parallel (up to 5). Wait for all to complete. Read all `/tmp/release-notes/pr-*.md` files to assemble the full picture. |
| 108 | +
|
| 109 | +Skip entries where sub-agent classified as `infra` or `test-only`. |
| 110 | +
|
| 111 | +# 5. Write the article |
| 112 | +
|
| 113 | +## Attribution |
| 114 | +
|
| 115 | +- Community contributors: `Thanks to [**user**](https://github.com/user)` with link |
| 116 | +- NEVER mention: T-Gro, Copilot, abonie (internal) |
| 117 | +- Credit community even if their PR was superseded (e.g., "Inspired by [**user**]'s work in #XXXX") |
| 118 | +
|
| 119 | +## Structure |
| 120 | +
|
| 121 | +```markdown |
| 122 | +# F# in .NET XX Preview Y - Release Notes |
| 123 | +
|
| 124 | +Here's a summary of what's new in F# in this Preview Y release: |
| 125 | +
|
| 126 | +- [Highlight 1](#anchor) |
| 127 | +- [Highlight 2](#anchor) |
| 128 | +- [Category 1](#anchor) |
| 129 | +- [Category 2](#anchor) |
| 130 | +- [Bug fixes](#bug-fixes-and-other-improvements) |
| 131 | +
|
| 132 | +## Highlight 1 ← 1-3 sections, CODE SAMPLES from tests, minimal prose |
| 133 | +## Highlight 2 |
| 134 | +## Category: Query fixes ← bullet list with issue links, no code |
| 135 | +## Category: IDE fixes ← bullet list |
| 136 | +## Bug fixes ← flat bullet list, prefixed by area (Nullness:, Scripts:, etc.) |
| 137 | +
|
| 138 | +F# updates: |
| 139 | +- [F# release notes](https://fsharp.github.io/fsharp-compiler-docs/release-notes/About.html) |
| 140 | +- [dotnet/fsharp repository](https://github.com/dotnet/fsharp) |
| 141 | +``` |
| 142 | + |
| 143 | +## Highlight selection (pick 1-3) |
| 144 | + |
| 145 | +Rank by: language feature > new API > perf win with numbers > significant bug fix area |
| 146 | +Each MUST have code sample extracted from PR tests. No invented examples. |
| 147 | + |
| 148 | +## Style |
| 149 | + |
| 150 | +- One-sentence intro max, then code block or table |
| 151 | +- No fluff, no "we are excited", no "this release brings" |
| 152 | +- Bold key terms in bullet lists |
| 153 | +- Link every issue and PR number |
| 154 | + |
| 155 | +# SDK branch naming |
| 156 | + |
| 157 | +| Release | Branch | |
| 158 | +|---|---| |
| 159 | +| .NET 11 Preview N | `release/11.0.1xx-previewN` | |
| 160 | +| .NET 10.0.X00 | `release/10.0.Xxx` | |
| 161 | + |
| 162 | +# Key files |
| 163 | + |
| 164 | +| Repo | Path | Contains | |
| 165 | +|---|---|---| |
| 166 | +| dotnet/sdk | `eng/Version.Details.xml` | VMR commit SHA | |
| 167 | +| dotnet/dotnet | `src/source-manifest.json` | F# commit SHA | |
| 168 | +| dotnet/fsharp | `docs/release-notes/` | Per-version changelogs | |
| 169 | +| dotnet/core | `release-notes/` | Published announcements | |
0 commit comments