Back to browse
I built a local coding agent using Apple Intelligence

I built a local coding agent using Apple Intelligence

by podlp·Apr 9, 2026·3 points·0 comments

AI Analysis

●●SolidBig BrainBold Bet

Compile-Verify-Fix loop is clever scaffolding for guiding small on-device models.

Strengths
  • CVF loop pattern addresses small model weakness with deterministic self-healing
  • Fully on-device execution eliminates API costs and preserves code privacy completely
  • Single ~9MB Mach-O binary is impressively compact for an AI agent
Weaknesses
  • Author admits it doesn't work well yet with rough edges throughout
  • Limited to Swift and macOS ecosystem won't generalize to other platforms
Category
Target Audience

Swift developers, privacy-conscious engineers, Apple ecosystem users

Similar To

Claude Code · Cursor · Aider

Post Description

Hi HN! I built an on-device coding agent called Junco, designed to explore what's possible using the AI (Apple Intelligence) you already have on your Mac.

Junco is a ~9MB Mach-O binary written entirely in Swift using the LanguageModelSession API. It's primarily an exploration and learning exercise for me, but it's also exciting to see what's possible. A clear pattern emerged: deterministic scaffolding is critical to guiding a small model along. Whereas Claude Code can defer task decomposition to Opus 4.6, small models need a lot more hand-holding.

Of all the techniques I explored, the Compile-Verify-Fix (CVF) loop was clearly a winner. Even when I was just prompting the AFM directly, I always knew I would need some self-healing mechanism because the Apple Foundation Model (AFM) was not designed to code. When it wrote code, it was often indented strangely and riddled with minor syntax issues.

I initially set out to build a general-purpose coding agent, but given the AFM was not tuned for coding, I quickly realized that scope would never work so I focused specifically on Swift. It also helps that XCode ships with API headers that allow for on-device API signature discovery, since the model lacks recent world knowledge (the knowledge cutoff is probably around mid-2024).

So I wouldn't recommend Junco anytime soon for production work. Make sure you've committed any changes before playing around with it. But conceptually the idea of a batteries-included, on-device coding agent shows real promise.

Similar Projects

Developer Tools●●●Banger

Apfel - Apple Intelligence from the Command Line

Apple's on-device LLM from your terminal — no API keys, no cloud, finally accessible.

Zero to OneSolve My ProblemCozy
franze
302mo ago
Developer Tools●●Solid

Xcode Copilot Code Assistant

Xcode + Copilot native bridge—solves real friction, but limited to one IDE and existing subscription.

Ship ItNiche Gem
mobile-ar
203mo ago
AI/ML●●●Banger

On-device meeting transcription for your Mac

CoreML models on Apple Neural Engine beat Whisper.cpp for on-device transcription.

WizardryDark Horse
paynedigital
602mo ago