Skip to content

Gap-Driven Theory Testing workflow - #259

Open
asta-mothership-agent wants to merge 9 commits into
mainfrom
workflow/gap-driven-theory-testing
Open

asta-mothership-agent wants to merge 9 commits into
mainfrom
workflow/gap-driven-theory-testing

Conversation

@asta-mothership-agent

Copy link
Copy Markdown
Contributor

Adds a fifth workflow to the run-workflow skill: Gap-Driven Theory Testing.

What it does

  1. Gathers papers from Paper Finder, a local paper index (asta documents search), or both.
  2. Extracts findings and writes a gap map: knowns, gaps (conflicting, thin, untested link, boundary) and unknowns. The map is checked against the extractions before the person sees it.
  3. Check-in: the person picks the gaps to target.
  4. Re-plans with the chosen gaps, extracts again, and generates theories aimed at them, under explicit scale and specificity rules.
  5. Commits each theory's predictions (statistic, direction, threshold) before any data is opened.
  6. Tests them on independent data, which the person gives or Data Search finds. Verdicts follow Secondary reproduction.
  7. Specifies the experiment or data that would decide each prediction no dataset could decide.

It differs from Data Driven Theory Generation in order: predictions are fixed before the data is seen, so the data is a test rather than material the theories are fitted to.

Changes

  • workflows/gap-driven-theory-testing.md: the workflow.
  • SKILL.md: lists it, and adds Bash(asta documents *) to allowed-tools for the local-index search.

Checks

  • scripts/validate-skills.py: all 26 SKILL.md files valid.
  • tests/test_skills.py, test_plugin_dependencies.py and the other tests that reference skills: 41 passed, 5 skipped.
  • Theorizer flags in the new commands were checked against theorize --help for asta-theorizer 0.1.3. The workflow has not been run end to end.

Follow-up

The asta-flows agent in allenai/asta-mothership-infra installs Theorizer only. Running this workflow there also needs asta-autodiscovery and the asta CLI in its image, and a submodule bump after this merges.

🤖 Generated with Claude Code

A run-workflow workflow that maps what the literature knows and leaves
open, generates Theorizer theories aimed at the gaps, commits their
predictions before any data is opened, tests them on independent data
the person gives or Data Search finds, and specifies the experiment or
data each untested theory still needs. The literature step can search a
local paper index (asta documents) as well as Paper Finder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pavi-rajes pavi-rajes self-assigned this Oct 28, 2026

@rodneykinney rodneykinney left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@asta-mothership You should bump the plugin version number

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@asta-mothership

Copy link
Copy Markdown

AI (claude), replying to @rodneykinney.

I bumped the version from 0.120.0 to 0.121.0 and pushed it to this branch as commit a0e031d.

  • What changed: I used scripts/manage-version.py set 0.121.0, the same tool the Release PRs use. It updated the same seven files as Release 0.120.0 (Release 0.120.0 #254): marketplace.json (all four plugins), pyproject.toml, src/asta/__init__.py, uv.lock, sync-cli-version.sh, the asta-cli skill, and the workspace docs.yml.
  • Why a minor bump: all four plugins share one version number, and a new workflow is a feature.
  • Lockfile: my local uv changed the revision line in uv.lock from 5 to 3. I put it back to 5, so the only lockfile change is the version.
  • Checks: manage-version.py check says all version files agree. validate-skills.py passes for all 26 SKILL.md files. test_workspace_versions.py, test_skills.py and test_plugin_dependencies.py gave 52 passed and 5 skipped.

Your recent Release PRs bump the version in separate commits. If you would rather not have the bump in this PR, I can drop the commit.

@allenai allenai deleted a comment from asta-mothership Oct 28, 2026
Comment on lines +107 to +124
TARGET GAPS FROM THIS RUN'S LITERATURE MAP. Each theory must aim to close at least one
gap below, and name which. Do not restate a known finding as a theory.

KNOWN (a theory must stay consistent with these, or say which one it overturns and why):
- ...
GAPS TO TARGET:
- [G1, conflicting] ...
- [G2, untested link] ...

SCALE AND SPECIFICITY. Each theory must state:
- the system or population, and the level it works at (molecule, cell, organism,
population, ecosystem; or individual, group, institution);
- the variables, by name, each one something that can be measured;
- the direction, and the form where possible (threshold, monotone, interaction);
- the conditions under which it holds, and where it should fail;
- one prediction that would be false if the theory were wrong.
A theory too broad to fail ("X influences Y") or so narrow it repeats one study is
rejected.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a new mission template? This is where you can best influence the theory generation, so I'd add any additional details here you've found for optimizing theorizer.


## Plan

| Step | Agent | What it does | Configuration |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the Agent column makes sense (e.g. Check In or steps 6 and 7 is not an agent). Can we use Name, Description, Configuration for the columns in this table across all the workflows?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI (claude), replying to @charliemcgrady on behalf of Pavi.

Applied to the new workflow here; the other workflows can follow in a separate PR.

Comment on lines +140 to +145
7. **What is missing.** For each prediction that no dataset could decide, write the experiment or data that would decide it:
- the quantity to measure, and in what system or population;
- the design (observational, intervention, natural experiment), and why it identifies the claim;
- the sample size needed at the expected effect size, with the effect size's source;
- whether such data may already exist (a named repository or cohort), or must be collected.
Link each one to the gap it would close. Then ask the person whether they have, or can get, such data. If they give it, it enters at step 5.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you have a separate workflow in another repo which has rules like these, I'd add them here.

asta-mothership-agent and others added 6 commits October 29, 2026 04:54
- One extraction, planned for gap-finding. The gap map comes from a
  Theorizer sweep over the gap-shaped output and inference types, the
  limitations authors state, and the agent's reading across papers.
  A second extraction runs only if a chosen gap needs a missing field.
- New "Identifying gaps" section: gap kinds and where to find them,
  a targeted Paper Finder search for every candidate gap before it is
  listed, a gap entry format, and how to rank gaps.
- Mission template carries only what Theorizer's generator lacks: the
  gaps with their evidence, the knowns, and the testable prediction.
  Theories are generated once generally, then swept over the Theorizer
  types each chosen gap kind calls for.
- "What is missing" gets concrete rules for specifying the study.
- Plan tables in all four Theorizer-based workflows use Name,
  Description, Configuration, as AutoDiscovery exploration does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Revert theory-generation, data-driven-theory-generation and
secondary-reproduction to main. Only Gap-Driven Theory Testing uses
the Name, Description, Configuration columns in this PR.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each kept theory gets a card: rationale, what is known, what is
unknown, what it proposes, how it closes the gap, supporting and
falsifying experiments, and all related evidence. Each experiment
carries a committed prediction and its feasibility: the known
techniques that enable it, each with a paper that used it and its
limits, or "no known technique found" after a Paper Finder search.
The mission asks Theorizer for the same parts, and "What is missing"
starts from the cards.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The person can name a report format; the plan offers it as an option.
By default the run writes report.md as a review article in the style
of Nature Reviews: abstract, key points, what the literature knows,
a gap table with provenance (papers and targeted search), theories
from their cards, a table of test results, the data and experiments
still needed with their feasibility, outlook, references and a
methods appendix. Any format keeps provenance, what the run could not
decide, and confidence. The reply stays a short summary.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
New step 3 learns how the field tests hypotheses and writes, into
field-standards.md: per kind of claim, the test and null distribution,
controls, unit of analysis, correction, effect-size metric, threshold
and robustness checks, counted across the corpus (whose extraction now
records methods) and checked against up to 5 methods-guidance papers
fetched into a separate project. Writing conventions come from the
corpus by default, or from papers the person names. The recipe is shown
at the gap check-in without waiting for approval, and the cards, tests,
missing-experiment specs and report follow it. Later steps renumbered.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When a model call fails, `theorize plan` (asta-theorizer 0.1.3) still
saves a plan with no search query and no schema and prints its usual
next step. Step 1 now checks `load plan --key output.paper_search_query`
and `--key output.extraction_schema` (exit 2 on the empty plan) and
stops if either is missing or empty; later plans are checked the same
way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pavi-rajes
pavi-rajes marked this pull request as ready for review October 29, 2026 17:54
Gap map: start from the competing accounts; knowns written from the
extraction rows with conditions, effect sizes and sample; a preprint and
its published version count as one study; open questions are gaps, not a
separate unknown list; gaps ranked by a scored rule (discrimination,
evidence state, testability); citations by DOI; a search log in the map.

Theory cards: mark results a paper only reports from another study as
"cited within".

Report: a synthesis block (one claim per paragraph, tiered treatment,
conflicts stated in a marked block, primary evidence for mechanisms);
provenance rules (cite only from the run, the citation must make the
claim and point the same way, numbers only from the extraction, authors
from the references); a claim-by-claim citation check against the
extraction and a check for uncited mechanism claims.

From the visual-omission pilot and review of AllenNeuralDynamics/
ComputationalReviewVIP's section-writing skill.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants