axint_compile_from_schema
Compile minimal JSON schemas directly to Swift code for App Intents, SwiftUI views, WidgetKit widgets, and full apps, bypassing TypeScript to reduce code volume.
Instructions
Compile a minimal JSON schema directly to Swift, bypassing TypeScript. Supports intents, views, and widgets. Minimal JSON means ~20 tokens vs hundreds for full TypeScript. Returns Swift code with token usage stats.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | What to compile: intent, view, widget, or app | |
| name | Yes | PascalCase name (e.g., 'CreateEvent', 'EventListView') | |
| title | No | Human-readable title (for intents) | |
| description | No | Description of what this does | |
| domain | No | Intent domain (messaging, productivity, health, finance, commerce, media, navigation, smart-home) — intents only | |
| params | No | For intents: parameter definitions as { fieldName: 'type' }. Types: string, int, double, float, boolean, date, duration, url | |
| props | No | For views: prop definitions as { fieldName: 'type' }. Views only. | |
| state | No | For views: state definitions as { fieldName: { type: 'string', default?: value } }. Views only. | |
| body | No | For views/widgets: raw Swift code to use as the body. E.g., 'VStack { Text("Hello") }' — will be wrapped automatically. | |
| displayName | No | Display name (widgets only) | |
| families | No | Widget families: systemSmall, systemMedium, systemLarge, systemExtraLarge, accessoryCircular, accessoryRectangular, accessoryInline — widgets only | |
| entry | No | For widgets: timeline entry fields as { fieldName: 'type' }. Widgets only. | |
| refreshInterval | No | Widget refresh interval in minutes — widgets only | |
| scenes | No | For apps: scene definitions — apps only |