/relai:loopfrom RELAI
Coordinates continuous, autonomous improvement of an AI agent across multiple iterations, integrating traces, feedback, evaluations, and experiments under a pre-approved contract.
Ships in RELAI. 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.
Inspect existing evidence and runners. Read relai/README.md, or the bundled
terms when absent; use the start skill
for needed managed records without rebuilding working infrastructure. This skill coordinates
learning and verified improvement across the discover, eval and improve skills
under one contract.
The flow below is a starting point. Adapt, reorder, repeat or skip activities when that better serves the request and the evidence, and load stage guidance only when relevant. The agreed scope, budget, authorization, evidence requirements and stage rules still bind.
Goal: useful learning and evidence-backed improvement with human judgment used where needed. Every kept change has comparable evidence and regression checks; every candidate decision is recorded with its reason. An investigation can produce useful knowledge without a code change. Maintain that knowledge when it helps future work under the shared policy; do not fill an iteration with artifact updates that add no durable value.
A round cap counts experiment rounds, including diagnosis; report candidate attempts separately.
The paths below describe RELAI-managed records. Existing project contracts, iteration history, candidate decisions and reporting may serve the same purpose when authorization and evidence remain inspectable and recoverable; do not create duplicate state merely to match these filenames.
relai/records/loop/state.json
(relai/docs/files.md), with a line in decisions.md.state.json under iterations; each attempted candidate has a
relai/changes.md entry.Use the shared purpose guidance to connect the requested outcome, evidence selection and outcome priorities before dependent iterations. Carry covered choices forward; do not reopen them each iteration.
Reuse an existing contract covering these choices. Ask only for missing consequential choices
or changed boundaries; establish a new contract before starting when none exists. The contract is
the improvement agreement (relai/README.md, Terms) and supplies the authorization for the
stage decisions it covers. It is not approval to skip an uncovered consequential decision.
--yes for the example script).relai/README.md
says ("When the user is asked"); everything else proceeds and appears in the digest.delegated (default): fresh independent reviews stand in for scenario approval,
grader previews and task lists, as delegated approvals
describe; or supervised: the user approves each scenario table, grader preview and kept change
individually. Inside the loop this setting answers the build skills' "how involved" question.Hold measurement meaning and relevant comparison conditions stable within an iteration: frozen tests and their evaluators, the held-out set and acceptance rule. Budget and authorization also stay binding. Supporting implementation repairs or improvements may proceed within scope under the shared adaptation policy; changes to measurement meaning require controlled repair and comparable starting evidence. New tests join only at an iteration's start, after their fresh review and freeze, and get a baseline on the incumbent before any candidate is compared with them. The loop may propose a change to the kernel (a rubric repair, a retired test, a new budget); only authorization covering that change permits it.
With adequate evaluations, begin at improvement; diagnosis may return to discovery when an ambiguity appears. Record adaptations that affect evidence, scope or delivery. Keep the real dependencies: comparable evidence precedes improvement claims, delivered revisions need verification, and measurement changes go through the locked kernel.
feedback.md and are asked together; the loop does not wait on them, it works on everything else.eval skill): realistic, both
directions, a fresh review standing in for scenario approval and grader preview when the contract's
approvals are delegated, then freeze. Held-out tests are optional (the eval skill's Split rule).benchmark.py batch --case-ids ...) plus any
agreed held-out sample; never the final split.state.json (relai/docs/files.md), update relai/STATUS.md, and
send the digest: what started the iteration, what was learned, tests added, experiments and
candidate outcomes, comparable measurements and their limits, spend so far; then ask the
waiting questions.
Use the shared reviewable handoff for
decisions or annotations: show their consequences and a useful chat or app review path.
Revisit relevant deferred questions when new evidence or the current work warrants it;
do not repeat an unchanged backlog or silently treat a nonblocking question as deferred.Stop when the agreed objective or limits are reached, the user asks, blocking judgment is needed,
or no worthwhile authorized experiment remains. Outside watch mode, do not start a new iteration
on unchanged inputs merely to evade a round cap. Stalls, extensions and recovery after
interruption follow improve: improve-loop; state.json is an
orchestration summary, never evidence that a candidate ran or was accepted.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub relai-ai/agent-eval-loop --plugin relai7 skills in this plugin
/coding-evalsBuild and run evals for the coding agent a team uses, including one developed here. Tasks come from real sessions, pull requests or git history, and checks score the code change the agent makes in a repository. Measure its baseline, or compare models, versions, setups or other coding agents. Not for an application agent's conversations, tool use or business workflows./discoverIdentify requirements, risks and open questions for an AI agent or LLM application from its code, docs or traces. Use to triage traces and failed runs, find failure patterns, resolve open questions, review risks or maintain the project's wiki. Produces analysis and maintained knowledge, without writing tests, changing the agent or building a review interface. Excludes ordinary bugs outside an AI agent./evalBuild and run evaluations for an AI agent or LLM application, including harnesses, tests from requirements, risks or failed runs, benchmarks, shared evaluators and judges. Also design scenarios, analyze coverage, repair tests, mock dependencies, or build agent-neutral tests of non-coding work such as assistants using mail or calendars. Measures the agent without changing it. Not for tasks that score a coding agent's code changes in a repository./improveChange an AI agent or LLM application and verify the change. Fix a failing behavior, raise performance against an agreed objective, compare prompts, models or settings, reduce cost or latency, or check a change for regressions. Covers one fix, comparison or bounded improvement effort. Excludes ordinary bugs outside an AI agent./startOrient users on RELAI's capabilities, the project's current eval status and next steps, or initialize RELAI records when a workflow needs them. Use for open-ended requests, such as what RELAI can do or how to begin evaluating an agent, when the user has not yet named a specific outcome./trace-reviewBuild or adapt a project-owned app for viewing agent traces and recording feedback linked to its source, such as a trace viewer, an annotation or labeling interface, or a review workspace for findings, open questions, scenarios or graders. Needs no eval setup. The deliverable is the app, not an analysis of the traces.Other plugins' skills for the same job