AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
The gcp-to-aws skill provides a deterministic, multi-phase process to migrate Google Cloud Platform (GCP) workloads to AWS. It supports infrastructure migration via Terraform analysis and AI workload migration by mapping models to Amazon Bedrock. The skill enforces a strict state machine, requiring discovery, clarification, design, estimation, and generation phases to ensure a reliable migration path. It includes specific logic for handling hybrid stacks, AI provider transitions, and complex infrastructure clustering.
What it does
- Discovers GCP resources from Terraform, application code, or billing data.
- Clarifies migration requirements through a structured questionnaire.
- Designs AWS architecture based on GCP workload types and AI model requirements.
- Estimates costs for the proposed AWS infrastructure and AI services.
- Generates migration artifacts including Terraform configurations and AI provider adapters.
- Provides specialized guidance for migrating AI workloads from Gemini or OpenAI to Amazon Bedrock.
When to use it
- When you need to migrate existing GCP infrastructure to AWS.
- When you are looking to move AI-driven applications from GCP or OpenAI to Amazon Bedrock.
- When you have Terraform files or billing exports and need a structured migration plan.
- When you require a step-by-step, validated approach to re-platforming cloud services.
Advantages
- Enforces a rigorous, fail-closed state machine to prevent skipped steps.
- Provides intelligent mapping of GCP services to AWS equivalents.
- Includes specific logic for AI workload migration and model compatibility.
- Supports multi-signal discovery using IaC, code, and billing data.
- Ensures consistent artifact generation through a structured 6-phase process.
Usage examples
- “Migrate my GKE and Cloud SQL setup to AWS.”
- The agent initiates the discovery phase, analyzing your Terraform files to identify GKE and Cloud SQL resources, then guides you through the clarification and design phases for EKS and RDS.
- “I need to move my LangChain app from OpenAI to Bedrock.”
- The agent identifies the AI workload, selects the best-fit Bedrock model family, and generates the necessary provider adapters and migration documentation.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/cline/gcp-to-aws/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip gcp-to-aws.zip -d .agents/skills
Documentation by Cline
GCP-to-AWS Migration Skill
Philosophy
Re-platform by default: Select AWS services that match GCP workload types (e.g., Cloud Run → Fargate, Cloud SQL → RDS).
Dev sizing unless specified: Default to development-tier capacity (e.g., db.t4g.micro, single AZ). Upgrade only on user direction.
No human one-time migration costs: Do not present human labor, professional services, or people-time work as dollar estimates or "one-time migration cost" budget categories. Vendor charges grounded in data (for example GCP data transfer egress in the infra estimate when billing exists) are allowed.
Multi-signal approach: Design phase adapts based on available inputs — Terraform IaC for infrastructure, billing data for service mapping, and app code for AI workload detection.
BigQuery /
google_bigquery_*: The skill does not recommend a specific AWS analytics or warehouse service. During Clarify, if discovery shows BigQuery (IaCgoogle_bigquery_*and/or billing rows for BigQuery), you must surface the specialist advisory before Design (seereferences/phases/clarify/clarify.md). Design output usesDeferred — specialist engagement; keep directing the user to their AWS account team and/or a data analytics migration partner through Design, Estimate, and docs (seereferences/phases/design/design-infra.mdBigQuery specialist gate).
Definitions
"Load" = Read the file using the Read tool and follow its instructions. Do not summarize or skip sections.
$MIGRATION_DIR= The run-specific directory under.migration/(e.g.,.migration/0226-1430/). Set during Phase 1 (Discover).
Context Loading Rules
Each phase loads reference files on demand. To keep per-turn context manageable and prevent instruction-following degradation:
Budget: Each phase should load no more than ~800 lines of instructions (excluding user artifacts like JSON profiles and MCP tool results).
Conditional loading: Reference files with trigger conditions (e.g.,
agentic_profile.is_agentic == true) MUST NOT be loaded unless the condition is met. Do not speculatively load files.No duplication: Model mapping tables, pricing data, and shared warnings exist in one canonical file. Other files reference them; they do not copy them inline.
Progressive depth: Phase orchestrators (
design.md,generate.md) contain short routing logic that points to detailed sub-files. Load the sub-file only when its path is selected.
Conditional reference files (load ONLY when condition is true):
| File | Condition |
|---|---|
design-refs/ai-gemini-to-bedrock.md | ai-workload-profile.json exists AND summary.ai_source = "gemini" or "both" |
design-refs/ai-openai-to-bedrock.md | ai-workload-profile.json exists AND summary.ai_source = "openai" or "both" |
design-refs/ai-anthropic-to-bedrock.md | ai-workload-profile.json exists AND summary.ai_source = "anthropic" |
design-refs/ai.md | ai-workload-profile.json exists AND summary.ai_source = "other" |
design-refs/design-ref-harness.md | agentic_profile.is_agentic == true AND ai_constraints.agentic.migration_approach == "harness" |
design-refs/design-ref-agentic-to-agentcore.md | agentic_profile.is_agentic == true AND ai_constraints.agentic.migration_approach == "strands" |
shared/retarget-gotchas.md | agentic_profile.is_agentic == true AND ai_constraints.agentic.migration_approach == "retarget" |
When adding new reference files, verify the phase's total loaded instructions remain under budget. If a new file would exceed ~800 lines when combined with other loaded refs, split it or make it conditional.
Hybrid stack budget warning:
When both gcp-resource-inventory.json AND ai-workload-profile.json exist, the combined design refs will approach the ~800-line budget. Output this warning to the user before loading the AI design refs:
"⚠️ This is a large hybrid stack (infrastructure + AI workloads). To ensure complete and accurate recommendations, consider running the migration in two separate passes:
Pass 1 — Infrastructure: Run with only your Terraform files to get infra mapping, Terraform generation, and cost estimates.
Pass 2 — AI workloads: Run with only your application code to get Bedrock model recommendations, provider adapters, and AI migration artifacts.
Continue with the combined run? (Y/N)"
If the user chooses to continue, proceed with the combined run. Load AI refs after infra refs to preserve infra instruction fidelity. If the user declines, stop and instruct them to re-run with a single input source type.
This warning is advisory only — it does not block the run.
Prerequisites
User must provide at least one GCP source:
Terraform IaC:
.tffiles (with optional.tfvars,.tfstate)Application code: Source files with GCP SDK or AI framework imports
Billing data: GCP billing/cost/usage export files (CSV or JSON)
If none of the above are found, stop and ask user to provide at least one source type.
State Machine
This is the execution controller. After completing each phase, consult this table to determine the next action.
| Current State | Condition | Next Action |
|---|---|---|
discover | phases.discover != "completed" | Load references/phases/discover/discover.md |
clarify | phases.discover == "completed" AND phases.clarify != "completed" | Load references/phases/clarify/clarify.md |
design | phases.clarify == "completed" AND phases.design != "completed" | Load references/phases/design/design.md |
estimate | phases.design == "completed" AND phases.estimate != "completed" | Load references/phases/estimate/estimate.md |
generate | phases.estimate == "completed" AND phases.generate != "completed" | Load references/phases/generate/generate.md |
complete | phases.generate == "completed" AND phases.feedback == "pending" | Set phases.feedback to "completed" (user had two chances), then migration complete |
complete | phases.generate == "completed" AND phases.feedback == "completed" | Migration planning complete |
How to determine current state (deterministic):
Read
$MIGRATION_DIR/.phase-status.jsonIf
current_phaseexists, use it (must match one of: discover, clarify, design, estimate, generate, complete)Otherwise use ordered phase evaluation:
discover→clarify→design→estimate→generatePick the first phase in that order where
phases.<phase> != "completed"; if none, state iscomplete
Phase gate checks: If prior phase incomplete, do not advance (e.g., cannot enter estimate without completed design).
Clarify is mandatory: Do not load references/phases/design/design.md, references/phases/estimate/estimate.md, or references/phases/generate/generate.md unless $MIGRATION_DIR/.phase-status.json exists and phases.clarify is exactly "completed". A preferences.json file alone is not sufficient proof that Clarify ran. If the user asks to skip Clarify or jump straight to Design, cost estimate, or artifact generation, refuse briefly, then load references/phases/clarify/clarify.md and run Phase 2. There is no exception for "quick" or "obvious" migrations.
Feedback checkpoints: Feedback is not a sequential phase — it is offered at two interleaved checkpoints (after Discover and after Estimate). See the Feedback Checkpoints section below for details.
Handoff Gate Orchestration (Fail Closed)
Load references/shared/handoff-gates.md when executing any phase completion step.
Single
$MIGRATION_DIR: Use one run directory for the entire migration. Do not mix artifacts across.migration/*/sessions.Re-read from disk: Before each phase (and before each handoff gate), Read required artifacts from
$MIGRATION_DIR/. Do not rely on chat memory.Advance only on
HANDOFF_OK: A phase is complete only when its orchestrator emitsHANDOFF_OK | phase=<name> | artifacts=.... Do not load the next phase without it.On
GATE_FAIL: Output the failure line(s) to the user in plain language. Do NOT modify artifacts to pass the gate. Do NOT continue to the next phase. Tell the user which phase to re-run.Re-entry: Re-running an earlier phase after downstream phases completed requires explicit user confirmation; downstream phases must be reset to
"pending". Seehandoff-gates.mdre-entry table.
Generate phase additionally loads references/shared/validate-artifacts.md before writing migration-report.html.
State Validation
When reading $MIGRATION_DIR/.phase-status.json, validate before proceeding:
Multiple sessions: If multiple directories exist under
.migration/, list them with their phase status and ask: [A] Resume latest, [B] Start fresh, [C] Cancel.Invalid JSON: If
.phase-status.jsonfails to parse, STOP. Output: "State file corrupted (invalid JSON). Delete the file and restart the current phase."Unrecognized phase: If
phasesobject contains a phase not in {discover, clarify, design, estimate, generate, feedback}, STOP. Output: "Unrecognized phase: [value]. Valid phases: discover, clarify, design, estimate, generate, feedback."Unrecognized status: If any
phases.*value is not in {pending, in_progress, completed}, STOP. Output: "Unrecognized status: [value]. Valid values: pending, in_progress, completed."Invalid
current_phase(if present): Ifcurrent_phaseis not in {discover, clarify, design, estimate, generate, complete}, STOP. Output: "Unrecognized current_phase: [value]. Valid values: discover, clarify, design, estimate, generate, complete."Out-of-order completion: For ordered phases [discover, clarify, design, estimate, generate], if any later phase is
"completed"while an earlier phase is not"completed", STOP. Output: "Inconsistent phase ordering detected. Reconcile.phase-status.jsonbefore resuming."Multiple active phases: Across core phases {discover, clarify, design, estimate, generate}, at most one phase may be
"in_progress". If >1, STOP. Output: "Multiple phases are in_progress. Keep only one active phase before resuming."
State Management
Migration state lives in $MIGRATION_DIR (.migration/[MMDD-HHMM]/), created by Phase 1 and persisted across invocations.
.phase-status.json schema:
{
"migration_id": "0226-1430",
"last_updated": "2026-02-26T15:35:22Z",
"current_phase": "design",
"phases": {
"discover": "completed",
"clarify": "completed",
"design": "in_progress",
"estimate": "pending",
"generate": "pending",
"feedback": "pending"
}
}Status values: "pending" → "in_progress" → "completed". Never goes backward.
For core phases (discover, clarify, design, estimate, generate), at most one phase may be "in_progress" at any time.
current_phase is optional but recommended; when present it is authoritative.
The .migration/ directory is automatically protected by a .gitignore file created in Phase 1.
Phase Status Update Protocol
Use read-merge-write updates for .phase-status.json:
Read the current file before every update.
Change only the phase keys being advanced and
last_updated.Keep prior completed phases unchanged.
Set
current_phaseto the next deterministic phase (orcompleteafter generate).Write the full file in the same turn as your final phase work message.
Example — after completing the Clarify phase, write $MIGRATION_DIR/.phase-status.json with:
{
"migration_id": "MMDD-HHMM",
"last_updated": "2026-02-26T15:35:22Z",
"current_phase": "design",
"phases": {
"discover": "completed",
"clarify": "completed",
"design": "pending",
"estimate": "pending",
"generate": "pending",
"feedback": "pending"
}
}Replace MMDD-HHMM with the actual migration ID, generate the last_updated ISO 8601 UTC timestamp yourself, and set each phase to its correct status at that point.
Phase Summary Table
| Phase | Inputs | Outputs | Reference |
|---|---|---|---|
| Discover | .tf files, app source code, and/or billing exports (at least one required) | gcp-resource-inventory.json, gcp-resource-clusters.json, ai-workload-profile.json, billing-profile.json, .phase-status.json updated (outputs vary by input) | references/phases/discover/discover.md |
| Clarify | Discovery artifacts (gcp-resource-inventory.json, gcp-resource-clusters.json, ai-workload-profile.json, billing-profile.json — whichever exist) | preferences.json, .phase-status.json updated | references/phases/clarify/clarify.md |
| Design | preferences.json + discovery artifacts | aws-design.json (infra), aws-design-ai.json (AI), aws-design-billing.json (billing-only) | references/phases/design/design.md |
| Estimate | aws-design.json or aws-design-billing.json or aws-design-ai.json, preferences.json | estimation-infra.json or estimation-ai.json or estimation-billing.json, .phase-status.json updated | references/phases/estimate/estimate.md |
| Generate | estimation-infra.json or estimation-ai.json or estimation-billing.json, aws-design.json or aws-design-billing.json or aws-design-ai.json, preferences.json | generation-infra.json or generation-ai.json or generation-billing.json + terraform/, scripts/, ai-migration/, validation-report.json (when infra route active), MIGRATION_GUIDE.md, README.md, .phase-status.json updated | references/phases/generate/generate.md |
| Feedback | .phase-status.json (discover completed minimum), all existing migration artifacts | feedback.json, trace.json, .phase-status.json updated | references/phases/feedback/feedback.md |
MCP Servers
awspricing (for cost estimation):
Provides
get_pricing,get_pricing_service_codes,get_pricing_service_attributestoolsOnly needed during Estimate phase. Discover and Design do not require it.
Primary pricing source:
references/shared/pricing-cache.md(cached 2026 rates, ±5-10% for infrastructure, ±15-25% for AI models). MCP is secondary — used only for services not found in the cache.
Files in This Skill
gcp-to-aws/
├── SKILL.md ← You are here (orchestrator + state machine)
│
├── references/
│ ├── phases/
│ │ ├── discover/
│ │ │ ├── discover.md # Phase 1: Discover orchestrator
│ │ │ ├── discover-iac.md # Terraform/IaC discovery
│ │ │ ├── discover-app-code.md # App code discovery
│ │ │ └── discover-billing.md # Billing data discovery
│ │ ├── clarify/
│ │ │ ├── clarify.md # Phase 2: Clarify orchestrator
│ │ │ ├── clarify-global.md # Category A: Global/Strategic (Q1-Q7)
│ │ │ ├── clarify-compute.md # Categories B+C: Config Gaps + Compute (Q8-Q11)
│ │ │ ├── clarify-database.md # Category D: Database (Q12–Q13b)
│ │ │ ├── clarify-ai.md # Category F: AI/Bedrock (Q14-Q22)
│ │ │ └── clarify-ai-only.md # Standalone AI-only migration flow
│ │ ├── design/
│ │ │ ├── design.md # Phase 3: Design orchestrator
│ │ │ ├── design-infra.md # Infrastructure design (IaC-based)
│ │ │ ├── design-ai.md # AI workload design (Bedrock)
│ │ │ └── design-billing.md # Billing-only design (fallback)
│ │ ├── estimate/
│ │ │ ├── estimate.md # Phase 4: Estimate orchestrator
│ │ │ ├── estimate-infra.md # Infrastructure cost analysis
│ │ │ ├── estimate-ai.md # AI workload cost analysis
│ │ │ └── estimate-billing.md # Billing-only cost analysis
│ │ ├── generate/
│ │ │ ├── generate.md # Phase 5: Generate orchestrator
│ │ │ ├── generate-infra.md # Infrastructure migration plan
│ │ │ ├── generate-ai.md # AI migration plan
│ │ │ ├── generate-billing.md # Billing-only migration plan
│ │ │ ├── generate-artifacts-infra.md # Terraform configurations
│ │ │ ├── generate-artifacts-scripts.md # Migration scripts
│ │ │ ├── generate-artifacts-ai.md # Provider adapter + test harness
│ │ │ ├── generate-artifacts-billing.md # Skeleton Terraform
│ │ │ └── generate-artifacts-docs.md # MIGRATION_GUIDE.md + README.md
│ │ └── feedback/
│ │ ├── feedback.md # Phase 6: Feedback orchestrator
│ │ └── feedback-trace.md # Anonymized trace builder
│ │
│ ├── design-refs/
│ │ ├── index.md # Lookup table: GCP type → design-ref file
│ │ ├── fast-path.md # Deterministic 1:1 mappings (Pass 1)
│ │ ├── compute.md # Compute mappings (Cloud Run, GCE, GKE, etc.)
│ │ ├── database.md # Database mappings (Cloud SQL, Spanner, etc.)
│ │ ├── storage.md # Storage mappings (GCS, Filestore, etc.)
│ │ ├── networking.md # Networking mappings (VPC, LB, DNS, etc.)
│ │ ├── messaging.md # Messaging mappings (Pub/Sub, etc.)
│ │ └── ai.md # AI mappings (Vertex AI → Bedrock)
│ │
│ ├── clustering/terraform/
│ │ ├── classification-rules.md # Primary/secondary classification
│ │ ├── clustering-algorithm.md # Cluster formation rules
│ │ ├── depth-calculation.md # Topological depth calculation
│ │ └── typed-edges-strategy.md # Edge type assignment
│ │
│ └── shared/
│ ├── schema-phase-status.md # .phase-status.json schema (canonical reference)
│ ├── schema-discover-iac.md # gcp-resource-inventory + clusters schemas (loaded by discover-iac.md)
│ ├── schema-discover-ai.md # ai-workload-profile schema (loaded by discover-app-code.md and discover-iac.md Step 7d)
│ ├── schema-discover-billing.md # billing-profile schema (loaded by discover-billing.md)
│ ├── schema-estimate-infra.md # estimation-infra.json schema (loaded by estimate-infra.md at write time)
│ ├── handoff-gates.md # Fail-closed phase handoff protocol (GATE_FAIL / HANDOFF_OK)
│ ├── validate-artifacts.md # Pre-report validation (Generate Step 0; read-only)
│ ├── migration-complexity.md # Complexity tier definitions (small/medium/large) for timeline scaling
│ ├── pricing-cache.md # Cached AWS + source provider pricing (±5-25%, primary source)
│ └── bedrock-quotas.md # Bedrock TPM/RPM quota awareness, burndown rates, capacity planning| Condition | Action |
|---|---|
No GCP sources found (no .tf, no app code, no billing data) | Stop. Output: "No GCP sources detected. Provide at least one source type (Terraform files, application code, or billing exports) and try again." |
.phase-status.json missing phase gate | Stop. Output: "Cannot enter Phase X: Phase Y-1 not completed. Start from Phase Y or resume Phase Y-1." |
| awspricing unavailable after 3 attempts | Display user warning about ±5-25% accuracy. Use pricing-cache.md. Add pricing_source: "cached_fallback" to the applicable estimation-*.json file. |
| User skips questions or says "use defaults for the rest" | Apply documented defaults for remaining questions in the current batch and all subsequent batches. Phase 2 completes either way. |
aws-design.json missing required clusters | Stop Phase 4. Output: "Re-run Phase 3 to generate missing cluster designs." |
Defaults
IaC output: Terraform configurations, migration scripts, AI migration code, and documentation
Region:
us-east-1(unless user specifies, or GCP region → AWS region mapping suggests otherwise)Sizing: Development tier (e.g.,
db.t4g.microfor databases, 0.5 CPU for Fargate)Migration mode: Adapts based on available inputs (infrastructure, AI, or billing-only)
Cost currency: USD
Timeline assumption: 2-16 weeks depending on migration complexity — small (2-6 weeks), medium (6-12 weeks), large (12-18 weeks). See
references/shared/migration-complexity.mdfor tier definitions.
Workflow Execution
When invoked, the agent MUST follow this exact sequence:
Load phase status: Read
.phase-status.jsonfrom.migration/*/.If missing: Initialize for Phase 1 (Discover)
If exists: Determine current phase using deterministic rules in State Machine
Determine phase to execute:
If
current_phaseexists: execute that phase.Otherwise execute the first non-completed phase in ordered list: discover → clarify → design → estimate → generate.
If all ordered phases are completed: migration is complete (with feedback finalization rule).
Read phase reference: Load the full reference file for the target phase.
Execute ALL steps in order: Follow every numbered step in the reference file. Do not skip, optimize, or deviate.
Validate outputs: Confirm all required output files exist with correct schema before proceeding. Phase orchestrators run Completion Handoff Gate checks per
shared/handoff-gates.md.Handoff gate: Emit
HANDOFF_OKorGATE_FAILpershared/handoff-gates.md. OnGATE_FAIL, stop — do not update phase status or load the next phase.Update phase status: Only after
HANDOFF_OK. Use the Phase Status Update Protocol (read-merge-write) in the same turn as the phase's final output message.Feedback checkpoint: After a phase completes, check if feedback is due (see rules below). This runs before advancing to the next phase.
After Discover (if
phases.feedbackis"pending"): Output to user: "Would you like to share quick feedback (5 optional questions + anonymized usage data) to help improve this tool? Your data never includes resource names, file paths, or account IDs. [A] Send feedback now [B] Wait until after the Estimate phase"If user picks A → Load
references/phases/feedback/feedback.md, execute it, then continue to Clarify.If user picks B → Continue to Clarify (feedback stays
"pending").
After Estimate (if
phases.feedbackis"pending"): Output to user: "Would you like to share quick feedback now? (5 optional questions + anonymized usage data) [A] Yes, share feedback [B] No thanks, continue to Generate"If user picks A → Load
references/phases/feedback/feedback.md, execute it, then continue to Generate.If user picks B → Use the Phase Status Update Protocol to set
phases.feedbackto"completed". Continue to Generate.
After Generate: No feedback offer. If
phases.feedbackis still"pending", use the Phase Status Update Protocol to set it to"completed"(user had two chances and chose to defer/skip).
Display summary: Show user what was accomplished, highlight next phase, or confirm migration completion.
Critical constraint: Agent must strictly adhere to the reference file's workflow. If unable to complete a step, stop and report the exact step that failed.
User can invoke the skill again to resume from current_phase (or deterministic ordered evaluation when current_phase is absent).
Scope Notes
v1.0 includes:
Terraform infrastructure discovery
App code scanning (AI workload detection)
Billing data import from GCP
User requirement clarification (adaptive questions by category)
Multi-path Design (infrastructure, AI workloads, billing-only fallback)
AWS cost estimation (from pricing API or fallback)
Migration artifact generation (Terraform, scripts, AI adapters, documentation)
Optional feedback collection with anonymized telemetry
Files
- ATTRIBUTION.mdAdded by AutoGineer826 B
- LICENSELicence file added by AutoGineer10.5 KiB
- SKILL.md29.6 KiB
- data/sdk-capability-map.json1.1 KiB
- references/clustering/terraform/classification-rules.md6.5 KiB
- references/clustering/terraform/clustering-algorithm.md7.9 KiB
- references/clustering/terraform/depth-calculation.md4.5 KiB
- references/clustering/terraform/typed-edges-strategy.md4.6 KiB
- references/design-refs/ai-anthropic-to-bedrock.md2.9 KiB
- references/design-refs/ai-gemini-to-bedrock.md15.4 KiB
- references/design-refs/ai-openai-to-bedrock.md17.5 KiB
- references/design-refs/ai.md3.4 KiB
- references/design-refs/compute.md6.8 KiB
- references/design-refs/database.md9.1 KiB
- references/design-refs/design-ref-agentic-to-agentcore.md18.8 KiB
- references/design-refs/design-ref-harness.md7.9 KiB
- references/design-refs/fast-path.md10.3 KiB
- references/design-refs/index.md6.2 KiB
- references/design-refs/messaging.md3.5 KiB
- references/design-refs/networking.md5.5 KiB
- references/design-refs/security.md3.8 KiB
- references/design-refs/storage.md4.7 KiB
- references/phases/clarify/clarify-ai-only.md16.4 KiB
- references/phases/clarify/clarify-ai.md57.7 KiB
- references/phases/clarify/clarify-compute.md10.0 KiB
- references/phases/clarify/clarify-database.md10.8 KiB
- references/phases/clarify/clarify-global.md23.7 KiB
- references/phases/clarify/clarify.md50.5 KiB
- references/phases/design/design-ai.md29.6 KiB
- references/phases/design/design-billing.md12.7 KiB
- references/phases/design/design-infra.md12.8 KiB
- references/phases/design/design.md4.5 KiB
- references/phases/discover/discover-app-code.md41.7 KiB
- references/phases/discover/discover-billing.md7.2 KiB
- references/phases/discover/discover-iac.md33.0 KiB
- references/phases/discover/discover-preview.md19.9 KiB
- references/phases/discover/discover.md11.5 KiB
- references/phases/estimate/estimate-ai.md17.2 KiB
- references/phases/estimate/estimate-billing.md12.4 KiB
- references/phases/estimate/estimate-infra.md46.6 KiB
- references/phases/estimate/estimate.md8.1 KiB
- references/phases/feedback/feedback-trace.md4.5 KiB
- references/phases/feedback/feedback.md3.2 KiB
- references/phases/generate/generate-ai.md13.5 KiB
- references/phases/generate/generate-artifacts-ai.md33.6 KiB
- references/phases/generate/generate-artifacts-billing.md6.1 KiB
- references/phases/generate/generate-artifacts-docs.md21.0 KiB
- references/phases/generate/generate-artifacts-infra.md43.2 KiB
- references/phases/generate/generate-artifacts-report.md40.1 KiB
- references/phases/generate/generate-artifacts-scripts.md14.5 KiB
- references/phases/generate/generate-billing.md16.5 KiB
- references/phases/generate/generate-infra.md22.0 KiB
- references/phases/generate/generate.md7.9 KiB
- references/shared/ai-migration-guardrails.md6.6 KiB
- references/shared/ai-model-lifecycle.md8.8 KiB
- references/shared/bedrock-quotas.md7.1 KiB
- references/shared/handoff-gates.md4.7 KiB
- references/shared/migration-complexity.md11.0 KiB
- references/shared/pricing-cache.md41.2 KiB
- references/shared/pricing-fallback.md1.5 KiB
- references/shared/retarget-gotchas.md10.9 KiB
- references/shared/schema-discover-ai.md16.7 KiB
- references/shared/schema-discover-billing.md5.0 KiB
- references/shared/schema-discover-iac.md6.9 KiB
- references/shared/schema-estimate-infra.md15.6 KiB
- references/shared/schema-phase-status.md1.2 KiB
- references/shared/terraform-validation.md10.4 KiB
- references/shared/validate-artifacts.md6.2 KiB
references/phases/clarify/clarify.md
Phase 2: Clarify Requirements
Phase 2 of 6 — Ask adaptive questions before design begins, then interpret answers into ready-to-apply design constraints.
HARD GATE — Clarify before Design: Do not load
references/phases/design/design.md(or any later phase) until this phase finishes and$MIGRATION_DIR/.phase-status.jsonrecordsphases.clarifyas"completed". Writingpreferences.jsonwithout updating phase status is a protocol violation. If the user asks to skip questions, use documented defaults and still complete this phase (including phase status).
The output — preferences.json — is consumed directly by Design and Estimate without any further interpretation.
Questions are organized into six named categories (A–F) with documented firing rules. Up to 22 questions across categories, depending on which discovery artifacts exist and which GCP services are detected. Questions are presented in progressive batches (up to 3 batches) with intermediate saves between each — partial answers persist across sessions. A standalone AI-Only flow exists for migrations that only move AI/LLM calls to Bedrock.
Category Reference Files
| File | Category | Questions | Loaded When |
|---|---|---|---|
clarify-global.md | A — Global/Strategic | Q1–Q7 | Always |
clarify-compute.md | B — Config Gaps, C — Compute | Q8–Q11 | Compute or billing-source resources present |
clarify-database.md | D — Database | Q12–Q13b | Database resources present |
clarify-ai.md | F — AI/Bedrock | Q14–Q26 | ai-workload-profile.json exists |
clarify-ai-only.md | (standalone) | Q1–Q10 | AI-only migration (no infrastructure artifacts) |
Step 0: Prior Run Check
Check $MIGRATION_DIR/ for existing state:
Case 1 — Completed preferences exist (preferences.json present):
"I found existing migration preferences from a previous run. Would you like to:"
A) Re-use these preferences and skip questions B) Start fresh and re-answer all questions
If A: Run Step 2 item 6 only (BigQuery detection) on current discovery artifacts. If
bigquery_presentis true, output the Step 4 BigQuery / deferred analytics advisory block once (even though questions are skipped), then skip to Validation Checklist with the existingpreferences.json.If B: delete
preferences.json, continue to Step 1.
Case 2 — Draft preferences exist (preferences-draft.json present, no preferences.json):
"I found a partial set of answers from a previous session ([N] of [total] batches completed). Would you like to:"
A) Resume from where you left off — I'll pick up the remaining questions B) Start fresh and re-answer all questions
If A: load the draft, read
metadata.batches_completedto determine which batches are done, skip completed batches when entering Step 4.If B: delete
preferences-draft.json, continue to Step 1.
Case 3 — No prior state: Continue to Step 1.
Step 1: Read Inventory and Determine Migration Type
Read $MIGRATION_DIR/ and check which discovery outputs exist:
gcp-resource-inventory.json+gcp-resource-clusters.json— infrastructure discoveredai-workload-profile.json— AI workloads detectedbilling-profile.json— billing data parsed
At least one discovery artifact must exist to proceed.
Migration Type Detection
Full migration:
gcp-resource-inventory.jsonorbilling-profile.jsonexists (may also haveai-workload-profile.json)AI-only migration: ONLY
ai-workload-profile.jsonexists (no infrastructure or billing artifacts)
If AI-only: Read clarify-ai-only.md NOW and follow that flow. Skip all remaining steps below.
HARD GATE — AI-Only Path: You MUST read
clarify-ai-only.mdbefore presenting any questions. The question text, answer options, and interpretation rules are ONLY in that file — they are NOT in this file. Do NOT fabricate questions from the summaries above.
Discovery Summary
Present a discovery summary:
If gcp-resource-inventory.json exists:
Infrastructure discovered: [total resources] GCP resources across [cluster count] clusters Top resource types: [list top 3–5 types]
If ai-workload-profile.json exists:
AI workloads detected: [from
models[].model_id] Capabilities in use: [fromintegration.capabilities_summarywhere true] Integration pattern: [fromintegration.pattern] via [fromintegration.primary_sdk]
If billing-profile.json exists:
Monthly GCP spend: $[total_monthly_spend] Top services by cost: [top 3–5 from billing data]
Step 1.5: Fast-Path Gate (Simple Stacks)
After presenting the Discovery Summary, check $MIGRATION_DIR/migration-preview.json for fast-path eligibility:
IF migration-preview.json exists
AND eligible_for_clarify_fast_path == true
THEN offer infra fast-path (3 questions)
ELSE IF eligible_for_clarify_simple_path == true
THEN offer simple hybrid path (~6 questions)
ELSE skip to Step 2 (full Clarify)Infra fast-path (no AI)
If eligible_for_clarify_fast_path, present this offer before any questions:
"Your stack looks straightforward — [primary_resource_count] resource(s), no database, no AI detected.
Want to use smart defaults and answer just 3 questions instead of up to 22?
[Yes — 3 questions] / [No — ask me everything]"
If user chooses Yes:
Ask only: Q1 (region), Q2 (compliance), Q7 (maintenance window) — from
clarify-global.md.Apply documented defaults for ALL other questions. Record each in
metadata.questions_defaulted.Still run the BigQuery advisory if
bigquery_presentis true.Write
preferences.jsonwithmetadata.clarify_mode: "fast_path". Skip Steps 2–4.
Simple hybrid path (simple infra + lightweight AI)
If eligible_for_clarify_simple_path, present:
"Your stack looks straightforward with lightweight AI ([model IDs from profile]) — no agentic framework detected.
Want a short question set (~6 questions) instead of the full flow? I'll use discovery for region, database sizing, and model detection.
[Yes — short path] / [No — ask me everything]"
If user chooses Yes:
Run Step 2 extraction (mandatory — do not skip).
Run Step 2.5 Detected Settings Confirmation (mandatory — wait for user response).
Ask only questions not resolved by extraction (after any user corrections):
Q2 (compliance) — always ask
Q7 (maintenance window) — always ask
Q16 (AI priority) — from
clarify-ai.mdQ21 (AI latency) — from
clarify-ai.mdQ3 (GCP spend) — only if billing did not extract it
Q1 (region) — only if region extraction ambiguous (multiple GCP regions)
Apply documented defaults for all other unanswered questions. Record in
metadata.questions_defaulted.Write
preferences.jsonwithmetadata.clarify_mode: "simple_hybrid". Skip Step 4 batch loop — go to Category E opt-in (if applicable) then Step 5.
Agentic hard block: If agentic_profile.is_agentic == true, never offer infra fast-path or simple hybrid path. Agentic workloads require Q23–Q26.
If user chooses No, or neither path is eligible: Continue to Step 2 (full Clarify).
Step 2: Extract Known Information
Before generating questions, scan the inventory to extract values that are already known:
GCP regions — Extract all GCP regions from the inventory. Map to the closest AWS region as a suggested default for Q1.
Resource types present — Build a set of resource types: compute (Cloud Run, Cloud Functions, GKE, GCE), database (Cloud SQL, Spanner, Memorystore), storage (Cloud Storage), messaging (Pub/Sub).
Billing SKUs — If
billing-profile.jsonexists, check if any SKU reveals storage class, HA configuration, or other answerable questions.Billing-only mode — If
billing-profile.jsonexists andgcp-resource-inventory.jsondoes NOT exist, checkbilling-profile.json → services[]for Category B question matching.AI framework detection — If
ai-workload-profile.jsonexists, checkintegration.gateway_typeandintegration.frameworksfor auto-detection of Q14 answer.BigQuery / analytics warehouse — Set
bigquery_presentto true if any of: (a) a resource ingcp-resource-inventory.jsonhasgcp_type(or equivalent type field) starting withgoogle_bigquery_; (b)billing-profile.jsonlists a service/SKU that clearly indicates BigQuery (e.g., service name or SKU containsBigQuery). Otherwisebigquery_presentis false.Database size auto-detect (Q13b) — For each
google_sql_database_instance, readconfig.disk_size,config.disk_size_gb, orgcp_config.disk_size_gb. Map to Q13b band and skip Q13b when unambiguous:
| Disk size (GB) | db_size value | Skip Q13b? |
|---|---|---|
| < 10 | "<10GB" | Yes — chosen_by: "extracted" |
| 10 – 99 | "10-100GB" | Yes — chosen_by: "extracted" |
| 100 – 499 | "100-500GB" | Yes — chosen_by: "extracted" |
| ≥ 500 | ">500GB" | Yes — chosen_by: "extracted" |
If multiple instances disagree, ask Q13b. Record in metadata.inventory_clarifications.db_size_gb when extracted.
Q6 from Cloud SQL HA — For each
google_sql_database_instance, readavailability_type(orconfig.availability_type):
| GCP value | availability extracted |
|---|---|
ZONAL | "single-az" |
REGIONAL | "multi-az" |
Skip Q6 only when all Cloud SQL PostgreSQL/MySQL instances agree on the same mapped value. multi-az-ha and multi-region are never auto-extracted — those require Q6 user answers (Mission-Critical / Catastrophic). Cloud SQL REGIONAL maps to multi-az (RDS Multi-AZ), not multi-az-ha (Aurora). Record in metadata.inventory_clarifications.cloud_sql_ha. When availability_type is missing on any instance, or instances disagree, ask Q6.
Q12/Q13 dev-tier defaults — When all Cloud SQL instances match dev pattern (
db-f1-micro,db-g1-small, ortiercontainsmicro/smallwithavailability_type: ZONAL), extract and skip Q12 and Q13. When instances mix dev and prod tiers, do not extract — ask Q12 and Q13.
database_traffic: "steady" — chosen_by: "extracted"
db_io_workload: "low" — chosen_by: "extracted"Q3 GCP spend from billing — If
billing-profile.jsonexists, mapsummary.total_monthly_spendto spend band and skip Q3 when unambiguous:
| Monthly USD | gcp_monthly_spend |
|---|---|
| < 1,000 | "<$1K" |
| 1,000–4,999 | "$1K-$5K" |
| 5,000–19,999 | "$5K-$20K" |
| 20,000–99,999 | "$20K-$100K" |
| ≥ 100,000 | ">$100K" |
Q1 region extraction — When inventory has a single GCP region among PRIMARY compute/database resources, map to closest AWS region and skip Q1 with
target_regionchosen_by: "extracted". When multiple regions, suggest default but still ask Q1.Q19 primary model — If
ai-workload-profile.jsonexists andmodels[0].model_idis set with confidence ≥ 0.8, map to Q19 answer and skip Q19. Setai_model_baselinewithchosen_by: "extracted".Q20 input modalities — If
integration.capabilities_summaryexists:
| Signal | Extract | Skip Q20? |
|---|---|---|
vision: true | ai_vision: "vision-required" | Yes |
image_generation: true (no vision) | note in ai_capabilities_required; Q20 may still ask unless text-only path clear | Partial — skip if only text + image gen via separate API |
| all false / text only | ai_vision: "text-only" | Yes |
When image_generation: true and vision: false, set ai_capabilities_required derived from profile and skip Q20 (image output is not vision input).
Q9 WebSocket scan — Only when application code was actually analyzed. Treat code as analyzed when any of: (a)
discover-app-code.mdran and found source files; (b)ai-workload-profile.json→metadata.sources_analyzed.application_code == true; (c) a companion app directory was scanned. Scan for WebSocket usage:websocket,WebSocket,socket.io,@nestjs/websockets, FastAPI WebSocket,wspackage imports. If code was analyzed and no matches, extractwebsocket: falseand skip Q9. If matches found, ask Q9 to confirm. If no application code was available (Terraform-only workspace, no code discovery), do NOT extract Q9 — leave Q9 in the question flow. Absence of a code scan is not evidence of no WebSockets.Q10 Cloud Run traffic — If Cloud Run
min_instance_count/min_instances> 0 in Terraform config, extractcloud_run_traffic_pattern: "constant-24-7"and skip Q10. Otherwise ask Q10.Multi-instance Cloud SQL conflicts — When multiple
google_sql_database_instanceresources disagree on values used for Q6, Q12/Q13, or Q13b (e.g. one ZONAL and one REGIONAL; mixed dev/prod tiers; different disk sizes):Do not extract a single global value or skip the affected question(s)
Record per-instance values in
metadata.inventory_clarifications.cloud_sql_instances[](address,availability_type,tier,disk_size_gb)In Step 2.5, show a per-instance breakdown (see below) instead of a single summary row
Ask the affected question(s), or let the user pick a global posture during Step 2.5 confirmation
Record all extracted values in metadata.inventory_clarifications where applicable. Questions fully resolved by extraction are skipped (not asked) with chosen_by: "extracted" and listed in metadata.questions_skipped_extracted.
After Step 2 completes, proceed to Step 2.5 before Step 3 or any questions.
Step 2.5: Confirm Detected Settings (Mandatory Gate)
When to run: After Step 2 whenever any setting was extracted (i.e., questions_skipped_extracted would be non-empty, or any constraint was populated with chosen_by: "extracted" in working memory).
Skip Step 2.5 only when Step 2 produced zero extractions — nothing inferred from IaC, billing, or code. Proceed directly to Step 3.
HARD GATE — do NOT present question batches or ask individual questions until the user responds to this summary.
Present a structured table (omit rows for settings not extracted):
### What we detected from your Terraform, billing, and code
| Setting | Detected value | Source | Question skipped |
| ------- | -------------- | ------ | ---------------- |
| Region | us-west-2 (GCP us-west1) | gcp-resource-inventory.json | Q1 |
| GCP monthly spend | $1K–$5K (~$2,400/mo) | billing-profile.json | Q3 |
| Database availability | Single-AZ (Cloud SQL `ZONAL`) | Terraform `availability_type` | Q6 |
| Database size | 10–100 GB (allocated disk: 10 GB) | Terraform `disk_size` | Q13b |
| DB traffic / I/O | Steady / Low (dev-tier `db-f1-micro`) | Terraform tier + ZONAL | Q12, Q13 |
| Cloud Run traffic | Constant 24/7 (`min_instances > 0`) | Terraform | Q10 |
| WebSockets | None detected (code scanned) | application code scan | Q9 |
| AI framework | Direct SDK (no gateway) | ai-workload-profile.json | Q14 |
| AI model | gemini-2.5-flash | ai-workload-profile.json | Q19 |
| Input modalities | Text only | ai-workload-profile.json | Q20 |
Does this look correct?
- Reply **"looks good"** or **"correct"** to proceed — I'll only ask about what we couldn't infer.
- To fix something, name the setting and the correct value, e.g. **"availability: mission-critical"**, **"db size: 100-500GB"**, **"region: eu-central-1"**, **"model: gpt-4o"**. I'll update that setting; if the correction is ambiguous I'll ask the full question for that item.
- Reply **"ask me everything"** to discard all extractions and run the full question flow (clear `questions_skipped_extracted`; set all previously extracted constraints to pending).Multi-instance Cloud SQL conflicts: When instances disagree, replace the single-row summary with a per-instance table and do not skip the conflicting question until resolved:
| Instance | availability_type | tier | disk_size (GB) |
| -------- | ----------------- | ---- | -------------- |
| google_sql_database_instance.main | ZONAL | db-f1-micro | 10 |
| google_sql_database_instance.analytics | REGIONAL | db-n1-standard-4 | 100 |
These instances disagree on availability. Which posture should we use for the migration design?
A) Most conservative (highest HA) | B) Use [instance name] as primary | C) Ask me the full Q6 questionOverride handling — when the user corrects a detected value:
| User correction (examples) | Update constraint | Re-ask? |
|---|---|---|
availability: mission-critical / multi-az-ha | availability: "multi-az-ha", chosen_by: "user" | No — value is explicit |
availability: significant / multi-az | availability: "multi-az", chosen_by: "user" | No |
availability: dev / single-az | availability: "single-az", chosen_by: "user" | No |
db size: <10GB / 10-100GB / etc. | Set db_size to stated band, chosen_by: "user" | No if band is explicit |
region: [AWS region] | Set target_region, chosen_by: "user" | No |
model: [model name] | Set ai_model_baseline, chosen_by: "user" | No if maps cleanly to Q19 |
websockets: yes | Set websocket: "required", chosen_by: "user" | No |
spend: $5K-$20K | Set gcp_monthly_spend, chosen_by: "user" | No if band is explicit |
| Vague correction ("that's wrong") | Remove that item from skipped list | Yes — ask full question |
For each override: remove the associated question ID(s) from metadata.questions_skipped_extracted, set chosen_by: "user", and record in metadata.detected_settings with "confirmed": false and "corrected_by_user": true.
When user confirms: mark all rows "confirmed": true in metadata.detected_settings.
metadata.detected_settings schema (write to preferences.json at Step 5):
"detected_settings": [
{
"key": "availability",
"value": "single-az",
"source": "terraform:availability_type=ZONAL",
"questions_skipped": ["Q6"],
"confirmed": true,
"corrected_by_user": false
}
]Step 3: Generate Questions by Category
Category Definitions and Firing Rules
| Category | Name | Firing Rule | Reference File | Questions |
|---|---|---|---|---|
| A | Global/Strategic | Always fires | clarify-global.md | Q1 (location), Q2 (compliance), Q3 (GCP spend), Q4 (funding stage), Q5 (multi-cloud), Q6 (uptime), Q7 (maintenance) |
| B | Configuration Gaps | billing-profile.json exists AND gcp-resource-inventory.json does NOT exist | clarify-compute.md | Cloud SQL HA, Cloud Run count, Memorystore memory, Functions gen |
| C | Compute Model | Compute resources present (Cloud Run, Cloud Functions, GKE, GCE) | clarify-compute.md | Q8 (K8s sentiment), Q9 (WebSocket), Q10 (Cloud Run traffic), Q11 (Cloud Run spend) |
| D | Database Model | Database resources present (Cloud SQL, Spanner, Memorystore) | clarify-database.md | Q12 (DB traffic pattern), Q13 (DB I/O), Q13b (DB size) |
| E | Migration Posture | Disabled by default — requires explicit user opt-in | (inline below) | HA upgrades, right-sizing |
| F | AI/Bedrock | ai-workload-profile.json exists | clarify-ai.md | Q14–Q26 (Q14–Q22 always; Q23–Q26 only when agentic_profile.is_agentic == true) |
Apply firing rules to determine which categories are active:
Category A is always active.
Check for billing-only mode — if
billing-profile.jsonexists andgcp-resource-inventory.jsondoes NOT, Category B is active.Check for compute resources — if present, Category C is active. Within C, skip Q8 if no GKE present. Skip Q10/Q11 if no Cloud Run present.
Check for database resources — if present, Category D is active.
Category E is disabled by default. Offered after the last batch completes in Step 4 (see Category E Opt-In in Step 4). If user declines or does not respond, apply Category E defaults (no HA upgrades, no right-sizing).
Check for
ai-workload-profile.json— if present, Category F is active.
If no IaC, billing data, or code is available (empty discovery): only Category A is active. All service-specific categories are skipped.
HARD GATE — Read Category Files Before Proceeding
STOP. You MUST read each active category's file NOW, before moving to Step 4.
The exact question wording, answer options, context rationale, and interpretation rules exist ONLY in the category files listed below. They are NOT in this file. The table above is a summary index only — do NOT use it to fabricate questions.
Read these files based on which categories are active:
Active Category File to Read A (always) clarify-global.mdB or C clarify-compute.mdD clarify-database.mdF clarify-ai.mdDo NOT proceed to Step 4 until you have read every applicable file above.
Early-Exit Rules
Apply these before presenting questions:
Q5 = "Yes, multi-cloud required" — Immediately record
compute: "eks". Skip Q8 (Kubernetes sentiment) — all container workloads resolve to EKS.Q6 extracted — When Step 2 mapped Cloud SQL
availability_type→ skip Q6.Q10/Q11 N/A — Cloud Run not present, auto-skip.
Q10 extracted — When min_instances > 0, skip Q10.
Q12/Q13 N/A — Cloud SQL (PostgreSQL or MySQL) not present in inventory, auto-skip.
Q12/Q13 extracted — Dev-tier Cloud SQL (Step 2 item 9), skip Q12 and Q13.
Q13b extracted — Unambiguous disk size from inventory (Step 2 item 7), skip Q13b.
Q3 extracted — Billing band mapped (Step 2 item 10), skip Q3.
Q1 extracted — Single-region inventory (Step 2 item 11), skip Q1.
Q9 extracted — No WebSocket signals in a completed code scan (Step 2 item 14), skip Q9. Do not extract when no code was analyzed.
Q14 auto-detected — If
integration.gateway_typeis non-null ORintegration.frameworksis non-empty inai-workload-profile.json, skip Q14. Setai_frameworkwithchosen_by: "extracted".Q19 auto-detected — Primary model from
ai-workload-profile.json(Step 2 item 12), skip Q19.Q20 auto-detected — Modalities from
capabilities_summary(Step 2 item 13), skip Q20.
Batch Planning
After determining active categories, organize questions into up to three batches presented sequentially with intermediate saves:
| Batch | Name | Categories | Questions | Fires When |
|---|---|---|---|---|
| 1 | Strategic Requirements | A (Global/Strategic) | Q1–Q7 (minus Q4) | Always |
| 2 | Infrastructure | B (Config Gaps), C (Compute), D (Database) | Q8–Q13b + Category B prompts | Any compute or database resources present |
| 3 | AI Workloads | F (AI/Bedrock) | Q14–Q26 (Q23–Q26 only if agentic) | ai-workload-profile.json exists |
Determine active batches:
Batch 1 is always active.
Batch 2 is active if Category B, C, or D fired.
Batch 3 is active if Category F fired.
Record the ordered list of active batches and count the questions per batch (after extraction and early-exit filtering). These counts are used for per-batch progress messaging — not shown as a grand total upfront.
Category E (Migration Posture) is offered after the last substantive batch completes, before writing final preferences.json.
Category E — Migration Posture (Disabled by Default)
Fire when: User explicitly opts in. Default behavior when disabled: Apply conservative defaults — no HA upgrades, no right-sizing.
If the user opts in, present after all other categories:
Q-E1 — Should we recommend upgrading Single-AZ to Multi-AZ where possible?
A) Yes — upgrade to Multi-AZ for higher availability | B) No — keep current topology
Interpret → ha_upgrade: A → true, B → false. Default: B → false.
Q-E2 — Should we use billing utilization data to right-size instance types?
A) Yes — right-size based on utilization | B) No — match current capacity
Interpret → right_sizing: A → true, B → false. Default: B → false.
Step 4: Present Questions in Progressive Batches
Prerequisite: Step 2.5 confirmation must be complete (user said "looks good" or finished correcting) before presenting Batch 1. Do not re-show the full detected-settings table here unless the user asks for a recap.
BigQuery / deferred analytics (mandatory callout): If Step 2 set bigquery_present to true, output this block once, before any questions (same turn as Batch 1), then continue with the question flow:
BigQuery / analytics warehouse: Your discovery inputs include BigQuery. This skill does not select an AWS analytics or data-warehouse target (no Athena, Redshift, Glue, or EMR recommendation from the plugin). Before warehouse, data lake, SQL analytics, or BI cutover planning, engage your AWS account team and/or a data analytics migration partner to assess query patterns, data volumes, ETL/ELT, and downstream consumers. Design will mark these resources as
Deferred — specialist engagement.
Questions are presented in sequential batches with a save after each. After each batch the user can skip individual questions (defaults applied), say "use defaults for the rest" to apply defaults for all remaining batches and proceed immediately, or answer normally.
Batch Loop
For each active batch (determined in Batch Planning above), execute steps 4a–4d:
4a. Present Batch
Use a conversational tone with brief context explaining why each question matters. Number questions within each batch starting from 1.
Batch 1 — Strategic Requirements (always first):
Before mapping your infrastructure to AWS, I have a few sections of questions
to tailor the migration plan. You can answer each, skip individual ones
(I'll use sensible defaults), or say "use defaults for the rest" at any point.
Let's start with your strategic requirements.
--- Strategic Requirements ---
Question 1: [Q1 text with context]
Question 2: [Q2 text with context]
...
Question [N]: [Q7 text with context]Batch 2 — Infrastructure (if active):
After Batch 1 answers are saved, present:
Got it — your strategic preferences are saved.
Next up: [N] questions about your compute and database setup.
You can answer each, skip individual ones, or say "use defaults for the rest."
--- Infrastructure ---
Question 1: [first active question text with context]
...Batch 3 — AI Workloads (if active):
After prior batch answers are saved, present. Adapt the intro based on whether this is the second or third batch:
[Infrastructure preferences saved. / Strategic preferences saved.]
Last section — [N] questions about your AI workloads, then we're ready to design.
You can answer each, skip individual ones, or say "use defaults for the rest."
--- AI Workloads ---
Question 1: [first active question text with context]
...If Batch 3 is the second batch (Batch 2 was skipped because no infra resources), use "Next up" instead of "Last section" if appropriate.
Single-batch shortcut: If only Batch 1 is active (no infrastructure or AI categories fired), skip the multi-batch framing. Present Batch 1 questions with a simpler intro and proceed directly to Category E opt-in then Step 5 after answers — no draft file needed.
4b. Wait for Response
Wait for the user's response to the current batch. Do NOT present the next batch or proceed to Design without a response or an explicit "use defaults for the rest."
"Use defaults for the rest" handling: If the user says this at any point:
Apply documented defaults for all unanswered questions in the current batch.
Apply documented defaults for all questions in remaining batches.
Skip directly to Category E opt-in, then Step 5 (write final
preferences.json).
4c. Interpret Batch Answers
Apply the interpret rule (from the category reference files) for every answered question in the batch. For skipped questions within the batch, apply the documented default.
Apply early-exit rules triggered by this batch's answers. For example, if Batch 1 includes Q5 = "Yes, multi-cloud required", record compute: "eks" and mark Q8 as skipped (early-exit) for Batch 2.
4d. Save Draft
If more batches remain after this one: Write (or update) $MIGRATION_DIR/preferences-draft.json with all answers collected so far. Use the same schema as preferences.json with these additional metadata fields:
{
"metadata": {
"draft": true,
"batches_completed": ["strategic"],
"batches_remaining": ["infrastructure", "ai"],
"migration_type": "full",
"timestamp": "<ISO timestamp>",
...
},
"design_constraints": { ... },
"ai_constraints": { ... }
}Batch name values: "strategic", "infrastructure", "ai".
Return to 4a for the next batch.
If this was the last active batch: Do not write a draft — proceed to Category E opt-in then Step 5.
Category E Opt-In
After the last substantive batch is answered (but before writing final preferences.json), offer Category E if billing-profile.json exists:
"Would you also like HA upgrade and right-sizing recommendations based on your billing data? If not, I'll use conservative defaults (no upgrades, match current capacity)."
If user opts in, present Q-E1–Q-E2 (defined in Category E — Migration Posture above). Otherwise, apply Category E defaults (ha_upgrade: false, right_sizing: false).
Answer Combination Triggers
| Scenario | Key Answers | Recommendation |
|---|---|---|
| Early-stage funding path | Q3 = lower spend band | Entry-tier migration funding program review |
| Growth-stage funding path | Q3 = higher spend band | Migration funding/support program review based on spend profile |
| Must stay portable | Q5 = Yes multi-cloud | EKS only, no ECS Fargate |
| Kubernetes-averse | Q5 = No + Q8 = Frustrated | ECS Fargate strongly recommended |
| WebSocket app | Q9 = Yes | ALB WebSocket config required |
| Low-traffic Cloud Run | Q10 = Business hours + Q11 < $100 | Recommend staying on Cloud Run |
| Cloud SQL Postgres — dev/low HA | Q6 = Inconvenient + Cloud SQL in inventory | RDS PostgreSQL single-AZ |
| Cloud SQL Postgres — prod HA (RDS) | Q6 = Significant Issue + Cloud SQL in inventory | RDS PostgreSQL Multi-AZ |
| Cloud SQL Postgres — mission-critical | Q6 = Mission-Critical + Cloud SQL in inventory | Aurora PostgreSQL Multi-AZ; apply Q12/Q13 |
| Cloud SQL Postgres — global catastrophic | Q6 = Catastrophic + Q1 = Global + Cloud SQL in inventory | Aurora PostgreSQL Global Database |
| High I/O database (RDS path) | Q6 = Inconvenient/Significant + Q13 = High | RDS io2 or Provisioned IOPS |
| High I/O database (Aurora path) | Q6 = Mission-Critical/Catastrophic + Q13 = High | Aurora I/O-Optimized |
| Write-heavy global DB | Q6 = Mission-Critical/Catastrophic + Q12 = Write-heavy/global | Aurora DSQL architecture review (RDS path only: size writer; flag review) |
| Rapidly growing DB (RDS path) | Q6 = Inconvenient/Significant + Q12 = Rapidly growing | RDS with headroom on instance class |
| Rapidly growing DB (Aurora path) | Q6 = Mission-Critical/Catastrophic + Q12 = Rapidly growing | Aurora Serverless v2 |
| Zero downtime required | Q7 = No downtime | Blue/green + AWS DMS required (RDS or Aurora blue/green per Q6) |
| HIPAA compliance | Q2 = HIPAA | BAA services only, specific regions |
| FedRAMP required | Q2 = FedRAMP | GovCloud regions only |
| CCPA / CPRA | Q2 = G (CCPA / CPRA) | Consumer privacy, logging/retention, data-inventory posture; confirm regions with legal review |
| Gateway-only AI | Q14 = B only (LLM router/gateway) | Config change only; skip SDK migration |
| LangChain/LangGraph AI | Q14 includes C | Provider swap via ChatBedrock; 1–3 days |
| OpenAI Agents SDK | Q14 includes E | Highest AI effort; Bedrock Agents; 2–4 weeks |
| Multi-agent + MCP | Q14 = D + F | Bedrock Agents to unify orchestration + MCP |
| Voice platform AI | Q14 includes G | Check native Bedrock support; Nova 2 Sonic if needed |
| GPT-5.5 migration | Q19 = GPT-5.5 | Claude Opus 4.6 — Bedrock 17% cheaper on output; or Sonnet 4.6 for 53% savings |
| GPT-5.5 Pro migration | Q19 = GPT-5.5 Pro | Nova 2 Pro — 95% cheaper on Bedrock |
| GPT-5.4 migration | Q19 = GPT-5.4 | Claude Sonnet 4.6 — near price parity; AWS consolidation |
| GPT-5.4 Mini/Nano migration | Q19 = GPT-5.4 Mini or Nano | Nova Lite/Micro — 87-94% cheaper on Bedrock |
| GPT-4 Turbo migration | Q19 = GPT-4 Turbo | Claude Sonnet 4.6 — 70% cheaper on input |
| o-series migration | Q19 = o-series | Claude Sonnet 4.6 with extended thinking |
| High-volume cost-critical AI | Q18 = High + cost critical | Nova Micro or Haiku 4.5 + provisioned throughput |
| Reasoning/agent workload | Q17 = Extended thinking | Claude Sonnet 4.6 extended thinking; Opus 4.6 for hardest |
| Speech-to-speech AI | Q17 = Real-time speech | Nova 2 Sonic |
| RAG workload | Q17 = RAG optimization | Bedrock Knowledge Bases + Titan Embeddings |
| Vision workload | Q20 = Vision required | Claude Sonnet 4.6 (multimodal) |
| Latency-critical AI | Q21 = Critical | Haiku 4.5 or Nova Micro + streaming |
| Complex reasoning tasks | Q22 = Complex | Claude Sonnet 4.6; Opus 4.6 for hardest |
Step 5: Assemble and Write preferences.json
Assemble all interpreted answers from the completed batches into the final $MIGRATION_DIR/preferences.json. If preferences-draft.json exists, use it as the base — merge in the final batch's answers, remove the draft-specific metadata fields (draft, batches_completed, batches_remaining), and set metadata.timestamp to the current time. Write $MIGRATION_DIR/preferences.json:
{
"metadata": {
"migration_type": "full",
"timestamp": "<ISO timestamp>",
"discovery_artifacts": ["gcp-resource-inventory.json", "ai-workload-profile.json"],
"questions_asked": [
"Q1",
"Q2",
"Q3",
"Q5",
"Q6",
"Q7",
"Q16",
"Q17",
"Q19",
"Q21",
"Q22"
],
"questions_defaulted": ["Q9"],
"questions_skipped_extracted": ["Q14"],
"questions_skipped_early_exit": ["Q8"],
"questions_skipped_not_applicable": ["Q4", "Q10", "Q11", "Q12", "Q13", "Q13b"],
"detected_settings": [
{
"key": "availability",
"value": "multi-az",
"source": "terraform:availability_type=REGIONAL",
"questions_skipped": ["Q6"],
"confirmed": true,
"corrected_by_user": false
}
],
"category_e_enabled": false,
"clarify_mode": "full",
"inventory_clarifications": {}
},
"design_constraints": {
"target_region": { "value": "us-east-1", "chosen_by": "user" },
"compliance": { "value": ["hipaa"], "chosen_by": "user" },
"gcp_monthly_spend": { "value": "$5K-$20K", "chosen_by": "user" },
"funding_stage": { "value": "series-a", "chosen_by": "user" },
"availability": { "value": "multi-az", "chosen_by": "default" },
"cutover_strategy": { "value": "maintenance-window-weekly", "chosen_by": "user" },
"kubernetes": { "value": "eks-or-ecs", "chosen_by": "user" },
"database_traffic": { "value": "steady", "chosen_by": "user" },
"db_io_workload": { "value": "medium", "chosen_by": "user" },
"db_size": { "value": "10-100GB", "chosen_by": "user" }
},
"ai_constraints": {
"ai_framework": { "value": ["direct"], "chosen_by": "extracted" },
"ai_monthly_spend": { "value": "$500-$2K", "chosen_by": "user" },
"ai_priority": { "value": "balanced", "chosen_by": "user" },
"ai_critical_feature": { "value": "function-calling", "chosen_by": "user" },
"ai_token_volume": { "value": "low", "chosen_by": "user" },
"ai_model_baseline": { "value": "claude-sonnet-4-6", "chosen_by": "user" },
"ai_vision": { "value": "text-only", "chosen_by": "user" },
"ai_latency": { "value": "important", "chosen_by": "user" },
"ai_complexity": { "value": "moderate", "chosen_by": "user" },
"ai_capabilities_required": {
"value": ["text_generation", "streaming", "function_calling"],
"chosen_by": "extracted"
}
}
}Schema Rules
Every entry in
design_constraintsandai_constraintsis an object withvalueandchosen_byfields.chosen_byvalues:"user"(explicitly answered),"default"(system default applied — includes "I don't know" answers),"extracted"(inferred from inventory),"derived"(computed from combination of answers + detected capabilities).Only write a key to
design_constraints/ai_constraintsif the answer produces a constraint. Absent keys mean "no constraint — Design decides."Do not write null values.
For billing-source inventories,
metadata.inventory_clarificationsrecords Category B answers.metadata.questions_skipped_early_exitrecords questions skipped due to early-exit logic (e.g., Q8 skipped because Q5=multi-cloud).metadata.questions_skipped_extractedrecords questions skipped because inventory already provided the answer.metadata.detected_settingsrecords each auto-detected setting with source, confirmation status, and whether the user corrected it in Step 2.5.metadata.questions_skipped_not_applicablerecords questions skipped because the relevant service wasn't in the inventory.ai_constraintssection is present ONLY if Category F fired. Omit entirely if no AI artifacts exist.ai_constraints.ai_capabilities_requiredis the UNION of detected capabilities fromai-workload-profile.json+ critical feature from Q17 + vision from Q20.chosen_byis"derived".ai_constraints.ai_frameworkis an array (Q14 is select-all-that-apply). If auto-detected,chosen_byis"extracted".
After writing preferences.json, delete $MIGRATION_DIR/preferences-draft.json if it exists.
Defaults Table
| Question | Default | Constraint |
|---|---|---|
| Q1 — Location | A (single region) | target_region: closest AWS region to GCP region |
| Q2 — Compliance | A (none) | no constraint |
| Q3 — GCP spend | B ($1K–$5K) | gcp_monthly_spend: "$1K-$5K" |
| Q4 — Funding stage | (skip in IDE mode) | no constraint |
| Q5 — Multi-cloud | B (AWS-only) | no constraint |
| Q6 — Uptime | B (significant) | availability: "multi-az" |
| Q7 — Maintenance | D (flexible) | cutover_strategy: "flexible" |
| Q8 — K8s sentiment | B (neutral) | kubernetes: "eks-or-ecs" |
| Q9 — WebSocket | B (no) | no constraint |
| Q10 — Cloud Run traffic | C (24/7) | cloud_run_traffic_pattern: "constant-24-7" |
| Q11 — Cloud Run spend | B ($100–$500) | cloud_run_monthly_spend: "$100-$500" |
| Q12 — DB traffic | A (steady) | database_traffic: "steady" |
| Q13 — DB I/O | B (medium) | db_io_workload: "medium" |
| Q13b — DB size | E (unknown) | db_size: "unknown" → default to pgcopydb |
| Q14 — AI framework | (auto-detect) | ai_framework from code detection |
| Q15 — AI spend | B ($500–$2K) | ai_monthly_spend: "$500-$2K" |
| Q16 — AI priority | E (balanced) | ai_priority: "balanced" |
| Q17 — Critical feature | J (none) | no additional override |
| Q18 — Volume + cost | A (low + quality) | ai_token_volume: "low" |
| Q19 — Current model | (auto-detect) | ai_model_baseline from code detection |
| Q20 — Input types | A (text only) | no constraint |
| Q21 — AI latency | B (important) | ai_latency: "important" |
| Q22 — Task complexity | B (moderate) | ai_complexity: "moderate" |
Validation Checklist
Before handing off to Design:
[ ] If extractions were made, Step 2.5 detected-settings confirmation was shown and user responded before questions
[ ] If extractions were made,
metadata.detected_settingsrecords each inferred value withconfirmedstatus[ ] If
bigquery_presentwas true, the Step 4 BigQuery specialist advisory was shown before questions — or, if Step 0 option A (reuse preferences), the same advisory was shown after BigQuery detection[ ]
preferences.jsonwritten to$MIGRATION_DIR/[ ]
design_constraints.target_regionis populated withvalueandchosen_by[ ]
design_constraints.availabilityis populated when Cloud SQL PostgreSQL/MySQL is in inventory (asked, extracted, or defaulted — Design must not run with absent/null availability)[ ] Only keys with non-null values are present in
design_constraints[ ] Every entry in
design_constraintsandai_constraintshasvalueandchosen_byfields[ ] Config gap answers recorded in
metadata.inventory_clarifications(billing mode only)[ ] Early-exit skips recorded in
metadata.questions_skipped_early_exit[ ]
ai_constraintssection present ONLY if Category F fired[ ] If Category F fired,
ai_constraints.ai_frameworkis populated (from detection or Q14)[ ] If Category F fired,
ai_capabilities_requiredis derived from detection + Q17 + Q20[ ]
ai_constraints.ai_frameworkis an array (Q14 is multi-select)[ ] Output is valid JSON
[ ]
preferences-draft.jsonhas been deleted (if it existed)[ ]
metadata.clarify_modeis set to"fast_path","simple_hybrid", or"full"
Completion Handoff Gate (Fail Closed)
Load shared/handoff-gates.md. Re-read from disk before checking.
Re-entry guard: If aws-design.json (or aws-design-ai.json / aws-design-billing.json) exists and phases.design is "completed": STOP unless the user explicitly confirms re-running Clarify. Emit GATE_FAIL | phase=clarify | field=aws-design.json | reason=stale_downstream.
Checks (all must PASS):
preferences.jsonexists and parses as JSON.Step 5 validation checklist items all pass (including
metadata.clarify_mode).If
gcp-resource-inventory.jsoncontainsgoogle_sql_database_instance→design_constraints.availability.valueis set (non-null, non-empty).
On any FAIL: Emit GATE_FAIL | phase=clarify | field=<path> | reason=missing. Do NOT modify artifacts to pass the gate. Do NOT update .phase-status.json. Tell the user to answer the missing question or re-run Clarify.
On PASS: Emit HANDOFF_OK | phase=clarify | artifacts=preferences.json.
Step 6: Update Phase Status
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."
Scope Boundary
This phase covers requirements gathering ONLY.
FORBIDDEN — Do NOT include ANY of:
Detailed AWS architecture or service configurations
Code migration examples or SDK snippets
Detailed cost calculations
Migration timelines or execution plans
Terraform generation
Your ONLY job: Understand what the user needs. Nothing else.
Requirements and compatibility
Written for: Claude Code
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Names Claude Code tools, Needs an MCP server
Security
What our scanner noticed· Low risk
- Instructions that use the network
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- Cline
- Publisher
- Cline (Official)
- Source
- cline/skills · skills/gcp-to-aws · commit 2637846
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Cline.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download gcp-to-aws.zip