feat(schema): add semantic schema generation as default mode
schema-generate now builds content-aware schemas from the document's section hierarchy instead of counting markdown syntax elements. Detects key-value tables, data tables, link lists, and mixed content patterns to produce schemas that reflect the actual document outline. Old behavior preserved via --mode syntactic. Validator and visualization tools pinned to syntactic mode for compatibility. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
120ed89780
commit
60f33443ae
8 changed files with 408 additions and 55 deletions
|
|
@ -20,7 +20,7 @@ def visualize_schema_structure(file_path, max_depth=None, ascii_only=False):
|
|||
"""Create a beautiful tree visualization of the document structure."""
|
||||
|
||||
generator = SchemaGenerator()
|
||||
schema = generator.generate_schema_from_file(Path(file_path), max_depth=max_depth)
|
||||
schema = generator.generate_schema_from_file(Path(file_path), max_depth=max_depth, mode='syntactic')
|
||||
|
||||
# Define icons based on ASCII mode
|
||||
if ascii_only:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue