Skip to content

fix(gcp-to-aws): discover-preview display contradiction + phase progress breadcrumbs - #169

Open
herosjourney wants to merge 1 commit into
awslabs:mainfrom
herosjourney:usability/pr0-preview-fix-breadcrumbs
Open

fix(gcp-to-aws): discover-preview display contradiction + phase progress breadcrumbs#169
herosjourney wants to merge 1 commit into
awslabs:mainfrom
herosjourney:usability/pr0-preview-fix-breadcrumbs

Conversation

@herosjourney

Copy link
Copy Markdown
Contributor

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:

  • discover-preview.md (AI-only route, Step 2A): Removed the paragraph forbidding per-token comparison display; replaced with an explicit chat display rule — show mapping + direction only ("gpt-4o → Claude Sonnet 4.6, slightly higher per token"), never monthly dollar totals (usage volume is unknown until Clarify). The 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)".
  • Step 6A chat block: Bedrock targets row now carries the direction word.
  • Breadcrumbs: Each backbone phase completion message now states position, remaining phases, and next artifact ("Phase 3 of 6 complete (Design). Remaining: Estimate → Generate…"). Anchored to HANDOFF_OK paths only — explicitly never on GATE_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 errors
  • mise run shared:check — vendored trees OK (none of the touched files are vendored)
  • mise run lint:frontmatter + mise run test — green
  • Grep confirms no fixture asserts the removed "do not display" behavior
  • Manual: AI-only run shows direction-only preview table; each phase completion shows breadcrumb

Out of scope

  • Workshop offer copy (later PR in this series)
  • Decision outcome vocabulary / trust panel (later PR)
  • No model-selection or Bedrock mapping changes (diff greppable: mapping table untouched)

@herosjourney
herosjourney requested a review from a team as a code owner July 22, 2026 17:33
icarthick added a commit to herosjourney/startups that referenced this pull request Jul 22, 2026
Clean merge to current main (through awslabs#169, which also touched clarify.md — no
overlap). Full build green.

@leon1418 leon1418 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[🤖 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: ⚠️ CONFLICTING — this PR has merge conflicts with 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."

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[🤖 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`."

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[🤖 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>
@herosjourney

Copy link
Copy Markdown
Contributor Author

Rebased onto current main and addressed both review nits.

Merge conflict (estimate.md vs #176): Kept main's benefit-first workshop offer copy and prepended the Phase 4 breadcrumb so both intents land:

Phase 4 of 6 complete (Estimate). Remaining: Generate (+ optional Feedback).
Estimate complete. Before Generate, want to see how the numbers move if you…

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 Format: completion line + a separate Then: remaining/routing sentence to match the visual density of the other phases.

@herosjourney
herosjourney force-pushed the usability/pr0-preview-fix-breadcrumbs branch from 3ba8097 to 2221284 Compare August 13, 2026 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants