plan-orchestrate
affaan-m/ECC
계획 문서를 읽어들이고, 이를 단계별로 분해한 뒤, ECC 카탈로그를 활용해 단계별 에이전트 체인을 설계하며, 이를 실행하지 않고 바로 붙여넣거나 오케스트레이션할 수 있는 맞춤형 프롬프트를 생성합니다.
...모든 것을 확장하십시오계획 수립 및 조정
단계별로 붙여넣기만 하면 되는 호출 문구를 하나씩 생성하여 계획 문서를 /orchestrate custom에 연결합니다. 이 스킬은 생성 기능만 제공하며, /orchestrate를 직접 실행하지는 않습니다. 사용자는 준비가 되면 각 줄을 직접 붙여넣어야 합니다.
사용 시점
- 사용자가 여러 단계로 구성된 계획 문서(PRD, RFC, 구현 계획)를 보유하고 있으며, 이를
/orchestrate를통해 진행하고 싶어 할 때. - 사용자가 “이 계획을 오케스트레이트해 줘”, “각 단계별로 오케스트레이트 프롬프트를 제공해 줘”, “이 계획에 대한 체인을 구성해 줘”라고 말합니다.
- 단계별 계획은 존재하지만, 사용자가 단계별로 에이전트를 수동으로 선택하고 싶지 않은 경우입니다.
다음의 경우에는 건너뜁니다:
- 작업이 단일 임시 단계인 경우 → 직접
/orchestrate custom을호출합니다. - 계획서가 읽기 어렵거나 비어 있는 경우. 명시적인 번호 매기기가 없는 것만으로는 건너뛰기 조건이 되지 않습니다 — 아래의 “명확한 단계 없음” 예외 사례를 참조하십시오.
입력
[--lang=python|typescript|go|rust|cpp|java|kotlin|flutter|auto] [--scope=all|step:|range:-] [--dry-run]
— 필수; 상대 경로 또는 절대 경로(@docs/...허용).--lang— 검토 대상 언어 변형; 기본값은auto(프로젝트에서 감지됨)입니다.--scope— 출력되는 단계를 제한합니다; 기본값은all입니다.--dry-run— 분해 및 체인 근거만 출력하고, 최종 프롬프트는 출력하지 않습니다.
권위 있는 /orchestrate 형식 (이로부터 벗어나지 마십시오)
{ORCH_CMD} custom ",,...," ""
여기서 {ORCH_CMD}는 0단계에서 결정됩니다(아래 참조). 출력된 명령 문자열은 항상 하나의 구체적인 형태를 사용해야 하며, 두 가지 형태를 혼용하거나 자리 표시자를 사용해서는 안 됩니다.
custom은순차적인 체인이며, 각 에이전트의 HANDOFF가 다음 에이전트로 전달됩니다.- 쉼표로 구분된 에이전트 목록입니다. 공백은 사용하지 않는 것이 좋으나, 한 개의 공백은 허용됩니다.
--mode/--gate/--agents=...플래그는 존재하지 않으므로 절대 임의로 생성하지 마십시오.- 에이전트 이름은 이 스킬의 카탈로그에서 가져옵니다. 작업 설명에 포함된 쌍따옴표는
\"로 이스케이프 처리됩니다.
ECC 설치 형식 및 네임스페이스
두 가지 설치 형식이 슬래시 명령어 와 모든 에이전트 이름의 접두사를 결정합니다. 이 두 형식은 반드시 일치해야 하며, 출력마다 하나의 형식만 사용해야 하고 절대로 혼합해서는 안 됩니다:
~ Claude Code 홈 디렉터리를 ~/.claude (macOS/Linux) 또는 %USERPROFILE%\.claude (Windows)로 표기합니다. 호스트 플랫폼에서 사용자 홈 디렉터리를 해결하는 방식에 따라 이를 처리하십시오( ~를 하드코딩하지 마십시오).
| 형식 | 탐지 | {ORCH_CMD} |
에이전트 이름 형식 |
|---|---|---|---|
| 플러그인 설치 (1.9.0+) | 존재함 |
/everything-claude-code:orchestrate |
everything-claude-code: |
| 레거시 기본 설치 | 위 경로가 없음; 에이전트 파일은 하위에 있음 |
/orchestrate |
|
이 문제가 중요한 이유: 플러그인 설치 방식에서는 에이전트가 everything-claude-code:tdd-guide로 등록됩니다. 접미사 없는 이름은 모호한 일치(fuzzy matching)를 유발하며, 이는 병렬 호출 시 간헐적으로 실패합니다. 레거시 방식에서는 접두사가 붙은 형태가 등록되지 않아 아예 실패합니다.
사용 가능한 에이전트 목록 (이 중에서 선택해야 함)
일반:
planner— 요구사항 재진술, 위험 분해, 단계별 계획 수립architect— 아키텍처, 시스템 설계, 리팩토링 제안tdd-guide— 테스트 작성 → 구현 → 80% 이상의 커버리지 달성코드 검토자— 일반적인 코드 검토보안 검토자— 보안 감사, OWASP, 기밀 정보 유출리팩토링 정리 담당자— 사멸 코드, 중복 코드, knip 클래스 정리문서 업데이트 담당자— 문서, 코드맵, READMEdocs-lookup— 타사 라이브러리 API 조회 (Context7)e2e-runner— 종단 간 테스트 오케스트레이션database-reviewer— PostgreSQL 스키마, 마이그레이션, 성능harness-optimizer— 로컬 에이전트 하네스 구성loop-operator— 장시간 실행되는 자율 루프chief-of-staff— 다중 채널 분류 (계획 단계에는 거의 적합하지 않음)
빌드 오류 해결기:
build-error-resolver(일반) /cpp-build-resolver/go-build-resolver/java-build-resolver/kotlin-build-resolver/rust-build-resolver/pytorch-build-resolver
코드 검토자:
python-reviewer/typescript-reviewer/go-reviewer/rust-reviewer/cpp-reviewer/java-reviewer/kotlin-reviewer/flutter-reviewer
에이전트 이름에 오타가 있으면 /orchestrate가 실패합니다. 출력하기 전에 이 목록과 대조하여 확인하십시오.
작동 원리
0단계 — ECC 모드 및 언어 감지
읽기
. 누락되었거나 비어 있으면 보고하고 중단합니다.ECC 설치 양식을 한 번 감지한 후
ECC_MODE로고정합니다. 알고리즘 (순서대로 실행하며, 첫 번째 일치 항목에서 중단):존재하면 →/plugins/marketplaces/everything-claude-code/가 ECC_MODE=plugin.- 그렇지 않은 경우,
존재하고 적어도 하나의 ECC 에이전트 파일(예:/agents/가 tdd-guide.md,code-reviewer.md)을 포함하는 경우 →ECC_MODE=legacy. - 그렇지 않은 경우 → 기본적으로
ECC_MODE=legacy로설정하고 출력 상단에 한 줄의 경고를 표시합니다:> 경고: ECC 설치를 감지할 수 없음; 기본적으로 레거시 형식으로 설정됩니다. 플러그인 설치를 사용하는 경우 접두사를 수동으로 편집하십시오. - 두 마커가 모두 존재하는 경우(혼합 설치),
플러그인이우선합니다. 즉, 플러그인 네임스페이스만이 퍼지 매칭 없이 에이전트 이름을 해결합니다.
이 시점부터 출력되는 모든 줄은 슬래시 명령 과 모든 에이전트 이름에 일치하는 접두사를 사용합니다. 동일한 출력에 두 형식을 모두 출력해서는 안 됩니다.
--lang을해결합니다.'auto'인경우, 다중 언어 감지 기능을 실행합니다:- 탐지 마커:
pyproject.toml/uv.lock/requirements.txt→ python;package.json→ typescript;go.mod→ go;Cargo.toml→ rust;CMakeLists.txt또는 최상위*.cpp→ cpp;pom.xml/build.gradle(Java) → java;build.gradle.kts또는 최상위 Kotlin → kotlin;pubspec.yaml→ flutter. - 다중 언어 동점 처리: 일치하는 마커가 두 개 이상인 경우, 소스 파일 수가 가장 많은 언어를 선택합니다(
git ls-files를통해 집계하며,vendor/,node_modules/,dist/,build/,.venv/, 생성된 파일 및 명백한 테스트 피처는 제외). 동점인 경우나 어떤 언어도 소스 파일의 60%를 초과하지 않는 경우,lang=unknown으로설정합니다. - 일치하는 마커가 없는 경우 →
lang=unknown으로설정합니다. lang=unknown은센티넬(sentinel)이며, 에이전트 이름이 아닙니다. 2단계 규칙 4와 5는 체인 구성 시점에 이를코드 검토자(code-reviewer)또는빌드 오류 해결자(build-error-resolver)로 변환합니다.
- 탐지 마커:
PyTorch 하위 프로필 감지:
lang=python이고pyproject.toml/requirements.txt/uv.lock중 어느 하나라도torch에대한 의존성을 선언하면pytorch=true로설정합니다. 이는빌드체인 선택(아래 2단계 규칙)에만 영향을 미치며, 검토자는python-reviewer로유지됩니다.계획에 선언된 모든 에이전트 이름을 정규화: 계획 텍스트에서 에이전트를 플러그인 접두사가 붙은 형태(예:
everything-claude-code:tdd-guide)로 참조하는 경우, 체인을 검증하거나 구성하기 전에 접두사를 제거하여 기본 카탈로그 이름을 얻습니다. 접두사 재부여는ECC_MODE에따라 출력 시점(4단계)에만 수행됩니다. 접두사가 미리 부여된 이름이 체인 구성 단계로 유입되지 않도록 하십시오. 그렇지 않으면 플러그인 모드에서 접두사가 중복 적용될 수 있습니다.
1단계 — 단계 분해
우선순위 순서대로 “단계 단위”를 식별합니다:
- 명시적인 번호 매기기:
## 단계 N/### 단계 N/## N. .../ 최상위 순서 목록. - 표의 “단계(Step)” 열.
----로 구분된블록과 동사 중심의 제목.- 그렇지 않은 경우 각 H2를 하나의 단계로 취급합니다.
단계별로 ID (1부터 시작), 제목 (80자 이하), 의도 (1~3문장), 태그를 추출합니다.
2단계 — 태그 지정 및 체인 선정
의도에 따라 태그 지정(다중 태그 허용; 1차 태그 + 중첩된 2차 태그로 체인 구성):
아래의 트리거 단어는 대소문자를 구분하지 않고 일치시킵니다. 다국어 계획은 의미가 나열된 영어 트리거 단어와 일치하는 한, 어떤 언어의 어간과도 일치시켜 지원됩니다.
| 태그 | 트리거 단어 | 기본 체인 |
|---|---|---|
design |
건축, 디자인, 선택, 평가, RFC | 기획자, 건축가 |
계획 |
계획, 세부 계획, 주요 단계 | 기획자 |
구현 |
구현, 빌드, 추가, 생성, 이식 | tdd-guide, |
테스트 |
테스트, 커버리지, E2E, 통합 | tdd-guide, e2e-runner |
리팩토링 |
리팩토링, 정리, 중복 제거, 분할 | 아키텍트, 리팩터-클리너, |
마이그레이션 |
마이그레이션, 업그레이드, 재작성, 이식 | 아키텍트, tdd-guide, |
db |
스키마, 마이그레이션, 인덱스, SQL, Postgres, alembic, sqlmodel | 데이터베이스 검토자, |
보안 |
암호화, 인증, 비밀 정보, OWASP, PII | 보안 검토자, |
빌드 |
빌드, 컴파일, 린트 실패, CI | ( 빌드-오류-해결기로 대체됨) |
문서 |
문서, readme, 코드맵, 변경 내역 | doc-updater |
조회 |
lookup, reference, API 사용법 | docs-lookup |
검토 |
검토, 감사, 검증 | |
루프 |
루프, 자율, 워치독 | 루프 연산자 |
체인 구성 규칙:
- 주 태그 선택: 한 단계가 여러 태그와 일치할 경우, 테이블 순서상 첫 번째 태그 (테이블 상단 = 최우선순위)가 주 태그가 되며, 나머지는 보조 태그가 됩니다. 아래의 구성 규칙 2와 3은 특정 다중 태그 조합을 명시적으로 처리하며, 그 외의 경우에는 태그 테이블 순서대로 보조 체인을 추가합니다.
impl+security→tdd-guide,.-reviewer, security-reviewer impl+db→tdd-guide,database-reviewer,.-reviewer - 결과 체인에서 중복을제거합니다 (첫 번째 발생 항목은 유지). 예:
review+lang=unknown은규칙 5 적용 후code-reviewer,code-reviewer가되지만, 중복 제거를 통해code-reviewer로통합됩니다. -reviewer는 lang=unknown일 때code-reviewer로 해결됩니다.- build-resolver는lang=unknown일때build-error-resolver로 해결됩니다. 특수한 경우: Phase 0에서pytorch=true로설정된 경우,.python-build-resolver는존재하지 않으며,pytorch=true가설정되지 않은 상태에서--lang=python을 지정하면build-error-resolver로 해결됩니다.- 태그가 없는 단계: 일치하는 트리거 단어가 없으면 체인을
code-reviewer로설정하고'일치하는 태그 없음'이라고기록합니다."체인 근거" 항목에는기본적으로 review-only 체인이표시됩니다. - 중복 제거 후 체인 길이는 4 이하여야 합니다. 이를 초과할 경우 가장 약한 태그(
검색및문서태그부터 우선)를 제거합니다. 임플레멘테이션체인에서는플래너와아키텍트를짝지우지 마십시오(토큰 낭비).디자인단계에서만 짝지우십시오.impl,refactor또는migration태그가 지정된 단계는 reviewer-class 에이전트(,-reviewer code-reviewer,security-reviewer또는database-reviewer중 하나)로 끝납니다. 해당 도메인에 가장 특화된 검토자가 마지막 위치를 차지합니다(예: 규칙 2의impl+security는security-reviewer로끝나고, 규칙 3의impl+db는끝납니다.-reviewer로 database-reviewer가체인의 앞부분에서 이미 마이그레이션을 게이트 처리했기 때문입니다).테스트및빌드단계는 각각의 유효성 검사기(각각e2e-runner및 빌드 해결기)에 의해 제어되며, 추가 검토자가 필요하지 않습니다.
3단계 — 작업 설명 압축
발생된 각 는 다음 조건을 충족해야 합니다:
- 자립적이어야 합니다(첫 번째 에이전트가 계획 문서를 열어둘 필요가 없음).
[Plan:로 시작해야 합니다.#step- ] - 검증 가능한 1~3개의 수용 기준을 포함해야 합니다.
- 계획에서 해당 단계에 대한 범위 제한(
범위 외: ...) 을 명시한 경우에만 이를 포함해야 합니다. 그대로 그대로 상속받아야 합니다. 계획에 범위 외 문구가 없는 경우, 해당 절을 완전히 생략해야 하며 — 임의로 만들어서는 안 됩니다. - 200~600자, 한 줄로 작성하십시오.
"는\"로 이스케이프 처리하고, 리터럴 줄바꿈은 사용하지 마십시오.
4단계 — 출력
ECC_MODE에 의해 결정된 형식을 사용하여 마크다운을 출력하십시오. 출력은 전체적으로 하나의 형식을 사용해야 합니다. 모든 {ORCH_CMD} 와 모든 에이전트 이름은 0단계에서 지정된 일치하는 접두사와 함께 렌더링됩니다. 두 가지 형식을 모두 출력해서는 안 되며, 렌더링된 출력에 “이것은 플러그인 형식입니다” / “접두사를 제거하세요”와 같은 지침을 포함해서는 안 됩니다.
구체적인 렌더링 규칙:
{ORCH_CMD}=플러그인환경에서는/everything-claude-code:orchestrate,레거시환경에서는/orchestrate.{AGENT(name)}=플러그인환경에서는everything-claude-code:,레거시환경에서는.- 개요 표의 "Chain" 열은 동일한
{AGENT(name)}렌더링을 사용합니다. - 단계별 bash 블록에는 실행 가능한 명령만 포함됩니다.
# plugin 형식이나# legacy 형식주석은 없습니다. 형식은 암시적이며 전체 출력에서 일관되게 적용됩니다.
출력 구조:
# Plan-Orchestrate 결과
**계획**: ``
**언어**: ``
**ECC 모드**: ``
**단계**:
**범위**:
## 단계 개요
| # | 제목 | 태그 | 체인 |
|---|---|---|---|
| 1 | ... | impl, db | `{AGENT(tdd-guide)},{AGENT(database-reviewer)},{AGENT(python-reviewer)}` |
| ... | | | |
---
## 1단계 —
**의도**: <1–3 sentences>
**태그**:
**체인 근거**:
```bash
{ORCH_CMD} custom "{AGENT(tdd-guide)},{AGENT(database-reviewer)},{AGENT(python-reviewer)}" "[계획: docs/foo.md#step-1] ; 승인: <1–3 items>; 범위 외: <…>"
```
위의
{ORCH_CMD}및{AGENT(...)}표기법은 이 스킬이 실행 시 수행하는 대체 작업을 설명합니다. 실제로 출력되는 마크다운에는 해결된 문자열만 포함되며, 자리 표시자는 절대 포함되지 않습니다.
사용자가 모든 명령어를 한 번에 붙여넣을 수 있도록, 각 단계의 명령어를 순서대로 집계하는 최종 “일괄 실행” 블록을 추가하십시오. “개요 전용” 모드에서는 일괄 블록을 생략하십시오 (“대규모 계획” 예외 사례 참조): 개요 테이블만 출력되는 경우, 집계할 단계별 명령어가 없습니다.
5단계 — 자체 점검 (출력 전 실행)
- 모든 체인의 모든 에이전트는 카탈로그에서 가져옵니다(계획에 나타난
everything-claude-code:접두사를 제거한 후; 0단계 5단계 참조). - 해결된
{ORCH_CMD}와 모든 해결된{AGENT(...)}는동일한 형식(플러그인또는레거시)을 사용하며, 하나의 출력에서 절대 혼합되지 않습니다. - 렌더링된 출력물에는
# 플러그인 형식/# 레거시 형식주석이나 “접두사 제거” 지침이 남아 있지 않습니다. -
--mode/--gate/--agents=...필드가 임의로 생성되지 않습니다. - 각 작업 설명은 한 줄로, 큰따옴표로 묶여 있으며,
"는이스케이프 처리됩니다. - 각 작업 설명은
[Plan:로 시작하며, Acceptance(1–3개 항목)를 포함합니다.#step- ] Out of scope:절은 계획에서 상속된 경우에만 나타납니다. - 2단계 중복 제거 후 어떤 체인에서도 중복 에이전트가 없어야 합니다.
- 체인 길이는 4 이하입니다.
-
impl/refactor/migration태그가 지정된 단계는 검토자 클래스 에이전트(,-reviewer code-reviewer,security-reviewer또는database-reviewer)로 끝납니다.test및build는예외입니다 — 2단계 규칙 10을 참조하십시오. - 태그가 없는 단계는
'일치하는 태그가 없음'이라는 근거와 함께code-reviewer를출력하며, 기본값은 검토 전용 체인입니다. - 개요 표에는
--scope와 관계없이 계획의 모든 단계가 나열됩니다. - 단계별 세부 정보 블록 수는 해결된
--scope와일치합니다(--scope=all인경우 전체 계획;step:n인 경우 하나의 블록;range:a-b인 경우 범위 크기). 개요 전용 모드에서는 단계별 블록과 Batch 블록이 생성되지 않습니다.
경계 사례
- 명확한 단계가 없는 경우: H2/H3 분할을 우선적으로 고려합니다. 그래도 모호한 경우, 문서 개요와 함께 “구조화된 단계가 감지되지 않음”을 보고하고, 사용자에게 개요에 따라 실행할지 확인을 요청합니다.
- 대규모 계획(1500줄 초과): 개요 전용 모드로 진입 — 개요 테이블만 출력하고, 세부 정보를 확인하기 위해 다시 실행하기 전에
--scope를사용하여 범위를 좁힐 것을 사용자에게 요청합니다. 이 모드에서는 단계별 세부 블록과 배치 실행 블록을 생략합니다. - 단계가 너무 광범위할 경우(예: “모든 백엔드 작업 완료”): 단일 체인을 강제로 생성하지 마십시오. N.a와 N.b로 분할할 것을 제안하고 분할 방안을 제시하십시오.
- 계획에 에이전트가 선언된 경우(드물게 발생): 먼저
everything-claude-code:접두사를 모두 제거하여 기본 카탈로그 이름만 추출한 후(Phase 0 단계 5), 카탈로그와 대조하여 유효성을 검증합니다. 유효하지 않은 에이전트는 교체하고 "Chain rationale" 항목에 그 이유를 설명합니다. 기본 이름은 출력 시점에ECC_MODE에따라 접두사가 다시 추가됩니다. -
--lang=auto로승자를 선택할 수 없는 다국어 프로젝트:lang=unknown으로설정하십시오. 검토자는code-reviewer로, 빌드 해결자는build-error-resolver로해결하십시오. “체인 근거” 항목에 대체 방안을 명시하십시오.
예시
예시 1 — 플러그인 모드, Python 계획
입력:
plan-orchestrate @docs/plan/example-feature.md --lang=python
예상 출력 발췌문:
## 2단계 — 민감한 UserProfile 필드 암호화
**목적**: `EncryptedString` SQLAlchemy 타입을 도입하고, 데이터 저장 전에 `birth_datetime` / `location`을 AES-GCM으로 암호화하며, 환경 변수에서 키를 불러옵니다.
**태그**: impl, security, db
**체인 구성 근거**: 보안에 민감한 쓰기 경로이므로 `security-reviewer`가 체인을 마무리합니다. `database-reviewer`는 Alembic 마이그레이션을 검증하고, `python-reviewer`는 타입 지정 및 PEP 8 준수를 검토합니다.
```bash
/everything-claude-code:orchestrate custom "everything-claude-code:tdd-guide,everything-claude-code:database-reviewer,everything-claude-code:python-reviewer,everything-claude-code:security-reviewer" "[계획: docs/plan/example-feature.md#step-2] EncryptedString SQLAlchemy 타입을 구현하고 UserProfile.birth_datetime/location 열을 마이그레이션합니다. 키는 ENV의 APP_DB_KEY에서 가져옵니다. 수락 기준: 암호화/복호화 왕복 테스트 통과; 빈 데이터베이스에서 Alembic 업그레이드/다운그레이드 정상 수행; 마이그레이션 후 데이터베이스에 평문 데이터 없음; 범위 외: 테넌트 간 프로필 공유 로직"
```
예제 2 — 레거시 모드, 동일한 단계
ECC_MODE=legacy가 감지된 경우, 동일한 단계가 단일 통합 명령어로 출력됩니다(출력 어디에도 플러그인 접두사가 붙은 형식이 없음):
/orchestrate custom "tdd-guide,database-reviewer,python-reviewer,security-reviewer" "[Plan: docs/plan/example-feature.md#step-2] ..."
위의 두 예시는 서로 다른 두 환경에서 발생할 수 있는 두 가지 출력 형태를 보여줍니다. 단일 스킬 호출은 이 중 하나만을 처음부터 끝까지 생성합니다.
참고
- 생성 전용입니다. 이 스킬 내부에서
/orchestrate를호출해서는 안 됩니다. - 작업 설명의 언어는 계획 문서의 언어와 일치시켜야 합니다(에이전트 이름은 항상 영어로 유지됩니다).
- 사용자가 명시적으로 요청하지 않는 한, 출력에 "Co-Authored-By" 줄이나 이모티콘을 삽입하지 마십시오.
---
name: plan-orchestrate
description: Reads a plan document, decomposes it into steps, designs a per-step agent chain from the ECC catalogue, and emits ready-to-paste /orchestrate custom prompts without executing them.
---
# Plan Orchestrate
Bridge a plan document to `/orchestrate custom` by emitting one ready-to-paste invocation per step. The skill is generative only — it never executes `/orchestrate`. The user pastes each line when ready.
## When to Activate
- User has a multi-step plan document (PRD, RFC, implementation plan) and wants to drive it through `/orchestrate`.
- User says "orchestrate this plan", "give me orchestrate prompts for each step", "compose chains for this plan".
- A step-by-step plan exists but the user does not want to manually pick agents per step.
Skip when:
- The work is one ad-hoc step → call `/orchestrate custom` directly.
- The plan is unreadable or empty. Lack of explicit numbering alone is not a skip condition — see the "No clear steps" edge case below.
## Inputs
```
<plan-doc-path> [--lang=python|typescript|go|rust|cpp|java|kotlin|flutter|auto] [--scope=all|step:<n>|range:<a>-<b>] [--dry-run]
```
- `<plan-doc-path>` — required; relative or absolute path (`@docs/...` accepted).
- `--lang` — reviewer language variant; defaults to `auto` (detected from project).
- `--scope` — limits emitted steps; defaults to `all`.
- `--dry-run` — print decomposition + chain rationale only; do not emit final prompts.
## Authoritative `/orchestrate` shape (do not deviate)
```
{ORCH_CMD} custom "<agent1>,<agent2>,...,<agentN>" "<task description>"
```
Where `{ORCH_CMD}` is determined in Phase 0 (see below). The command string in the emitted output **always uses one concrete form** — never both, never a placeholder.
- `custom` is a sequential chain; each agent's HANDOFF feeds the next.
- Comma-separated agent list. No spaces preferred; one space tolerated.
- No `--mode` / `--gate` / `--agents=...` flags exist — never invent them.
- Agent names come from the catalogue in this skill. Embedded double quotes in the task description are escaped as `\"`.
## ECC install form and namespacing
Two install forms determine the prefix on **both** the slash command and every agent name. The two MUST stay in sync — one form per output, never mixed:
Let `<claude-home>` denote the Claude Code home directory: `~/.claude` on macOS/Linux, `%USERPROFILE%\.claude` on Windows. Resolve it the way the host platform resolves the user home directory (do not hardcode `~`).
| Form | Detection | `{ORCH_CMD}` | Agent name format |
|---|---|---|---|
| Plugin install (1.9.0+) | `<claude-home>/plugins/marketplaces/everything-claude-code/` exists | `/everything-claude-code:orchestrate` | `everything-claude-code:<name>` |
| Legacy bare install | Above absent; agent files under `<claude-home>/agents/` | `/orchestrate` | `<name>` |
Why this matters: under the plugin install, agents register as `everything-claude-code:tdd-guide`. Bare names force fuzzy matching, which fails intermittently under parallel calls. Under legacy, the prefixed forms are not registered and fail outright.
## Available agent catalogue (must pick from these)
General:
- `planner` — requirement restatement, risk decomposition, step planning
- `architect` — architecture, system design, refactor proposals
- `tdd-guide` — write tests → implement → 80%+ coverage
- `code-reviewer` — generic code review
- `security-reviewer` — security audit, OWASP, secret leakage
- `refactor-cleaner` — dead code, duplicates, knip-class cleanup
- `doc-updater` — documentation, codemap, README
- `docs-lookup` — third-party library API lookups (Context7)
- `e2e-runner` — end-to-end test orchestration
- `database-reviewer` — PostgreSQL schema, migration, performance
- `harness-optimizer` — local agent harness configuration
- `loop-operator` — long-running autonomous loops
- `chief-of-staff` — multi-channel triage (rarely a fit for plan steps)
Build error resolvers:
- `build-error-resolver` (generic) / `cpp-build-resolver` / `go-build-resolver` / `java-build-resolver` / `kotlin-build-resolver` / `rust-build-resolver` / `pytorch-build-resolver`
Code reviewers:
- `python-reviewer` / `typescript-reviewer` / `go-reviewer` / `rust-reviewer` / `cpp-reviewer` / `java-reviewer` / `kotlin-reviewer` / `flutter-reviewer`
A misspelled agent name fails `/orchestrate`. Cross-check against this list before emitting.
## How It Works
### Phase 0 — Detect ECC mode + language
1. Read `<plan-doc-path>`. If missing or empty, report and stop.
2. Detect ECC install form once and freeze it into `ECC_MODE`. Algorithm (run in order, stop at the first match):
1. If `<claude-home>/plugins/marketplaces/everything-claude-code/` exists → `ECC_MODE=plugin`.
2. Else if `<claude-home>/agents/` exists and contains at least one ECC agent file (e.g. `tdd-guide.md`, `code-reviewer.md`) → `ECC_MODE=legacy`.
3. Else → default to `ECC_MODE=legacy` and emit a one-line warning at the top of the output: `> Warning: could not detect ECC install; defaulting to legacy form. If you use the plugin install, edit the prefixes manually.`
4. If both markers exist (mixed install), `plugin` wins — the plugin namespace is the only one that resolves agent names without fuzzy matching.
From this point on, every emitted line uses the matching prefix on **both** the slash command and every agent name. **Never emit both forms in the same output.**
3. Resolve `--lang`. When `auto`, run a polyglot-aware detection:
- Probe markers: `pyproject.toml` / `uv.lock` / `requirements.txt` → python; `package.json` → typescript; `go.mod` → go; `Cargo.toml` → rust; `CMakeLists.txt` or top-level `*.cpp` → cpp; `pom.xml` / `build.gradle` (Java) → java; `build.gradle.kts` or top-level Kotlin → kotlin; `pubspec.yaml` → flutter.
- **Polyglot tie-break**: if more than one marker matches, pick the language whose source files outnumber the others (count via `git ls-files`, excluding `vendor/`, `node_modules/`, `dist/`, `build/`, `.venv/`, generated files, and obvious test fixtures). On a tie or when no language exceeds 60% of source files, set `lang=unknown`.
- No marker matched → set `lang=unknown`.
- `lang=unknown` is a sentinel — it is **not** an agent name. Phase 2 rules 4 and 5 turn it into `code-reviewer` / `build-error-resolver` at chain composition time.
4. Detect a **PyTorch sub-profile**: when `lang=python` and any of `pyproject.toml` / `requirements.txt` / `uv.lock` declares a dependency on `torch`, set `pytorch=true`. This only affects `build` chain selection (Phase 2 rule below); the reviewer remains `python-reviewer`.
5. **Normalize any agent names declared in the plan**: if the plan text references agents by their plugin-prefixed form (e.g. `everything-claude-code:tdd-guide`), strip the prefix to get the bare catalogue name before validating or composing chains. Re-prefixing happens only at output time per `ECC_MODE` (Phase 4). Never let a pre-prefixed name flow into chain composition — it would double-prefix in plugin mode.
### Phase 1 — Decompose steps
Identify "step units" in priority order:
1. Explicit numbering: `## Step N` / `### Phase N` / `## N. ...` / top-level ordered list.
2. A "Step" column in a table.
3. `---`-separated blocks with verb-led headings.
4. Otherwise treat each H2 as one step.
Per step extract `id` (1-based), `title` (≤ 80 chars), `intent` (1–3 sentences), `tags`.
### Phase 2 — Tag and pick chain
Tag by intent (multi-tag allowed; chain built from primary + stacked secondaries):
Trigger words below are matched case-insensitively. Multilingual plans are supported by matching the word stems in any language as long as the meaning aligns with the listed English trigger words.
| Tag | Trigger words | Default chain |
|---|---|---|
| `design` | architecture, design, choose, evaluate, RFC | `planner,architect` |
| `plan` | plan, breakdown, milestone | `planner` |
| `impl` | implement, build, add, create, port | `tdd-guide,<lang>-reviewer` |
| `test` | test, coverage, e2e, integration | `tdd-guide,e2e-runner` |
| `refactor` | refactor, cleanup, dedupe, split | `architect,refactor-cleaner,<lang>-reviewer` |
| `migration` | migrate, upgrade, rewrite, port | `architect,tdd-guide,<lang>-reviewer` |
| `db` | schema, migration, index, SQL, Postgres, alembic, sqlmodel | `database-reviewer,<lang>-reviewer` |
| `security` | encrypt, auth, secret, OWASP, PII | `security-reviewer,<lang>-reviewer` |
| `build` | build, compile, lint failure, CI | `<lang>-build-resolver` (falls back to `build-error-resolver`) |
| `docs` | docs, readme, codemap, changelog | `doc-updater` |
| `lookup` | lookup, reference, API usage | `docs-lookup` |
| `review` | review, audit, verify | `<lang>-reviewer,code-reviewer` |
| `loop` | loop, autonomous, watchdog | `loop-operator` |
Chain composition rules:
1. **Primary tag selection**: when a step matches multiple tags, the **first one in table order** (top of the table = highest priority) is the primary; the rest are secondaries. Composition rules 2 and 3 below handle specific multi-tag combinations explicitly; otherwise, append secondary chains in tag table order.
2. `impl` + `security` → `tdd-guide,<lang>-reviewer,security-reviewer`.
3. `impl` + `db` → `tdd-guide,database-reviewer,<lang>-reviewer`.
4. **Deduplicate** the resulting chain (preserve first occurrence). E.g. `review` + `lang=unknown` would yield `code-reviewer,code-reviewer` after rule 5; deduplication collapses it to `code-reviewer`.
5. `<lang>-reviewer` resolves to `code-reviewer` when `lang=unknown`.
6. `<lang>-build-resolver` resolves to `build-error-resolver` when `lang=unknown`. **Special case**: if Phase 0 set `pytorch=true`, use `pytorch-build-resolver` for `build` chains regardless of `<lang>`. There is no `python-build-resolver`; `--lang=python` without `pytorch=true` resolves to `build-error-resolver`.
7. **Zero-tag steps**: if no trigger word matches, set chain to `code-reviewer` and write `no tag matched; default review-only chain` under "Chain rationale".
8. Chain length ≤ 4 after deduplication. If exceeded, drop weakest tag (`lookup` and `docs` first).
9. Do not pair `planner` and `architect` in an `impl` chain (token waste). Pair them only on `design` steps.
10. Steps tagged `impl`, `refactor`, or `migration` end with a **reviewer-class** agent — any of `<lang>-reviewer`, `code-reviewer`, `security-reviewer`, or `database-reviewer`. The most domain-specific reviewer wins the tail position (e.g. rule 2's `impl+security` ends with `security-reviewer`; rule 3's `impl+db` ends with `<lang>-reviewer` because `database-reviewer` already gates the migration earlier in the chain). `test` and `build` steps are gated by their own validators (`e2e-runner` and the build resolver respectively) and do not require an additional reviewer.
### Phase 3 — Compress task description
Each emitted `<task description>` must:
- Be self-contained (the first agent does not need the plan document open).
- Start with `[Plan: <path>#step-<id>]`.
- Include 1–3 verifiable Acceptance criteria.
- Include a Scope guard (`Out of scope: ...`) **only if the plan declares one for this step**. Inherit verbatim. If the plan has no out-of-scope statement, omit the clause entirely — do not invent one.
- Be 200–600 characters; one line; embedded `"` escaped as `\"`; no literal newlines.
### Phase 4 — Output
Emit Markdown using **the form determined by `ECC_MODE`**. The output uses one form throughout — every `{ORCH_CMD}` and every agent name is rendered with the matching prefix from Phase 0. **Do not emit both forms; do not include "this is plugin form" / "strip the prefix" instructions in the rendered output.**
Concrete rendering rules:
- `{ORCH_CMD}` = `/everything-claude-code:orchestrate` under `plugin`, `/orchestrate` under `legacy`.
- `{AGENT(name)}` = `everything-claude-code:<name>` under `plugin`, `<name>` under `legacy`.
- The overview-table "Chain" column uses the same `{AGENT(name)}` rendering.
- Per-step bash blocks contain only the runnable command. **No `# plugin form` or `# legacy form` comments** — the form is implicit and uniform across the whole output.
Output structure:
````markdown
# Plan-Orchestrate Result
**Plan**: `<path>`
**Lang**: `<detected-or-given>`
**ECC mode**: `<plugin | legacy>`
**Steps**: <N>
**Scope**: <all | step:n | range:a-b>
## Steps overview
| # | Title | Tags | Chain |
|---|---|---|---|
| 1 | ... | impl, db | `{AGENT(tdd-guide)},{AGENT(database-reviewer)},{AGENT(python-reviewer)}` |
| ... | | | |
---
## Step 1 — <title>
**Intent**: <1–3 sentences>
**Tags**: <a, b>
**Chain rationale**: <why this chain; which agent closes the loop>
```bash
{ORCH_CMD} custom "{AGENT(tdd-guide)},{AGENT(database-reviewer)},{AGENT(python-reviewer)}" "[Plan: docs/foo.md#step-1] <compressed task description>; Acceptance: <1–3 items>; Out of scope: <…>"
```
````
> The `{ORCH_CMD}` and `{AGENT(...)}` notation above describes the substitution this skill performs at runtime. The actual emitted Markdown contains the resolved strings, never the placeholders.
Append a final "Batch execution" block aggregating every step's command in order so the user can paste them all at once. **Skip the Batch block in overview-only mode** (see "Large plan" edge case): when only the overview table is being emitted, there are no per-step commands to aggregate.
### Phase 5 — Self-check (run before emitting)
- [ ] Every agent in every chain comes from the catalogue (after stripping any `everything-claude-code:` prefix that appeared in the plan; see Phase 0 step 5).
- [ ] Resolved `{ORCH_CMD}` and every resolved `{AGENT(...)}` use the **same** form (`plugin` or `legacy`) — never mixed in one output.
- [ ] No `# plugin form` / `# legacy form` annotations and no "strip the prefix" instructions remain in the rendered output.
- [ ] No invented `--mode` / `--gate` / `--agents=...` fields.
- [ ] Each task description is single-line, double-quoted, with embedded `"` escaped.
- [ ] Each task description begins with `[Plan: <path>#step-<id>]` and includes Acceptance (1–3 items). The `Out of scope:` clause is present only when inherited from the plan.
- [ ] No duplicate agent in any chain after Phase 2 dedup.
- [ ] Chain length ≤ 4.
- [ ] Steps tagged `impl`/`refactor`/`migration` end with a reviewer-class agent (`<lang>-reviewer`, `code-reviewer`, `security-reviewer`, or `database-reviewer`). `test` and `build` are exempt — see Phase 2 rule 10.
- [ ] Zero-tag steps emit `code-reviewer` with the rationale `no tag matched; default review-only chain`.
- [ ] Overview table lists every step in the plan, regardless of `--scope`.
- [ ] Per-step detail block count matches the resolved `--scope` (full plan when `--scope=all`; one block for `step:n`; range size for `range:a-b`). In overview-only mode, no per-step blocks and no Batch block are emitted.
## Edge cases
- **No clear steps**: prefer H2/H3 splitting; if still ambiguous, report "no structured steps detected" with the document outline and ask the user to confirm running by outline.
- **Large plan (>1500 lines)**: enter **overview-only mode** — emit only the overview table and ask the user to narrow with `--scope` before re-running for details. In this mode, skip per-step detail blocks and skip the Batch execution block.
- **Step too broad** (e.g. "complete all backend work"): do not force a single chain. Suggest splitting into N.a and N.b and propose a split.
- **Plan declares agents** (rare): first **strip any `everything-claude-code:` prefix** to get the bare catalogue name (Phase 0 step 5), then validate against the catalogue. Replace invalid agents and explain under "Chain rationale". The bare name is re-prefixed at output time per `ECC_MODE`.
- **Polyglot project where `--lang=auto` cannot pick a winner**: set `lang=unknown`; reviewer resolves to `code-reviewer` and build resolver to `build-error-resolver`. Mention the fallback under "Chain rationale".
## Examples
### Example 1 — Plugin mode, Python plan
Input:
```
plan-orchestrate @docs/plan/example-feature.md --lang=python
```
Excerpt of expected output:
````markdown
## Step 2 — Encrypt sensitive UserProfile fields
**Intent**: Introduce an `EncryptedString` SQLAlchemy type and AES-GCM encrypt `birth_datetime` / `location` before persistence; load the key from an environment variable.
**Tags**: impl, security, db
**Chain rationale**: Security-sensitive write path, so `security-reviewer` closes the chain; `database-reviewer` validates the alembic migration; `python-reviewer` covers typing and PEP 8.
```bash
/everything-claude-code:orchestrate custom "everything-claude-code:tdd-guide,everything-claude-code:database-reviewer,everything-claude-code:python-reviewer,everything-claude-code:security-reviewer" "[Plan: docs/plan/example-feature.md#step-2] Implement EncryptedString SQLAlchemy type and migrate UserProfile.birth_datetime/location columns; key from ENV APP_DB_KEY; Acceptance: encrypt/decrypt roundtrip tests pass; alembic upgrade/downgrade clean on empty DB; no plaintext in DB after migrate; Out of scope: cross-tenant profile sharing logic"
```
````
### Example 2 — Legacy mode, same step
If `ECC_MODE=legacy` were detected, the same step would be emitted as a single uniform command (no plugin-prefixed forms anywhere in the output):
```bash
/orchestrate custom "tdd-guide,database-reviewer,python-reviewer,security-reviewer" "[Plan: docs/plan/example-feature.md#step-2] ..."
```
The two examples above illustrate **the two possible outputs** for two different environments. A single skill invocation produces only one of them, end to end.
## Notes
- Generative only. Never invoke `/orchestrate` from inside this skill.
- Match the language of the plan document for task descriptions (agent names always remain English).
- Do not insert "Co-Authored-By" lines or emoji in the output unless the user explicitly asks.
모든 파일
1개 파일plan-orchestrate 설치
스킬 파일을 다운로드하여 .claude/skills/ 디렉터리에 압축을 풀어주세요.
ZIP 다운로드저장소를 클론하고 스킬 파일을 프로젝트에 복사하세요.
git clone https://github.com/affaan-m/ECC/tree/main/skills/plan-orchestrate # Copy SKILL.md to your .claude/skills/ directory
복사





집
