feat(skills): rename scribe-OKF>write-OKF, implement>weave, domain-modeling>model-domain, codebase-design>design-codebase, caveman>talk-caveman, background-work>harden-background-work, dev-python>develop-python, dev-r>develop-r, r-style>style-r, handoff>write-handoff, cavecrew-octobot>spawn-cavecrew, jj-atomic>commit-atomic-jj; bdd stays as the single grandfathered name docs(skills): sweep spec>blueprint across skill prose; spec-format.md becomes blueprint-format.md; internal Spec section becomes Contract; commit citations now read implements blueprint NNN docs(blueprint): numbering starts at 001 when OKF/blueprints/ is empty docs(conjure): 110-line cap applies to SKILL.md only; siblings uncapped fix(containerize): read an existing build-dev recipe and surface semantic mismatch instead of trusting the name
2.9 KiB
2.9 KiB
name: build-r-package
description: Scaffold an R package: renv + justfile + DESCRIPTION + testthat ed. 3; Docker via containerize-project.
disable-model-invocation: true
build-r-package
When to use
- User says "new R package", "scaffold R package", "/build-r-package".
- A fresh empty directory needs the renv + rocker + DESCRIPTION setup.
Inputs to collect (one grouped prompt)
- Package name (letters, numbers, dots; starts with a letter; no trailing dot). Validate.
- Author name + email for
Authors@R. - One-line title (sentence-case, no trailing period).
- One-paragraph description.
- License (default:
MIT + file LICENSE).
Process
- Confirm target directory is empty (or user-confirmed override).
- Materialise files from sibling templates:
<package>/ ├── R/<package>-package.R ├── tests/testthat/test-<package>.R ├── justfile ← justfile.tpl ├── DESCRIPTION ← DESCRIPTION.tpl └── .gitignore ← gitignore.tpl - Delegate Docker to
/containerize-project(r-package variant): it writesDockerfile,docker-compose.yml,.dockerignore, and appends the Docker recipes to the justfile. - Stop. Do not run
jj describe. Tell the user:"Review with
jj diff. Then runjust build-dev→just up→R -e 'renv::init()'to lock dependencies; thenjust documentandjust check. Describe the change with/commit-atomic-jjwhen satisfied." - Suggest
/write-readme-py's R counterpart once it exists (not yet — see octobot/README.md Out of scope).
Placeholders used by templates
<package-name>— R package name (validated above).<author-name>,<author-email>— forAuthors@R.<title>— one-line title.<description>— one-paragraph description.<license>— defaultMIT + file LICENSE.
Guardrails
- Never scaffold into a non-empty directory without confirmation.
- Never invoke
jj describe— first commit is the user's call. - Never invoke
renv::init()for the user —renv.lockshould be generated from inside the container so the lock matches the runtime. - Never generate
NAMESPACEhere — it's roxygen2's job, run viajust documentafter the first edit. R/is empty by design apart from<package>-package.R. Don't invent stub functions.
See also
../containerize-project/SKILL.md— owns the Docker templates and the three-stage pattern rationale.../../engineering/develop-r/SKILL.md— workflow auto-detects DESCRIPTION → R-package loop.../../engineering/style-r/SKILL.md— coding standards every function inR/must follow.