Skip to content

Commit 7f0b23f

Browse files
Learn Build Service GitHub AppLearn Build Service GitHub App
authored andcommitted
Merging changes synced from https://github.com/MicrosoftDocs/semantic-kernel-pr (branch live)
2 parents 56dbe96 + 8e20a5e commit 7f0b23f

230 files changed

Lines changed: 26680 additions & 18206 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
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+
```

.github/copilot-instructions.md

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# Copilot Instructions for Semantic Kernel Documentation
2+
3+
This repository contains documentation for two separate Microsoft products, published via Microsoft Docs (DocFX):
4+
5+
| Docset | Languages | Source Code | Published URL |
6+
|--------|-----------|-------------|---------------|
7+
| **Semantic Kernel** (`semantic-kernel/`) | C#, Python, Java | [microsoft/semantic-kernel](https://github.com/microsoft/semantic-kernel) | [/semantic-kernel](https://learn.microsoft.com/semantic-kernel) |
8+
| **Agent Framework** (`agent-framework/`) | C#, Python | [microsoft/agent-framework](https://github.com/microsoft/agent-framework) | [/agent-framework](https://learn.microsoft.com/agent-framework) |
9+
10+
Each docset is independent with its own `docfx.json`, `TOC.yml`, and `zone-pivot-groups.yml`.
11+
12+
## Documentation Conventions
13+
14+
### YAML Frontmatter
15+
16+
Every markdown file requires this frontmatter:
17+
18+
```yaml
19+
---
20+
title: Page title
21+
description: Brief description
22+
zone_pivot_groups: programming-languages # If showing code in multiple languages
23+
author: github-username
24+
ms.topic: conceptual
25+
ms.author: microsoft-alias
26+
ms.date: MM/DD/YYYY
27+
ms.service: semantic-kernel
28+
---
29+
```
30+
31+
### Zone Pivots for Multi-Language Content
32+
33+
Zone pivots show language-specific content. **Note the different language support per docset:**
34+
35+
**Semantic Kernel** (C#, Python, Java):
36+
```markdown
37+
::: zone pivot="programming-language-csharp"
38+
C# content here
39+
::: zone-end
40+
41+
::: zone pivot="programming-language-python"
42+
Python content here
43+
::: zone-end
44+
45+
::: zone pivot="programming-language-java"
46+
Java content here
47+
::: zone-end
48+
```
49+
50+
**Agent Framework** (C#, Python only - no Java):
51+
```markdown
52+
::: zone pivot="programming-language-csharp"
53+
C# content here
54+
::: zone-end
55+
56+
::: zone pivot="programming-language-python"
57+
Python content here
58+
::: zone-end
59+
```
60+
61+
### Code Samples
62+
63+
Reference code from external sample repositories using DocFX syntax:
64+
65+
```markdown
66+
:::code language="csharp" source="~/../semantic-kernel-samples/path/to/file.cs" id="SnippetId":::
67+
```
68+
69+
Sample repositories (configured in `.openpublishing.publish.config.json`):
70+
- `semantic-kernel-samples`[microsoft/semantic-kernel](https://github.com/microsoft/semantic-kernel) (main branch)
71+
- `semantic-kernel-samples-java`[microsoft/semantic-kernel-java](https://github.com/microsoft/semantic-kernel-java)
72+
73+
### Table of Contents
74+
75+
Each section has a `TOC.yml` file. When adding new pages, update the appropriate TOC:
76+
77+
```yaml
78+
- name: Page Title
79+
href: page-file.md
80+
```
81+
82+
### Links
83+
84+
Use docs-relative paths:
85+
- Cross-docset: `/semantic-kernel/concepts/kernel` or `/agent-framework/overview/`
86+
- Same docset: `./sibling-page.md` or `../parent/page.md`
87+
88+
### Media Files
89+
90+
Place images in `media/` folders within each section. Use SVG for diagrams when possible.
91+
92+
## Key Patterns
93+
94+
- **Tip boxes**: `> [!TIP]` for helpful hints
95+
- **Notes**: `> [!NOTE]` for important information
96+
- **Warnings**: `> [!WARNING]` for cautions
97+
- **Next steps buttons**: `> [!div class="nextstepaction"]` followed by a link
98+
99+
## What NOT to Include
100+
101+
- Do not add build/test commands (this is a pure documentation repo)
102+
- Do not reference `_themes/` or `_themes.pdf/` directories (managed externally)
103+
- Files in `**/includes/**` and `**/obj/**` are excluded from builds

0 commit comments

Comments
 (0)