docs: Update CURRENT_TASK.md - Phase 91 planning complete

## P1 Status Update
- Phase 91 Step 1:  COMPLETE
  - Loop inventory: 34 loops across 6 files
  - Pattern P5b design: Complete
  - Test fixture: Created
  - Capability taxonomy: Extended

- Phase 91 Step 2: NEXT (Implementation)
  - detect_escape_pattern() in Canonicalizer
  - Unit tests + parity verification
  - No lowering in Step 2 (deferred to Step 3)

## Key Findings
- Current JoinIR readiness: 47% (16/30 loops)
- Pattern P5b unlocks: All escape sequence parsers
- Effort estimate: 2-3 days for recognition phase

## Next Priority
Phase 91 Step 2: Implement Canonicalizer recognition for P5b pattern

🤖 Generated with Claude Code

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
nyash-codex
2025-12-16 14:22:55 +09:00
parent 9e3b258046
commit 42f8f4d088

View File

@ -73,25 +73,50 @@ SSOT:
- 既定挙動は変えないdev-only で観測→段階投入)
- 新しい環境変数は増やさない(`joinir_dev_enabled()` の範囲で観測する)
### P1: JoinIR / Selfhost depth-2 の前進(実装可能 - Phase 91 候補
### P1: JoinIR / Selfhost depth-2 の前進Phase 91 - 設計完了
**状態**: ✅ 実装可能
**状態**: ✅ **Phase 91 計画完了** → 次は実装フェーズ
目的:
- JsonParserBox の残り複合ループを JoinIR 対応する。
- または selfhost .hako コンパイラの他部分Lexer/ASTBuilder 等)で JoinIR 適用範囲を拡大する。
**目的**: Selfhost コンパイラの未対応ループを JoinIR 対象に拡大
**成果Phase 91 Step 1**:
- ✅ ループ在庫分析: 34ループ across 6ファイル47% JoinIR対応
- ✅ Pattern P5b (Escape Handling) デザイン完成
- ✅ テストフィクスチャ作成 (`test_pattern5b_escape_minimal.hako`)
- ✅ Capability 拡張P5b専用タグ
**優先順位**:
1. **P5b (Escape Handling)** - `json_loader.hako:30` (8行)
- Effort: 2-3日
- Impact: JSON/CSV パーサー全般を JoinIR 対応可能に
- Status: 設計完了、実装待ち
2. **P5 (Guard-Bounded)** - `mini_vm_core.hako:541` (204行)
- Effort: 1-2週
- Impact: 大規模ループ最適化guard counter除去
- Status: 分析完了、設計待ち
3. **P6 (Nested Loops)** - `seam_inspector.hako:76` (7+ levels)
- Effort: 2-3週
- Impact: 深い入れ子対応(将来)
- Status: 候補識別完了
**次に触るSSOT**:
- Loop系: `docs/development/current/main/joinir-architecture-overview.md`
- VM Box系: `docs/development/current/main/phase131-2-box-resolution-map.md`
- Phase 91 詳細計画: `docs/development/current/main/phases/phase-91/README.md`
- P5b デザイン: `docs/development/current/main/design/pattern-p5b-escape-design.md`
- Loop Canonicalizer: `docs/development/current/main/design/loop-canonicalizer.md`
やること(設計→実装の順):
1. 候補ループの抽出JsonParserBox or Lexer/ASTBuilder
2. Pattern 判定Pattern 1-4 のいずれか、または新 Pattern 提案)
3. JoinIR lowering 実装 + E2E テスト
**Phase 91 Step 2 (次)**: Canonicalizer 実装
1. `detect_escape_pattern()` 関数追加
2. Unit tests (P5b 認識)
3. Parity verification (strict mode)
4. Documentation 更新
受け入れ基準:
- 代表ケースが 1 コマンドで再現可能CI は増やさない、quick を重くしない)。
- ✅ P5b パターン認識で `decision.chosen == Pattern5bEscape`
-`missing_caps == []`(すべての capability 充足)
-`HAKO_JOINIR_STRICT=1` で parity green
- ✅ 既存テスト退行なし
### P2: Ownership/Relay runtime 対応の再開Phase 92 候補)