|
1 | | -# CLAUDE.md |
| 1 | +# AGENTS.md |
2 | 2 |
|
3 | | -This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. |
| 3 | +Guidance for AI coding agents working **on** the mori package. mori — Shared Memory for R Objects. Uses POSIX shared memory (Linux, macOS) and Win32 file mappings (Windows) with R's ALTREP framework to let multiple processes on the same machine read the same physical memory pages. No external dependencies. Requires R >= 4.3.0 (for ALTLIST). API: `share()` → ALTREP shared object, `map_shared()` → open SHM by name, `shared_name()` → extract identifier, `is_shared()` → test if shared, `prune_shared()` → remove orphaned regions of dead processes. ALTREP serialization hooks emit the `shared_name()` identifier as the wire form — transparent under `serialize()` and `mirai`. |
4 | 4 |
|
5 | | -## Overview |
| 5 | +Claude Code users: add `.claude/CLAUDE.md` containing `@../AGENTS.md` to import this file (`.claude/` is gitignored). |
6 | 6 |
|
7 | | -mori — Shared Memory for R Objects. Uses POSIX shared memory (Linux, macOS) and Win32 file mappings (Windows) with R's ALTREP framework to let multiple processes on the same machine read the same physical memory pages. No external dependencies. Requires R >= 4.3.0 (for ALTLIST). API: `share()` → ALTREP shared object, `map_shared()` → open SHM by name, `shared_name()` → extract identifier, `is_shared()` → test if shared, `prune_shared()` → remove orphaned regions of dead processes. ALTREP serialization hooks emit the `shared_name()` identifier as the wire form — transparent under `serialize()` and `mirai`. |
| 7 | +## Commands |
8 | 8 |
|
9 | | -## Development Commands |
| 9 | +```r |
| 10 | +devtools::test() # full suite (testthat ed 3) |
| 11 | +testthat::test_file("tests/testthat/test-nested.R") # single test file |
| 12 | +devtools::document() # roxygen2 -> man/, NAMESPACE |
| 13 | +rmarkdown::render("README.Rmd") # rebuild README.md |
| 14 | +``` |
| 15 | + |
| 16 | +```bash |
| 17 | +R CMD build . |
| 18 | +R CMD check --no-manual --compact-vignettes=gs+qpdf mori_*.tar.gz # matches CI |
| 19 | +``` |
10 | 20 |
|
11 | | -Standard R-package workflow (`devtools::test()`, `devtools::document()`, `R CMD build` / `R CMD check`). Run a single test file with `testthat::test_file("tests/testthat/test-nested.R")`. |
| 21 | +- `Config/build/compilation-database: true` in DESCRIPTION makes R generate `compile_commands.json` on install, so clangd C navigation works out of the box (gitignored). |
12 | 22 |
|
13 | 23 | ## Storage Model |
14 | 24 |
|
@@ -165,5 +175,6 @@ testthat edition 3. Entry point `tests/testthat.R`; tests in `tests/testthat/tes |
165 | 175 |
|
166 | 176 | - roxygen2 with markdown support; NAMESPACE is auto-generated. |
167 | 177 | - MIT license. |
| 178 | +- Version is `major.minor.patch.dev` (current dev tag `.9000`). |
168 | 179 | - `README.md` is generated from `README.Rmd` — edit the `.Rmd` and re-knit, never edit `README.md` directly. |
169 | | -- `CLAUDE.md` and `.claude/` are excluded from package builds (via `.Rbuildignore`). |
| 180 | +- `AGENTS.md`, `.claude/`, and `.posit/` are in `.Rbuildignore` and don't ship to CRAN. |
0 commit comments