docs: Update JoinIR design map + organize CLAUDE.md (Phase 135 follow-up)

## Changes

### joinir-design-map.md
- Added "Allocator SSOT (Phase 135)" section
  - Principle: All ValueId allocation via single allocator (ConditionContext.alloc_value)
  - Prohibited: Internal counters in ConditionLoweringBox/ExprLowerer
  - Reason: Collisions with JoinIR params (ValueId(1000+)) overwrite header PHI dst
  - Detection: --verify catches "Value %N defined multiple times"

- Added "Boundary Injection SSA (Phase 135)" section
  - Principle: condition_bindings allow aliases, but injected Copy dst must be unique
  - Fail-Fast: Error on different sources to same dst
  - Reason: Breaks MIR SSA, causes undefined behavior in VM/LLVM

- Added "Box Implementation Checklist"
  - 4-point checklist for Box implementation/changes
  - Covers: --verify, smoke tests, allocator usage, boundary injection

### CLAUDE.md
- Organized "重要設計書" section with clearer structure
- Added "JoinIR 設計図" subsection with both documents:
  - JoinIR アーキテクチャ概要 (normative SSOT for contracts/invariants)
  - JoinIR 設計マップ (navigation SSOT for implementation)
- Grouped related documents: JoinIR, MIR・言語仕様

## Context
Phase 135 revealed that missing "what not to do" (invariants/contracts) in
design docs led to Allocator SSOT violations and ValueId collisions.
This update ensures future Box implementations can follow clear contracts.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
nyash-codex
2025-12-15 19:03:05 +09:00
parent d82c332a40
commit b4ef8a0023
2 changed files with 32 additions and 2 deletions

View File

@ -825,10 +825,15 @@ Read docs/reference/ # まずドキュメントAPI/言語仕様の入口)
**設計書がすぐ見つからない問題を解決!**
### 🏗️ **アーキテクチャ核心**
- **[JoinIR アーキテクチャ](docs/development/current/main/joinir-architecture-overview.md)** ⭐超重要 - Loop/If/ExitLine/Boundary/PHI の全体図
- **[名前空間・using system](docs/reference/language/using.md)** - ドット記法・スコープ演算子・Phase 15.5計画
#### JoinIR 設計図(超重要!)
- **[JoinIR アーキテクチャ概要](docs/development/current/main/joinir-architecture-overview.md)** ⭐超重要 - Loop/If/ExitLine/Boundary/PHI の全体図・契約・不変条件normative SSOT
- **[JoinIR 設計マップ](docs/development/current/main/design/joinir-design-map.md)** ⭐NEW - 実装導線の地図(どのファイルを触るか/入口/Pattern 分類/Allocator SSOT/Boundary SSA/チェックリスト)
#### MIR・言語仕様
- **[MIR Callee革新](docs/development/architecture/mir-callee-revolution.md)** - 関数呼び出し型安全化・シャドウイング解決
- **[構文早見表](docs/quick-reference/syntax-cheatsheet.md)** - 基本構文・よくある間違い
- **[名前空間・using system](docs/reference/language/using.md)** - ドット記法・スコープ演算子・Phase 15.5計画
### 📋 **Phase 15.5重要資料**
- **[Core Box統一計画](docs/private/roadmap2/phases/phase-15.5/README.md)** - builtin vs plugin問題