How We Work
The user is the product owner. Claude is the developer.
The user does not write code. The user does not read code. The user describes what they want and judges whether the result is acceptable. Claude implements, verifies, and reports outcomes.
1. Prove, Don't Promise
Never say "this should work." Prove it:
xcodebuild build 2>&1 | xcsift # Build passes
xcodebuild test # Tests pass
open .../App.app # App launches
If you didn't run it, you don't know it works.
2. Tests for Correctness, Eyes for Quality
| Question |
How to Answer |
| Does the logic work? |
Write test, see it pass |
| Does it look right? |
Launch app, user looks at it |
| Does it feel right? |
User uses it |
| Does it crash? |
Test + launch |
| Is it fast enough? |
Profiler |
Tests verify correctness. The user verifies desirability.
3. Report Outcomes, Not Code
Bad: "I refactored DataService to use async/await with weak self capture"
Good: "Fixed the memory leak. leaks now shows 0 leaks. App tested stable for 5 minutes."
The user doesn't care what you changed. The user cares what's different.
4. Small Steps, Always Verified
Change → Verify → Report → Next change
Never batch up work. Never say "I made several changes." Each change is verified before the next. If something breaks, you know exactly what caused it.
5. Ask Before, Not After
Unclear requirement? Ask now.
Multiple valid approaches? Ask which.
Scope creep? Ask if wanted.
Big refactor needed? Ask permission.
Wrong: Build for 30 minutes, then "is this what you wanted?"
Right: "Before I start, does X mean Y or Z?"
6. Always Leave It Working
Every stopping point = working state. Tests pass, app launches, changes committed. The user can walk away anytime and come back to something that works.
Intake
Ask the user:
What would you like to do?
- Build a new app
- Debug an existing app
- Add a feature
- Write/run tests
- Optimize performance
- Ship/release
- Something else
Then read the matching workflow from workflows/ and follow it.
Routing
| Response |
Workflow |
| 1, "new", "create", "build", "start" |
workflows/build-new-app.md |
| 2, "broken", "fix", "debug", "crash", "bug" |
workflows/debug-app.md |
| 3, "add", "feature", "implement", "change" |
workflows/add-feature.md |
| 4, "test", "tests", "TDD", "coverage" |
workflows/write-tests.md |
| 5, "slow", "optimize", "performance", "fast" |
workflows/optimize-performance.md |
| 6, "ship", "release", "notarize", "App Store" |
workflows/ship-app.md |
| 7, other |
Clarify, then select workflow or references |
After Every Change
# 1. Does it build?
xcodebuild -scheme AppName build 2>&1 | xcsift
# 2. Do tests pass?
xcodebuild -scheme AppName test
# 3. Does it launch? (if UI changed)
open ./build/Build/Products/Debug/AppName.app
Report to the user:
- "Build: ✓"
- "Tests: 12 pass, 0 fail"
- "App launches, ready for you to check [specific thing]"
Testing Decision
Write a test when:
- Logic that must be correct (calculations, transformations, rules)
- State changes (add, delete, update operations)
- Edge cases that could break (nil, empty, boundaries)
- Bug fix (test reproduces bug, then proves it's fixed)
- Refactoring (tests prove behavior unchanged)
Skip tests when:
- Pure UI exploration ("make it blue and see if I like it")
- Rapid prototyping ("just get something on screen")
- Subjective quality ("does this feel right?")
- One-off verification (launch and check manually)
The principle: Tests let the user verify correctness without reading code. If the user needs to verify it works, and it's not purely visual, write a test.
Domain Knowledge
All in references/:
Architecture: app-architecture, swiftui-patterns, appkit-integration, concurrency-patterns
Data: data-persistence, networking
App Types: document-apps, shoebox-apps, menu-bar-apps
System: system-apis, app-extensions
Development: project-scaffolding, cli-workflow, cli-observability, testing-tdd, testing-debugging
Polish: design-system, macos-polish, security-code-signing
Pitfalls & Debugging: common-pitfalls
Common Pitfalls
macOS app development has real gotchas that block shipping. These are the failure modes you'll encounter:
High-Severity Issues
- Sandboxing violations — Missing entitlements (keychain, file access, network) cause silent failures or App Store rejection
- Code signing failures — Expired provisioning profiles, mismatched bundle identifiers, missing certificates in keychain
- App Store rejections — Private API usage, incomplete metadata, missing privacy policies
- SwiftUI state bugs — @Bindable not used with @Model objects, mutable class views don't update, NavigationStack doesn't navigate
- macOS version incompatibility — Using APIs that don't exist on your target macOS, deprecated APIs, availability guard misses
What to Do
Before shipping: Read common-pitfalls.md. It documents each failure mode with:
- The exact error message or symptom you'll see
- Why it happens
- The code fix or configuration change
- How to verify it's fixed
When something breaks: Search common-pitfalls.md for your error message. Most are there.
This reference file exists because these issues are predictable and preventable. Use it.
Workflows
All in workflows/:
| File |
Purpose |
| build-new-app.md |
Create new app from scratch |
| debug-app.md |
Find and fix bugs |
| add-feature.md |
Add to existing app |
| write-tests.md |
Write and run tests |
| optimize-performance.md |
Profile and speed up |
| ship-app.md |
Sign, notarize, distribute |
1---2name: macos-apps3description: Build professional native macOS apps in Swift with SwiftUI and AppKit. Full lifecycle - build, debug, test, optimize, ship. CLI-only, no Xcode. Use when asked to: create macOS apps, build Swift apps, develop SwiftUI interfaces, fix macOS app issues, add macOS app features, or when user says 'build a Mac app', 'create a Swift project', 'develop for macOS'.4---56## How We Work78**The user is the product owner. Claude is the developer.**910The user does not write code. The user does not read code. The user describes what they want and judges whether the result is acceptable. Claude implements, verifies, and reports outcomes.1112### 1. Prove, Don't Promise1314Never say "this should work." Prove it:15```bash16xcodebuild build 2>&1 | xcsift # Build passes17xcodebuild test # Tests pass18open .../App.app # App launches19```20If you didn't run it, you don't know it works.2122### 2. Tests for Correctness, Eyes for Quality2324| Question | How to Answer |25|----------|---------------|26| Does the logic work? | Write test, see it pass |27| Does it look right? | Launch app, user looks at it |28| Does it feel right? | User uses it |29| Does it crash? | Test + launch |30| Is it fast enough? | Profiler |3132Tests verify *correctness*. The user verifies *desirability*.3334### 3. Report Outcomes, Not Code3536**Bad:** "I refactored DataService to use async/await with weak self capture"37**Good:** "Fixed the memory leak. `leaks` now shows 0 leaks. App tested stable for 5 minutes."3839The user doesn't care what you changed. The user cares what's different.4041### 4. Small Steps, Always Verified4243```44Change → Verify → Report → Next change45```4647Never batch up work. Never say "I made several changes." Each change is verified before the next. If something breaks, you know exactly what caused it.4849### 5. Ask Before, Not After5051Unclear requirement? Ask now.52Multiple valid approaches? Ask which.53Scope creep? Ask if wanted.54Big refactor needed? Ask permission.5556Wrong: Build for 30 minutes, then "is this what you wanted?"57Right: "Before I start, does X mean Y or Z?"5859### 6. Always Leave It Working6061Every stopping point = working state. Tests pass, app launches, changes committed. The user can walk away anytime and come back to something that works.6263## Intake6465**Ask the user:**6667What would you like to do?681. Build a new app692. Debug an existing app703. Add a feature714. Write/run tests725. Optimize performance736. Ship/release747. Something else7576**Then read the matching workflow from `workflows/` and follow it.**7778## Routing7980| Response | Workflow |81|----------|----------|82| 1, "new", "create", "build", "start" | `workflows/build-new-app.md` |83| 2, "broken", "fix", "debug", "crash", "bug" | `workflows/debug-app.md` |84| 3, "add", "feature", "implement", "change" | `workflows/add-feature.md` |85| 4, "test", "tests", "TDD", "coverage" | `workflows/write-tests.md` |86| 5, "slow", "optimize", "performance", "fast" | `workflows/optimize-performance.md` |87| 6, "ship", "release", "notarize", "App Store" | `workflows/ship-app.md` |88| 7, other | Clarify, then select workflow or references |8990## After Every Change9192```bash93# 1. Does it build?94xcodebuild -scheme AppName build 2>&1 | xcsift9596# 2. Do tests pass?97xcodebuild -scheme AppName test9899# 3. Does it launch? (if UI changed)100open ./build/Build/Products/Debug/AppName.app101```102103Report to the user:104- "Build: ✓"105- "Tests: 12 pass, 0 fail"106- "App launches, ready for you to check [specific thing]"107108## Testing Decision109110**Write a test when:**111- Logic that must be correct (calculations, transformations, rules)112- State changes (add, delete, update operations)113- Edge cases that could break (nil, empty, boundaries)114- Bug fix (test reproduces bug, then proves it's fixed)115- Refactoring (tests prove behavior unchanged)116117**Skip tests when:**118- Pure UI exploration ("make it blue and see if I like it")119- Rapid prototyping ("just get something on screen")120- Subjective quality ("does this feel right?")121- One-off verification (launch and check manually)122123**The principle:** Tests let the user verify correctness without reading code. If the user needs to verify it works, and it's not purely visual, write a test.124125## Domain Knowledge126127All in `references/`:128129**Architecture:** app-architecture, swiftui-patterns, appkit-integration, concurrency-patterns130**Data:** data-persistence, networking131**App Types:** document-apps, shoebox-apps, menu-bar-apps132**System:** system-apis, app-extensions133**Development:** project-scaffolding, cli-workflow, cli-observability, testing-tdd, testing-debugging134**Polish:** design-system, macos-polish, security-code-signing135136**Pitfalls & Debugging:** common-pitfalls137138## Common Pitfalls139140macOS app development has real gotchas that block shipping. These are the failure modes you'll encounter:141142### High-Severity Issues143- **Sandboxing violations** — Missing entitlements (keychain, file access, network) cause silent failures or App Store rejection144- **Code signing failures** — Expired provisioning profiles, mismatched bundle identifiers, missing certificates in keychain145- **App Store rejections** — Private API usage, incomplete metadata, missing privacy policies146- **SwiftUI state bugs** — @Bindable not used with @Model objects, mutable class views don't update, NavigationStack doesn't navigate147- **macOS version incompatibility** — Using APIs that don't exist on your target macOS, deprecated APIs, availability guard misses148149### What to Do150151**Before shipping:** Read `common-pitfalls.md`. It documents each failure mode with:152- The exact error message or symptom you'll see153- Why it happens154- The code fix or configuration change155- How to verify it's fixed156157**When something breaks:** Search `common-pitfalls.md` for your error message. Most are there.158159This reference file exists because these issues are predictable and preventable. Use it.160161## Workflows162163All in `workflows/`:164165| File | Purpose |166|------|---------|167| build-new-app.md | Create new app from scratch |168| debug-app.md | Find and fix bugs |169| add-feature.md | Add to existing app |170| write-tests.md | Write and run tests |171| optimize-performance.md | Profile and speed up |172| ship-app.md | Sign, notarize, distribute |