Craft · ScienceGuide available

Lemon Agent for Science

One dataset, end to end, with provenance.

Suppose you have a dataset and a question. You want an agent to help clean the data, run analysis, and prepare a paper or poster. You also need to know where every number and figure came from.

The useful foundation is not a chat transcript. It is a small project of plain files that both you and the agent can inspect, rerun, and defend. Nothing here hosts your data or keeps session state.

Start with a reproducible project

Use this shape as a starting point, trimming it to fit the work:

project/
  README.md
  data/
    source-receipt.yml
    analysis.db
  analysis.py
  figures/
  paper.qmd
  references.bib

Ask the agent to create or modify files in this project, not to keep the method in conversation history.

Help me take this dataset toward a reproducible publication. Work only
inside this project. First inspect the files and write a short plan.
Preserve the original data; create source-receipt.yml with provenance and
a checksum before analysis. Load tabular data into the SQLite database
analysis.db, keep transformations in analysis.py, and save every figure
under figures/.

For each reported result, name the code, table, and source data that
produced it. Mark assumptions, units, missing values, exclusions, and
unverified interpretations explicitly. Do not write conclusions stronger
than the evidence. Before finishing, rerun the project from a clean start
and report what did and did not reproduce.

You decide the scientific question, validate the assumptions, interpret the results, and own the conclusions. The agent maintains the pipeline and its receipts.

A path from data to publication

  1. Pin the source. Record a stable identifier, version, retrieval date, license, and checksum before cleaning anything.
  2. Load without erasing. Keep raw data unchanged; put queryable tables and derived results in a local SQLite database.
  3. Make transformations executable. Units, filters, exclusions, model settings, and random seeds belong in code or configuration.
  4. Generate figures from the analysis. Do not hand-edit a plot after export. Change the code and render it again.
  5. Write around live artifacts. Quarto can produce papers, posters, and slides from the same Markdown, citations, code, and figures.
  6. Reproduce before publishing. A clean run should rebuild every result, or identify the exact missing dependency or input.

Starter tools

uv

uv creates a pinned Python environment and records dependencies for the project.

brew install uv
uv init

SQLite and Jupytext

SQLite needs no install: Python’s standard library reads and writes it (sqlite3), and sqlite-utils adds a friendly command line for loading, querying, and exporting (the same tool the knowledge-work craft uses for claim ledgers). Jupytext pairs notebooks with plain-text Python or Markdown when exploratory work needs a notebook view.

brew install sqlite-utils
uv add jupytext

Quarto

Quarto renders Markdown, citations, code, and figures into HTML, PDF, presentations, and poster formats.

brew install --cask quarto

This is a starter stack, not a prescription. Use domain tools where they are stronger; keep the same contracts around inputs, parameters, outputs, and provenance.

The worked example being built

The first full demonstration will use one pinned public astronomy dataset and one question: can known transiting exoplanets be recovered from published TESS light curves, with depth and period reported reproducibly? The stages are fetch, clean, detrend, search, fit, and report. Each stage must declare its inputs, parameters, artifacts, and receipt.

The demonstration graduates when a stranger can rebuild at least one figure and one fit from the repository alone. Until then, the general project guide above is usable; the astronomy pipeline and installable science skill are still in development.

Watch out