admiralagent: Spec-Driven ADaM Code Generation with LLM-Translated Layers

Translates Pinnacle 21 (P21)-style ADaM (Analysis Data Model) specifications into executable 'admiral' code with validation comments. An LLM (large language model, optional, via 'ellmer') maps each spec variable's free-text derivation onto a closed vocabulary of derivation layers (a structured JSON intermediate representation (IR)); a deterministic compiler renders the IR into 'admiral'/'metatools' code with 'CHECK' validation comments and writes provenance sidecars. Ships with a zero-dependency rule-based classifier as baseline and fallback; the LLM never writes R code directly and all model output is validated against the closed vocabulary before use. The specification structure follows the CDISC (Clinical Data Interchange Standards Consortium) Analysis Data Model standard <https://www.cdisc.org/standards/foundational/adam>.

Version: 0.1.1
Depends: R (≥ 4.1)
Imports: glue, jsonlite, digest, stats, utils
Suggests: xml2, ellmer, metacore, admiral, metatools, readxl, testthat (≥ 3.0.0), rlang, tibble, knitr, rmarkdown, dplyr, haven, pharmaversesdtm, pharmaverseadam
Published: 2026-11-28
DOI: 10.32614/CRAN.package.admiralagent (may not be active yet)
Author: Jaime Yan [aut, cre]
Maintainer: Jaime Yan <yanmingyunmt at gmail.com>
BugReports: https://github.com/yanmingyu92/admiralagent/issues
License: MIT + file LICENSE
URL: https://github.com/yanmingyu92/admiralagent
NeedsCompilation: no
Materials: README, NEWS
CRAN checks: admiralagent results

Documentation:

Reference manual: admiralagent.html , admiralagent.pdf
Vignettes: admiralagent: Spec-to-ADaM with LLM-Translated Layers (source, R code)

Downloads:

Package source: admiralagent_0.1.1.tar.gz
Windows binaries: r-devel: not available, r-release: not available, r-oldrel: not available
macOS binaries: r-release (arm64): admiralagent_0.1.1.tgz, r-oldrel (arm64): not available, r-release (x86_64): not available, r-oldrel (x86_64): not available

Linking:

Please use the canonical form https://CRAN.R-project.org/package=admiralagent to link to this page.