Support parent-child resource blocks in mappings
A
Andrii Mrichko
We need mapping support for parent/child resource blocks, where a child block can reference data derived from its parent block and run within the parent’s scope.
Use case: GitLab skills stored in nested folders.
Today, we can discover skill roots from SKILL.md, for example:
.cursor/skills/coding-reviewing/topics/postgres-patterns/SKILL.md
From this, mapping can identify the skill as postgres-patterns.
However, when syncing child files like:
.cursor/skills/coding-reviewing/topics/postgres-patterns/references/query-patterns.md
the child file mapping only receives the file path. It cannot reliably infer which ancestor folder is the skill root, because nesting depth is non-deterministic.
A parent/child mapping model would allow:
- Parent block discovers the skill root from SKILL.md
- Parent computes values like skillName, skillRootPath, skillVersionId
- Child block scans files under that parent root
- Child mappings can reference parent context when creating identifiers, properties, and relations
This would allow correct modeling of nested resources without adding integration-specific logic to GitLab or any other data source.