refactor(sleep): decouple engine to top-level skillopt_sleep/ (zero research dep)
Open-source-tool / research-code separation:
- git mv skillopt/sleep/ -> skillopt_sleep/ (top-level, sibling to the research
skillopt/ package). History preserved as renames.
- All imports skillopt.sleep.* -> skillopt_sleep.*.
- Vendor the validation gate into skillopt_sleep/gate.py (a self-contained copy
of skillopt.evaluation.gate). The engine now has ZERO dependency on the
research package — verified: grep finds no `from skillopt.` in skillopt_sleep/,
and consolidate's gate resolves to skillopt_sleep.gate.
- Plugin scripts/commands/skill call `-m skillopt_sleep`.
29 tests pass; `python -m skillopt_sleep` runs standalone.
Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
# SkillOpt-Sleep runner — invokes the skillopt.sleep engine with a suitable
|
||||
# SkillOpt-Sleep runner — invokes the skillopt_sleep engine with a suitable
|
||||
# Python interpreter, from the repo that contains this plugin.
|
||||
#
|
||||
# Usage: sleep.sh <run|dry-run|status|adopt|harvest> [extra args...]
|
||||
set -euo pipefail
|
||||
|
||||
# Resolve the repo root: the plugin lives at <repo>/skillopt-sleep-plugin,
|
||||
# so the engine package is at <repo>/skillopt/sleep. CLAUDE_PLUGIN_ROOT points
|
||||
# so the engine package is at <repo>/skillopt_sleep. CLAUDE_PLUGIN_ROOT points
|
||||
# at the plugin dir when run by Claude Code; fall back to this script's dir.
|
||||
PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT:-$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)}"
|
||||
REPO_ROOT="$(cd "$PLUGIN_ROOT/.." && pwd)"
|
||||
@@ -27,4 +27,4 @@ fi
|
||||
if [ "$#" -eq 0 ]; then set -- status; fi
|
||||
|
||||
cd "$REPO_ROOT"
|
||||
exec "$PY" -m skillopt.sleep "$@"
|
||||
exec "$PY" -m skillopt_sleep "$@"
|
||||
|
||||
Reference in New Issue
Block a user