refactor: rename teacher/student to optimizer/target, remove best skills, fix slow update

- Rename teacher -> optimizer, student -> target across all code, configs, docs, prompts
- CLI: --teacher_model -> --optimizer_model, --student_model -> --target_model
- Remove best_skill files, keep only initial skills
- Fix slow update gate (force write into skill)
- Fix SLOW_UPDATE marker stripping
- Remove deep_reflect and meta_reflect mechanisms
- Update .env.example with export prefix and azure_cli docs
- Add endpoint empty validation in azure_openai.py

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Cuzyoung
2026-05-24 19:15:03 +00:00
parent 6e165d5347
commit 4a1b984d87
70 changed files with 1083 additions and 2068 deletions
+2 -2
View File
@@ -10,7 +10,7 @@ the batch and propose a concise set of skill-revision suggestions.
2. Identify the most prevalent, systematic failure patterns across them.
3. For each pattern, classify its failure type.
4. Propose revision suggestions that address the COMMON patterns, not individual edge cases.
5. Suggestions must be generalizable and should help a later teacher rewrite the full skill document.
5. Suggestions must be generalizable and should help a later optimizer rewrite the full skill document.
6. Do not hardcode task-specific values.
You will be told the maximum number of suggestions (the budget L). Produce AT MOST L suggestions,
@@ -29,7 +29,7 @@ Respond ONLY with a valid JSON object (no markdown fences, no extra text):
"type": "add_rule|remove_rule|merge_rules|reorganize|compress|clarify",
"title": "<short title>",
"motivation": "<why this matters>",
"instruction": "<what the rewriting teacher should change in the skill>",
"instruction": "<what the rewriting optimizer should change in the skill>",
"priority_hint": "high|medium|low"
}
]
+1 -1
View File
@@ -24,7 +24,7 @@ Respond ONLY with a valid JSON object:
"type": "add_rule|remove_rule|merge_rules|reorganize|compress|clarify",
"title": "<short title>",
"motivation": "<why this matters>",
"instruction": "<what the rewriting teacher should change in the skill>",
"instruction": "<what the rewriting optimizer should change in the skill>",
"priority_hint": "high|medium|low"
}
]
+2 -2
View File
@@ -7,7 +7,7 @@ Merge guidelines:
2. Resolve conflicts by keeping the more general, better-justified direction.
3. Preserve unique high-impact corrective insights.
4. Suggestions supported by many source patches should receive higher support_count.
5. The output suggestions should help a later teacher rewrite the full skill.
5. The output suggestions should help a later optimizer rewrite the full skill.
Respond ONLY with a valid JSON object:
{
@@ -17,7 +17,7 @@ Respond ONLY with a valid JSON object:
"type": "add_rule|remove_rule|merge_rules|reorganize|compress|clarify",
"title": "<short title>",
"motivation": "<why this matters>",
"instruction": "<what the rewriting teacher should change in the skill>",
"instruction": "<what the rewriting optimizer should change in the skill>",
"priority_hint": "high|medium|low",
"support_count": <integer>,
"source_type": "failure"
+1 -1
View File
@@ -16,7 +16,7 @@ Respond ONLY with a valid JSON object:
"type": "add_rule|remove_rule|merge_rules|reorganize|compress|clarify",
"title": "<short title>",
"motivation": "<why this matters>",
"instruction": "<what the rewriting teacher should change in the skill>",
"instruction": "<what the rewriting optimizer should change in the skill>",
"priority_hint": "high|medium|low",
"support_count": <integer>,
"source_type": "failure|success"
+2 -2
View File
@@ -6,7 +6,7 @@ Merge guidelines:
1. Deduplicate overlapping success patterns.
2. Be conservative: only keep suggestions that reinforce useful behavior not already well-covered.
3. Suggestions supported by many source patches should receive higher support_count.
4. The output suggestions should help a later teacher rewrite the full skill.
4. The output suggestions should help a later optimizer rewrite the full skill.
Respond ONLY with a valid JSON object:
{
@@ -16,7 +16,7 @@ Respond ONLY with a valid JSON object:
"type": "add_rule|remove_rule|merge_rules|reorganize|compress|clarify",
"title": "<short title>",
"motivation": "<why this matters>",
"instruction": "<what the rewriting teacher should change in the skill>",
"instruction": "<what the rewriting optimizer should change in the skill>",
"priority_hint": "high|medium|low",
"support_count": <integer>,
"source_type": "success"
+10 -10
View File
@@ -1,19 +1,19 @@
You are a teacher-coach for an AI agent skill optimization system.
You are a optimizer-coach for an AI agent skill optimization system.
Your job is not to solve tasks directly and not to write student-facing skill
rules. Your job is to write a compact TEACHER-SIDE memory that helps future
teacher calls produce better skill edits in this environment.
Your job is not to solve tasks directly and not to write target-facing skill
rules. Your job is to write a compact OPTIMIZER-SIDE memory that helps future
optimizer calls produce better skill edits in this environment.
## What You Receive
1. The previous epoch's last-step skill.
2. The current epoch's last-step skill.
3. A longitudinal comparison on the SAME sampled tasks under those two skills.
4. The previous teacher meta skill, if one existed.
4. The previous optimizer meta skill, if one existed.
## Your Goal
Write a concise meta skill that improves future teacher behavior in stages such
Write a concise meta skill that improves future optimizer behavior in stages such
as failure analysis, success analysis, patch merging, and edit ranking.
This meta skill should capture things like:
@@ -21,20 +21,20 @@ This meta skill should capture things like:
- Which kinds of edits tend to be too vague, redundant, brittle, or harmful.
- What level of abstraction works best for rules here.
- What failure-repair patterns should be prioritized.
- What regression risks future teacher calls should guard against.
- What regression risks future optimizer calls should guard against.
## Important Constraints
- Address the FUTURE TEACHER directly, not the student.
- Address the FUTURE OPTIMIZER directly, not the target.
- Focus on how to write better edits and organize better skill updates.
- Use evidence from the adjacent-epoch comparison, not generic advice.
- Keep it compact and high-signal. Prefer a few durable principles.
- Revise or remove parts of the previous meta skill if they did not help.
- Do not output student-facing task instructions.
- Do not output target-facing task instructions.
- Do not restate the whole skill; summarize editing strategy.
Respond ONLY with a valid JSON object:
{
"reasoning": "<brief reflection on what editing directions helped or hurt>",
"meta_skill_content": "<compact teacher-side guidance for future edit generation and selection>"
"meta_skill_content": "<compact optimizer-side guidance for future edit generation and selection>"
}
+1 -1
View File
@@ -1,4 +1,4 @@
You are an expert skill-optimization teacher. You receive a skill document and a pool
You are an expert skill-optimization optimizer. You receive a skill document and a pool
of proposed edits. Your job is to RANK the edits by importance and select the top ones.
Ranking criteria (in order of priority):
+2 -2
View File
@@ -1,11 +1,11 @@
You are an expert skill-optimization teacher. You receive a skill document and a pool
You are an expert skill-optimization optimizer. You receive a skill document and a pool
of revise_suggestions that will later be used to rewrite the full skill document.
Rank the suggestions by importance and select the top ones.
Ranking criteria:
1. Systematic impact on recurring failures or strong reusable successes
2. Complementarity with the current skill
3. Rewrite utility: how much the suggestion helps a later teacher improve structure, clarity, or coverage
3. Rewrite utility: how much the suggestion helps a later optimizer improve structure, clarity, or coverage
4. Generality and actionability
Respond ONLY with a valid JSON object:
+2 -2
View File
@@ -4,7 +4,7 @@ You will receive:
1. The current skill document
2. A selected set of revise_suggestions distilled from trajectory analysis
Your job is to rewrite the FULL student skill document so it incorporates the
Your job is to rewrite the FULL target skill document so it incorporates the
selected suggestions coherently.
Hard requirements:
@@ -12,7 +12,7 @@ Hard requirements:
2. Keep effective existing guidance unless a selected suggestion clearly says to remove or merge it.
3. Prefer consolidation and clarity over making the document longer.
4. Do not hardcode benchmark-specific answers, entity names, file paths, or gold values.
5. Preserve the skill's scope: general reusable behavioral guidance for the student.
5. Preserve the skill's scope: general reusable behavioral guidance for the target.
6. Do not modify content inside the protected slow-update block between
<!-- SLOW_UPDATE_START --> and <!-- SLOW_UPDATE_END --> except to keep it intact.
7. The rewritten skill should be concise, internally consistent, and better organized than the original.
+3 -3
View File
@@ -41,16 +41,16 @@ all subsequent step-level optimization — only you can overwrite it at the next
epoch boundary.
Your guidance must:
- Be written as **direct, actionable instructions** to the student model
- Be written as **direct, actionable instructions** to the target model
(the AI agent that will read and follow the skill).
- Focus on helping the student get problems RIGHT — not on analysis or
- Focus on helping the target get problems RIGHT — not on analysis or
explanation of what went wrong.
- Prioritize: (1) preventing regressions, (2) fixing persistent failures,
(3) reinforcing successful patterns.
- Be concise but comprehensive — you have no length limit, but every sentence
should earn its place.
- NOT duplicate content already in the main skill body — complement it.
- Address the student directly (e.g., "When you encounter X, always do Y"
- Address the target directly (e.g., "When you encounter X, always do Y"
rather than "The agent should...").
Respond ONLY with a valid JSON object (no markdown fences, no extra text):