🎯

parallel-execution

🎯Skill

from d-oit/do-novelist-ai

VibeIndex|
What it does

Executes multiple independent tasks simultaneously across available agents to maximize throughput and minimize total execution time.

πŸ“¦

Part of

d-oit/do-novelist-ai(14 items)

parallel-execution

Installation

git cloneClone repository
git clone https://github.com/yourusername/novelist-goap-ebook-engine.git
npm runRun npm script
npm run dev
npm runRun npm script
npm run dev # Start Vite dev server (http://localhost:5173)
npm runRun npm script
npm run build # Build for production
npxRun with npx
npx playwright test
πŸ“– Extracted from docs: d-oit/do-novelist-ai
1Installs
-
AddedFeb 4, 2026

Skill Details

SKILL.md

Execute multiple independent tasks simultaneously using parallel agent coordination to maximize throughput and minimize execution time. Use when tasks have no dependencies, results can be aggregated, and agents are available for concurrent work.

Overview

# Parallel Execution

Execute multiple independent tasks simultaneously to maximize throughput and minimize total execution time.

When to Use

  • Multiple independent tasks (no dependencies)
  • Tasks benefit from concurrent execution
  • Maximizing throughput is priority
  • Available agents for parallel work
  • Results can be aggregated after completion

Core Concepts

Independence

Tasks are independent when:

  • βœ“ No data dependencies (one doesn't need other's output)
  • βœ“ No resource conflicts (different files, databases)
  • βœ“ No ordering requirements (either can complete first)
  • βœ“ Failures are isolated (one failing doesn't block others)

Example - Independent:

```markdown

βœ“ Task A: Review code quality (code-reviewer)

βœ“ Task B: Run test suite (test-runner)

β†’ Can run in parallel

```

Example - NOT Independent:

```markdown

βœ— Task A: Implement feature (feature-implementer)

βœ— Task B: Test feature (test-runner)

β†’ B depends on A's output, must run sequentially

```

Concurrency

Critical: Use single message with multiple Task tool calls

Correct:

```markdown

Send one message containing:

  • Task tool call #1 β†’ Agent A
  • Task tool call #2 β†’ Agent B
  • Task tool call #3 β†’ Agent C

All three agents start simultaneously.

```

Incorrect:

```markdown

Message 1: Task tool β†’ code-reviewer

[wait]

Message 2: Task tool β†’ test-runner

[wait]

This is sequential, NOT parallel!

```

Synchronization

Collection Point:

  • Wait for all parallel agents to complete
  • Collect results from each agent
  • Validate each result independently
  • Aggregate results into final output

Parallel Execution Process

Step 1: Identify Independent Tasks

Independence Checklist:

  • [ ] No data dependencies
  • [ ] No shared writes (read-only or different targets)
  • [ ] No execution order requirements
  • [ ] Failures don't cascade
  • [ ] Results can be validated independently

Step 2: Agent Assignment

Match Tasks to Agents:

```markdown

Task 1: Review code quality β†’ code-reviewer

Task 2: Run test suite β†’ test-runner

Task 3: Run benchmarks β†’ test-runner

```

Agent Availability Check:

  • Ensure sufficient agents available
  • Check for specialization overlap
  • Consider workload balance

Step 3: Launch Parallel Execution

```markdown

Single message with multiple Task tool calls:

β†’ code-reviewer (review task)

β†’ test-runner (test task)

β†’ test-runner (benchmark task)

All agents start simultaneously.

```

Step 4: Monitor Execution

Track Progress:

```markdown

Agent 1 (code-reviewer): In Progress

Task: Code quality review

Agent 2 (test-runner): Completed βœ“

Task: Test suite

Result: 45/45 tests passed

Agent 3 (test-runner): In Progress

Task: Benchmarks

```

Step 5: Collect & Validate Results

As Each Agent Completes:

  1. Collect output
  2. Validate against success criteria
  3. Check for errors
  4. Mark as complete or failed

Step 6: Aggregate Results

```markdown

Parallel Execution Results

Completed Tasks:

  1. βœ“ Code quality review (code-reviewer)

- Result: 3 minor issues found

  1. βœ“ Test suite (test-runner)

- Result: All tests passing (45/45)

  1. βœ“ Performance benchmarks (test-runner)

- Result: All benchmarks acceptable

Overall Status: βœ“ Success (with minor issues)

```

Execution Patterns

Pattern 1: Homogeneous Parallel

All agents same type, different inputs:

```markdown

Use Case: Test multiple modules

β”œβ”€ test-runner: Test memory-core

β”œβ”€ test-runner: Test memory-storage-turso

└─ test-runner: Test memory-storage-redb

Single message, 3 Task tool calls

```

Pattern 2: Heterogeneous Parallel

Different agent types, related task:

```markdown

Use Case: Comprehensive code check

β”œβ”€ code-reviewer: Quality analysis

β”œβ”€ test-runner: Test execution

└─ debugger: Performance profiling

Single message, 3 Task tool calls

```

Pattern 3: Parallel with Convergence

Parallel execution β†’ Single synthesis:

```markdown

Phase 1: Parallel Investigation

β”œβ”€ debugger: Profile performance

β”œβ”€ code-reviewer: Analyze efficiency

└─ test-runner: Run benchmarks

[All complete]

Phase 2: Synthesis

└─ Combine findings, identify root cause

```

Synchronization Strategies

Wait for All (AND)

Most Common:

  • Wait for ALL agents to complete
  • Proceed only when all finished
  • Useful when all results needed

Wait for Any (OR)

Early Termination:

  • Proceed when ANY agent completes successfully
  • Cancel or continue others
  • Useful for redundant approaches

Wait for Threshold

Partial Completion:

  • Proceed when N out of M agents complete
  • Useful for resilience
  • Handle missing results gracefully

Resource Management

Available Agents

  • code-reviewer (1 instance)
  • test-runner (1 instance)
  • feature-implementer (1 instance)
  • refactorer (1 instance)
  • debugger (1 instance)

Parallelization Limit: Maximum 5 agents simultaneously (one of each type)

Workload Balancing

Distribute Evenly:

```markdown

Tasks: [T1, T2, T3, T4, T5, T6]

Agents: [A, B, C]

Distribution:

  • Agent A: T1, T4 (2 tasks)
  • Agent B: T2, T5 (2 tasks)
  • Agent C: T3, T6 (2 tasks)

```

Error Handling

Independent Failures

Isolation:

  • One agent failing doesn't stop others
  • Continue collecting successful results
  • Report failed tasks separately

```markdown

Parallel Execution:

β”œβ”€ Agent A: βœ“ Success

β”œβ”€ Agent B: βœ— Failed (error in code)

└─ Agent C: βœ“ Success

Result:

  • Collect: Results from A and C
  • Report: B failed with error
  • Decision: Retry B or proceed without

```

Partial Success Handling

Strategies:

  1. Fail Fast: If any fails, stop and report
  2. Best Effort: Collect all successful results
  3. Retry Failed: Let successful complete, retry failures

Performance Optimization

Speedup Calculation

```

Sequential time = T1 + T2 + T3 + ... + Tn

Parallel time = max(T1, T2, T3, ..., Tn)

Speedup = Sequential time / Parallel time

```

Example:

```markdown

Tasks:

  • Task A: 10 minutes
  • Task B: 15 minutes
  • Task C: 8 minutes

Sequential: 10 + 15 + 8 = 33 minutes

Parallel: max(10, 15, 8) = 15 minutes

Speedup: 33 / 15 = 2.2x faster

```

Optimal Parallelization

Identify Bottlenecks:

  • Find longest-running task
  • Can it be decomposed further?
  • Can it be optimized?
  • Start slow tasks first

Best Practices

DO:

βœ“ Verify independence before parallelizing

βœ“ Use single message with multiple Task tool calls

βœ“ Balance workload across agents

βœ“ Set appropriate timeouts for each task

βœ“ Handle failures gracefully (isolation)

βœ“ Validate each result independently

βœ“ Aggregate comprehensively at the end

DON'T:

βœ— Parallelize dependent tasks

βœ— Send sequential messages thinking they're parallel

βœ— Overload single agent while others idle

βœ— Skip validation because "it's parallel"

βœ— Assume all will succeed

βœ— Ignore agent failures

Examples

Example 1: Simple Parallel Review

```markdown

Task: "Check code quality and run tests"

Analysis: Independent tasks, different agents

Plan:

β”œβ”€ code-reviewer: Review code quality

└─ test-runner: Run test suite

Execution: [Single message with 2 Task tool calls]

Results:

  • code-reviewer: 2 issues found βœ“
  • test-runner: 45/45 tests pass βœ“

Speedup: 2x

```

Example 2: Multi-Module Testing

```markdown

Task: "Test all crates in workspace"

Analysis: 3 independent crates, same agent type

Plan:

β”œβ”€ test-runner: Test memory-core

β”œβ”€ test-runner: Test memory-storage-turso

└─ test-runner: Test memory-storage-redb

Execution: [Single message with 3 Task tool calls]

Results:

  • memory-core: 25/25 pass βœ“
  • memory-storage-turso: 15/15 pass βœ“
  • memory-storage-redb: 10/10 pass βœ“

Speedup: 3x

```

Example 3: Comprehensive Quality Check

```markdown

Task: "Pre-release quality validation"

Analysis: 4 independent checks, maximum parallelization

Plan:

β”œβ”€ code-reviewer: Code quality (fmt, clippy)

β”œβ”€ test-runner: Test suite execution

β”œβ”€ test-runner: Performance benchmarks

└─ debugger: Memory leak detection

Execution: [Single message with 4 Task tool calls]

Results: All checks pass βœ“

Speedup: 4x

```

Integration

Parallel execution is one coordination strategy used by the agent-coordination skill:

```markdown

Coordination Strategy Selection:

β”œβ”€ Independent tasks β†’ Use parallel-execution (this skill)

β”œβ”€ Dependent tasks β†’ Use sequential coordination

β”œβ”€ Complex mix β†’ Use hybrid coordination

└─ Multiple perspectives β†’ Use swarm (with parallel)

```

Summary

Parallel execution maximizes efficiency for independent tasks by:

  • Concurrent agent execution (single message, multiple tools)
  • Independent task validation (no cross-dependencies)
  • Synchronized result collection (wait for completion)
  • Comprehensive aggregation (synthesize final output)

When done correctly, parallel execution provides significant speedup while maintaining quality and reliability.