Sapling SAP
Reference

The commands

The user-facing commands of Sapling, from a study folder to the dashboard.

Every step has its own command, its products in a folder of out/ named like it, and one verdict line. A step that needs something older or missing says which command to run first, or makes it with --with-deps. Details of each are in Omakase.

From protocol to a plan#

CommandWhat it does
sapling new <study> --protocol F [--sdtm DIR]A study folder with a first sap.qmd. F is a CDISC USDM JSON file, or a protocol document (PDF or its text) for a skeleton of open decisions.
sapling generate <thing> ...One conventional block (a population, a table, a multiplicity block) in its section of the plan.
sapling ai "<plain English>"Your AI drafts a block; it is compiled in its place and written only when you say so.
sapling check [--strict] [--json]The compiler's passes. SAPLING CHECK PASS / FAIL.
sapling reviewEvery finding of the guideline rules, with its fix and source.
sapling decideRecords a person's answer to an open decision, with the person's name. An agent never runs it in its own name.
sapling dummyDummy SDTM data of a study that has no data yet, for testing a plan. Never use it in a folder with real data.
sapling doctorChecks the machine and prints the fix of each problem.

From the plan to outputs#

CommandProducts
sapling buildThe SAP (structured, JSON, PDF), the ADaM and TLF specifications, programs, shells.
sapling runThe ADaM data, the tables and the results (the ARD).
sapling sap pdf, sapling sap htmlThe typeset SAP (Quarto).
sapling export docx, sapling import docxWord out and in.
sapling adam spec, sapling adam programs, sapling adam data, sapling adam checkThe ADaM specification, programs and data.
sapling adam conformThe ADaM data against rules of the ADaM IG v1.2.
sapling tlf spec, tlf shells, tlf programs, tlf run, tlf checkThe analysis contract, the shells, the programs and the tables.
sapling define, sapling packageThe define file and the submission package.
sapling statusEach step as fresh, stale, missing, edited or failed, with the next command.

R, SAS and dashboards#

CommandProducts
sapling r programs, sapling r run, sapling r checkThe readable R programs, their run, and their numbers against the engine's.
sapling sas programs, sapling sas run, sapling sas checkThe SAS programs, their run through DataStep Studio, and every number of R against SAS.
sapling dashboard [--check]The study dashboard of the R engine.
sapling sas dashboard [--check] [--no-subjects]The dashboard of a SAS run in plain HTML.

Design before the protocol#

CommandWhat it does
sapling design new <study> [--kind continuous|tte]A study folder with a made-up design to change.
sapling design check, sapling design simulate [--refine]The design against itself; the simulation.
sapling design export [--docx]The statistical section of the protocol.
sapling design to-sap <folder>A SAP that starts with the blocks of the design.

Commands of the editor#

In VS Code and Positron, run these from the Command Palette: Sapling: Open the Sample Study, New SAP from Protocol (USDM)..., Work Through the Open Decisions, What Is Missing (proposals from templates), Add an Analysis from a Template, Build PDF, Export Word (.docx) for Review, Edit the House Rules, What the Assistant Has Learned, Check What Sapling Needs, Data and AI Statement, Give Feedback.