| name | prompt-iteration |
| description | Use when optimizing AI prompts through structured feedback loops, refining prompt performance over multiple iterations, building systematic prompt improvement processes, or when output quality needs consistent enhancement through version control. |
Prompt Iteration - Structured Prompt Optimization
Overview
Prompt iteration IS Test-Driven Development applied to prompt engineering.
Transform vague "it's not good enough" feedback into actionable improvement lists through structured version control, ultimately forming a complete, reproducible system. Each iteration refines the prompt based on specific feedback, preserving what works while fixing what doesn't.
Core principle: Never modify historical versions (append only, never edit). Every iteration learns from all previous feedback, accumulating principles over time.
When to Use
Use this skill when:
- AI prompt output quality needs systematic improvement
- You want to build reproducible prompt systems
- Multiple people need to provide feedback on prompts
- You need to track prompt evolution over time
- Output requires consistent quality standards
When NOT to use:
- One-off prompt improvements without need for tracking
- Simple prompts that don't require iteration
- Projects without version control needs
Core Pattern
The Iteration Loop
vN Prompt → vN Output → vN Feedback → v(N+1) Prompt → ...
Each iteration contains 4 steps:
- Read Feedback: Review feedback/vN_feedback.md
- Analyze Problems: Identify issues requiring fixes
- Create New Version: Build prompts/v(N+1).md based on feedback
- Generate Output: Produce outputs/v(N+1)_output.txt
File Structure
project-name/
├── prompts/ # All prompt versions
│ ├── v1.md
│ ├── v2.md
│ └── ...
├── outputs/ # Generated outputs for each version
│ ├── v1_output.txt
│ ├── v2_output.txt
│ └── ...
├── feedback/ # Feedback for each version
│ ├── v1_feedback.md
│ ├── v2_feedback.md
│ └── ...
└── 【Final】project-name_vN.md # Consolidated final version
Version control rules:
- Never modify historical versions (append only)
- Each iteration creates new v(N+1) files
- Preserve complete history for analysis
Quick Reference
Effective Feedback Principles
| ❌ Bad Feedback | ✅ Good Feedback |
|---|
| "Not good enough" | "Paragraph 3 logic has issues:..." |
| "Be more natural" | "Remove 'first, second, third', use 'one...another...' instead" |
| "Don't use certain expressions" | "❌ Wrong: 'firstly' ✅ Right: 'another point is'" |
| Too abstract | Specific to paragraph, sentence, word |
Feedback Template
# vN Feedback
## Problems
**Problem 1:**
- Specific description
- Examples from output
- Why it's a problem
**Problem 2:**
- ...
## Suggestions
**Suggestion 1:**
- Specific correction direction
- ❌ Wrong: [example]
- ✅ Right: [example]
**Suggestion 2:**
- ...
## New Requirements (Optional)
New topics or task requirements
Iteration Techniques
1. Incremental Correction
- ❌ Feedback on 10 issues at once
- ✅ 2-3 major issues per iteration
2. Priority Levels
- P0 (Must fix): Violates core principles, clearly forbidden expressions, factual errors
- P1 (Should fix): Hurts experience, inconsistent style
- P2 (Nice to have): Improvements, optional optimizations
3. Provide Examples
Not "don't use X", but "don't use X, use Y instead"
4. Accumulation Principle
Maintain "Forbidden List" and "Recommended List" across all iterations:
## Forbidden List (Cumulative)
- v1: Don't use "to be honest"
- v3: Don't use "cognitive" as universal explanation
- v5: Don't mention specific amounts
- v10: Don't use "first, second, third"
- v13: Don't use "not...but..."
## Recommended List (Cumulative)
- v1: Open with case study
- v7: Acknowledge complexity, no standard answers
- v10: Define concepts with observable behavior
- v15: Diversified endings (8 versions)
Implementation
Step 1: Initialize Project
mkdir -p prompts outputs feedback
touch prompts/v1.md
touch README.md
Step 2: Create Initial Prompt
prompts/v1.md template:
# [Project Name v1.0] Description
## Core Task
Describe what you want AI to do.
## Output Requirements
- Word count: X words
- Style: Natural, professional, humorous...
- Structure: Opening, body, conclusion
- Other requirements...
## Framework (Optional)
Provide specific writing/execution framework.
## Checklist
Items to check after generation.
Step 3: Generate First Output
- Send prompts/v1.md content to AI
- Generate output following prompt
- Save to outputs/v1_output.txt
Step 4: Provide Feedback
Create feedback/v1_feedback.md using template above.
Step 5: Iterate
Trigger with: "Start iteration" or "Create new version based on feedback"
AI will:
- Read feedback/vN_feedback.md
- Analyze all problems
- Create prompts/v(N+1).md
- Generate outputs/v(N+1)_output.txt
- Create feedback/v(N+1)_feedback.md (awaiting your feedback)
Common Mistakes
| Mistake | Fix |
|---|
| Feedback too abstract | Be specific: paragraph, sentence, word level |
| Ignore accumulation | Review all historical feedback each iteration |
| Premature freezing | Allow early exploration, freeze principles mid-late |
| Contradictory feedback | Check new feedback against old, explain if changing |
When to Stop Iteration
Signal 1: Reduced feedback
- 3+ consecutive iterations with <3 feedback items
- Or only minor corrections (typos, punctuation)
Signal 2: System formation
- Clear forbidden/recommended lists
- Complete checklist
- Stable output quality
Signal 3: Goal achieved
- Output meets predetermined standards
- Ready for consistent use
- No major fixes needed
Real-World Impact
Roland Wayne Writing Style Project:
- 15 iterations from initial concept to complete system
- Outcome: 8 ending variations, complete checklist, forbidden/recommended lists
- Key insight: Early exploration (v1-v6), pivotal moment (v7), late refinement (v10-v15)
- Result: Reproducible writing system generating consistent high-quality output
Learned from iterations:
- v1-v6: Allow experimentation, failure has value
- v7: Pivotal shift from "provide answers" to "reject standard answers"
- v10-v15: Detail polishing, from framework to expression
- v15: Systematization with 8 ending versions
Version History Reference
When analyzing past iterations:
| Version | Key Changes | Type |
|---|
| v1 | Initial version | Exploration |
| v2 | Data-driven attempt (failed) | Exploration |
| v7 | Philosophy shift: reject standard answers | Pivotal |
| v10 | Direct case introduction | Refinement |
| v12 | Remove "first, second" structure | Refinement |
| v13 | Remove "not...but..." pattern | Refinement |
| v15 | 8 ending variations system | Systematization |
Advanced Techniques
Problem Classification
Type A: Structural
- Article framework, paragraph structure
- Opening/closing approaches
- Logical sequence
Type B: Expressive
- Specific vocabulary, sentence patterns
- Punctuation
- Language style
Type C: Conceptual
- Core concept definitions
- Value orientations
- Philosophical positions
Type D: New Requirements
- New topics
- New features
- New constraints
Cumulative Effect Management
Warning: Each version must preserve ALL previous valid fixes.
v5 feedback: Remove "to be honest"
v7 feedback: Remove "I've seen too many"
v10 feedback: Remove "first, second"
→ v15 should remove ALL above, not just the latest
Final Version Structure
When project is complete, create consolidated version:
# [Project Name Final vN.0] Complete System
## Version Notes
Integrates all principles and fixes from v1-vN into complete system.
## I. Core Principles
(All accumulated core principles)
## II. Forbidden List
(All accumulated forbidden expressions)
## III. Recommended List
(All accumulated recommended expressions)
## IV. Complete Framework
(Detailed execution framework)
## V. Checklist
(Core checklist for verification)
## VI. Iteration History
(Major fixes from v1-vN)
Related Skills
- REQUIRED: Use superpowers:test-driven-development for fundamental RED-GREEN-REFACTOR cycle
- RECOMMENDED: Use superpowers:writing-skills for creating new prompt systems
Core Insight
"Through structured iteration workflows, transform vague 'improvement needs' into actionable 'fix checklists', ultimately forming a complete, reproducible system."
The essence:
- Early stages: Allow trial and error
- Middle stages: Watch for pivotal moments
- Late stages: Polish details
- Final stage: Build reproducible system
Remember:
- Every iteration is learning, not just fixing
- Extract principles from specific problems
- Document everything for knowledge transfer
- Build systems, not one-time solutions