Data Models
Data models for open-auto-doc
Data Models
FileNode
Represents a file or directory in the project tree structure with hierarchical composition support
File: packages/analyzer/src/types.ts
Fields
| Field | Type | Description | Constraints |
|---|---|---|---|
path | string | Full path to the file or directory | - |
name | string | Base name of the file or directory | - |
type | "file" | "directory" | Classification as file or directory | - |
children | FileNode[] | Child nodes if this is a directory | optional |
extension | string | File extension if applicable | optional |
size | number | File size in bytes | optional |
Relationships
- contains many FileNode (hierarchical)
DependencyInfo
Package manager dependencies extracted from package.json or equivalent manifest files
File: packages/analyzer/src/types.ts
Fields
| Field | Type | Description | Constraints |
|---|---|---|---|
packageManager | string | Package manager type (e.g., npm, yarn, pnpm) | - |
dependencies | Record<string, string> | Production dependencies with versions | - |
devDependencies | Record<string, string> | Development dependencies with versions | - |
raw | string | Raw content of the dependency file | - |
Relationships
- belongs to StaticAnalysis
ClaudeMdContent
Parsed content from CLAUDE.md project context files that provide AI guidance for analysis
File: packages/analyzer/src/types.ts
Fields
| Field | Type | Description | Constraints |
|---|---|---|---|
path | string | Path to the CLAUDE.md file | - |
content | string | Full content of the CLAUDE.md file | - |
Relationships
- belongs to StaticAnalysis
ImportEdge
Represents a direct import/dependency relationship between two modules or files
File: packages/analyzer/src/types.ts
Fields
| Field | Type | Description | Constraints |
|---|---|---|---|
from | string | Source file or module identifier | - |
to | string | Target file or module identifier | - |
isExternal | boolean | Whether the import is from an external package | - |
Relationships
- belongs to ImportGraph
- relates ModuleCluster to ModuleCluster
ModuleCluster
Group of related files that form a logical module with measured internal and external coupling
File: packages/analyzer/src/types.ts
Fields
| Field | Type | Description | Constraints |
|---|---|---|---|
name | string | Name identifier for the module cluster | - |
files | string[] | List of file paths in this cluster | - |
internalEdgeCount | number | Number of imports within the cluster | - |
externalEdgeCount | number | Number of imports outside the cluster | - |
Relationships
- belongs to ImportGraph
- contains multiple files
ImportGraph
Complete directed graph of module imports and dependencies across the codebase with clustering analysis
File: packages/analyzer/src/types.ts
Fields
| Field | Type | Description | Constraints |
|---|---|---|---|
edges | ImportEdge[] | All import relationships detected | - |
moduleClusters | ModuleCluster[] | Identified module clusters and their coupling metrics | - |
Relationships
- belongs to StaticAnalysis
- contains ImportEdge[], ModuleCluster[]
StaticAnalysis
Result of static code parsing covering file structure, dependencies, entry points, and import relationships
File: packages/analyzer/src/types.ts
Fields
| Field | Type | Description | Constraints |
|---|---|---|---|
fileTree | FileNode | Hierarchical representation of all files and directories | - |
languages | string[] | Programming languages detected in the codebase | - |
dependencies | DependencyInfo[] | Package dependencies from all manifest files | - |
claudeMd | ClaudeMdContent[] | CLAUDE.md context files found | - |
entryFiles | string[] | Entry point files identified | - |
totalFiles | number | Total count of files analyzed | - |
importGraph | ImportGraph | Module import graph and clustering | optional |
Relationships
- contains FileNode, DependencyInfo[], ClaudeMdContent[], ImportGraph
MermaidDiagram
Diagram definition in Mermaid syntax for visualizing architecture, data flow, or entity relationships
File: packages/analyzer/src/types.ts
Fields
| Field | Type | Description | Constraints |
|---|---|---|---|
id | string | Unique identifier for the diagram | - |
title | string | Human-readable title of the diagram | - |
description | string | Description of what the diagram shows | - |
mermaidSyntax | string | Valid Mermaid diagram syntax | - |
Relationships
- belongs to ArchitectureOverview
- belongs to AnalysisResult
ModuleInfo
Detailed information about a logical module within the architecture
File: packages/analyzer/src/types.ts
Fields
| Field | Type | Description | Constraints |
|---|---|---|---|
name | string | Module name | - |
description | string | Module purpose and responsibility | - |
files | string[] | File paths that comprise this module | - |
responsibilities | string[] | List of key responsibilities | - |
Relationships
- belongs to ArchitectureOverview
ArchitectureOverview
High-level architectural analysis including module decomposition, data flow, and technology stack assessment
File: packages/analyzer/src/types.ts
Fields
| Field | Type | Description | Constraints |
|---|---|---|---|
summary | string | 2-3 paragraph architecture summary | - |
projectPurpose | string | Plain-language description of project purpose for new users | - |
targetAudience | string | Intended users of the software | - |
techStack | string[] | Key technologies and frameworks | - |
modules | ModuleInfo[] | Identified modules and their responsibilities | - |
dataFlow | string | Description of data movement through the system | - |
entryPoints | string[] | Primary application entry points | - |
keyPatterns | string[] | Architectural patterns and design patterns | - |
diagrams | MermaidDiagram[] | Architecture and data flow diagrams | - |
Relationships
- contains ModuleInfo[], MermaidDiagram[]
- belongs to AnalysisResult
ParameterDoc
Documentation for a single parameter in an API endpoint
File: packages/analyzer/src/types.ts
Fields
| Field | Type | Description | Constraints |
|---|---|---|---|
name | string | Parameter name | - |
type | string | Parameter data type | - |
required | boolean | Whether the parameter is required | - |
description | string | Parameter purpose and usage | - |
location | "path" | "query" | "header" | "body" | Where the parameter appears in the request | - |
Relationships
- belongs to ApiEndpoint
ApiEndpoint
Documentation for a single REST API endpoint including method, path, parameters, and request/response bodies
File: packages/analyzer/src/types.ts
Fields
| Field | Type | Description | Constraints |
|---|---|---|---|
method | string | HTTP method (GET, POST, PUT, DELETE, etc.) | - |
path | string | URL path or route pattern | - |
description | string | Endpoint purpose and behavior | - |
parameters | ParameterDoc[] | Parameters expected by the endpoint | - |
requestBody | string | Request body structure or schema | optional |
responseBody | string | Response body structure or schema | optional |
authentication | string | Authentication requirements | optional |
Relationships
- contains ParameterDoc[]
- belongs to AnalysisResult
PropDoc
Documentation for a single prop/parameter of a UI component
File: packages/analyzer/src/types.ts
Fields
| Field | Type | Description | Constraints |
|---|---|---|---|
name | string | Prop name | - |
type | string | Prop data type or TypeScript type | - |
required | boolean | Whether the prop is required | - |
defaultValue | string | Default value if any | optional |
description | string | Prop purpose and usage | - |
Relationships
- belongs to ComponentDoc
ComponentDoc
Documentation for a reusable UI component including props, usage examples, and category
File: packages/analyzer/src/types.ts
Fields
| Field | Type | Description | Constraints |
|---|---|---|---|
name | string | Component name | - |
description | string | Component purpose and behavior | - |
filePath | string | Source file location | - |
props | PropDoc[] | Component props | - |
usage | string | Example usage code | - |
category | string | Component category (UI, Layout, etc.) | optional |
Relationships
- contains PropDoc[]
- belongs to AnalysisResult
FieldDoc
Documentation for a single field within a data model
File: packages/analyzer/src/types.ts
Fields
| Field | Type | Description | Constraints |
|---|---|---|---|
name | string | Field name | - |
type | string | Field data type | - |
description | string | Field purpose and constraints | - |
constraints | string[] | Validation constraints (nullable, unique, etc.) | optional |
Relationships
- belongs to DataModelDoc
DataModelDoc
Complete documentation for a data model/entity including fields and relationships to other models
File: packages/analyzer/src/types.ts
Fields
| Field | Type | Description | Constraints |
|---|---|---|---|
name | string | Model/entity name | - |
description | string | Model purpose and usage | - |
filePath | string | Source file location | - |
fields | FieldDoc[] | Fields and properties of the model | - |
relationships | string[] | Relationships to other models | - |
Relationships
- contains FieldDoc[]
- belongs to AnalysisResult
Feature
A user-facing or system feature within the application
File: packages/analyzer/src/types.ts
Fields
| Field | Type | Description | Constraints |
|---|---|---|---|
name | string | Feature name | - |
description | string | Feature description and user value | - |
category | string | Feature category or domain | - |
relatedFiles | string[] | Implementation files for this feature | - |
Relationships
- belongs to FeaturesAnalysis
UseCase
User scenario or workflow demonstrating feature usage
File: packages/analyzer/src/types.ts
Fields
| Field | Type | Description | Constraints |
|---|---|---|---|
title | string | Use case title | - |
description | string | Scenario description | - |
involvedFeatures | string[] | Features involved in this use case | - |
Relationships
- belongs to FeaturesAnalysis
FeaturesAnalysis
Analysis of user-facing features and use cases demonstrating the application's capabilities
File: packages/analyzer/src/types.ts
Fields
| Field | Type | Description | Constraints |
|---|---|---|---|
tagline | string | One-line summary of application capabilities | - |
targetAudience | string | Intended end-users | - |
features | Feature[] | List of features | - |
useCases | UseCase[] | List of usage scenarios | - |
Relationships
- contains Feature[], UseCase[]
- belongs to AnalysisResult
GettingStartedGuide
Quick-start guide covering installation, setup, and first steps for new users
File: packages/analyzer/src/types.ts
Fields
| Field | Type | Description | Constraints |
|---|---|---|---|
prerequisites | string[] | Software and knowledge prerequisites | - |
installation | string | Installation instructions | - |
quickStart | string | First steps to run the application | - |
configuration | string | Configuration instructions | optional |
examples | string | Usage examples | optional |
Relationships
- belongs to AnalysisResult
AnalysisResult
Complete analysis output combining static parsing, architectural analysis, and detailed documentation of APIs, components, and data models
File: packages/analyzer/src/types.ts
Fields
| Field | Type | Description | Constraints |
|---|---|---|---|
repoName | string | Repository name | - |
repoUrl | string | Repository URL | - |
staticAnalysis | StaticAnalysis | Static code parsing results | - |
architecture | ArchitectureOverview | Architecture analysis | - |
features | FeaturesAnalysis | null | Features analysis (nullable for non-feature-rich projects) | - |
apiEndpoints | ApiEndpoint[] | Documented API endpoints | - |
components | ComponentDoc[] | Documented UI components | - |
dataModels | DataModelDoc[] | Documented data models | - |
gettingStarted | GettingStartedGuide | Getting started guide | - |
diagrams | MermaidDiagram[] | All diagrams from all analysis stages | - |
Relationships
- contains StaticAnalysis, ArchitectureOverview, FeaturesAnalysis, ApiEndpoint[], ComponentDoc[], DataModelDoc[], GettingStartedGuide, MermaidDiagram[]
ApiContract
Specification of an API contract between a consumer repository and provider repository
File: packages/analyzer/src/types.ts
Fields
| Field | Type | Description | Constraints |
|---|---|---|---|
consumerRepo | string | Consumer repository identifier | - |
providerRepo | string | Provider repository identifier | - |
endpoint | string | API endpoint path | - |
method | string | HTTP method | - |
description | string | Contract description | - |
Relationships
- belongs to CrossRepoAnalysis
RepoRelationship
Describes how two repositories relate to and depend on each other
File: packages/analyzer/src/types.ts
Fields
| Field | Type | Description | Constraints |
|---|---|---|---|
from | string | Source repository | - |
to | string | Target repository | - |
relationshipType | string | Type of relationship (depends-on, provides-api, etc.) | - |
description | string | Relationship description | - |
Relationships
- belongs to CrossRepoAnalysis
IntegrationPattern
Recurring pattern in how multiple repositories integrate and interact
File: packages/analyzer/src/types.ts
Fields
| Field | Type | Description | Constraints |
|---|---|---|---|
repos | string[] | Involved repository identifiers | - |
pattern | string | Pattern name | - |
description | string | Pattern description | - |
direction | string | Direction of data/control flow | - |
Relationships
- belongs to CrossRepoAnalysis
CrossRepoAnalysis
Analysis of relationships, contracts, and integration patterns across multiple repositories in a monorepo or distributed system
File: packages/analyzer/src/types.ts
Fields
| Field | Type | Description | Constraints |
|---|---|---|---|
summary | string | Overview of cross-repository relationships | - |
sharedDependencies | string[] | Dependencies shared across repositories | - |
techStackOverlap | string[] | Common technologies used | - |
apiContracts | ApiContract[] | API contracts between repos | - |
repoRelationships | RepoRelationship[] | Repository dependencies | - |
integrationPatterns | IntegrationPattern[] | Integration patterns | - |
dataFlowAcrossServices | string | Data flow description | - |
sharedConventions | string[] | Shared coding conventions | - |
diagrams | MermaidDiagram[] | Diagrams showing relationships | - |
Relationships
- contains ApiContract[], RepoRelationship[], IntegrationPattern[], MermaidDiagram[]
AnalyzerOptions
Configuration options for the code analyzer pipeline
File: packages/analyzer/src/types.ts
Fields
| Field | Type | Description | Constraints |
|---|---|---|---|
repoPath | string | Local path to the repository | - |
repoName | string | Repository name | - |
repoUrl | string | Repository URL | - |
apiKey | string | Anthropic API key for Claude | - |
model | string | Claude model to use | optional |
skipInit | boolean | Skip CLAUDE.md generation | optional |
onProgress | (stage: string, message: string) => void | Progress callback | optional |
onAgentMessage | (text: string) => void | Agent message callback | optional |
Relationships
- used by analyzeRepository()
AgentQueryOptions
Configuration for running an AI agent query with Claude Agent SDK
File: packages/analyzer/src/agent-sdk.ts
Fields
| Field | Type | Description | Constraints |
|---|---|---|---|
systemPrompt | string | System prompt for agent behavior | - |
prompt | string | Main query/task prompt | - |
cwd | string | Working directory for agent file access | - |
apiKey | string | Anthropic API key | - |
model | string | Claude model version | optional |
outputSchema | Record<string, unknown> | JSON schema for structured output | optional |
allowedTools | string[] | Tools agent can use | optional |
maxTurns | number | Maximum agent turns | optional |
onAgentMessage | (text: string) => void | Message callback | optional |
retryOnMaxTurns | boolean | Auto-retry if max turns exceeded | optional |
Relationships
- used by runAgent()
AgentError
Error type thrown when an AI agent query fails
File: packages/analyzer/src/agent-sdk.ts
Fields
| Field | Type | Description | Constraints |
|---|---|---|---|
name | "AgentError" | Error type identifier | - |
message | string | Error message | - |
subtype | string | Error subtype (error_max_turns, no_result, etc.) | - |
numTurns | number | Number of agent turns executed | optional |
Relationships
- thrown by runAgent()
IncrementalOptions
Options for incremental analysis that reuses previous analysis results
File: packages/analyzer/src/pipeline.ts
Fields
| Field | Type | Description | Constraints |
|---|---|---|---|
repoPath | string | Local path to the repository | - |
repoName | string | Repository name | - |
repoUrl | string | Repository URL | - |
apiKey | string | Anthropic API key | - |
previousResult | AnalysisResult | Previous analysis to diff against | - |
previousCommitSha | string | Previous commit SHA for change detection | - |
model | string | Claude model to use | optional |
skipInit | boolean | Skip CLAUDE.md generation | optional |
onProgress | (stage: string, message: string) => void | Progress callback | optional |
onAgentMessage | (text: string) => void | Agent message callback | optional |
Relationships
- extends AnalyzerOptions
- contains AnalysisResult