# Step 1: Initialize Dialog ## CONTEXT This is the first step of the Agent Dialog Workflow. Before creating a new dialog, we first check for any existing pending dialogs. --- ## CHECK FOR EXISTING DIALOGS ⚠️ **IMPORTANT: Always check for pending dialogs before creating a new one.** **Scan for existing dialogs:** 1. Check if `docs/F-Agent-Dialogs/` exists 2. If it exists, scan all subdirectories for dialog files (*-dialog.md) 3. Read the Meta section of each dialog file 4. Identify dialogs where: - Status = "Not Started" OR "In Progress" - Agent matches the current agent (if known) **If pending dialogs found:** Present them to the user: ``` 📋 **Found {N} pending dialog(s):** | # | Date | Agent | Feature | Status | |---|------|-------|---------|--------| | 1 | {date} | {agent} | {feature} | {status} | **Options:** [A] Continue existing dialog #{N} [B] Create a new dialog (existing ones remain pending) Choice: ``` If user chooses an existing dialog: - Load that dialog file - Check the Steps Overview table for next incomplete step - Continue from there If user chooses to create new: - Continue to SELECT DIALOG TYPE below **If no pending dialogs found OR docs/F-Agent-Dialogs/ doesn't exist:** Continue to SELECT DIALOG TYPE below. --- ## SELECT DIALOG TYPE **What type of work is this?** | Type | Icon | Use When | |------|------|----------| | **[A] Prototype Implementation** | 🔧 | Building UI from specifications | | **[B] Bug Fix** | 🐛 | Fixing issues and defects | | **[C] Design Exploration** | 🎨 | Exploring visual/UX directions | | **[D] Capture** | 💾 | Saving ideas for later | | **[E] Generic** | 📋 | Anything else | Type: Store dialog_type and select appropriate template: - A → templates/dialog-types/prototype-implementation.template.md - B → templates/dialog-types/bug-fix.template.md - C → templates/dialog-types/design-exploration.template.md - D → templates/dialog-capture.template.md - E → templates/dialog.template.md --- ## GATHER INFORMATION **What feature or implementation are we working on?** Examples: - "Booking details drawer" - "User authentication refactor" - "Calendar scroll fix" Feature name: Store feature_name and generate feature_slug (lowercase, hyphenated) **Which specification(s) are relevant?** Provide the path to the specification file(s) this implementation is based on. Specification path: Store spec_path **What agent persona should execute this work?** Examples: - "Freya (UX Designer)" — For UI implementation - "Dev Agent" — For backend work - "Full Stack" — For end-to-end features Agent: Store agent_name --- ## CREATE FOLDER STRUCTURE **Create dialog folder:** Path: `docs/F-Agent-Dialogs/{date}-{agent_slug}-{feature_slug}/` Where: - `{date}` = Today's date in YYYY-MM-DD format - `{agent_slug}` = Agent name, lowercase (e.g., "freya", "saga", "dev") - `{feature_slug}` = Feature name, lowercase, hyphenated **Examples:** - `2026-01-23-freya-booking-details-overlay/` - `2026-01-23-saga-course-workflow-integration/` - `2026-01-23-dev-calendar-scroll-fix/` **Create subfolders:** - `steps/` — For step instruction files --- ## CREATE DIALOG FILE **Create main dialog file:** File: `docs/F-Agent-Dialogs/{date}-{agent_slug}-{feature_slug}/{date}-{agent_slug}-{feature_slug}-dialog.md` **Use template from:** Selected dialog type template (see SELECT DIALOG TYPE step above) **Fill in:** - Date: Today's date - Agent: {agent_name} - Feature: {feature_name} - Specification: Link to {spec_path} - Status: "In Progress" --- ## GATHER SETUP CONTEXT **Read the specification file(s)** to understand: - What needs to be implemented - What already exists - Technical requirements **What's the tech stack for this project?** Example: "React 19, Next.js 15, TypeScript, Tailwind CSS, Supabase" Tech stack: Store tech_stack **What files are relevant to this implementation?** List the key files that will be modified or referenced. Relevant files: Store relevant_files **Are there any existing patterns to follow?** Describe component structure, styling approach, state management, etc. Patterns: Store patterns --- ## UPDATE DIALOG FILE **Fill in Setup Context section:** - Project Context (tech stack) - Relevant Files (table) - Existing Patterns - Current State (what exists) **Fill in Purpose:** - 1-3 sentences describing what this dialog accomplishes --- ## COMPLETION ✅ **Dialog initialized!** **Created:** - Folder: `docs/F-Agent-Dialogs/{date}-{agent_slug}-{feature_slug}/` - Dialog file: `{date}-{agent_slug}-{feature_slug}-dialog.md` - Steps folder: `steps/` **Next:** Proceed to Step 2 to analyze scope and create step breakdown. [A] Continue to Step 2: Analyze Scope [B] Review the dialog file first [C] Add more setup context Choice: --- ## ROUTING Based on user choice: - [A] → Load and execute step-02-analyze-scope.md - [B] → Show the dialog file contents - [C] → Ask for additional context to add --- _Agent Dialog Workflow — Step 1: Initialize Dialog_