# Prompt Iteration Workflow ## The Idea A simple, distraction-free workflow where: 1. **You write prompts in a text file** (`prompt.txt`) 2. **The AI monitors the file** for changes 3. **When you save**, the AI detects the change and processes your prompt 4. **The AI responds** in a separate file (`respons.txt`) ### How It Works ``` ┌─────────────────┐ │ prompt.txt │ ← You edit this in any text editor │ (Your Input) │ └────────┬────────┘ │ (save triggers detection) ▼ ┌─────────────────┐ │ AI Monitor │ ← CLI-AI watches for file changes │ (File Watcher)│ └────────┬────────┘ │ (processes prompt) ▼ ┌─────────────────┐ │ respons.txt │ ← AI writes response here │ (AI Output) │ └─────────────────┘ ``` ### Benefits - **Distraction-free**: Use any editor (vim, nano, LibreOffice, etc.) - **Async workflow**: Save when ready, AI picks it up automatically - **Persistent**: Your prompts and responses are saved as files - **Simple**: No complex interfaces or tool switching - **Iterative**: Refine your prompt, save again, get new response --- ## Prompt Iteration vs Prompt Engineering ### Prompt Engineering **Definition:** The practice of designing, testing, and optimizing prompts to get the best output from an AI model. **Characteristics:** - One-shot or few-shot optimization - Focus on finding the "perfect" prompt formulation - Often involves A/B testing different phrasings - Typically done in AI chat interfaces or playgrounds - Emphasis on technique and methodology **Example:** "Write a function that..." vs "Create a robust, production-ready function with error handling that..." ### Prompt Iteration **Definition:** A workflow where you continuously refine prompts in an external file, with the AI responding to each iteration. **Characteristics:** - Continuous refinement loop - Focus on the **process** of improvement over time - Uses file-based workflow for separation of concerns - Allows deep thinking and editing in your preferred editor - Emphasis on **iteration** and **evolution** of ideas **Example:** 1. Save: "Write a simple function" 2. AI responds 3. Edit & save: "Add error handling and type hints" 4. AI responds 5. Edit & save: "Now make it production-ready with logging" 6. And so on... ### Key Differences | Aspect | Prompt Engineering | Prompt Iteration | |--------|-------------------|------------------| | **Focus** | Finding the right prompt | Evolving the prompt over time | | **Workflow** | Test → Compare → Select | Write → Save → Refine → Repeat | | **Tool** | AI chat interface | External text editor + file monitoring | | **Mindset** | Optimization | Iteration & refinement | | **Output** | Best single response | Series of evolving responses | | **Distraction** | Context switching in AI interface | Focused writing in your editor | ### Summary **Prompt Engineering** is about *crafting* the optimal prompt. **Prompt Iteration** is about *evolving* your ideas through continuous refinement in a distraction-free environment. The iteration workflow complements engineering - you're still engineering better prompts, but through a file-based, iterative process rather than direct chat manipulation.