Co scientist pipeline
Scientific agent skills for Claude Code and Codex that turn research goals into auditable hypothesis generation, review, ranking, evolution, and synthesis.
npx -y skills add panjose/Co-Scientist --skill co-scientist-pipelineAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 4 stars4 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Run the full Co-Scientist pipeline for one research run.
SKILL.md
12.9 KB, as published. Nobody here has run it
co-scientist-pipeline
Goal:
- Run the full Co-Scientist pipeline for one research run.
Inputs:
- one run directory root
- run-local
input.md - optional compatibility
config.yaml - optional
resumeflag - existing run artifacts when resuming
Outputs:
- updated run artifacts
RUN_POLICY.yamlstate/POLICY_DECISION.jsonstate/RESOLVED_RUN_CONFIG.jsonstate/STRATEGY_PLAN.jsonstate/STRATEGY_DECISIONS.jsonlstate/EVOLUTION_ROUNDS.jsonlstate/PIPELINE_STATE.jsonstate/CURRENT_STAGE.jsonstate/HOST_AGENT_HANDOFF.jsonwhen a host-agent handoff is prepared- final research overview when convergence is reached
Sub-skills:
research-confighypothesis-generation-pipelinehypothesis-evolution-loopresearch-overview-pipeline
Required shared references:
../shared-references/artifact-contract.md../shared-references/completion-contract.md../shared-references/policy-contract.md../shared-references/resolved-config-contract.md../shared-references/strategy-contract.md../shared-references/state-contract.md../shared-references/integration-contract.md../shared-references/execution-modes.md../shared-references/schema-index.md
Context Loading:
- Open
../shared-references/integration-contract.md,../shared-references/strategy-contract.md,../shared-references/completion-contract.md, and../shared-references/schema-index.mdbefore dispatching any sub-skill. - Before writing top-level control-plane artifacts, read the exact Python contracts for:
RUN_POLICY.yamlandstate/POLICY_DECISION.jsonfrompackages/agent_contracts/policy.pyresearch_plan/RESEARCH_PLAN.jsonfrompackages/agent_contracts/research_plan.pywhen dispatchingresearch-configstate/RESOLVED_RUN_CONFIG.jsonfrompackages/agent_contracts/resolved_config.pystate/STRATEGY_PLAN.jsonandstate/STRATEGY_DECISIONS.jsonlfrompackages/agent_contracts/strategy_plan.pystate/PIPELINE_STATE.jsonandstate/CURRENT_STAGE.jsonfrompackages/agent_contracts/pipeline_runtime.pystate/EVOLUTION_STATE.jsonandstate/COMPLETION_DECISION.jsonfrompackages/agent_contracts/pipeline_control.py
- If
resumeistrue, inspectstate/PIPELINE_STATE.jsonandstate/CURRENT_STAGE.jsonbefore dispatching any sub-skill. - Preserve existing dashboard links, handoff artifacts, and manifest history during resume work.
Execution Contract:
- Host-agent mode should consume this skill directly from the repository-local
skills/tree. - This top-level skill owns run-level orchestration and control-plane sequencing. It should not manually re-specify field-level hypothesis, review, ranking, or overview payloads that are already owned by downstream skills plus their exact Python contracts.
- Resume and routing decisions must come from persisted artifacts, not hidden process memory.
- Fresh bootstrap may materialize missing control-plane artifacts, but resumed work must preserve existing valid control-plane artifacts and rebuild only the missing ones.
- Before dispatching generation, review, insights, proximity, ranking, or evolution work, refresh
state/STRATEGY_PLAN.json. - Refresh
state/STRATEGY_PLAN.jsonthroughpython -m tools.policy.plan_strategy <run_dir>when resuming persisted routing state for the active round or substage. - Use
python -m tools.policy.plan_strategy <run_dir>when restoring persisted routing state. Add an explicit phase override such as--phase Configuration,--phase Generation, or--phase Evolutiononly when the top-level workflow is intentionally forcing a new stage transition rather than restoring the persisted one. - Use
from tools import sync_pipeline_stage_artifactsas the canonical paired write surface when entering any active substage. - The stage-sync helper is implemented in
packages/run_artifacts/stage_sync.py. - Before dispatching any sub-skill, call
tools.sync_pipeline_stage_artifacts(...)sostate/PIPELINE_STATE.jsonandstate/CURRENT_STAGE.jsonstay aligned. - When a substage is active,
state/PIPELINE_STATE.json currentSkillmust match the canonical skill for thatcurrentPhase. - When a substage is an active runtime phase (
Generation,Evolution,Reflection,Insights from Reviews,Proximity,Ranking, orResearch Overview),state/PIPELINE_STATE.json statusmust berunningunless the run is terminal. Do not leave active work asnot_started. run_configurationis the explicit routing action for preparing or repairingresearch_plan/RESEARCH_PLAN.json. Do not treat configuration as an implicit bootstrap side effect.inspect_stateis a blocked control-plane action. Do not continue automatic generation, review, or evolution work until the persisted routing artifacts are inspected or repaired.- Do not synthesize placeholder hypotheses, reviews, tournaments, proximity receipts, embeddings, or evolution-round receipts to make progress.
- If the required sub-skill or canonical tool cannot be executed, stop and report a resumable blocked state instead of writing low-information artifacts.
- Do not dispatch
hypothesis-generation-pipelineuntilresearch_plan/RESEARCH_PLAN.jsonexists and validates through the canonicalResearchPlanContract. - Generation seeding must follow the active
state/STRATEGY_PLAN.jsonexactly. On a fresh run, execute one generated hypothesis per selected generation strategy instead of collapsing the seed frontier into a single batch summary. - Evolution must remain round-based: one refreshed routing plan, one chosen parent set, one chosen concrete evolution strategy, and at most one new child hypothesis per round.
- 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.
- The appended round receipt must include only child-owned, duplicate-free placement/ranked match IDs for that round; do not copy later opponent-side lifetime refs from
HYPOTHESIS.jsoninto an earlierEVOLUTION_ROUNDS.jsonlrecord. - Evolution safety metadata must come from
state/RESOLVED_RUN_CONFIG.json; do not rewriteEVOLUTION_STATE.safetyMaxIterationsfrom the current iteration count or from prompt memory. safety_iteration_limit_reachedis valid only wheniterationCount >= RESOLVED_RUN_CONFIG.convergence.safety_max_iterationsandsafetyLimitHitistrue.completion_drivencontrols stop semantics, whilehuman_checkpointcontrols where the host agent may pause for the user. Do not conflate them.- When the effective policy is
iteration_policy = completion_drivenandhuman_checkpoint = auto, keep executing generation and evolution work autonomously until the routing plan reachesgenerate_overvieworinspect_state, or until validation / safety ceilings block further work. - Treat
completeas a completion-verifier outcome, not as astate/STRATEGY_PLAN.json next_action. - In that autonomous mode, do not ask the user whether to continue after each evolution round or each new child hypothesis.
- If the host-agent turn must stop before a terminal route is reached, say explicitly that the run is paused, convergence has not been reached, persisted state is resumable, and the next recommended action is continue evolution via resume or an explicit continue request.
- When
human_checkpoint = before_overview, pause only after evolution reaches an overview-ready routing state and beforeresearch-overview-pipeline. - When
human_checkpoint = before_completion, pause only after overview work is complete and before final completion writeback. - When
human_checkpoint = every_major_stage, pause only at major stage boundaries and not merely because one evolution child finished.
Execution Steps:
- Open the required shared references, then open
skills/shared-references/schema-index.mdand the exact Python contracts for any top-level control-plane artifact this run will write or update. - If the run is fresh, materialize the initial control-plane artifacts in canonical form:
RUN_POLICY.yamlstate/POLICY_DECISION.jsonstate/RESOLVED_RUN_CONFIG.jsonstate/STRATEGY_PLAN.json
- If the run is resuming, inspect
state/PIPELINE_STATE.jsonandstate/CURRENT_STAGE.json, preserve existing valid control-plane artifacts, and rebuild only the missing artifacts needed to continue safely. - Skip already completed phases listed in
completedSkillsonly when the required artifacts for that phase are present and valid. - Before each configuration dispatch, generation batch, or evolution round, refresh
state/STRATEGY_PLAN.jsonthroughpython -m tools.policy.plan_strategy <run_dir>for persisted-state refreshes, or add--phase <...>only when explicitly forcing a new stage route. - If
next_actionisrun_configuration, first calltools.sync_pipeline_stage_artifacts(run_dir, current_phase="Configuration", current_skill="research-config"), then executeresearch-config, validateresearch_plan/RESEARCH_PLAN.json, and refresh the strategy plan again before any generation work. - If
next_actionisinspect_state, pause automatic execution and inspect or repair the persisted routing artifacts before continuing. - If
next_actionisrun_generationorreturn_to_generation, first calltools.sync_pipeline_stage_artifacts(run_dir, current_phase="Generation", current_skill="hypothesis-generation-pipeline"), then executehypothesis-generation-pipelineonce per selected generation strategy, validate the writes, and refresh the strategy plan again. - If
next_actionisrun_review,run_insights,run_proximity, orrun_ranking, first calltools.sync_pipeline_stage_artifacts(...)for the exact resumed substage so both state artifacts stay aligned, then execute that substage before attempting any new evolution child. - If
next_actioniscontinue_evolution, first calltools.sync_pipeline_stage_artifacts(run_dir, current_phase="Evolution", current_skill="hypothesis-evolution-loop"), then runevolution-strategy-supervisorto choose exactly one concrete evolution strategy fromselected_evolution_strategies, create exactly one new child hypothesis fromsignals.selected_parent_ids, and run the downstream child substage work before closing the round.- Treat
state/STRATEGY_DECISIONS.jsonlas canonical router-planning audit only. - Do not add child hypothesis IDs, chosen concrete strategies, proximity statuses, tournament match IDs, top-k entry results, or convergence transitions to strategy decisions; write those through
state/EVOLUTION_ROUNDS.jsonl. - If an evolve, review, proximity, ranking, convergence, or round-receipt substage cannot run through its canonical skill or tool, pause in a resumable blocked state instead of fabricating the missing artifact.
- Treat
- After each closed evolution round, refresh
state/STRATEGY_PLAN.jsonagain. When the effective policy iscompletion_drivenwithhuman_checkpoint = auto, continue automatically into the next round unless the refreshed plan now requiresgenerate_overvieworinspect_state. - If the effective
human_checkpointrequests a pause (before_overview,before_completion, orevery_major_stage), stop only at that configured checkpoint boundary and record enough state for a clean resume. Do not introduce per-round confirmation prompts inautomode. - If execution stops for any other reason before convergence or a terminal route, produce a paused handoff: current convergence has not been reached, state has been persisted, and the next action is continue evolution through resume or an explicit continue request.
- After each major phase write, run
python -m tools.validation.contract_validation <run_dir> --skill co-scientist-pipeline. - After the evolution loop reports a terminal stop reason, run
python -m tools.validation.verify_pipeline_completion <run_dir> --skill co-scientist-pipeline. - If overview generation is recommended, first call
tools.sync_pipeline_stage_artifacts(run_dir, current_phase="Research Overview", current_skill="research-overview-pipeline"), then runresearch-overview-pipeline. After overview generation, runpython -m tools.validation.verify_pipeline_completion <run_dir> --skill co-scientist-pipelineagain and recordstate/COMPLETION_DECISION.jsononly when the verifier now recommendscompleteor an explicit override rationale is supplied. - Do not mark the pipeline complete after refining each seed hypothesis only once. Completion requires a replayable round history in
state/STRATEGY_DECISIONS.jsonland completed round receipts instate/EVOLUTION_ROUNDS.jsonl.
Completion Rule:
- This skill is complete only when the required top-level control-plane artifacts are valid, downstream phase work has been dispatched according to the refreshed routing plan, and any final completion or overview transition has been recorded in canonical form.