# Mimir v2 Prompting Framework - Structure Summary
**Created:** 2025-01-21
**Status:** β
Structure Complete - Ready for Content
---
## π File Structure
```
docs/agents/v2/
βββ README.md # Framework overview & philosophy
βββ STRUCTURE_SUMMARY.md # This file
βββ 00-ecko-preamble.md # Stage 0: Prompt architect (optional)
βββ 01-pm-preamble.md # Stage 1: Project manager
βββ 02-agentinator-preamble.md # Stage 2: Dynamic preamble generator
βββ 03-qc-failure-report-preamble.md # Stage 3: Failure analysis
βββ 04-circuit-breaker-analysis-preamble.md # Stage 4: Runaway diagnosis
βββ 05-final-report-preamble.md # Stage 5: Report synthesis
βββ templates/
βββ worker-template.md # Template for Worker agents (used by Agentinator)
βββ qc-template.md # Template for QC agents (used by Agentinator)
βββ reasoning-template.md # Standard reasoning format
βββ verification-template.md # Standard verification format (TBD)
βββ output-format-template.md # Standard output format (TBD)
```
---
## π Workflow & Agent Roles
### Static Preambles (Always the same)
1. **Ecko (00)** - OPTIONAL
- Transforms raw user requests into structured prompts
- Input: Vague user request
- Output: Structured prompt for PM
2. **PM (01)** - REQUIRED
- Decomposes requirements into task graph
- Input: User requirements
- Output: Task specifications with role descriptions
3. **Agentinator (02)** - REQUIRED (per task)
- Generates custom Worker and QC preambles
- Input: PM's role description + template
- Output: Customized preamble for specific task
4. **QC Failure Report (03)** - AS NEEDED
- Analyzes failures and provides corrections
- Input: Failed task + QC report
- Output: Actionable correction guidance
5. **Circuit Breaker Analysis (04)** - AS NEEDED
- Diagnoses runaway executions
- Input: Execution metadata
- Output: Root cause + recommendations
6. **Final Report (05)** - REQUIRED
- Synthesizes all results
- Input: All task results
- Output: Comprehensive report
### Dynamic Preambles (Generated per task)
**Worker Preamble** - Generated by Agentinator
- Template: `templates/worker-template.md`
- Customized for each task based on PM's role description
- Example: "Backend engineer with Node.js" β Node.js-specific worker preamble
**QC Preamble** - Generated by Agentinator
- Template: `templates/qc-template.md`
- Customized for each task based on PM's QC role description
- Example: "Senior QA with API testing" β API testing-specific QC preamble
---
## π― Key Design Decisions
### Why Agentinator?
**Problem:** PM would need to write full preambles for each task (1000+ tokens each)
**Solution:** PM writes short role descriptions, Agentinator expands them into full preambles
**Benefits:**
- β
PM output stays concise (50 tokens vs. 1000+ tokens per task)
- β
Consistency (all agents use same template structure)
- β
Customization (each agent gets task-specific guidance)
- β
Quality (templates encode best practices from research)
- β
Maintainability (update template once, affects all future agents)
### Why Templates?
**Problem:** Every worker/QC agent needs same structure but different content
**Solution:** Templates with `<TO BE DEFINED>` placeholders that Agentinator fills
**Benefits:**
- β
Enforces consistent structure (all 8 sections present)
- β
Encodes best practices (reasoning, verification, bookending)
- β
Easy to improve (update template, all future agents benefit)
- β
Reduces errors (structure is guaranteed correct)
---
## π Token Economics
### Old Approach (v1):
```
PM Output per task: ~1500 tokens (includes full preamble)
Γ 5 tasks = 7,500 tokens
```
### New Approach (v2):
```
PM Output per task: ~200 tokens (role description only)
Γ 5 tasks = 1,000 tokens
Agentinator per task: ~500 tokens (template expansion)
Γ 5 tasks = 2,500 tokens
Total: 3,500 tokens (53% reduction!)
```
---
## π§ Implementation Status
### β
Complete:
- [x] Framework README
- [x] Ecko preamble boilerplate (00)
- [x] PM preamble boilerplate (01)
- [x] Agentinator preamble boilerplate (02)
- [x] Worker template boilerplate
- [x] QC Failure Report preamble boilerplate (03)
- [x] Circuit Breaker Analysis preamble boilerplate (04)
- [x] Final Report preamble boilerplate (05)
- [x] Reasoning template
### β³ To Do:
- [ ] QC template boilerplate (in templates/)
- [ ] Verification template
- [ ] Output format template
- [ ] Fill in `<TO BE DEFINED>` sections for each preamble
- [ ] Add examples to each preamble
- [ ] Test with actual execution
- [ ] Measure success rate improvement
---
## π― Next Steps
1. **Create QC Template** - Mirror worker template structure
2. **Fill PM Preamble** - Priority 1 (most critical)
3. **Fill Worker Template** - Priority 2 (used by all tasks)
4. **Fill QC Template** - Priority 3 (used by all tasks)
5. **Fill Agentinator** - Priority 4 (orchestrates template usage)
6. **Test Execution** - Run with v2 prompts
7. **Measure & Iterate** - Track success rate, refine
---
**Status:** π§ Structure complete, ready for content
**Next:** Fill in PM preamble (Stage 1)