feat(skillopt-sleep): sync vendored engine to upstream v0.2.0#247
Conversation
Sync the vendored skillopt_sleep engine and Claude Code plugin assets with microsoft/SkillOpt v0.2.0 (e4ea6a6): - new engine modules: dream, scheduler, harvest_codex, harvest_sources, tasks_file; new schedule/unschedule CLI actions and --preferences flag - upstream renamed the slash command /sleep -> /skillopt-sleep (commands/sleep.md -> commands/skillopt-sleep.md); sync-upstream.sh and README updated to match
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
Next review available in: 37 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (27)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🔍 Tessl Skill Review
|
| Dimension | Score | Detail |
|---|---|---|
| conciseness | ██░ 2/3 | The opening paragraphs contain significant conceptual explanation ('deployment-time analogue of training', 'synthesizes three ideas') that Claude doesn't need. The CLI flags table and config keys are efficient, but the introductory framing and 'When to use this skill' section with trigger phrases add bulk without adding actionable value. |
| actionability | ███ 3/3 | Provides fully executable bash commands for every operation (run, dry-run, adopt, schedule, unschedule), a complete CLI flags table with defaults, config keys with descriptions, and concrete validation/demo commands. The guidance is copy-paste ready throughout. |
| workflow clarity | ███ 3/3 | The six-stage cycle is clearly sequenced with explicit validation (stage 4 gates on held-out slice, stage 5 stages without changing live files, stage 6 requires explicit adoption with backup). The hard rules section reinforces safety constraints and the feedback loop (gate blocks regressions) is explicit. |
| progressive disclosure | ██░ 2/3 | References to external docs exist (design spec, guide section) but are vaguely signaled ('See the SkillOpt-Sleep guide section'). No bundle files are provided to validate references. The config keys and CLI flags could potentially be split into a reference file, and the inline content is somewhat long for a SKILL.md overview. |
Overall: This is a well-structured skill with strong actionability and workflow clarity — the six-stage cycle is clearly defined with explicit validation gates and safety constraints, and all CLI commands are executable. The main weaknesses are verbosity in the introductory sections (conceptual framing, trigger phrases) and somewhat weak progressive disclosure with vague external references and no bundle files to support them.
Suggestions:
- Trim the introductory paragraphs: remove the 'synthesizes three ideas' section and the conceptual framing ('deployment-time analogue of training') — Claude doesn't need this context to execute the skill.
- Move the CLI flags table and config keys into a separate REFERENCE.md and link to it, keeping SKILL.md as a concise overview with the most common commands.
To improve your score, point your agent at the Tessl optimization guide. Need help? Jump on our Discord.
Feedback
Report issues with this review at tesslio/skill-review, or send private feedback from your terminal with tessl feedback.
Up to standards ✅🟢 Issues
|
There was a problem hiding this comment.
Code Review
본 풀 리퀘스트는 skillopt-sleep 플러그인에 새로운 백엔드(Copilot, Azure OpenAI, Azure Responses) 지원, 야간 크론 스케줄링 기능, "dream" 및 "associative recall"을 통한 야간 통합 메커니즘, 그리고 진단 로깅을 통한 관찰 가능성(Observability) 개선 등 다양한 기능 향상을 도입합니다. 코드 리뷰 결과, 멀티스레드 환경에서 self._tokens 및 self._cache 업데이트 시 발생할 수 있는 동시성 레이스 컨디션 이슈와 scheduler.py 내 쉘 메타문자 이스케이프 누락으로 인한 커맨드 인젝션 취약점 등 고위험군 결함이 발견되었습니다. 또한, Azure API 호출 실패 시 에러 기록 누락, Codex 세션 파싱 중 예외 처리 미흡, 리스트 형태의 tasks 파일 사용 시 실행 차단 문제 등 시스템 안정성과 관찰 가능성을 높이기 위한 개선 사항들이 제안되었습니다.
The skillopt_sleep package is vendored read-only from microsoft/SkillOpt; static-analysis findings there must be fixed upstream, not patched locally.
Same rationale as the Codacy exclusion: the skillopt_sleep package is vendored read-only from microsoft/SkillOpt; findings there are tracked for upstream reporting (#248), not patched locally.
There was a problem hiding this comment.
3 issues found and verified against the latest diff
Confidence score: 3/5
- In
plugins/skillopt-sleep/skillopt_sleep/harvest_codex.py,_strip_codex_metacan drop valid session content when prompts are wrapped in<environment_context>, which risks losing training/replay inputs silently if merged as-is — parse and retain text after the closing marker before merging. - In
plugins/skillopt-sleep/skillopt_sleep/replay.py,replay_batchnow does a directint(...)onSKILLOPT_SLEEP_WORKERS, so a malformed env var can crash replay before any work starts — add the same fallback-to-1 parsing used bymulti_rolloutto keep batch runs resilient. - In
plugins/skillopt-sleep/skillopt_sleep/replay.py, thesample_idfix appears incomplete for tool-required flows usingattempt_with_tools, so cached rollouts may still collapse to a single response and reduce contrast/diversity — extend the cache-key/ID handling to the tool path and validate with a tool-task replay check.
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Greptile SummaryThis PR syncs the vendored
Confidence Score: 4/5Safe to merge for users who have read the command rename notice; the core consolidation and staging logic is correct, but the generated report footer and the Codex harvest path still carry known defects from prior review rounds. The new dream, scheduler, staging redaction, and consolidate observability code is well-written and isolated. Two defects from earlier rounds remain open — the stale
Important Files Changed
Sequence Diagram%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant User
participant CLI as __main__.py
participant HS as harvest_sources.py
participant HC as harvest_codex.py
participant H as harvest.py
participant Cycle as cycle.py
participant Dream as dream.py
participant Consolidate as consolidate.py
participant Staging as staging.py
User->>CLI: "skillopt_sleep run [--source claude|codex|auto]"
CLI->>Cycle: "run_sleep_cycle(cfg, seed_tasks=None)"
alt seed_tasks provided via --tasks-file
Cycle-->>Cycle: use seed_tasks directly
else normal harvest
Cycle->>HS: harvest_for_config(cfg, since_iso, limit)
alt "source == codex"
HS->>HC: harvest_codex(archived_sessions_dir)
else "source == auto"
HS->>HC: harvest_codex(archived_sessions_dir)
alt codex_digests empty
HS->>H: harvest(transcripts_dir)
end
else "source == claude (default)"
HS->>H: harvest(transcripts_dir)
end
HS-->>Cycle: List[SessionDigest]
Cycle->>Cycle: mine(digests)
end
Cycle->>Dream: dream_consolidate(backend, tasks, skill, memory)
Note over Dream: recall similar past tasks (recall_k>0), dream augment variants (dream_factor>0)
Dream->>Consolidate: consolidate(backend, enlarged_tasks)
Consolidate-->>Dream: ConsolidationResult
Dream-->>Cycle: ConsolidationResult
Cycle->>Staging: write_staging(report, diagnostics)
Staging-->>User: staging_dir + diagnostics.json
opt auto_adopt or user runs /skillopt-sleep adopt
User->>CLI: skillopt_sleep adopt
CLI->>Staging: adopt_staging(cfg)
Staging-->>User: live CLAUDE.md / SKILL.md updated
end
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant User
participant CLI as __main__.py
participant HS as harvest_sources.py
participant HC as harvest_codex.py
participant H as harvest.py
participant Cycle as cycle.py
participant Dream as dream.py
participant Consolidate as consolidate.py
participant Staging as staging.py
User->>CLI: "skillopt_sleep run [--source claude|codex|auto]"
CLI->>Cycle: "run_sleep_cycle(cfg, seed_tasks=None)"
alt seed_tasks provided via --tasks-file
Cycle-->>Cycle: use seed_tasks directly
else normal harvest
Cycle->>HS: harvest_for_config(cfg, since_iso, limit)
alt "source == codex"
HS->>HC: harvest_codex(archived_sessions_dir)
else "source == auto"
HS->>HC: harvest_codex(archived_sessions_dir)
alt codex_digests empty
HS->>H: harvest(transcripts_dir)
end
else "source == claude (default)"
HS->>H: harvest(transcripts_dir)
end
HS-->>Cycle: List[SessionDigest]
Cycle->>Cycle: mine(digests)
end
Cycle->>Dream: dream_consolidate(backend, tasks, skill, memory)
Note over Dream: recall similar past tasks (recall_k>0), dream augment variants (dream_factor>0)
Dream->>Consolidate: consolidate(backend, enlarged_tasks)
Consolidate-->>Dream: ConsolidationResult
Dream-->>Cycle: ConsolidationResult
Cycle->>Staging: write_staging(report, diagnostics)
Staging-->>User: staging_dir + diagnostics.json
opt auto_adopt or user runs /skillopt-sleep adopt
User->>CLI: skillopt_sleep adopt
CLI->>Staging: adopt_staging(cfg)
Staging-->>User: live CLAUDE.md / SKILL.md updated
end
Reviews (2): Last reviewed commit: "docs(skillopt-sleep): remove unimplement..." | Re-trigger Greptile |
The engine's production CLI path has no --preferences argument and the config-file 'preferences' key is never forwarded to the backend (only the experiments harness wires it via build_backend). Documenting it caused an argparse error for users. Tracked upstream in #248.
|



Summary
Syncs the vendored
plugins/skillopt-sleepengine and Claude Code plugin assets with upstream microsoft/SkillOpt v0.2.0 (commite4ea6a6):dream,scheduler,harvest_codex,harvest_sources,tasks_fileschedule/unschedule, plus a--preferencesflag/sleep→/skillopt-sleep(commands/sleep.md→commands/skillopt-sleep.md)sync-upstream.shandREADME.mdupdated to match the renamed command and new modulesRelated issue
N/A
Checklist
bun run test)bun run lint)plugins/skillopt-sleep/README.md, skill doc)BREAKING CHANGE:note is included(upstream command rename
/sleep→/skillopt-sleepis a user-facing rename; existing users of/sleepwill need to use the new command name)Note
bun.lockshows unrelated pre-existing drift (gatekeeper 1.4.0 → 1.6.0) in the working tree — intentionally left uncommitted as it is unrelated to this change.Summary by cubic
Syncs the vendored
skillopt_sleepengine and plugin assets to SkillOpt v0.2.0, adding scheduling, Codex transcript harvesting, and renaming the slash command to/skillopt-sleep. CI now excludes the vendored engine from Codacy and SonarCloud; docs remove the unimplemented--preferencesflag.New Features
dream,scheduler,harvest_codex,harvest_sources,tasks_file.schedule/unschedule; flags--max-sessions,--max-tasks,--tasks-file,--target-skill-path,--backend,--source.autosource selection; filters engine headless replays.sample_id.claude,codex,copilot. Version0.2.0.Migration
/sleep→/skillopt-sleep. Update any docs, aliases, and cron instructions.Written for commit 6273f05. Summary will update on new commits.