MCPcopy Create free account
hub / github.com/Graphify-Labs/graphify / _file_node_id

Function _file_node_id

graphify/extract.py:74–81  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

72
73
74def _file_node_id(rel_path: Path) -> str:
75 """File-level node ID matching the skill.md spec: ``{parent_dir}_{stem}`` —
76 one parent directory level, no extension. ``rel_path`` MUST be relative to
77 the project root so top-level files collapse to a bare stem (``setup.py`` ->
78 ``setup``) instead of picking up the root directory name. This must equal the
79 ID semantic subagents generate, or AST and semantic extraction split a file
80 into two disconnected ghost nodes (#1033)."""
81 return _make_id(_file_stem(rel_path))
82
83
84def _csharp_namespace_id(dotted_name: str) -> str:

Calls 2

_make_idFunction · 0.90
_file_stemFunction · 0.90