next-task
The next-task slash command analyzes project progress by parsing task checkboxes from prompt_plan.md, calculating completion rate, and identifying the next actionable task based on user input, dependency resolution, or sequential order. Use it to begin a new development session, resume work after context switches, or guide Agent Teams toward the next feature when working in parallel across multiple tasks.
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/sangrokjung/claude-forge/HEAD/commands/next-task.md -o ~/.claude/commands/next-task.mdnext-task.md
# /next-task - 다음 Task 시작 준비 (v6) ## 0단계: 현재 상태 확인 다음 정보를 수집한다: 1. **Git 상태** - 현재 브랜치: `git branch --show-current` - 최근 커밋 3개: `git log --oneline -3` - 스테이징/변경 파일 유무: `git status --short` 2. **프로젝트 문서** - `prompt_plan.md` 존재 여부 및 최종 수정 시간 - `spec.md` 존재 여부 - `CLAUDE.md` 존재 여부 문서가 없으면 경고를 출력한다: ``` [WARN] prompt_plan.md가 없습니다. /planner 로 실행 계획을 먼저 생성하세요. ``` ## 1단계: 진행률 계산 `prompt_plan.md`에서 Task 체크박스를 파싱한다: ``` 파싱 규칙: - [x] 또는 - [X] → 완료 - [ ] → 미완료 중첩된 체크박스(하위 항목)는 별도 집계하지 않는다. 최상위 Task 단위만 카운트한다. ``` 진행률 산출: ``` completed = [x] 개수 total = [x] + [ ] 개수 rate = (completed / total) * 100 ``` ## 2단계: 다음 Task 식별 다음 우선순위로 Task를 선택한다: 1. **사용자 지정**: 인자로 Task 번호/설명이 주어진 경우 해당 Task 2. **의존성 해소**: depends 필드의 선행 Task가 모두 완료된 미완료 Task 3. **순서 기반**: prompt_plan.md에서 첫 번째 미완료 `- [ ]` Task 선택된 Task에 대해 관련 파일을 탐색한다: - Task 설명에 언급된 파일 경로 - 해당 모듈/디렉토리의 기존 파일 (Glob으로 탐색) - 관련 테스트 파일 ## 3단계: 복잡도 분석 Task 복잡도를 분석하여 작업 규모를 추천한다. | 신호 | 규모 | 기준 | |------|------|------| | 단순 수정, 설정 변경, 문서 업데이트 | 소 | 파일 1-2개, 변경 < 50줄 예상 | | 일반 구현, 컴포넌트 추가, API 엔드포인트 | 중 | 파일 3-5개, 변경 50-200줄 예상 | | 리팩토링, 복합 기능, 다중 모듈 변경 | 대 | 파일 6개 이상, 변경 200줄 이상 예상 | | 보안 관련, 인증/결제, 데이터 마이그레이션 | 대+ | 보안 민감 또는 되돌리기 어려운 변경 | 추천 근거: - Task 설명의 키워드 (`보안`, `인증`, `결제` → 규모 상향) - 관련 파일 수 및 크기 - depends 체인 깊이 (깊을수록 상향) ## 4단계: 출력 ``` ════════════════════════════════════════════════════════════════ Next Task (진행률: [completed]/[total] = [rate]%) ════════════════════════════════════════════════════════════════ 다음 작업: [Task 번호]. [Task 이름] 작업 규모: [소/중/대] 추천 근거: [한 줄 설명] 관련 파일: - [파일 경로 1] - [파일 경로 2] - [파일 경로 3] 선행 완료 Task: [x] [Task A 이름] [x] [Task B 이름] 시작 방법: 이 세션에서 바로 시작 또는 /orchestrate --type feature (Agent Teams 병렬 개발) ════════════════════════════════════════════════════════════════ ``` ### 모든 Task 완료 시 ``` ════════════════════════════════════════════════════════════════ All Tasks Complete (진행률: [total]/[total] = 100%) ════════════════════════════════════════════════════════════════ 모든 Task가 완료되었습니다. 다음 단계: /handoff-verify 최종 검증 /sync-docs 문서 동기화 /web-checklist 수동 테스트 체크리스트 ════════════════════════════════════════════════════════════════ ``` ### 변경 감지 알림 prompt_plan.md가 마지막 커밋 이후 수정된 경우: ``` [INFO] prompt_plan.md가 최근 변경되었습니다. 변경 시점: [timestamp] Task 목록이 업데이트되었을 수 있습니다. ```
Software architecture specialist for system design, scalability, and technical decision-making. Use PROACTIVELY when planning new features, refactoring large systems, or making architectural decisions.
Build and TypeScript error resolution specialist. Use PROACTIVELY when build fails or type errors occur. Fixes build/type errors only with minimal diffs, no architectural edits. Focuses on getting the build green quickly.
Expert code review specialist. Proactively reviews code for quality, security, and maintainability. Use immediately after writing or modifying code. MUST BE USED for all code changes.
PostgreSQL database specialist for query optimization, schema design, security, and performance. Use PROACTIVELY when writing SQL, creating migrations, designing schemas, or troubleshooting database performance. Incorporates Supabase best practices.
Documentation and codemap specialist. Use PROACTIVELY for updating codemaps and documentation. Runs /update-codemaps and /update-docs, generates docs/CODEMAPS/*, updates READMEs and guides.
End-to-end testing specialist using Vercel Agent Browser (preferred) with Playwright fallback. Use PROACTIVELY for generating, maintaining, and running E2E tests. Manages test journeys, quarantines flaky tests, uploads artifacts (screenshots, videos, traces), and ensures critical user flows work.
Expert planning specialist for complex features and refactoring. Use PROACTIVELY when users request feature implementation, architectural changes, or complex refactoring. Automatically activated for planning tasks.
Dead code cleanup and consolidation specialist. Use PROACTIVELY for removing unused code, duplicates, and refactoring. Runs analysis tools (knip, depcheck, ts-prune) to identify dead code and safely removes it.