validation_mode parameter controls how validation is performed and when approval is required.
Configuration
Validation Modes
Interactive Mode (Default)
Value:interactive
Description: Presents each diagram individually with its validation score and waits for human approval before proceeding.
Best For:
- First-time executions
- Critical product features
- Learning the validation system
- High-stakes projects
Batch Mode
Value:batch
Description: Generates all diagrams first, presents them together with a consolidated report, then waits for batch approval.
Best For:
- Reviewing complete diagram sets
- Stakeholder presentations
- Comparative analysis across diagrams
- Team review sessions
Auto Mode
Value:auto
Description: Automatically approves diagrams that meet or exceed the validation_threshold without human intervention.
Best For:
- CI/CD pipelines
- Automated workflows
- Iterative refinements
- Production environments (after calibration)
Validation Threshold
Parameter:validation_threshold
Type: number (0.0 - 1.0)
Default: 0.85
Description: Minimum coherence score required for automatic approval when using validation_mode: auto.
Recommended Thresholds
| Threshold | Use Case | Risk Level |
|---|---|---|
0.95 | Production-critical features | Very Low |
0.90 | Standard product features | Low |
0.85 | Default - Balanced approach | Medium |
0.80 | Rapid prototyping | High |
0.75 | Early-stage exploration | Very High |
Threshold Calibration
Start with Interactive Mode
Run several PRDs with
validation_mode: interactive to see typical scores for your project.Validation Criteria
All modes use the same weighted scoring system:| Criterion | Weight | Description |
|---|---|---|
| Coverage | 0.25 | % of PRD features/stories represented in diagrams |
| Consistency | 0.25 | Entities and flows consistent across diagrams |
| Completeness | 0.20 | All paths (happy/sad) represented |
| Traceability | 0.15 | Diagram elements traceable to PRD requirements |
| Naming Coherence | 0.10 | Consistent naming across diagrams |
| Dependency Integrity | 0.05 | Feature dependencies respected |
Validation Report Structure
All modes generate a detailed validation report:Mode Comparison
| Feature | Interactive | Batch | Auto |
|---|---|---|---|
| Human Approval | Per diagram | All at once | None (auto) |
| Speed | Slowest | Medium | Fastest |
| Control | Highest | High | Lowest |
| Best For | First runs | Reviews | CI/CD |
| Threshold Use | Ignored | Display only | Decision criteria |
| Feedback Loop | Per diagram | Per batch | Logged only |
| CI/CD Friendly | ❌ No | ⚠️ Requires interaction | ✅ Yes |
Best Practices
Use Interactive for First Execution
Use Interactive for First Execution
Always start with
validation_mode: interactive to understand diagram quality and calibrate your expectations.Batch for Stakeholder Reviews
Batch for Stakeholder Reviews
Use
validation_mode: batch when presenting diagrams to product managers, designers, or technical stakeholders who need the full picture.Auto for CI/CD Pipelines
Auto for CI/CD Pipelines
Once calibrated, use
validation_mode: auto in automated workflows to enable continuous design generation.Don't Set Threshold Too Low
Don't Set Threshold Too Low
A threshold below 0.75 often indicates PRD quality issues. Improve your PRD rather than lowering the threshold.
Monitor Rejection Patterns
Monitor Rejection Patterns
If certain diagram types consistently score low, it may indicate missing sections in your PRD template.
Review ER Diagrams Carefully
Review ER Diagrams Carefully
Entity-Relationship diagrams are foundational. Even in auto mode, consider manually reviewing ER diagram consistency.
Troubleshooting
Low Coverage Scores
Problem: Coverage consistently below 0.80 Solution:- Ensure your PRD includes detailed features and user stories
- Check that PRD sections use recognizable headings (## Feature, ## User Story)
- Add acceptance criteria to each feature
Low Consistency Scores
Problem: Consistency below 0.80 Solution:- Use consistent entity names throughout PRD
- Define entities explicitly in a Data Model section
- Ensure feature dependencies are clearly stated
Low Completeness Scores
Problem: Completeness below 0.80 Solution:- Document error cases and edge cases in PRD
- Include “sad path” scenarios in user stories
- Add validation and error handling requirements
All Diagrams Auto-Rejected
Problem: Every diagram scores below threshold Solution:- Lower threshold temporarily (e.g., 0.75)
- Run in interactive mode to see specific issues
- Improve PRD based on validation feedback
- Re-run with original threshold
Next Steps
Design Systems
Configure Material 3, Apple HIG, Tailwind, or custom systems
Hooks
Automate actions on validation events