Agent Instructions Evaluator
Overview
Evaluate agent instructions or agent definitions for operational achievability in production settings. This skill focuses on runtime reliability and runtime efficiency rather than writing quality, identifying issues from hidden state, conflicting rules, vague scope, brittle exact phrasing, underspecified tool behavior, instruction overload, and performance friction caused by excessive or contradictory runtime reasoning.
Use this skill when you need:
- A practical evaluation report focused on runtime reliability
- Evidence-backed prompt review with concrete recommendations
- A reusable report artifact that can be shared with reviewers
- Per-dimension scoring that preserves nuance rather than averaging away critical issues
Core Principle
Score the artifact not by how much behavior it describes, but by how much behavior the agent can reliably execute. More rules do not automatically make a better prompt—more rules often lower achievability. An instruction set that is technically understandable but expensive to reconcile at runtime should still be considered lower-achievability, because slow, unstable, or tool-heavy execution reduces production reliability.
Evaluation Workflow
Before beginning analysis, collect all available metadata and context:
Extract agent metadata (if evaluating a YAML file):
python scripts/extract_agent_info.py <agent.yaml> --json
This provides: name, description, collaborators, tools, context variables, guidelines
- Tool:
extract_agent_info.py
Extract tool metadata for each referenced tool or agent collaborator:
- For Python-based tools, JSON-based tools, and YAML-based tools (knowledge bases, MCP toolkits):
python scripts/extract_tool_info.py <tool.py|tool.json|tool.yaml>
This provides: tool signatures, parameters, return types, descriptions
- Tool:
extract_tool_info.py
Identify missing tool definitions: Note which tools/collaborators are referenced but not available for inspection
Organize the data: Create a complete picture of:
- What the agent instructions say
- What tools are actually available
- What parameters those tools accept
- What context variables exist
- What guidelines constrain behavior
Only after gathering all data, proceed to analysis. This ensures:
- Tool grounding assessment is based on actual tool signatures, not assumptions
- Execution feasibility is evaluated against real capabilities
- Recommendations are specific and actionable
If the input is partial, state that the evaluation scope is partial and score only what is visible.
Processing watsonx Orchestrate Agent YAML
When evaluating a watsonx Orchestrate native agent YAML file, extract and evaluate these key sections:
Instructions field (instructions:): This contains the primary agent prompt. Evaluate this as the main instruction content for all dimensions.
Guidelines field (guidelines:): These are structured rules that supplement the instructions. Count these as additional constraints and conditional logic. Each guideline typically adds:
- 1 conditional branch (condition → action)
- 1+ critical constraints if the action contains MUST/NEVER/ALWAYS language
- Potential tool triggers if the action specifies calling a tool/collaborator
Collaborators list (collaborators:): Count the number of collaborators referenced. Each collaborator represents a tool-required behavior that needs trigger conditions, parameter specifications, and result handling.
Tools list (tools:): Count the number of tools referenced. Add these to the tool-required behaviors count.
Context variables (context_variables:): Note which variables are available. Check if the instructions require tracking additional state beyond these variables.
Counting rules for YAML:
- Prompt length: Count only the lines in the
instructions: field (exclude YAML structure, metadata, and guidelines)
- Critical constraints: Count MUST/NEVER/ALWAYS/EXACTLY in both
instructions: and guidelines: sections
- Nested conditionals: Count if/then branches in
instructions: plus each guideline's condition→action pair
- Tool-required behaviors: Sum of collaborators + tools (e.g., 12 collaborators + 1 tool = 13 tool-required behaviors)
- Exact phrases: Count "Respond exactly:", "Say:", and similar requirements in
instructions: and guidelines:
Important: Use the utility scripts (extract_agent_info.py, extract_tool_info.py) to extract tool metadata before scoring the "Execution & Tool Grounding" dimension. If tools/collaborators are referenced but their formal definitions cannot be extracted (file not found, unsupported format), note this as a limitation. The evaluation can proceed, but recommend that the user provide tool definitions and re-run the evaluation for a complete assessment.
Document the analysis mode in the report:
- Enhanced Mode: Used utility scripts to extract agent and tool metadata
- Direct Analysis Mode: Manual analysis only (no tool metadata available)
- Task Understanding (0-5): Can the agent understand its primary job?
- Scope & Applicability (0-5): Does the agent know when the instruction applies?
- Execution & Tool Grounding (0-5): Can the required behavior be executed with available tools?
- Instruction Followability (0-5): Can an LLM realistically follow all constraints at once?
- State & Conflict Manageability (0-5): Does the prompt require hidden state tracking or conflicting rules?
Apply the deterministic signal rules from signal-rules.md to bound your judgment.
Markdown report: Complete evaluation report using the structure defined in report-template.md. The report must be directly saveable as a file.
- Default filename:
agent_prompt_achievability_report.md
JSON harness handoff: Structured extraction object for automated harness integration.
- Default filename:
agent_prompt_achievability_report_harness.json
- Contains all signals, incidents, dimension scores, and findings in machine-readable format
Save both files if the environment supports it. Otherwise, output the complete markdown content and JSON separately.
Key Evaluation Rules
Be evidence-based:
- Quote or paraphrase concrete lines from the input
- Do not make claims without pointing to supporting text
- Distinguish between deterministic signals and judgment-based conclusions
Be operational, not academic:
- Focus on runtime reliability, not writing elegance
- Evaluate what is written, not what the author probably meant
- If something is missing, score the missing clarity as risk
Prefer deterministic recommendations:
- Recommend explicit state objects over implicit memory
- Recommend explicit tool triggers over vague instructions
- Recommend explicit scope boundaries over subjective judgment
- Recommend rule prioritization when conflicts exist
- Do not recommend time-based solutions (wait, delay, retry later, follow up after X time) unless the prompt explicitly defines a scheduler, durable workflow, callback mechanism, or persisted state infrastructure to support temporal operations
Do not overpraise:
- If the prompt is long, exception-heavy, or stateful, say so directly
- If any dimension scores 0-1, treat that area as not reliable as written
- If two or more dimensions are 2 or below, recommend redesign
Prioritize high-impact changes:
- Put the highest-leverage fixes first
- Identify specific rewrite targets (exact sentences or rule bundles)
- Focus on changes that improve multiple dimensions
Supporting Files
Refer to these files for detailed guidance:
dimension-definitions.md: Complete scoring rubrics for all five dimensions
signal-rules.md: Deterministic rules to reduce subjectivity (Rules A-F)
report-template.md: Required report structure and section order
example-finding.md: Sample finding with all required elements
Output Requirements
Every evaluation must produce:
- A complete markdown report artifact (not just scores or bullet points)
- A separate JSON harness handoff file for automated integration
- Per-dimension scores with confidence levels (do not compute weighted averages)
- Extraction and tool summary explaining the analysis mode
- Deterministic signal summary with counts
- At least 3-5 detailed findings with evidence and recommendations
- Key risks and high-impact changes sections
The markdown report must be:
- Specific and evidence-backed
- Structured and complete
- Practical for prompt redesign
- Suitable for sharing with prompt engineers, agent builders, or reviewers
- Directly saveable as a markdown file without rewriting
The JSON harness file must be:
- Valid JSON with complete structured extraction object
- Machine-readable for automated harness integration
- Include all signals, incidents, dimension scores, and findings
- Saved as a separate
.json file alongside the markdown report
1---2name: agent-instructions-evaluator3description: Evaluate an agent instructions or agent definition for achievability and produce a structured, evidence-backed report artifact with per-dimension scores, findings, deterministic signals, and high-impact recommendations.4---56# Agent Instructions Evaluator78## Overview910Evaluate agent instructions or agent definitions for operational achievability in production settings. This skill focuses on runtime reliability and runtime efficiency rather than writing quality, identifying issues from hidden state, conflicting rules, vague scope, brittle exact phrasing, underspecified tool behavior, instruction overload, and performance friction caused by excessive or contradictory runtime reasoning.1112**Use this skill when you need:**13- A practical evaluation report focused on runtime reliability14- Evidence-backed prompt review with concrete recommendations15- A reusable report artifact that can be shared with reviewers16- Per-dimension scoring that preserves nuance rather than averaging away critical issues1718## Core Principle1920Score the artifact not by how much behavior it describes, but by how much behavior the agent can reliably execute. More rules do not automatically make a better prompt—more rules often lower achievability. An instruction set that is technically understandable but expensive to reconcile at runtime should still be considered lower-achievability, because slow, unstable, or tool-heavy execution reduces production reliability.2122## Evaluation Workflow2324<Steps>25<Step>26**Gather all relevant data**2728Before beginning analysis, collect all available metadata and context:29301. **Extract agent metadata** (if evaluating a YAML file):31 ```bash32 python scripts/extract_agent_info.py <agent.yaml> --json33 ```34 This provides: name, description, collaborators, tools, context variables, guidelines35 - Tool: [`extract_agent_info.py`](scripts/extract_agent_info.py)36372. **Extract tool metadata** for each referenced tool or agent collaborator:38 - For Python-based tools, JSON-based tools, and YAML-based tools (knowledge bases, MCP toolkits): `python scripts/extract_tool_info.py <tool.py|tool.json|tool.yaml>`39 40 This provides: tool signatures, parameters, return types, descriptions41 - Tool: [`extract_tool_info.py`](scripts/extract_tool_info.py)42433. **Identify missing tool definitions**: Note which tools/collaborators are referenced but not available for inspection44454. **Organize the data**: Create a complete picture of:46 - What the agent instructions say47 - What tools are actually available48 - What parameters those tools accept49 - What context variables exist50 - What guidelines constrain behavior5152**Only after gathering all data**, proceed to analysis. This ensures:53- Tool grounding assessment is based on actual tool signatures, not assumptions54- Execution feasibility is evaluated against real capabilities55- Recommendations are specific and actionable56</Step>5758<Step>59**Understand the input**60Accept any of these input types:61- Raw system prompt62- Instruction block for an agent63- watsonx Orchestrate native agent YAML64- External agent definition65- Design document describing agent behavior66- Partial excerpt from a larger prompt or policy6768If the input is partial, state that the evaluation scope is partial and score only what is visible.6970#### Processing watsonx Orchestrate Agent YAML71When evaluating a watsonx Orchestrate native agent YAML file, extract and evaluate these key sections:72731. **Instructions field** (`instructions:`): This contains the primary agent prompt. Evaluate this as the main instruction content for all dimensions.74752. **Guidelines field** (`guidelines:`): These are structured rules that supplement the instructions. Count these as additional constraints and conditional logic. Each guideline typically adds:76 - 1 conditional branch (condition → action)77 - 1+ critical constraints if the action contains MUST/NEVER/ALWAYS language78 - Potential tool triggers if the action specifies calling a tool/collaborator79803. **Collaborators list** (`collaborators:`): Count the number of collaborators referenced. Each collaborator represents a tool-required behavior that needs trigger conditions, parameter specifications, and result handling.81824. **Tools list** (`tools:`): Count the number of tools referenced. Add these to the tool-required behaviors count.83845. **Context variables** (`context_variables:`): Note which variables are available. Check if the instructions require tracking additional state beyond these variables.8586**Counting rules for YAML:**87- **Prompt length**: Count only the lines in the `instructions:` field (exclude YAML structure, metadata, and guidelines)88- **Critical constraints**: Count MUST/NEVER/ALWAYS/EXACTLY in both `instructions:` and `guidelines:` sections89- **Nested conditionals**: Count if/then branches in `instructions:` plus each guideline's condition→action pair90- **Tool-required behaviors**: Sum of collaborators + tools (e.g., 12 collaborators + 1 tool = 13 tool-required behaviors)91- **Exact phrases**: Count "Respond exactly:", "Say:", and similar requirements in `instructions:` and `guidelines:`9293**Important:** Use the utility scripts ([`extract_agent_info.py`](scripts/extract_agent_info.py), [`extract_tool_info.py`](scripts/extract_tool_info.py)) to extract tool metadata before scoring the "Execution & Tool Grounding" dimension. If tools/collaborators are referenced but their formal definitions cannot be extracted (file not found, unsupported format), note this as a limitation. The evaluation can proceed, but recommend that the user provide tool definitions and re-run the evaluation for a complete assessment.94</Step>9596<Step>97**Extract evidence**98Use the gathered data to identify and count:99- Exact phrase requirements100- Nested conditional branches101- Implicit state requirements102- Critical constraints (MUST, NEVER, ALWAYS, EXACTLY, etc.)103- Exception clauses104- Subjective classifiers105- Tool-required behaviors106- Hard conflicts between rules107108Document the analysis mode in the report:109- **Enhanced Mode**: Used utility scripts to extract agent and tool metadata110- **Direct Analysis Mode**: Manual analysis only (no tool metadata available)111</Step>112113<Step>114**Score five dimensions**115Evaluate the artifact across these dimensions using the scoring rubrics in [`dimension-definitions.md`](dimension-definitions.md):1161171. **Task Understanding** (0-5): Can the agent understand its primary job?1182. **Scope & Applicability** (0-5): Does the agent know when the instruction applies?1193. **Execution & Tool Grounding** (0-5): Can the required behavior be executed with available tools?1204. **Instruction Followability** (0-5): Can an LLM realistically follow all constraints at once?1215. **State & Conflict Manageability** (0-5): Does the prompt require hidden state tracking or conflicting rules?122123Apply the deterministic signal rules from [`signal-rules.md`](signal-rules.md) to bound your judgment.124</Step>125126<Step>127**Generate findings**128For each major issue identified, create a finding with:129- **Evidence**: Direct quotes from the input130- **Why it matters**: Operational impact explanation131- **Deterministic or judgment-based**: Classification of the finding132- **Score impact**: Which dimensions are affected and how133- **Recommended change**: Specific, actionable fix134135</Step>136137<Step>138**Produce the report artifacts**139Generate two artifacts:1401411. **Markdown report:** Complete evaluation report using the structure defined in [`report-template.md`](report-template.md). The report must be directly saveable as a file.142 - **Default filename:** `agent_prompt_achievability_report.md`1431442. **JSON harness handoff:** Structured extraction object for automated harness integration.145 - **Default filename:** `agent_prompt_achievability_report_harness.json`146 - Contains all signals, incidents, dimension scores, and findings in machine-readable format147148Save both files if the environment supports it. Otherwise, output the complete markdown content and JSON separately.149</Step>150</Steps>151152## Key Evaluation Rules153154**Be evidence-based:**155- Quote or paraphrase concrete lines from the input156- Do not make claims without pointing to supporting text157- Distinguish between deterministic signals and judgment-based conclusions158159**Be operational, not academic:**160- Focus on runtime reliability, not writing elegance161- Evaluate what is written, not what the author probably meant162- If something is missing, score the missing clarity as risk163164**Prefer deterministic recommendations:**165- Recommend explicit state objects over implicit memory166- Recommend explicit tool triggers over vague instructions167- Recommend explicit scope boundaries over subjective judgment168- Recommend rule prioritization when conflicts exist169- **Do not recommend time-based solutions** (wait, delay, retry later, follow up after X time) unless the prompt explicitly defines a scheduler, durable workflow, callback mechanism, or persisted state infrastructure to support temporal operations170171**Do not overpraise:**172- If the prompt is long, exception-heavy, or stateful, say so directly173- If any dimension scores 0-1, treat that area as not reliable as written174- If two or more dimensions are 2 or below, recommend redesign175176**Prioritize high-impact changes:**177- Put the highest-leverage fixes first178- Identify specific rewrite targets (exact sentences or rule bundles)179- Focus on changes that improve multiple dimensions180181## Supporting Files182183Refer to these files for detailed guidance:184- [`dimension-definitions.md`](dimension-definitions.md): Complete scoring rubrics for all five dimensions185- [`signal-rules.md`](signal-rules.md): Deterministic rules to reduce subjectivity (Rules A-F)186- [`report-template.md`](report-template.md): Required report structure and section order187- [`example-finding.md`](example-finding.md): Sample finding with all required elements188189## Output Requirements190191**Every evaluation must produce:**1921. A complete markdown report artifact (not just scores or bullet points)1932. A separate JSON harness handoff file for automated integration1943. Per-dimension scores with confidence levels (do not compute weighted averages)1954. Extraction and tool summary explaining the analysis mode1965. Deterministic signal summary with counts1976. At least 3-5 detailed findings with evidence and recommendations1987. Key risks and high-impact changes sections199200**The markdown report must be:**201- Specific and evidence-backed202- Structured and complete203- Practical for prompt redesign204- Suitable for sharing with prompt engineers, agent builders, or reviewers205- Directly saveable as a markdown file without rewriting206207**The JSON harness file must be:**208- Valid JSON with complete structured extraction object209- Machine-readable for automated harness integration210- Include all signals, incidents, dimension scores, and findings211- Saved as a separate `.json` file alongside the markdown report