Axint emits structured diagnostics with:
- a stable
AX###code - a severity (
error,warning, orinfo) - a file / line when available
- a concrete suggestion when Axint can infer one
This page focuses on the errors people are most likely to hit in real projects and shows:
- what triggers the diagnostic
- what the message looks like
- the smallest fix that gets you moving again
These happen before Axint can build IR from your source.
Trigger
const x = 42;Typical diagnostic
error[AX001]: No defineIntent() call found in src/intents/my-intent.ts
Fix
import { defineIntent, param } from "@axint/compiler";
export default defineIntent({
name: "CreateEvent",
title: "Create Event",
description: "Creates a calendar event",
params: {
title: param.string("Event title"),
},
perform: async ({ title }) => ({ title }),
});Trigger
export default defineIntent({
name: "CreateEvent",
params: {},
perform: async () => "ok",
});Typical diagnostics
error[AX003]: Missing required field: title
error[AX004]: Missing required field: description
Fix
export default defineIntent({
name: "CreateEvent",
title: "Create Event",
description: "Creates a calendar event",
params: {},
perform: async () => "ok",
});Trigger
params: {
count: param.int64("Count"),
}Typical diagnostic
error[AX005]: Unknown param type: param.int64
Fix
params: {
count: param.int("Count"),
}Supported helpers today:
param.stringparam.intparam.doubleparam.floatparam.booleanparam.dateparam.durationparam.urlparam.entityparam.dynamicOptions
These errors happen when the parameterSummary block is shaped incorrectly.
Trigger
parameterSummary: {
when: "region",
}Typical diagnostic
error[AX025]: parameterSummary.when requires a then branch
Fix
parameterSummary: {
when: "region",
then: "Plan ${trail} in ${region}",
otherwise: "Plan ${trail}",
}You can also use the simple string form:
parameterSummary: "Open ${trail} in ${region}"These validate intent and entity IR against Apple-facing constraints.
Trigger
name: "sendMessage"Typical diagnostic
error[AX100]: Intent name "sendMessage" must be PascalCase
Fix
name: "SendMessage"Trigger
title: "",
description: "",Fix
title: "Send Message",
description: "Sends a message to a contact",Trigger
params: {
"trail-name": param.string("Trail"),
}Fix
params: {
trailName: param.string("Trail"),
}These are warnings, not blockers:
AX104: parameter description is emptyAX105: too many parameters for a single intentAX106: title is likely too long for Siri / Shortcuts UI
The usual fix is to shorten labels or split one overloaded intent into smaller, clearer intents.
These warnings catch intent metadata that does not look like real Apple configuration:
AX108: entitlement strings do not look like reverse-DNS identifiersAX109: Info.plist keys do not look like normal Apple keys
Example
entitlements: ["healthkit"],
infoPlistKeys: {
HealthPermission: "Allow access",
},Fix
entitlements: ["com.apple.developer.healthkit"],
infoPlistKeys: {
NSHealthShareUsageDescription: "Read workout history to personalize coaching.",
},These warnings catch one of the easiest ways to end up with a broken Apple integration:
AX114: HealthKit entitlement is present but no HealthKit usage descriptions were declaredAX115:NSHealth*UsageDescriptionkeys were declared without the HealthKit entitlementAX116: a privacy usage description is empty or still placeholder copy
Bad
export default defineIntent({
name: "LogWorkout",
title: "Log Workout",
description: "Logs a workout.",
entitlements: ["com.apple.developer.healthkit"],
infoPlistKeys: {
NSHealthShareUsageDescription: "TODO: explain why we read data",
},
params: {},
perform: async () => ({ ok: true }),
});Typical diagnostics
warning[AX116]: Privacy usage description "NSHealthShareUsageDescription" is empty or still reads like placeholder copy
If the usage strings were missing entirely, Axint would emit AX114. If the entitlement were missing but the HealthKit keys stayed behind, it would emit AX115.
These warnings catch a real class of copy/paste mistakes we saw in Cloud reports:
AX117: shorthand entitlement strings likehealthkit.writeinstead of the real Apple entitlement keyAX118: shorthand plist keys likeHealthUsageDescriptioninstead ofNSHealthShareUsageDescription/NSHealthUpdateUsageDescription
Bad
export default defineIntent({
name: "LogWater",
title: "Log Water Intake",
description: "Records a serving of water to the health journal",
entitlements: ["healthkit.write"],
infoPlistKeys: {
HealthUsageDescription: "Logs water intake",
},
params: {},
perform: async () => ({ ok: true }),
});Typical diagnostics
warning[AX117]: Entitlement "healthkit.write" looks like shorthand for HealthKit, not the real Apple entitlement key
warning[AX118]: Info.plist key "HealthUsageDescription" looks like shorthand, not Apple's real HealthKit usage-description key
warning[AX114]: HealthKit entitlements were declared, but no HealthKit privacy usage descriptions were provided
Fix
entitlements: ["com.apple.developer.healthkit"],
infoPlistKeys: {
NSHealthShareUsageDescription: "Read hydration history to personalize reminders.",
NSHealthUpdateUsageDescription: "Save newly logged water intake to Health.",
},Fix
export default defineIntent({
name: "LogWorkout",
title: "Log Workout",
description: "Logs a workout.",
entitlements: ["com.apple.developer.healthkit"],
infoPlistKeys: {
NSHealthShareUsageDescription: "Read workout history to personalize coaching.",
NSHealthUpdateUsageDescription: "Save newly completed workouts to Health.",
},
params: {},
perform: async () => ({ ok: true }),
});Trigger
defineEntity({
name: "trail",
display: { title: "name" },
properties: {
id: param.string("ID"),
name: param.string("Name"),
},
});Fix
defineEntity({
name: "Trail",
display: { title: "name" },
properties: {
id: param.string("ID"),
name: param.string("Name"),
},
});Common causes:
AX111: the entity has no propertiesAX112:display.titlepoints at a property that does not existAX113:queryis not one of"id","all","string", or"property"
Bad
defineEntity({
name: "Trail",
display: { title: "label" },
properties: {},
query: "search",
});Good
defineEntity({
name: "Trail",
display: { title: "name", subtitle: "region" },
properties: {
id: param.string("Trail ID"),
name: param.string("Trail name"),
region: param.string("Region"),
},
query: "property",
});Trigger
export default defineView({
body: [],
});Fix
export default defineView({
name: "ProfileCard",
body: [
view.text("Hello"),
],
});If a view parses but renders no useful body, simplify first:
body: [
view.vstack([
view.text("Profile"),
], { spacing: 12 }),
]Then reintroduce conditionals, loops, or raw Swift one piece at a time.
Trigger
export default defineWidget({
name: "StepCounter",
families: ["systemSmall"],
entry: {},
body: [],
});Fix
export default defineWidget({
name: "StepCounter",
displayName: "Step Counter",
description: "Shows daily step progress",
families: ["systemSmall"],
entry: {
steps: entry.int("Current step count", { default: 0 }),
},
body: [
view.text("\\(steps)"),
],
});Make sure you:
- choose valid families like
systemSmall,systemMedium,accessoryInline - emit at least one body node
Bad
name: "weatherApp"Good
name: "WeatherApp"Bad
export default defineApp({
name: "WeatherApp",
scenes: [
scene.settings("SettingsView"),
],
});Better
export default defineApp({
name: "WeatherApp",
scenes: [
scene.windowGroup("ContentView"),
scene.settings("SettingsView", { platform: "macOS" }),
],
});Axint computes the bundle hash locally and compares it with the registry response before writing files.
Typical diagnostic
[AX600] Bundle hash mismatch for @namespace/slug@1.0.0
What it means
- the published bytes changed
- the registry response is inconsistent
- or your local fetch response is tampered with
Fix
Do not force past it. Re-publish the package or inspect the registry response first.
These apply when you validate generated or hand-written Swift with axint swift validate.
Trigger
struct SendMessageIntent: AppIntent {
static var title: LocalizedStringResource = "Send Message"
}Fix
struct SendMessageIntent: AppIntent {
static var title: LocalizedStringResource = "Send Message"
func perform() async throws -> some IntentResult {
.result()
}
}Trigger
@State let count: Int = 0Fix
@State var count: Int = 0Trigger
struct SendMessageIntent: AppIntent {
static var title: LocalizedStringResource = "Send Message"
func perform() async throws -> some IntentResult { .result() }
}Fix
import AppIntents
struct SendMessageIntent: AppIntent {
static var title: LocalizedStringResource = "Send Message"
func perform() async throws -> some IntentResult { .result() }
}Trigger
import SwiftUI
struct WeatherWidget: Widget {
var body: some WidgetConfiguration { ... }
}Fix
import SwiftUI
import WidgetKit
struct WeatherWidget: Widget {
var body: some WidgetConfiguration { ... }
}Trigger
struct CounterView: View {
@State var count: Int = 0
var body: some View { Text("\\(count)") }
}Fix
import SwiftUI
struct CounterView: View {
@State var count: Int = 0
var body: some View { Text("\\(count)") }
}Trigger
import AppIntents
struct TrailCheck: AppIntent {
static var title: LocalizedStringResource = "Trail Check"
var trailName: String
func perform() async throws -> some IntentResult { .result() }
}Fix
import AppIntents
struct TrailCheck: AppIntent {
static var title: LocalizedStringResource = "Trail Check"
@Parameter(title: "Trail")
var trailName: String
func perform() async throws -> some IntentResult { .result() }
}Trigger
DispatchQueue.main.async {
self.status = "done"
}Fix
Task { @MainActor in
self.status = "done"
}Trigger
TextEditor(text: $draft)
.overlay {
Text("Write a comment")
}Fix
TextEditor(text: $draft)
.overlay {
Text("Write a comment")
.allowsHitTesting(false)
}Trigger
Text("Card")
.frame(maxWidth: .infinity, height: 320, alignment: .topLeading)Fix
Text("Card")
.frame(maxWidth: .infinity, alignment: .topLeading)
.frame(height: 320, alignment: .topLeading)Trigger
Label("New Chat", systemImage: "plus")
.labelStyle(.iconOnly)
.swarmIcon(size: 18)Fix
Label("New Chat", systemImage: "plus")
.swarmIcon(size: 18)
.labelStyle(.iconOnly)If the custom modifier should work after .labelStyle, .buttonStyle,
.background, or .overlay, rewrite it as a generic View modifier.
Trigger
private func projectLoadMoreFooter() -> some View {
let label = "Load more"
Button(label) { }
}Fix
private func projectLoadMoreFooter() -> some View {
let label = "Load more"
return Button(label) { }
}Alternatively, add @ViewBuilder when the helper intentionally uses
result-builder statements.
Trigger
Asking axint.feature to rewrite or replace a mature SwiftUI screen, store, or
app surface when the prompt describes a bug, an existing screen, or a repair.
Fix
Use axint repair, axint suggest, axint project index, and axint run so
the agent patches the smallest existing surface and proves it with Xcode.
Trigger
Generate a SwiftUI surface using the real Swarm design system.
The request supplies a token namespace such as Swarm, but the project context
does not contain the matching enum, struct, class, or actor.
Fix
Pass the real token/component source as context, use the correct token
namespace, or switch to axint repair / axint project index for a patch-first
plan.
Please open an issue if:
- the diagnostic points at valid code
- the suggested fix is wrong
AX200–AX202show up from generated Swift- TypeScript and Python generate materially different Swift for the same feature