BMAD-METHOD/devKalla-Fordonscervice/_wds/workflows/9-agent-dialogs/steps/step-04-execute-steps.md

5.4 KiB

Step 4: Execute Steps

CONTEXT

Step files are created. Now we execute each step, either in this dialog or in fresh agent dialogs.

Note: For implementation-specific execution details (feedback protocol, dynamic planning), see the Agentic Development Workflow in workflows/4-ux-design/agentic-development/workflow.md.


EXECUTION MODES

Mode A: Continuous Execution

Execute all steps in the current session.

  • Good for: Small implementations, full context available
  • Risk: Context window limits, fatigue

Mode B: Fresh Dialog Per Step

Start a new agent dialog for each step.

  • Good for: Large implementations, complex steps
  • Benefit: Fresh context, isolated focus
  • Requires: Well-written self-contained step files

Which execution mode?

[A] Continuous — Execute steps in this session [B] Fresh dialogs — I'll execute each step in a new dialog

Mode:


MODE A: CONTINUOUS EXECUTION

Execute Current Step

1. **Read the step file** completely 2. **Document any decisions or issues** in the dialog before implementing 3. **Execute the implementation** following the instructions 4. **Add sub-steps** if needed for things discovered during implementation 5. **Verify against acceptance criteria** 6. **Test using the test instructions**

Step Completion Checklist

  • All objectives achieved
  • Acceptance criteria pass
  • Tests pass
  • No TypeScript errors
  • Code follows existing patterns

Update Dialog File

**After completing each step:**
  1. Update step status: 🔲
  2. Add notes if relevant
  3. Add entry to Progress Log:
    ### {today's date}
    - Completed Step {N}: {step name}
    - {any notes or discoveries}
    

Continue or Pause

Step complete! What's next?

[A] Continue to next step [B] Pause — save progress and continue later [C] Review what was done

Choice:

1. Review and update remaining steps in dialog file 2. Load and execute next step file Update dialog file: - Status: "In Progress" - Progress Log: Note where we stopped - Ensure all decisions documented

Output: "Progress saved. The dialog is ready to resume."


MODE B: FRESH DIALOG INSTRUCTIONS

Handoff Always References Dialog

**Any handoff — to a new session, new agent, or human — MUST reference the dialog document.**

The dialog document is the single source of truth for:

  • What has been done
  • What decisions were made
  • What remains to be done
  • Any issues or blockers

Never hand off by describing the task verbally. Always point to the dialog.

For Each Step

**Generate handoff instructions:**
## Execute Step {N}: {Step Name}

### Dialog Document (READ FIRST)
`docs/F-Agent-Dialogs/{date}-{feature-name}/{date}-{feature-name}-dialog.md`

Read the dialog file first to understand:
- Overall context and scope
- What steps are complete
- Current status and any blockers

### Step File
`docs/F-Agent-Dialogs/{date}-{feature-name}/steps/{N}-{step-name}.md`

### Instructions
1. Read the dialog file completely
2. Read the step file
3. Execute the implementation
4. Document decisions in the dialog BEFORE implementing
5. Verify against acceptance criteria
6. Update dialog file: step status → ✅, add Progress Log entry

Track Progress

Step {N} — What's the status?

[A] Complete — Move to next step [B] 🔄 In Progress — Still working [C] ⏸️ Blocked — Cannot proceed [D] Skip — Will not implement

Status:

Update dialog file with reported status


HANDLING ISSUES

If Implementation Differs from Spec

Document in the dialog file's "Spec Changes Discovered" section:
Issue Resolution Spec Updated?
{issue} {how resolved} 🔲

If Step is Too Complex

Options: 1. Break into sub-steps (create additional step files) 2. Simplify scope (update dialog file) 3. Seek clarification (document blocker)

If Blocked on Dependencies

1. Update step status: ⏸️ Blocked 2. Document the blocker in Notes 3. Move to next step if possible 4. Return to blocked step later

PROGRESS TRACKING

After Each Step

Update the Steps Overview table:
# Step Status Notes
1 Step name Completed
2 Step name Completed with minor changes
3 Step name 🔄 In progress
4 Step name 🔲 Not started

Progress Log Entry

Add to Progress Log:
### {YYYY-MM-DD}
- Completed Step 1: {description}
- Completed Step 2: {description}
- Started Step 3
- Discovered: {any issues or learnings}

ALL STEPS COMPLETE

**All steps complete!**

Proceed to Step 5 to finalize the dialog.

[A] Continue to Step 5: Complete Dialog [B] Review the implementation first

Choice:


ROUTING

Based on completion: - All steps done → Load step-05-complete-dialog.md - Steps remaining → Continue execution loop - User pauses → Save state and exit

Agent Dialog Workflow — Step 4: Execute Steps