apple-notes-reference-architecture
Installation
SKILL.md
Apple Notes Reference Architecture
Overview
Apple Notes automation systems are fundamentally different from cloud SaaS integrations. There is no REST API, no server-side SDK, and no webhook infrastructure. Everything runs locally on macOS through the Apple Events IPC bridge. This reference architecture defines the standard layered approach: a Node.js application layer that calls JXA scripts via osascript, a local SQLite cache for fast queries, a change detection poller for event-driven workflows, and optional Shortcuts integration for cross-app automation.
Prerequisites
- An owned interactive macOS host, exact client TCC consent, and a declared account/folder scope.
- A reviewed local-only service boundary, encrypted data stores, and an incident/rollback owner.
- Mocked tests for all application logic; device integration tests run only on a protected self-hosted Mac.
Instructions
- Place authorization, input validation, idempotency, and audit logging above the JXA adapter; the adapter should receive only validated scoped commands.
- Bind any local service to loopback by default and require an authenticated, approved transport for remote administration.
- Treat cache and event data as sensitive replicas: minimize fields, encrypt at rest, restrict access, rotate/delete under policy, and never read NoteStore directly.
- Separate liveness from readiness; pause mutations when authorization, reconciliation, or sync health is uncertain.