LLM Skills
~/catalogue/debugging et maintenance//parallel-workflows

workflowss parallèles avec les arborescences de travail Git

/parallel-workflows

+-- ../project-feature-auth (session 1 de Claude)

asklokeshasklokesh
1.1k
4 mai 2026
// contenu du skill

Parallel Workflows with Git Worktrees

Research basis: Claude Code git worktrees pattern, Anthropic "One Feature at a Time" harness, HN production patterns on context isolation.

Why Worktree-Based Parallelism

The Problem:

  • Single Claude session = sequential work
  • Feature A blocks Feature B
  • Testing waits for development to finish
  • Documentation waits for everything
  • Context bloats with unrelated work

The Solution:

  • Git worktrees = isolated working directories
  • Multiple Claude sessions = true parallelism
  • Each stream has fresh context
  • Work merges back when complete
Main Worktree (orchestrator)
    |
    +-- ../project-feature-auth (Claude session 1)
    +-- ../project-feature-api (Claude session 2)
    +-- ../project-testing (Claude session 3)
    +-- ../project-docs (Claude session 4)

Parallel Work Streams

StreamPurposeWorktreeTriggers
feature-NImplement features../project-feature-{name}PRD task breakdown
testingUnit, integration, E2E../project-testingAfter feature checkpoint
qa-validationUAT, accessibility../project-qaAfter tests pass
documentationDocs, changelog../project-docsAfter feature merge
blogBlog posts (if site has blog)../project-blogAfter significant releases

Worktree Management Commands

Create Feature Worktree

bash
# From main worktree
git worktree add ../project-feature-auth -b feature/auth

# Initialize environment
cd ../project-feature-auth
npm install  # or pip install, cargo build, etc.

Create Testing Worktree (based on main)

bash
# Testing always runs against latest main via a dedicated branch
# NOTE: git worktree cannot checkout the same branch in two worktrees,
# so we create a parallel-testing branch based on main
git worktree add ../project-testing -b parallel-testing main

# Pull latest before each test run
cd ../project-testing
git pull origin main

Merge Completed Work

bash
# Feature complete, merge back
cd /path/to/main/worktree
git merge feature/auth --no-ff -m "feat: User authentication"

# Remove worktree
git worktree remove ../project-feature-auth
git branch -d feature/auth

List and Clean Worktrees

bash
# List all worktrees
git worktree list

# Prune stale worktrees
git worktree prune

Orchestrator Workflow

The main orchestrator manages parallel streams:

yaml
orchestrator_workflow:
  1_plan:
    - Analyze PRD for parallelizable features
    - Create task breakdown with dependencies
    - Identify independent streams

  2_spawn:
    - Create worktrees for independent features
    - Launch Claude session per worktree
    - Start testing worktree (tracks main)

  3_coordinate:
    - Watch .loki/state/ in each worktree
    - Detect feature completion signals
    - Trigger testing on checkpoints
    - Queue documentation on merges

  4_merge:
    - Validate tests pass on feature branch
    - Merge to main
    - Update testing worktree (git pull)
    - Trigger documentation stream

  5_cleanup:
    - Remove completed worktrees
    - Archive session logs
    - Update main orchestrator state

Claude Session Per Worktree

Each worktree runs an independent Claude session:

bash
# Feature development session
cd ../project-feature-auth
claude --dangerously-skip-permissions -p "Loki Mode: Implement user authentication. Read .loki/CONTINUITY.md for context."

# Testing session (continuous)
cd ../project-testing
claude --dangerously-skip-permissions -p "Loki Mode: Run all tests. Watch for changes. Report failures to .loki/state/test-results.json"

# Documentation session
cd ../project-docs
claude --dangerously-skip-permissions -p "Loki Mode: Update documentation for recent changes. Check git log for what changed."

Inter-Stream Communication

Streams communicate via .loki/signals/ and shared git history:

Signal Files

.loki/signals/
  FEATURE_READY_{name}      # Feature ready for testing
  TESTS_PASSED              # All tests green
  DOCS_NEEDED               # Documentation required
  BLOG_POST_QUEUED          # Blog post should be written
  MERGE_REQUESTED_{branch}  # Request merge to main

Workflow Triggers

yaml
feature_complete:
  signal: "Create .loki/signals/FEATURE_READY_{name}"
  triggers:
    - Testing stream pulls feature branch
    - Testing stream runs full suite
    - On pass: create TESTS_PASSED + MERGE_REQUESTED

merge_complete:
  signal: "Merge commit on main"
  triggers:
    - Documentation stream updates docs
    - If significant: create BLOG_POST_QUEUED
    - Testing stream pulls latest main

blog_trigger:
  signal: "BLOG_POST_QUEUED exists"
  triggers:
    - Blog stream creates post about changes
    - Removes signal when published

Parallel Testing Strategy

Continuous Testing Worktree

bash
# Testing worktree watches for chang
// source originale publique
asklokesh/claudeskill-loki-mode
/skills/parallel-workflows.md
Licence : Licence non indiquée. Consultez le dépôt avant toute réutilisation.
Projet indépendant, non affilié à Anthropic. Ce skill reste la propriété de son auteur original.
// installer ce skill
Collez cette commande dans votre terminal à la racine de votre projet :
mkdir -p .claude/commands && curl -o ".claude/commands/parallel-workflows.md" "https://raw.githubusercontent.com/asklokesh/claudeskill-loki-mode/main/skills/parallel-workflows.md"
Ensuite dans Claude Code, tapez /parallel-workflows pour l'activer.
open_in_newVoir la source originale
// sauvegarder
Sauvegarde disponible après connexion.
loginSe connecter pour sauvegarder
// informations
Créateurasklokesh
Étoiles 1.1k
Mis à jour4 mai 2026
Format.md
AccèsGratuit
// similaires

Skills Debugging et maintenance

Voir toutarrow_forward