{
  "_id": "6b040a52b6d08ed7e3d85981",
  "Package": "admiralagent",
  "Title": "Spec-Driven ADaM Code Generation with LLM-Translated Layers",
  "Version": "0.1.1",
  "Date": "2026-10-21",
  "Authors@R": "person(\"Jaime\", \"Yan\", role = c(\"aut\", \"cre\"), email = \"yanmingyunmt@gmail.com\")",
  "Description": "Translates Pinnacle 21 (P21)-style ADaM (Analysis Data\nModel) specifications into executable 'admiral' code with\nvalidation comments. An LLM (large language model, optional,\nvia 'ellmer') maps each spec variable's free-text derivation\nonto a closed vocabulary of derivation layers (a structured\nJSON intermediate representation (IR)); a deterministic\ncompiler renders the IR into 'admiral'/'metatools' code with\n'CHECK' validation comments and writes provenance sidecars.\nShips with a zero-dependency rule-based classifier as baseline\nand fallback; the LLM never writes R code directly and all\nmodel output is validated against the closed vocabulary before\nuse. The specification structure follows the CDISC (Clinical\nData Interchange Standards Consortium) Analysis Data Model\nstandard <https://www.cdisc.org/standards/foundational/adam>.",
  "License": "MIT + file LICENSE",
  "Encoding": "UTF-8",
  "URL": "https://github.com/yanmingyu92/admiralagent",
  "BugReports": "https://github.com/yanmingyu92/admiralagent/issues",
  "VignetteBuilder": "knitr",
  "Config/testthat/edition": "3",
  "Config/roxygen2/version": "8.1.1",
  "Repository": "https://yanmingyu92.r-universe.dev",
  "Date/Publication": "2026-10-23 22:51:26 UTC",
  "RemoteUrl": "https://github.com/yanmingyu92/admiralagent",
  "RemoteRef": "HEAD",
  "RemoteSha": "7e80c369d898522a63c071181c7f9667bd2e0884",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-11-23 09:35:44 UTC",
    "User": "root"
  },
  "Author": "Jaime Yan [aut, cre]",
  "Maintainer": "Jaime Yan <yanmingyunmt@gmail.com>",
  "_user": "yanmingyu92",
  "_type": "src",
  "_file": "admiralagent_0.1.1.tar.gz",
  "_fileid": "https://r2.ropensci.org/64e56a913929dbac1b60f5717b56803467e80b2956f05844e877098f9c5f0c4b",
  "_filesize": 489374,
  "_sha256": "64e56a913929dbac1b60f5717b56803467e80b2956f05844e877098f9c5f0c4b",
  "_expires": "2027-03-03T09:41:36.000Z",
  "_created": "2026-11-23T09:35:44.000Z",
  "_published": "2026-11-23T09:41:38.651Z",
  "_upstream": "https://github.com/yanmingyu92/admiralagent",
  "_status": "success",
  "_maintainer": {
    "name": "Jaime Yan",
    "email": "yanmingyunmt@gmail.com",
    "login": "yanmingyu",
    "description": "",
    "uuid": 25801487
  },
  "_jobs": [
    {
      "job": 137603711014,
      "time": 202,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "14804679324"
    },
    {
      "job": 137603711214,
      "time": 188,
      "config": "linux-release-x86_64",
      "r": "4.6.2",
      "check": "OK",
      "artifact": "14804962813"
    },
    {
      "job": 137603711003,
      "time": 264,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "14805332070"
    },
    {
      "job": 137603711129,
      "time": 314,
      "config": "macos-release-arm64",
      "r": "4.6.2",
      "check": "OK",
      "artifact": "14804903013"
    },
    {
      "job": 137602108256,
      "time": 190,
      "config": "source",
      "r": "4.6.2",
      "check": "OK",
      "artifact": "14804073948"
    },
    {
      "job": 137603711015,
      "time": 98,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "14804817728"
    },
    {
      "job": 137603710956,
      "time": 110,
      "config": "windows-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "14805122337"
    },
    {
      "job": 137603711402,
      "time": 112,
      "config": "windows-oldrel-x86_64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "14805980721"
    },
    {
      "job": 137603710973,
      "time": 133,
      "config": "windows-release-x86_64",
      "r": "4.6.2",
      "check": "OK",
      "artifact": "14804658016"
    }
  ],
  "_buildurl": "https://github.com/r-universe/yanmingyu92/actions/runs/45147984554",
  "_commit": {
    "id": "7e80c369d898522a63c071181c7f9667bd2e0884",
    "author": "Mingyu Yan <159562441+yanmingyu92@users.noreply.github.com>",
    "committer": "GitHub <noreply@github.com>",
    "message": "logo: redesign hex sticker (helm with spec/IR/code layer stack) (#4)\n\nReplace the flowchart-style hex with a ship's helm whose hub is an\nisometric stack of three layers (spec -> layer IR -> admiral code),\nkeeping the navy/teal/gold palette.\n\n- pkgdown/logo.svg: vector source of the sticker\n- pkgdown/render_logo.py: renders logo.png (241x278, usethis convention)\n  and all pkgdown favicons from the SVG via playwright + Pillow\n- man/figures/logo.png, pkgdown/favicon/*: regenerated\n\nCo-authored-by: Jaime Yan <yanmingyu92@users.noreply.github.com>",
    "time": 1792795886
  },
  "_distro": "resolute",
  "_host": "GitHub-Actions",
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 4.1",
      "role": "Depends"
    },
    {
      "package": "glue",
      "role": "Imports"
    },
    {
      "package": "jsonlite",
      "role": "Imports"
    },
    {
      "package": "digest",
      "role": "Imports"
    },
    {
      "package": "stats",
      "role": "Imports"
    },
    {
      "package": "utils",
      "role": "Imports"
    },
    {
      "package": "xml2",
      "role": "Suggests"
    },
    {
      "package": "ellmer",
      "role": "Suggests"
    },
    {
      "package": "metacore",
      "role": "Suggests"
    },
    {
      "package": "admiral",
      "role": "Suggests"
    },
    {
      "package": "metatools",
      "role": "Suggests"
    },
    {
      "package": "readxl",
      "role": "Suggests"
    },
    {
      "package": "testthat",
      "version": ">= 3.0.0",
      "role": "Suggests"
    },
    {
      "package": "rlang",
      "role": "Suggests"
    },
    {
      "package": "tibble",
      "role": "Suggests"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    },
    {
      "package": "dplyr",
      "role": "Suggests"
    },
    {
      "package": "haven",
      "role": "Suggests"
    },
    {
      "package": "pharmaversesdtm",
      "role": "Suggests"
    },
    {
      "package": "pharmaverseadam",
      "role": "Suggests"
    }
  ],
  "_owner": "yanmingyu92",
  "_selfowned": true,
  "_usedby": 0,
  "_updates": [
    {
      "week": "2026-40",
      "n": 19
    },
    {
      "week": "2026-41",
      "n": 5
    },
    {
      "week": "2026-42",
      "n": 5
    },
    {
      "week": "2026-43",
      "n": 3
    }
  ],
  "_tags": [],
  "_topics": [
    "adam",
    "admiral",
    "cdisc",
    "llm",
    "pharmaverse"
  ],
  "_stars": 3,
  "_contributors": [
    {
      "user": "yanmingyu92",
      "count": 32,
      "uuid": 159562441
    }
  ],
  "_userbio": {
    "uuid": 159562441,
    "type": "user",
    "name": "Jaime Yan, PhD",
    "followers": 5,
    "description": "Associate Director, Statistical Programming @ Kardigan · Clinical data science · R/Python · CDISC · GxP · LLM/RAG · ex-Merck"
  },
  "_downloads": {
    "count": 0,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/admiralagent"
  },
  "_devurl": "https://github.com/yanmingyu92/admiralagent",
  "_searchresults": 4,
  "_rbuild": "4.6.2",
  "_assets": [
    "extra/admiralagent.html",
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/manual.pdf",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/readme.html",
    "extra/readme.md",
    "LICENSE"
  ],
  "_cranurl": false,
  "_authors": [
    {
      "name": "Jaime Yan",
      "email": "yanmingyunmt@gmail.com",
      "role": [
        "aut",
        "cre"
      ]
    }
  ],
  "_exports": [
    "aa_layers",
    "accept_model",
    "agreement_overstatement",
    "artifact_hash",
    "build_context",
    "build_system_prompt",
    "check_admiral_compat",
    "classify_variables",
    "classify_variables_dual",
    "classify_variables_llm",
    "codelist_from_data",
    "dataset_json_meta",
    "dual_disagreements",
    "evals_accuracy",
    "execute_ir",
    "ir_dependency_report",
    "layer_docs",
    "layer_names",
    "load_evals",
    "mcp_handle_request",
    "mcp_serve",
    "mcp_tool_specs",
    "mock_metacore",
    "mock_spec_adsl",
    "new_step",
    "new_variable_ir",
    "read_artifact",
    "read_dataset_json",
    "read_define",
    "read_spec",
    "read_spec_df",
    "render_program",
    "render_variable",
    "routing_plan",
    "run_agreement",
    "run_evals",
    "run_validation",
    "spec_variables",
    "validate_ir",
    "write_artifact",
    "write_program_artifact"
  ],
  "_help": [
    {
      "page": "aa_layers",
      "title": "Layer registry",
      "topics": [
        "aa_layers"
      ]
    },
    {
      "page": "accept_model",
      "title": "Model acceptance gate",
      "topics": [
        "accept_model"
      ]
    },
    {
      "page": "agreement_overstatement",
      "title": "How much an args-blind label overstates agreement",
      "topics": [
        "agreement_overstatement"
      ]
    },
    {
      "page": "artifact_hash",
      "title": "Artifact hash",
      "topics": [
        "artifact_hash"
      ]
    },
    {
      "page": "build_context",
      "title": "Build LLM context",
      "topics": [
        "build_context"
      ]
    },
    {
      "page": "build_system_prompt",
      "title": "Build system prompt",
      "topics": [
        "build_system_prompt"
      ]
    },
    {
      "page": "check_admiral_compat",
      "title": "admiral compatibility check",
      "topics": [
        "check_admiral_compat"
      ]
    },
    {
      "page": "classify_variables",
      "title": "Classify spec variables",
      "topics": [
        "classify_variables"
      ]
    },
    {
      "page": "classify_variables_dual",
      "title": "Dual-backend consensus classification",
      "topics": [
        "classify_variables_dual"
      ]
    },
    {
      "page": "classify_variables_llm",
      "title": "Classify spec variables via an LLM chat backend",
      "topics": [
        "classify_variables_llm"
      ]
    },
    {
      "page": "codelist_from_data",
      "title": "Build a codelist data.frame from observed data values",
      "topics": [
        "codelist_from_data"
      ]
    },
    {
      "page": "dataset_json_meta",
      "title": "Dataset-JSON header metadata",
      "topics": [
        "dataset_json_meta"
      ]
    },
    {
      "page": "dual_disagreements",
      "title": "Dual-backend disagreements",
      "topics": [
        "dual_disagreements"
      ]
    },
    {
      "page": "evals_accuracy",
      "title": "Accuracy of an eval run",
      "topics": [
        "evals_accuracy"
      ]
    },
    {
      "page": "execute_ir",
      "title": "Execute a Layer IR against source datasets",
      "topics": [
        "execute_ir"
      ]
    },
    {
      "page": "ir_dependency_report",
      "title": "IR dependency report",
      "topics": [
        "ir_dependency_report"
      ]
    },
    {
      "page": "layer_docs",
      "title": "Layer documentation cards",
      "topics": [
        "layer_docs"
      ]
    },
    {
      "page": "layer_names",
      "title": "Layer names",
      "topics": [
        "layer_names"
      ]
    },
    {
      "page": "load_evals",
      "title": "Load the spec-to-IR classification eval corpus",
      "topics": [
        "load_evals"
      ]
    },
    {
      "page": "mcp_handle_request",
      "title": "Handle one MCP / JSON-RPC 2.0 request",
      "topics": [
        "mcp_handle_request"
      ]
    },
    {
      "page": "mcp_serve",
      "title": "Run the admiralagent MCP stdio server",
      "topics": [
        "mcp_serve"
      ]
    },
    {
      "page": "mcp_tool_specs",
      "title": "Tool specifications for the admiralagent MCP server",
      "topics": [
        "mcp_tool_specs"
      ]
    },
    {
      "page": "mock_metacore",
      "title": "Build a minimal executable metacore object from a spec data frame",
      "topics": [
        "mock_metacore"
      ]
    },
    {
      "page": "mock_spec_adsl",
      "title": "Mock ADSL spec",
      "topics": [
        "mock_spec_adsl"
      ]
    },
    {
      "page": "new_step",
      "title": "New layer step",
      "topics": [
        "new_step"
      ]
    },
    {
      "page": "new_variable_ir",
      "title": "New variable IR",
      "topics": [
        "new_variable_ir"
      ]
    },
    {
      "page": "print.aa_agreement",
      "title": "Print an agreement report",
      "topics": [
        "print.aa_agreement"
      ]
    },
    {
      "page": "print.aa_model_acceptance",
      "title": "Print a model acceptance report",
      "topics": [
        "print.aa_model_acceptance"
      ]
    },
    {
      "page": "read_artifact",
      "title": "Read artifact",
      "topics": [
        "read_artifact"
      ]
    },
    {
      "page": "read_dataset_json",
      "title": "Read a Dataset-JSON file",
      "topics": [
        "read_dataset_json"
      ]
    },
    {
      "page": "read_define",
      "title": "Read define.xml",
      "topics": [
        "read_define"
      ]
    },
    {
      "page": "read_spec",
      "title": "Read spec workbook",
      "topics": [
        "read_spec"
      ]
    },
    {
      "page": "read_spec_df",
      "title": "Normalize spec data frame",
      "topics": [
        "read_spec_df"
      ]
    },
    {
      "page": "render_program",
      "title": "Render program",
      "topics": [
        "render_program"
      ]
    },
    {
      "page": "render_variable",
      "title": "Render a variable",
      "topics": [
        "render_variable"
      ]
    },
    {
      "page": "routing_plan",
      "title": "Dependency routing plan",
      "topics": [
        "routing_plan"
      ]
    },
    {
      "page": "run_agreement",
      "title": "Cross-tabulate classification backends at every fingerprint level",
      "topics": [
        "run_agreement"
      ]
    },
    {
      "page": "run_evals",
      "title": "Run the spec-to-IR classification evals",
      "topics": [
        "run_evals"
      ]
    },
    {
      "page": "run_validation",
      "title": "Run validation",
      "topics": [
        "run_validation"
      ]
    },
    {
      "page": "spec_variables",
      "title": "Spec rows for a dataset",
      "topics": [
        "spec_variables"
      ]
    },
    {
      "page": "validate_ir",
      "title": "IR validation gate",
      "topics": [
        "validate_ir"
      ]
    },
    {
      "page": "write_artifact",
      "title": "Write variable artifacts",
      "topics": [
        "write_artifact"
      ]
    },
    {
      "page": "write_program_artifact",
      "title": "Write program artifact",
      "topics": [
        "write_program_artifact"
      ]
    }
  ],
  "_pkglogo": "https://github.com/yanmingyu92/admiralagent/raw/HEAD/man/figures/logo.png",
  "_readme": "https://github.com/yanmingyu92/admiralagent/raw/HEAD/README.md",
  "_rundeps": [
    "digest",
    "glue",
    "jsonlite"
  ],
  "_vignettes": [
    {
      "source": "admiralagent.Rmd",
      "filename": "admiralagent.html",
      "title": "admiralagent: Spec-to-ADaM with LLM-Translated Layers",
      "engine": "knitr::rmarkdown",
      "headings": [
        "The idea",
        "Walkthrough on the mock ADSL spec",
        "Accuracy story: rules vs the pilot1 oracle",
        "MCP server: the same gates from any agent",
        "Improvement-loop philosophy"
      ],
      "created": "2026-09-30 14:15:48",
      "modified": "2026-10-21 14:00:56",
      "commits": 2
    }
  ],
  "_score": 3.778151250383644,
  "_indexed": true,
  "_nocasepkg": "admiralagent",
  "_universes": [
    "yanmingyu92",
    "yanmingyu"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.1.1",
      "date": "2026-11-23T09:37:55.000Z",
      "distro": "resolute",
      "commit": "7e80c369d898522a63c071181c7f9667bd2e0884",
      "fileid": "https://r2.ropensci.org/2d5cdff6b9ba4bcd7ed3feec56df8f2f73b3585e79bb277bee48065581dab16c",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/yanmingyu92/actions/runs/45147984554"
    },
    {
      "r": "4.6.2",
      "os": "linux",
      "version": "0.1.1",
      "date": "2026-11-23T09:37:58.000Z",
      "distro": "resolute",
      "commit": "7e80c369d898522a63c071181c7f9667bd2e0884",
      "fileid": "https://r2.ropensci.org/31b0cc3f8434ffc76f8f2e07bbec80255950ec37e95df5d3c7a81a2a5937e46e",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/yanmingyu92/actions/runs/45147984554"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "0.1.1",
      "date": "2026-11-23T09:38:33.000Z",
      "commit": "7e80c369d898522a63c071181c7f9667bd2e0884",
      "fileid": "https://r2.ropensci.org/c1d1e03fa0450050d1b7541cb4e1bafeb39a0d2d47b4cb48ac9e115db09cdb6f",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/yanmingyu92/actions/runs/45147984554"
    },
    {
      "r": "4.6.2",
      "os": "mac",
      "version": "0.1.1",
      "date": "2026-11-23T09:38:35.000Z",
      "commit": "7e80c369d898522a63c071181c7f9667bd2e0884",
      "fileid": "https://r2.ropensci.org/05fffcd5363918d8747af70c2ea6e77213239399f71fff5d2a68cf1af0123a9d",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/yanmingyu92/actions/runs/45147984554"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "0.1.1",
      "date": "2026-11-23T09:37:43.000Z",
      "commit": "7e80c369d898522a63c071181c7f9667bd2e0884",
      "fileid": "https://r2.ropensci.org/376536259e1be8f4b15f1602ded0367d5b100ee5bfec33b47ed6112006e1466d",
      "status": "success",
      "buildurl": "https://github.com/r-universe/yanmingyu92/actions/runs/45147984554"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "0.1.1",
      "date": "2026-11-23T09:36:43.000Z",
      "commit": "7e80c369d898522a63c071181c7f9667bd2e0884",
      "fileid": "https://r2.ropensci.org/0a41704ac1355a4a9b852bde9831cf689e46c8cbf6b750f7661ad5759903cae9",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/yanmingyu92/actions/runs/45147984554"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "0.1.1",
      "date": "2026-11-23T09:36:49.000Z",
      "commit": "7e80c369d898522a63c071181c7f9667bd2e0884",
      "fileid": "https://r2.ropensci.org/9c0bc36ba3e27c7fc82b263bad5fc5aa883ad96324c582f200a81901e1d40509",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/yanmingyu92/actions/runs/45147984554"
    },
    {
      "r": "4.6.2",
      "os": "win",
      "version": "0.1.1",
      "date": "2026-11-23T09:37:02.000Z",
      "commit": "7e80c369d898522a63c071181c7f9667bd2e0884",
      "fileid": "https://r2.ropensci.org/bdab9ec14787e83120d20660814167c827650558035cba26f4d77de14a90773a",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/yanmingyu92/actions/runs/45147984554"
    }
  ]
}