Skip to content

Commit f865abc

Browse files
committed
feat(05-01): create AST-aligned chunking engine with symbol tree builder
- Add src/utils/ast-chunker.ts with buildSymbolTree, generateASTChunks, mergeSmallSymbolChunks, splitOversizedChunks, createASTAlignedChunks - Add typed symbol metadata fields to ChunkMetadata in types/index.ts (symbolAware, symbolName, symbolKind, symbolPath, parentSymbol, chunkStrategy) - Leaf symbols become single chunks, containers split at method boundaries - Gap/filler chunks cover regions between symbols for full file coverage - Safe split points at blank lines, comments, closing braces
1 parent 2559405 commit f865abc

File tree

2 files changed

+499
-0
lines changed

2 files changed

+499
-0
lines changed

src/types/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,14 @@ export interface ChunkMetadata {
144144
className?: string;
145145
functionName?: string;
146146

147+
// Symbol-aware chunking (AST-aligned)
148+
symbolAware?: boolean;
149+
symbolName?: string;
150+
symbolKind?: string;
151+
symbolPath?: string[];
152+
parentSymbol?: string;
153+
chunkStrategy?: string;
154+
147155
// Framework-specific
148156
isStandalone?: boolean;
149157
selector?: string;

0 commit comments

Comments
 (0)