Load PROACTIVELY when decomposing a user request into parallel agent work. Use when user says "build this", "implement this feature", or any request requiring multiple agents working concurrently. Guides task decomposition into parallelizable units, agent assignment with skill matching, dependency graph construction, and result aggregation. The runtime engine handles WRFC chain coordination automatically via <gv> directives.
Decomposes complex requests into parallel agent tasks and coordinates execution via runtime directives.
/plugin marketplace add mgd34msu/goodvibes-plugin/plugin install goodvibes@goodvibes-marketThis skill inherits all available tools. When active, it can use any tool Claude has access to.
references/agent-assignment-guide.mdscripts/validate-orchestration.shscripts/
validate-orchestration.sh
references/
agent-assignment-guide.md
The task orchestration protocol defines how the GoodVibes orchestrator decomposes feature requests into agent tasks, assigns agents and skills, manages parallel execution, and interacts with the runtime engine's WRFC chain system. This is the orchestrator's primary workflow for multi-agent feature delivery.
Use this skill when:
Do NOT use this skill for:
The runtime engine manages Work-Review-Fix-Complete (WRFC) chains automatically. The orchestrator's role is:
<gv> directives issued by the runtime engine — mechanically, immediately, without judgmentThe runtime engine handles all review, fix, and completion decisions. The orchestrator does NOT manually spawn reviewers or fix agents. These come exclusively from runtime directives after each work agent completes.
The runtime engine issues directives to the orchestrator via system messages containing <gv> tags:
{"action":"spawn","wid":"wrfc_xxx","type":"reviewer","task":"Review the code..."}
{"action":"spawn","wid":"wrfc_xxx","type":"engineer","task":"Fix the issues..."}
{"action":"complete","wid":"wrfc_xxx"}
{"action":"escalate","wid":"wrfc_xxx","reason":"Max fix attempts reached"}
These 4 rules are absolute and non-negotiable:
The runtime reads goodvibes.json for:
min_review_score (default: 9.5) — score threshold for PASSmax_fix_attempts (default: 3) — max fix cycles before escalationThe orchestrator never hardcodes these values. The runtime engine enforces them.
Before decomposing, classify the request into one of these categories:
Feature Implementation - Add new functionality
Bug Fix - Resolve existing issue
Refactoring - Improve code structure without changing behavior
Integration - Connect existing systems
Enhancement - Improve existing feature
After classifying, identify work that can run in parallel:
Independent domains:
Independent files:
Independent research:
When NOT to parallelize:
For each parallelizable work stream, define a task with:
Task structure:
task_id: unique-task-identifier
agent: engineer | reviewer | tester | architect | deployer | integrator-ai | integrator-services | integrator-state | planner
skills: [skill-1, skill-2]
description: Brief description of what this task accomplishes
scope:
files: [list of files to create/modify]
directories: [directories to work within]
constraints:
- Must use TypeScript
- Follow existing patterns in src/features/
blocking: [list of task_ids this task blocks]
blocked_by: [list of task_ids blocking this task]
expected_outcome: What success looks like
Example:
task_id: create-user-types
agent: engineer
skills: [gather-plan-apply, precision-mastery, error-recovery, goodvibes-memory]
description: Create TypeScript type definitions for User domain
scope:
files: [src/types/user.ts, src/types/auth.ts]
directories: [src/types]
constraints:
- Use Zod for runtime validation
- Export all types from src/types/index.ts
blocking: [create-user-api, create-user-components]
blocked_by: []
expected_outcome: Type files exist, export User, AuthContext, and validation schemas
For each task, assign the appropriate agent type and skills using this decision table:
Agent Type Selection:
| Work Type | Agent Type | Rationale |
|---|---|---|
| Implement API, components, features | engineer | Code creation and implementation |
| Review code quality, standards | reviewer | Code quality and standards enforcement |
| Write tests, test coverage | tester | Testing and validation |
| Plan architecture, design decisions | architect | High-level design and planning |
| Deploy applications, infrastructure | deployer | Deployment and infrastructure |
| Integrate AI/ML services | integrator-ai | AI/ML integration |
| Integrate external services | integrator-services | External service integration |
| Manage state and data flow | integrator-state | State management |
| Coordinate complex workflows | planner | High-level orchestration |
Skills Assignment:
All agents receive protocol skills by default:
Additional skills by work type:
| Work Type | Additional Skills |
|---|---|
| API implementation | trpc, prisma, nextauth, rest-api-design |
| Frontend components | react, nextjs, tailwindcss, shadcn-ui |
| Database schema | prisma, postgresql, drizzle |
| Authentication | clerk, nextauth, lucia |
| Type definitions | (none - protocol skills sufficient) |
| Code review | review-scoring + domain-specific review skills |
See references/agent-assignment-guide.md for complete assignment table.
When spawning agents, ALWAYS include these elements in the agent prompt:
## Task
[Specific, actionable description of what to accomplish]
## Scope
**Files to create:**
- path/to/file.ts - Brief description
**Files to modify:**
- path/to/existing.ts - What changes to make
**Directories in scope:**
- src/features/auth/ - Work within this directory
## Constraints
- [Technical constraint 1]
- [Pattern to follow]
- [Dependency requirement]
## Skills Available
- skill-name - When to use it
- skill-name - When to use it
## Expected Outcome
[Concrete definition of success]
## Blocking/Blocked By
**This task blocks:** [list of downstream tasks waiting for this]
**This task is blocked by:** [list of upstream tasks this waits for]
Critical elements:
<gv> tag (emitted automatically by the runtime hook; the orchestrator does not need to instruct agents about this)Note: Do NOT add WRFC participation instructions to agent prompts. Agents only need to complete their work and emit a <gv> tag. The runtime engine handles the WRFC chain automatically.
Maintain a task tracking structure:
active_tasks:
task-1:
agent_id: agent_abc123
status: running | completed | blocked | failed
started_at: ISO-8601 timestamp
last_update: ISO-8601 timestamp
blocking: [task-2, task-3]
blocked_by: []
task-2:
agent_id: agent_def456
status: waiting
blocked_by: [task-1]
Hard limit: 6 concurrent agent chains (from max_parallel_agent_chains in output style config)
A "chain" includes the work agent plus its entire WRFC chain (review, fix, re-review). Each initial work agent spawn creates one chain. Count chains, not individual agents.
When you have more than 6 tasks:
complete directive)Task priority formula:
priority = (number of tasks it blocks) - (number of tasks blocking it)
Higher priority = spawn first
<gv> DirectivesWhen the runtime engine issues a directive:
action, wid, type, and task fieldsspawn: Spawn the specified agent type with the provided task promptcomplete: Mark the WRFC chain as done, unblock any dependent tasks, spawn next queued task if slot availableescalate: Report to user with the escalation reason, do not spawn further agents for this chainNo exceptions. A directive is never skipped, reordered, or conditioned on another event.
complete directivesescalate, report to user — do not attempt to fix the chain yourselfAgents do NOT communicate directly. All coordination flows through the orchestrator:
Inter-agent dependencies:
complete directive, then spawns B with reference to types.ts locationShared state:
Confirm before initial decomposition:
Auto-spawn on ambiguity:
Error handling:
max_fix_attempts)escalate directive if max attempts are reachedescalate, present to user with context from the directive's reason fieldAuto-proceed:
Error handling:
escalate when exhaustedUser request: "Add user profile page with edit capability"
Classification: Feature Implementation
Decomposition:
tasks:
- task_id: create-profile-types
agent: engineer
skills: [gather-plan-apply, precision-mastery, error-recovery, goodvibes-memory]
description: Create Profile and ProfileUpdate types
scope:
files: [src/types/profile.ts]
blocking: [create-profile-api, create-profile-ui]
blocked_by: []
- task_id: create-profile-api
agent: engineer
skills: [gather-plan-apply, precision-mastery, error-recovery, goodvibes-memory, trpc, prisma]
description: Implement tRPC routes for profile CRUD
scope:
files: [src/server/routers/profile.ts]
blocking: [create-profile-ui]
blocked_by: [create-profile-types]
- task_id: create-profile-ui
agent: engineer
skills: [gather-plan-apply, precision-mastery, error-recovery, goodvibes-memory, nextjs, react, tailwindcss, shadcn-ui]
description: Build profile page with edit form
scope:
files: [src/app/profile/page.tsx, src/components/ProfileForm.tsx]
blocking: []
blocked_by: [create-profile-types]
- task_id: test-profile-feature
agent: tester
skills: [gather-plan-apply, precision-mastery, error-recovery, goodvibes-memory]
description: Create tests for profile feature
scope:
files: [src/server/routers/profile.test.ts, src/components/ProfileForm.test.tsx]
blocking: []
blocked_by: [create-profile-api, create-profile-ui]
Execution plan:
complete directive for create-profile-typescomplete directives for bothcomplete directive for test-profile-featureNote: Review and fix cycles for each agent are handled automatically by the runtime engine via directives. The orchestrator does not schedule them.
Parallelism: 3 waves (types solo -> API + UI parallel -> tests solo)
User request: "Fix login redirect loop on /dashboard"
Classification: Bug Fix
Decomposition:
tasks:
- task_id: diagnose-redirect-loop
agent: engineer
skills: [gather-plan-apply, precision-mastery, error-recovery, goodvibes-memory, nextjs, nextauth]
description: Identify root cause of redirect loop
scope:
files: [src/middleware.ts, src/app/dashboard/page.tsx, src/lib/auth.ts]
blocking: [fix-redirect-loop]
blocked_by: []
- task_id: fix-redirect-loop
agent: engineer
skills: [gather-plan-apply, precision-mastery, error-recovery, goodvibes-memory, nextjs, nextauth]
description: Apply fix based on diagnosis
scope:
files: [determined by diagnosis]
blocking: []
blocked_by: [diagnose-redirect-loop]
Execution plan:
complete directive for diagnosiscomplete directive for fixParallelism: None (fully sequential: diagnose -> fix)
User request: "Extract shared auth logic into reusable hooks"
Classification: Refactoring
Decomposition:
tasks:
- task_id: plan-refactoring-approach
agent: architect
skills: [gather-plan-apply, precision-mastery, error-recovery, goodvibes-memory]
description: Design the refactoring strategy and hook API
scope:
directories: [src/components, src/app]
blocking: [analyze-auth-patterns]
blocked_by: []
- task_id: analyze-auth-patterns
agent: engineer
skills: [gather-plan-apply, precision-mastery, error-recovery, goodvibes-memory]
description: Discover all auth usage patterns in components
scope:
directories: [src/components, src/app]
blocking: [create-auth-hooks]
blocked_by: [plan-refactoring-approach]
- task_id: create-auth-hooks
agent: engineer
skills: [gather-plan-apply, precision-mastery, error-recovery, goodvibes-memory, react]
description: Create hooks based on discovered patterns
scope:
files: [src/hooks/useAuth.ts, src/hooks/useRequireAuth.ts]
blocking: [refactor-components-1, refactor-components-2]
blocked_by: [analyze-auth-patterns]
- task_id: refactor-components-1
agent: engineer
skills: [gather-plan-apply, precision-mastery, error-recovery, goodvibes-memory, react]
description: Refactor components in src/app to use hooks
scope:
directories: [src/app]
blocking: []
blocked_by: [create-auth-hooks]
- task_id: refactor-components-2
agent: engineer
skills: [gather-plan-apply, precision-mastery, error-recovery, goodvibes-memory, react]
description: Refactor components in src/components to use hooks
scope:
directories: [src/components]
blocking: []
blocked_by: [create-auth-hooks]
Execution plan:
complete directive for planningcomplete directive for analysiscomplete directive for hookscomplete directives for bothParallelism: 4 waves (planning -> analysis -> hooks -> 2 refactors parallel)
Escalate to user immediately when:
Architectural ambiguity - Multiple valid approaches with significant tradeoffs
Missing information - Task cannot be completed without user input
Scope expansion - Task is larger than initially described
Runtime escalation - Runtime engine issues escalate directive
reason from the directive, request guidance or manual interventionConflicting requirements - Discovered constraints contradict each other
Task orchestration workflow:
<gv> directives from runtime immediately and mechanicallycomplete directivesKey principles:
Activates when the user asks about AI prompts, needs prompt templates, wants to search for prompts, or mentions prompts.chat. Use for discovering, retrieving, and improving prompts.
Search, retrieve, and install Agent Skills from the prompts.chat registry using MCP tools. Use when the user asks to find skills, browse skill catalogs, install a skill for Claude, or extend Claude's capabilities with reusable AI agent components.
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.