daydream
Daydream CLI docs

Corpus preparation

Capture and freeze

Configure review credentials before capture. --dataset-store enables capture and selects the local store. Capture retains unredacted findings, trajectories, provenance, and available original tasks. Review captured content before sharing.

REPOSITORY_ROOT="$(git rev-parse --show-toplevel)"
RECORD_STORE="$HOME/.daydream/dataset"
daydream --review --non-interactive --dataset-store "$RECORD_STORE" "$REPOSITORY_ROOT"

Records are immutable. Identical retries do nothing. Conflicting identities or corrupt records fail validation. Do not edit sealed records.

Set the observation cutoff to an ISO 8601 timestamp:

OBSERVED_BEFORE="2026-10-17T23:59:59Z"
SNAPSHOT_RECEIPT="$HOME/daydream-snapshot.json"
daydream corpus dataset snapshot --store "$RECORD_STORE" \
  --observed-before "$OBSERVED_BEFORE" > "$SNAPSHOT_RECEIPT"
SNAPSHOT_ID="$(python3 -c 'import json,sys; print(json.load(open(sys.argv[1]))["snapshot_id"])' "$SNAPSHOT_RECEIPT")"

Snapshots freeze membership and content digests. Optional --valid-before TIME narrows valid-time eligibility. After adding observations or judgments, create a new snapshot and update SNAPSHOT_ID. Existing snapshots remain unchanged.

Add outcome evidence

Use the corpus commands for harvesting and run labels. Harvest requires GitHub credentials and updates network caches or repository clones. Row failures retain acquired evidence and return 1. Human judgments append observations. Changed evidence reopens judgments. Keep disposable adjudication queues outside the record store. Use daydream corpus adjudicate --help for queue and export arguments.

Build offline

Check source licenses and permissions before training or sharing content. Use a dedicated output directory:

PROJECTION_DIRECTORY="$HOME/daydream-corpus"
daydream corpus build --store "$RECORD_STORE" --snapshot-id "$SNAPSHOT_ID" \
  --out "$PROJECTION_DIRECTORY/corpus.jsonl"

Build validates provenance and excludes benchmark holdout repositories. The parent of --out receives corpus.jsonl, deterministic splits, lineage, and an adjudication report. SHA256SUMS records digests. _SUCCESS marks complete output. --as-of TIME narrows eligibility within the snapshot. --dry-run validates without retaining output.

To prepare classifier and language-model inputs offline:

PREPARATION_DIRECTORY="$HOME/daydream-prepared-corpus"
daydream train --projection "$PROJECTION_DIRECTORY" --out "$PREPARATION_DIRECTORY" \
  --stage stage0 --stage stage1 --stage stage2

Select these stages explicitly, in order. Stage 0 requires accepted and rejected gold findings in the corpus and its holdout split. Stage 1 writes accepted completions. Stage 2 writes frozen tasks and captured diffs. These stages do not fine-tune language-model weights. manifest.json locks inputs. Changed inputs require a fresh output directory. See preparation arguments and reward calibration for secondary controls.

Exchange records

Follow the record workflow for private Hugging Face publication and download. Publication requires huggingface_hub and a dataset-write token. Publication sends records and observations to the selected private dataset. Transport failures retain queued records for retry. Download requires an exact lowercase 40-character commit hash and a fresh destination. Create a snapshot in the downloaded store before building or adjudicating.

Back to Daydream