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-analysis
description: Scaffold an R analysis: renv + targets + Quarto on rocker/verse; Docker via containerize-project.
disable-model-invocation: true
build-r-analysis
When to use
- User says "new R analysis", "scaffold R analysis", "/build-r-analysis".
- A fresh directory needs renv + targets + Quarto on rocker/verse.
Inputs to collect (one grouped prompt)
- Project name (snake_case).
- One-line description.
Process
- Confirm target directory is empty (or user-confirmed override).
- Materialise files from sibling templates:
<project>/ ├── R/functions/.gitkeep ├── R/pipeline/load_data.R ← R-pipeline-load_data.R.tpl ├── data/raw/.gitkeep ├── data/processed/.gitkeep ├── reports/index.qmd ← reports-index.qmd.tpl ├── tests/testthat/test-functions.R ← tests-test-functions.R.tpl ├── _targets.R ← _targets.R.tpl ├── justfile ← justfile.tpl └── .gitignore ← gitignore.tpl - Delegate Docker to
/containerize-project(r-analysis 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. Thenjust build-dev→just up→R -e 'renv::init()'to lock dependencies. Thenjust runto execute the pipeline. Describe with/commit-atomic-jjwhen satisfied."
Placeholders used by templates
<project-name>— snake_case project name.<description>— one-line description (forreports/index.qmd).
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. R/functions/andR/pipeline/followbox::userules — nolibrary(), nosource(). See../../engineering/style-r/box.md.- Skeleton
_targets.Rhas two demo targets (raw,processed) showing the box-imported pipeline pattern. Replace, don't extend.
See also
../containerize-project/SKILL.md— owns the Docker templates and the three-stage pattern rationale.../../engineering/develop-r/SKILL.md— workflow auto-detects_targets.R→ R-analysis loop.../../engineering/style-r/SKILL.md— every function inR/functions/andR/pipeline/follows these.../../engineering/bdd/SKILL.md—tests/testthat/opens with the standardbox::use(testthat[...])prologue (seebdd/tests-r.md).