derive_group_path: Derive project-level grouping from relative paths

View source: R/derive_group_path.R

derive_group_pathR Documentation

Derive project-level grouping from relative paths

Description

Extracts a deterministic grouping key from rel_path by combining the first path components: usually collection/project, optionally module.

Usage

derive_group_path(rel_path, repo_root = NULL)

Arguments

rel_path

Character vector of relative file paths.

repo_root

Optional. Currently unused.

Details

This function implements a lightweight operational grouping heuristic based on shallow relative path structure.

It is currently used for analytical navigation, summarisation, and exploratory grouping of observed filesystem Instantiations.

The grouping logic reflects practical development and repository layouts rather than authoritative documentary structure.

Future versions of the package are expected to replace or absorb this functionality into higher-level Record Set construction logic (for example via record_set_projection()), where grouping rules will be explicitly contextualised and provenance-aware.

Value

Character vector of grouping keys.


fscontext documentation built on Nov. 19, 2026, 5:11 p.m.