diff --git a/docs/development/current/main/10-Now.md b/docs/development/current/main/10-Now.md index c387e735..36dddd62 100644 --- a/docs/development/current/main/10-Now.md +++ b/docs/development/current/main/10-Now.md @@ -2,7 +2,7 @@ ## Current Focus: Phase 29ai(Plan/Frag single-planner) -Next: `docs/development/current/main/phases/phase-29ai/P7-PLANNER-RETURNS-DOMAINPLAN-INSTRUCTIONS.md` +Next: `docs/development/current/main/phases/phase-29ai/P8-WIRE-PLANNER-INTO-SINGLE_PLANNER-PATTERN6-INSTRUCTIONS.md` **2025-12-29: Phase 29ag P1 完了** ✅ - 目的: coordinator の ValueId(idx) 前提を撤去し、boundary.join_inputs を SSOT 化(仕様不変) diff --git a/docs/development/current/main/30-Backlog.md b/docs/development/current/main/30-Backlog.md index d7cb49e1..02a736b3 100644 --- a/docs/development/current/main/30-Backlog.md +++ b/docs/development/current/main/30-Backlog.md @@ -19,7 +19,7 @@ Related: - **Phase 29ai(candidate): Plan/Frag single-planner(Facts SSOT)** - 入口: `docs/development/current/main/phases/phase-29ai/README.md` - - Next: P7(Planner returns DomainPlan) + - Next: P8(Wire planner into single_planner: Pattern6 subset) - **Phase 29ae P1(✅ COMPLETE): JoinIR Regression Pack (SSOT固定)** - 入口: `docs/development/current/main/phases/phase-29ae/README.md` diff --git a/docs/development/current/main/phases/phase-29ai/P8-WIRE-PLANNER-INTO-SINGLE_PLANNER-PATTERN6-INSTRUCTIONS.md b/docs/development/current/main/phases/phase-29ai/P8-WIRE-PLANNER-INTO-SINGLE_PLANNER-PATTERN6-INSTRUCTIONS.md new file mode 100644 index 00000000..f7b53608 --- /dev/null +++ b/docs/development/current/main/phases/phase-29ai/P8-WIRE-PLANNER-INTO-SINGLE_PLANNER-PATTERN6-INSTRUCTIONS.md @@ -0,0 +1,49 @@ +# Phase 29ai P8: Wire planner into `single_planner` (Pattern6 subset) — Instructions + +Status: Ready for execution +Scope: 入口収束の前進(仕様不変) + +## Goal + +29ai の `facts/normalize/planner` を “実行経路” に一歩だけ接続し、Pattern6(scan_with_init)の **最小・安全な部分集合** を +single_planner で先に処理できるようにする。 + +- 対象: `loop(i < s.length()) { if s.substring(i, i + 1) == ch { return i } i = i + 1 }` 形のみ +- それ以外は従来どおり `legacy_rules::pattern6` へ落ちる(観測/挙動/エラー文字列は維持) +- Fail-Fast: planner 側はこのP8では `Err(Freeze)` を出さない(NotApplicable を基本にする) + +## Non-goals + +- Pattern6 全派生(reverse/dynamic needle 等)の吸収 +- Pattern7/Pattern2 の接続(P9+) +- legacy extractor の削除(P10+) +- 新しい env 変数/トグルの追加 + +## Implementation Steps + +1) `plan::single_planner::rules` の先頭に “planner 由来” の rule を 1 本追加 + - `plan::planner::build_plan(ctx.condition, ctx.body)` を呼ぶ + - `Ok(Some(domain_plan))` のときは即採用(`DomainPlan::ScanWithInit` が来る想定) + - `Ok(None)` のときは次へ(従来の legacy rules) + - `Err(freeze)` のときは当面 `Err(freeze.to_string())` で落とす(ただし P8 の範囲では freeze を出さない) + +2) ルール順序(観測不変) + - planner 由来 rule は **Pattern6 legacy より前** + - それ以外の順序は P5/P6 で固定した legacy と同一 + +3) 回帰固定 + - 既存 fixture(`apps/tests/phase29ab_pattern6_scan_with_init_ok_min.hako`)が引き続き PASS すること + - contract fixture(`apps/tests/phase29ab_pattern6_scan_with_init_contract_min.hako`)は legacy 側で freeze 維持 + +## Verification (SSOT) + +- `cargo build --release` +- `./tools/smokes/v2/run.sh --profile quick` +- `./tools/smokes/v2/profiles/integration/joinir/phase29ae_regression_pack_vm.sh` + +## Acceptance Criteria + +- quick/回帰パックが緑(仕様不変) +- Pattern6 OK 最小ケースが planner 経由でも PASS(結果は同じ) +- Pattern6 contract ケースは legacy 経由で freeze のまま(エラー文字列も同一) + diff --git a/docs/development/current/main/phases/phase-29ai/README.md b/docs/development/current/main/phases/phase-29ai/README.md index 9dc483a5..e6ffe132 100644 --- a/docs/development/current/main/phases/phase-29ai/README.md +++ b/docs/development/current/main/phases/phase-29ai/README.md @@ -44,6 +44,11 @@ Goal: pattern 名による分岐を外部APIから消し、Facts(事実)→ - 指示書: `docs/development/current/main/phases/phase-29ai/P7-PLANNER-RETURNS-DOMAINPLAN-INSTRUCTIONS.md` - ねらい: 29ai planner の候補集合/Freeze を `DomainPlan` 上で行い、Plan語彙を1本化(仕様不変) +## P8: Wire planner into single_planner(Pattern6 subset) + +- 指示書: `docs/development/current/main/phases/phase-29ai/P8-WIRE-PLANNER-INTO-SINGLE_PLANNER-PATTERN6-INSTRUCTIONS.md` +- ねらい: Facts→Planner を実行経路へ1歩だけ接続し、Pattern6最小ケースから吸収を開始(仕様不変) + ## Verification (SSOT) - `cargo build --release`