AI

ai_regenerate_context

Regenerate Dynamic Sections in AI Context File

Updates only the sections marked with `` in an existing AI context file, preserving user customizations in unmarked sections.


Usage

ai_regenerate_context(project_path = ".", sections = NULL, ai_file = NULL)

Arguments

Argument Description
project_path

Path to the project directory

sections

Which sections to regenerate. NULL = all regeneratable sections. Options: "environment", "packages", "data", "functions"

ai_file

Name of the AI context file (default: from settings or "CLAUDE.md")

Returns

Invisible TRUE on success

Examples

# Regenerate all dynamic sections
ai_regenerate_context()

# Regenerate only packages section
ai_regenerate_context(sections = "packages")

Source: R/ai_context.R