Skip to content

docs: Improve tool description with label and relationship type documentation #32

@greynewell

Description

@greynewell

Problem

The tool description in src/tools/create-supermodel-graph.ts shows example output with sampleNodes and sampleRelationships, but doesn't explain:

  1. What do the labels mean?

    • Function, Class, Type, File, Domain, ExternalModule, LocalModule, etc.
  2. What relationship types exist?

    • CHILD_DIRECTORY, CONTAINS_FILE, calls, IMPORTS, etc.
  3. What properties are available on each node type?

    • Functions have: filePath, startLine, endLine, language, kind
    • Files have: path, language
    • Domains have: ?

Proposed Enhancement

Add a reference section to the tool description:

## Graph Schema Reference

### Node Types (Labels)
- **Function**: Functions and methods (properties: filePath, startLine, endLine, language, kind)
- **Class**: Class definitions (properties: filePath, startLine, endLine, language)
- **Type**: Type definitions and interfaces (properties: filePath, startLine, endLine, language, kind)
- **File**: Source files (properties: path, filePath, language)
- **Domain**: Architectural domains (properties: name)
- **ExternalModule**: External dependencies (properties: name)
- **LocalModule**: Internal modules (properties: name, filePath)

### Relationship Types
- **CHILD_DIRECTORY**: Directory containment hierarchy
- **CONTAINS_FILE**: Directory contains file
- **calls**: Function calls another function
- **IMPORTS**: File imports from module
- **DEFINES**: File defines a function/class/type
- **MEMBER_OF**: Entity belongs to a domain

Benefits

  • Agents understand what data is available
  • Better query construction
  • Clearer expectations
  • Reduced trial-and-error

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions