docs(phase29ai): add P15 promotion hint observability instructions
This commit is contained in:
@ -0,0 +1,64 @@
|
||||
# Phase 29ai P15: Observe Pattern2 promotion hint(SSOT, 仕様不変)
|
||||
|
||||
Date: 2025-12-29
|
||||
Status: Ready for execution
|
||||
Scope: P14 で追加した `Pattern2BreakPlan.promotion` を “観測可能” にする(挙動不変)
|
||||
Goal: 次の「Plan/Frag に promotion を吸収する」フェーズ前に、hint が正しく付与されていることを fixture/smoke で固定する
|
||||
|
||||
## Objective
|
||||
|
||||
P14 で planner は LoopBodyLocal facts があるときだけ `Pattern2BreakPlan.promotion` を付与できるようになった。
|
||||
しかし現状は “hint が付いているか” を実行経路で検証できない。
|
||||
|
||||
P15 では:
|
||||
- dev-only / strict-only の観測ログ(安定タグ)を 1 箇所に追加し
|
||||
- 代表 fixture(seg/digit_pos)で hint が付与されていることを smoke で固定する
|
||||
|
||||
## Non-goals
|
||||
|
||||
- 実際の promotion 実装の変更(挙動変更は禁止)
|
||||
- 新しい env var の追加(既存の strict フラグだけ使う)
|
||||
- by-name 分岐の追加(禁止)
|
||||
- production 既定でログ増加(strict/dev のみ)
|
||||
|
||||
## Implementation Steps
|
||||
|
||||
### Step 1: 観測の入口(1箇所)を決める
|
||||
|
||||
推奨:
|
||||
- `src/mir/builder/control_flow/joinir/patterns/router.rs` の “plan 採用ログ” 直前
|
||||
- 理由: `DomainPlan` が確定しており、Pattern2BreakPlan を直接見られる
|
||||
|
||||
出力フォーマット(安定タグ、strict/dev のみ):
|
||||
- `[plan/pattern2/promotion_hint:<TrimSeg|DigitPos>]`
|
||||
|
||||
注意:
|
||||
- `promotion == None` の場合は出力しない(ノイズを増やさない)
|
||||
- `promotion == Some` の場合だけ 1 行(strict/dev のみ)
|
||||
|
||||
### Step 2: smoke で固定
|
||||
|
||||
対象 fixture(既存を使う):
|
||||
- `apps/tests/phase29ab_pattern2_loopbodylocal_seg_min.hako`(TrimSeg)
|
||||
- `apps/tests/phase29ab_pattern2_loopbodylocal_min.hako`(DigitPos)
|
||||
|
||||
追加 smoke(integration):
|
||||
- `tools/smokes/v2/profiles/integration/apps/phase29ai_pattern2_promotion_hint_seg_vm.sh`
|
||||
- `tools/smokes/v2/profiles/integration/apps/phase29ai_pattern2_promotion_hint_digitpos_vm.sh`
|
||||
|
||||
判定:
|
||||
- strict で実行し、stdout にタグが含まれることを確認(exit code は既存の期待を維持)
|
||||
|
||||
### Step 3: Docs 更新
|
||||
|
||||
- `docs/development/current/main/phases/phase-29ai/README.md`
|
||||
- `docs/development/current/main/10-Now.md`
|
||||
- `docs/development/current/main/30-Backlog.md`
|
||||
|
||||
## Verification (SSOT)
|
||||
|
||||
- `cargo build --release`
|
||||
- `./tools/smokes/v2/run.sh --profile quick`
|
||||
- `./tools/smokes/v2/profiles/integration/joinir/phase29ae_regression_pack_vm.sh`
|
||||
- `./tools/smokes/v2/run.sh --profile integration --filter "phase29ai_pattern2_promotion_hint_*"`
|
||||
|
||||
@ -91,6 +91,11 @@ Goal: pattern 名による分岐を外部APIから消し、Facts(事実)→
|
||||
- 完了: promotion hint を plan vocab に追加し、planner が facts から hint を付与(legacy は None)
|
||||
- 検証: `cargo build --release` / `./tools/smokes/v2/run.sh --profile quick` / `./tools/smokes/v2/profiles/integration/joinir/phase29ae_regression_pack_vm.sh`
|
||||
|
||||
## P15: Observe Pattern2 promotion hint(SSOT)
|
||||
|
||||
- 指示書: `docs/development/current/main/phases/phase-29ai/P15-OBSERVE-PATTERN2-PROMOTION_HINT-INSTRUCTIONS.md`
|
||||
- ねらい: promotion hint の付与を fixture/smoke で観測固定し、次の Plan/Frag 吸収フェーズの前提を固める(仕様不変)
|
||||
|
||||
## Verification (SSOT)
|
||||
|
||||
- `cargo build --release`
|
||||
|
||||
Reference in New Issue
Block a user