mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-07-05 15:09:22 +00:00
* feat: adopt directory-based docs versioning with Edge channel Switch docs.crewai.com from navigation-only versioning (every version selector entry rendered the same docs/<lang>/* source files) to Mintlify's directory-based versioning so each version selector entry renders its own snapshot. Add an "Edge" channel under docs/edge/<lang>/* that always reflects main HEAD for unreleased work, eliminating pre-release leakage onto frozen release labels. External links to canonical /<lang>/* URLs are preserved via wildcard redirects that always land on the current default version. Layout: - docs/edge/<lang>/* rolling source (you edit here) - docs/edge/enterprise-api.*.yaml - docs/v<X.Y.Z>/<lang>/* frozen, immutable snapshots - docs/v<X.Y.Z>/enterprise-api.*.yaml - docs/images/ shared, append-only - docs/docs.json nav + redirects URLs follow the Mintlify-idiomatic shape: /edge/<lang>/<page> for Edge, /v<X.Y.Z>/<lang>/<page> for every frozen snapshot. The wildcard redirects /<lang>/:slug* -> /<default>/<lang>/:slug* keep stale links working, and every freeze rewrites them (plus all per-section/per-page redirects) so destinations always resolve to the current default without depending on a second redirect hop. Release flow integration (devtools release): - New module crewai_devtools.docs_versioning.freeze() materialises docs/v<X.Y.Z>/ from docs/edge/, rewrites openapi: refs inside the snapshot, inserts the version into every language block in docs.json, and refreshes all redirect destinations. - _update_docs_and_create_pr() in cli.py now calls that freeze during Phase 2 of devtools release. Edge changelogs are updated first (so the snapshot freeze picks them up), then the snapshot is staged alongside docs.json, branched as docs/freeze-v<X.Y.Z>, and the PR is titled [docs-freeze] docs: snapshot and changelog for v<X.Y.Z> — the title prefix the new CI guard reads. - The PR still gates tag, GitHub release, PyPI publish, and the enterprise release as before; no new PRs are added. - Pre-releases (1.X.YaN, 1.X.YbN, ...) skip the snapshot — they ride Edge — and the docs PR title omits the [docs-freeze] prefix. - docs_check (AI-generated docs scaffolding) writes to docs/edge/<lang>/* so newly-generated unreleased docs land in Edge and never accidentally touch a frozen snapshot. Migration scripts (one-shot): - scripts/docs/freeze_historical_versions.py reconstructs all 16 historical snapshots (v1.10.0 .. v1.14.7) from git tags via git archive | tar, rewriting openapi: MDX refs so each snapshot reads its own enterprise-api YAML rather than the live one. - scripts/docs/prefix_version_paths.py one-shot-migrates docs.json: rewrites every page path in 16 versioned blocks to point under docs/v<X.Y.Z>/, inserts a new Edge entry per language, tags v1.14.7 as Latest (default), prunes pages whose target file doesn't exist in the snapshot (e.g. docs/ar/ didn't exist before v1.12.0), and writes the wildcard + per-section redirects. - scripts/docs/freeze_current_edge.py is now a thin CLI wrapper around docs_versioning.freeze for manual one-off freezes (e.g. retroactively snapshotting a forgotten release). CI guards (.github/workflows/docs-snapshots.yml): - Frozen snapshots under docs/v[0-9]*/ are immutable; only PRs whose title contains [docs-freeze] (i.e. release-cut PRs generated by devtools release or the manual wrapper) may modify them. - Images under docs/images/ are append-only since snapshots share a single image directory. Deleting or renaming an image breaks every historical snapshot that still references it. Restored docs/images/crewai-otel-export.png from PR #3673; it was deleted in PR #4908 but v1.10.0 / v1.10.1 snapshots still reference it. Restoring instead of editing the snapshots preserves historical rendering fidelity and validates the new append-only rule retroactively. Tests: - lib/devtools/tests/test_docs_versioning.py covers the freeze: file copy, openapi rewrite, version insertion, default demotion, redirect upserts, per-section redirect rewriting, idempotency, and invalid inputs. Verified locally with mintlify broken-links: 0 broken links across the full site (Edge + 16 frozen versions, 4 locales). AGENTS.md (repo root) is the contributor guide for the new model; RELEASING.md is the release-cut runbook; README's Contribution section links to both. Co-authored-by: Cursor <cursoragent@cursor.com> * style: resolve linter issues --------- Co-authored-by: Cursor <cursoragent@cursor.com>
115 lines
4.3 KiB
Plaintext
115 lines
4.3 KiB
Plaintext
---
|
||
title: 스킬
|
||
description: 에이전트 프롬프트에 컨텍스트를 주입하는 파일 시스템 기반 스킬 패키지.
|
||
icon: bolt
|
||
mode: "wide"
|
||
---
|
||
|
||
## 개요
|
||
|
||
스킬은 에이전트에게 도메인별 지침, 참조 자료, 에셋을 제공하는 자체 포함 디렉터리입니다. 각 스킬은 YAML 프론트매터와 마크다운 본문이 포함된 `SKILL.md` 파일로 정의됩니다.
|
||
|
||
스킬은 **점진적 공개**를 사용합니다 — 메타데이터가 먼저 로드되고, 활성화 시에만 전체 지침이 로드되며, 필요할 때만 리소스 카탈로그가 로드됩니다.
|
||
|
||
## 디렉터리 구조
|
||
|
||
```
|
||
my-skill/
|
||
├── SKILL.md # 필수 — 프론트매터 + 지침
|
||
├── scripts/ # 선택 — 실행 가능한 스크립트
|
||
├── references/ # 선택 — 참조 문서
|
||
└── assets/ # 선택 — 정적 파일 (설정, 데이터)
|
||
```
|
||
|
||
디렉터리 이름은 `SKILL.md`의 `name` 필드와 일치해야 합니다.
|
||
|
||
## SKILL.md 형식
|
||
|
||
```markdown
|
||
---
|
||
name: my-skill
|
||
description: 이 스킬이 무엇을 하고 언제 사용하는지에 대한 간단한 설명.
|
||
license: Apache-2.0 # 선택
|
||
compatibility: crewai>=0.1.0 # 선택
|
||
metadata: # 선택
|
||
author: your-name
|
||
version: "1.0"
|
||
allowed-tools: web-search file-read # 선택, 공백으로 구분
|
||
---
|
||
|
||
에이전트를 위한 지침이 여기에 들어갑니다. 이 마크다운 본문은
|
||
스킬이 활성화되면 에이전트의 프롬프트에 주입됩니다.
|
||
```
|
||
|
||
### 프론트매터 필드
|
||
|
||
| 필드 | 필수 | 제약 조건 |
|
||
| :-------------- | :----- | :----------------------------------------------------------------------- |
|
||
| `name` | 예 | 1–64자. 소문자 영숫자와 하이픈. 선행/후행/연속 하이픈 불가. 디렉터리 이름과 일치 필수. |
|
||
| `description` | 예 | 1–1024자. 스킬이 무엇을 하고 언제 사용하는지 설명. |
|
||
| `license` | 아니오 | 라이선스 이름 또는 번들된 라이선스 파일 참조. |
|
||
| `compatibility` | 아니오 | 최대 500자. 환경 요구 사항 (제품, 패키지, 네트워크). |
|
||
| `metadata` | 아니오 | 임의의 문자열 키-값 매핑. |
|
||
| `allowed-tools` | 아니오 | 공백으로 구분된 사전 승인 도구 목록. 실험적. |
|
||
|
||
## 사용법
|
||
|
||
### 에이전트 레벨 스킬
|
||
|
||
에이전트에 스킬 디렉터리 경로를 전달합니다:
|
||
|
||
```python
|
||
from crewai import Agent
|
||
|
||
agent = Agent(
|
||
role="Researcher",
|
||
goal="Find relevant information",
|
||
backstory="An expert researcher.",
|
||
skills=["./skills"], # 이 디렉터리의 모든 스킬을 검색
|
||
)
|
||
```
|
||
|
||
### 크루 레벨 스킬
|
||
|
||
크루의 스킬 경로는 모든 에이전트에 병합됩니다:
|
||
|
||
```python
|
||
from crewai import Crew
|
||
|
||
crew = Crew(
|
||
agents=[agent],
|
||
tasks=[task],
|
||
skills=["./skills"],
|
||
)
|
||
```
|
||
|
||
### 사전 로드된 스킬
|
||
|
||
`Skill` 객체를 직접 전달할 수도 있습니다:
|
||
|
||
```python
|
||
from pathlib import Path
|
||
from crewai.skills import discover_skills, activate_skill
|
||
|
||
skills = discover_skills(Path("./skills"))
|
||
activated = [activate_skill(s) for s in skills]
|
||
|
||
agent = Agent(
|
||
role="Researcher",
|
||
goal="Find relevant information",
|
||
backstory="An expert researcher.",
|
||
skills=activated,
|
||
)
|
||
```
|
||
|
||
## 스킬 로드 방식
|
||
|
||
스킬은 점진적으로 로드됩니다 — 각 단계에서 필요한 데이터만 읽습니다:
|
||
|
||
| 단계 | 로드되는 내용 | 시점 |
|
||
| :--------------- | :------------------------------------------------ | :----------------- |
|
||
| 검색 | 이름, 설명, 프론트매터 필드 | `discover_skills()` |
|
||
| 활성화 | 전체 SKILL.md 본문 텍스트 | `activate_skill()` |
|
||
|
||
일반적인 에이전트 실행 중에 스킬은 자동으로 검색되고 활성화됩니다. `scripts/`, `references/`, `assets/` 디렉터리는 파일을 직접 참조해야 하는 에이전트를 위해 스킬의 `path`에서 사용할 수 있습니다.
|