Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/panjose/co-scientist/hypothesis-evolution-loopnpx skills add panjose/Co-Scientist --skill hypothesis-evolution-loopgit clone --depth 1 https://github.com/panjose/Co-ScientistWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/panjose/co-scientist/hypothesis-evolution-loop)<a href="https://agentmods.dev/skills/panjose/co-scientist/hypothesis-evolution-loop"><img src="https://agentmods.dev/badge/skills/panjose/co-scientist/hypothesis-evolution-loop.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00020 | $0.04141 |
| Opus 5 | $0.00010 | $0.02070 |
| Sonnet 5 | $0.00004 | $0.00828 |
| Haiku 4.5 | $0.00002 | $0.00414 |
Grade A, and why
hypothesis-evolution-loop scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 147 lines — stays where its author put it; the contents beside it link to each section on GitHub.
hypothesis-evolution-loop
Goal:
- Run the iterative evolution loop from the current persisted run state until convergence.
Inputs:
- current persisted run artifacts
- active
state/STRATEGY_PLAN.json - optional
resumeflag
Outputs:
- updated hypotheses
- updated island statistics
- updated proximity receipt/status artifacts, plus
state/PROXIMITY_GRAPH.jsonwhen the embedding bridge succeeds - updated tournament artifacts
- updated convergence counters
- updated
state/EVOLUTION_STATE.json - appended
state/EVOLUTION_ROUNDS.jsonl - updated
state/PIPELINE_STATE.json - updated
state/CURRENT_STAGE.json
Context Loading:
- Open
skills/shared-references/schema-index.md. - Read
packages/agent_contracts/pipeline_control.pybefore updatingstate/EVOLUTION_STATE.jsonorstate/COMPLETION_DECISION.json. - Read
packages/agent_contracts/pipeline_runtime.pybefore updatingstate/PIPELINE_STATE.jsonorstate/CURRENT_STAGE.json. - Read
packages/agent_contracts/hypothesis.pybefore writing any evolvedhypotheses/<id>/HYPOTHESIS.jsonartifact. - Read
packages/agent_contracts/state.pybefore any island state validation, and readpackages/run_artifacts/island_state.pybefore invoking the run-level island persistence helper. - Read
packages/agent_contracts/ranking.pywhen the round will write tournament artifacts through downstream ranking work. - Read
packages/agent_contracts/evolution_round.pybefore appendingstate/EVOLUTION_ROUNDS.jsonl. - Read the active
state/STRATEGY_PLAN.json,state/PIPELINE_STATE.json,state/CURRENT_STAGE.json,state/EVOLUTION_STATE.json, the selected parent hypotheses, and the latest parent review bundles before starting or resuming a round.
Execution Contract:
- Resume decisions must come from artifact state, not hidden process memory.
- The active evolution route must be consistent with
state/STRATEGY_PLAN.json. - Refresh
state/STRATEGY_PLAN.jsonthroughpython -m tools.policy.plan_strategy <run_dir>before every evolution round that is resuming from persisted state. - Use an explicit phase override only when the caller is intentionally forcing a new stage transition instead of restoring the current persisted round or substage.
- Use
from tools import sync_pipeline_stage_artifactsas the canonical paired write surface when enteringEvolution,Reflection,Insights from Reviews,Proximity, orRanking. - The stage-sync helper is implemented in
packages/run_artifacts/stage_sync.py. - Before resuming or starting an evolution round, call
tools.sync_pipeline_stage_artifacts(...)forEvolution. - Before dispatching review, insights, proximity, or ranking work for the active child, call
tools.sync_pipeline_stage_artifacts(...)for the exact substage being entered so dashboard state reflects the live round status. - Read
state/RESOLVED_RUN_CONFIG.jsonbefore deciding whether the loop is capped or completion-driven:convergence.max_iterations > 0means a user-visible capped run.convergence.max_iterations == 0means completion-driven mode; do not invent a small hard iteration cap.convergence.safety_max_iterationsis still a hard safety ceiling and must be recorded if reached.- Persist
EVOLUTION_STATE.safetyMaxIterationsexactly fromRESOLVED_RUN_CONFIG.convergence.safety_max_iterations; never rewrite it from the current iteration count.
- Treat
iteration_policy = completion_driventogether withhuman_checkpoint = autoas an autonomous loop contract: after one round closes, refresh routing and continue automatically instead of returning to the user for per-round confirmation. human_checkpointcan still intentionally pause the loop, but only at the configured checkpoint boundary (before_overview,before_completion, orevery_major_stage).- If the host-agent turn stops before a terminal route is reached, the handoff must state that convergence has not been reached, state is persisted, and the recommended next action is continue evolution through resume or an explicit continue request.
- One evolution round may create only one new child hypothesis. Do not batch-refine every seed candidate once and then stop.
- Do not synthesize placeholder hypotheses, reviews, tournaments, proximity receipts, embeddings, or evolution-round receipts to make progress.
- If an evolve, review, proximity, ranking, convergence, or round-receipt substage cannot run through its canonical skill or tool, stop and report a resumable blocked state instead of writing low-information artifacts.
- When
state/STRATEGY_PLAN.jsonreportsnext_action: continue_evolution, usesignals.selected_parent_idsas the parent set for the next child hypothesis and persist the resulting parent linkage inHYPOTHESIS.jsonandORIGIN.json. - Before generating that child, run
evolution-strategy-supervisorand choose exactly one concrete evolution strategy allowed by:signals.selection_strategyselected_evolution_strategies- the parent hypotheses and their latest review bundles
- For single-island rounds, use
from tools import update_run_single_island_rewardas the canonical run-level island reward / decay update and persistence surface after the child has finished review and ranking update receipt coverage. - For seed island initialization and multi-island child island creation, use
from tools import ensure_run_islands_for_hypothesesas the canonical run-level island initialization surface. - The run-level helper is implemented in
packages/run_artifacts/island_state.pyand delegates the deterministic reward mechanics topackages/agent_mechanics/island_reward_update.py. - Do not hand-edit
islands/ISLANDS.json, and never writestate/ISLANDS.json. The run-level helper must load hypotheses, apply decay/reward, and persist the canonicalislands/ISLANDS.jsonartifact. - After the run-level helper returns, reload canonical
islands/ISLANDS.jsonand confirm the selected island now has nonzerovisit_countand nonzerodecayed_visits; the selected islandvisit_countmust also cover the completed single-island round receipts that selected it. - If the selected island metrics do not validate after a single-island closeout, stop before the next routing refresh, run
python -m tools.validation.contract_validation <run_dir> --skill hypothesis-evolution-loop, and report a resumable blocked state instead of continuing on stale UCB state. - Newly created islands must remain unvisited until they are later selected by a completed single-island round: verify
decayed_reward = 0.0,decayed_visits = 0.0, andvisit_count = 0after calling the initialization helper. - Persist only canonical island fields. Do not add dashboard-derived or router-derived fields such as
hypothesis_ids,ucb_score, orstrategy_labeltoislands/ISLANDS.json. - The lower-level
tools.update_single_island_reward(...),tools.compute_single_island_reward(...), andtools.apply_decayed_island_update(...)surfaces are internal/testing fallbacks only for in-memory mechanics; do not use them as the host-agent evolution-loop persistence path. - Use
from tools import evaluate_convergenceas the canonical convergence-counter update surface after the child's final top-k membership is known. - The convergence helper is implemented in
packages/agent_mechanics/convergence_check.py. - Use
from tools import append_evolution_round_recordas the canonical append-only write surface forstate/EVOLUTION_ROUNDS.jsonlafter the child has completed review, proximity, ranking, and convergence updates. state/EVOLUTION_ROUNDS.jsonlis the completed round receipt. It does not replacestate/STRATEGY_DECISIONS.jsonl, and it must not be used to rewrite prior routing decisions.- The round receipt's
placement_match_idsandranked_match_idsmust be child-owned closeout refs for that round only:- placement refs require
match_strategy = placement_tournamentandhypothesis_1_id = child_hypothesis_id - ranked refs require
match_strategy = ranked_tournamentandhypothesis_1_id = child_hypothesis_id - duplicate match IDs are invalid
- later matches where the child appears as
hypothesis_2_idmay remain in the child's lifetimeHYPOTHESIS.jsonrefs, but they must not be copied into this earlier round receipt
- placement refs require
- After appending a completed round receipt, update
state/EVOLUTION_STATE.jsonfrom the same convergence helper output and refreshstate/STRATEGY_PLAN.json; do not leave pre-round router signals as the current plan. - The referenced
continue_evolutiondecision must be a canonical router record frompython -m tools.policy.plan_strategy <run_dir>with router-level signals. Do not add child IDs, chosen concrete strategies, proximity statuses, tournament IDs, top-k entry results, or convergence transitions tostate/STRATEGY_DECISIONS.jsonl. - Treat the referenced router signals as a replayable pre-round state contract:
signals.hypothesis_countandsignals.viable_hypothesis_countare the counts before the child is created.signals.convergence_countis the value before the child is created and must become the round receipt'sconvergence_count_before.signals.entered_top_k_last_roundmust reflect the prior completed round when one exists.signals.top_hypothesis_idsmust become the round receipt'sprevious_top_k_ids.signals.selected_parent_idsmust reference viable hypotheses already persisted before the child is created.signals.selected_island_idsmust match the selected parents' persistedisland_idvalues.
- A completed evolution round must be replayable from exactly one router decision, one evolved child, one review bundle, one proximity receipt, completed ranking artifacts with ranking update receipt coverage, one convergence update, and one appended round receipt.
- After emitting the child hypothesis, you must:
- run
hypothesis-review-pipeline - run
insights-from-reviewswhen the child is viable - run
hypothesis-proximity-updatefor each viable child hypothesis - run
hypothesis-ranking-pipeline - for
signals.selection_strategy == single_island, calltools.update_run_single_island_reward(run_dir, selected_island_id, candidate_hypothesis.id, decay_factor)exactly once after the child's final Elo and viability state are known, and use the helper-persisted canonicalislands/ISLANDS.jsonartifact as the source of truth - after that single-island reward update, verify the helper-persisted selected island has nonzero
visit_countanddecayed_visits; do not append a completed round receipt or refresh routing if the selected island metrics are stale - for
signals.selection_strategy == multi_island, assign the child a new non-emptyisland_id, calltools.ensure_run_islands_for_hypotheses(run_dir, [candidate_hypothesis.id]), verify the created island remains unvisited, and do not apply the single-island reward helper to that cross-island child - call
tools.evaluate_convergence(candidate_hypothesis.id, previous_top_k_ids, current_top_k_ids, current_convergence_count)exactly once after the final ranked frontier is known, then persist bothenteredTopKLastRoundandconvergenceCountexactly as returned - call
tools.append_evolution_round_record(run_dir, record)exactly once with anEvolutionRoundRecordContractthat records the decision index, selected parent IDs, selected island IDs, chosen concrete evolution strategy, child hypothesis ID, child island ID, proximity receipt status, child-owned placement/ranked tournament match IDs, previous/current top-k IDs,entered_top_k, and convergence counts before and after the round - update
state/EVOLUTION_STATE.json
- run
- When
next_action: return_to_generation, leave the evolution loop, run the requested generation pass, then refresh the evolution plan again. - Do not skip proximity because no embedding vector is already present. The bridge owns provider invocation and records a receipt/status when the provider is disabled, unavailable, invalid, or failed.
- Do not generate, infer, or fabricate embeddings in prompt output. Let ranking use its documented receipt-gated missing-graph fallback only after
hypothesis-proximity-updatehas recorded a skipped or failed receipt/status. - The evolution-round
proximity_receipt_statusmust be copied from the persisted per-childstate/proximity_receipts/<child_hypothesis_id>.jsonreceipt. Do not infer this field from environment variables, provider availability, or dashboard state. - The loop is complete only when
state/EVOLUTION_STATE.jsonrecords a terminal stop reason and the routing audit log contains one decision record per evolved hypothesis. - When writing
state/EVOLUTION_STATE.json, persist the activestopPolicy,iterationPolicy,iterationBand, andsafetyMaxIterationsmetadata from the effective run configuration and policy artifacts. - Only record
stopReason: safety_iteration_limit_reachedwheniterationCount >= RESOLVED_RUN_CONFIG.convergence.safety_max_iterationsandsafetyLimitHitistrue. - When consumed by a host agent, run
python -m tools.validation.contract_validation <run_dir> --skill hypothesis-evolution-loopafter each evolved hypothesis is persisted. - When the loop reports
status: completed, runpython -m tools.validation.verify_pipeline_completion <run_dir> --skill hypothesis-evolution-loop. - The final research overview remains a separate step in
research-overview-pipeline. - Treat
completeas a completion-verifier outcome after overview, not as astate/STRATEGY_PLAN.jsonroute.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 147 lines · 20 tokens per session scan A 6b6eebab4697
hypothesis-evolution-loop is a skill published in the GitHub repository panjose/Co-Scientist (5 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 20 tokens to every session and 4,141 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
figure-style
Publication-grade correctness and legibility rules for final-deliverable scientific figures, not exploratory plots. Use for a figure that will ship in a report, paper, export, or kept artifact. Covers data fidelity, label economy, color threading, chart choice, layout, and render-then-verify QA without imposing a…
paper-narrative
Judge and reshape the story told by an entire paper figure deck. Use when writing or revising a paper to derive a grounded brief from the manuscript and captions, review the full deck as a handling editor, and hand an ordered figure arc to figure-composer.
remote-compute-ssh
Evaluate and use SSH Remote Compute before choosing where to run GPU, high-memory, parallel, batch, model-inference, bioinformatics, or other long-running scientific work; supports short remote commands and asynchronous jobs with automatic harvest and analysis.
scvi-tools
Probabilistic single-cell RNA-seq with scvi-tools — scVI for a batch-corrected latent space, scANVI for semi-supervised label transfer, and Bayesian differential expression. Reach for this skill to integrate scRNA-seq batches, embed cells for clustering, transfer annotations from a reference onto a query, or score…
customize
Use when the user wants to create or manage a Specialist agent or create, revise, publish, or delete a Skill through the conversational /Customize entry. Routes Skill work to the internal skill-creator and handles Specialist work through the JavaScript host.agents SDK.
esmfold2
Biohub ESMFold2 / ESMFold2-Fast all-atom co-folding (Candido et al. 2026, github.com/Biohub/esm). Single-sequence and MSA modes; protein, DNA, RNA, ligand (CCD/SMILES), modified residues. FoldBench Ab-Ag 50-55%, PPI 70-77% DockQ-pass. Also covers the ESMC-{300M,600M,6B} protein language models from the same release…