Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

run-tasks

БесплатноБез исполняемых скриптовНе проверен

Orchestrate task execution via beads and sub-agents. Gets ready work from beads, spawns appropriate agents based on labels, monitors completion, and updates…

JeremyKalmusот JeremyKalmus★ 28 звёзд на GitHub12 установок в других каталогах

Об этом скилле

Run Tasks Skill

Purpose

Execute implementation tasks through coordinated sub-agents with optional TDD workflow:

  1. Get ready work from beads (no blockers)
  2. Check TDD configuration and enforce test-first gating if enabled
  3. Group tasks for parallel execution (with git worktree isolation)
  4. Spawn agents based on agent:* labels
  5. Monitor completion and run verification
  6. Handle failures with debug loop (TDD mode) or blocking
  7. Update beads status and merge completed work
  8. Repeat until truly done (stop hook prevents premature exit)
  9. Present "What's next?" prompt to guide user to next workflow step

Key guarantee: The stop hook ensures ALL tasks complete before exit. Claude queries beads state each cycle rather than tracking in context, enabling token-efficient persistence.

Telemetry Capture

Required after each agent completes:

  1. Parse agent output JSON (last line): {"s":"s","t":1200,"m":[...],"c":[...]}
  2. Insert into agent_telemetry table immediately
  3. Continue even if telemetry insert fails (log warning, don't block)

This enables retrospective analysis via /retro. Telemetry MUST be captured after EACH agent completes, not just at the end of the batch.

When to Use

  • After /approve-spec has created tasks
  • User says "run tasks", "start implementation", "execute"
  • There are open tasks in beads

Arguments

/run-tasks [epic-id]       # Run tasks for specific epic
/run-tasks                  # Run all ready tasks

Process Overview

Step 0a: Path Detection

Determine the location of discovery.db to support both new .parade/ structure and legacy project root:

# Path detection for .parade/ structure
if [ -f ".parade/discovery.db" ]; then
  DISCOVERY_DB=".parade/discovery.db"
else
  DISCOVERY_DB="./discovery.db"
fi

All subsequent database operations in this skill use $DISCOVERY_DB instead of hardcoded discovery.db.

Step 0b: Check TDD Configuration

Before starting task execution, check if TDD is enabled:

cat project.yaml | grep -A 1 "workflow:"

If tdd_enabled: true, enforce test-first gating workflow (see TDD Protocol). If tdd_enabled: false, use standard workflow without gating.

Step 0a: Git Setup (Epic Branch)

Create an epic integration branch to isolate all work for this epic:

# Ensure main is up to date
git checkout main
git pull origin main

# Create epic branch
git checkout -b epic/<epic-id>
git push -u origin epic/<epic-id>

All task branches will be created from this epic branch, enabling:

  • Clean parallel execution without affecting main
  • Atomic epic-level rollback if needed
  • Single merge commit when epic completes

See Git Strategy for complete branching and commit workflow.

Step 1: Get Ready Work

bd ready --json

This returns tasks that:

  • Have status open
  • Have no blocking dependencies (or all blockers are closed)

If epic-id is provided, filter:

bd list --parent <epic-id> --status open --json

Step 1a: Apply TDD Gating (if tdd_enabled)

For each ready task, check metadata and labels:

bd show <task-id> --json

TDD Gating Rules:

  • If task has skip_tests label → ALLOW immediately (no TDD gating)
  • If task has test_task_id metadata and test task is NOT closed → EXCLUDE from ready batch
  • Test tasks (those without test_task_id) can run immediately
  • Implementation tasks wait for their test tasks to close (RED phase verified)

See TDD Protocol for complete gating details.

Step 2: Identify Parallel Batches

Tasks can run in parallel if they don't depend on each other.

CRITICAL: Apply batch size limit to prevent context overflow.

# Check project config for max parallel tasks (default: 3)
MAX_PARALLEL=$(grep -A1 "workflow:" project.yaml | grep "max_parallel_tasks:" | awk '{print $2}')
MAX_PARALLEL=${MAX_PARALLEL:-3}

From the ready work, group tasks with size limit:

  • Sub-batch 1: First MAX_PARALLEL ready tasks
  • Sub-batch 2: Next MAX_PARALLEL ready tasks
  • Continue until all ready tasks are batched

Why this matters: Each agent returns ~2-3K tokens. Running 8+ agents in parallel returns 16-24K tokens simultaneously, overwhelming context and preventing compaction.

Example with MAX_PARALLEL=3:

Ready now (8 tasks):
- bd-x7y8.1 [agent:sql]
- bd-x7y8.2 [agent:swift]
- bd-x7y8.3 [agent:typescript]
- bd-x7y8.4 [agent:typescript]
- bd-x7y8.5 [agent:sql]
- bd-x7y8.6 [agent:swift]
- bd-x7y8.7 [agent:typescript]
- bd-x7y8.8 [agent:test]

Split into sub-batches:
- Sub-batch 1: [.1, .2, .3] → execute, wait, collect telemetry
- Sub-batch 2: [.4, .5, .6] → execute, wait, collect telemetry
- Sub-batch 3: [.7, .8] → execute, wait, collect telemetry

Execution pattern:

  1. Spawn sub-batch agents in parallel
  2. Wait for ALL agents in sub-batch to complete
  3. Capture telemetry for each (see Step 4a)
  4. Proceed to next
Полный SKILL.md на GitHub

Установить run-tasks в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

docs/agent-spawning.mddocs/git-strategy.mddocs/ralph-integration.mddocs/retrospective.mddocs/stop-hook-enforcement.mddocs/tdd-protocol.md

FAQ

Что делает скилл run-tasks?

Orchestrate task execution via beads and sub-agents. Gets ready work from beads, spawns appropriate agents based on labels, monitors completion, and updates status. Use after /approve-spec has created tasks.

Как установить скилл run-tasks?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл run-tasks запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить run-tasks с