feat(macos-watchdog): new skill v1.0.0 — design/deploy/discipline launchd watchdogs - #284
Open
daymade wants to merge 1 commit into
Open
feat(macos-watchdog): new skill v1.0.0 — design/deploy/discipline launchd watchdogs#284daymade wants to merge 1 commit into
daymade wants to merge 1 commit into
Conversation
…nchd watchdogs Recovered onto its own branch/commit from a shared checkout: this content was found fully staged (index only, never committed) on a branch already named feat/macos-watchdog by a concurrent session, but sitting in the working tree while a different, unrelated branch (docs/hooks-pitfalls-30-31-...) was checked out — so it rode along into that other branch's commit as a parallel-session sweep-in. This commit reproduces it here, on the branch its own author had already named for it, byte-identical (verified via JSON diff on marketplace.json and file-mode comparison) to what was staged, with one exclusion: macos-watchdog/dist/macos-watchdog.skill, a gitignored (.gitignore line 9: `dist/`) local packaging artifact not meant to be committed, matching the convention of every other skill's dist/ in this repo (0 tracked files under any dist/ in the whole tree). Per the CHANGELOG entry already written for it: design, deploy, and discipline macOS launchd watchdogs (LaunchAgents/LaunchDaemons that detect a recurring problem and auto-remediate), distilled from 15 production watchdogs and their incident history. Ships the quiet-watchdog contract (premise-state self-check, patient mode, escalating auto-cooldown, never-resurrect-what-the-user-quit), deploy mechanics, stop semantics, batch-loop throttling, and SRE alert layering. Bundles watchdog-cooldown.sh, new-launchagent.sh, and an annotated plist template. Claimed eval: with-skill 17/17 vs baseline 16/17 on three prompts (new-install / noisy-watchdog triage / config audit). IMPORTANT — I (Claude, this session) did not author, verify, run, or review any of this content. I have not re-run security_scan, quick_validate, or the eval harness on it myself, and I have not independently confirmed the eval numbers or any technical claim in it. This commit exists purely to give already-complete, already-staged work its own clean home instead of leaving it fragile in a shared index or bundled into an unrelated PR. Do not treat this commit as reviewed. Whoever owns this work should review/re-verify before merging — see PR description for the open question. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CudYBXrK5WyCiKoB2ugbAx
daymade
added a commit
that referenced
this pull request
Aug 12, 2026
…ped staleness tracker New pitfalls folded in from live incidental discoveries on a private hooks repo this session (per user's explicit "沉淀本 session 的新发现" scope), not synthesized on request: #30 — a UserPromptSubmit hook fired on a background subagent's own task-notification arriving, not on any human keystroke; the transcript JSONL distinguishes the two internally (origin.kind: "human" vs "task-notification") but that metadata never reaches the hook's stdin (verified against the live official docs: session_id/transcript_path/cwd/permission_mode/hook_event_name/ prompt_id/prompt, nothing more). SKILL.md's pre-existing "UserPromptSubmit only ever sees user input" claim gets a precise footnote, not a rewrite — the core argument (can't see the model's own current-turn output) still holds. #31 — a compounding-artifact staleness tracker keyed on file *kind* re-flags files nobody touched this round, and a written justification can't clear it because the mechanism only compares timestamps against a kind, never reads the justification prose. An independent fresh-context review (dispatched to re-derive, not just read, the three evidentiary claims from primary sources — official docs via its own WebFetch, transcript shape via its own JSONL parse, tracker ledger via its own file read) found every specific factual claim accurate, but caught two real bugs in #30's prescribed Fix before merge, both independently re-verified here before applying: - the gate condition required promptSource == "typed" in addition to origin.kind == "human", which silently rejects genuine human input arriving mid-turn (promptSource: "queued") — confirmed against a real message in this session's own transcript; fixed to gate on origin.kind alone. - the fix told readers to look up prompt_id in the transcript JSONL — that literal string occurs 0 times across 1745 records; the field is promptId there (camelCase), while the hook's own stdin JSON carries prompt_id (snake_case) — the same twin-blind-spot shape pitfall #20 already warns about on a different field pair. quick_validate passed; full regression audit (compare/classify/verify) passed against the pre-session git-ref baseline, 1 pre-existing candidate (the SKILL.md sentence split), reviewed as preserved_or_moved; security_scan passed, marker refreshed. Manual PII pass on the new content: no absolute paths, no names, no session IDs, no secrets. Independent-review.md persisted to the private PKM knowledge repo (skill-reviews/claude-code-hooks/), per skill-creator discipline #5. daymade-claude-code suite bumped 1.42.0 -> 1.43.0 in marketplace.json. (A second, unrelated piece of work — the macos-watchdog v1.0.0 skill release — was previously bundled into this branch as a parallel-session sweep-in from a shared checkout. It has been split out to its own branch/commit/PR (feat/macos-watchdog, PR #284), unreviewed by me, so this PR now contains only content I've verified.) Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CudYBXrK5WyCiKoB2ugbAx
Merged
7 tasks
daymade
added a commit
that referenced
this pull request
Aug 12, 2026
…ped staleness tracker (#283) New pitfalls folded in from live incidental discoveries on a private hooks repo this session (per user's explicit "沉淀本 session 的新发现" scope), not synthesized on request: #30 — a UserPromptSubmit hook fired on a background subagent's own task-notification arriving, not on any human keystroke; the transcript JSONL distinguishes the two internally (origin.kind: "human" vs "task-notification") but that metadata never reaches the hook's stdin (verified against the live official docs: session_id/transcript_path/cwd/permission_mode/hook_event_name/ prompt_id/prompt, nothing more). SKILL.md's pre-existing "UserPromptSubmit only ever sees user input" claim gets a precise footnote, not a rewrite — the core argument (can't see the model's own current-turn output) still holds. #31 — a compounding-artifact staleness tracker keyed on file *kind* re-flags files nobody touched this round, and a written justification can't clear it because the mechanism only compares timestamps against a kind, never reads the justification prose. An independent fresh-context review (dispatched to re-derive, not just read, the three evidentiary claims from primary sources — official docs via its own WebFetch, transcript shape via its own JSONL parse, tracker ledger via its own file read) found every specific factual claim accurate, but caught two real bugs in #30's prescribed Fix before merge, both independently re-verified here before applying: - the gate condition required promptSource == "typed" in addition to origin.kind == "human", which silently rejects genuine human input arriving mid-turn (promptSource: "queued") — confirmed against a real message in this session's own transcript; fixed to gate on origin.kind alone. - the fix told readers to look up prompt_id in the transcript JSONL — that literal string occurs 0 times across 1745 records; the field is promptId there (camelCase), while the hook's own stdin JSON carries prompt_id (snake_case) — the same twin-blind-spot shape pitfall #20 already warns about on a different field pair. quick_validate passed; full regression audit (compare/classify/verify) passed against the pre-session git-ref baseline, 1 pre-existing candidate (the SKILL.md sentence split), reviewed as preserved_or_moved; security_scan passed, marker refreshed. Manual PII pass on the new content: no absolute paths, no names, no session IDs, no secrets. Independent-review.md persisted to the private PKM knowledge repo (skill-reviews/claude-code-hooks/), per skill-creator discipline #5. daymade-claude-code suite bumped 1.42.0 -> 1.43.0 in marketplace.json. (A second, unrelated piece of work — the macos-watchdog v1.0.0 skill release — was previously bundled into this branch as a parallel-session sweep-in from a shared checkout. It has been split out to its own branch/commit/PR (feat/macos-watchdog, PR #284), unreviewed by me, so this PR now contains only content I've verified.) Claude-Session: https://claude.ai/code/session_01CudYBXrK5WyCiKoB2ugbAx Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR's content was not authored, verified, or reviewed by me (Claude, in a separate session/task). It was found fully staged in a shared checkout — on a branch (
feat/macos-watchdog) its own author had already created and named, but never committed to — while I was working on an unrelated PR (#283) from the same checkout. Rather than let it sit fragile in a shared index (or ship unverified inside my own unrelated PR), I gave it this clean branch/commit of its own, byte-identical to what was staged (JSON-diffed to confirm; file modes compared; one gitignored build artifactdist/macos-watchdog.skillexcluded, matching every other skill'sdist/convention in this repo).I have not run security_scan, quick_validate, or the eval harness on this myself, and have not independently confirmed any technical claim in it (including the "17/17 vs baseline 16/17" eval numbers). Its actual author should review and re-verify before merge — this repo installs LaunchAgents/LaunchDaemons with real system-level effects, which is a higher-stakes category than documentation-only changes.
Summary (from the CHANGELOG entry already written for this release)
watchdog-cooldown.sh,new-launchagent.sh, an annotated plist template.Test plan
security_scan/quick_validateunder their own review before merge🤖 Generated with Claude Code
https://claude.ai/code/session_01CudYBXrK5WyCiKoB2ugbAx