Show HN: I built a local coding agent using Apple Intelligence
barrasso.meHi 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.
No comments yet.