- Switch import from publication_tree_factory to asciidoc_publication_parser
- Update MAX_PARSE_LEVEL from 6 to 5 for new hierarchy limits
- No functional changes yet - foundation for hierarchical parsing
✅ Verified: App compiles, ZettelEditor loads, parse levels 2-5 available
Ready for: Function call update in next checkpoint
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Successfully implemented proper Asciidoctor tree processor extension for NKBIP-01
hierarchical parsing with comprehensive test coverage and future integration plan.
Features:
- Real Asciidoctor tree processor extension using registry.treeProcessor()
- NKBIP-01 compliant hierarchical structure (30040 index + 30041 content events)
- Parse levels 2-5 with different event granularities:
* Level 2: One 30041 per level 2 section (contains all nested content)
* Level 3+: Mix of 30040 (sections with children) + 30041 (content sections)
- Content preserved as original AsciiDoc markup
- Comprehensive test suite validating all parse levels and event structures
Implementation:
- src/lib/utils/publication_tree_processor.ts: Core tree processor extension
- src/lib/utils/asciidoc_publication_parser.ts: Unified parser interface
- tests/unit/publication_tree_processor.test.ts: Complete test coverage
- HIERARCHY_VISUALIZATION_PLAN.md: Next phase integration plan
Next: Integrate into ZettelEditor with visual hierarchy indicators
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Complete the AST-based parsing migration by removing all deprecated manual
parsing functions. The codebase now exclusively uses Asciidoctor's AST
for document processing.
- Remove parseAsciiDocWithMetadata, parseAsciiDocIterative, generateNostrEvents
- Delete 484 lines of legacy parsing code from asciidoc_metadata.ts
- Clean up imports and formatting across affected files
- Fix import paths to use consistent module resolution
- Remove unused UI imports from compose page
This completes the transition to AST-based PublicationTree architecture.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Replace manual regex parsing with proper Asciidoctor AST traversal for more
accurate and scalable document processing. Add dynamic parse level system
that correctly maps AsciiDoc hierarchy to Nostr events.
Key changes:
- New asciidoc_ast_parser.ts using Asciidoctor's native document structure
- PublicationTree factory for seamless integration with existing architecture
- Fixed level mapping: Asciidoctor levels 1-5 → app levels 2-6
- Dynamic parse level generation (2-6) with proper event count progression
- Responsive editor height using viewport units for adaptive screen sizing
- Enhanced preview with hierarchical visualization and event boundaries
Event count progression now works correctly:
- Level 2: 3 events → Level 6: 20+ events
- Full reactivity when changing parse levels
- Proper content type detection (Article vs Notes vs None)
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>