diff --git a/docs/development/current/main/10-Now.md b/docs/development/current/main/10-Now.md index d1a722ae..71d6f50d 100644 --- a/docs/development/current/main/10-Now.md +++ b/docs/development/current/main/10-Now.md @@ -1,6 +1,6 @@ # Self Current Task — Now (main) -## Current Focus: Phase 287 P7(Rewriter scaffolding cleanup) +## Current Focus: Phase 287 P8(Rewriter README/guard) **2025-12-27: Phase 188.3 完了** ✅ - Pattern6(NestedLoopMinimal): `apps/tests/phase1883_nested_minimal.hako` が RC=9 @@ -50,7 +50,13 @@ - Scan stage を削除し、pipeline を 2-stage(Plan→Apply)へ単純化(意味論不変) - 検証: quick 154 PASS - 入口: `docs/development/current/main/phases/phase-287/P6-SCAN_PLAN-INTEGRATION-INSTRUCTIONS.md` -- 次の指示書(P7): `docs/development/current/main/phases/phase-287/P7-REWRITER-BOX-SCAFFOLDING-CLEANUP-INSTRUCTIONS.md` +- 次の指示書(P7): `docs/development/current/main/phases/phase-287/P7-REWRITER-BOX-SCAFFOLDING-CLEANUP-INSTRUCTIONS.md`(完了) + +**2025-12-27: Phase 287 P7 完了** ✅ +- `rewriter/` の未使用 Box 雛形を削除し、SSOT を `rewriter/stages/*` に寄せた(意味論不変) +- 検証: Build 0 errors / quick 154 PASS / 恒常ログ増加なし +- 入口: `docs/development/current/main/phases/phase-287/P7-REWRITER-BOX-SCAFFOLDING-CLEANUP-INSTRUCTIONS.md` +- 次の指示書(P8): `docs/development/current/main/phases/phase-287/P8-REWRITER-README-GUARD-INSTRUCTIONS.md` **2025-12-27: Phase 188.2 完了** ✅ - StepTreeの `max_loop_depth` を SSOT に採用(Option A) @@ -143,8 +149,8 @@ - quick smoke 154/154 PASS 維持、Pattern1/4 PoC 両方 PASS **次のステップ**: -1. **Phase 287(P7)**: Rewriter scaffolding cleanup(意味論不変) - - 指示書: `docs/development/current/main/phases/phase-287/P7-REWRITER-BOX-SCAFFOLDING-CLEANUP-INSTRUCTIONS.md` +1. **Phase 287(P8)**: Rewriter README/guard(docs-first) + - 指示書: `docs/development/current/main/phases/phase-287/P8-REWRITER-README-GUARD-INSTRUCTIONS.md` 2. (post self-host / docs-first)**Phase 29y**: MIR lifecycle vocab freeze(RC/weak/ABI) - 相談パケット: `docs/development/current/main/investigations/phase-29y-mir-lifecycle-vocab-consult.md` 3. (future design, separate phase)Plan 生成の正規化(相談パケット) diff --git a/docs/development/current/main/30-Backlog.md b/docs/development/current/main/30-Backlog.md index c43907f7..1b1d4f7e 100644 --- a/docs/development/current/main/30-Backlog.md +++ b/docs/development/current/main/30-Backlog.md @@ -14,10 +14,10 @@ Related: - 次: Phase 288.2+(任意): REPL UX improvements(history / multiline / load 等) - **Phase 287(active): Big Files Refactoring follow-ups(意味論不変)** - - 状況: P0/P1/P2/P3/P4/P5/P6 ✅ 完了(merge modularize / ast_feature_extractor facade / contract_checks facade / rewriter stages split / plan stage split / stages facade / remove scan stage) - - 次(P7): rewriter の Box 雛形を整理(SSOT を `rewriter/stages/*` に寄せる) + - 状況: P0/P1/P2/P3/P4/P5/P6/P7 ✅ 完了(merge modularize / ast_feature_extractor facade / contract_checks facade / rewriter stages split / plan stage split / stages facade / remove scan stage / box scaffolding cleanup) + - 次(P8): rewriter README/guard を追加して責務境界を明文化 - 入口: `docs/development/current/main/phases/phase-287/README.md` - - 指示書: `docs/development/current/main/phases/phase-287/P7-REWRITER-BOX-SCAFFOLDING-CLEANUP-INSTRUCTIONS.md` + - 指示書: `docs/development/current/main/phases/phase-287/P8-REWRITER-README-GUARD-INSTRUCTIONS.md` - **Phase 284(✅ COMPLETE): Return as ExitKind SSOT(patternに散らさない)** - 目的: `return` を “pattern最適化の個別実装” にせず、`ExitKind` と `compose::*` / `emit_frag()` に収束させる diff --git a/docs/development/current/main/phases/phase-287/P7-REWRITER-BOX-SCAFFOLDING-CLEANUP-INSTRUCTIONS.md b/docs/development/current/main/phases/phase-287/P7-REWRITER-BOX-SCAFFOLDING-CLEANUP-INSTRUCTIONS.md index bc66e55f..ff02d4c9 100644 --- a/docs/development/current/main/phases/phase-287/P7-REWRITER-BOX-SCAFFOLDING-CLEANUP-INSTRUCTIONS.md +++ b/docs/development/current/main/phases/phase-287/P7-REWRITER-BOX-SCAFFOLDING-CLEANUP-INSTRUCTIONS.md @@ -1,7 +1,7 @@ # Phase 287 P7: Rewriter Box scaffolding cleanup(意味論不変) **Date**: 2025-12-27 -**Status**: Ready(next) +**Status**: Completed ✅ **Scope**: `src/mir/builder/control_flow/joinir/merge/rewriter/` 配下に残っている “旧 pipeline の箱(Box)雛形” を、現状の SSOT(Plan→Apply)に合わせて整理する。 **Non-goals**: 仕様変更、エラータグ/ヒント文の変更、ログ恒常増加、silent fallback 追加、実行経路の追加 diff --git a/docs/development/current/main/phases/phase-287/P8-REWRITER-README-GUARD-INSTRUCTIONS.md b/docs/development/current/main/phases/phase-287/P8-REWRITER-README-GUARD-INSTRUCTIONS.md new file mode 100644 index 00000000..39eb3206 --- /dev/null +++ b/docs/development/current/main/phases/phase-287/P8-REWRITER-README-GUARD-INSTRUCTIONS.md @@ -0,0 +1,41 @@ +# Phase 287 P8: Rewriter README / guard(docs-first, 意味論不変) + +**Date**: 2025-12-27 +**Status**: Ready(next) +**Scope**: `src/mir/builder/control_flow/joinir/merge/rewriter/` に README(責務境界)を追加し、SSOT(Plan→Apply)と “この層でやらないこと” を明文化する。 +**Non-goals**: コードの挙動変更、エラータグ変更、ログ増加、Box の再増殖 + +--- + +## 目的 + +- `rewriter/` の責務を 1 枚で説明できるようにする(迷子防止)。 +- `rewriter/stages/*` を SSOT として固定し、今後の refactor でも入口がブレないようにする。 + +--- + +## 追加するファイル + +- `src/mir/builder/control_flow/joinir/merge/rewriter/README.md` + +内容(最小): +- 役割: JoinIR merge の “rewriting pipeline” 実装(Plan→Apply) +- SSOT: + - `rewriter/stages/mod.rs`(入口) + - `rewriter/stages/plan/`(純粋変換) + - `rewriter/stages/apply.rs`(builder mutation) +- やらないこと: + - contract checks の追加/変更(`merge/contract_checks/*` が担当) + - boundary の設計変更(`JoinInlineBoundary` の契約は別) + - silent fallback の追加(Fail-Fast 原則) + +--- + +## 検証 + +docs-only なので `cargo check` と quick が通ることだけ確認: + +```bash +cargo check -p nyash-rust --lib +./tools/smokes/v2/run.sh --profile quick +``` diff --git a/docs/development/current/main/phases/phase-287/README.md b/docs/development/current/main/phases/phase-287/README.md index dae519dc..08d612b9 100644 --- a/docs/development/current/main/phases/phase-287/README.md +++ b/docs/development/current/main/phases/phase-287/README.md @@ -1,6 +1,6 @@ # Phase 287: Developer Hygiene(big files / smoke / normalizer) -**Status**: In progress (P0/P1/P2/P3/P4/P5/P6 complete, P7 next) +**Status**: In progress (P0/P1/P2/P3/P4/P5/P6/P7 complete, P8 next) **Date**: 2025-12-27 **Previous**: Phase 286 (Plan Line完全運用化) @@ -58,13 +58,18 @@ Phase 287 は「開発導線の整備(意味論不変)」を優先して、 --- -## Next (P7) +## 2025-12-27 Update: Rewriter scaffolding cleanup(P7)✅ -- pipeline の古い scaffolding(`apply_box.rs` など)を整理し、現在の SSOT(Plan→Apply)に合わせて命名/責務を揃える(意味論不変)。 +- pipeline の古い scaffolding(`apply_box.rs` / `parameter_binding_box.rs` / `tail_call_detector_box.rs`)を削除し、SSOT を `rewriter/stages/*` に寄せた(意味論不変)。 - 指示書: `docs/development/current/main/phases/phase-287/P7-REWRITER-BOX-SCAFFOLDING-CLEANUP-INSTRUCTIONS.md` --- +## Next (P8) + +- `rewriter/` の README/責務ガードを追加して、SSOT(Plan→Apply)と “ここでは何をしないか” を明文化する。 + - 指示書: `docs/development/current/main/phases/phase-287/P8-REWRITER-README-GUARD-INSTRUCTIONS.md` + ## Legacy / Historical (2025-12-26 plan) 以下は「Phase 287 を hygiene として計画していた時期のログ」。今後の候補として残すが、P0/P1(big files)とは別系統。