panjose/Co-Scientist / skills/hypothesis-generation-pipeline
hypothesis-generation-pipeline
VerifiedDispatch one enabled generation strategy for a given `ResearchPlan`.
hypothesis-generation-pipeline
Goal:
- Dispatch one enabled generation strategy for a given
ResearchPlan.
Inputs:
ResearchPlan- active
state/STRATEGY_PLAN.json - one enabled generation
strategy - optional resume context from
state/PIPELINE_STATE.json
Outputs:
hypotheses/<id>/HYPOTHESIS.jsonhypotheses/<id>/HYPOTHESIS.mdhypotheses/<id>/ORIGIN.jsonliterature/queries/<query_id>/*whenhypothesis-generate-literatureis selectedhypotheses/<id>/REVIEW/*.json- updated
meta/INSIGHTS_FROM_REVIEWS.jsonwhen the hypothesis is viable - updated proximity receipt/status artifacts, plus
state/PROXIMITY_GRAPH.jsonwhen the embedding bridge succeeds - updated
tournaments/*.json - updated
islands/ISLANDS.json - updated
state/PIPELINE_STATE.json
Sub-skills:
hypothesis-generate-literatureliterature-searchhypothesis-generate-debatehypothesis-generate-assumptionshypothesis-review-pipelineinsights-from-reviewshypothesis-proximity-updatehypothesis-ranking-pipeline
Context Loading:
- Open
skills/shared-references/schema-index.md. - Read
packages/agent_contracts/research_plan.pybefore consumingresearch_plan/RESEARCH_PLAN.jsonas the canonical generation brief. - Read
packages/agent_contracts/strategy_plan.pybefore consumingstate/STRATEGY_PLAN.jsonas the active generation-stage routing input. - Read
packages/agent_contracts/hypothesis.pybefore dispatching any atomic generation skill that will writehypotheses/<id>/HYPOTHESIS.json. - Read
packages/agent_contracts/literature.pyandskills/shared-references/literature-search-contract.mdbefore dispatchinghypothesis-generate-literature. - Read
packages/agent_contracts/state.pybefore assigning or updatingislands/ISLANDS.json. - Read
packages/agent_contracts/pipeline_runtime.pybefore updatingstate/PIPELINE_STATE.json. - Read
state/STRATEGY_PLAN.jsonand confirm the current round permits the selected generation strategy. - Read
RUN_POLICY.yamlwhen review rigor or downstream optional review behavior depends on the effective run policy.
Execution Contract:
- This pipeline skill does not own hidden prompt templates.
state/STRATEGY_PLAN.jsonis a routing input to this skill, not a generation-stage artifact that this skill may rewrite ad hoc.research_plan/RESEARCH_PLAN.jsonis a required canonical input. If it is missing or invalid, stop immediately and return control to the top-level workflow or configuration stage instead of attempting generation.- Append-only routing audit artifacts such as
state/STRATEGY_DECISIONS.jsonlremain owned by the top-level orchestration layer and the canonical router surface inpython -m tools.policy.plan_strategy <run_dir>. - It coordinates downstream generation, review, insights, proximity, and ranking skills; those downstream skills remain responsible for the field-level canonical shapes of the artifacts they write.
- The selected generation strategy must be consistent with
state/STRATEGY_PLAN.json. - When the selected generation strategy is
literature_exploration_generation, the dispatchedhypothesis-generate-literatureskill must calltools.search_literature(run_dir, request)and consume a non-blockedEvidenceBundleContractbefore writing a literature-grounded hypothesis. - The generation pipeline must not accept prompt-invented literature evidence in place of
literature/queries/<query_id>/EVIDENCE_BUNDLE.json. - On a fresh run, execute one generated hypothesis per selected generation strategy so the initial frontier mirrors the full seed set instead of collapsing to a single synthetic output.
- On a regeneration pass triggered from evolution, execute one generated hypothesis per selected generation strategy and then refresh the evolution plan before continuing.
- After each generated hypothesis is written, immediately run:
hypothesis-review-pipelineinsights-from-reviewswhen the hypothesis is viablehypothesis-proximity-updatefor each viable hypothesishypothesis-ranking-pipeline
- The generation pipeline must 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. Proceed to ranking through the documented receipt-gated fallback path only after
hypothesis-proximity-updatehas recorded a skipped or failed receipt/status. - For initial frontier seeding, assign one non-empty
island_idto each viable generated hypothesis, then calltools.ensure_run_islands_for_hypotheses(run_dir)before the round is considered complete. - Newly created seed islands are initialization records only: they must keep
decayed_reward = 0.0,decayed_visits = 0.0, andvisit_count = 0. - Initial frontier island assignment is distinct from the later single-island reward / decay mechanics in
hypothesis-evolution-loop; do not applytools.update_single_island_reward(...),tools.update_run_single_island_reward(...), or any manual reward/visit increment during seeding. - Persist only canonical island fields. Do not add dashboard-derived or router-derived fields such as
hypothesis_ids,ucb_score, orstrategy_labeltoislands/ISLANDS.json.
Execution Steps:
- Open
skills/shared-references/schema-index.md, then readpackages/agent_contracts/research_plan.py,packages/agent_contracts/strategy_plan.py,packages/agent_contracts/hypothesis.py,packages/agent_contracts/literature.py,packages/agent_contracts/state.py, andpackages/agent_contracts/pipeline_runtime.pybefore consuming generation-stage routing state or performing any directly managed generation-stage write. - Read
research_plan/RESEARCH_PLAN.json, activestate/STRATEGY_PLAN.json, and relevant policy context. - If the research plan artifact is missing or invalid, stop immediately. Do not dispatch any generation strategy.
- Confirm that the selected generation strategy is allowed for the active round.
- Dispatch exactly one matching atomic generation skill for the current strategy and let that sub-skill write the canonical hypothesis and origin artifacts. For
literature_exploration_generation, require the sub-skill to calltools.search_literature(run_dir, request)and preserve the resulting literature artifacts. - Run
hypothesis-review-pipelinefor the newly created hypothesis. - If the hypothesis remains viable, run
insights-from-reviews. - Run
hypothesis-proximity-updatefor each viable hypothesis by callingtools.update_hypothesis_proximity(run_dir, hypothesis_id)through that skill. If the bridge records a skipped, disabled, failed, or provider-unavailable receipt/status, preserve it and continue to ranking without fabricating placeholder embeddings. - Run
hypothesis-ranking-pipeline. - For initial frontier seeding, assign exactly one non-empty
island_idto each viable generated hypothesis, calltools.ensure_run_islands_for_hypotheses(run_dir), and verify the resulting canonicalislands/ISLANDS.jsoncontains one unvisited island record per viable seed hypothesis. - Update
state/PIPELINE_STATE.jsonas required by the top-level workflow and refreshed downstream status. - Do not append or rewrite
state/STRATEGY_DECISIONS.jsonlfrom this skill. If the caller needs a routing refresh or new decision record, return control to the top-level orchestration layer orstrategy-router. - Run
python -m tools.validation.contract_validation <run_dir> --skill hypothesis-generation-pipelinebefore declaring completion.
Completion Rule:
- This skill is complete only when the selected generation strategy has produced exactly one canonical hypothesis candidate, required downstream review and frontier-upkeep work has been dispatched, and any directly managed state or island updates validate.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |