python-feature-lifecycle

작성자: microsoft

Agent Framework는 두 가지 수준에서 라이프사이클을 사용합니다:

npx skills add https://github.com/microsoft/agent-framework --skill python-feature-lifecycle

Python Feature Lifecycle

Two lifecycle levels

Agent Framework uses lifecycle at two different levels:

  1. Package lifecycle — the maturity of the package as a whole
  2. Feature lifecycle — the maturity of a specific API or feature inside that package

These are related, but they are not the same thing.

  • The package stage is the default for everything in the package.
  • Feature-stage decorators are only for exceptions when a feature is behind the package's default stage.
  • Do not decorate every class or function just because the package is experimental or release candidate.

Important default

If a package is still in beta / experimental preview, all public APIs in that package are experimental by default.

  • Do not add @experimental(...) everywhere in that package.
  • The package stage already communicates that default.

Once a package moves forward, you can keep individual features behind:

  • If a package moves to release candidate, a feature may remain experimental
  • If a package moves to released / GA, a feature may remain experimental or release candidate

That is the main use case for feature-stage decorators.

The four stages

1. Experimental

Use for features that are still unstable and may change or be removed without notice.

Feature-level code pattern:

from ._feature_stage import ExperimentalFeature, experimental


@experimental(feature_id=ExperimentalFeature.MY_FEATURE)
class MyFeature:
    ...

Behavior:

  • Adds an experimental warning block to the docstring
  • Records feature metadata on the decorated object
  • Emits a runtime warning the first time the feature is used (once per feature by default)

Enum setup:

  • Add an all-caps member to ExperimentalFeature
  • Reuse the same feature ID across all APIs that belong to the same conceptual feature

2. Release candidate

Use for features that are nearly stable but may still receive small refinements before GA.

Feature-level code pattern:

from ._feature_stage import ReleaseCandidateFeature, release_candidate


@release_candidate(feature_id=ReleaseCandidateFeature.MY_FEATURE)
class MyFeature:
    ...

Behavior:

  • Adds a release-candidate note to the docstring
  • Records feature metadata on the decorated object
  • Does not emit the experimental warning

Enum setup:

  • Add an all-caps member to ReleaseCandidateFeature

3. Released

Use for stable GA APIs.

Code pattern:

  • No feature-stage decorator
  • No entry in ExperimentalFeature
  • No entry in ReleaseCandidateFeature

If a feature is fully released, remove any stage-specific feature annotation.

4. Deprecated

Use for APIs that still exist but should not be used for new code.

Code pattern:

import sys

if sys.version_info >= (3, 13):
    from warnings import deprecated  # type: ignore # pragma: no cover
else:
    from typing_extensions import deprecated  # type: ignore # pragma: no cover


@deprecated("MyOldFeature is deprecated. Use MyNewFeature instead.")
class MyOldFeature:
    ...

Behavior:

  • Uses the repository's version-conditional deprecation import pattern
  • Should describe what to use instead

Deprecated APIs should not also carry feature-stage decorators.

Expected decorators by stage

Feature stageExpected annotation
Experimental@experimental(feature_id=ExperimentalFeature.X)
Release candidate@release_candidate(feature_id=ReleaseCandidateFeature.X)
ReleasedNo feature-stage decorator
Deprecated@deprecated("...")

Feature enums

The feature enums are the inventory of currently staged features:

  • ExperimentalFeature
  • ReleaseCandidateFeature

Guidance:

  • Use one enum member per conceptual feature, not per class
  • Ideally, an ADR already defines the overall feature boundary and therefore the feature ID that staged APIs for that feature should reuse
  • Keep feature IDs all caps
  • Reuse the same member across related APIs for the same feature
  • Remove enum members when the feature no longer belongs to that stage
  • Treat these enums as current-stage inventories, not as a stable consumer introspection API

Minimal consumer guidance:

  • Treat __feature_stage__ and __feature_id__ as optional staged metadata, not as stable contracts
  • Use getattr(obj, "__feature_stage__", None) and getattr(obj, "__feature_id__", None) rather than direct attribute access
  • Treat missing metadata as "no explicit feature-stage annotation"
  • For warning filters while a feature is staged, match the literal feature ID string
  • Do not rely on ExperimentalFeature.X, ReleaseCandidateFeature.X, or the continued presence of __feature_id__ after a feature moves stages or is released

For consumers, the enums are also re-exported from agent_framework.

For internal implementation code inside agent_framework, continue to import the enums and decorators from ._feature_stage.

Package stage vs feature stage

Use the following rules:

Package is experimental / beta

  • All public APIs are experimental by default
  • Do not add feature-stage decorators just to restate that
  • Only introduce feature-level annotations later if the package advances first

Package is release candidate

  • All public APIs are RC by default
  • Do not decorate everything
  • Add @experimental(...) only for features that are intentionally still behind the package

Package is released / GA

  • All public APIs are released by default
  • Add @experimental(...) or @release_candidate(...) only for features still being held back

Moving a feature from one stage to the next

Experimental -> Release candidate

  1. Move the feature ID from ExperimentalFeature to ReleaseCandidateFeature
  2. Replace @experimental(...) with @release_candidate(...)
  3. Update any tests or docs that mention the old stage

Experimental -> Released

  1. Remove @experimental(...)
  2. Remove the feature from ExperimentalFeature
  3. Do not add a replacement feature-stage decorator

Release candidate -> Released

  1. Remove @release_candidate(...)
  2. Remove the feature from ReleaseCandidateFeature
  3. Leave the API undecorated

Any stage -> Deprecated

  1. Remove any feature-stage decorator
  2. Remove the feature from the stage enum
  3. Add @deprecated("...")
  4. Update docs/tests to reflect the replacement path

Promotion guidance

Features do not have to pass through every stage.

  • It is usually a good idea to move features in order when that reflects reality
  • But it is completely acceptable to go experimental -> released
  • Do not force a feature through release candidate if there is no real RC period

Likewise, when a package advances, do not automatically move every feature with it.

  • Promote features based on actual readiness
  • Keep lagging features explicitly marked only when they are behind the package default

Practical rules of thumb

  • Package default first, feature exceptions second
  • Do not decorate everything in preview packages
  • Do not double-annotate members of an already-staged class
  • Use enums only for currently staged features
  • Do not treat stage enums as a compatibility contract
  • Treat __feature_stage__ and __feature_id__ as optional metadata; use getattr
  • Remove stage annotations once a feature is released or deprecated

microsoft의 다른 스킬

oss-growth
microsoft
OSS 성장 해커 페르소나
agent-framework-azure-ai-py
microsoft
Microsoft Agent Framework Python SDK(agent-framework-azure-ai)를 사용하여 Azure AI Foundry 에이전트를 구축합니다. AzureAIAgentsProvider로 지속적 에이전트를 만들 때, 호스팅 도구(코드 인터프리터, 파일 검색, 웹 검색)를 사용할 때, MCP 서버를 통합할 때, 대화 스레드를 관리할 때, 또는 스트리밍 응답을 구현할 때 사용합니다. 함수 도구, 구조화된 출력, 다중 도구 에이전트를 다룹니다.
development
airunway-aks-setup
microsoft
AKS에서 AI Runway 설정 — 빈 클러스터에서 실행 중인 모델까지. 클러스터 검증, 컨트롤러 설치, GPU 평가, 공급자 설정, 첫 배포를 다룹니다. 시기: "AI Runway 설정", "AKS 클러스터 온보딩", "AI Runway 설치", "airunway 설정", "AKS에 모델 배포", "AKS에서 GPU 추론", "AKS에서 KAITO 설정", "AKS에서 LLM 실행", "AKS에서 vLLM", "AKS에서 모델 서빙 설정", "AI Runway 컨트롤러".
devops
appinsights-instrumentation
microsoft
Azure Application Insights로 웹앱을 계측하기 위한 지침입니다. 원격 분석 패턴, SDK 설정, 구성 참조를 제공합니다. WHEN: 앱 계측 방법, App Insights SDK, 원격 분석 패턴, App Insights란 무엇인가, Application Insights 지침, 계측 예시, APM 모범 사례.
devops
applicationinsights-web-ts
microsoft
브라우저/웹 앱을 Application Insights JavaScript SDK(@microsoft/applicationinsights-web)로 계측합니다. Real User Monitoring(RUM) — 페이지 뷰, 클릭, AJAX/fetch 종속성, 예외, 사용자 지정 이벤트, 백엔드 OpenTelemetry 트레이스와 상관관계가 있는 브라우저 측 GenAI 에이전트 트레이스에 사용합니다. SDK Loader Script 및 npm 설정, 프레임워크 확장(React, React Native, Angular), Click Analytics, 텔레메트리 이니셜라이저, 브라우저에서 생성된 에이전트/도구/모델 스팬에 대한 OTel GenAI 의미론적 규칙을 다룹니다.
devops
azure-ai-anomalydetector-java
microsoft
Azure AI Anomaly Detector SDK for Java로 이상 탐지 애플리케이션을 구축하세요. 단변량/다변량 이상 탐지, 시계열 분석 또는 AI 기반 모니터링을 구현할 때 사용하세요.
development
azure-ai-language-conversations-py
microsoft
azure-ai-language-conversations Python SDK를 사용하여 대화형 언어 이해(CLU)를 구현합니다. ConversationAnalysisClient로 대화 의도와 엔터티를 분석하거나, NLP 기능을 구축하거나, 애플리케이션에 언어 이해를 통합할 때 사용합니다.
development
azure-ai-ml-py
microsoft
Azure Machine Learning SDK v2 for Python. ML 작업 영역, 작업, 모델, 데이터 세트, 컴퓨팅 및 파이프라인에 사용합니다. 트리거: "azure-ai-ml", "MLClient", "workspace", "model registry", "training jobs", "datasets".
development