本文へ移動
cccskills
無料GitHub で公開

apple-notes-incident-runbook

Incident response runbook for Apple Notes automation failures. Trigger: "apple notes incident".

インストール方法を見る

含まれるファイル(1)

  • SKILL.md6.1 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Apple Notes Incident Runbook

Overview

This runbook covers the most common Apple Notes automation failures and their resolution procedures. Unlike cloud SaaS incidents that involve API endpoints and status pages, Apple Notes incidents are local to the macOS machine: app crashes, TCC permission revocations, iCloud sync failures, and database corruption. Each incident section follows a detect-diagnose-fix-verify structure. Keep this runbook accessible on any machine running Notes automation.

Prerequisites

  • A named incident owner, an approved maintenance window for recovery actions, and a verified backup status.
  • A redacted diagnostic location with restricted access; notes, account names, and raw unified logs can contain sensitive data.
  • A documented escalation route to Apple or device management for sync, TCC, and storage failures.

Instructions

  1. Stop automated writes first and preserve the last successful cursor or operation ledger.
  2. Collect minimal, redacted diagnostics and classify the incident before restarting applications or services.
  3. Use supported UI, MDM, or vendor recovery paths for permissions, iCloud, and storage; do not modify TCC or Notes databases directly.
  4. Validate recovery with a scoped read-only check, reconcile pending mutations, and obtain owner approval before resuming writes.

Severity Levels

SeverityDescriptionExampleResponse Time
P1All automation blockedTCC permissions revoked, Notes.app won't launchImmediate
P2Data inconsistencyiCloud sync stuck, notes missingWithin 1 hour
P3Degraded performanceSlow operations, intermittent timeoutsWithin 4 hours
P4Cosmetic/minorLog warnings, non-critical script errorsNext business day

Incident 1: Notes.app Crash During Automation

# DETECT: Check if Notes is running
pgrep -x Notes > /dev/null && echo "Notes: running" || echo "Notes: NOT RUNNING"

# DIAGNOSE: Check crash logs
ls -lt ~/Library/Logs/DiagnosticReports/Notes* 2>/dev/null | head -3

# FIX: Restart Notes with stabilization delay
killall Notes 2>/dev/null
sleep 3
open -a Notes
sleep 5  # Wait for full launch and iCloud handshake

# VERIFY: Confirm access is restored
osascript -l JavaScript -e 'Application("Notes").defaultAccount.notes.length'

Incident 2: iCloud Sync Stuck

# DETECT: Compare note count with expected (from last known good)
CURRENT=$(osascript -l JavaScript -e 'Application("Notes").defaultAccount.notes.length' 2>/dev/null)
echo "Current note count: ${CURRENT:-ERROR}"

# DIAGNOSE: Check iCloud daemons
ps aux | grep -E "(bird|cloudd|nsurlsessiond)" | grep -v grep

# Check sync status
brctl status com.apple.Notes 2>/dev/null || echo "brctl unavailable"
log show --predicate 'subsystem == "com.apple.notes"' --last 5m 2>/dev/null | tail -20

# FIX: Pause automation, inspect Apple System Status, and follow supported
# macOS/iCloud recovery guidance. Do not terminate iCloud daemons in a runbook.

# VERIFY: Check note count is increasing / stable
sleep 30
NEW_COUNT=$(osascript -l JavaScript -e 'Application("Notes").defaultAccount.notes.length' 2>/dev/null)
echo "Note count after sync restart: ${NEW_COUNT:-ERROR}"

Incident 3: TCC Permissions Revoked

# DETECT: Test Apple Events access
osascript -l JavaScript -e 'Application("Notes").name()' 2>&1 | grep -q "Not authorized" && echo "TCC: DENIED" || echo "TCC: OK"

# DIAGNOSE/FIX: Review the exact client in System Settings > Privacy & Security
# > Automation, or use an approved MDM profile. Do not reset system-wide consent.

# VERIFY
osascript -l JavaScript -e 'Application("Notes").defaultAccount.notes.length'

Incident 4: Notes Database Corruption

# DETECT: Notes.app launches but shows no scoped notes or crashes on open.
# Preserve the error timestamp and stop automation writes.
# DIAGNOSE/FIX: Do not inspect, move, rename, or rebuild NoteStore files.
# Escalate with the owner to supported Apple/device-management recovery after
# confirming backup status, especially where "On My Mac" notes are in scope.

Error Handling

IssueCauseSolution
Crash loop after restartCorrupt note triggering crash on loadRemove local DB; let iCloud rebuild
Sync stuck for >1 hourApple iCloud service outageCheck apple.com/systemstatus; wait for resolution
Permissions reset after macOS updateOS upgrade resets TCC databaseRe-approve automation permissions post-update
Script hangs indefinitelyNotes.app showing modal dialogDismiss dialog manually; add activate() before operations
Automation works for user A but not BPer-user TCC grantsEach macOS user must approve automation separately

Output

An incident record contains severity, time window, affected automation scope, redacted diagnostics, actions taken, reconciliation status, and the approval to resume. It must not contain note bodies, database copies, or unredacted account/folder names.

Examples

For a suspected sync incident, pause writes, capture the job error and a redacted system-status check, then wait for the approved recovery path. If data divergence remains, keep the automation stopped and escalate rather than renaming local Notes storage or forcing a re-download.

Resources

Next Steps

For root cause analysis of specific errors, see apple-notes-common-errors. For monitoring to detect incidents early, see apple-notes-observability.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Build a synthetic-data CI gate for customer-controlled Abridge integration code without calling undocumented vendor interfaces. Use when adding regression checks to an Abridge deployment repository. Trigger with "test the Abridge integration".

日本語の概要は準備中です。原文の説明を表示しています。

jeremylongshore/tons-of-skills-marketplace2,8322026年10月13日 更新

Triage Abridge recording, note-review, Epic handoff, and access failures from observed evidence without inventing vendor error codes. Use when an Abridge clinical workflow is degraded. Trigger with "diagnose this Abridge issue".

日本語の概要は準備中です。原文の説明を表示しています。

jeremylongshore/tons-of-skills-marketplace2,8322026年10月13日 更新

Design and verify the clinician workflow from consent through recording, draft review, Linked Evidence, and final note disposition. Use when implementing or auditing an Abridge clinical documentation pathway. Trigger with "map the Abridge note workflow".

日本語の概要は準備中です。原文の説明を表示しています。

jeremylongshore/tons-of-skills-marketplace2,8322026年10月13日 更新

Verify the approved handoff of clinician-reviewed Abridge note sections into Epic templates and downstream workflows. Use when configuring or auditing Abridge-to-Epic documentation flow. Trigger with "verify the Abridge Epic handoff".

日本語の概要は準備中です。原文の説明を表示しています。

jeremylongshore/tons-of-skills-marketplace2,8322026年10月13日 更新

Evaluate Abridge adoption, workflow value, and avoidable operational friction without inventing prices or vendor billing meters. Use when reviewing an Abridge rollout or renewal. Trigger with "analyze Abridge value".

日本語の概要は準備中です。原文の説明を表示しています。

jeremylongshore/tons-of-skills-marketplace2,8322026年10月13日 更新

Produce a PHI-minimized Abridge support bundle with provenance, redaction, and protected escalation boundaries. Use when support needs reproducible evidence for an Abridge issue. Trigger with "build an Abridge debug bundle".

日本語の概要は準備中です。原文の説明を表示しています。

jeremylongshore/tons-of-skills-marketplace2,8322026年10月13日 更新

jeremylongshore のスキルをすべて見る

このスキルの問題を報告する