docs(phase29al): coreplan migration roadmap ssot

This commit is contained in:
2025-12-29 16:25:34 +09:00
parent c53f1edf31
commit 9b8673207e
5 changed files with 103 additions and 2 deletions

View File

@ -5,6 +5,7 @@
Next: Phase 29al P4unwind を含む ExitKind 拡張: design only
運用ルール: integration filter で phase143_* は回さないJoinIR 回帰は phase29ae pack のみ)
運用ルール: phase286_pattern9_* は legacy pack (SKIP) を使う
移行道筋 SSOT: `docs/development/current/main/design/coreplan-migration-roadmap-ssot.md`
**2025-12-29: Phase 29al P3 完了**
- 目的: cleanup を ExitKind と effect の契約として固定(仕様不変)

View File

@ -33,6 +33,7 @@ Related:
- 入口: `docs/development/current/main/phases/phase-29al/README.md`
- 状況: P0/P1/P2/P3 ✅ 完了docs-only
- Next: P4unwind を含む ExitKind 拡張: design only
- 道筋 SSOT: `docs/development/current/main/design/coreplan-migration-roadmap-ssot.md`
- **Phase 29aicandidate: Plan/Frag single-plannerFacts SSOT**
- 入口: `docs/development/current/main/phases/phase-29ai/README.md`

View File

@ -0,0 +1,92 @@
---
Status: SSOT
Scope: JoinIR → PlanFrag → CorePlan への移行道筋(仕様不変で完了と言える条件)
Related:
- docs/development/current/main/10-Now.md
- docs/development/current/main/30-Backlog.md
- docs/development/current/main/design/coreplan-skeleton-feature-model.md
- docs/development/current/main/design/post-phi-final-form-ssot.md
- docs/development/current/main/design/effect-classification-ssot.md
- docs/development/current/main/design/exitkind-cleanup-effect-contract-ssot.md
- docs/development/current/main/phases/phase-29ae/README.md
---
# CorePlan Migration Roadmap (SSOT)
目的: “JoinIR を CorePlan で組み立てる” 状態へ、仕様不変release既定で段階的に収束するための道筋を 1 枚に固定する。
## 0. 前提(守ること)
- 既定挙動不変release の意味論/エラー文字列/恒常ログを変えない)
- silent fallback 禁止strict/dev では Freeze/Fail-Fast で検出可能にする)
- by-name ハードコード禁止構造条件・SSOT境界で解く
- JoinIR integration gateSSOTを常に緑維持:
- `./tools/smokes/v2/profiles/integration/joinir/phase29ae_regression_pack_vm.sh`
## 1. “CorePlan で組み立てる” の定義
ここでの完了は「pattern列挙が消えた」ではなく、以下が成立していること。
- 構造SSOTは `CorePlan`emit/merge は CorePlan/Frag 以外を再解析しない)
- `Facts → Planner → (DomainPlan) → CorePlan → lowerer/emit → merge` が主経路
- `DomainPlan` は意図/recipe として残ってもよいが、最終の verify/emit 契約は CorePlan 側で固定されている
## 2. すでに固めた SSOT再発防止の土台
- Skeleton/Feature: `docs/development/current/main/design/coreplan-skeleton-feature-model.md`
- post-phi final form: `docs/development/current/main/design/post-phi-final-form-ssot.md`
- effect classification: `docs/development/current/main/design/effect-classification-ssot.md`
- cleanup contract: `docs/development/current/main/design/exitkind-cleanup-effect-contract-ssot.md`
## 3. 移行タスクの流れ(安全順)
### Step A: CorePlan 語彙の “穴” を埋めるlowerer/verifier
狙い:
- `CorePlan` の構造ノードが単独でも lower/verify できる(未対応分岐を減らす)
典型:
- `CorePlan::If` / `CorePlan::Exit` の lowerer 対応
- verifier の不変条件を “局所検証” で完結させる
### Step B: Facts を Skeleton+Feature の SSOTへ寄せる
狙い:
- Pattern1/2/4/5 のような “complete pattern” の増殖を止める
- `LoopSkeleton + ExitMap + ValueJoin + ...` の合成で表現できる状態に寄せる
やらない:
- Facts から emit/merge を助けるための再解析を前提にした “不足した Facts” を作る
### Step C: Planner を「骨格の一意化→特徴付与→Freeze」へ
狙い:
- CandidateSet は骨格の一意化に集中0/1/2+ → None/Some/Freeze
- feature は “別パターン” ではなく合成の材料として付与
### Step D: Normalizer を “合成だけ” にする
狙い:
- `(Skeleton, FeatureSet, DomainIntent)``CorePlan` の純変換に収束
- join 入力post-phiと effect/cleanup 契約を壊さない
### Step E: 入口から legacy fallback を段階的に 0 へ
狙い:
- `single_planner` の legacy extractor fallback を削減し、planner-first を主にする
- JoinIR 側 wrapper/router を薄くし、PlanFrag 側 SSOT に寄せる
注意:
- “落ちる” を `Ok(None)` で隠さない(対象っぽいのに一意化できない場合は Freeze
## 4. 完了Doneの判定設計上
最低限の Done:
- JoinIR 回帰 SSOT が緑: `phase29ae_regression_pack_vm.sh`
- 回帰対象(現状の gate: pattern2/6/7 + phase1883 + phase263が “CorePlan 合成” 経路で通る
強い Done段階2:
- Facts が complete pattern を増やさず Skeleton+Feature に寄っている
- DomainPlan は scan/split/predicate 等の “意図” 以外は CorePlan 合成へ吸収されている
- Freeze taxonomy が運用でぶれず、strict/dev の診断が安定タグで追える

View File

@ -38,6 +38,10 @@ Goal: “pattern が重なる/増殖する” を設計で根治し、JoinIR/Pla
## Next (planned)
### P3: ExitKind/cleanup と effect の接続design only
### P4: ExitKind に unwind を追加する設計design only
- ねらい: unwind を含む将来拡張のために、cleanupeffect の順序条件を SSOT 化する
- ねらい: ExitKind/cleanup/effect の契約を unwind を含めて破綻しない形に拡張する(実装は別フェーズ)
### P5: CorePlan migration roadmap の運用docs-only
- ねらい: `coreplan-migration-roadmap-ssot.md` を入口として、移行タスクの Done を迷わず判定できる状態にする