normalise_decisions_shape: Coerce a decisions data.frame to the schema the rest of the...

View source: R/io.R

normalise_decisions_shapeR Documentation

Coerce a decisions data.frame to the schema the rest of the package expects: id, human_decision, note, timestamp.

Description

Any column missing from the input is added as a character NA vector. Extra columns are preserved. NULL or a zero-row input returns a properly-shaped empty tibble; the caller can rbind / bind_rows new rows against it without a column-mismatch error.

Usage

normalise_decisions_shape(d)

Arguments

d

A data.frame or NULL.

Details

Used at load time (mod_setup rehydration) and at write time (Screen tab record_decision) so a legacy 1- or 2-column decisions file on disk gets sanitised on its way through the app rather than propagating broken shape into downstream tabs.

Value

A data.frame with at least the four canonical columns.


screenllm documentation built on Sept. 24, 2026, 5:11 p.m.