feat(hako_shared): Phase 172 JsonParserBox expansion - Program JSON v0 support
🌐 JSON processing SSOT infrastructure established!
🔧 Implementation:
- parse_program() method added to JsonParserBox (lines 448-463)
- ProgramJSONBox wrapper type for type-safe Program JSON access
- Methods: get_version(), get_kind(), get_defs(), get_meta(), get_usings()
- Validates required fields (version, kind) for Program JSON v0
📊 Reuse candidate survey results:
- compiler.hako (543 lines): Emits Program JSON (not consumer)
- json_loader.hako (51 lines): Utility functions only
- json_v0_reader.hako (142 lines): MIR JSON parser (not Program JSON)
- Finding: No significant Program JSON v0 consumers in current codebase
✅ Verification:
- JsonParserBox.parse_program/1: Compiled successfully
- ProgramJSONBox methods: All compiled (birth, get_version, get_kind, etc.)
- json_parser.hako: Runs without errors (RC: 0)
🎯 Phase 172 Achievement:
- Established JSON processing standardization foundation
- Infrastructure ready for future selfhost depth-2 integration
- Boxed modularization pattern fully applied (SSOT + gradual extension)
📝 Documentation:
- NEW: phase172_implementation_results.md (comprehensive analysis)
- MOD: CURRENT_TASK.md (Phase 172 completion status)
🏗️ Next Phase (173+):
- to_json() reverse conversion
- Schema validation
- Full selfhost depth-2 JSON unification
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>