fix(gcp-to-aws): discover-preview display contradiction + phase progress breadcrumbs - #169
Conversation
Clean merge to current main (through awslabs#169, which also touched clarify.md — no overlap). Full build green.
leon1418
left a comment
There was a problem hiding this comment.
[🤖 AI review 🤖]
Scope: Full review of all 6 changed files — design, functionality, consistency, clarity.
Summary: This PR fixes a genuine self-contradicting instruction in discover-preview.md Step 2A (the title says "build per-token price comparison" while a paragraph below forbids displaying it) and adds progressive-disclosure breadcrumbs to each phase handoff. Both changes improve code health.
The contradiction fix is well-executed: it replaces the blanket prohibition with a precise "Chat display rule" (direction word only, no dollar totals) that aligns with what Step 5A's schema already records. The breadcrumbs are consistent across all 5 backbone phases (1→5, skipping optional Phase 6), correctly gated behind HANDOFF_OK, and correctly excluded from workshop reprices and GATE_FAIL.
No blocking findings. Two non-blocking observations below.
Merge status: main (likely from #176 which merged 2026-07-23 and touched estimate.md). Must be rebased before merge.
Interaction with open PRs: #183 touches clarify.md and discover.md (same files), #185 touches estimate.md and generate.md, #186 touches discover-preview.md, design.md, estimate.md, generate.md. All are in the same series and will need ordered resolution. This PR's changes are small/additive (breadcrumb lines and a paragraph swap), so conflicts should be straightforward to resolve regardless of merge order.
CI: All checks passed (build, gitleaks, bandit, semgrep, checkov) ✅
Recommendation: Mergeable once rebased. No code-health concerns.
| 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." |
There was a problem hiding this comment.
[🤖 AI review 🤖]
Nit: The italicized guardrail "Breadcrumbs are emitted only after outer-run HANDOFF_OK — never on GATE_FAIL, never from inner workshop reprices." is more specific here than in the other four phase files (which only say "never on GATE_FAIL"). The "never from inner workshop reprices" clause makes sense given Estimate's unique workshop sidebar, but it creates an asymmetry in what looks like boilerplate copy. Consider either: (a) making all five guardrails identical with the workshop clause (it's vacuously true for phases without a workshop), or (b) keeping it as-is with a brief <!-- Estimate-specific --> marker so future editors know the difference is intentional.
| 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] 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`." |
There was a problem hiding this comment.
[🤖 AI review 🤖]
Nit: This single-line breadcrumb change produces a very long line (~280 chars). The other phase files (clarify, design, estimate, generate) keep their breadcrumb as a separate paragraph after the core message. Here it's inlined into the Format: string. Not a functional issue — the agent parses it fine either way — but it's slightly harder for a human editor to visually parse the phase-position info vs. the routing instructions in one dense line. Optional: break it into "Phase 1 of 6 complete (Discover). [summaries] [preview]" + separate sentence for "Remaining: …" to match the visual density of the other phases.
…se 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 awslabs#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 <cursoragent@cursor.com>
|
Rebased onto current Merge conflict ( Nit 1 (guardrail asymmetry): Chose option (a) — all five backbone phases now use the same italic guardrail, including the workshop-reprice clause (vacuous where there is no workshop). Nit 2 (Discover Format line): Split into a short |
3ba8097 to
2221284
Compare
Summary
The problem, in plain English: The first thing a user sees after pointing this plugin at their AI stack is a preview of what their models would map to on AWS Bedrock — and the instructions for building that preview contradict themselves. One paragraph tells the agent to show whether each model gets cheaper or pricier per token; another paragraph in the same step forbids displaying any price comparison at all. Depending on which sentence the agent obeys, users either see the useful preview or see nothing at their very first "is this plugin worth my time?" moment. Separately, the six-phase flow never tells users where they are in it — someone in the middle of a multi-session migration analysis has no idea how many phases remain or what they'll get next.
Changes:
bedrock_targets[]JSON schema fields (source_input_per_1m,cost_direction, etc.) are now consistently required. Also disambiguated the Clarify cross-reference to "AI-only Q3 (spend) / Q7 (usage)".HANDOFF_OKpaths only — explicitly never onGATE_FAIL, never from inner workshop reprices. Workshop/Feedback sidebars excluded (they are not backbone phases; Feedback is labeled as the optional Phase 6).Why
Discovered during a usability review of the question flows and outputs. The Step 2A contradiction is agent-facing: an instruction-following agent cannot satisfy both sentences. The breadcrumbs implement standard progressive-disclosure guidance (visible progress in multi-step flows) at near-zero cost.
Test plan
mise run lint:md— 843 files, 0 errorsmise run shared:check— vendored trees OK (none of the touched files are vendored)mise run lint:frontmatter+mise run test— greenOut of scope