axint.schema.compile
Compile minimal JSON schema into Swift for intents, views, components, widgets, or apps. Bypasses TypeScript DSL for token-light generation.
Instructions
Compile a minimal JSON schema directly to Swift, bypassing the TypeScript DSL entirely. Supports intents, views, components, widgets, and full apps via the 'type' parameter. Uses ~20 input tokens vs hundreds for TypeScript — ideal for LLM agents... Use: use for token-light JSON-to-Swift generation; use compile for full TypeScript DSL control. Effects: read-only Swift generation; writes no files and uses no network.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | What to compile. Determines which other parameters are relevant: intent uses params/domain/title; view uses... | |
| name | Yes | PascalCase name, e.g., 'CreateEvent' for intents, 'EventListView' for views, 'StepsWidget' for widgets. Used... | |
| title | No | Human-readable title shown in Shortcuts/Spotlight. Intent only. E.g., 'Create Event'. Defaults to a... | |
| description | No | Description of what this intent/view/widget does. Shown to users in system UI for intents. Optional but... | |
| componentKind | No | Component only. Optional known component shape. Use cardArchetypes for a multi-component card kit, or omit... | |
| tokenNamespace | No | Optional Swift token enum generated by axint.tokens.ingest, e.g., 'SwarmTokens'. Generated views/components... | |
| domain | No | Apple App Intent domain. Intent only. One of: messaging, productivity, health, social, finance, commerce,... | |
| params | No | Intent only. Parameter definitions as { fieldName: typeString }. E.g., { recipient: 'string', amount:... | |
| props | No | View only. Prop definitions as { fieldName: typeString }. E.g., { title: 'string', count: 'int' }. Same type... | |
| state | No | View only. State variable definitions as { fieldName: { type: 'string', default?: value } }. Generates... | |
| body | No | View/widget only. Raw SwiftUI code for the body, e.g., 'VStack { Text("Hello") }'. Wrapped in the struct... | |
| displayName | No | Widget only. Human-readable name shown in the widget gallery. E.g., 'Daily Steps'. Defaults to a spaced... | |
| families | No | Widget only. Supported widget sizes: systemSmall, systemMedium, systemLarge, systemExtraLarge,... | |
| entry | No | Widget only. Timeline entry fields as { fieldName: typeString }. E.g., { steps: 'int' }. Do not include... | |
| refreshInterval | No | Widget only. Timeline refresh interval in minutes. E.g., 30 for half-hourly updates. Defaults to 60. | |
| platform | No | Optional target Apple platform hint for view/widget generation. Use macOS when the host project is a Mac... | |
| scenes | No | App only. Scene definitions for the @main App struct. At least one scene with kind 'windowGroup' is... | |
| format | No | When true (default), pipes generated Swift through swift-format with Axint's house style. Falls back to raw... |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Primary Axint tool response text, matching the first text content block. | |
| isError | No | Whether Axint marked the tool response as an error. |