Files
Maestro/src/prompts/speckit/speckit.implement.md
Pedram Amini ee54e4ff49 tests pass
2025-12-22 19:37:09 -06:00

4.6 KiB

description
description
Execute spec-kit tasks using Maestro's Auto Run feature with optional git worktree support for parallel implementation.

User Input

$ARGUMENTS

You MUST consider the user input before proceeding (if not empty).

Overview

This command guides you through implementing your spec-kit feature using Maestro's powerful automation capabilities. The tasks.md file generated by /speckit.tasks is designed to work seamlessly with Maestro's Auto Run feature.

Implementation Workflow

Step 1: Locate Your Tasks File

Your tasks.md file is located in your feature's spec directory (e.g., specs/1-my-feature/tasks.md). This file contains all implementation tasks in a checkbox format that Auto Run can process automatically.

Step 2: Configure Auto Run

  1. Open the Right Bar in Maestro (press Cmd/Ctrl + B or click the sidebar toggle)
  2. Select the "Auto Run" tab
  3. Set the Auto Run folder to your spec-kit documents directory:
    • Click the folder icon or use the folder selector
    • Navigate to your feature's spec directory (e.g., specs/1-my-feature/)
  4. Select your tasks.md file from the document list

Step 3: Start Automated Implementation

Once configured, Auto Run will:

  • Read each task from tasks.md
  • Execute tasks sequentially (respecting dependencies)
  • Mark tasks as completed ([X]) with implementation notes
  • Handle parallel tasks ([P] marker) when possible

To start: Click the "Run" button or press Cmd/Ctrl + Enter in the Auto Run panel.

Advanced: Parallel Implementation with Git Worktrees

For larger features with independent components, you can use git worktrees to implement multiple parts in parallel across different Maestro sessions.

What are Worktrees?

Git worktrees allow you to have multiple working directories for the same repository, each on a different branch. This enables:

  • Multiple AI agents working on different feature branches simultaneously
  • Isolated changes that won't conflict during development
  • Easy merging when components are complete

Setting Up Parallel Implementation

  1. Identify Independent Tasks: Look for tasks marked with [P] in your tasks.md that can run in parallel.

  2. Create Worktrees in Maestro:

    • In each session, Maestro can automatically create a worktree for the feature branch
    • Use the worktree toggle in Auto Run to enable worktree mode
    • Each session gets its own isolated working directory
  3. Assign Tasks to Sessions:

    • Session 1: Phase 1 (Setup) + User Story 1 tasks
    • Session 2: User Story 2 tasks (if independent)
    • Session 3: User Story 3 tasks (if independent)
  4. Merge When Complete:

    • Each session commits to its feature branch
    • Use Maestro's git integration to merge branches
    • Or merge manually: git merge session-branch

Worktree Commands

Maestro handles worktrees automatically, but for manual setup:

# Create a worktree for a feature branch
git worktree add ../my-feature-worktree feature-branch

# List existing worktrees
git worktree list

# Remove a worktree when done
git worktree remove ../my-feature-worktree

Best Practices

  1. Complete Setup Phase First: Always complete Phase 1 (Setup) before parallelizing user stories.

  2. Respect Dependencies: Tasks without the [P] marker should run sequentially.

  3. Review Before Merging: Use /speckit.analyze after implementation to verify consistency.

  4. Incremental Testing: Each user story phase should be independently testable. Verify before moving to the next.

  5. Use Checklists: If you created checklists with /speckit.checklist, verify them before marking the feature complete.

Task Format Reference

Your tasks.md uses this format that Auto Run understands:

- [ ] T001 Setup project structure
- [ ] T002 [P] Configure database connection
- [ ] T003 [P] [US1] Create User model in src/models/user.py
- [ ] T004 [US1] Implement UserService
  • - [ ] = Incomplete task (Auto Run will process)
  • - [X] = Completed task (Auto Run will skip)
  • [P] = Parallelizable (can run with other [P] tasks)
  • [US1] = User Story 1 (groups related tasks)

Getting Help

  • View task progress: Check the Auto Run panel in the Right Bar
  • See implementation details: Each completed task includes notes about what was done
  • Troubleshoot issues: Check the session logs in the main terminal view

Next Steps After Implementation

  1. Run /speckit.analyze to verify implementation consistency
  2. Complete any remaining checklists
  3. Run tests to ensure everything works
  4. Create a pull request with your changes