Skip to content

Worktrunk-Integrated Parallel Execution #31

Description

@kanfil

Summary

Major epic for implementing Worktrunk-integrated parallel execution with dependency-aware orchestration.

Purpose: Enable safe parallel execution of SYNC/ASYNC tasks with explicit dependency tracking and phase-respecting orchestration. Validates the incident.io pattern (multiple agents, branch isolation, clean merge workflow) using Worktrunk as optional infrastructure.

Implementation Roadmap (5 Phases, 10 Weeks)

Phase 1: Dependency Model & Parsing (Weeks 1-2)

  • Update tasks-template.md with depends: [T001, T002] syntax
  • Create scripts/bash/parse-dependencies.sh with DAG validation
  • Create PowerShell equivalent
  • Update /tasks template to emit dependency syntax

Phase 2: Phase-Aware Orchestration (Weeks 3-4)

  • Create scripts/bash/orchestrate-tasks.sh with phase-sequential + [P] parallelization
  • Create PowerShell equivalent
  • Extend /implement template to call orchestration logic
  • Add phase-aware progress reporting

Phase 3: Worktrunk Integration (Optional) (Weeks 5-6)

  • Create scripts/bash/spawn-task-worktree.sh with worktree creation
  • Create PowerShell equivalent
  • Generate .config/wt.toml template
  • Extend /implement to detect Worktrunk + choose execution path

Phase 4: Remote Async Agent Integration (Weeks 7-8)

  • Extend dispatch_async_task() to include worktree branch SHA + path
  • Create scripts/bash/package-task-context.sh
  • Update delegation template with task dependency metadata
  • Extend tasks-meta-utils.sh to track async task status

Phase 5: Monitoring & Documentation (Weeks 9-10)

  • Create monitoring dashboard script
  • Update /implement output to show phase progress
  • Create comprehensive guide
  • Create end-to-end integration test

Key Features

  • Hierarchical branch structure: feature/spec-name/task-NNN-description
  • Explicit dependencies in tasks.md: depends: [T001, T002]
  • Phase ordering: Setup → Foundational → Stories
  • Worktree isolation (optional)
  • Graceful fallback without Worktrunk

Priority

High - Parallel execution capabilities

Labels

epic, parallel, worktrunk, high

Metadata

Metadata

Assignees

No one assigned

    Labels

    epicEpic issuesparallelParallel executionworktrunkWorktrunk integration

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions