AI Integration
VizzyCode integrates with multiple headless AI tools and provides guidance for giving AI agents enough context to repair Vizzy missions without damaging fidelity-sensitive regions. ia prompts
Do not provide only the
.csfileA
.vizzy.csfile alone is insufficient context for mission repair. Include the project docs, validator state, original XML when available, sidecar metadata, and bridge reports when craft-specific behavior matters.
Providers
| Provider | CLI command | Default model | Interactive mode |
|---|---|---|---|
| Claude | claude -p --verbose --output-format stream-json --include-partial-messages | Configured by Claude CLI | Headless stream JSON plus optional UI integration |
| Gemini | gemini headless binary | gemini-2.5-pro | Headless command execution |
| OpenAI/Codex | codex exec --json | gpt-5-codex | JSON execution mode |
| OpenCode | opencode run --format json | Provider configuration | Supports custom Base URL |
Settings file:
%AppData%\VizzyCode\ai-settings.jsonAI Flow
flowchart LR A[User request] --> B{Mode} B -->|Headless| C[Build context bundle] B -->|Interactive| D[Open chat panel] C --> E[Run provider CLI] D --> E E --> F[Patch .vizzy.cs or docs] F --> G[Export] G --> H[Validate] H --> I[Roundtrip or Juno test]
Context Bundles
Minimum bundle for normal authoring
README.mddocs/VizzyAuthoringGuide.mddocs/VizzyBlocksMegaGuide.mddocs/ExportValidationAndCoverageGuide.md- Current
.vizzy.csfile
Minimum bundle for AI repair
README.mddocs/VizzyAuthoringGuide.mddocs/VizzyBlocksMegaGuide.mddocs/AiRepairContextGuide.mddocs/RawPreservationGuide.mddocs/ExportValidationAndCoverageGuide.md- Current
.vizzy.cs - Current validator output
Complete fidelity-sensitive bundle
- Original working XML
- Current
.vizzy.cs - Current exported XML if it exists
- Matching
.vizzy.meta.jsonsidecar - Raw fragment decode output for any unclear
Raw*payloads - CLI export output
- VS Code export output if tool parity is being checked
- Craft snapshot report if part names, stages, mass, fuel, or activation groups matter
- Telemetry report if runtime state matters
Reports first
Prefer bridge-generated Markdown reports for AI context, then include JSON only when exact raw fields are needed.
Repair Rules For AI
| Rule | Reason |
|---|---|
| Determine source of truth first. | Original XML and current code can diverge. |
Check whether the region has VZTOPBLOCK, VZBLOCK, or VZEL. | Anchors indicate preserved imported structure. |
| Do not rewrite raw fragments blindly. | RawXml* often marks an exact XML boundary. |
| Fix one structural issue at a time. | Juno load failures can stack. |
| Run export validation after every change. | Validator catches known invalid shapes. |
Prompt Template
Investigate this Vizzy mission without globally rewriting it.
First determine whether the original XML or the current .vizzy.cs is the source of truth.
Then identify whether the failing region is preserved imported XML or handwritten authoring code.
If the region has VZTOPBLOCK, VZBLOCK, VZEL, RawXml*, or a sidecar entry, treat that as a fidelity boundary unless proven otherwise.
Run export validation and fix one exact XML structural issue at a time.
Do not replace raw-preserved fragments only for readability.Backlinks
Related notes: 02 - Conversion Engine (VizzyXmlConverter), 04 - Export Validation, 05 - Raw Preservation, 06 - Juno Live Bridge, 10 - Vizzy Authoring Guide, 14 - Troubleshooting.