update-package-instructions
Update existing .github/instructions/ files when an R/Bioconductor package changes, preserving manual customizations.
Usage
Invoke this skill when your package has changed and you want to refresh the AI instructions:
- "Update the package instructions"
- "Sync instructions with current package state"
Prerequisites
- Working directory is an R package root.
- Existing instructions exist at
.github/instructions/.
Process
- Analyze Current State: Run the
analyze-r-packageskill to produce a current package analysis. - Identify Changes: Read existing
.github/instructions/.mdfiles. Compare the current package analysis to the documented state to identify changes in metadata (version, dependencies), structure (functions, vignettes, classes), and content (data sources). - Determine Update Scope: Check which template variables have changed by referencing
templates/package-instructions/README.md. If a variable differs, its corresponding file needs an update. - Apply Update Strategy:
- Preserve Custom Content: Retain manually-added domain explanations, examples, and warnings.
- Update Systematically: Update version numbers globally. Add new functions (with
[Description needed]), remove deleted ones, and preserve custom descriptions. - Targeted Edits: Modify only the changed variables, rather than completely replacing files.
- Provide Update Summary: Report the detected changes, updated files, and any items requiring manual review.
Error Handling
- No instructions found: Direct the user to
create-package-instructions. - Conflicts: Prompt for a keep/replace/merge decision if manual changes conflict directly with template updates.
Integration
- Uses:
analyze-r-package - Works with:
create-package-instructions
Related: See create-package-instructions, analyze-r-package.