From 222128430653d2f6bb6310aa76a820afe0cd688a Mon Sep 17 00:00:00 2001 From: Logan Kleier Date: Wed, 22 Jul 2026 10:30:10 -0700 Subject: [PATCH] fix(gcp-to-aws): resolve discover-preview display contradiction + phase breadcrumbs Remove the Step 2A self-contradiction (show per-token direction, never monthly totals). Add HANDOFF_OK breadcrumbs across backbone phases. Rebase onto main: keep #176's benefit-first workshop offer copy and prepend the Phase 4 breadcrumb. Unify the breadcrumb guardrail across all five phases (incl. workshop-reprice clause). Split Discover's long Format line for editor readability. Co-authored-by: Cursor --- .../references/phases/clarify/clarify.md | 4 +++- .../references/phases/design/design.md | 4 +++- .../phases/discover/discover-preview.md | 16 +++++++++++----- .../references/phases/discover/discover.md | 6 +++++- .../references/phases/estimate/estimate.md | 6 +++++- .../references/phases/generate/generate.md | 6 ++++-- 6 files changed, 31 insertions(+), 11 deletions(-) diff --git a/migrate/plugins/migration-to-aws/skills/gcp-to-aws/references/phases/clarify/clarify.md b/migrate/plugins/migration-to-aws/skills/gcp-to-aws/references/phases/clarify/clarify.md index adf17484..fda4129e 100644 --- a/migrate/plugins/migration-to-aws/skills/gcp-to-aws/references/phases/clarify/clarify.md +++ b/migrate/plugins/migration-to-aws/skills/gcp-to-aws/references/phases/clarify/clarify.md @@ -845,7 +845,9 @@ Load `shared/handoff-gates.md`. **Re-read from disk** before checking. Only after `HANDOFF_OK`. In the **same turn** as the output message below, use the Phase Status Update Protocol (Write tool) to write `.phase-status.json` with `phases.clarify` set to `"completed"`. -Output to user: "Clarification complete. Proceeding to Phase 3: Design AWS Architecture." +Output to user: "Phase 2 of 6 complete (Clarify). Remaining: Design → Estimate → Generate (+ optional Feedback). Next artifact: aws-design.json. Proceeding to Phase 3: Design AWS Architecture." + +_Breadcrumbs are emitted only after outer-run `HANDOFF_OK` — never on `GATE_FAIL`, never from inner workshop reprices._ --- diff --git a/migrate/plugins/migration-to-aws/skills/gcp-to-aws/references/phases/design/design.md b/migrate/plugins/migration-to-aws/skills/gcp-to-aws/references/phases/design/design.md index f289d903..16ccd7b6 100644 --- a/migrate/plugins/migration-to-aws/skills/gcp-to-aws/references/phases/design/design.md +++ b/migrate/plugins/migration-to-aws/skills/gcp-to-aws/references/phases/design/design.md @@ -110,7 +110,9 @@ output message below: - Set `phases.design` to `"completed"` - Set `current_phase` to `"estimate"` -Output to user: "AWS Architecture designed. Proceeding to Phase 4: Estimate Costs." +Output to user: "Phase 3 of 6 complete (Design). AWS architecture designed. Remaining: Estimate → Generate (+ optional Feedback). Next artifact: estimation-infra.json (and estimation-ai.json for AI workloads). Proceeding to Phase 4: Estimate Costs." + +_Breadcrumbs are emitted only after outer-run `HANDOFF_OK` — never on `GATE_FAIL`, never from inner workshop reprices._ ## Reference Files diff --git a/migrate/plugins/migration-to-aws/skills/gcp-to-aws/references/phases/discover/discover-preview.md b/migrate/plugins/migration-to-aws/skills/gcp-to-aws/references/phases/discover/discover-preview.md index 202e6aa0..0b63dbb8 100644 --- a/migrate/plugins/migration-to-aws/skills/gcp-to-aws/references/phases/discover/discover-preview.md +++ b/migrate/plugins/migration-to-aws/skills/gcp-to-aws/references/phases/discover/discover-preview.md @@ -75,7 +75,8 @@ eligible_for_clarify_fast_path = false **Purpose:** Show the user what their models map to on Bedrock and whether the per-token price is higher, lower, or roughly equivalent. Do NOT compute a monthly dollar total — -usage volume is unknown at Discover time and will be collected in Clarify (Q3, Q7). +usage volume is unknown at Discover time and will be collected in Clarify (AI-only Q3 +for spend, AI-only Q7 for usage volume). For each model in `models[]` of `ai-workload-profile.json`, map to the closest Bedrock equivalent using the table below, then look up both source and Bedrock per-token prices @@ -101,9 +102,14 @@ from `references/shared/pricing-cache.md` (Source Provider Pricing + Bedrock Mod | `tts-*`, text-to-speech | Amazon Polly | (non-token service — note separately) | | Unknown / other | Amazon Nova Pro | `amazon.nova-pro-v1:0` | -For each mapped model pair, record `source_model` and `bedrock_equivalent` (model name only). -Do NOT compute or display per-token pricing comparisons at this stage — cost analysis -belongs in the Estimate phase where full usage volume context is available. +For each mapped model pair, record `source_model`, `bedrock_equivalent`, both per-token +prices, and `cost_direction` (`"higher"`, `"lower"`, or `"comparable"` — Bedrock relative +to source) in the `bedrock_targets[]` entry (Step 5A schema). + +**Chat display rule:** In the preview summary shown to the user, present each mapping +with its **direction only** — e.g. "gpt-4o → Claude Sonnet 4.6 (slightly higher per +token)" — do NOT show monthly dollar totals or computed spend figures. Full cost +analysis belongs in the Estimate phase where usage volume context is available. --- @@ -214,7 +220,7 @@ Output this block as part of `discover.md` Step 3's user message (chat only — | | | |---|---| | **Models detected** | [model_ids joined by ", "] | -| **Bedrock targets** | [for each bedrock_target: "source_model → bedrock_equivalent"] | +| **Bedrock targets** | [for each bedrock_target: "source_model → bedrock_equivalent (per-token: cost_direction)" — direction word only, no dollar figures] | | **Routing** | [if has_multi_model_routing: gateway_type + " (multi-model routing)" else "Direct SDK"] | | **Monthly estimate** | Available after Estimate phase | | **Timeline (rough)** | [timeline_hint] | diff --git a/migrate/plugins/migration-to-aws/skills/gcp-to-aws/references/phases/discover/discover.md b/migrate/plugins/migration-to-aws/skills/gcp-to-aws/references/phases/discover/discover.md index 334ecc6f..2bad0cbb 100644 --- a/migrate/plugins/migration-to-aws/skills/gcp-to-aws/references/phases/discover/discover.md +++ b/migrate/plugins/migration-to-aws/skills/gcp-to-aws/references/phases/discover/discover.md @@ -199,7 +199,11 @@ Output to user — build message from whichever artifacts exist: Append the preview block from Step 3 to the output message below. -Format: "Discover phase complete. [artifact summaries joined by space] [preview block from discover-preview.md Step 6] Next required step: Phase 2 — Clarify. Load `references/phases/clarify/clarify.md` now. Do not load Design, Estimate, or Generate until Clarify completes and `.phase-status.json` marks `phases.clarify` as `completed`." +Format: "Phase 1 of 6 complete (Discover). [artifact summaries joined by space] [preview block from discover-preview.md Step 6]" + +Then: "Remaining: Clarify → Design → Estimate → Generate (+ optional Feedback). Next required step: Phase 2 — Clarify. Load `references/phases/clarify/clarify.md` now. Do not load Design, Estimate, or Generate until Clarify completes and `.phase-status.json` marks `phases.clarify` as `completed`." + +_Breadcrumbs are emitted only after outer-run `HANDOFF_OK` — never on `GATE_FAIL`, never from inner workshop reprices._ ## Output Files diff --git a/migrate/plugins/migration-to-aws/skills/gcp-to-aws/references/phases/estimate/estimate.md b/migrate/plugins/migration-to-aws/skills/gcp-to-aws/references/phases/estimate/estimate.md index 816eea32..f6a50f3d 100644 --- a/migrate/plugins/migration-to-aws/skills/gcp-to-aws/references/phases/estimate/estimate.md +++ b/migrate/plugins/migration-to-aws/skills/gcp-to-aws/references/phases/estimate/estimate.md @@ -156,6 +156,7 @@ When `gcp-resource-inventory.json` + `aws-design.json` + `estimation-infra.json` exist, offer: ``` +Phase 4 of 6 complete (Estimate). Remaining: Generate (+ optional Feedback). Estimate complete. Before Generate, want to see how the numbers move if you change something? I can reprice scenarios side by side in about a minute each, without re-running discovery — for example: a different AWS region, cheaper @@ -178,7 +179,10 @@ commit." Suggest at most one. `"generate"`. Continue with Feedback/Generate sidebars in `SKILL.md`. For AI-only / billing-only runs (no infra inventory), skip the workshop offer and -set `phases.workshop` → `"completed"`, `current_phase` → `"generate"`. +set `phases.workshop` → `"completed"`, `current_phase` → `"generate"`. Output to user: +"Phase 4 of 6 complete (Estimate). Remaining: Generate (+ optional Feedback). Next artifact: generation plan + migration artifacts." + +_Breadcrumbs are emitted only after outer-run `HANDOFF_OK` — never on `GATE_FAIL`, never from inner workshop reprices._ ## Reference Files diff --git a/migrate/plugins/migration-to-aws/skills/gcp-to-aws/references/phases/generate/generate.md b/migrate/plugins/migration-to-aws/skills/gcp-to-aws/references/phases/generate/generate.md index 060e80aa..42adbc96 100644 --- a/migrate/plugins/migration-to-aws/skills/gcp-to-aws/references/phases/generate/generate.md +++ b/migrate/plugins/migration-to-aws/skills/gcp-to-aws/references/phases/generate/generate.md @@ -193,5 +193,7 @@ After the structured block, include: Output to user: -- If `migration-report.html` exists: "Migration artifact generation complete. All phases of the GCP-to-AWS migration analysis are complete. Your migration report is ready at $MIGRATION_DIR/migration-report.html" -- If `migration-report.html` is missing: "Migration artifact generation complete. All phases of the GCP-to-AWS migration analysis are complete. Markdown documentation is available at $MIGRATION_DIR/MIGRATION_GUIDE.md and $MIGRATION_DIR/README.md. (HTML report generation is optional and non-blocking.)" +- If `migration-report.html` exists: "Phase 5 of 6 complete (Generate). All required phases of the GCP-to-AWS migration analysis are complete. Your migration report is ready at $MIGRATION_DIR/migration-report.html. Optional: Phase 6 (Feedback)." +- If `migration-report.html` is missing: "Phase 5 of 6 complete (Generate). All required phases of the GCP-to-AWS migration analysis are complete. Markdown documentation is available at $MIGRATION_DIR/MIGRATION_GUIDE.md and $MIGRATION_DIR/README.md. (HTML report generation is optional and non-blocking.) Optional: Phase 6 (Feedback)." + +_Breadcrumbs are emitted only after outer-run `HANDOFF_OK` — never on `GATE_FAIL`, never from inner workshop reprices._