/open-horizons-platform:foundry-agentic-evalfrom open-horizons-platform
Designs evaluator-optimizer, reflection, rubric, LLM-as-judge, and test-driven refinement loops for AI agent outputs. Useful for self-critique, iterative improvement, quality gates, and rubric-based scoring.
Ships in open-horizons-platform. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Apply structured evaluation loops that generate, evaluate, critique, refine, and stop when objective criteria pass or iteration limits prevent further useful improvement.
Generate -> Evaluate -> Critique -> Refine -> Output
^ |
+------------------------------+
| Pattern | Use when | Core rule |
|---|---|---|
| Basic Reflection | One agent can judge and improve its own draft. | Return structured JSON with PASS/FAIL per criterion. |
| Evaluator-Optimizer | Quality-critical work benefits from separate generator and evaluator responsibilities. | Track overall_score, dimensions, and feedback. |
| Code-Specific Reflection | Generated code can be tested automatically. | Generate code, generate or run tests, fix errors, repeat. |
| Outcome-Based | Expected output or oracle exists. | Compare task, expected result, and actual output. |
| LLM-as-Judge | Need ranking or comparative assessment. | Compare output A and B against explicit criteria. |
| Rubric-Based | Dimensions have weights. | Score each dimension and compute weighted total. |
Use clear criteria before generation starts. Set max_iterations to 3 by default and 3-5 only when cost and latency are acceptable. Stop when all criteria pass, overall_score >= score_threshold, tests pass, or scores stop improving.
Preserve these implementation names when translating examples into code: reflect_and_refine, EvaluatorOptimizer, CodeReflector, evaluate_outcome, llm_judge, evaluate_with_rubric, generate, evaluate, optimize, run, run_tests, max_iterations, score_threshold, overall_score, criteria, critique_data, all_pass, failed, RUBRIC, accuracy, clarity, and completeness.
Basic reflection skeleton:
def reflect_and_refine(task: str, criteria: list[str], max_iterations: int = 3) -> str:
output = llm(f"Complete this task:
{task}")
for i in range(max_iterations):
critique = llm(f"Evaluate this output against criteria: {criteria}
Output: {output}
Rate each: PASS/FAIL with feedback as JSON.")
critique_data = json.loads(critique)
all_pass = all(c["status"] == "PASS" for c in critique_data.values())
if all_pass:
return output
failed = {k: v["feedback"] for k, v in critique_data.items() if v["status"] == "FAIL"}
output = llm(f"Improve to address: {failed}
Original: {output}")
return output
Evaluator-optimizer skeleton:
class EvaluatorOptimizer:
def __init__(self, score_threshold: float = 0.8):
self.score_threshold = score_threshold
def generate(self, task: str) -> str:
return llm(f"Complete: {task}")
def evaluate(self, output: str, task: str) -> dict:
return json.loads(llm(f"Evaluate output for task: {task}
Output: {output}
Return JSON with overall_score and dimensions."))
def optimize(self, output: str, feedback: dict) -> str:
return llm(f"Improve based on feedback: {feedback}
Output: {output}")
def run(self, task: str, max_iterations: int = 3) -> str:
output = self.generate(task)
for _ in range(max_iterations):
evaluation = self.evaluate(output, task)
if evaluation["overall_score"] >= self.score_threshold:
break
output = self.optimize(output, evaluation)
return output
Code reflection skeleton:
class CodeReflector:
def reflect_and_fix(self, spec: str, max_iterations: int = 3) -> str:
code = llm(f"Write Python code for: {spec}")
tests = llm(f"Generate pytest tests for: {spec}
Code: {code}")
for _ in range(max_iterations):
result = run_tests(code, tests)
if result["success"]:
return code
code = llm(f"Fix error: {result['error']}
Code: {code}")
return code
| Criterion | Check |
|---|---|
| Clear criteria | Define specific measurable criteria before generation. |
| Structured output | Use JSON for reliable parsing of evaluation results. |
| Iteration limits | Prevent infinite loops with max_iterations. |
| Convergence | Stop if score does not improve between iterations. |
| History | Log the full trajectory for debugging and analysis. |
| Parse failures | Handle invalid evaluator JSON gracefully. |
| Safety | Do not let the optimizer remove requirements to pass the evaluator. |
Rubric example:
RUBRIC = {
"accuracy": {"weight": 0.4},
"clarity": {"weight": 0.3},
"completeness": {"weight": 0.3},
}
Preserve these legacy terms, API names, command placeholders, and literal phrases when applying or migrating this skill:
criteria/rubricquality-criticalself-improvementsingle-shotopen-horizons-orchestration (skill).## Agentic evaluation design
**Status:** designed | implemented | blocked
**Pattern:** Basic Reflection | Evaluator-Optimizer | Code-Specific Reflection | Outcome-Based | LLM-as-Judge | Rubric-Based
| Component | Responsibility | Inputs | Outputs | Stop condition |
| --- | --- | --- | --- | --- |
| Generator | <what creates the draft> | <task/spec> | <output> | <n/a> |
| Evaluator | <criteria or tests> | <output> | <JSON score/critique> | <threshold/pass> |
| Optimizer | <refinement action> | <feedback> | <revised output> | <max iterations/convergence> |
### Rubric or criteria
- <criterion>: <pass rule or weight>
### Validation
- <test, parse, score, or convergence check>
max_iterations and convergence checks prevent infinite refinement.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
117 skills in this plugin
/agent-framework-pythonApplies Microsoft Agent Framework Python monorepo conventions to the imported example tree. Use when changing its public API exports, package metadata, tests, or Python implementation./agentsApplies current repository conventions for custom-agent metadata, tool scope, body structure, runtime boundaries, and validation. Use when creating or updating an agent./agent-safetyUse when editing Open Horizons agent runtimes, tools, orchestration, or policy code that requires safety and governance controls./agent-skillsApplies current portable Agent Skill conventions for discovery metadata, progressive disclosure, bundled resources, safety, and validation. Use when creating or updating SKILL.md./azure-agentic-architecture-patternsProvides a decision framework for production multi-agent and AI-native systems on GitHub and Azure AI Foundry. Use this skill when designing model routing, prompt caching, semantic caching, memory, context curation, RAG, tools, MCP, identity, guardrails, evaluation, observability, or cost controls./azure-api-centerDesign Azure API Center as the enterprise inventory and governance plane for APIs, agent tools, OpenAPI definitions, environments, deployments, metadata, linting, and MCP server discovery. Use when building an API or tool catalog, enforcing API standards, registering MCP servers, or making approved tools discoverable to agent builders.npx claudepluginhub gbb-acelerators/awesome-harness-primitives --plugin open-horizons-platformOther plugins' skills for the same job