Skip to main content

cross-repository-references

How to configure cross-repository references (CRR) and create API class links for Microsoft Learn docs in this repository.

소스 정보

저장소
MicrosoftDocs/semantic-kernel-docs
최근 소스 활동
2026년 2월 13일 14:28
감지된 SKILL.md 언어
영어
스타
264
포크
169

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
cross-repository-references
description
How to configure cross-repository references (CRR) and create API class links for Microsoft Learn docs in this repository.
# Skill: Cross-Repository References (CRR) and API Class Links ## Purpose Use this skill when you need to: - reference files from another repository during Docs build (CRR) - add stable links to Python API classes in Microsoft Learn docs pages CRR replaces Git submodule-based references for docs build scenarios and is easier to reason about for doc authors. ## Where CRR is configured CRR is configured in: - `.openpublishing.publish.config.json` The key is: - `dependent_repositories` ## CRR schema ```json { "dependent_repositories": [ { "path_to_root": "<relative path>", "url": "<repository URL>", "branch": "<default branch>", "branch_mapping": { "<source branch>": "<dependency branch>" } } ] } ``` ### Fields | Field | Required | Meaning | |---|---|---| | `dependent_repositories` | Yes | List of CRR entries | | `path_to_root` | Yes | Where the dependency is mounted in the build workspace | | `url` | Yes | Dependency repository URL | | `branch` | Yes | Default dependency branch | | `branch_mapping` | No | Optional source->dependency branch override map | ## Current repo baseline This repository already uses CRR in `.openpublishing.publish.config.json` for: - `_themes` - `_themes.pdf` - `semantic-kernel-samples` - `semantic-kernel-samples-java` Prefer extending the existing `dependent_repositories` list instead of introducing alternate mechanisms. ## Path semantics (`~`, `..`) for references - `~` resolves to the docset root (`build_source_folder`) - in this repo, for Agent Framework docs, docset root is `agent-framework/` - use `~/..` to move from docset root to repository root Example (from Agent Framework docset to CRR sample repo): ```text ~/../semantic-kernel-samples/path/to/file.py ``` ## Adding a new CRR dependency 1. Add a `dependent_repositories` entry in `.openpublishing.publish.config.json` 2. Use dependency paths from docs content (`[!INCLUDE]`, `:::code`, or static asset references) 3. If needed, add exclusion rules in `docfx.json` so referenced source trees are not published as content 4. Add dependency mount folders to `.gitignore` if local build artifacts create noise ## API class links (Python) For Agent Framework Python API links, use Learn URLs with explicit package + module/class paths. ### Preferred link forms - Module landing: - `/python/api/agent-framework-core/agent_framework?view=agent-framework-python-latest` - Class page: - `/python/api/agent-framework-core/agent_framework.baseagent?view=agent-framework-python-latest` - `/python/api/agent-framework-core/agent_framework.agent?view=agent-framework-python-latest` - `/python/api/agent-framework-core/agent_framework.supportschatgetresponse?view=agent-framework-python-latest` - `/python/api/agent-framework-core/agent_framework.supportsagentrun?view=agent-framework-python-latest` - `/python/api/agent-framework-core/agent_framework.agentresponseupdate?view=agent-framework-python-latest` ### Markdown pattern ```markdown [`BaseAgent`](/python/api/agent-framework-core/agent_framework.baseagent?view=agent-framework-python-latest) ``` ### Practical guidance - prefer class-level links when the class page exists - if a class page does not exist, link to the module landing page - when code and API reference differ, prefer code-leading class names and matching URL slug - keep link text aligned with surrounding docs terminology - use relative Learn paths (`/python/api/...`) instead of hardcoded absolute hostnames ## Validation checklist - link resolves to an existing Learn page - `view=agent-framework-python-latest` is present - no broken relative paths (`./`, `../`) introduced - doc wording stays accurate after class/protocol name linking ## References - [Python API docs: agent-framework-core](https://learn.microsoft.com/en-us/python/api/agent-framework-core/agent_framework?view=agent-framework-python-latest)
GitHub에서 보기