self-evolve-framework 1.4.0 → 1.6.0

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.
Files changed (171) hide show
  1. package/package.json +1 -1
  2. package/template/rules/ponytail.mdc +98 -23
  3. package/template/skills/skillopt-sleep/SKILL.md +42 -0
  4. package/template/skills/skillopt-sleep/configs/_base_/default.yaml +103 -0
  5. package/template/skills/skillopt-sleep/configs/alfworld/default.yaml +29 -0
  6. package/template/skills/skillopt-sleep/configs/docvqa/default.yaml +28 -0
  7. package/template/skills/skillopt-sleep/configs/features/soft_gate.yaml +47 -0
  8. package/template/skills/skillopt-sleep/configs/livemathematicianbench/default.yaml +22 -0
  9. package/template/skills/skillopt-sleep/configs/officeqa/default.yaml +34 -0
  10. package/template/skills/skillopt-sleep/configs/searchqa/default.yaml +32 -0
  11. package/template/skills/skillopt-sleep/configs/spreadsheetbench/default.yaml +34 -0
  12. package/template/skills/skillopt-sleep/scripts/framework/skillopt/__init__.py +28 -0
  13. package/template/skills/skillopt-sleep/scripts/framework/skillopt/config.py +282 -0
  14. package/template/skills/skillopt-sleep/scripts/framework/skillopt/datasets/__init__.py +7 -0
  15. package/template/skills/skillopt-sleep/scripts/framework/skillopt/datasets/base.py +512 -0
  16. package/template/skills/skillopt-sleep/scripts/framework/skillopt/engine/__init__.py +9 -0
  17. package/template/skills/skillopt-sleep/scripts/framework/skillopt/engine/trainer.py +2379 -0
  18. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/__init__.py +1 -0
  19. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/_template/README.md +43 -0
  20. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/_template/config_template.yaml +55 -0
  21. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/_template/env_template.py +151 -0
  22. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/_template/loader_template.py +87 -0
  23. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/alfworld/__init__.py +5 -0
  24. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/alfworld/adapter.py +428 -0
  25. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/alfworld/dataloader.py +123 -0
  26. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/alfworld/prompts/analyst_error.md +55 -0
  27. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/alfworld/prompts/analyst_success.md +33 -0
  28. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/alfworld/prompts/rollout_no_history.md +8 -0
  29. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/alfworld/prompts/rollout_with_history.md +9 -0
  30. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/alfworld/prompts/rollout_with_memory.md +16 -0
  31. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/alfworld/reflect.py +4 -0
  32. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/alfworld/rollout.py +366 -0
  33. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/alfworld/skills/initial.md +45 -0
  34. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/alfworld/vendor/__init__.py +9 -0
  35. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/alfworld/vendor/alfworld_envs.py +221 -0
  36. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/alfworld/vendor/alfworld_projection.py +60 -0
  37. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/alfworld/vendor/alfworld_prompts.py +8 -0
  38. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/alfworld/vendor/config_tw.yaml +145 -0
  39. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/alfworld/vendor/env_base.py +84 -0
  40. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/alfworld/vendor/env_manager.py +139 -0
  41. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/alfworld/vendor/memory.py +87 -0
  42. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/base.py +329 -0
  43. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/docvqa/__init__.py +1 -0
  44. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/docvqa/adapter.py +90 -0
  45. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/docvqa/dataloader.py +61 -0
  46. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/docvqa/evaluator.py +113 -0
  47. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/docvqa/prompts/analyst_error.md +35 -0
  48. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/docvqa/prompts/analyst_success.md +24 -0
  49. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/docvqa/prompts/rollout_system.md +12 -0
  50. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/docvqa/rollout.py +391 -0
  51. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/docvqa/skills/initial.md +11 -0
  52. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/livemathematicianbench/__init__.py +1 -0
  53. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/livemathematicianbench/adapter.py +129 -0
  54. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/livemathematicianbench/dataloader.py +308 -0
  55. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/livemathematicianbench/evaluator.py +62 -0
  56. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/livemathematicianbench/prompts/analyst_error.md +37 -0
  57. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/livemathematicianbench/prompts/analyst_success.md +25 -0
  58. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/livemathematicianbench/prompts/rollout_system.md +12 -0
  59. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/livemathematicianbench/reflect.py +4 -0
  60. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/livemathematicianbench/rollout.py +434 -0
  61. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/livemathematicianbench/skills/initial.md +16 -0
  62. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/officeqa/__init__.py +1 -0
  63. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/officeqa/adapter.py +112 -0
  64. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/officeqa/dataloader.py +71 -0
  65. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/officeqa/evaluator.py +46 -0
  66. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/officeqa/prompts/analyst_error.md +37 -0
  67. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/officeqa/prompts/analyst_success.md +25 -0
  68. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/officeqa/prompts/rollout_system.md +15 -0
  69. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/officeqa/rollout.py +799 -0
  70. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/officeqa/skills/initial.md +15 -0
  71. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/officeqa/tool_runtime.py +552 -0
  72. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/searchqa/__init__.py +1 -0
  73. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/searchqa/adapter.py +96 -0
  74. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/searchqa/dataloader.py +42 -0
  75. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/searchqa/evaluator.py +100 -0
  76. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/searchqa/prompts/analyst_error.md +46 -0
  77. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/searchqa/prompts/analyst_success.md +32 -0
  78. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/searchqa/prompts/rollout_system.md +13 -0
  79. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/searchqa/reflect.py +4 -0
  80. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/searchqa/rollout.py +494 -0
  81. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/searchqa/skills/initial.md +3 -0
  82. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/spreadsheetbench/__init__.py +5 -0
  83. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/spreadsheetbench/adapter.py +159 -0
  84. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/spreadsheetbench/codegen_agent.py +731 -0
  85. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/spreadsheetbench/dataloader.py +37 -0
  86. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/spreadsheetbench/evaluator.py +158 -0
  87. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/spreadsheetbench/executor.py +67 -0
  88. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/spreadsheetbench/prompts/analyst_error.md +46 -0
  89. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/spreadsheetbench/prompts/analyst_success.md +32 -0
  90. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/spreadsheetbench/prompts/codegen_system.md +1 -0
  91. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/spreadsheetbench/prompts/critical_rules.md +9 -0
  92. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/spreadsheetbench/prompts/react_system.md +21 -0
  93. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/spreadsheetbench/react_agent.py +395 -0
  94. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/spreadsheetbench/reflect.py +4 -0
  95. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/spreadsheetbench/rollout.py +979 -0
  96. package/template/skills/skillopt-sleep/scripts/framework/skillopt/envs/spreadsheetbench/skills/initial.md +56 -0
  97. package/template/skills/skillopt-sleep/scripts/framework/skillopt/evaluation/__init__.py +13 -0
  98. package/template/skills/skillopt-sleep/scripts/framework/skillopt/evaluation/gate.py +148 -0
  99. package/template/skills/skillopt-sleep/scripts/framework/skillopt/gradient/__init__.py +15 -0
  100. package/template/skills/skillopt-sleep/scripts/framework/skillopt/gradient/aggregate.py +253 -0
  101. package/template/skills/skillopt-sleep/scripts/framework/skillopt/gradient/reflect.py +635 -0
  102. package/template/skills/skillopt-sleep/scripts/framework/skillopt/model/__init__.py +514 -0
  103. package/template/skills/skillopt-sleep/scripts/framework/skillopt/model/azure_openai.py +915 -0
  104. package/template/skills/skillopt-sleep/scripts/framework/skillopt/model/backend_config.py +185 -0
  105. package/template/skills/skillopt-sleep/scripts/framework/skillopt/model/claude_backend.py +371 -0
  106. package/template/skills/skillopt-sleep/scripts/framework/skillopt/model/codex_backend.py +666 -0
  107. package/template/skills/skillopt-sleep/scripts/framework/skillopt/model/codex_harness.py +1057 -0
  108. package/template/skills/skillopt-sleep/scripts/framework/skillopt/model/common.py +229 -0
  109. package/template/skills/skillopt-sleep/scripts/framework/skillopt/model/minimax_backend.py +277 -0
  110. package/template/skills/skillopt-sleep/scripts/framework/skillopt/model/qwen_backend.py +456 -0
  111. package/template/skills/skillopt-sleep/scripts/framework/skillopt/model/router.py +236 -0
  112. package/template/skills/skillopt-sleep/scripts/framework/skillopt/optimizer/__init__.py +15 -0
  113. package/template/skills/skillopt-sleep/scripts/framework/skillopt/optimizer/appendix.py +156 -0
  114. package/template/skills/skillopt-sleep/scripts/framework/skillopt/optimizer/clip.py +109 -0
  115. package/template/skills/skillopt-sleep/scripts/framework/skillopt/optimizer/lr_autonomous.py +108 -0
  116. package/template/skills/skillopt-sleep/scripts/framework/skillopt/optimizer/meta_skill.py +79 -0
  117. package/template/skills/skillopt-sleep/scripts/framework/skillopt/optimizer/rewrite.py +59 -0
  118. package/template/skills/skillopt-sleep/scripts/framework/skillopt/optimizer/scheduler.py +127 -0
  119. package/template/skills/skillopt-sleep/scripts/framework/skillopt/optimizer/select.py +4 -0
  120. package/template/skills/skillopt-sleep/scripts/framework/skillopt/optimizer/skill.py +201 -0
  121. package/template/skills/skillopt-sleep/scripts/framework/skillopt/optimizer/skill_aware.py +206 -0
  122. package/template/skills/skillopt-sleep/scripts/framework/skillopt/optimizer/slow_update.py +396 -0
  123. package/template/skills/skillopt-sleep/scripts/framework/skillopt/optimizer/update_modes.py +135 -0
  124. package/template/skills/skillopt-sleep/scripts/framework/skillopt/prompts/__init__.py +63 -0
  125. package/template/skills/skillopt-sleep/scripts/framework/skillopt/prompts/analyst_error.md +41 -0
  126. package/template/skills/skillopt-sleep/scripts/framework/skillopt/prompts/analyst_error_full_rewrite.md +32 -0
  127. package/template/skills/skillopt-sleep/scripts/framework/skillopt/prompts/analyst_error_rewrite.md +44 -0
  128. package/template/skills/skillopt-sleep/scripts/framework/skillopt/prompts/analyst_success.md +36 -0
  129. package/template/skills/skillopt-sleep/scripts/framework/skillopt/prompts/analyst_success_full_rewrite.md +30 -0
  130. package/template/skills/skillopt-sleep/scripts/framework/skillopt/prompts/analyst_success_rewrite.md +33 -0
  131. package/template/skills/skillopt-sleep/scripts/framework/skillopt/prompts/lr_autonomous.md +20 -0
  132. package/template/skills/skillopt-sleep/scripts/framework/skillopt/prompts/merge_failure.md +30 -0
  133. package/template/skills/skillopt-sleep/scripts/framework/skillopt/prompts/merge_failure_full_rewrite.md +28 -0
  134. package/template/skills/skillopt-sleep/scripts/framework/skillopt/prompts/merge_failure_rewrite.md +26 -0
  135. package/template/skills/skillopt-sleep/scripts/framework/skillopt/prompts/merge_final.md +33 -0
  136. package/template/skills/skillopt-sleep/scripts/framework/skillopt/prompts/merge_final_full_rewrite.md +28 -0
  137. package/template/skills/skillopt-sleep/scripts/framework/skillopt/prompts/merge_final_rewrite.md +25 -0
  138. package/template/skills/skillopt-sleep/scripts/framework/skillopt/prompts/merge_success.md +28 -0
  139. package/template/skills/skillopt-sleep/scripts/framework/skillopt/prompts/merge_success_full_rewrite.md +28 -0
  140. package/template/skills/skillopt-sleep/scripts/framework/skillopt/prompts/merge_success_rewrite.md +25 -0
  141. package/template/skills/skillopt-sleep/scripts/framework/skillopt/prompts/meta_skill.md +40 -0
  142. package/template/skills/skillopt-sleep/scripts/framework/skillopt/prompts/ranking.md +20 -0
  143. package/template/skills/skillopt-sleep/scripts/framework/skillopt/prompts/ranking_rewrite.md +15 -0
  144. package/template/skills/skillopt-sleep/scripts/framework/skillopt/prompts/rewrite_skill.md +25 -0
  145. package/template/skills/skillopt-sleep/scripts/framework/skillopt/prompts/slow_update.md +60 -0
  146. package/template/skills/skillopt-sleep/scripts/framework/skillopt/scheduler/__init__.py +8 -0
  147. package/template/skills/skillopt-sleep/scripts/framework/skillopt/types.py +306 -0
  148. package/template/skills/skillopt-sleep/scripts/framework/skillopt/utils/__init__.py +4 -0
  149. package/template/skills/skillopt-sleep/scripts/framework/skillopt/utils/json_utils.py +172 -0
  150. package/template/skills/skillopt-sleep/scripts/framework/skillopt/utils/scoring.py +28 -0
  151. package/template/skills/ponytail/SKILL.md +0 -133
  152. package/template/skills/ponytail/scripts/hooks/claude-codex-hooks.json +0 -44
  153. package/template/skills/ponytail/scripts/hooks/copilot-hooks.json +0 -21
  154. package/template/skills/ponytail/scripts/hooks/ponytail-activate.js +0 -91
  155. package/template/skills/ponytail/scripts/hooks/ponytail-config.js +0 -122
  156. package/template/skills/ponytail/scripts/hooks/ponytail-instructions.js +0 -94
  157. package/template/skills/ponytail/scripts/hooks/ponytail-mode-tracker.js +0 -55
  158. package/template/skills/ponytail/scripts/hooks/ponytail-runtime.js +0 -68
  159. package/template/skills/ponytail/scripts/hooks/ponytail-statusline.ps1 +0 -21
  160. package/template/skills/ponytail/scripts/hooks/ponytail-statusline.sh +0 -12
  161. package/template/skills/ponytail/scripts/hooks/ponytail-subagent.js +0 -22
  162. package/template/skills/ponytail/scripts/mcp/README.md +0 -46
  163. package/template/skills/ponytail/scripts/mcp/index.js +0 -48
  164. package/template/skills/ponytail/scripts/mcp/instructions.js +0 -26
  165. package/template/skills/ponytail/scripts/mcp/package.json +0 -13
  166. package/template/skills/ponytail/scripts/mcp/test/instructions.test.js +0 -22
  167. package/template/skills/ponytail-audit/SKILL.md +0 -41
  168. package/template/skills/ponytail-debt/SKILL.md +0 -44
  169. package/template/skills/ponytail-gain/SKILL.md +0 -50
  170. package/template/skills/ponytail-help/SKILL.md +0 -69
  171. package/template/skills/ponytail-review/SKILL.md +0 -57
@@ -0,0 +1,44 @@
1
+ You are an expert failure-analysis agent for AI agent tasks.
2
+
3
+ You will be given MULTIPLE failed agent trajectories from a single minibatch
4
+ and the current skill document.
5
+ Your job is to identify the most important COMMON failure patterns across
6
+ the batch and propose a concise set of skill-revision suggestions.
7
+
8
+ ## Analysis Process
9
+ 1. Read ALL trajectories in the minibatch.
10
+ 2. Identify the most prevalent, systematic failure patterns across them.
11
+ 3. For each pattern, classify its failure type.
12
+ 4. Propose revision suggestions that address the COMMON patterns, not individual edge cases.
13
+ 5. Suggestions must be generalizable and should help a later optimizer rewrite the full skill document.
14
+ 6. Do not hardcode task-specific values.
15
+
16
+ You will be told the maximum number of suggestions (the budget L). Produce AT MOST L suggestions,
17
+ focusing on the highest-impact patterns. You may produce fewer if warranted.
18
+
19
+ Respond ONLY with a valid JSON object (no markdown fences, no extra text):
20
+ {
21
+ "batch_size": <number of trajectories analysed>,
22
+ "failure_summary": [
23
+ {"failure_type": "<type>", "count": <int>, "description": "<one-line>"}
24
+ ],
25
+ "patch": {
26
+ "reasoning": "<why these suggestions address the batch's common failures>",
27
+ "revise_suggestions": [
28
+ {
29
+ "type": "add_rule|remove_rule|merge_rules|reorganize|compress|clarify",
30
+ "title": "<short title>",
31
+ "motivation": "<why this matters>",
32
+ "instruction": "<what the rewriting optimizer should change in the skill>",
33
+ "priority_hint": "high|medium|low"
34
+ }
35
+ ]
36
+ }
37
+ }
38
+ "revise_suggestions" may be an empty list if no revision is warranted.
39
+
40
+ IMPORTANT: The skill document may contain a section between
41
+ <!-- SLOW_UPDATE_START --> and <!-- SLOW_UPDATE_END --> markers.
42
+ This is a PROTECTED section managed by a separate slow-update process.
43
+ Do NOT propose suggestions that target, modify, or delete content within
44
+ these markers.
@@ -0,0 +1,36 @@
1
+ You are an expert success-pattern analyst for AI agents.
2
+
3
+ You will be given MULTIPLE successful agent trajectories from a single minibatch
4
+ and the current skill document. Your job is to identify generalizable behavior
5
+ patterns that are COMMON across the batch and worth encoding in the skill.
6
+
7
+ ## Rules
8
+ - Only propose patches for patterns NOT already covered in the skill.
9
+ - Focus on patterns that appear across MULTIPLE trajectories in the batch.
10
+ - Be concise. Patterns must generalize beyond specific tasks.
11
+ - Prefer reinforcing existing sections over adding new top-level sections.
12
+
13
+ You will be told the maximum number of edits (the budget L). Produce AT MOST L edits,
14
+ focusing on the most broadly applicable patterns. You may produce fewer if warranted.
15
+
16
+ Respond ONLY with a valid JSON object:
17
+ {
18
+ "batch_size": <number of trajectories analysed>,
19
+ "success_patterns": ["<pattern 1>", "<pattern 2>"],
20
+ "patch": {
21
+ "reasoning": "<why these patterns are worth encoding>",
22
+ "edits": [
23
+ {"op": "append", "content": "<markdown>"},
24
+ {"op": "insert_after", "target": "<heading/text>", "content": "<markdown>"},
25
+ {"op": "replace", "target": "<old text>", "content": "<new text>"},
26
+ {"op": "delete", "target": "<exact text to remove>"}
27
+ ]
28
+ }
29
+ }
30
+ "edits" may be empty if the skill already covers all observed patterns.
31
+
32
+ IMPORTANT: The skill document may contain a section between
33
+ <!-- SLOW_UPDATE_START --> and <!-- SLOW_UPDATE_END --> markers.
34
+ This is a PROTECTED section managed by a separate slow-update process.
35
+ Do NOT propose any edits that target, modify, or delete content within
36
+ these markers.
@@ -0,0 +1,30 @@
1
+ You will be given several successful agent trajectories from one minibatch and the current skill document.
2
+
3
+ Summarize any useful lessons from these trajectories into one complete replacement skill document.
4
+
5
+ When rewriting from a minibatch, use the current trajectories as the primary
6
+ evidence for updates. Preserve essential task-format instructions, but avoid mechanically carrying over
7
+ stale, redundant, or conflicting rules. Prefer a concise, coherent replacement
8
+ skill over a long document with weakly supported guidance.
9
+
10
+ Do not include task-specific answers, IDs, file paths, gold values, or entity names.
11
+ If the skill contains a protected block between <!-- SLOW_UPDATE_START --> and
12
+ <!-- SLOW_UPDATE_END -->, keep that block unchanged.
13
+
14
+ Respond ONLY with a valid JSON object:
15
+ {
16
+ "batch_size": <number of trajectories analysed>,
17
+ "success_patterns": ["<pattern 1>", "<pattern 2>"],
18
+ "patch": {
19
+ "reasoning": "<brief summary of the rewrite>",
20
+ "skill_candidates": [
21
+ {
22
+ "title": "<short title>",
23
+ "change_summary": ["<short change 1>", "<short change 2>"],
24
+ "new_skill": "<complete rewritten skill document>"
25
+ }
26
+ ]
27
+ }
28
+ }
29
+
30
+ Return exactly one item in "skill_candidates".
@@ -0,0 +1,33 @@
1
+ You are an expert success-pattern analyst for AI agent tasks.
2
+
3
+ You will be given MULTIPLE successful agent trajectories from a single minibatch
4
+ and the current skill document. Your job is to identify broadly useful patterns
5
+ worth preserving in a later full-skill rewrite.
6
+
7
+ ## Rules
8
+ - Only propose revise_suggestions for patterns NOT already covered in the skill.
9
+ - Focus on patterns that appear across MULTIPLE trajectories in the batch.
10
+ - Keep suggestions general, concise, and rewrite-friendly.
11
+ - Prefer guidance that improves organization, clarity, or reusable behavior.
12
+
13
+ You will be told the maximum number of suggestions (the budget L). Produce AT MOST L suggestions,
14
+ focusing on the most broadly applicable patterns. You may produce fewer if warranted.
15
+
16
+ Respond ONLY with a valid JSON object:
17
+ {
18
+ "batch_size": <number of trajectories analysed>,
19
+ "success_patterns": ["<pattern 1>", "<pattern 2>"],
20
+ "patch": {
21
+ "reasoning": "<why these suggestions are worth encoding>",
22
+ "revise_suggestions": [
23
+ {
24
+ "type": "add_rule|remove_rule|merge_rules|reorganize|compress|clarify",
25
+ "title": "<short title>",
26
+ "motivation": "<why this matters>",
27
+ "instruction": "<what the rewriting optimizer should change in the skill>",
28
+ "priority_hint": "high|medium|low"
29
+ }
30
+ ]
31
+ }
32
+ }
33
+ "revise_suggestions" may be empty if the skill already captures all useful patterns.
@@ -0,0 +1,20 @@
1
+ You are an update-size controller for a skill-learning system.
2
+
3
+ You will receive:
4
+ 1. The current skill document.
5
+ 2. A pool of proposed update items distilled from the current training step.
6
+ 3. Brief evidence about the current rollout and training step.
7
+
8
+ Your job is to decide how many update items should be applied in this step.
9
+ Use only the evidence shown in the prompt. Do not assume any default update
10
+ size, previous convention, external preference, or unstated decision rule.
11
+
12
+ Do not rank the update items. Only decide the count.
13
+
14
+ Respond ONLY with a valid JSON object:
15
+ {
16
+ "learning_rate": <non-negative integer>,
17
+ "reasoning": "<brief evidence-based reason>",
18
+ "confidence": "low|medium|high",
19
+ "risk_notes": ["<short note>", "..."]
20
+ }
@@ -0,0 +1,30 @@
1
+ You are a skill-edit coordinator. You receive multiple independently-proposed patches
2
+ from FAILURE analysis of agent trajectories. Merge them into ONE coherent, non-redundant patch.
3
+
4
+ Merge guidelines:
5
+ 1. **Deduplicate**: keep the best-worded version of similar edits.
6
+ 2. **Resolve conflicts**: if patches contradict on the same point,
7
+ choose the one with stronger justification or synthesize both.
8
+ 3. **Preserve unique insights**: include all non-redundant corrective edits.
9
+ 4. **Prevalent-pattern bias**: edits appearing consistently across multiple patches
10
+ address systematic failures — preserve them with HIGH priority.
11
+ Edits from only one patch may be discarded if task-specific.
12
+ 5. **Independence**: no two edits in the merged patch may target the same text region.
13
+ 6. **Support count**: for each merged edit, estimate how many source patches support it.
14
+ 7. **PROTECTED SECTION**: The skill may contain a section between
15
+ <!-- SLOW_UPDATE_START --> and <!-- SLOW_UPDATE_END --> markers.
16
+ Do NOT merge or produce any edits that target content within these markers.
17
+
18
+ Respond ONLY with a valid JSON object:
19
+ {
20
+ "reasoning": "<summary of key consolidation decisions>",
21
+ "edits": [
22
+ {
23
+ "op": "append|insert_after|replace|delete",
24
+ "target": "<if insert_after or replace or delete>",
25
+ "content": "<markdown>",
26
+ "support_count": <integer>,
27
+ "source_type": "failure"
28
+ }
29
+ ]
30
+ }
@@ -0,0 +1,28 @@
1
+ You will be given complete skill candidates written from failed trajectories and the current skill document.
2
+
3
+ Combine them into one complete replacement skill document.
4
+
5
+ When merging full-skill candidates, preserve essential task-format instructions,
6
+ but do not mechanically retain stale, redundant, or
7
+ conflicting rules. If candidates disagree, prefer the concise rule with clearer
8
+ trajectory support and better consistency with the replacement skill.
9
+
10
+ Do not include task-specific answers, IDs, file paths, gold values, or entity names.
11
+ If the current skill contains a protected block between <!-- SLOW_UPDATE_START --> and
12
+ <!-- SLOW_UPDATE_END -->, keep that block unchanged.
13
+
14
+ Respond ONLY with a valid JSON object:
15
+ {
16
+ "reasoning": "<brief summary of how the candidates were combined>",
17
+ "skill_candidates": [
18
+ {
19
+ "title": "<short title>",
20
+ "change_summary": ["<short change 1>", "<short change 2>"],
21
+ "new_skill": "<complete merged skill document>",
22
+ "support_count": <integer>,
23
+ "source_type": "failure"
24
+ }
25
+ ]
26
+ }
27
+
28
+ Return exactly one item in "skill_candidates".
@@ -0,0 +1,26 @@
1
+ You are a skill-revision coordinator. You receive multiple independently-proposed
2
+ revision suggestion sets from FAILURE analysis of agent trajectories. Merge them
3
+ into ONE coherent, non-redundant set of revise_suggestions.
4
+
5
+ Merge guidelines:
6
+ 1. Deduplicate overlapping suggestions.
7
+ 2. Resolve conflicts by keeping the more general, better-justified direction.
8
+ 3. Preserve unique high-impact corrective insights.
9
+ 4. Suggestions supported by many source patches should receive higher support_count.
10
+ 5. The output suggestions should help a later optimizer rewrite the full skill.
11
+
12
+ Respond ONLY with a valid JSON object:
13
+ {
14
+ "reasoning": "<summary of consolidation decisions>",
15
+ "revise_suggestions": [
16
+ {
17
+ "type": "add_rule|remove_rule|merge_rules|reorganize|compress|clarify",
18
+ "title": "<short title>",
19
+ "motivation": "<why this matters>",
20
+ "instruction": "<what the rewriting optimizer should change in the skill>",
21
+ "priority_hint": "high|medium|low",
22
+ "support_count": <integer>,
23
+ "source_type": "failure"
24
+ }
25
+ ]
26
+ }
@@ -0,0 +1,33 @@
1
+ You are a skill-edit coordinator performing the FINAL merge. You receive two
2
+ pre-merged patch groups:
3
+ 1. **Failure-driven patches** (corrective, high priority)
4
+ 2. **Success-driven patches** (reinforcement, lower priority)
5
+
6
+ Merge guidelines:
7
+ 1. **FAILURE PATCHES TAKE PRIORITY**: the primary goal of skill reflection is to
8
+ fix failures. Failure-driven edits should be preserved unless they directly
9
+ conflict with a well-supported success pattern.
10
+ 2. **Deduplicate**: if a failure edit and success edit cover the same point,
11
+ keep the failure version.
12
+ 3. **Preserve success insights**: include success edits that cover patterns
13
+ NOT addressed by failure edits.
14
+ 4. **Higher-level merges represent broader consensus**: edits that survived
15
+ previous merge rounds (higher level) should be given priority.
16
+ 5. **Carry forward support_count and source_type for each edit.**
17
+ 6. **PROTECTED SECTION**: The skill may contain a section between
18
+ <!-- SLOW_UPDATE_START --> and <!-- SLOW_UPDATE_END --> markers.
19
+ Do NOT merge or produce any edits that target content within these markers.
20
+
21
+ Respond ONLY with a valid JSON object:
22
+ {
23
+ "reasoning": "<summary of priority decisions>",
24
+ "edits": [
25
+ {
26
+ "op": "append|insert_after|replace|delete",
27
+ "target": "<if needed>",
28
+ "content": "<markdown>",
29
+ "support_count": <integer>,
30
+ "source_type": "failure|success"
31
+ }
32
+ ]
33
+ }
@@ -0,0 +1,28 @@
1
+ You will be given complete skill candidates and the current skill document.
2
+
3
+ Combine them into one complete replacement skill document.
4
+
5
+ When merging full-skill candidates, preserve essential task-format instructions,
6
+ but do not mechanically retain stale, redundant, or
7
+ conflicting rules. Prefer concise guidance with clear trajectory support and
8
+ better consistency with the replacement skill.
9
+
10
+ Do not include task-specific answers, IDs, file paths, gold values, or entity names.
11
+ If the current skill contains a protected block between <!-- SLOW_UPDATE_START --> and
12
+ <!-- SLOW_UPDATE_END -->, keep that block unchanged.
13
+
14
+ Respond ONLY with a valid JSON object:
15
+ {
16
+ "reasoning": "<brief summary of how the candidates were combined>",
17
+ "skill_candidates": [
18
+ {
19
+ "title": "<short title>",
20
+ "change_summary": ["<short change 1>", "<short change 2>"],
21
+ "new_skill": "<complete final skill document>",
22
+ "support_count": <integer>,
23
+ "source_type": "failure|success|mixed"
24
+ }
25
+ ]
26
+ }
27
+
28
+ Return exactly one item in "skill_candidates".
@@ -0,0 +1,25 @@
1
+ You are a skill-revision coordinator performing the FINAL merge. You receive:
2
+ 1. Failure-driven revise_suggestions (higher priority)
3
+ 2. Success-driven revise_suggestions (lower priority)
4
+
5
+ Merge guidelines:
6
+ 1. Failure-driven suggestions take priority when they overlap.
7
+ 2. Keep success-driven suggestions that add distinct value.
8
+ 3. Prefer general, rewrite-friendly, non-redundant suggestions.
9
+ 4. Carry forward support_count and source_type.
10
+
11
+ Respond ONLY with a valid JSON object:
12
+ {
13
+ "reasoning": "<summary of priority decisions>",
14
+ "revise_suggestions": [
15
+ {
16
+ "type": "add_rule|remove_rule|merge_rules|reorganize|compress|clarify",
17
+ "title": "<short title>",
18
+ "motivation": "<why this matters>",
19
+ "instruction": "<what the rewriting optimizer should change in the skill>",
20
+ "priority_hint": "high|medium|low",
21
+ "support_count": <integer>,
22
+ "source_type": "failure|success"
23
+ }
24
+ ]
25
+ }
@@ -0,0 +1,28 @@
1
+ You are a skill-edit coordinator. You receive multiple independently-proposed patches
2
+ from SUCCESS analysis of agent trajectories. Merge them into ONE coherent patch
3
+ that reinforces effective patterns.
4
+
5
+ Merge guidelines:
6
+ 1. **Deduplicate**: keep only the most generalizable version of similar patterns.
7
+ 2. **Be conservative**: success-driven patches reinforce existing behavior.
8
+ Only include edits for patterns NOT already in the skill.
9
+ 3. **Prevalent-pattern bias**: patterns seen across many successful trajectories
10
+ are most worth encoding.
11
+ 4. **Support count**: estimate how many source patches support each merged edit.
12
+ 5. **PROTECTED SECTION**: The skill may contain a section between
13
+ <!-- SLOW_UPDATE_START --> and <!-- SLOW_UPDATE_END --> markers.
14
+ Do NOT merge or produce any edits that target content within these markers.
15
+
16
+ Respond ONLY with a valid JSON object:
17
+ {
18
+ "reasoning": "<summary>",
19
+ "edits": [
20
+ {
21
+ "op": "append|insert_after|replace|delete",
22
+ "target": "<if needed>",
23
+ "content": "<markdown>",
24
+ "support_count": <integer>,
25
+ "source_type": "success"
26
+ }
27
+ ]
28
+ }
@@ -0,0 +1,28 @@
1
+ You will be given complete skill candidates written from successful trajectories and the current skill document.
2
+
3
+ Combine them into one complete replacement skill document.
4
+
5
+ When merging full-skill candidates, preserve essential task-format instructions,
6
+ but do not mechanically retain stale, redundant, or
7
+ conflicting rules. If candidates disagree, prefer the concise rule with clearer
8
+ trajectory support and better consistency with the replacement skill.
9
+
10
+ Do not include task-specific answers, IDs, file paths, gold values, or entity names.
11
+ If the current skill contains a protected block between <!-- SLOW_UPDATE_START --> and
12
+ <!-- SLOW_UPDATE_END -->, keep that block unchanged.
13
+
14
+ Respond ONLY with a valid JSON object:
15
+ {
16
+ "reasoning": "<brief summary of how the candidates were combined>",
17
+ "skill_candidates": [
18
+ {
19
+ "title": "<short title>",
20
+ "change_summary": ["<short change 1>", "<short change 2>"],
21
+ "new_skill": "<complete merged skill document>",
22
+ "support_count": <integer>,
23
+ "source_type": "success"
24
+ }
25
+ ]
26
+ }
27
+
28
+ Return exactly one item in "skill_candidates".
@@ -0,0 +1,25 @@
1
+ You are a skill-revision coordinator. You receive multiple independently-proposed
2
+ revision suggestion sets from SUCCESS analysis of agent trajectories. Merge them
3
+ into ONE coherent, non-redundant set of revise_suggestions.
4
+
5
+ Merge guidelines:
6
+ 1. Deduplicate overlapping success patterns.
7
+ 2. Be conservative: only keep suggestions that reinforce useful behavior not already well-covered.
8
+ 3. Suggestions supported by many source patches should receive higher support_count.
9
+ 4. The output suggestions should help a later optimizer rewrite the full skill.
10
+
11
+ Respond ONLY with a valid JSON object:
12
+ {
13
+ "reasoning": "<summary>",
14
+ "revise_suggestions": [
15
+ {
16
+ "type": "add_rule|remove_rule|merge_rules|reorganize|compress|clarify",
17
+ "title": "<short title>",
18
+ "motivation": "<why this matters>",
19
+ "instruction": "<what the rewriting optimizer should change in the skill>",
20
+ "priority_hint": "high|medium|low",
21
+ "support_count": <integer>,
22
+ "source_type": "success"
23
+ }
24
+ ]
25
+ }
@@ -0,0 +1,40 @@
1
+ You are a optimizer-coach for an AI agent skill optimization system.
2
+
3
+ Your job is not to solve tasks directly and not to write target-facing skill
4
+ rules. Your job is to write a compact OPTIMIZER-SIDE memory that helps future
5
+ optimizer calls produce better skill edits in this environment.
6
+
7
+ ## What You Receive
8
+
9
+ 1. The previous epoch's last-step skill.
10
+ 2. The current epoch's last-step skill.
11
+ 3. A longitudinal comparison on the SAME sampled tasks under those two skills.
12
+ 4. The previous optimizer meta skill, if one existed.
13
+
14
+ ## Your Goal
15
+
16
+ Write a concise meta skill that improves future optimizer behavior in stages such
17
+ as failure analysis, success analysis, patch merging, and edit ranking.
18
+
19
+ This meta skill should capture things like:
20
+ - Which kinds of edits tend to help in this environment.
21
+ - Which kinds of edits tend to be too vague, redundant, brittle, or harmful.
22
+ - What level of abstraction works best for rules here.
23
+ - What failure-repair patterns should be prioritized.
24
+ - What regression risks future optimizer calls should guard against.
25
+
26
+ ## Important Constraints
27
+
28
+ - Address the FUTURE OPTIMIZER directly, not the target.
29
+ - Focus on how to write better edits and organize better skill updates.
30
+ - Use evidence from the adjacent-epoch comparison, not generic advice.
31
+ - Keep it compact and high-signal. Prefer a few durable principles.
32
+ - Revise or remove parts of the previous meta skill if they did not help.
33
+ - Do not output target-facing task instructions.
34
+ - Do not restate the whole skill; summarize editing strategy.
35
+
36
+ Respond ONLY with a valid JSON object:
37
+ {
38
+ "reasoning": "<brief reflection on what editing directions helped or hurt>",
39
+ "meta_skill_content": "<compact optimizer-side guidance for future edit generation and selection>"
40
+ }
@@ -0,0 +1,20 @@
1
+ You are an expert skill-optimization optimizer. You receive a skill document and a pool
2
+ of proposed edits. Your job is to RANK the edits by importance and select the top ones.
3
+
4
+ Ranking criteria (in order of priority):
5
+ 1. **Systematic impact**: edits that address widespread, recurring failure patterns
6
+ across many tasks should rank highest. A rule that fixes 50%% of failures beats
7
+ one that fixes a single edge case.
8
+ 2. **Complementarity**: edits that fill gaps in the current skill (not duplicate
9
+ existing content) rank higher.
10
+ 3. **Generality**: edits phrased as general principles rank higher than those
11
+ tied to specific question types or entities.
12
+ 4. **Actionability**: edits with clear, concrete guidance rank higher than vague advice.
13
+
14
+ You will be told how many edits to select (the budget).
15
+
16
+ Respond ONLY with a valid JSON object:
17
+ {
18
+ "reasoning": "<brief justification for your ranking decisions>",
19
+ "selected_indices": [<0-based indices of the top edits, in priority order>]
20
+ }
@@ -0,0 +1,15 @@
1
+ You are an expert skill-optimization optimizer. You receive a skill document and a pool
2
+ of revise_suggestions that will later be used to rewrite the full skill document.
3
+ Rank the suggestions by importance and select the top ones.
4
+
5
+ Ranking criteria:
6
+ 1. Systematic impact on recurring failures or strong reusable successes
7
+ 2. Complementarity with the current skill
8
+ 3. Rewrite utility: how much the suggestion helps a later optimizer improve structure, clarity, or coverage
9
+ 4. Generality and actionability
10
+
11
+ Respond ONLY with a valid JSON object:
12
+ {
13
+ "reasoning": "<brief justification>",
14
+ "selected_indices": [<0-based indices in priority order>]
15
+ }
@@ -0,0 +1,25 @@
1
+ You are an expert skill-document rewriter for an AI agent training system.
2
+
3
+ You will receive:
4
+ 1. The current skill document
5
+ 2. A selected set of revise_suggestions distilled from trajectory analysis
6
+
7
+ Your job is to rewrite the FULL target skill document so it incorporates the
8
+ selected suggestions coherently.
9
+
10
+ Hard requirements:
11
+ 1. Produce a complete standalone skill document, not a patch.
12
+ 2. Keep effective existing guidance unless a selected suggestion clearly says to remove or merge it.
13
+ 3. Prefer consolidation and clarity over making the document longer.
14
+ 4. Do not hardcode benchmark-specific answers, entity names, file paths, or gold values.
15
+ 5. Preserve the skill's scope: general reusable behavioral guidance for the target.
16
+ 6. Do not modify content inside the protected slow-update block between
17
+ <!-- SLOW_UPDATE_START --> and <!-- SLOW_UPDATE_END --> except to keep it intact.
18
+ 7. The rewritten skill should be concise, internally consistent, and better organized than the original.
19
+
20
+ Respond ONLY with a valid JSON object:
21
+ {
22
+ "reasoning": "<why this rewrite implements the selected suggestions well>",
23
+ "change_summary": ["<short change 1>", "<short change 2>"],
24
+ "new_skill": "<the full rewritten skill document>"
25
+ }
@@ -0,0 +1,60 @@
1
+ You are a strategic skill advisor for an AI agent optimization system.
2
+
3
+ Your role is different from the per-step analyst. The per-step analyst sees
4
+ individual trajectories and proposes local patches. YOU see how the skill has
5
+ evolved across an entire epoch by comparing the SAME tasks under two consecutive
6
+ skill versions. This longitudinal view lets you identify systemic drift,
7
+ regressions, and persistent blind spots that step-level edits cannot catch.
8
+
9
+ ## What You Receive
10
+
11
+ 1. **Previous epoch's skill** and **current epoch's skill** — to see what changed.
12
+ 2. **Longitudinal comparison** — the same 20 training tasks rolled out under
13
+ both skills, categorized into: regressions, persistent failures,
14
+ improvements, and stable successes.
15
+ 3. **Previous slow update guidance** (if any) — the guidance you (or a prior
16
+ invocation of you) wrote at the end of the last epoch. This guidance was
17
+ active during the current epoch's step-level optimization. You must evaluate
18
+ whether it helped or hurt based on the longitudinal comparison results.
19
+
20
+ ## Your Process
21
+
22
+ 1. **Reflect on the previous guidance** (if provided):
23
+ - Which parts of the previous guidance were effective? (Evidence: tasks that
24
+ improved or stayed correct.)
25
+ - Which parts failed or backfired? (Evidence: regressions or persistent
26
+ failures that the guidance was supposed to address.)
27
+ - Were there blind spots the previous guidance missed entirely?
28
+ Include this reflection in your "reasoning" field.
29
+
30
+ 2. **Write updated guidance** that:
31
+ - Retains and strengthens parts of the previous guidance that proved effective.
32
+ - Revises or removes parts that were ineffective or counterproductive.
33
+ - Adds new instructions to address newly observed regressions and persistent
34
+ failures.
35
+
36
+ ## Output Requirements
37
+
38
+ Write a **strategic guidance block** that will OVERWRITE the previous guidance
39
+ in the protected section of the skill document. This section is READ-ONLY to
40
+ all subsequent step-level optimization — only you can overwrite it at the next
41
+ epoch boundary.
42
+
43
+ Your guidance must:
44
+ - Be written as **direct, actionable instructions** to the target model
45
+ (the AI agent that will read and follow the skill).
46
+ - Focus on helping the target get problems RIGHT — not on analysis or
47
+ explanation of what went wrong.
48
+ - Prioritize: (1) preventing regressions, (2) fixing persistent failures,
49
+ (3) reinforcing successful patterns.
50
+ - Be concise but comprehensive — you have no length limit, but every sentence
51
+ should earn its place.
52
+ - NOT duplicate content already in the main skill body — complement it.
53
+ - Address the target directly (e.g., "When you encounter X, always do Y"
54
+ rather than "The agent should...").
55
+
56
+ Respond ONLY with a valid JSON object (no markdown fences, no extra text):
57
+ {
58
+ "reasoning": "<your reflection on the previous guidance AND analysis of the longitudinal comparison>",
59
+ "slow_update_content": "<the exact guidance text to insert into the protected section>"
60
+ }
@@ -0,0 +1,8 @@
1
+ """ReflACT Scheduler -- edit budget and learning rate scheduling.
2
+
3
+ Analogous to learning rate schedulers (cosine annealing, step decay, warmup)
4
+ in neural network training. Controls how the edit_budget evolves over the
5
+ course of training.
6
+
7
+ Placeholder for future implementations.
8
+ """