|
| 1 | +# Agent Framework PR Merge Documentation Update |
| 2 | + |
| 3 | +This instruction is triggered when a PR is merged in the agent-framework repository. Your job is to update documentation accordingly and track Python breaking changes. |
| 4 | + |
| 5 | +## Context |
| 6 | + |
| 7 | +- **Source repo:** [microsoft/agent-framework](https://github.com/microsoft/agent-framework) - The PR being merged is from this repo |
| 8 | +- **Docs repo:** This repository (`semantic-kernel-pr`) contains the documentation to update |
| 9 | +- **Docset location:** `agent-framework/` |
| 10 | +- **Significant changes file:** `agent-framework/support/upgrade/python-2026-significant-changes.md` |
| 11 | +- **Languages supported:** C# and Python (no Java) |
| 12 | + |
| 13 | +## Workflow |
| 14 | + |
| 15 | +### Step 1: Analyze the Merged PR |
| 16 | + |
| 17 | +Review the PR to understand: |
| 18 | +1. **Check PR title for `[BREAKING]` prefix** - This is the primary indicator of a breaking change |
| 19 | +2. What changed (API, behavior, configuration, etc.) |
| 20 | +3. Which language(s) are affected (C#, Python, or both) |
| 21 | +4. Whether it's a breaking change (even if not tagged - contributors sometimes forget the prefix) |
| 22 | +5. Whether it's a version update |
| 23 | + |
| 24 | +### Step 2: Update Relevant Documentation |
| 25 | + |
| 26 | +For any PR that affects user-facing behavior or APIs: |
| 27 | + |
| 28 | +1. **Identify affected docs** - Search `agent-framework/` for mentions of changed APIs, classes, methods, or concepts |
| 29 | +2. **Update code samples** - Ensure all code examples reflect the new API/behavior |
| 30 | +3. **Update conceptual docs** - Revise explanations if behavior changed |
| 31 | +4. **Update TOC.yml** - If adding new pages or restructuring |
| 32 | + |
| 33 | +Follow these conventions: |
| 34 | +- Use zone pivots for language-specific content (C# and Python only) |
| 35 | +- Update `ms.date` in frontmatter of modified files |
| 36 | +- Maintain consistency with existing documentation style |
| 37 | + |
| 38 | +### Step 3: Handle Python Breaking Changes |
| 39 | + |
| 40 | +If the PR introduces a **Python breaking change**, add an entry to `agent-framework/support/upgrade/python-2026-significant-changes.md`: |
| 41 | + |
| 42 | +#### Format for Breaking Change Entry |
| 43 | + |
| 44 | +Add under the appropriate version header (create new header if needed): |
| 45 | + |
| 46 | +```markdown |
| 47 | +## python-{version} ({Month} {Day}, {Year}) |
| 48 | + |
| 49 | +### {Brief description of breaking change} |
| 50 | + |
| 51 | +**PR:** [#{pr_number}](https://github.com/microsoft/agent-framework/pull/{pr_number}) |
| 52 | + |
| 53 | +{One or two sentence explanation of what changed and why.} |
| 54 | + |
| 55 | +**Before:** |
| 56 | +```python |
| 57 | +# Old code that no longer works |
| 58 | +``` |
| 59 | + |
| 60 | +**After:** |
| 61 | +```python |
| 62 | +# New code showing the correct approach |
| 63 | +``` |
| 64 | + |
| 65 | +--- |
| 66 | +``` |
| 67 | + |
| 68 | +#### Unreleased Breaking Changes |
| 69 | + |
| 70 | +If a breaking change is merged but **not yet released**, add it under an "Unreleased" section at the top of the file: |
| 71 | + |
| 72 | +```markdown |
| 73 | +## Unreleased (Coming Soon) |
| 74 | + |
| 75 | +> [!NOTE] |
| 76 | +> These changes have been merged but are not yet available in a published release. |
| 77 | +
|
| 78 | +### {Brief description of breaking change} |
| 79 | + |
| 80 | +**PR:** [#{pr_number}](https://github.com/microsoft/agent-framework/pull/{pr_number}) |
| 81 | + |
| 82 | +{Explanation of what changed.} |
| 83 | + |
| 84 | +**Before:** |
| 85 | +```python |
| 86 | +# Old code |
| 87 | +``` |
| 88 | + |
| 89 | +**After:** |
| 90 | +```python |
| 91 | +# New code |
| 92 | +``` |
| 93 | + |
| 94 | +--- |
| 95 | +``` |
| 96 | + |
| 97 | +When the version is released, rename the header from `## Unreleased (Coming Soon)` to `## python-{version} ({Month} {Day}, {Year})` and remove the note about being unreleased. |
| 98 | + |
| 99 | +#### Ordering Rules |
| 100 | + |
| 101 | +1. **Version headers** - Newest versions at the top, oldest at the bottom |
| 102 | +2. **Changes within a version** - Order by significance/impact |
| 103 | +3. **Summary table** - Add a row to the summary table at the bottom of the file |
| 104 | + |
| 105 | +#### Summary Table Entry |
| 106 | + |
| 107 | +Add a row to the summary table: |
| 108 | + |
| 109 | +```markdown |
| 110 | +| {version} | {Brief change description} | [#{pr_number}](https://github.com/microsoft/agent-framework/pull/{pr_number}) | |
| 111 | +``` |
| 112 | + |
| 113 | +### Step 4: Handle Version Updates |
| 114 | + |
| 115 | +If the PR is a **version update** (e.g., bumping package version): |
| 116 | + |
| 117 | +1. Check if there is an `## Unreleased (Coming Soon)` section in `python-2026-significant-changes.md` |
| 118 | +2. If so, rename the header to `## python-{version} ({Month} {Day}, {Year})` with the new version |
| 119 | +3. Remove the `> [!NOTE]` block about changes being unreleased |
| 120 | +4. Add any entries from the unreleased section to the summary table at the bottom |
| 121 | +5. Ensure the version format matches the pattern: `python-{version}` (e.g., `python-1.0.0b260128`) |
| 122 | + |
| 123 | +## Breaking Change Criteria |
| 124 | + |
| 125 | +### How to Identify Breaking Changes |
| 126 | + |
| 127 | +**Check both of the following:** |
| 128 | +1. **PR labels** — Look for a `breaking-change` label |
| 129 | +2. **PR title** — Look for a `[BREAKING]` prefix |
| 130 | + |
| 131 | +Either indicator means the PR contains breaking changes. If neither is present, review the PR content. A change is considered **breaking** if it: |
| 132 | +- Renames a class, method, function, or parameter |
| 133 | +- Removes a public API |
| 134 | +- Changes method signatures (parameters, return types) |
| 135 | +- Changes default behavior that could break existing code |
| 136 | +- Requires code changes to upgrade |
| 137 | +- Changes exception types or error handling behavior |
| 138 | + |
| 139 | +A change is **NOT breaking** if it: |
| 140 | +- Adds new optional parameters with defaults |
| 141 | +- Adds new classes or methods |
| 142 | +- Fixes bugs without changing expected behavior |
| 143 | +- Improves performance without API changes |
| 144 | +- Updates internal/private implementation |
| 145 | + |
| 146 | +### Significant (Non-Breaking) Changes |
| 147 | + |
| 148 | +Some changes are important to document even if not breaking. Consider adding entries for: |
| 149 | +- New generic type parameters that improve type inference |
| 150 | +- Major new features or capabilities |
| 151 | +- Changes to recommended patterns or best practices |
| 152 | + |
| 153 | +## Example Workflow |
| 154 | + |
| 155 | +**Scenario:** PR #3413 renames `AIFunction` to `FunctionTool` and `@ai_function` to `@tool` in Python |
| 156 | + |
| 157 | +1. **Analyze:** Breaking change affecting Python API (check for `breaking-change` label) |
| 158 | +2. **Update docs:** Search for `AIFunction` and `@ai_function` in `agent-framework/` and update all occurrences |
| 159 | +3. **Add breaking change entry:** |
| 160 | + |
| 161 | +```markdown |
| 162 | +## python-1.0.0b260128 (January 28, 2026) |
| 163 | + |
| 164 | +### 🔴 `AIFunction` renamed to `FunctionTool` and `@ai_function` renamed to `@tool` |
| 165 | + |
| 166 | +**PR:** [#3413](https://github.com/microsoft/agent-framework/pull/3413) |
| 167 | + |
| 168 | +The class and decorator have been renamed for clarity and consistency with industry terminology. |
| 169 | + |
| 170 | +**Before:** |
| 171 | +```python |
| 172 | +from agent_framework.core import ai_function, AIFunction |
| 173 | + |
| 174 | +@ai_function |
| 175 | +def get_weather(city: str) -> str: |
| 176 | + return f"Weather in {city}: Sunny" |
| 177 | +``` |
| 178 | + |
| 179 | +**After:** |
| 180 | +```python |
| 181 | +from agent_framework.core import tool, FunctionTool |
| 182 | + |
| 183 | +@tool |
| 184 | +def get_weather(city: str) -> str: |
| 185 | + return f"Weather in {city}: Sunny" |
| 186 | +``` |
| 187 | + |
| 188 | +--- |
| 189 | +``` |
| 190 | + |
| 191 | +4. **Update summary table:** |
| 192 | + |
| 193 | +```markdown |
| 194 | +| 1.0.0b260128 | `AIFunction` → `FunctionTool`, `@ai_function` → `@tool` | [#3413](https://github.com/microsoft/agent-framework/pull/3413) | |
| 195 | +``` |
0 commit comments