self-evolve-framework 1.6.0 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -23
- package/bin/cli.js +24 -67
- package/package.json +1 -1
- package/template/rules/knowledge/README.md +56 -0
- package/template/rules/knowledge/ant-design-vue.mdc +54 -0
- package/template/rules/knowledge/general.mdc +56 -0
- package/template/rules/knowledge/rust.mdc +55 -0
- package/template/rules/knowledge/shadcn-svelte.mdc +64 -0
- package/template/rules/knowledge/svelte.mdc +135 -0
- package/template/rules/knowledge/tailwind.mdc +66 -0
- package/template/rules/knowledge/tauri.mdc +65 -0
- package/template/rules/knowledge/typescript.mdc +41 -0
- package/template/rules/knowledge/vue.mdc +48 -0
- package/template/rules/ponytail.mdc +23 -98
- package/template/rules/self-evolve.mdc +24 -0
- package/template/skills/impeccable/SKILL.md +47 -174
- package/template/skills/skillopt-sleep/SKILL.md +32 -88
- package/template/skills/impeccable/agents/impeccable_asset_producer.toml +0 -92
- package/template/skills/impeccable/agents/impeccable_manual_edit_applier.toml +0 -95
- package/template/skills/impeccable/agents/openai.yaml +0 -4
- package/template/skills/impeccable/reference/adapt.md +0 -311
- package/template/skills/impeccable/reference/animate.md +0 -201
- package/template/skills/impeccable/reference/audit.md +0 -133
- package/template/skills/impeccable/reference/bolder.md +0 -113
- package/template/skills/impeccable/reference/brand.md +0 -108
- package/template/skills/impeccable/reference/clarify.md +0 -288
- package/template/skills/impeccable/reference/codex.md +0 -105
- package/template/skills/impeccable/reference/colorize.md +0 -257
- package/template/skills/impeccable/reference/craft.md +0 -123
- package/template/skills/impeccable/reference/critique.md +0 -790
- package/template/skills/impeccable/reference/delight.md +0 -302
- package/template/skills/impeccable/reference/distill.md +0 -111
- package/template/skills/impeccable/reference/document.md +0 -429
- package/template/skills/impeccable/reference/extract.md +0 -69
- package/template/skills/impeccable/reference/harden.md +0 -347
- package/template/skills/impeccable/reference/hooks.md +0 -90
- package/template/skills/impeccable/reference/init.md +0 -172
- package/template/skills/impeccable/reference/interaction-design.md +0 -189
- package/template/skills/impeccable/reference/layout.md +0 -161
- package/template/skills/impeccable/reference/live.md +0 -720
- package/template/skills/impeccable/reference/onboard.md +0 -234
- package/template/skills/impeccable/reference/optimize.md +0 -258
- package/template/skills/impeccable/reference/overdrive.md +0 -130
- package/template/skills/impeccable/reference/polish.md +0 -241
- package/template/skills/impeccable/reference/product.md +0 -60
- package/template/skills/impeccable/reference/quieter.md +0 -99
- package/template/skills/impeccable/reference/shape.md +0 -165
- package/template/skills/impeccable/reference/typeset.md +0 -279
- package/template/skills/impeccable/scripts/command-metadata.json +0 -94
- package/template/skills/impeccable/scripts/context-signals.mjs +0 -225
- package/template/skills/impeccable/scripts/context.mjs +0 -961
- package/template/skills/impeccable/scripts/critique-storage.mjs +0 -242
- package/template/skills/impeccable/scripts/detect-csp.mjs +0 -198
- package/template/skills/impeccable/scripts/detect.mjs +0 -21
- package/template/skills/impeccable/scripts/detector/browser/injected/index.mjs +0 -1937
- package/template/skills/impeccable/scripts/detector/cli/main.mjs +0 -290
- package/template/skills/impeccable/scripts/detector/design-system.mjs +0 -750
- package/template/skills/impeccable/scripts/detector/detect-antipatterns-browser.js +0 -5138
- package/template/skills/impeccable/scripts/detector/detect-antipatterns.mjs +0 -50
- package/template/skills/impeccable/scripts/detector/engines/browser/detect-url.mjs +0 -277
- package/template/skills/impeccable/scripts/detector/engines/regex/detect-text.mjs +0 -568
- package/template/skills/impeccable/scripts/detector/engines/static-html/css-cascade.mjs +0 -1015
- package/template/skills/impeccable/scripts/detector/engines/static-html/detect-html.mjs +0 -234
- package/template/skills/impeccable/scripts/detector/engines/visual/screenshot-contrast.mjs +0 -189
- package/template/skills/impeccable/scripts/detector/findings.mjs +0 -12
- package/template/skills/impeccable/scripts/detector/node/file-system.mjs +0 -198
- package/template/skills/impeccable/scripts/detector/profile/profiler.mjs +0 -166
- package/template/skills/impeccable/scripts/detector/registry/antipatterns.mjs +0 -448
- package/template/skills/impeccable/scripts/detector/rules/checks.mjs +0 -2671
- package/template/skills/impeccable/scripts/detector/shared/color.mjs +0 -124
- package/template/skills/impeccable/scripts/detector/shared/constants.mjs +0 -101
- package/template/skills/impeccable/scripts/detector/shared/inline-ignores.mjs +0 -148
- package/template/skills/impeccable/scripts/detector/shared/page.mjs +0 -7
- package/template/skills/impeccable/scripts/hook-admin.mjs +0 -661
- package/template/skills/impeccable/scripts/hook-before-edit.mjs +0 -476
- package/template/skills/impeccable/scripts/hook-lib.mjs +0 -1632
- package/template/skills/impeccable/scripts/hook.mjs +0 -61
- package/template/skills/impeccable/scripts/lib/design-parser.mjs +0 -842
- package/template/skills/impeccable/scripts/lib/impeccable-config.mjs +0 -638
- package/template/skills/impeccable/scripts/lib/impeccable-paths.mjs +0 -128
- package/template/skills/impeccable/scripts/lib/is-generated.mjs +0 -69
- package/template/skills/impeccable/scripts/lib/target-args.mjs +0 -42
- package/template/skills/impeccable/scripts/live/browser-script-parts.mjs +0 -49
- package/template/skills/impeccable/scripts/live/completion.mjs +0 -19
- package/template/skills/impeccable/scripts/live/event-validation.mjs +0 -137
- package/template/skills/impeccable/scripts/live/insert-ui.mjs +0 -458
- package/template/skills/impeccable/scripts/live/manual-apply.mjs +0 -939
- package/template/skills/impeccable/scripts/live/manual-edit-routes.mjs +0 -357
- package/template/skills/impeccable/scripts/live/manual-edits-buffer.mjs +0 -152
- package/template/skills/impeccable/scripts/live/session-store.mjs +0 -289
- package/template/skills/impeccable/scripts/live/svelte-component.mjs +0 -826
- package/template/skills/impeccable/scripts/live/sveltekit-adapter.mjs +0 -274
- package/template/skills/impeccable/scripts/live/ui-core.mjs +0 -180
- package/template/skills/impeccable/scripts/live/vocabulary.mjs +0 -36
- package/template/skills/impeccable/scripts/live-accept.mjs +0 -812
- package/template/skills/impeccable/scripts/live-browser-dom.js +0 -146
- package/template/skills/impeccable/scripts/live-browser-session.js +0 -123
- package/template/skills/impeccable/scripts/live-browser.js +0 -11173
- package/template/skills/impeccable/scripts/live-commit-manual-edits.mjs +0 -1241
- package/template/skills/impeccable/scripts/live-complete.mjs +0 -75
- package/template/skills/impeccable/scripts/live-copy-edit-agent.mjs +0 -683
- package/template/skills/impeccable/scripts/live-discard-manual-edits.mjs +0 -51
- package/template/skills/impeccable/scripts/live-inject.mjs +0 -583
- package/template/skills/impeccable/scripts/live-insert.mjs +0 -272
- package/template/skills/impeccable/scripts/live-manual-edit-evidence.mjs +0 -363
- package/template/skills/impeccable/scripts/live-poll.mjs +0 -384
- package/template/skills/impeccable/scripts/live-resume.mjs +0 -94
- package/template/skills/impeccable/scripts/live-server.mjs +0 -1135
- package/template/skills/impeccable/scripts/live-status.mjs +0 -61
- package/template/skills/impeccable/scripts/live-target.mjs +0 -30
- package/template/skills/impeccable/scripts/live-wrap.mjs +0 -894
- package/template/skills/impeccable/scripts/live.mjs +0 -297
- package/template/skills/impeccable/scripts/modern-screenshot.umd.js +0 -14
- package/template/skills/impeccable/scripts/palette.mjs +0 -633
- package/template/skills/impeccable/scripts/pin.mjs +0 -214
- package/template/skills/skillopt-sleep/configs/_base_/default.yaml +0 -103
- package/template/skills/skillopt-sleep/configs/alfworld/default.yaml +0 -29
- package/template/skills/skillopt-sleep/configs/docvqa/default.yaml +0 -28
- package/template/skills/skillopt-sleep/configs/features/soft_gate.yaml +0 -47
- package/template/skills/skillopt-sleep/configs/livemathematicianbench/default.yaml +0 -22
- package/template/skills/skillopt-sleep/configs/officeqa/default.yaml +0 -34
- package/template/skills/skillopt-sleep/configs/searchqa/default.yaml +0 -32
- package/template/skills/skillopt-sleep/configs/spreadsheetbench/default.yaml +0 -34
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/__init__.py +0 -28
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/config.py +0 -282
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/datasets/__init__.py +0 -7
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/datasets/base.py +0 -512
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/engine/__init__.py +0 -9
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/engine/trainer.py +0 -2379
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/__init__.py +0 -1
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/_template/README.md +0 -43
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/_template/config_template.yaml +0 -55
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/_template/env_template.py +0 -151
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/_template/loader_template.py +0 -87
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/alfworld/__init__.py +0 -5
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/alfworld/adapter.py +0 -428
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/alfworld/dataloader.py +0 -123
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/alfworld/prompts/analyst_error.md +0 -55
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/alfworld/prompts/analyst_success.md +0 -33
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/alfworld/prompts/rollout_no_history.md +0 -8
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/alfworld/prompts/rollout_with_history.md +0 -9
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/alfworld/prompts/rollout_with_memory.md +0 -16
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/alfworld/reflect.py +0 -4
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/alfworld/rollout.py +0 -366
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/alfworld/skills/initial.md +0 -45
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/alfworld/vendor/__init__.py +0 -9
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/alfworld/vendor/alfworld_envs.py +0 -221
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/alfworld/vendor/alfworld_projection.py +0 -60
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/alfworld/vendor/alfworld_prompts.py +0 -8
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/alfworld/vendor/config_tw.yaml +0 -145
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/alfworld/vendor/env_base.py +0 -84
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/alfworld/vendor/env_manager.py +0 -139
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/alfworld/vendor/memory.py +0 -87
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/base.py +0 -329
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/docvqa/__init__.py +0 -1
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/docvqa/adapter.py +0 -90
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/docvqa/dataloader.py +0 -61
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/docvqa/evaluator.py +0 -113
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/docvqa/prompts/analyst_error.md +0 -35
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/docvqa/prompts/analyst_success.md +0 -24
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/docvqa/prompts/rollout_system.md +0 -12
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/docvqa/rollout.py +0 -391
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/docvqa/skills/initial.md +0 -11
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/livemathematicianbench/__init__.py +0 -1
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/livemathematicianbench/adapter.py +0 -129
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/livemathematicianbench/dataloader.py +0 -308
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/livemathematicianbench/evaluator.py +0 -62
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/livemathematicianbench/prompts/analyst_error.md +0 -37
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/livemathematicianbench/prompts/analyst_success.md +0 -25
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/livemathematicianbench/prompts/rollout_system.md +0 -12
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/livemathematicianbench/reflect.py +0 -4
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/livemathematicianbench/rollout.py +0 -434
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/livemathematicianbench/skills/initial.md +0 -16
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/officeqa/__init__.py +0 -1
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/officeqa/adapter.py +0 -112
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/officeqa/dataloader.py +0 -71
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/officeqa/evaluator.py +0 -46
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/officeqa/prompts/analyst_error.md +0 -37
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/officeqa/prompts/analyst_success.md +0 -25
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/officeqa/prompts/rollout_system.md +0 -15
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/officeqa/rollout.py +0 -799
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/officeqa/skills/initial.md +0 -15
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/officeqa/tool_runtime.py +0 -552
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/searchqa/__init__.py +0 -1
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/searchqa/adapter.py +0 -96
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/searchqa/dataloader.py +0 -42
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/searchqa/evaluator.py +0 -100
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/searchqa/prompts/analyst_error.md +0 -46
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/searchqa/prompts/analyst_success.md +0 -32
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/searchqa/prompts/rollout_system.md +0 -13
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/searchqa/reflect.py +0 -4
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/searchqa/rollout.py +0 -494
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/searchqa/skills/initial.md +0 -3
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/spreadsheetbench/__init__.py +0 -5
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/spreadsheetbench/adapter.py +0 -159
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/spreadsheetbench/codegen_agent.py +0 -731
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/spreadsheetbench/dataloader.py +0 -37
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/spreadsheetbench/evaluator.py +0 -158
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/spreadsheetbench/executor.py +0 -67
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/spreadsheetbench/prompts/analyst_error.md +0 -46
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/spreadsheetbench/prompts/analyst_success.md +0 -32
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/spreadsheetbench/prompts/codegen_system.md +0 -1
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/spreadsheetbench/prompts/critical_rules.md +0 -9
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/spreadsheetbench/prompts/react_system.md +0 -21
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/spreadsheetbench/react_agent.py +0 -395
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/spreadsheetbench/reflect.py +0 -4
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/spreadsheetbench/rollout.py +0 -979
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/spreadsheetbench/skills/initial.md +0 -56
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/evaluation/__init__.py +0 -13
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/evaluation/gate.py +0 -148
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/gradient/__init__.py +0 -15
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/gradient/aggregate.py +0 -253
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/gradient/reflect.py +0 -635
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/model/__init__.py +0 -514
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/model/azure_openai.py +0 -915
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/model/backend_config.py +0 -185
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/model/claude_backend.py +0 -371
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/model/codex_backend.py +0 -666
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/model/codex_harness.py +0 -1057
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/model/common.py +0 -229
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/model/minimax_backend.py +0 -277
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/model/qwen_backend.py +0 -456
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/model/router.py +0 -236
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/optimizer/__init__.py +0 -15
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/optimizer/appendix.py +0 -156
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/optimizer/clip.py +0 -109
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/optimizer/lr_autonomous.py +0 -108
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/optimizer/meta_skill.py +0 -79
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/optimizer/rewrite.py +0 -59
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/optimizer/scheduler.py +0 -127
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/optimizer/select.py +0 -4
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/optimizer/skill.py +0 -201
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/optimizer/skill_aware.py +0 -206
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/optimizer/slow_update.py +0 -396
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/optimizer/update_modes.py +0 -135
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/prompts/__init__.py +0 -63
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/prompts/analyst_error.md +0 -41
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/prompts/analyst_error_full_rewrite.md +0 -32
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/prompts/analyst_error_rewrite.md +0 -44
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/prompts/analyst_success.md +0 -36
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/prompts/analyst_success_full_rewrite.md +0 -30
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/prompts/analyst_success_rewrite.md +0 -33
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/prompts/lr_autonomous.md +0 -20
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/prompts/merge_failure.md +0 -30
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/prompts/merge_failure_full_rewrite.md +0 -28
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/prompts/merge_failure_rewrite.md +0 -26
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/prompts/merge_final.md +0 -33
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/prompts/merge_final_full_rewrite.md +0 -28
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/prompts/merge_final_rewrite.md +0 -25
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/prompts/merge_success.md +0 -28
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/prompts/merge_success_full_rewrite.md +0 -28
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/prompts/merge_success_rewrite.md +0 -25
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/prompts/meta_skill.md +0 -40
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/prompts/ranking.md +0 -20
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/prompts/ranking_rewrite.md +0 -15
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/prompts/rewrite_skill.md +0 -25
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/prompts/slow_update.md +0 -60
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/scheduler/__init__.py +0 -8
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/types.py +0 -306
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/utils/__init__.py +0 -4
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/utils/json_utils.py +0 -172
- package/template/skills/skillopt-sleep/scripts/framework/skillopt/utils/scoring.py +0 -28
- package/template/skills/skillopt-sleep/scripts/python/__init__.py +0 -20
- package/template/skills/skillopt-sleep/scripts/python/__main__.py +0 -343
- package/template/skills/skillopt-sleep/scripts/python/backend.py +0 -1371
- package/template/skills/skillopt-sleep/scripts/python/budget.py +0 -75
- package/template/skills/skillopt-sleep/scripts/python/config.py +0 -162
- package/template/skills/skillopt-sleep/scripts/python/consolidate.py +0 -238
- package/template/skills/skillopt-sleep/scripts/python/cycle.py +0 -291
- package/template/skills/skillopt-sleep/scripts/python/dream.py +0 -138
- package/template/skills/skillopt-sleep/scripts/python/experiments/__init__.py +0 -1
- package/template/skills/skillopt-sleep/scripts/python/experiments/gbrain_bench.py +0 -119
- package/template/skills/skillopt-sleep/scripts/python/experiments/personas.py +0 -86
- package/template/skills/skillopt-sleep/scripts/python/experiments/report.py +0 -132
- package/template/skills/skillopt-sleep/scripts/python/experiments/run_experiment.py +0 -178
- package/template/skills/skillopt-sleep/scripts/python/experiments/run_gbrain.py +0 -209
- package/template/skills/skillopt-sleep/scripts/python/experiments/run_transfer.py +0 -155
- package/template/skills/skillopt-sleep/scripts/python/experiments/sweep.py +0 -164
- package/template/skills/skillopt-sleep/scripts/python/gate.py +0 -50
- package/template/skills/skillopt-sleep/scripts/python/harvest.py +0 -304
- package/template/skills/skillopt-sleep/scripts/python/harvest_codex.py +0 -253
- package/template/skills/skillopt-sleep/scripts/python/harvest_sources.py +0 -41
- package/template/skills/skillopt-sleep/scripts/python/judges.py +0 -84
- package/template/skills/skillopt-sleep/scripts/python/llm_miner.py +0 -134
- package/template/skills/skillopt-sleep/scripts/python/memory.py +0 -129
- package/template/skills/skillopt-sleep/scripts/python/mine.py +0 -312
- package/template/skills/skillopt-sleep/scripts/python/replay.py +0 -146
- package/template/skills/skillopt-sleep/scripts/python/rollout.py +0 -153
- package/template/skills/skillopt-sleep/scripts/python/scheduler.py +0 -138
- package/template/skills/skillopt-sleep/scripts/python/slow_update.py +0 -142
- package/template/skills/skillopt-sleep/scripts/python/staging.py +0 -103
- package/template/skills/skillopt-sleep/scripts/python/state.py +0 -96
- package/template/skills/skillopt-sleep/scripts/python/tasks_file.py +0 -81
- package/template/skills/skillopt-sleep/scripts/python/types.py +0 -146
- package/template/skills/skillopt-sleep/scripts/shell/__init__.py +0 -0
- package/template/skills/skillopt-sleep/scripts/shell/eval_only.py +0 -466
- package/template/skills/skillopt-sleep/scripts/shell/materialize_searchqa.py +0 -148
- package/template/skills/skillopt-sleep/scripts/shell/run_alfworld.sh +0 -60
- package/template/skills/skillopt-sleep/scripts/shell/run_searchqa.sh +0 -40
- package/template/skills/skillopt-sleep/scripts/shell/run_spreadsheetbench.sh +0 -39
- package/template/skills/skillopt-sleep/scripts/shell/train.py +0 -556
|
@@ -1,289 +0,0 @@
|
|
|
1
|
-
import fs from 'node:fs';
|
|
2
|
-
import path from 'node:path';
|
|
3
|
-
import { getLegacyLiveSessionsDir, getLiveSessionsDir } from '../lib/impeccable-paths.mjs';
|
|
4
|
-
|
|
5
|
-
const COMPLETED_PHASES = new Set(['completed', 'discarded']);
|
|
6
|
-
|
|
7
|
-
export function createLiveSessionStore({ cwd = process.cwd(), sessionId } = {}) {
|
|
8
|
-
const rootDir = getLiveSessionsDir(cwd);
|
|
9
|
-
const legacyRootDir = getLegacyLiveSessionsDir(cwd);
|
|
10
|
-
fs.mkdirSync(rootDir, { recursive: true });
|
|
11
|
-
const snapshotCache = new Map();
|
|
12
|
-
|
|
13
|
-
function loadCachedOrRebuild(id) {
|
|
14
|
-
const cached = snapshotCache.get(id);
|
|
15
|
-
if (cached) return cached;
|
|
16
|
-
const journalPath = getReadableJournalPath(id);
|
|
17
|
-
const rebuilt = rebuildSnapshotFromJournal(journalPath, id);
|
|
18
|
-
snapshotCache.set(id, rebuilt);
|
|
19
|
-
return rebuilt;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
function getReadableJournalPath(id) {
|
|
23
|
-
const primary = getJournalPath(rootDir, id);
|
|
24
|
-
if (fs.existsSync(primary)) return primary;
|
|
25
|
-
const legacy = getJournalPath(legacyRootDir, id);
|
|
26
|
-
if (fs.existsSync(legacy)) return legacy;
|
|
27
|
-
return primary;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
return {
|
|
31
|
-
rootDir,
|
|
32
|
-
legacyRootDir,
|
|
33
|
-
appendEvent(event) {
|
|
34
|
-
const normalized = normalizeEvent(event, sessionId);
|
|
35
|
-
const journalPath = getJournalPath(rootDir, normalized.id);
|
|
36
|
-
const snapshotPath = getSnapshotPath(rootDir, normalized.id);
|
|
37
|
-
const legacyJournalPath = getJournalPath(legacyRootDir, normalized.id);
|
|
38
|
-
if (!fs.existsSync(journalPath) && fs.existsSync(legacyJournalPath)) {
|
|
39
|
-
fs.copyFileSync(legacyJournalPath, journalPath);
|
|
40
|
-
}
|
|
41
|
-
const prior = loadCachedOrRebuild(normalized.id);
|
|
42
|
-
const seq = prior.nextSeq;
|
|
43
|
-
const entry = {
|
|
44
|
-
seq,
|
|
45
|
-
id: normalized.id,
|
|
46
|
-
type: normalized.type,
|
|
47
|
-
ts: new Date().toISOString(),
|
|
48
|
-
event: normalized,
|
|
49
|
-
};
|
|
50
|
-
fs.appendFileSync(journalPath, JSON.stringify(entry) + '\n');
|
|
51
|
-
const next = applyEvent(prior.snapshot, entry, prior.diagnostics);
|
|
52
|
-
snapshotCache.set(normalized.id, { snapshot: next, diagnostics: next.diagnostics || [], nextSeq: seq + 1 });
|
|
53
|
-
writeSnapshot(snapshotPath, next);
|
|
54
|
-
return next;
|
|
55
|
-
},
|
|
56
|
-
getSnapshot(id = sessionId, opts = {}) {
|
|
57
|
-
if (!id) throw new Error('session id required');
|
|
58
|
-
const journalPath = getReadableJournalPath(id);
|
|
59
|
-
const snapshotPath = getSnapshotPath(rootDir, id);
|
|
60
|
-
const rebuilt = rebuildSnapshotFromJournal(journalPath, id);
|
|
61
|
-
snapshotCache.set(id, rebuilt);
|
|
62
|
-
writeSnapshot(snapshotPath, rebuilt.snapshot);
|
|
63
|
-
if (!opts.includeCompleted && COMPLETED_PHASES.has(rebuilt.snapshot.phase)) return null;
|
|
64
|
-
return rebuilt.snapshot;
|
|
65
|
-
},
|
|
66
|
-
listActiveSessions() {
|
|
67
|
-
const ids = new Set();
|
|
68
|
-
for (const dir of [legacyRootDir, rootDir]) {
|
|
69
|
-
if (!fs.existsSync(dir)) continue;
|
|
70
|
-
for (const name of fs.readdirSync(dir)) {
|
|
71
|
-
if (name.endsWith('.jsonl')) ids.add(name.slice(0, -'.jsonl'.length));
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
return [...ids]
|
|
75
|
-
.sort()
|
|
76
|
-
.map((id) => this.getSnapshot(id))
|
|
77
|
-
.filter(Boolean);
|
|
78
|
-
},
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
function normalizeEvent(event, fallbackId) {
|
|
83
|
-
if (!event || typeof event !== 'object') throw new Error('event object required');
|
|
84
|
-
const id = event.id || fallbackId;
|
|
85
|
-
if (!id || typeof id !== 'string') throw new Error('event id required');
|
|
86
|
-
if (!event.type || typeof event.type !== 'string') throw new Error('event type required');
|
|
87
|
-
return { ...event, id };
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
function getJournalPath(rootDir, id) {
|
|
91
|
-
return path.join(rootDir, safeSessionId(id) + '.jsonl');
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
function getSnapshotPath(rootDir, id) {
|
|
95
|
-
return path.join(rootDir, safeSessionId(id) + '.snapshot.json');
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
function safeSessionId(id) {
|
|
99
|
-
if (!/^[A-Za-z0-9_-]{1,128}$/.test(id)) throw new Error('invalid session id: ' + id);
|
|
100
|
-
return id;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
function baseSnapshot(id) {
|
|
104
|
-
return {
|
|
105
|
-
id,
|
|
106
|
-
phase: 'new',
|
|
107
|
-
pageUrl: null,
|
|
108
|
-
sourceFile: null,
|
|
109
|
-
previewFile: null,
|
|
110
|
-
previewMode: null,
|
|
111
|
-
expectedVariants: 0,
|
|
112
|
-
arrivedVariants: 0,
|
|
113
|
-
visibleVariant: null,
|
|
114
|
-
paramValues: {},
|
|
115
|
-
pendingEventSeq: null,
|
|
116
|
-
pendingEvent: null,
|
|
117
|
-
deliveryLease: null,
|
|
118
|
-
checkpointRevision: 0,
|
|
119
|
-
activeOwner: null,
|
|
120
|
-
sourceMarkers: {},
|
|
121
|
-
fallbackMode: null,
|
|
122
|
-
annotationArtifacts: [],
|
|
123
|
-
diagnostics: [],
|
|
124
|
-
updatedAt: null,
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
function rebuildSnapshotFromJournal(journalPath, id) {
|
|
129
|
-
let snapshot = baseSnapshot(id);
|
|
130
|
-
const diagnostics = [];
|
|
131
|
-
let nextSeq = 1;
|
|
132
|
-
if (!fs.existsSync(journalPath)) return { snapshot, diagnostics, nextSeq };
|
|
133
|
-
|
|
134
|
-
const lines = fs.readFileSync(journalPath, 'utf-8').split('\n');
|
|
135
|
-
for (let i = 0; i < lines.length; i++) {
|
|
136
|
-
const line = lines[i];
|
|
137
|
-
if (!line.trim()) continue;
|
|
138
|
-
try {
|
|
139
|
-
const entry = JSON.parse(line);
|
|
140
|
-
if (!entry || typeof entry !== 'object') throw new Error('entry is not object');
|
|
141
|
-
if (Number.isInteger(entry.seq)) nextSeq = Math.max(nextSeq, entry.seq + 1);
|
|
142
|
-
snapshot = applyEvent(snapshot, entry);
|
|
143
|
-
} catch (err) {
|
|
144
|
-
diagnostics.push({
|
|
145
|
-
error: 'journal_parse_failed',
|
|
146
|
-
line: i + 1,
|
|
147
|
-
message: err.message,
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
snapshot.diagnostics = [...snapshot.diagnostics, ...diagnostics];
|
|
152
|
-
return { snapshot, diagnostics, nextSeq };
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
function applyEvent(snapshot, entry, inheritedDiagnostics = []) {
|
|
156
|
-
const event = entry.event || entry;
|
|
157
|
-
const next = {
|
|
158
|
-
...snapshot,
|
|
159
|
-
paramValues: { ...(snapshot.paramValues || {}) },
|
|
160
|
-
sourceMarkers: { ...(snapshot.sourceMarkers || {}) },
|
|
161
|
-
annotationArtifacts: [...(snapshot.annotationArtifacts || [])],
|
|
162
|
-
diagnostics: [...(snapshot.diagnostics || [])],
|
|
163
|
-
updatedAt: entry.ts || new Date().toISOString(),
|
|
164
|
-
};
|
|
165
|
-
|
|
166
|
-
if (inheritedDiagnostics.length && next.diagnostics.length === 0) {
|
|
167
|
-
next.diagnostics = [...inheritedDiagnostics];
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
switch (event.type) {
|
|
171
|
-
case 'generate':
|
|
172
|
-
next.phase = 'generate_requested';
|
|
173
|
-
next.pageUrl = event.pageUrl ?? next.pageUrl;
|
|
174
|
-
next.expectedVariants = event.count ?? next.expectedVariants;
|
|
175
|
-
next.pendingEventSeq = entry.seq ?? next.pendingEventSeq;
|
|
176
|
-
next.pendingEvent = toPendingEvent(event);
|
|
177
|
-
if (event.screenshotPath) upsertArtifact(next.annotationArtifacts, { type: 'screenshot', path: event.screenshotPath });
|
|
178
|
-
break;
|
|
179
|
-
case 'variants_ready':
|
|
180
|
-
case 'agent_done':
|
|
181
|
-
next.phase = event.carbonize === true ? 'carbonize_required' : 'variants_ready';
|
|
182
|
-
next.sourceFile = event.sourceFile ?? event.file ?? next.sourceFile;
|
|
183
|
-
next.previewFile = event.previewFile ?? next.previewFile;
|
|
184
|
-
next.previewMode = event.previewMode ?? next.previewMode;
|
|
185
|
-
next.arrivedVariants = event.arrivedVariants ?? (next.expectedVariants || next.arrivedVariants || 0);
|
|
186
|
-
next.pendingEventSeq = null;
|
|
187
|
-
next.pendingEvent = null;
|
|
188
|
-
if (event.carbonize === true) {
|
|
189
|
-
next.diagnostics.push({
|
|
190
|
-
error: 'carbonize_cleanup_required',
|
|
191
|
-
file: event.file || null,
|
|
192
|
-
message: 'Accepted variant still has carbonize markers that must be folded into source CSS.',
|
|
193
|
-
});
|
|
194
|
-
}
|
|
195
|
-
break;
|
|
196
|
-
case 'checkpoint':
|
|
197
|
-
if (COMPLETED_PHASES.has(next.phase)) {
|
|
198
|
-
next.diagnostics.push({ error: 'checkpoint_after_terminal_ignored', phase: event.phase ?? null, revision: event.revision ?? null });
|
|
199
|
-
break;
|
|
200
|
-
}
|
|
201
|
-
if ((event.revision ?? 0) >= (next.checkpointRevision ?? 0)) {
|
|
202
|
-
next.phase = event.phase ?? next.phase;
|
|
203
|
-
next.checkpointRevision = event.revision ?? next.checkpointRevision;
|
|
204
|
-
next.activeOwner = event.owner ?? next.activeOwner;
|
|
205
|
-
next.arrivedVariants = event.arrivedVariants ?? next.arrivedVariants;
|
|
206
|
-
next.visibleVariant = event.visibleVariant ?? next.visibleVariant;
|
|
207
|
-
next.sourceFile = event.sourceFile ?? next.sourceFile;
|
|
208
|
-
next.previewFile = event.previewFile ?? next.previewFile;
|
|
209
|
-
next.previewMode = event.previewMode ?? next.previewMode;
|
|
210
|
-
if (event.paramValues) next.paramValues = { ...event.paramValues };
|
|
211
|
-
} else {
|
|
212
|
-
next.diagnostics.push({ error: 'stale_checkpoint_ignored', revision: event.revision });
|
|
213
|
-
}
|
|
214
|
-
break;
|
|
215
|
-
case 'accept':
|
|
216
|
-
case 'accept_intent':
|
|
217
|
-
next.phase = 'accept_requested';
|
|
218
|
-
next.visibleVariant = Number(event.variantId ?? next.visibleVariant);
|
|
219
|
-
if (event.paramValues) next.paramValues = { ...event.paramValues };
|
|
220
|
-
next.pendingEventSeq = entry.seq ?? next.pendingEventSeq;
|
|
221
|
-
next.pendingEvent = toPendingEvent(event);
|
|
222
|
-
break;
|
|
223
|
-
case 'manual_edit_apply':
|
|
224
|
-
next.phase = 'manual_edit_apply_requested';
|
|
225
|
-
next.pageUrl = event.pageUrl ?? next.pageUrl;
|
|
226
|
-
next.pendingEventSeq = entry.seq ?? next.pendingEventSeq;
|
|
227
|
-
next.pendingEvent = toPendingEvent(event);
|
|
228
|
-
break;
|
|
229
|
-
case 'steer':
|
|
230
|
-
next.phase = 'steer_requested';
|
|
231
|
-
next.pageUrl = event.pageUrl ?? next.pageUrl;
|
|
232
|
-
next.pendingEventSeq = entry.seq ?? next.pendingEventSeq;
|
|
233
|
-
next.pendingEvent = toPendingEvent(event);
|
|
234
|
-
break;
|
|
235
|
-
case 'steer_done':
|
|
236
|
-
next.phase = 'steer_done';
|
|
237
|
-
next.sourceFile = event.sourceFile ?? event.file ?? next.sourceFile;
|
|
238
|
-
next.previewFile = event.previewFile ?? next.previewFile;
|
|
239
|
-
next.previewMode = event.previewMode ?? next.previewMode;
|
|
240
|
-
next.message = event.message ?? next.message;
|
|
241
|
-
next.pendingEventSeq = null;
|
|
242
|
-
next.pendingEvent = null;
|
|
243
|
-
break;
|
|
244
|
-
case 'discard':
|
|
245
|
-
next.phase = 'discard_requested';
|
|
246
|
-
next.pendingEventSeq = entry.seq ?? next.pendingEventSeq;
|
|
247
|
-
next.pendingEvent = toPendingEvent(event);
|
|
248
|
-
break;
|
|
249
|
-
case 'discarded':
|
|
250
|
-
next.phase = 'discarded';
|
|
251
|
-
next.pendingEventSeq = null;
|
|
252
|
-
next.pendingEvent = null;
|
|
253
|
-
break;
|
|
254
|
-
case 'complete':
|
|
255
|
-
next.phase = 'completed';
|
|
256
|
-
next.sourceFile = event.sourceFile ?? event.file ?? next.sourceFile;
|
|
257
|
-
next.previewFile = event.previewFile ?? next.previewFile;
|
|
258
|
-
next.previewMode = event.previewMode ?? next.previewMode;
|
|
259
|
-
next.pendingEventSeq = null;
|
|
260
|
-
next.pendingEvent = null;
|
|
261
|
-
break;
|
|
262
|
-
case 'agent_error':
|
|
263
|
-
next.phase = 'agent_error';
|
|
264
|
-
next.pendingEventSeq = null;
|
|
265
|
-
next.pendingEvent = null;
|
|
266
|
-
next.diagnostics.push({ error: 'agent_error', message: event.message || 'unknown agent error' });
|
|
267
|
-
break;
|
|
268
|
-
default:
|
|
269
|
-
next.diagnostics.push({ error: 'unknown_event_type', type: event.type });
|
|
270
|
-
break;
|
|
271
|
-
}
|
|
272
|
-
return next;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
function toPendingEvent(event) {
|
|
276
|
-
const pending = { ...event };
|
|
277
|
-
delete pending.token;
|
|
278
|
-
return pending;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
function upsertArtifact(artifacts, artifact) {
|
|
282
|
-
if (!artifacts.some((existing) => existing.path === artifact.path && existing.type === artifact.type)) {
|
|
283
|
-
artifacts.push(artifact);
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
function writeSnapshot(snapshotPath, snapshot) {
|
|
288
|
-
fs.writeFileSync(snapshotPath, JSON.stringify(snapshot, null, 2) + '\n');
|
|
289
|
-
}
|