$npx -y skills add BoltzmannEntropy/OSXSkills --skill osx-complianceUse when auditing Apple-platform app projects for release infrastructure and distribution compliance. Covers macOS DMG readiness and iOS/iPad App Store Connect release gates via companion checks.
| 1 | # Apple Platform Compliance Check |
| 2 | |
| 3 | ## Overview |
| 4 | |
| 5 | This skill audits Apple-platform app projects in the workspace for release infrastructure, versioning, publication hygiene, website/download integrity, model/documentation parity, and distribution blockers. |
| 6 | |
| 7 | Primary focus: |
| 8 | - macOS desktop distribution (`.dmg`) infrastructure |
| 9 | - iOS/iPad distribution (`.ipa` + App Store Connect/TestFlight) preflight delegation |
| 10 | |
| 11 | When this skill is applied, enforce the same baseline on both existing projects and new projects. The baseline includes system-log UX plus the MimikaCODE production surfaces defined in this file. |
| 12 | |
| 13 | **Related Skills:** |
| 14 | - For in-depth code review before App Store submission, see `osx-review/SKILL.md`. |
| 15 | - For iOS/iPad upload/submission checks, see `osx-ios/SKILL.md`. |
| 16 | |
| 17 | ## When to Use |
| 18 | |
| 19 | - Before releasing a new version of any macOS, iOS, or iPad app |
| 20 | - When setting up a new macOS app project |
| 21 | - Periodic compliance audits across all projects |
| 22 | - After major infrastructure changes to verify consistency |
| 23 | |
| 24 | ## iOS/iPad Companion Gate |
| 25 | |
| 26 | If a project contains an iOS target, this skill MUST require a passed `osx-ios` preflight: |
| 27 | |
| 28 | ```bash |
| 29 | bash ./skills/osx-ios/scripts/check_ios_dist.sh --app-root <APP_ROOT> |
| 30 | ``` |
| 31 | |
| 32 | Treat any `FAIL` result as release-blocking before TestFlight/App Store actions. |
| 33 | |
| 34 | ## Project Discovery |
| 35 | |
| 36 | All macOS app projects follow this structure: |
| 37 | |
| 38 | ``` |
| 39 | <workspace>/ |
| 40 | ├── <AppName>PRJ/ |
| 41 | │ ├── <AppName>CODE/ # Primary source location |
| 42 | │ │ ├── flutter_app/ # Flutter app (if nested) |
| 43 | │ │ ├── backend/ # Backend code |
| 44 | │ │ ├── scripts/ # Build scripts |
| 45 | │ │ └── ... |
| 46 | │ └── <AppName>WEB/ # Website repository |
| 47 | ``` |
| 48 | |
| 49 | The skill automatically discovers all `*PRJ` directories in the workspace. |
| 50 | |
| 51 | ## Compliance Checklist |
| 52 | |
| 53 | ### 1. Required Files |
| 54 | |
| 55 | | File | Purpose | Required | |
| 56 | |------|---------|----------| |
| 57 | | `scripts/build_dmg.sh` or `scripts/build-dmg.sh` | DMG creation script | YES | |
| 58 | | `RELEASE_NOTES.md` | Release documentation | YES | |
| 59 | | `LICENSE` | Source code license (BSL 1.1) | YES | |
| 60 | | `BINARY-LICENSE.txt` | Binary distribution license | YES | |
| 61 | | `LICENSE.md` | License overview document | YES | |
| 62 | | `README.md` | Project documentation | YES | |
| 63 | | `install.sh` | Installation script | YES | |
| 64 | | `issues.sh` | Diagnostic script | YES | |
| 65 | | `scripts/release.sh` | End-to-end release automation | YES | |
| 66 | |
| 67 | ### 2. Build Script Features |
| 68 | |
| 69 | The `build_dmg.sh` script MUST include: |
| 70 | |
| 71 | | Feature | Description | Check Pattern | |
| 72 | |---------|-------------|---------------| |
| 73 | | **SHA256 Generation** | Checksum for DMG file | `shasum -a 256` | |
| 74 | | **Auto Version Extraction** | Read version from pubspec.yaml | `read_version.*pubspec\|VERSION.*grep.*pubspec` | |
| 75 | | **create-dmg Support** | Pretty DMG with window layout | `create-dmg` | |
| 76 | | **hdiutil Fallback** | Basic DMG creation fallback | `hdiutil create` | |
| 77 | | **License Embedding** | Copy LICENSE files to app bundle | `LICENSE\|BINARY-LICENSE` in script | |
| 78 | | **Release Notes Copy** | Copy RELEASE_NOTES.md to dist/ | `RELEASE_NOTES` in script | |
| 79 | | **dist/ Directory** | Output directory for artifacts | `DIST_DIR\|dist/` | |
| 80 | |
| 81 | ### 3. Version Sources |
| 82 | |
| 83 | Projects MUST have at least one version source: |
| 84 | |
| 85 | | Location | Format | |
| 86 | |----------|--------| |
| 87 | | `flutter_app/pubspec.yaml` | `version: X.Y.Z+N` | |
| 88 | | `pubspec.yaml` (root) | `version: X.Y.Z+N` | |
| 89 | | `flutter_app/lib/version.dart` | `const String appVersion = "X.Y.Z";` | |
| 90 | | `backend/version.py` | `VERSION = "X.Y.Z"` | |
| 91 | |
| 92 | ### 4. Control Scripts (bin/) |
| 93 | |
| 94 | | Script | Purpose | |
| 95 | |--------|---------| |
| 96 | | `bin/appctl` or `bin/<app>ctl` | Service control (up/down/status/logs) | |
| 97 | | `bin/<app>_mcp_server.py` | MCP server for Claude integration | |
| 98 | |
| 99 | ### 5. Window-Close Backend Shutdown UX (Release Blocker) |
| 100 | |
| 101 | Desktop apps with bundled local backends MUST shut down the backend when the user closes the app window. |
| 102 | |
| 103 | | Requirement | Description | Check Pattern | |
| 104 | |-------------|-------------|---------------| |
| 105 | | **Exit interception** | App intercepts window close / app-exit request before terminating | `onExitRequested\|didRequestAppExit\|WindowListener` | |
| 106 | | **Shutdown call** | Exit path calls backend stop logic | `stopBackend\|stop_server\|shutdown_backend` | |
| 107 | | **Stopping dialog/UI** | Close path displays visible "Stopping server/backend" progress UI | `Stopping Server\|Stopping backend\|stop.*before exit` | |
| 108 | | **No orphan backend** | Post-close check confirms backend port/process is gone | `lsof -iTCP` / process check in smoke test docs | |
| 109 | |
| 110 | ### 6. GitHub Release + Website Sync (Release Blocker) |
| 111 | |
| 112 | Every DMG release must produce a real, populated GitHub release and matching website links. |
| 113 | |
| 114 | | Requirement | Description | Check Pattern | |
| 115 | |-------------|-------------|---------------| |
| 116 | | **Release automation** | `scripts/release.sh` creat |