UNPKG

codesummary

Version:

Cross-platform CLI tool that generates professional PDF documentation and RAG-optimized JSON outputs from project source code. Perfect for code reviews, audits, documentation, and AI/ML applications with semantic chunking and precision offsets.

114 lines 4.61 kB
{ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://github.com/skamoll/CodeSummary/schemas/rag-output.json", "title": "CodeSummary RAG Output Schema", "description": "Schema for CodeSummary RAG-optimized JSON output format", "type": "object", "required": ["metadata", "files", "index"], "properties": { "metadata": { "type": "object", "required": ["projectName", "generatedAt", "version", "generator"], "properties": { "projectName": { "type": "string" }, "generatedAt": { "type": "string", "format": "date-time" }, "version": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+$" }, "generator": { "type": "string" }, "scanPath": { "type": "string" }, "config": { "type": "object" }, "summary": { "type": "object" } } }, "files": { "type": "array", "items": { "type": "object", "required": ["id", "path", "extension", "language", "hash", "chunks"], "properties": { "id": { "type": "string" }, "path": { "type": "string" }, "extension": { "type": "string" }, "language": { "type": "string" }, "size": { "type": "number", "minimum": 0 }, "hash": { "type": "string", "pattern": "^sha256-[a-f0-9]{64}$" }, "modified": { "type": "string", "format": "date-time" }, "tags": { "type": "array", "items": { "type": "string" } }, "chunks": { "type": "array", "items": { "type": "object", "required": ["id", "content", "tokenEstimate"], "properties": { "id": { "type": "string" }, "content": { "type": "string" }, "tokenEstimate": { "type": "number", "minimum": 0 }, "lineStart": { "type": "number", "minimum": 1 }, "lineEnd": { "type": "number", "minimum": 1 }, "chunkingMethod": { "type": "string" }, "imports": { "type": "array", "items": { "type": "string" } }, "calls": { "type": "array", "items": { "type": "string" } } } } } } } }, "index": { "type": "object", "required": ["version", "generatedAt", "summary", "chunkOffsets", "fileOffsets", "statistics"], "properties": { "version": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+$" }, "generatedAt": { "type": "string", "format": "date-time" }, "summary": { "type": "object", "required": ["fileCount", "chunkCount", "totalBytes"], "properties": { "fileCount": { "type": "number", "minimum": 0 }, "chunkCount": { "type": "number", "minimum": 0 }, "totalBytes": { "type": "number", "minimum": 0 }, "languages": { "type": "array", "items": { "type": "string" } }, "extensions": { "type": "array", "items": { "type": "string" } } } }, "chunkOffsets": { "type": "object", "patternProperties": { "^chunk_[a-f0-9]+_\\d+$": { "type": "object", "required": ["jsonStart", "jsonEnd", "contentStart", "contentEnd", "filePath"], "properties": { "jsonStart": { "type": "number", "minimum": 0 }, "jsonEnd": { "type": "number", "minimum": 0 }, "contentStart": { "type": "number", "minimum": 0 }, "contentEnd": { "type": "number", "minimum": 0 }, "filePath": { "type": "string" } } } } }, "fileOffsets": { "type": "object", "patternProperties": { "^[a-f0-9]+$": { "type": "array", "items": { "type": "number", "minimum": 0 }, "minItems": 2, "maxItems": 2 } } }, "statistics": { "type": "object", "required": ["processingTimeMs", "bytesWritten", "totalFiles"], "properties": { "processingTimeMs": { "type": "number", "minimum": 1 }, "bytesPerSecond": { "type": "number", "minimum": 0 }, "bytesWritten": { "type": "number", "minimum": 0 }, "totalFiles": { "type": "number", "minimum": 0 }, "emptyFiles": { "type": "number", "minimum": 0 } } } } } } }