SuperAPI AI Directory

08-wrap

General & other

View repository

Updated 10-16 06:51

About this skill

Wrapping up work

Overview

When implementation is done, wrap up cleanly.

If you finish without wrapping up:

  • Changes get scattered
  • You don't know how far you got next time
  • Unnecessary files remain
  • What you learned disappears

Notification at the start: "I will wrap up the work using the wrap skill."

┌──────────────────────────────────────────────────────────────────────┐
│                    Wrap 워크플로우 (Enhanced)                         │
└──────────────────────────────────────────────────────────────────────┘

┌─────────────────┐ │ Implementation complete │ └────────┬────────┘ │ ▼ ┌─────────────────┐ │ 1. Verify tests │ npm test / pytest └────────┬────────┘ │ ┌─────┴─────┐ │ │ ▼ ▼ ┌──────┐ ┌──────┐ │ PASS │ │ FAIL │──▶ Fix tests first! └──┬───┘ └──────┘ │ ▼ ┌─────────────────┐ │ 2. Check status │ git status / branch └────────┬────────┘ │ ▼ ┌─────────────────────────────────────────────────────────────────┐ │ 3. Extract session insights │ │ ┌──────────────────────────────────────────────────────────┐ │ │ │ Phase 1: Parallel analysis │ │ │ │ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │ │ │ │ │ doc-updater │ │ automation- │ │ learning- │ │ │ │ │ │ │ │ scout │ │ extractor │ │ │ │ │ └──────┬───────┘ └──────┬───────┘ └──────┬───────┘ │ │ │ │ │ │ │ │ │ │ │ └────────────────┼────────────────┘ │ │ │ │ ▼ │ │ │ │ Phase 2: Sequential Validation │ │ │ │ ┌────────────────────────────────┐ │ │ │ │ │ duplicate-checker │ │ │ │ │ └────────────────┬───────────────┘ │ │ │ │ │ │ │ │ │ ▼ │ │ │ │ ┌────────────────────────────────┐ │ │ │ │ │ followup-suggester │ │ │ │ │ └────────────────────────────────┘ │ │ │ └──────────────────────────────────────────────────────────┘ │ └────────────────────────┬────────────────────────────────────────┘ │ ▼ ┌─────────────────┐ │ 4. Option Selection │ └────────┬────────┘ │ ┌────────┼────────┬────────┐ │ │ │ │ ▼ ▼ ▼ ▼ ┌────┐ ┌────┐ ┌────┐ ┌────┐ │ 1 │ │ 2 │ │ 3 │ │ 4 │ │Local│ │ PR │ │Keep│ │Delete│ │Merge│ │Create│ │ │ │ │ └─┬──┘ └─┬──┘ └─┬──┘ └─┬──┘ │ │ │ │ ▼ ▼ │ ▼ ┌─────┐ ┌─────┐ │ ┌─────┐ │main │ │push │ │ │Confirm │ │Merge │ │+PR │ │ │then │ │ │ │ │ │ │Delete │ └──┬──┘ └──┬──┘ │ └──┬──┘ │ │ │ │ └───────┴──────┴───────┘ │ ▼ ┌─────────────────┐ │ 5. Worktree │ (if used) │ Cleanup │ └────────┬────────┘ │ ▼ ┌─────────────────┐ │ Done! 🎉 │ └─────────────────┘

═══════════════════════════════════════════════════════════════════ Option 1: Local merge → merge + delete branch + clean up worktree Option 2: Create PR → push + gh pr create + clean up worktree Option 3: Keep → leave as is (handle later) Option 4: Delete → force delete after confirmation ═══════════════════════════════════════════════════════════════════


## 전문 에이전트 (2-Phase Pipeline)

세션 인사이트 추출을 위해 5개의 전문 에이전트가 협력합니다.

### Phase 1: 병렬 분석 (동시 실행)

| 에이전트 | 역할 | 모델 |
|---------|------|------|
| **doc-updater** | CLAUDE.md, context.md, decision-record 업데이트 분석 | sonnet |
| **automation-scout** | 반복 작업을 skill/command/agent로 자동화할 기회 탐지 | sonnet |
| **learning-extractor** | 세션에서 배운 것, 실수, 새 발견 추출 | sonnet |

### Phase 2: 순차 검증

| 에이전트 | 역할 | 모델 |
|---------|------|------|
| **duplicate-checker** | Phase 1 제안의 중복 여부 검증 | haiku |
| **followup-suggester** | 미완성 작업, 개선 포인트, 다음 세션 작업 정리 | opus |

### 에이전트 실행 방법

```bash
# Phase 1: 병렬 실행 (Task tool로 동시 호출)
Task(subagent_type="general-purpose", prompt="doc-updater 에이전트 실행...")
Task(subagent_type="general-purpose", prompt="automation-scout 에이전트 실행...")
Task(subagent_type="general-purpose", prompt="learning-extractor 에이전트 실행...")

# Phase 2: Phase 1 결과를 입력으로 순차 실행
Task(subagent_type="general-purpose", prompt="duplicate-checker: Phase 1 결과 검증...")
Task(subagent_type="general-purpose", prompt="followup-suggester: 후속 작업 정리...")

Agent Details

Detailed prompts for each agent are in the references/ folder:

references/
├── automation-scout.md    # 자동화 기회 탐지
├── doc-updater.md         # 문서 업데이트 분석
├── duplicate-checker.md   # 중복 검증 (Phase 2)
├── followup-suggester.md  # 후속 작업 제안
└── learning-extractor.md  # 학습 포인트 추출

Procedure

Step 1: Check tests

Tests must pass before wrapping up.

# 프로젝트에 맞는 테스트 명령어
npm test
# 또는
pytest
# 또는
go test ./...

If tests fail:

테스트 실패:
- 실패: 2개
- 통과: 45개

[실패 내용 표시]

테스트를 먼저 수정해야 합니다. 마무리를 진행할 수 없습니다.

If tests pass: proceed to Step 2

Step 2: Check current status

# 어떤 브랜치에 있는지
git branch --show-current

# 변경사항 확인
git status --short

# worktree인지 확인
git worktree list

Step 3: Choose an option

Present 4 options to the user:

작업이 완료되었습니다. 어떻게 마무리할까요?

1. 로컬에서 main에 머지
2. PR 생성
3. 브랜치 유지 (나중에 처리)
4. 작업 취소 (삭제)

어떤 옵션을 선택하시겠습니까?

Step 4: Execute based on the choice

Option 1: Local merge

# 메인 브랜치로 이동
git checkout main

# 최신 상태로 업데이트
git pull

# 기능 브랜치 머지
git merge feature/my-feature

# 테스트 재확인
npm test

# 브랜치 삭제
git branch -d feature/my-feature

Option 2: Create PR

# 원격에 푸시
git push -u origin feature/my-feature

# PR 생성
gh pr create --title "기능 제목" --body "$(cat <<'EOF'
## 요약
- 변경 내용 1
- 변경 내용 2

## 테스트
- [ ] 확인 사항 1
- [ ] 확인 사항 2
EOF
)"

Inform the user of the PR URL.

Option 3: Keep branch

브랜치 feature/my-feature를 유지합니다.
다음에 이어서 작업하거나 마무리할 수 있습니다.

Keep the worktree as is as well.

Option 4: Cancel work

Get confirmation:

정말로 삭제하시겠습니까?

삭제될 항목:
- 브랜치: feature/my-feature
- 커밋: abc1234, def5678
- 워크트리: .worktrees/my-feature (있는 경우)

'삭제'를 입력하면 실행됩니다.

After confirmation:

git checkout main
git branch -D feature/my-feature

Step 5: Clean up Worktree

If Option 1, 2, or 4 is chosen worktree cleanup:

# worktree 목록 확인
git worktree list

# 해당 worktree가 있으면 삭제
git worktree remove .worktrees/my-feature

If Option 3 is chosen keep worktree.

Final checklist

  • Confirm tests pass
  • Choose an appropriate wrap-up option
  • Clear commit message
  • PR description (for Option 2)
  • worktree cleanup (if applicable)

Summary by option

Option Merge Push Delete branch Worktree cleanup
1. Local merge O - O O
2. Create PR - O - O
3. Keep - - - -
4. Delete - - O (force) O

Precautions

  • Do not merge while tests are failing
  • Deletion cannot be undone - always confirm
  • Merge PRs after review

Example flow

사용자: /wrap

Claude: wrap 스킬을 사용하여 작업을 마무리하겠습니다.

[테스트 실행]
npm test
결과: 12개 통과, 0개 실패 ✅

[상태 확인]
브랜치: feature/login
변경사항: 5개 파일, 커밋 3개

[옵션 제시]
작업이 완료되었습니다. 어떻게 마무리할까요?

1. 로컬에서 main에 머지
2. PR 생성
3. 브랜치 유지
4. 작업 취소

사용자: 2

Claude: PR을 생성합니다.

[푸시]
git push -u origin feature/login

[PR 생성]
gh pr create --title "로그인 기능 추가" --body "..."

PR이 생성되었습니다: https://github.com/...

[Worktree 정리]
.worktrees/login 삭제 완료

마무리가 완료되었습니다!