{
  "attribution": {
    "upstream": "https://github.com/microsoft/SkillOpt",
    "upstream_path": "skillopt_sleep/ (engine) + plugins/claude-code/ (Claude Code plugin surface) + plugins/run-sleep.sh (shared launcher)",
    "upstream_author": "Yifan Yang (yifanyang@microsoft.com), Microsoft Corporation",
    "upstream_license": "MIT",
    "derivation_note": "Started as a verbatim byte-for-byte copy of the skillopt_sleep Python engine, its Claude Code plugin skill/hooks/commands, and the shared scripts/run-sleep.sh + scripts/sleep.sh launchers. 23 targeted patches (6 cosmetic, 17 safety/hardening) were made afterward across staging.py, scheduler.py, cycle.py, state.py, backend.py, __main__.py, SKILL.md, commands/skillopt-sleep.md, sleep.sh, run-sleep.sh, and install-cron.sh, found across ten rounds of adversarial code review rather than assumed safe from the surface docs -- see the numbered 'Deviations from upstream' section in README.md for the authoritative, exact list (secret redaction covering proposed_SKILL.md/proposed_CLAUDE.md/the task archive/report.md/report.json, not just diagnostics; shell-quoting the generated crontab line including the extra param; adopt() re-redacting as defense-in-depth; wiring the previously-dead max_tokens_per_night budget; a loud warning that replay_mode:'fresh' is an unimplemented no-op; removing a hardcoded internal Azure OpenAI backend with Microsoft-internal endpoint hostnames and a Managed Identity client ID; validating tool names against a safe-identifier allowlist before they're used as a shim filename or interpolated into generated shell text; a dead SKILL.md cross-reference to a non-vendored design doc, now pointed at the real upstream URL; making the schedule command's confirm-before-installing behavior explicit instead of contradicting itself; chmod 0700/0600 on state and staging directories/files; correcting stale upstream-layout path assumptions in sleep.sh/run-sleep.sh's fallback branches to match this repo's actual scripts/+skillopt_sleep/ sibling layout; routing __main__.py's cmd_run/cmd_harvest console/--json/--output output through redact_secrets, since that bypassed every file-level redaction fix above, plus chmod 0700/0600 on cron.log which those fixes never covered; anchoring scheduler.py's per-project cron-line marker match on end-of-line instead of a bare substring test, which could silently drop a sibling project's scheduled job whose path happened to be a prefix of the one being (un)scheduled; quoting install-cron.sh's printed --backend value; requiring --yes for schedule at the CLI layer (not just in the driving agent's chat-confirmation instructions), refusing non-interactively without it; passing mode=0o700 to the os.makedirs() calls that create state/staging/backup dirs to close the create-then-chmod race window) -- re-apply all of them on re-vendor, and treat any other document (including this note) that repeats the count as a summary of that list, not a second source of truth: if counts ever disagree again, README.md's numbered list wins. skillopt_sleep has zero third-party dependencies (stdlib only) -- the heavier skillopt package it derives its ideas from (numpy/openai/azure, benchmark training loops) was deliberately NOT vendored, since this repo's skills are broad domain-expertise packages without labeled benchmarks, not narrow scoreable tasks. Re-vendor by re-copying skillopt_sleep/, plugins/claude-code/{skills,hooks,commands,scripts}/, and plugins/run-sleep.sh from a fresh clone of microsoft/SkillOpt, then re-applying the README's deviation list."
  }
}
