Implementation:AIScientists Dev WorldSeed write paper handle
| Knowledge Sources | |
|---|---|
| Domains | Research_Automation, Verification |
| Last Updated | 2026-10-26 18:00 GMT |
Overview
Concrete DSL effect handler for the `write_paper` action that creates a paper entity in verifying status, validates evidence and citations, snapshots the hypothesis, and enqueues auto-verification.
Description
The handle function in `handlers/write_paper.py` processes the `write_paper` action. It:
- Validates evidence experiments exist and belong to the author
- Validates cited papers exist
- Validates hypothesis ownership and evidence-hypothesis matching (structural fake-paper protection)
- Snapshots the hypothesis content into the paper (making it public)
- Extracts expected val_loss from the claim or first evidence experiment
- Creates a `paper` entity in `verifying` status
- Enqueues a `VerifyRequest` for the worker to re-run `method_commit`
- Renders the paper to markdown
The worker transitions the paper to `under_review` (within tolerance) or `contested` (outside) once verify completes.
Usage
This is a DSL effect handler, invoked by the engine when an agent calls the `write_paper` action. Not called directly.
Code Reference
Source Location
- Repository: WorldSeed
- File: src/worldseed/autoresearch/handlers/write_paper.py
Signature
def handle(
store: StateStore,
event_log: EventLog,
ctx: dict[str, Any],
tick: int,
) -> None:
"""Handle the write_paper action."""
Import
from worldseed.autoresearch.handlers.write_paper import handle
Related Pages
Implements Principle
Requires Environment
- Environment:AIScientists_Dev_WorldSeed_Python_3_11_Engine
- Environment:AIScientists_Dev_WorldSeed_EC2_GPU_Training
- Environment:AIScientists_Dev_WorldSeed_Baseline_Training
- Environment:AIScientists_Dev_WorldSeed_Autoresearch_Agent_Runtime