.qwen/skills/codegraph/schema.md
| Node | Key Properties | Notes |
|---|---|---|
File | id, path, language, loc, is_external | is_external=1 for system headers / library stubs |
Function | id, name, qualified_name, signature, file_path, start_line, end_line, doc_comment, class_name, is_historical | is_historical=1 for deleted/renamed functions |
Class | id, name, qualified_name, file_path | |
Module | id, name, path_prefix | Auto-discovered from directories (e.g. kernel/sched) |
Commit | id, hash, message, author, timestamp, version_tag | version_tag='bf' means MODIFIES edges computed |
Metadata | id, value | Pipeline state (e.g. oldest_commit) |
PR | id, title, author, risk_level, label | Open pull request; populated by codegraph pr-review prepare |
AUTHOR | login, name, company, location, bio, avatar_url | GitHub user who opened the PR |
| Edge | From → To | Meaning |
|---|---|---|
CALLS | Function → Function | Static call graph (resolved from AST) |
DEFINES_FUNC | File → Function | File defines this function |
DEFINES_CLASS | File → Class | File defines this class |
HAS_METHOD | Class → Function | Class contains this method |
IMPORTS | File → File | Include / import dependency |
BELONGS_TO | File → Module | File belongs to this module |
INHERITS | Class → Class | Class inheritance |
COMPOSES | Class → Class | Composition relationship (strong ownership, filled diamond in UML) |
AGGREGATES | Class → Class | Aggregation relationship (optional/weak, open diamond in UML) |
USES | Class → Class | Dependency relationship (uses per-call, dashed arrow in UML) |
MODIFIES | Commit → Function | Commit changed this function (requires backfill) |
TOUCHES | Commit → File | Commit changed this file (always present) |
CHANGES | PR → Function | PR modifies this function; info = 'hunk' (modified in diff), 'deleted' (removed), 'related' (newly called), 'new' (newly added) |
OPENS | AUTHOR → PR | Author opened this PR |
Not all commits have MODIFIES edges — only those with version_tag = 'bf'. TOUCHES edges are always present for all ingested commits.
MATCH (c:Commit) WHERE c.version_tag = 'bf' RETURN count(c) AS backfilled
MATCH (c:Commit) RETURN count(c) AS total_commits
Supported syntax:
MATCH, WHERE, RETURN, ORDER BY, LIMIT, WITHcount(), count(DISTINCT x){name: 'foo'}[*1..3]STARTS WITH, CONTAINS, ENDS WITH=, <>, <, >, <=, >=AND, OR, NOTLimitations:
MATCH after WITH may be limited — prefer single MATCH clauses with multiple patterns separated by commasCREATE, SET, DELETE via Cypher — graph mutations go through the Python API