Skip to content

yb suggest-suite

Generate evaluation suite suggestions using AI agent interaction.

Terminal window
yb suggest-suite --agent <type> --output-dir <path> [options]

The suggest-suite command uses an AI agent to analyze an existing agent output and generate appropriate evaluation criteria. This helps you bootstrap comprehensive suite configurations by:

  • Analyzing what the agent produced
  • Detecting patterns in the changes
  • Recommending appropriate evaluators
  • Generating complete configuration files
OptionShortTypeDefaultDescription
--agent-astringRequiredAgent to use (e.g., copilot-cli)
--output-dir-ostringRequiredPath to successful agent output folder
--agent-filestringagents/suggest-suite.agent.mdCustom agent file for suggestions
--save-sstringstdoutSave generated suite to file
--interactive-iflagtrueAsk clarifying questions
--no-interactiveflagfalseSkip questions, use defaults
--help-hflag-Show help message

Analyze an agent output and get suggestions:

Terminal
yb suggest-suite \
--agent copilot-cli \
--output-dir .youbencha-workspace/run-2024-11-15/src-modified

Generate and save the suggested configuration:

Terminal
yb suggest-suite \
--agent copilot-cli \
--output-dir ./agent-output \
--save suggested-suite.yaml

Skip questions and use defaults:

Terminal
yb suggest-suite \
--agent copilot-cli \
--output-dir ./agent-output \
--no-interactive \
--save auto-suite.yaml

Use a custom suggestion agent:

Terminal
yb suggest-suite \
--agent copilot-cli \
--output-dir ./agent-output \
--agent-file ./my-custom-suggester.agent.md

When you run suggest-suite, the AI agent performs these steps:

  1. Analyze output directory - Examine what the agent produced
  2. Ask about baseline - Determine if there’s a reference to compare against
  3. Request original intent - Understand what the agent was supposed to do
  4. Detect patterns - Identify auth changes, tests, API modifications, docs updates
  5. Recommend evaluators - Suggest appropriate evaluators with reasoning
  6. Generate configuration - Output a complete suite configuration
Terminal
$ yb suggest-suite --agent copilot-cli --output-dir ./agent-output
🔍 Analyzing output directory...
Found 3 modified files:
- src/auth/login.ts
- src/auth/middleware.ts
- tests/auth.test.ts
📋 Questions:
1. Is there a reference branch to compare against?
> Yes, feature/auth-complete
2. What was the original task?
> Add JWT authentication to the login endpoint
3. Should tests be required?
> Yes
🎯 Recommended Suite:
Based on your answers, I recommend:
expected-diff (threshold: 0.85)
- You have a reference branch for comparison
git-diff
- Track scope: max 5 files, max 200 lines
agentic-judge
- Assertions:
- jwt_implemented: "JWT authentication is implemented"
- tests_added: "Unit tests cover the new auth flow"
- middleware_secured: "Routes are protected by auth middleware"
Generating suite.yaml...
📄 Configuration saved to: suggested-suite.yaml

The generated configuration includes comprehensive evaluator settings:

suggested-suite.yaml
# Generated by yb suggest-suite
# Review and customize before running
repo: https://github.com/your-org/your-repo.git
branch: main
expected_source: branch
expected: feature/auth-complete
agent:
type: copilot-cli
config:
prompt: "Add JWT authentication to the login endpoint"
evaluators:
- name: expected-diff
config:
threshold: 0.85
- name: git-diff
config:
assertions:
max_files_changed: 5
max_lines_added: 200
- name: agentic-judge
config:
type: copilot-cli
assertions:
jwt_implemented: "JWT authentication is properly implemented. Score 1 if complete, 0.5 if partial, 0 if missing."
tests_added: "Unit tests cover the authentication flow. Score 1 if comprehensive, 0.5 if basic, 0 if none."
middleware_secured: "API routes are protected by authentication middleware. Score 1 if all routes secured, 0 if not."

The AI agent can detect these common patterns:

PatternDetection CriteriaSuggested Evaluators
AuthenticationAuth-related file changesagentic-judge with security assertions
TestsTest file additionsgit-diff with test requirements
API ChangesRoute/endpoint modificationsagentic-judge with API assertions
DocumentationREADME/docs updatesgit-diff with doc requirements
ConfigurationConfig file changesagentic-judge with config validation
DatabaseMigration/model changesagentic-judge with data integrity checks
CodeMeaning
0Suite generated successfully
1Output directory not found
2Agent not available
3User cancelled interactive prompts