# <package name>

<One paragraph: what the package does, who uses it, and whether it's GxP-relevant.>

<!-- Optional: keep tool-neutral instructions in AGENTS.md and import them here. -->
@AGENTS.md

## Commands
| Task | Command |
|---|---|
| Restore environment | `renv::restore()` |
| Document (roxygen → man/, NAMESPACE) | `devtools::document()` |
| Test one file | `testthat::test_file("tests/testthat/test-<name>.R")` |
| Test all | `devtools::test()` |
| Full check (what CI runs) | `devtools::check()` |
| Format / lint | `air format .` / `lintr::lint_package()` |

- Iterate with targeted tests; run `devtools::check()` before opening a PR.
- Never edit `man/` or `NAMESPACE` by hand. They're generated by roxygen.

## Conventions
- tidyverse style; exported functions have roxygen docs with `@examples`.
- Every user-facing change gets a `NEWS.md` bullet.
- Tests use `testthat` 3e; Shiny modules are tested with `shiny::testServer()` / `shinytest2`.
- Declare every `pkg::fn()` dependency in `DESCRIPTION`.

## Git
- Branch + PR, squash-merge; PR titles use Conventional Commits (`feat(fn_name): ...`).
- No AI attribution trailers. Commit or push only when asked.

## Data and confidentiality (non-negotiable)
- **Never** put real patient, study or client data in code, tests, fixtures, examples, issues or prompts.
  Use synthetic data or public CDISC pilot data (e.g. `pharmaverseadam`).
- Never name clients or employers.
- Secrets come from `Sys.getenv()`, never literals.

## Verification
- A task is done when the relevant tests pass **and** `devtools::check()` is clean. A model's
  self-report doesn't count.
- If you can't verify something, say so explicitly.

## Handoffs
- Read `dev/handoffs/<feature>/README.md` before starting; update it before a PR or when stopping.
  `dev/handoffs/` is gitignored and `.Rbuildignore`d.
