Community코딩 & 개발github.com

병렬 에이전트 디스패치

공유 상태나 순차적 의존성 없이 독립적으로 작업할 수 있는 2개 이상의 작업이 있을 때 사용합니다.

병렬 에이전트 디스패치란 무엇인가요?

이 스킬은 여러 개의 독립적인 문제(예: 서로 다른 테스트 파일의 실패, 여러 하위 시스템의 고장)를 동시에 조사하고 해결하기 위해 설계되었습니다. 각 문제 영역에 전용 에이전트를 할당하여 작업을 병렬로 수행함으로써, 순차적으로 처리할 때 발생하는 시간 낭비를 크게 줄일 수 있습니다. 이 스킬은 Claude Code, Cursor, Codex와 같은 에이전트 플랫폼에서 사용할 수 있으며, 핵심 원칙은 각 에이전트가 자신의 작업에만 집중할 수 있도록 명확한 범위, 목표, 제약 조건을 제공하는 것입니다. 사용자는 먼저 독립적인 문제 도메인을 식별하고, 각 에이전트에게 구체적인 지시사항과 필요한 모든 컨텍스트를 제공한 후, 동시에 디스패치하여 병렬 실행을 유도합니다. 에이전트가 결과를 반환하면 각 요약을 검토하고 변경 사항이 충돌하는지 확인한 후 통합합니다. 이 스킬은 관련 오류를 함께 조사해야 하거나, 전체 시스템 상태를 이해해야 하거나, 탐색적 디버깅이 필요한 경우에는 사용하지 않아야 합니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/alfathafp/portofolio-web-design/tree/HEAD/.agents/skills/dispatching-parallel-agents

Installed? Explore more 코딩 & 개발 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

병렬 에이전트 디스패치은(는) 무엇을 하나요?

개요

전문화된 에이전트에게 격리된 컨텍스트로 작업을 위임합니다. 지시사항과 컨텍스트를 정밀하게 구성함으로써 에이전트가 작업에 집중하고 성공하도록 보장합니다. 에이전트는 절대 사용자 세션의 컨텍스트나 기록을 상속받지 않아야 합니다. 사용자는 에이전트가 정확히 필요한 것을 구성합니다. 이는 또한 조정 작업을 위한 사용자 자신의 컨텍스트를 보존합니다.

여러 개의 관련 없는 실패(다른 테스트 파일, 다른 하위 시스템, 다른 버그)가 있을 때 순차적으로 조사하면 시간이 낭비됩니다. 각 조사는 독립적이며 병렬로 수행될 수 있습니다.

핵심 원칙: 독립적인 문제 도메인당 하나의 에이전트를 디스패치합니다. 동시에 작업하게 하십시오.

사용 시기

digraph when_to_use {
    "여러 실패?" [shape=diamond];
    "독립적인가?" [shape=diamond];
    "단일 에이전트가 모두 조사" [shape=box];
    "문제 도메인당 하나의 에이전트" [shape=box];
    "병렬로 작업 가능한가?" [shape=diamond];
    "순차적 에이전트" [shape=box];
    "병렬 디스패치" [shape=box];

    "여러 실패?" -> "독립적인가?" [label="예"];
    "독립적인가?" -> "단일 에이전트가 모두 조사" [label="아니오 - 관련됨"];
    "독립적인가?" -> "병렬로 작업 가능한가?" [label="예"];
    "병렬로 작업 가능한가?" -> "병렬 디스패치" [label="예"];
    "병렬로 작업 가능한가?" -> "순차적 에이전트" [label="아니오 - 공유 상태"];
}

다음과 같은 경우에 사용하십시오:

  • 서로 다른 근본 원인으로 3개 이상의 테스트 파일이 실패하는 경우
  • 여러 하위 시스템이 독립적으로 고장난 경우
  • 각 문제를 다른 문제의 컨텍스트 없이 이해할 수 있는 경우
  • 조사 간에 공유 상태가 없는 경우

다음과 같은 경우에는 사용하지 마십시오:

  • 실패가 서로 관련된 경우 (하나를 고치면 다른 것도 고쳐질 수 있음)
  • 전체 시스템 상태를 이해해야 하는 경우
  • 에이전트가 서로 간섭하는 경우

패턴

1. 독립적인 도메인 식별

무엇이 고장났는지에 따라 실패를 그룹화합니다:

  • 파일 A 테스트: 도구 승인 흐름
  • 파일 B 테스트: 배치 완료 동작
  • 파일 C 테스트: 중단 기능

각 도메인은 독립적입니다. 도구 승인을 수정한다고 중단 테스트에 영향을 미치지 않습니다.

2. 집중된 에이전트 작업 생성

각 에이전트는 다음을 받습니다:

  • 특정 범위: 하나의 테스트 파일 또는 하위 시스템
  • 명확한 목표: 이 테스트를 통과시키기
  • 제약 조건: 다른 코드는 변경하지 않기
  • 예상 출력: 발견하고 수정한 사항에 대한 요약

3. 병렬로 디스패치

동일한 응답에서 세 개의 하위 에이전트 디스패치를 모두 발행합니다. 그러면 병렬로 실행됩니다:

서브에이전트 (범용): "Fix agent-tool-abort.test.ts failures"
서브에이전트 (범용): "Fix batch-completion-behavior.test.ts failures"
서브에이전트 (범용): "Fix tool-approval-race-conditions.test.ts failures"
# 세 개 모두 동시에 실행됩니다.

하나의 응답에 여러 디스패치 호출 = 병렬 실행. 응답당 하나 = 순차 실행.

4. 검토 및 통합

에이전트가 반환되었을 때:

  • 각 요약 읽기
  • 수정 사항이 충돌하지 않는지 확인
  • 전체 테스트 스위트 실행
  • 모든 변경 사항 통합

에이전트 프롬프트 구조

좋은 에이전트 프롬프트는 다음과 같습니다:

  1. 집중적 - 하나의 명확한 문제 도메인
  2. 자체 포함 - 문제 이해에 필요한 모든 컨텍스트
  3. 출력에 대해 구체적 - 에이전트가 무엇을 반환해야 하는가?
Fix the 3 failing tests in src/agents/agent-tool-abort.test.ts:

1. "should abort tool with partial output capture" - expects 'interrupted at' in message
2. "should handle mixed completed and aborted tools" - fast tool aborted instead of completed
3. "should properly track pendingToolCount" - expects 3 results but gets 0

These are timing/race condition issues. Your task:

1. Read the test file and understand what each test verifies
2. Identify root cause - timing issues or actual bugs?
3. Fix by:
   - Replacing arbitrary timeouts with event-based waiting
   - Fixing bugs in abort implementation if found
   - Adjusting test expectations if testing changed behavior

Do NOT just increase timeouts - find the real issue.

Return: Summary of what you found and what you fixed.

일반적인 실수

❌ 너무 광범위: "Fix all the tests" - 에이전트가 길을 잃습니다. ✅ 구체적: "Fix agent-tool-abort.test.ts" - 집중된 범위

❌ 컨텍스트 없음: "Fix the race condition" - 에이전트가 위치를 모릅니다. ✅ 컨텍스트: 오류 메시지와 테스트 이름을 붙여넣으십시오.

❌ 제약 조건 없음: 에이전트가 모든 것을 리팩토링할 수 있습니다. ✅ 제약 조건: "Do NOT change production code" 또는 "Fix tests only"

❌ 모호한 출력: "Fix it" - 무엇이 변경되었는지 알 수 없습니다. ✅ 구체적: "Return summary of root cause and changes"

사용하지 말아야 할 때

관련된 실패: 하나를 수정하면 다른 것도 수정될 수 있습니다. 먼저 함께 조사하십시오. 전체 컨텍스트 필요: 이해하려면 전체 시스템을 봐야 합니다. 탐색적 디버깅: 무엇이 고장났는지 아직 모릅니다. 공유 상태: 에이전트가 서로 간섭합니다 (동일한 파일 편집, 동일한 리소스 사용).

세션 실제 예제

시나리오: 대규모 리팩토링 후 3개 파일에서 6개의 테스트 실패

실패:

  • agent-tool-abort.test.ts: 3개 실패 (타이밍 문제)
  • batch-completion-behavior.test.ts: 2개 실패 (도구 실행 안 됨)
  • tool-approval-race-conditions.test.ts: 1개 실패 (실행 횟수 = 0)

결정: 독립적인 도메인 - 중단 로직은 배치 완료와 분리되어 있고, 경쟁 조건과도 분리되어 있습니다.

디스패치:

Agent 1 → Fix agent-tool-abort.test.ts
Agent 2 → Fix batch-completion-behavior.test.ts
Agent 3 → Fix tool-approval-race-conditions.test.ts

결과:

  • Agent 1: 타임아웃을 이벤트 기반 대기로 대체
  • Agent 2: 이벤트 구조 버그 수정 (threadId 위치 오류)
  • Agent 3: 비동기 도구 실행 완료 대기 추가

통합: 모든 수정 사항이 독립적이며 충돌 없음, 전체 스위트 통과

검증

에이전트가 반환된 후:

  1. 각 요약 검토 - 무엇이 변경되었는지 이해
  2. 충돌 확인 - 에이전트가 동일한 코드를 편집했는가?
  3. 전체 스위트 실행 - 모든 수정 사항이 함께 작동하는지 확인
  4. 스팟 체크 - 에이전트가 체계적인 오류를 만들 수 있음

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

alfathafp/portofolio-web-design

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).

alfathafp/portofolio-web-design

Tests in real browsers via Chrome DevTools MCP. Use when building or debugging anything that runs in a browser. Use when you need to inspect the DOM, capture console errors, analyze network requests, profile performance, or verify visual output with real runtime data. Requires the chrome-devtools MCP server to be configured.

alfathafp/portofolio-web-design

Automates CI/CD pipeline setup. Use when setting up or modifying build and deployment pipelines. Use when you need to automate quality gates, configure test runners in CI, or establish deployment strategies.

alfathafp/portofolio-web-design

Conducts multi-axis code review. Use before merging any change. Use when reviewing code written by yourself, another agent, or a human. Use when you need to assess code quality across multiple dimensions before it enters the main branch. Use when asked to review a diff or a pull request, even when the diff is pasted inline.

alfathafp/portofolio-web-design

Simplifies code for clarity. Use when refactoring code for clarity without changing behavior. Use when code works but is harder to read, maintain, or extend than it should be. Use when reviewing code that has accumulated unnecessary complexity.

alfathafp/portofolio-web-design

Establishes a project's quality bar as a written contract and stops agents quietly lowering it. Interviews the user on which dimensions matter, supplies sane default thresholds when they have no number in mind, records everything in CONSTRAINTS.md, and watches the diff for a weakened bar — new @ts-ignore or eslint-disable suppressions, skipped or deleted tests, assertions stripped out, unimplemented stubs, thresholds edited down. Use when no quality bar is written down, when the user says "set up constraints" or "define our standards", when the user wants dimensions they care about — accessibility, web performance, coverage — set up as enforced constraints, when an agent keeps silencing checks or skipping tests to get to green, when you need a coverage or performance threshold and don't know what number to pick, or when an agent writes more code than anyone will read.

alfathafp/portofolio-web-design

Optimizes agent context setup. Use when starting a new session, when agent output quality degrades, when switching between tasks, or when you need to configure rules files and context for a project.

alfathafp/portofolio-web-design

Guides systematic root-cause debugging. Use when tests fail, builds break, something that worked yesterday broke, behavior doesn't match expectations, or you encounter any unexpected error. Use when you need to figure out what broke and why — a systematic approach to finding and fixing the root cause rather than guessing.

alfathafp/portofolio-web-design

Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the link", "push this live", or "create a preview deployment".

alfathafp/portofolio-web-design

Manages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code.

alfathafp/portofolio-web-design

Use when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.

alfathafp/portofolio-web-design

Records decisions and documentation. Use when you need to document an architecture decision (ADR) or the reasoning behind a design choice, when changing public APIs, shipping features, or when you need to record context that future engineers and agents will need to understand the codebase.

alfathafp/portofolio-web-design

Subjects every non-trivial decision to a fresh-context adversarial review before it stands. Use when you want every assumption cross-examined before proceeding, when stress-testing a plan for hidden failure modes, when correctness matters more than speed, when working in unfamiliar code, when stakes are high (production auth, security-sensitive logic, a high-stakes migration, irreversible operations), or any time a confident output would be cheaper to verify now than to debug later.

alfathafp/portofolio-web-design

Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available

alfathafp/portofolio-web-design

Use when implementation is complete, all tests pass, and you need to decide how to integrate the work

alfathafp/portofolio-web-design

Builds production-quality, accessible, responsive user-facing UIs. Use when building or modifying interfaces and pages, creating components, implementing layouts, meeting WCAG accessibility requirements, managing state, or when the output needs to look and feel production-quality rather than AI-generated.

alfathafp/portofolio-web-design

Structures git workflow practices. Use when making any code change. Use when committing, branching, resolving conflicts, splitting uncommitted work in a messy working tree into clean atomic commits, opening or reviewing a pull request (PR), pushing to a remote, or when you need to organize work across multiple parallel streams. Use when cutting a release, choosing a semantic version bump, tagging, or writing a changelog.

alfathafp/portofolio-web-design

Refines raw ideas into sharp, actionable concepts through structured divergent and convergent thinking. Use when an idea is still vague, when you need to stress-test assumptions before committing to a plan, or when you want to expand options before converging on one. Triggers on "ideate", "refine this idea", or "stress-test my plan".

alfathafp/portofolio-web-design

Delivers changes incrementally in thin, verifiable slices. Use when implementing any feature or change that touches more than one file, or when picking up the next task from a plan. Use when rolling a change out behind a feature flag, when you're about to write a large amount of code at once, or when a task feels too big to land in one step.

alfathafp/portofolio-web-design

Guides stable API and interface design. Use when designing APIs, module boundaries, or any public interface. Use when creating REST or GraphQL endpoints, defining type contracts between modules, or establishing boundaries between frontend and backend.

관련 스킬