/evoontology:evolve-ontologyfrom evoontology
Autonomously improves an ontology-layer system through a four-step loop of diagnosis, attribution, patching, and evaluation until a reproducibly better version is obtained.
Ships in evoontology. 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.
Read when SKILL.md points to them.
Continuously improve the ontology-layer system until a credible and reproducibly better version is obtained.
Evolution operates along three dimensions — Content, Tool, and Schema. When the attributed mechanism involves related prompt, workflow, or runtime components, they may be modified as part of the corresponding evolution dimension.
All Candidate changes must be traceable to their target dimension and reversible to the Parent state.
Read:
references/project-context.md;references/workload-experience.md;references/ontology-layer-data-boundary.md;Read the current ontology layer, tools, Builder, runtime flow, and evaluation setup.
Define the optimization objective, acceptance criteria, and unacceptable regressions before expensive experiments.
Do not rely only on current conversation context. Reuse persisted project and
evolution state whenever available. If a previous evolution run is still
open, resume it via resume_evolution_run instead of starting a new one.
Stage Output: A fixed optimization objective and the prior knowledge needed for evolution.
Read .evoontology/project.json, the current Parent, and the latest
completed evolution checkpoint.
Resolve the data for this evolution run:
Fixed-Split Mode: reuse the persisted evolution-training and validation subsets.
Rolling-Trajectory Mode: collect eligible Task trajectories after the
latest checkpoint, freeze the batch, and split it into Evolution Pool and
Validation Reserve according to
references/ontology-layer-data-boundary.md.
Fix the Evaluator and acceptance criteria. Reuse a saved or explicitly requested budget. Offer quick (2 rounds) and full (8 rounds, default) profiles; announce the chosen budget and proceed within the user's authorized scope. Ask before costs beyond that scope or budget extensions. A resumed run reuses its frozen budget. Both profiles use exactly the same acceptance standards. Before starting a new run, resolve access to the native runner and evaluator; if unavailable, explain what is missing without starting a doomed run.
Persist the frozen run context through the MCP tool start_evolution_run
(it writes evolution/run_N/run.json with the Parent, adapter, frozen
budget, and acceptance criteria). Keep the batch's input IDs, validation
IDs, and Evaluator reference with the run's evaluation setup.
Record IDs only; do not duplicate trajectory files.
If the available data is insufficient for trustworthy evolution and validation, preserve the Parent and stop without advancing the checkpoint.
Stage Output: A reproducible evolution run with fixed Parent, inputs, validation data, and evaluation protocol.
Do not rely only on existing failure traces. Analyze both what the system has done and what it should have done but did not.
Before diagnosing, actively locate the trajectories, evaluation results, and execution logs relevant to this run and confirm their applicable scope. When trajectory sources or their scope are not yet settled, resolve them from the request and project context and persist authorized source references for this run:
The problem map should preserve observed symptoms, evidence, causal hypotheses, and unresolved uncertainty.
Stage Output: A problem map covering visible failures, missing capabilities, compensation paths, and potential system limitations.
Select high-value problems.
Analyze how each important problem affects the analysis process and final result.
Attribute causes to the most relevant part of the ontology layer:
Determine the nature of each problem:
Do not default to patching existing components. First determine whether the system is doing something wrong, missing something necessary, or structurally unsuitable. The optimization approach should follow from this diagnosis and the available evidence.
Attribution may produce multiple causal explanations. Each should be independently testable, but the next Candidate should normally target the highest-priority mechanism.
Stage Output: A prioritized set of experimentally testable causal explanations with corresponding evidence and remaining uncertainty.
Select the mechanism currently most valuable to validate.
Record the primary evolution dimension as Content, Tool, or Schema.
Convert the mechanism into a clear, falsifiable hypothesis describing:
Design the intervention based on project structure, evidence, and problem characteristics.
Keep the primary intervention localized to the attributed Content, Tool, or Schema level.
Preserve the Parent and record Candidate changes, expected effects, and rollback methods.
Run representative cases, targeted replay, or low-cost exploratory experiments to verify that the Candidate changes the intended capability or behavior.
Check whether the Candidate introduces new limitations, reduces exploration space, or shifts problems elsewhere.
If the intervention is ineffective, redesign the Candidate. If the intervention activates but the problem remains, update the attribution. If a local capability improves without improving the overall process, inspect integration, side effects, and remaining bottlenecks.
Only proceed to formal comparison after confirming that the target mechanism has meaningfully changed.
Stage Output: One high-value Candidate and evidence showing whether the intended mechanism has activated.
Compare Parent and Candidate under a controlled and reproducible evaluation protocol. Evaluate the Candidate as its own stored version; the active version must not be modified during comparison.
Keep inputs, data splits, models, Evaluator, budget, and runtime configuration consistent.
Evaluate according to the persisted project mode:
Analyze:
Determine the Candidate result:
Accept: the Candidate provides reproducible improvement without unacceptable regression;
Reject: the Candidate does not provide trustworthy improvement, including results that are partial or mixed;
Incomplete: formal evaluation cannot be completed reliably.
Do not accept a Candidate only because a final metric improves. Run the configured EvaluationGate (GT absolute score or LLM Judge) and Accept only when it returns accept AND the Candidate shows no unacceptable regression. When the validation set is small, re-run the evaluation to confirm the improvement is not single-trial luck. Evaluation should also deepen understanding of ontology-layer limitations and guide future optimization.
After the decision:
record_evolution_round
(it appends the summary to evolution/run_N/rounds.jsonl), update the
attribution and problem map, then design a new Candidate targeting the
next most valuable mechanism and repeat Step 1–4. Do not advance the
checkpoint and do not end the run.record_evolution_round the
run remains running; you MUST design and evaluate the next Candidate in
the same run before deciding again. The core refuses mark_evolution_incomplete
for missing_data, unreliable_evaluation, or external_block until at
least min_rejects_before_incomplete (default 2) candidates have been
rejected. Only user_interrupted and missing_permissions stop
immediately; budget exhaustion is raised automatically by
begin_evolution_round.references/exploration-guide.md, broaden the problem search, and reconsider the current explanation.Candidate failure, unknown attribution, no-op results, or temporary lack of effective hypotheses do not indicate completion. They provide information for the next evolution cycle. Keep iterating until Accept, or until an external condition (exhausted budget, user interruption, missing data, or unreliable evaluation) forces an Incomplete stop.
Stage Output: A Parent/Candidate decision, updated evolution knowledge, and a clear next direction or rollback point.
A run ends only on Accept or on an external Incomplete stop; a Reject loops back to a new Candidate within the same frozen batch. The final report must be based on the session's terminal state and the saved run records, not on conversation memory.
When the run ends, preserve the evolution record, including:
In the run records, also capture:
content, tool, or schema;Rejected rounds carry them in their rounds.jsonl summary (via
record_round); the accepted round carries them in the final run report,
which must be based on run.json, rounds.jsonl, trajectory-sources.json,
and the summaries under evaluations/.
If a Candidate was accepted:
validate_semantics and annotate_ontology_version on the candidate version;accept_evolution to publish it as the next ontology_vN, switch
active.json, and advance the evolution checkpoint once.If the run ended Incomplete, do not advance the checkpoint and do not switch
active.json; the same batch is retried on the next run.
Call finalize_evolution_run after either terminal outcome. It renders and opens
Results & questions automatically, including run status, aggregate evaluation
metrics and available public before/after replays. If rendering fails, report it
separately; active version and terminal status stand.
Stage Output: Persisted evolution results, an outcome explorer, updated active version when accepted, and consistent evolution state.
Only declare success when the final version satisfies:
If execution stops due to user interruption or missing permissions, mark
status as incomplete immediately. Budget exhaustion is raised by the
session when the budget is spent. For missing_data or
unreliable_evaluation, the session refuses the stop until at least
min_rejects_before_incomplete (default 2) candidates have been rejected.
Preserve the best current version, unresolved causal issues, remaining hypotheses, and accurate recovery steps.
Do not improve results by modifying:
Do not hard-code standard answers, task-specific correct values, or expected Evaluator outputs.
Domain knowledge must be stored in traceable, versioned semantic artifacts and must not be hidden inside Prompt, Builder code, or orchestration logic.
Report:
Preserve the validity of the benchmark and evaluation protocol. Do not modify benchmark questions, labels, Ground Truth, Evaluator logic, data splits, or acceptance criteria to improve results. Domain knowledge should remain in traceable semantic artifacts rather than being hidden in prompts or orchestration code.
Before accept_evolution, record_evolution_evaluation for the current Candidate and round must include result.gate_input. For ground_truth supply protocol, paired parent_scores and candidate_scores, unique case_ids, and unacceptable_regressions:false only after checking regressions. For llm_judge supply protocol, decoded verdicts (winner: parent/candidate/tie, critical_error: boolean) and the same explicit regression conclusion. The core recomputes the gate and refuses missing, non-improving or invalid results. Use the frozen independent validation protocol; generated numbers or public training replays are not valid evaluation evidence. Historical runs are not silently granted a passing gate.
references/exploration-guide.md (opens in a new tab)references/ontology-interaction-protocol.md (opens in a new tab)references/ontology-layer-data-boundary.md (opens in a new tab)references/ontology-schema.md (opens in a new tab)references/project-context.md (opens in a new tab)references/workload-experience.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
3 skills in this plugin
/build-ontologyBuild an initial ontology from data and analytical goals, prepare relevant questions from supplied needs and project history, and automatically show the evidence-grounded result./explore-ontologyExplore ontology questions, grounded concepts, evidence, actual task results and evolution outcomes in a read-only interactive version explorer.npx claudepluginhub ruc-datalab/evoontology --plugin evoontologyOther plugins' skills for the same job