diff --git a/OKF/INDEX.md b/OKF/INDEX.md index fb65046..1da0f9d 100644 --- a/OKF/INDEX.md +++ b/OKF/INDEX.md @@ -18,5 +18,4 @@ your task needs. Humans welcome too. ## Specs -- `specs/` — none yet; blueprint (phase 2) writes here - (`NNN — title — status`). +- [001](specs/001-add-write-readme-r.md) — add write-readme-r skill — draft diff --git a/OKF/specs/.gitkeep b/OKF/specs/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/OKF/specs/001-add-write-readme-r.md b/OKF/specs/001-add-write-readme-r.md new file mode 100644 index 0000000..b990a94 --- /dev/null +++ b/OKF/specs/001-add-write-readme-r.md @@ -0,0 +1,49 @@ +--- +status: draft +traces-to: README.md §Roadmap ("write-readme-r" gap); write-readme-py/SKILL.md §Out of scope +--- + +# 001 — add write-readme-r skill + +## Justification +Named gap in `README.md` §Roadmap and declared out of scope in +`skills/engineering/write-readme-py/SKILL.md` with its interface already +sketched there: "reading `DESCRIPTION` for packages and `_targets.R` + +`index.qmd` for analyses is the planned interface". R scaffolds +(`build-r-package`, `build-r-analysis`) currently ship without a README +generator, unlike their Python sibling. + +## Spec +A skill `skills/engineering/write-readme-r/` that: +- Detects project type: `DESCRIPTION` → r-package (fields: Package, + Title, Description, License, Authors@R); `_targets.R` → r-analysis + (sources: `reports/index.qmd` title/description + `justfile`). +- Materialises `README.md` from a template following write-readme-py's + Saduko-style layout (logo block, install via `renv::restore()`, + justfile-derived usage sections, license block — Apache-aware rich + block, one-liner otherwise). +- Refuses to invent: empty Description → ask; no fabricated deps, + recipes, authors, or URLs. Omits sections lacking source data. +- Guards an existing README.md (diff + explicit confirmation). +- Stops on `jj diff` for review; never commits. + +## Seams touched +- New skill folder only: `skills/engineering/write-readme-r/{SKILL.md, + readme-r.template.md}`. +- One-line "See also" additions in: `write-readme/SKILL.md`, + `write-readme-py/SKILL.md`, `build-r-package/SKILL.md`, + `build-r-analysis/SKILL.md` (replacing the "not yet written" notes). + +## Verify +In a scratch dir scaffolded by `/build-r-package` (fixtures acceptable): +running the skill's process against its `DESCRIPTION` + `justfile` +produces a `README.md` whose every install/usage command exists verbatim +in the justfile, and whose license block matches the DESCRIPTION License +field. Check: `grep -c 'just ' README.md` equals the number of documented +recipes; no invented content on manual read-through. + +## Out of scope +- Quarto rendering, pkgdown sites, badges. +- Changes to write-readme-py or the generic write-readme beyond the + See-also lines. +- R README generation for non-scaffolded (arbitrary) R repos.