Worktree Prompt (Separate Directories for Different Features - So You Can Work in Parallel)

NOTE : click on the code sections to copy

(Save this as .claude/commands/parallel-work.md)

I want to develop features in parallel for my expense tracker app using Git worktrees: $ARGUMENTS
Think about how to divide the work up into separate features unless this has been clearly explained already.
Please help me set up the worktree environment:
1. For each feature mentioned, create a worktree at ../expense-tracker-[feature-name] with branch feature/[feature-name] 2. Set up the development environment in each worktree 3. List all worktrees to confirm they were created 4. Explain what each worktree will contain and how they're isolated
I want to be able to work on all features simultaneously without conflicts.

That's for creation. When you're done:

(Save this as .claude/commands/integrate-parallel-work.md)

I have features developed in parallel worktrees that I need to integrate: $ARGUMENTS
Please help me integrate these features:
1. Create a new integration branch called "integration/parallel-features" 2. For each feature name provided, merge the branch feature/[feature-name] into the integration branch 3. Resolve any merge conflicts that arise 4. Test that all features work together 5. Run all tests to ensure nothing is broken 6. Once integration is successful, merge to main and clean up branches
I want to integrate these safely before merging to main.

Suggested parallel agents command:

(Save this as .claude/commands/parallel-agents.md)


I want to develop features in parallel using Git worktrees and subagents: $ARGUMENTS
You are in the parent folder of the main repo. You will need to change to the main repo folder to create the worktrees. Please execute this complete workflow: PHASE 1 - SETUP WORKTREES: For each feature mentioned: 1. Create a worktree at ../expense-tracker-[feature-name] with branch feature/[feature-name] 2. Set up the development environment in each worktree (if needed) 3. List all worktrees created PHASE 2 - SPAWN SUBAGENTS: For each feature, run a subagent in parallel with these instructions: - You are working in the expense-tracker-[feature-name] worktree directory - This is a completely isolated development environment - Implement the [feature-name] feature with full functionality - Include proper testing and error handling - Compile and run tests, but don't attempt to run the application (e.g., don't do "npm run" or "npm run dev &", etc.) - When complete, write a detailed summary in [feature-name].work.txt in the main expense-tracker-ai directory - The summary should include: what was implemented, files created/modified, dependencies added, testing approach, and integration notes PHASE 3 - COORDINATION: - Monitor all subagents working in parallel - Ensure each subagent completes their feature implementation - Verify each subagent creates their work summary file PHASE 4 - FINAL SUMMARY: After all subagents complete: 1. Read all the .work.txt files created by subagents 2. Provide a comprehensive summary of what was accomplished 3. List all features implemented and their status 4. Provide next steps for integration Execute this complete parallel development workflow.

Comments

Popular posts from this blog

Claude.md for Python Data Science

Claude.md for Responsive Mobile App Development with React Native