refactor(joinir): Phase 44 - Capability-based shape guard
Refactor shape detection from function-name-based to capability-based architecture for better extensibility and maintainability. Key changes: - ShapeCapabilityKind enum: P2CoreSimple/SkipWs/Atoi/ParseNumber - ShapeCapability: Capability descriptor with future extensibility - Helper functions: - capability_for_shape(): Map shape to capability - is_canonical_shape(): Exact shape-level check - is_p2_core_capability(): Broad capability family check - is_supported_by_normalized(): Normalized dev support Benefits: - Extensibility: Easy to add new capability kinds - Clarity: Shape purpose explicit in kind names - Maintainability: Centralized mapping vs scattered ifs - Future-ready: Infrastructure for carrier roles, method signatures Backward compatibility: - Zero behavioral changes (pure refactoring) - Canonical set preserved: Pattern2Mini, skip_ws mini/real, atoi mini - All existing code paths unchanged Tests: 937/937 PASS Files: +78 lines (shape_guard.rs), design doc created
This commit is contained in:
@ -66,6 +66,11 @@
|
||||
- `current_joinir_mode()` でモード取得、bridge/runner で `normalized_dev_enabled()` → mode pattern matching に移行。
|
||||
- Canonical P2-Core は mode 無視で常に Normalized→MIR(direct)、それ以外は mode に従う統一ルーティング。
|
||||
- 937/937 tests PASS(既存挙動完全保持のリファクタ)。
|
||||
- **Phase 44-SHAPE-CAP(実装済み✅ 2025-12-12)**:
|
||||
- Shape検出を capability-based に変更: `NormalizedDevShape` → `ShapeCapability` 抽象化層導入。
|
||||
- `ShapeCapabilityKind` 4種: P2CoreSimple / P2CoreSkipWs / P2CoreAtoi / P2MidParseNumber。
|
||||
- Shape-level (`is_canonical_shape`) と Capability-level (`is_p2_core_capability`) の二層 API でパターン拡張性を確保。
|
||||
- 既存挙動完全保持(canonical set: Pattern2Mini, skip_ws mini/real, atoi mini のまま)、937/937 tests PASS。
|
||||
|
||||
### 1. いまコード側で意識しておきたいフォーカス
|
||||
|
||||
|
||||
Reference in New Issue
Block a user