Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .claude/agents/prd-task-generator.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ You are a senior software engineer with deep expertise in the Microsoft Agent 36
1. **Analyze PRD Context**: Thoroughly review the provided PRD, understanding both explicit requirements and implicit dependencies. Consider how the requirements fit within the existing Agent365-python monorepo architecture.

2. **Align with Project Architecture**: Every task you generate must align with the established patterns in this repository:
- The monorepo workspace structure with 13 interdependent packages
- The monorepo workspace structure with eight packages
- The Core + Extensions pattern (core packages are framework-agnostic, extensions add framework-specific integration)
- Namespace package conventions (`microsoft_agents_a365.*` for imports)
- OpenTelemetry-based observability patterns
- Observability is external: use `microsoft-opentelemetry` and `docs/observability-migration.md`
- MCP (Model Context Protocol) tool integration patterns
- The four core package areas: runtime, notifications, observability, and tooling
- The three core package areas: runtime, notifications, and tooling

3. **Consider Design Documentation**: Reference the detailed architecture in `docs/design.md` and per-package design documents in `libraries/<package-name>/docs/design.md` when breaking down tasks. Ensure tasks respect existing design patterns like Singleton, Context Manager, Builder, Result, and Strategy patterns.

Expand Down Expand Up @@ -52,7 +52,7 @@ Each task you create should include:

1. **Foundation First**: Start with core interfaces, models, and base classes
2. **Core Implementation**: Build out the main functionality
3. **Extensions**: Add framework-specific integrations (OpenAI, LangChain, etc.)
3. **Extensions**: Add supported tooling framework integrations (OpenAI, Google ADK, etc.)
4. **Polish**: Documentation, examples, edge case handling
5. **Integration**: End-to-end testing and validation

Expand All @@ -63,7 +63,7 @@ When generating tasks, actively consider:
- **Package Placement**: Is this a core package feature or a framework extension?
- **Workspace Dependencies**: Which existing packages does this depend on? Use `{ workspace = true }` pattern
- **Namespace Consistency**: Ensure imports use `microsoft_agents_a365.*` correctly
- **Observability Integration**: Does this feature need tracing/metrics? If so, include observability tasks
- **External Telemetry**: If needed, integrate the separately maintained distro; do not recreate retired packages
- **Testing Strategy**: Balance unit tests (fast, mocked) vs integration tests (require real services)
- **CI/CD Impact**: Will this require changes to `.github/workflows/ci.yml`?

Expand Down
6 changes: 3 additions & 3 deletions .claude/agents/prd-writer.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ You are a senior software engineering architect with deep expertise in creating
- Security and compliance considerations

2. **Contextual Awareness**: You have access to the Agent365 Python SDK codebase context. When creating PRDs, ensure alignment with:
- The monorepo workspace structure (13 interdependent packages)
- The monorepo workspace structure (eight packages)
- Existing architectural patterns (namespace packages, core + extensions pattern)
- Python 3.11+ standards and type hints
- OpenTelemetry-based observability patterns
- Observability is external: see `docs/observability-migration.md` for `microsoft-opentelemetry`
- MCP (Model Context Protocol) integration patterns
- Async/await conventions for I/O operations
- Required copyright headers and code standards
Expand All @@ -34,7 +34,7 @@ You are a senior software engineering architect with deep expertise in creating
- "Which packages in the monorepo will this feature touch?"
- "Does this extend core functionality or require a new framework extension?"
- "What are the inputs, outputs, and data transformations?"
- "How should this integrate with existing observability/tooling?"
- "How should this integrate with existing tooling or the external telemetry distro?"
- "What are the success metrics and acceptance criteria?"
- "Are there any security, performance, or compliance requirements?"
- "What error scenarios need to be handled?"
Expand Down
10 changes: 5 additions & 5 deletions .claude/agents/task-implementer.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,14 @@ When presenting your implementation:
You have access to comprehensive project documentation through CLAUDE.md and design documents. Key facts to always remember:

- Python version: 3.11+ (3.11 and 3.12 tested)
- This is a uv workspace monorepo with 13 interdependent packages
- This is a uv workspace monorepo with eight packages
- Packages use namespace structure: `microsoft_agents_a365.*`
- Core packages (runtime, observability-core, tooling, notifications) are framework-agnostic
- Extension packages add framework-specific integrations (OpenAI, LangChain, Semantic Kernel, Agent Framework)
- OpenTelemetry is used for observability (traces, spans, metrics)
- Runtime, Tooling, and Notifications provide framework-agnostic functionality
- Tooling extensions integrate OpenAI, Semantic Kernel, Agent Framework, Azure AI Foundry, and Google ADK
- Observability is external; follow `docs/observability-migration.md` and do not recreate retired packages
- MCP (Model Context Protocol) is used for tool integration
- CI/CD runs on main and release/* branches, testing Python 3.11 and 3.12
- Integration tests require Azure OpenAI credentials
- Remaining tests are offline/mocked; add explicitly marked integration tests if a future feature requires them

## Escalation Strategy

Expand Down
16 changes: 8 additions & 8 deletions .claude/commands/review-pr.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,15 +204,15 @@ The following fields are **required** for posting inline comments on the PR:

**Example:**
```diff
@@ -45,6 +45,9 @@ def initialize_telemetry(self):
tracer = get_tracer()
+ # Configure span processor
+ span_processor = BatchSpanProcessor(exporter)
+ tracer_provider.add_span_processor(span_processor)
return tracer_provider
@@ -45,6 +45,9 @@ def resolve_endpoint(self):
endpoint = get_endpoint()
+ if endpoint is None:
+ raise ValueError("Missing endpoint")
+ validate_endpoint(endpoint)
return endpoint
```
For a comment on the `tracer_provider.add_span_processor` line:
- **File**: `libraries/microsoft-agents-a365-observability-core/src/microsoft_agents_a365/observability/core/telemetry.py`
For a comment on the `validate_endpoint` line:
- **File**: `libraries/microsoft-agents-a365-runtime/microsoft_agents_a365/runtime/power_platform_api_discovery.py`
- **Diff Line**: `48` (line 45 + 3 new lines)
- **Diff Side**: `RIGHT` (it's an addition)

Expand Down
2 changes: 0 additions & 2 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# This will eventually be replaced by security group
* @microsoft/agent365-approvers
/.github/ @microsoft/agent365-approvers
/libraries/microsoft-agents-a365-observability-*/ @microsoft/agent365-observability-approvers
/tests/observability/ @microsoft/agent365-observability-approvers
/libraries/microsoft-agents-a365-notifications/ @microsoft/agent365-tooling-approvers
/libraries/microsoft-agents-a365-tooling*/ @microsoft/agent365-tooling-approvers
/tests/tooling/ @microsoft/agent365-tooling-approvers
10 changes: 10 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# GitHub Copilot Instructions for Agent365-python

## Package and Release Scope

This repository contains eight packages for Notifications, Runtime, Tooling, and
five Tooling framework adapters. Observability is retired here; do not reintroduce
its packages, imports, tests, or dependency edges. Follow the
[migration guide](../docs/observability-migration.md) for `microsoft-opentelemetry`.
Preserve historical changelogs. Build into a fresh directory and run
`scripts/verify_release_artifacts.py DIRECTORY --version VERSION` before any
artifact promotion or upload; never reuse old `dist/*` release inputs.

## Code Review Rules

### Rule 1: Check for "Kairo" Keyword
Expand Down
78 changes: 54 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
- id: check_python_sdk
name: Check Python SDK changes
run: |
if git diff --name-only "${{ steps.git_refs.outputs.base }}" "${{ steps.git_refs.outputs.head }}" -- 'libraries/**' 'setup.py' 'pyproject.toml' 'versioning/**' | grep -q .; then
if git diff --name-only "${{ steps.git_refs.outputs.base }}" "${{ steps.git_refs.outputs.head }}" -- 'libraries/**' 'setup.py' 'pyproject.toml' 'uv.lock' 'versioning/**' 'scripts/verify_release_artifacts.py' '.github/workflows/ci.yml' | grep -q .; then
echo "Python SDK changes detected"
echo "changed=true" >> $GITHUB_OUTPUT
else
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
cache-dependency-glob: "./pyproject.toml"

- name: Install the project
run: uv lock && uv sync --locked --all-extras --dev
run: uv sync --locked --all-extras --dev

- name: Verify centralized version constraints
run: uv run --frozen tox -e verify-constraints
Expand All @@ -119,48 +119,78 @@ jobs:

- name: Build package
run: |
AGENT365_PYTHON_SDK_PACKAGE_VERSION=${{ needs.version-number.outputs.PACKAGE_VERSION }} uv build --all-packages --wheel
build_dir=$(mktemp -d "$RUNNER_TEMP/agent365-wheels.XXXXXX")
echo "SDK_DIST_DIR=$build_dir" >> "$GITHUB_ENV"
uv build --all-packages --wheel --out-dir "$build_dir"
uv run --frozen --no-sync python scripts/verify_release_artifacts.py "$build_dir" --version "$AGENT365_PYTHON_SDK_PACKAGE_VERSION"
env:
AGENT365_PYTHON_SDK_PACKAGE_VERSION: ${{ needs.version-number.outputs.PACKAGE_VERSION }}

- name: Run unit tests
run: uv run --frozen tox -e py3${{ matrix.python-version == '3.11' && '11' || '12' }}

- name: Run integration tests
# Only run integration tests if secrets are available
if: ${{ vars.RUN_INTEGRATION_TESTS == 'true' }}
run: uv run --frozen tox -e integration
env:
AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }}
AZURE_OPENAI_ENDPOINT: ${{ vars.AZURE_OPENAI_ENDPOINT }}
AZURE_OPENAI_DEPLOYMENT: ${{ vars.AZURE_OPENAI_DEPLOYMENT }}
AZURE_OPENAI_API_VERSION: ${{ vars.AZURE_OPENAI_API_VERSION }}
ENABLE_OBSERVABILITY: true

# Copy package and samples to drop folder
- name: Copy package and samples to drop folder
run: |
mkdir -p ~/drop/python-${{ matrix.python-version }}/dist && cp -v dist/*.whl $_
drop_dir=$(mktemp -d "$RUNNER_TEMP/agent365-drop.XXXXXX")
echo "SDK_DROP_DIR=$drop_dir" >> "$GITHUB_ENV"
mkdir "$drop_dir/dist"
cp -v "$SDK_DIST_DIR"/*.whl "$drop_dir/dist/"

# Zip files since upload-artifact does not seem like to like folders
- name: Create zip
run: cd ~/drop/python-${{ matrix.python-version }} && zip -r ~/drop/python-${{ matrix.python-version }}.zip .
run: cd "$SDK_DROP_DIR" && zip -r "$SDK_DROP_DIR.zip" .

- name: Upload package and samples as artifacts
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: python-${{ matrix.python-version }}
path: ~/drop/python-${{ matrix.python-version }}.zip
path: ${{ env.SDK_DROP_DIR }}.zip

publish:
name: Publish verified packages
needs: [version-number, changed-sdks, python-sdk]
if: github.event_name == 'push' && startsWith(github.ref, 'refs/heads/release/') && needs.changed-sdks.outputs.python-sdk == 'true'
runs-on: ubuntu-latest
env:
PYTHONPATH: ${{ github.workspace }}/versioning/helper

steps:
- name: Checkout repository
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0

- name: Set up uv and Python
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0
with:
version: '0.6.x'
python-version: '3.11'

- name: Install locked release tools
run: uv sync --locked --all-extras --dev

- name: Create fresh artifact directory
run: |
download_dir=$(mktemp -d "$RUNNER_TEMP/agent365-download.XXXXXX")
echo "SDK_ARTIFACT_DIR=$download_dir" >> "$GITHUB_ENV"

- name: Download verified Python 3.11 artifact
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: python-3.11
path: ${{ env.SDK_ARTIFACT_DIR }}

- name: Extract release wheels
run: |
publish_dir=$(mktemp -d "$RUNNER_TEMP/agent365-publish.XXXXXX")
unzip -q "$SDK_ARTIFACT_DIR"/*.zip -d "$publish_dir"
echo "SDK_DIST_DIR=$publish_dir/dist" >> "$GITHUB_ENV"

- name: Publish
# Only publish when:
# 1. It's a push event (not a PR)
# 2. The branch is a release/* branch
# 3. There are SDK changes
if: github.event_name == 'push' && startsWith(github.ref, 'refs/heads/release/') && needs.changed-sdks.outputs.python-sdk == 'true'
run: |
uv run twine upload --config-file .pypirc -r Agent365 dist/*
continue-on-error: true
: "${TWINE_REPOSITORY_URL:?Set the AGENT365_PACKAGE_REPOSITORY_URL repository variable to the approved upload endpoint}"
uv run --frozen --no-sync python scripts/verify_release_artifacts.py "$SDK_DIST_DIR" --version "${{ needs.version-number.outputs.PACKAGE_VERSION }}"
uv run --frozen --no-sync twine upload --non-interactive --repository-url "$TWINE_REPOSITORY_URL" "$SDK_DIST_DIR"/*.whl
env:
TWINE_REPOSITORY_URL: ${{ vars.AGENT365_PACKAGE_REPOSITORY_URL }}
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.AZURE_DEVOPS_TOKEN }}
Loading
Loading