A solo developer shipped a native macOS menu bar monitor in three days on top of Claude Code, and puts the result down not to a clever prompt but to a spec, a CLAUDE.md handover and spikes that print pass or fail.
Key points
- Three documents precede any Swift file: SPEC.md with scope and risks, DESIGN.md and an interactive HTML popover mock marked reference only.
- AGENTS.md reads like a contract: 0.3% CPU and 25 MB idle budget at 1 s sampling, no hot-path allocations, only Sparkle and system SQLite as dependencies.
- Four week-1 spikes (spike-nstat, spike-grouping, spike-ports, spike-selfcost) test risky assumptions as standalone targets and print GATE: PASS or GATE: FAIL.
- pulse-bench samples proc_pid_rusage and exits 1 when mean CPU or peak memory exceeds the budget, so a regression fails the build.
- The memory gate moved from raw RSS to phys_footprint because shared AppKit and SwiftUI pages alone accounted for roughly 70 MB.
- One commit measured 0.26% and 0.81% idle CPU on shared macOS runners, so CI allows 0.6% and the real 0.3% gate runs on M1 hardware.
Why it matters
Any team running Claude Code or a rival agent over weeks hits the same wall: decisions made on Tuesday are gone by Friday, and the agent's own confidence is a poor quality signal. What this account adds is a place to put both — a dated log of settled calls, and checks whose verdict does not depend on the model's opinion. That part is cheap to copy. The harder part is the author's insistence on owning scope calls and reading every dangerous diff, plus the honest admission that a benchmark on shared runners is too noisy to gate releases. Stat Space is a macOS product, but the constraints and the review discipline carry over to server-side work in any language.
Real-world use
- A native menu bar utility that must stay under a fixed idle CPU and memory ceiling while the popover is closed
- A headline feature that depends on an undocumented private framework, proven feasible by a spike before the app shell is written
- A popover UI built from an interactive HTML reference so "make it look like this" is unambiguous for the agent
- A CLI and MCP server that the agent itself can query for live process state
This summary was generated by the agent from the original post on DEV: claudecode. The full text and all rights belong to its author and publisher. Go to original