From my-harness
작업 계획서(docs/plans/*-plan.md)를 입력으로 받아 TODO를 병렬 실행하여 코드를 작성하는 스킬. 의존성 분석 → 배치 분할 → 병렬 executor → 배치 간 검증/자가수정 패턴으로 동작. 계획 기반 구현, 자동 코딩, TODO 실행, plan execution 요청 시 이 스킬을 사용할 것.
How this skill is triggered — by the user, by Claude, or both
Slash command
/my-harness:plan-executeThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
작업 계획서의 TODO들을 분석하여 **독립적인 것끼리 병렬로**, **의존성 있는 것은 순차로** 실행한다. 각 배치 완료 후 검증하고 실패 시 자가 수정을 시도한다.
작업 계획서의 TODO들을 분석하여 독립적인 것끼리 병렬로, 의존성 있는 것은 순차로 실행한다. 각 배치 완료 후 검증하고 실패 시 자가 수정을 시도한다.
실행 승인, 자가 수정 실패 시 분기 등 결정 지점은 AskUserQuestion. 배치 계획은 preview 필드로 monospace 박스에 전체 구조를 렌더하여 실행 전 한눈에 확인 가능.
/plan-execute # 가장 최근 plan 자동 탐지
/plan-execute docs/plans/slack-list-F12345-plan.md # 특정 plan 지정
/plan-execute --todo TODO-001 TODO-003 # 특정 TODO만 실행
/plan-execute --dry-run # 실행 계획만 보고 중단
/plan-execute --priority P0 P1 # 우선순위 필터
docs/plans/*-plan.md 중 가장 최근 수정된 파일 자동 선택실행할 계획서가 없습니다.
먼저 /slack-plan을 실행하여 계획서를 생성하거나,
docs/plans/에 직접 계획서를 작성하세요.
계획서에서 ## 3. 실행 TODO 섹션을 파싱하여 각 TODO를 추출한다.
각 TODO의 필수 메타데이터:
id (TODO-XXX)titledescriptionpriority (P0/P1/P2)scope (예상 작업 범위 — 영향 파일/모듈)depends_on (선행 조건 — 다른 TODO ID 언급 시 의존성 추출)completion_criteriaslack_record_ids (Slack record_id 필드 — 없으면 빈 배열. /slack-review 연동에 사용)필터 적용:
--todo 플래그 → 지정된 TODO만--priority 플래그 → 해당 우선순위만의존성 그래프 구성:
선행 조건에서 언급된 TODO ID배치 생성 (Topological Sort):
파일 충돌 검사:
사용자에게 배치 계획을 보여주고 승인을 받는다:
## 실행 계획
### 입력
- 계획서: docs/plans/slack-list-F12345-plan.md
- 필터: priority=P0,P1
- 총 TODO: 7건 → 실행 대상 5건 (P2 2건 제외)
### 실행 순서
**배치 1 — 병렬 3건** (서로 독립적)
- TODO-001: 결제 게이트웨이 어댑터 추가
- 파일: src/integrations/stripe.ts (신규)
- TODO-002: 주문 도메인 모델 확장
- 파일: src/models/order.ts (수정)
- TODO-005: API 에러 응답 표준화
- 파일: src/middleware/error-handler.ts (신규), src/app.ts (수정)
**배치 2 — 순차 1건** (TODO-001, TODO-002 선행 필요)
- TODO-003: POST /api/v1/payments 엔드포인트
- 파일: src/api/payments.ts (신규), src/routes/index.ts (수정)
**배치 3 — 순차 1건** (TODO-003 선행 필요)
- TODO-004: 결제 완료 시 주문 상태 자동 전이
- 파일: src/services/order.ts (수정)
### 병렬도
- 최대 병렬 실행: 3
- 예상 배치 수: 3
위 실행 계획을 보여준 뒤 AskUserQuestion + preview로 승인:
AskUserQuestion({
questions: [{
question: "위 배치 계획대로 실행할까요?",
header: "Execute plan",
options: [
{ label: "전체 실행 (Recommended)",
description: "모든 배치를 순서대로 실행. 각 배치 완료 후 자동 검증 + 실패 시 최대 2회 자가 수정.",
preview: "```\n배치 1 (병렬 3): TODO-001, TODO-002, TODO-005\n배치 2 (순차 1): TODO-003\n배치 3 (순차 1): TODO-004\n병렬도 최대 3\n```" },
{ label: "Dry-run (실행 없이 계획만 확인)",
description: "--dry-run 모드로 전환. 배치 분할과 의존성 그래프 이상 없는지만 확인하고 종료." },
{ label: "필터 조정",
description: "우선순위/TODO 필터를 바꿔 실행 대상 재선정 (사용자가 자유 텍스트로 지시)" },
{ label: "중단",
description: "실행 취소. 계획서는 변경되지 않음." }
],
multiSelect: false
}]
})
--dry-run 또는 "Dry-run" 선택 시 여기서 중단.
각 배치마다:
my-harness:plan-executor 에이전트 생성 (run_in_background: true)Agent(
description: "Execute TODO-001",
subagent_type: "my-harness:plan-executor",
model: "sonnet",
run_in_background: true,
prompt: """
아래 TODO를 구현하라.
{TODO 전체 내용}
## 프로젝트 컨텍스트
- 기술 스택: {package.json 등에서 추론}
- 관련 파일: {scope 필드의 파일}
- 컨벤션: {감지된 스타일}
결과를 JSON으로 반환하라.
"""
)
[진행] 배치 1/3 — 2/3 완료
✅ TODO-001: completed (3 files, 94 lines)
✅ TODO-002: completed (1 file, 12 lines)
⏳ TODO-005: 진행중...
배치 완료 후 즉시 검증 실행:
구문 체크: 프로젝트에 맞는 기본 체크
package.json → npx tsc --noEmit 또는 npm run lintpyproject.toml → python -m py_compile 또는 ruff check결과 판정:
검증 실패 시 최대 2회 자가 수정 시도:
my-harness:quick-fix 에이전트를 각 에러 파일별로 병렬 스폰AskUserQuestion({
questions: [{
question: "자가 수정 2회 실패 (배치 N의 검증 오류). 어떻게 진행할까요?",
header: "Fix failed",
options: [
{ label: "계속 실행",
description: "검증 실패 무시하고 다음 배치 실행. 최종 리포트에 실패 이력 기록됨." },
{ label: "수동 개입 대기 (Recommended)",
description: "실행 중단. 사용자가 에러를 직접 확인/수정 후 다시 /plan-execute 실행하여 재개" },
{ label: "전체 롤백",
description: "이번 실행의 모든 변경을 git checkout으로 되돌리고 종료" }
],
multiSelect: false
}]
})
.harness/plans/{TS}-execute.json에 paused_at_batch, error_summary 기록해 다음 /plan-execute에서 재개 가능## Plan Execute 완료
### 실행 결과
| TODO | 상태 | 파일 변경 | 비고 |
|------|------|----------|------|
| TODO-001 | ✅ completed | +3 신규, +0 수정 | - |
| TODO-002 | ✅ completed | +0 신규, +1 수정 | - |
| TODO-005 | ⚠️ partial | +1 신규, +1 수정 | 테스트 미작성 (프레임워크 설정 필요) |
| TODO-003 | ✅ completed | +1 신규, +1 수정 | - |
| TODO-004 | ❌ failed | - | blockers: 외부 워크플로우 엔진 필요 |
### 요약
- 실행: 5건 | 완료: 3건 | 부분: 1건 | 실패: 1건
- 총 변경 파일: 8개 (+5 신규, +3 수정)
- 배치 실행: 3회, 자가 수정: 1회 (배치 2에서 타입 에러 해결)
### 변경 파일 목록
- src/integrations/stripe.ts (신규, 145 lines)
- src/models/order.ts (수정, +12/-3)
- ...
### 다음 단계
- `git diff`로 변경 확인
- `/code-review` 로 리뷰 수행
- 통과 시 커밋 → `/slack-review`로 Slack 반영
.harness/plans/{YYYYMMDD_HHmmss}-execute.json과 .harness/plans/{YYYYMMDD_HHmmss}-execute.md 저장.
JSON 형식:
{
"metadata": {
"date": "YYYY-MM-DDTHH:mm:ss",
"source_plan": "docs/plans/slack-list-F12345-plan.md",
"filters": {"priority": ["P0", "P1"]},
"batches": 3,
"total_todos": 5,
"completed": 3,
"partial": 1,
"failed": 1
},
"batches": [
{
"batch_number": 1,
"parallelism": 3,
"todos": ["TODO-001", "TODO-002", "TODO-005"],
"verification": {"passed": true, "attempts": 1}
}
],
"results": [
{
"todo_id": "TODO-001",
"status": "completed",
"slack_record_ids": ["Rec..."],
"files_changed": [{"path": "src/integrations/stripe.ts", "action": "created"}]
}
]
}
git status 확인, 미커밋 변경 있으면 경고git checkout -- . 또는 git stash로 복구 가능함을 안내.harness/plan-execute.json (선택):
{
"max_parallel": 5,
"max_self_fix_attempts": 2,
"auto_commit_per_batch": false,
"verification_commands": {
"typescript": "npx tsc --noEmit",
"python": "ruff check ."
}
}
선행 조건에 명시.blockers로 빠짐.npx claudepluginhub pokuding/my-harness --plugin my-harnessGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.