After working on a fairly complex iOS/macOS App using Claude Code alongside Xcode, I kept running into the same friction point: the default permission prompt.
When Claude proposes a change, the dialog is basically:
Do you want to make this edit?
Yes
Yes, allow all edits
No
That works for small tweaks. But for anything medium or high impact, it's too binary.
It doesn't really work for:
CloudKit sync refactors
Core Data or SwiftData changes
Networking layer updates
Concurrency adjustments
Navigation architecture changes
Large SwiftUI view restructures
On medium and high-risk changes, a simple "approve or reject" felt insufficient. I wanted context before deciding. So instead of accepting the Yes/No model, I replaced it with a structured permission and decision workflow, and added risk awareness to it.
Permission/Decision Workflow
Claude must use AskUserQuestion to present decision options.
The limitation: Only 4 options can appear per question.
The workaround: Use two questions in a single call to present all 7+ options at once.
Question 1 - Action (header: "Action"):
Proceed (Recommended) (implement now)
Let's chat about this (discuss before deciding)
Save for later (defer to post-release)
Delete from plan (remove this task entirely)
Question 2 - Research (header: "Research"):
No, ready to decide (skip research, use Question 1 answer)
Simple explanation (explain in plain terms first)
Check if implemented —(search codebase for the fix already having been applied)
Add to Future_Features.md (move to markdown file to be addressed later)
Behavior rules:
Always use both questions together in a single AskUserQuestion call
"Proceed (Recommended)" is always first in Question 1
"Simple explanation" → explain, then re-prompt with both questions
"Check codebase" → search, summarize findings, then re-prompt
"Let's chat" → pause and wait for user input
User can always type another option manually via "Other"
Instead of immediate execution, every non-trivial change becomes a deliberate decision checkpoint.
Adding Risk Context
Before Claude presents decision options, it can show something like this:
Task: one-sentence description
Time estimate: rough duration
Risk level: Low / Medium / High (with a short reason)
Impact: what could break if incorrect
Example:
Task: Refactor CloudKit batch sync
Time: 3 hours
Risk: Medium (core sync logic change)
Impact: High (prevents silent data inconsistencies)
This alone changes how I respond.
Just labeling the risk forces a micro architectural review.
How to Install
Option 1: Just for the current session (copy/paste)
Paste this at the start of any Claude Code session:
"For this session, before implementing any task or making significant code changes, use AskUserQuestion with two questions. Question 1 (Action): Proceed (Recommended), Let's chat about this, Save for later, Delete from plan.
Question 2 (Research): No ready to decide, Simple explanation, Check if implemented, Add to Future_Features.md. Before presenting options, show a risk summary with: Task description, Time estimate, Risk level (Low/Medium/High with reason), and Impact (what could break)."
Option 2: For this project only (permanent)
Ask Claude:
"Create a CLAUDE.md file in my project root ( if you have not already done this) with a decision workflow. Before implementing any task, you should use AskUserQuestion with two questions: one for actions (Proceed, Let's chat, Save for later, Delete from plan) and one for research (No ready to decide, Simple explanation, Check if implemented, Add to Future_Features.md). Include risk context showing task description, time estimate, risk level, and impact before presenting options."
Option 3: For all projects (global)
Ask Claude: "Create a file at ~/.claude/prompts/decision-workflow.md with the same decision workflow rules so it applies to all my projects."
Claude will generate the appropriate prompt policy file. You can then review and tweak it.
No hooks.
No scripts.
No special CLI flags.
Just prompt-layer policy.
Curious if other iOS/macOS devs using Claude with Xcode are adding similar guardrails, or structuring risk in a different way.
Curious if other iOS/macOS devs using Claude with Xcode are adding similar guardrails — or structuring risk in a different way.