Files
hakorune/docs/development/current/main
nyash-codex 67c41d3b04 docs: Phase 221 JsonParser numerical loops deployment
Phase 221: JsonParser 数値ループの実戦投入と制約整理完了

## Task 1: 代表テスト再確認 (E2E)

 3/3 tests PASS:
- phase190_atoi_impl.hako: 12 (P2 NumberAccumulation)
- phase190_parse_number_impl.hako: 123 (P2 NumberAccumulation)
- phase212_if_sum_min.hako: RC=2 (P3 if-sum with variable condition)

## Task 2: JsonParser ミニケース追加

 2/2 additional tests PASS:
- phase200d_capture_minimal.hako: 30 (P2 with captured vars)
- phase200d_digits_accumulate.hako: 0,1,2 (P2 simple accumulation)

## Task 3: 制約の洗い出し記録

###  実戦 OK (5/9 tests):
- NumberAccumulation (P2) 
- if-sum pattern (P3) 
- Captured variables (P2) 
- Simple accumulation (P2) 

### ⚠️ 制約でブロック (4/9 tests):
1. **LoopBodyLocal in condition** (Pattern 5+ required):
   - phase200_digits_atoi_min.hako: `pos` in break condition
   - phase200_digits_parse_number_min.hako: `digit_pos` in break condition

2. **MethodCall whitelist** (Phase 193 constraint):
   - phase200d_digits_simple.hako: `substring` not whitelisted
   - Supported: indexOf, get, toString only

3. **if condition pattern** (Phase 219-fix constraint):
   - phase218_json_if_sum_min.hako: Variable in if LHS (`i > 0`)
   - if-sum mode accepts only `var CmpOp literal`

## Task 4: 設計ドキュメント固定

Updated docs/development/current/main/joinir-architecture-overview.md:
- Section 4.3: JsonParser 実戦カバレッジ (Phase 210 → Phase 221)
- Coverage: 7/13 (54%) → 9/13 (69%)
- Added: 3 constraint categories with concrete examples
- Conclusion: NumberAccumulation + captured const + if-sum 基盤完成 

Updated CURRENT_TASK.md:
- Added Phase 221 summary (実戦 OK, 制約発見, 次の候補)

## 成果サマリー

- **JoinIR 数値ループ基盤**: 実戦投入可能な成熟度に到達
- **5/9 テスト PASS**: NumberAccumulation, if-sum, captured vars 全て動作
- **3 種の既知制約**: LoopBodyLocal in condition, MethodCall whitelist, if condition pattern
- **次の候補**: Pattern 5+ 拡張, if condition 左辺変数対応
2025-12-10 09:03:46 +09:00
..