MacCortex
A next-gen macOS AI infrastructure
After 10 days of deep technical work, we've shipped the foundation for MacCortex – a next-generation personal AI infrastructure that bridges the gap between simple chat interfaces and complex multi-agent systems.
**The Challenge We're Solving**
Today's AI tools face three fundamental gaps:
1️⃣ Cognitive Gap: Either too simple (single-shot prompts) or too complex (heavy multi-agent frameworks)
2️⃣ Sensory Gap: Disconnected from your screen, selected text, and local context
3️⃣ Action Gap: Suggest but can't execute safely
MacCortex addresses all three through a five-layer architecture: Perception → Router → Dual-Channel Decision (Fast/Slow) → Memory → Governance.
Phase 0.5: The Foundation
Building trust infrastructure for an app requiring Full Disk Access:
✅ Developer ID Signing + Hardened Runtime (10/10 maturity)
✅ Apple Notarization Automation (~2-minute turnaround, 100% success rate)
✅ Non-Sandbox Architecture (ADR-001: backed by 15+ authoritative sources)
✅ Sparkle 2 Auto-Update with EdDSA signing (9/10 maturity)
✅ Permission Management Infrastructure (7/10 maturity)
**Key Technical Achievements**
🔐 Code Signing Chain: Built automated signing script (128 lines) that handles XPC → Frameworks → App in correct order. Zero verification failures.
⚡ Notarization Speed: Both submissions processed in ~2 minutes (far below Apple's 2-10 min estimate). Automation enables rapid iteration.
🛡️ Security Model: Three-layer defense (Hardened Runtime + Policy Engine + Controlled Directory Access) instead of App Sandbox that would cripple 60% of features.
📊 Overall Technical Maturity: 9.0/10 (Excellent)
**Lessons for macOS Developers**
1. Start with trust: Get signing and notarization right before building features
2. Document decisions: Architecture Decision Records prevent drift
3. Automate early: Scripts save hours during iteration
4. Measure maturity: Structured acceptance criteria ensure quality
5. Plan for migration: Replaceable components future-proof architecture
**What's Next: Phase 1 (2 Weeks)**
Week 1: Permission Management UI (SwiftUI wizard + Full Disk Access flow)
Week 2: Pattern CLI + Python Backend + MLX Integration + LangGraph orchestration
Open-sourcing in Q1 2026.
**The Vision**
MacCortex isn't "just another AI chat window" – it's pluggable macOS native intelligence infrastructure that can see your screen, call tools, self-correct, and remember long-term, with dangerous actions locked in a governance cage.
Local-first. Human-in-the-loop. Auditable. Zero vendor lock-in.
**Project Update**
Phase 1: Python Backend — Completed (2026-01-20)
- ✅ 5 core patterns: Summarize, Extract, Translate, Format, Search
- ✅ FastAPI service: high-performance REST API
- ✅ MLX/Ollama integration: optimized for Apple Silicon
- ✅ Copyright protection system: watermarking + auditing
- ✅ Test coverage: functional validation for all patterns
hase 1.5: Backend Security Hardening — Completed (2026-01-21)
Day 1–10 completed (2026-01-21):
- ✅ PromptGuard core protection: 5-layer prompt-injection defense framework
- ✅ 26+ malicious pattern detections: OWASP LLM01 protection (87% defense rate)
- ✅ All 5 patterns integrated: security hook automation
- ✅ Audit logging system: PII masking + GDPR compliance (15+ PII types)
- ✅ Input validation system: parameter allowlist + dangerous pattern detection
- ✅ Rate limiting system: token bucket algorithm (60/min, 1000/hour)
- ✅ Output validation system: system-prompt leakage detection + credential scrubbing (12+ patterns)
- ✅ Test coverage: 97% (244/249 tests)
- ✅ Performance overhead: 0.0565ms p95 (well below the 10ms target)
- ✅ Backward compatibility: 100%
Acceptance result: ✅ All 8 P0 criteria passed
Security score: 8/10 → 9/10 (+12.5%) 🎯