Note: The prototype implementations are developed across dedicated feature branches. Please explore the repository branches for detailed implementations and related commits.
Explorations and prototype implementations focused on improving the behavioral evaluations, debugging infrastructure and developer experience for agentic CLI systems.
This repository documents a collection of my experiments and prototypes around behavioral evaluation systems, agent tooling and developer infrastructure to improve the Gemini CLI.
The prototypes in this repo explore approaches for:
- Behavioral eval infrastructure
- LLM-as-a-Judge systems
- Tool routing and boundary testing
- Iterative self-correction loops
- Dynamic workspace simulation
- Telemetry driven debugging
- Trace logging and replay systems
- Eval generation pipelines
- Contributor focused DevEx tooling
One major issue with traditional eval systems is that they operate on static and unrealistic workspaces.
To address this, I designed a config-driven workspace scaffolder capable of generating realistic multi-file debugging environments.
The scaffolding system follows a 3-layer structure:
Contains the actual problem the agent must solve:
- buggy logic
- incomplete implementations
- missing features
- broken tests
Adds realistic software structure:
- service layers
- imports across modules
- config files (
package.json,tsconfig.json) - dependency chains
Introduces irrelevant files to evaluate:
- signal vs noise filtering
- retrieval efficiency
- context resilience
- Config-driven workspace generation
- Multi-file dependency simulation
- Iterative debugging loops
- Integrated Vitest execution
- Mock mode vs real execution mode
- Tool usage tracing
- Failure convergence detection
This enabled evaluation scenarios where agents had to:
- inspect failing tests
- diagnose issues
- edit files
- rerun test suites
- iteratively converge on a fix
Most existing eval systems only test “happy path” behaviors.
I explored a more realistic evaluation loop where the agent must:
- detect failures
- reason about the cause
- modify code
- retry execution
- validate correctness
- Multi-turn repair loops
- Recovery-oriented evaluation
- Convergence detection
- Infinite loop prevention
- Tool failure handling
- Negative behavioral testing
Traditional regex-based assertions become brittle when evaluating things like summaries, plans, explanations, commit messages, etc.
To address this, I explored a semantic evaluation framework using an LLM as a grading layer.
The judge model evaluates outputs against structured rubrics.
To reduce judge flakiness:
- Chain-of-thought grading
- Structured scoring schemas
- Majority voting
- Hybrid deterministic + semantic validation
- Model tiering
- Fallback assertion systems
Compile Check
↓
Lint Validation
↓
Deterministic Assertions
↓
Semantic Judge Evaluation
This allows semantic flexibility while still maintaining deterministic safeguards.
The CLI exposes multiple overlapping tools like web search, web fetch, grep, glob, edit, write-file etc.
A major challenge is not whether tools work but whether the agent chooses the correct tool.
I explored a dedicated boundary eval suite focused on:
- routing correctness
- tool misuse detection
- cost-aware tool selection
- context efficiency
Prompt:
"What is the latest React version?"
Expected:
google_web_search
Prompt:
"Summarize this GitHub issue"
Expected:
web_fetch
Testing whether the model:
- minimally edits files
- avoids rewriting unnecessarily
- chooses efficient edit operations
A major area of exploration was how agentic systems can help contributors build and improve the agent system itself.
CLI utility for generating:
- subagent templates
- TOML configs
- eval boilerplate
- registration files
A side-by-side behavioral comparison system for prompts.
Features explored:
- dual eval execution
- telemetry diffing
- tool sequence comparison
- latency comparisons
- behavioral drift detection
- regression reports
I also explored a complete developer toolkit for managing eval infrastructure.
gemini evals:list
gemini evals:gaps
gemini evals:validate
gemini evals:improve- AST-based eval discovery
- Tool coverage mapping
- Gap analysis
- Stability validation
- Flakiness scoring
- Semantic assertion recommendations
Static Analysis
↓
Smoke Test
↓
Semantic Validation
↓
Multi-run Stability Testing
- orchestration loops
- tool routing
- delegated subagents
- conversational execution systems
- behavioral testing
- semantic assertions
- deterministic + probabilistic validation
- eval stabilization
- signal vs noise filtering
- large-context resilience
- retrieval workflows
- context-aware debugging
- trace pipelines
- replay systems
- debugging workflows
- contributor automation
- flaky behavior mitigation
- iterative repair loops
- convergence detection
- tool boundary enforcement