briefing

Project briefings

Description

Generate project context for AI coding agents. Generate a project briefing

Produces a concise markdown briefing combining DESCRIPTION metadata, downstream dependents, ‘Claude Code’ memory, and recent git commits. Written to the user cache directory so both the agent and user see the same context.

Usage

1briefing(project = NULL, scan_dir = path.expand("~"),
2         memory_base = file.path(path.expand("~"), ".claude", "projects"),
3         briefs_dir = file.path(tools::R_user_dir("saber", "cache"), "briefs"),
4         max_memory_lines = 30L)

Arguments

  • project: Project name. If NULL, inferred from the current working directory basename.
  • scan_dir: Directory to scan for project directories.
  • memory_base: Base directory for Claude Code project memory files.
  • briefs_dir: Directory to write briefing markdown files.
  • max_memory_lines: Maximum lines to include from the memory file.

Value

A character string of class saber_briefing. Printing the object emits the markdown briefing. Also written to briefs_dir/{project}.md.

Examples

1d <- file.path(tempdir(), "briefpkg")
2dir.create(file.path(d, "R"), recursive = TRUE, showWarnings = FALSE)
3writeLines(c("Package: briefpkg", "Title: Demo", "Version: 0.1.0"),
4           file.path(d, "DESCRIPTION"))
5briefing("briefpkg", scan_dir = tempdir(),
6         briefs_dir = file.path(tempdir(), "briefs"))