File-level node ID matching the skill.md spec: ``{parent_dir}_{stem}`` — one parent directory level, no extension. ``rel_path`` MUST be relative to the project root so top-level files collapse to a bare stem (``setup.py`` -> ``setup``) instead of picking up the root directory name. This
(rel_path: Path)
| 274 | |
| 275 | |
| 276 | def _file_node_id(rel_path: Path) -> str: |
| 277 | """File-level node ID matching the skill.md spec: ``{parent_dir}_{stem}`` — |
| 278 | one parent directory level, no extension. ``rel_path`` MUST be relative to |
| 279 | the project root so top-level files collapse to a bare stem (``setup.py`` -> |
| 280 | ``setup``) instead of picking up the root directory name. This must equal the |
| 281 | ID semantic subagents generate, or AST and semantic extraction split a file |
| 282 | into two disconnected ghost nodes (#1033).""" |
| 283 | return _make_id(_file_stem(rel_path)) |
| 284 | |
| 285 | |
| 286 | def _python_absolute_import_alias_files(paths, root) -> tuple[dict[str, set[str]], set[str]]: |