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:
Downloads:
Linking:
Please use the canonical form
https://CRAN.R-project.org/package=admiralagent
to link to this page.