nyash-codex
9e3b258046
feat(phase-91): JoinIR Selfhost depth-2 advancement - Pattern P5b design & planning
## Overview
Analyzed 34 loops across selfhost codebase to identify JoinIR coverage gaps.
Current readiness: 47% (16/30 loops). Next frontier: Pattern P5b (Escape Handling).
## Current Status
- Phase 91 planning document: Complete
- Loop inventory across 6 key files
- Priority ranking: P5b (escape) > P5 (guard) > P6 (nested)
- Effort estimates and ROI analysis
- Pattern P5b Design: Complete
- Problem statement (variable-step carriers)
- Pattern definition with Skeleton layout
- Recognition algorithm (8-step detection)
- Capability taxonomy (P5b-specific guards)
- Lowering strategy (Phase 92 preview)
- Test fixture: Created
- Minimal escape sequence parser
- JSON string with backslash escape
- Loop Canonicalizer extended
- Capability table updated with P5b entries
- Fail-Fast criteria documented
- Implementation checklist added
## Key Findings
### Loop Readiness Matrix
| Category | Count | JoinIR Status |
|----------|-------|--------------|
| Pattern 1 (simple bounded) | 16 | ✅ Ready |
| Pattern 2 (with break) | 1 | ⚠️ Partial |
| **Pattern P5b (escape seq)** | ~3 | ❌ NEW |
| Pattern P5 (guard-bounded) | ~2 | ❌ Deferred |
| Pattern P6 (nested loops) | ~8 | ❌ Deferred |
### Top Candidates
1. **P5b**: json_loader.hako:30 (8 lines, high reuse)
- Effort: 2-3 days (recognition)
- Impact: Unlocks all escape parsers
2. **P5**: mini_vm_core.hako:541 (204 lines, monolithic)
- Effort: 1-2 weeks
- Impact: Major JSON optimization
3. **P6**: seam_inspector.hako:76 (7+ nesting)
- Effort: 2-3 weeks
- Impact: Demonstrates nested composition
## Phase 91 Strategy
**Recognition-only phase** (no lowering in P1):
- Step 1: Design & planning ✅
- Step 2: Canonicalizer implementation (detect_escape_pattern)
- Step 3: Unit tests + parity verification
- Step 4: Lowering deferred to Phase 92
## Files Added
- docs/development/current/main/phases/phase-91/README.md - Full analysis & planning
- docs/development/current/main/design/pattern-p5b-escape-design.md - Technical design
- tools/selfhost/test_pattern5b_escape_minimal.hako - Test fixture
## Files Modified
- docs/development/current/main/design/loop-canonicalizer.md
- Capability table extended with P5b entries
- Pattern P5b full section added
- Implementation checklist updated
## Acceptance Criteria (Phase 91 Step 1)
- ✅ Loop inventory complete (34 loops across 6 files)
- ✅ Pattern P5b design document ready
- ✅ Test fixture created
- ✅ Capability taxonomy extended
- ⏳ Implementation deferred (Step 2+)
## References
- JoinIR Architecture: joinir-architecture-overview.md
- Phase 91 Plan: phases/phase-91/README.md
- P5b Design: design/pattern-p5b-escape-design.md
Next: Implement detect_escape_pattern() recognition in Phase 91 Step 2
🤖 Generated with Claude Code
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2025-12-16 14:22:36 +09:00
..
2025-09-26 00:42:55 +09:00
2025-09-06 06:24:08 +09:00
2025-10-31 19:22:00 +09:00
2025-08-28 12:09:09 +09:00
2025-11-09 00:57:10 +09:00
2025-12-02 12:38:01 +09:00
2025-09-19 02:07:38 +09:00
2025-12-04 19:11:20 +09:00
2025-11-08 23:45:29 +09:00
2025-12-04 20:13:21 +09:00
2025-10-31 19:22:00 +09:00
2025-11-11 02:07:12 +09:00
2025-09-07 07:28:53 +09:00
2025-12-02 12:38:01 +09:00
2025-11-01 12:19:17 +09:00
2025-11-02 15:43:43 +09:00
2025-12-10 00:01:53 +09:00
2025-12-16 14:22:36 +09:00
2025-12-15 19:25:33 +09:00
2025-12-10 00:01:53 +09:00
2025-09-06 06:24:08 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-09-14 00:44:28 +09:00
2025-11-06 15:41:52 +09:00
2025-12-10 00:01:53 +09:00
2025-08-29 23:11:21 +09:00
2025-12-10 00:01:53 +09:00
2025-11-09 15:11:18 +09:00
2025-11-07 19:32:44 +09:00
2025-09-01 23:44:34 +09:00
2025-12-15 11:06:26 +09:00
2025-09-14 04:51:33 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-09-16 23:49:36 +09:00
2025-09-06 06:24:08 +09:00
2025-09-05 05:16:21 +09:00
2025-09-05 05:16:21 +09:00
2025-11-01 18:53:15 +09:00
2025-11-06 15:41:52 +09:00
2025-08-26 01:42:18 +09:00
2025-12-10 00:01:53 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-15 05:42:32 +09:00
2025-11-06 15:41:52 +09:00
2025-11-01 13:28:56 +09:00
2025-12-02 12:38:01 +09:00
2025-12-02 12:38:01 +09:00
2025-11-06 15:41:52 +09:00
2025-12-10 00:01:53 +09:00
2025-12-10 00:01:53 +09:00
2025-12-04 15:00:45 +09:00
2025-12-04 14:19:48 +09:00
2025-12-04 19:15:37 +09:00
2025-12-08 18:57:05 +09:00
2025-12-02 12:38:01 +09:00
2025-11-06 15:41:52 +09:00
2025-09-14 04:51:33 +09:00
2025-11-11 21:24:51 +09:00
2025-09-04 11:34:15 +09:00
2025-11-06 15:41:52 +09:00
2025-09-04 11:34:15 +09:00
2025-12-10 00:01:53 +09:00
2025-11-09 23:40:36 +09:00
2025-09-15 01:21:37 +09:00
2025-11-13 16:40:58 +09:00
2025-09-05 13:29:17 +09:00
2025-09-05 13:29:17 +09:00
2025-12-10 00:01:53 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-01 18:53:15 +09:00
2025-09-15 01:21:37 +09:00
2025-09-05 13:29:17 +09:00
2025-09-07 07:36:15 +09:00
2025-12-02 12:38:01 +09:00
2025-11-06 15:41:52 +09:00
2025-09-15 18:44:49 +09:00
2025-09-15 18:44:49 +09:00
2025-12-10 00:01:53 +09:00
2025-12-10 00:01:53 +09:00
2025-12-10 00:01:53 +09:00
2025-11-23 05:53:27 +09:00
2025-09-27 08:45:25 +09:00
2025-09-27 08:45:25 +09:00
2025-09-04 11:34:15 +09:00
2025-11-06 15:41:52 +09:00
2025-12-10 00:01:53 +09:00
2025-09-19 02:07:38 +09:00
2025-09-19 02:07:38 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-09-18 13:35:38 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-09-15 22:14:42 +09:00
2025-12-10 00:01:53 +09:00
2025-11-06 15:41:52 +09:00
2025-09-21 08:53:00 +09:00
2025-09-15 18:44:49 +09:00
2025-12-10 00:01:53 +09:00
2025-09-15 18:44:49 +09:00
2025-12-10 00:01:53 +09:00
2025-11-06 15:41:52 +09:00
2025-09-15 18:44:49 +09:00
2025-12-10 00:01:53 +09:00
2025-12-10 00:01:53 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-15 22:32:13 +09:00
2025-12-10 00:01:53 +09:00
2025-12-10 00:01:53 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-12-02 12:38:01 +09:00
2025-11-01 18:53:15 +09:00
2025-11-06 15:41:52 +09:00
2025-12-10 00:01:53 +09:00
2025-11-06 15:41:52 +09:00
2025-12-10 00:01:53 +09:00
2025-11-06 15:41:52 +09:00
2025-11-08 17:04:21 +09:00
2025-12-10 00:01:53 +09:00
2025-11-30 14:30:28 +09:00
2025-11-30 14:30:28 +09:00
2025-11-21 23:52:10 +09:00
2025-11-19 02:44:40 +09:00
2025-11-08 17:04:21 +09:00
2025-12-10 00:01:53 +09:00
2025-12-02 14:07:19 +09:00
2025-12-02 14:07:19 +09:00
2025-12-04 11:28:55 +09:00
2025-12-04 11:44:55 +09:00
2025-12-05 07:47:22 +09:00
2025-12-02 14:07:19 +09:00
2025-11-13 18:11:25 +09:00
2025-11-09 15:11:18 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-12-10 00:01:53 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-09-07 07:36:15 +09:00
2025-09-17 20:33:19 +09:00
2025-12-10 00:01:53 +09:00
2025-12-10 00:01:53 +09:00
2025-08-24 00:05:12 +09:00