adam-spec-row-to-r-code: files adae_from_spec.R The R the AI wrote for 14 ADAE variables plus a comparison function, exactly as written (UNRUN when written). run_adae_from_spec.R Harness, not AI code: reads the CDISC pilot files, runs adae_from_spec.R, compares with adam_adae.xpt. Optional 2nd argument: raw (no date conversion; stops with an error, as the first run did), fix (two edits, see below). toy_test.R The AI's 9 hand-derived test rows. All pass. cell_match_by_variable.csv 15 variables x 1,191 records: 17,592 of 17,865 cells match as written; 17,865 after two fixes. cold_answer_open_questions_and_test_plan.txt The AI's open questions and test plan. *_output.txt files Output from a run with R 4.6.1 on 2026-10-24 (workflow page, under Scripts and full run). First run: adae_from_spec.R stops with "can only subtract from Date objects" because haven reads TRTSDT as a Date and the AI code expects a SAS date number. The harness converts it (one line); that is not an AI-code change. The two fixes (argument "fix"): the SOC spelling in the constant SKIN_SOC (a typo in the define text), and ADURN set to missing when ASTDTF is "D" (a rule found in the data, NOT in the define text; take it to the spec owner). The scripts read the public CDISC SDTM/ADaM pilot project files (study CDISCPILOT01). The data are not included. Download the unmodified .xpt files from https://github.com/cdisc-org/sdtm-adam-pilot-project (folder updated-pilot-submission-package/900172/m5/) and put them in one folder. Credit: CDISC; used under the terms in the repository README. Run: Rscript