heroku-to-aws

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Heroku-to-AWS Migration Skill

Heroku到AWS迁移Skill

Philosophy

核心理念

  • Full platform exit by default: Heroku is in sustaining engineering (KTLO) — stability and support only, no new investment. Enterprise contracts are no longer sold to new customers. This skill assumes complete departure from Heroku (compute, data, and add-ons) within a user-defined window. Do not recommend indefinite continued use of Heroku.
  • PaaS-to-PaaS by default, recommendation-shaped: Elastic Beanstalk (Docker platform, AL2023) is the default compute target because it preserves Heroku's managed platform model (source deployment, platform-managed environments, and lower operational burden than direct container orchestration). Clarify presents a per-formation compute recommendation before asking for confirmation. Fargate remains the override for direct container control and is used automatically for horizontally scaled non-web processes that EB SingleInstance cannot preserve; EKS remains the override for teams with Kubernetes expertise. ECS Express Mode may be mentioned only as a forward-look for the Fargate override path, not as a replacement for the EB default. Do not recommend AWS App Runner (no longer accepting new customers as of April 2026).
  • Interim cutover is bounded: If a user chooses data-first migration (database on AWS, app temporarily on Heroku), treat this as a bounded phase (weeks, not quarters). Require a target exit date and surface KTLO platform risk warnings.
  • Re-platform by default: Select AWS services that match Heroku workload types (e.g., Dynos → Elastic Beanstalk, Heroku Postgres → RDS/Aurora, Heroku Redis → ElastiCache, Kafka → MSK).
  • 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 Heroku invoice line items in the infra estimate when billing exists) are allowed.
  • Live-first discovery, read-only and consent-gated: The user's authenticated Heroku CLI is a first-class discovery source — most startups have no
    heroku_*
    Terraform, and the account is authoritative for what actually runs. Live capture is strictly read-only (an exact-command whitelist of list/info commands), requires explicit consent, never captures config var values (key names only), and never extracts the API token. Terraform files (
    .tf
    with
    heroku_*
    resources) and repo artifacts (Procfile, app.json) remain fully supported; when both live and Terraform data exist, live wins for current state, Terraform supplements structure and provenance, and disagreements are surfaced as drift — never silently resolved.
  • Flat resource model: Heroku resources are organized per-app without dependency graphs or clustering. No topological sorting, typed edges, or cluster formation logic. Resources are processed as a flat list in input order.
  • Deterministic mappings: Core services use fixed lookup tables (Dyno Type Table, Postgres Plan Table, Redis Plan Table, Kafka Plan Table). Common add-ons use the Fast-Path Table. Unknown add-ons hit the specialist gate.
  • DMS has Heroku constraints: AWS DMS cannot perform continuous replication (CDC) with Heroku Postgres because Heroku does not grant the REPLICATION role. DMS is for one-time bulk migration with a cutover window only. The skill must surface this constraint when DMS is selected.
  • What-if after Estimate: After costs are computed, SAs can enter an optional what-if workshop sidebar (
    references/phases/workshop/workshop.md
    ) to change region, HA, compute target, or CPU architecture (x86 vs Graviton), refresh Design + Estimate, and compare up to 5 priced scenarios — without re-running Discover. Region dollar deltas need awspricing MCP; without it, rates stay us-east-1-cache-based. Workshop arch defaults to x86_64 here (EB tables historically x86-first).

  • 默认完全退出平台:Heroku目前处于维持运营状态(KTLO)——仅提供稳定性支持,无新投入。不再向新客户销售企业合同。本Skill假设在用户定义的时间窗口内完全脱离Heroku(计算、数据及附加组件)。不建议无限期继续使用Heroku。
  • 默认PaaS到PaaS迁移,按需调整:Elastic Beanstalk(Docker平台,AL2023)是默认计算目标,因为它保留了Heroku的托管平台模式(源码部署、平台托管环境、比直接容器编排更低的运维负担)。明确需求阶段会在请求确认前,针对每个应用实例提供计算资源推荐。Fargate作为直接容器控制的替代方案,会自动用于EB SingleInstance无法支持的水平扩展非Web进程;EKS则适用于具备Kubernetes经验的团队。仅可将ECS Express Mode作为Fargate替代路径的前瞻性方案提及,不可替代EB默认方案。不推荐AWS App Runner(截至2026年4月不再接受新客户)。
  • 过渡切换阶段有时间限制:如果用户选择先迁移数据(数据库在AWS,应用暂时留在Heroku),将其视为有时间限制的阶段(数周而非数月)。要求用户设定目标退出日期,并提示KTLO平台的风险。
  • 默认重新平台化:选择与Heroku工作负载类型匹配的AWS服务(例如:Dynos→Elastic Beanstalk,Heroku Postgres→RDS/Aurora,Heroku Redis→ElastiCache,Kafka→MSK)。
  • 默认开发环境规格:默认使用开发级容量(例如:db.t4g.micro、单可用区)。仅在用户指示下升级规格。
  • 无人工一次性迁移成本:不得将人工劳动、专业服务或工时作为美元估算或“一次性迁移成本”预算类别。基于数据的供应商费用(例如存在账单时,基础设施估算中的Heroku发票明细项)是允许的。
  • 优先实时发现,只读且需用户授权:用户已认证的Heroku CLI是首要发现源——大多数初创企业没有
    heroku_*
    Terraform配置,而账户是实际运行资源的权威来源。实时捕获严格为只读(仅允许列表/信息类命令的精确命令白名单),需要明确的用户授权,绝不捕获配置变量值(仅捕获键名),绝不提取API令牌。Terraform文件(包含
    heroku_*
    资源的
    .tf
    文件)和仓库工件(Procfile、app.json)完全受支持;当实时数据和Terraform数据同时存在时,实时数据代表当前状态,Terraform补充结构和来源信息,差异会作为漂移显示——绝不静默解决。
  • 扁平资源模型:Heroku资源按应用组织,无依赖关系图或集群。无拓扑排序、类型化关联或集群形成逻辑。资源按输入顺序作为扁平列表处理。
  • 确定性映射:核心服务使用固定查找表(Dyno类型表、Postgres计划表、Redis计划表、Kafka计划表)。常见附加组件使用快速路径表。未知附加组件将触发专家介入流程。
  • DMS存在Heroku限制:AWS DMS无法与Heroku Postgres执行连续复制(CDC),因为Heroku不授予REPLICATION角色。DMS仅用于带切换窗口的一次性批量迁移。当选择DMS时,Skill必须提示此限制。
  • 估算后可进行假设分析:计算成本后,解决方案架构师可进入可选的假设分析工作坊侧边栏(
    references/phases/workshop/workshop.md
    ),更改区域、高可用配置、计算目标或CPU架构(x86 vs Graviton),刷新设计和估算结果,并对比最多5个已定价场景——无需重新运行发现阶段。区域价格差异需要awspricing MCP;若无该服务,费率将保持基于us-east-1的缓存数据。工作坊架构默认采用x86_64(EB表格历史上优先支持x86)。

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/0315-1030/
    ). Set during Phase 1 (Discover).

  • "Load" = 使用Read工具读取文件并遵循其指令。不得总结或跳过任何章节。
  • $MIGRATION_DIR
    =
    .migration/
    下的运行特定目录(例如:
    .migration/0315-1030/
    )。在第1阶段(发现)中设置。

Phase Structure (frontmatter)

阶段结构(前置元数据)

Phase and unit files carry a YAML frontmatter block that declares how the phase is composed — its inputs, the fragments it runs, the assembler that combines them, what it produces, its gates, and what it requires/advances-to. The DSL interpreter contract is the vendored
references/vendored/dsl/INTERPRETER.md
: it defines every frontmatter key, the fragment/assembler model, and the interpreter loop. Load it first (once, at the start of a migration), then execute a phase file's prose body. Elsewhere in this skill,
INTERPRETER.md
(without a path) refers to this same loaded contract.
Frontmatter is being introduced phase-by-phase; a phase file without it runs from its prose as before.

阶段和单元文件包含一个YAML前置元数据块,声明阶段的组成——输入、运行的片段、组合片段的汇编器、生成的产物、阶段门控、以及所需前置条件和后续阶段。DSL解释器约定在
references/vendored/dsl/INTERPRETER.md
中:它定义了每个前置元数据键、片段/汇编器模型以及解释器循环。请先加载此文件(迁移开始时加载一次),然后执行阶段文件的正文内容。本Skill中其他地方的
INTERPRETER.md
(无路径)均指此已加载的约定。
前置元数据正在分阶段引入;无前置元数据的阶段文件将按之前的方式运行其正文内容。

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 MUST NOT be loaded unless the condition is met. Do not speculatively load files.
  • No duplication: 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.
Each phase declares its own conditional reference/knowledge loads in frontmatter (a fragment
_trigger
or a
_knowledge
entry's
_when
); do not maintain a separate load-condition table here.
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.

每个阶段按需加载参考文件。为保持每次交互的上下文可控并防止指令执行质量下降:
  • 预算限制:每个阶段加载的指令不应超过约800行(不包括用户工件如JSON配置文件和MCP工具结果)。
  • 条件加载:带有触发条件的参考文件仅在条件满足时加载。不得推测性加载文件。
  • 无重复内容:映射表、定价数据和共享警告仅存在于一个标准文件中。其他文件引用它们;不得将内容内联复制。
  • 渐进式深度加载:阶段编排器(
    design.md
    generate.md
    )包含简短的路由逻辑,指向详细的子文件。仅当选择子文件路径时才加载它。
每个阶段在前置元数据中声明自己的条件参考/知识加载(片段
_trigger
_knowledge
条目的
_when
);无需在此处维护单独的加载条件表。
添加新参考文件时,请验证阶段的总加载指令数保持在预算内。如果新文件与其他已加载参考文件组合后超过约800行,请拆分文件或设置为条件加载。

Execution

执行流程

This skill is driven by the interpreter loop in
INTERPRETER.md
(§ The interpreter loop): it reads
.phase-status.json
, determines the current phase, runs each phase's
_preconditions
/ fragments /
_assemble
/
_postconditions
, advances on
HANDOFF_OK
via
_advances_to
, and validates state. The phase set, ordering, and gates are all derived from the phase files' frontmatter and
INTERPRETER.md
— they are not restated here.
Cold start (entry phase). On a cold start — no
.migration/
run with a
.phase-status.json
yet — begin at
references/phases/discover/discover.md
, this skill's entry phase (the one carrying
_init: true
). The interpreter loads THIS phase directly; it does not scan every phase's frontmatter to discover the root. All subsequent phases are reached by following each phase's
_advances_to
. On a warm start,
current_phase
in
.phase-status.json
is authoritative except when deferred-advance sidebar resume applies (
INTERPRETER.md
§ The interpreter loop step 2 — Estimate completed +
workshop
pending/in_progress must not re-run Estimate).
Clarify is mandatory (heroku policy). Do not skip Clarify or jump straight to Design, Estimate, or Generate even if the user asks — there is no exception for "quick" or "obvious" migrations. A
preferences.json
that was not produced by an actual Clarify run does not count. If asked to skip, refuse briefly and run Clarify.

本Skill由
INTERPRETER.md
中的解释器循环驱动(§ The interpreter loop):它读取
.phase-status.json
,确定当前阶段,运行每个阶段的
_preconditions
/片段/
_assemble
/
_postconditions
,在
HANDOFF_OK
时通过
_advances_to
推进阶段,并验证状态。阶段集、顺序和门控均源自阶段文件的前置元数据和
INTERPRETER.md
——此处不再重述。
冷启动(入口阶段)。在冷启动时——尚无带
.phase-status.json
.migration/
运行——从
references/phases/discover/discover.md
开始,这是本Skill的入口阶段(带有
_init: true
的阶段)。解释器直接加载此阶段;无需扫描每个阶段的前置元数据来发现根阶段。所有后续阶段通过遵循每个阶段的
_advances_to
到达。在热启动时,
.phase-status.json
中的
current_phase
是权威的除非延迟推进的侧边栏恢复适用(
INTERPRETER.md
§ The interpreter loop step 2 — 估算完成 +
workshop
待处理/进行中时,不得重新运行估算)。
明确需求阶段为必填项(Heroku政策)。即使用户要求,也不得跳过明确需求阶段直接进入设计、估算或生成阶段——“快速”或“明显”的迁移也无例外。非实际明确需求阶段生成的
preferences.json
无效。如果用户要求跳过,请简要拒绝并运行明确需求阶段。

State Management

状态管理

Migration state lives in
$MIGRATION_DIR
(
.migration/[MMDD-HHMM]/
), created on the first phase and persisted across invocations. The state file is
.phase-status.json
; its shape is defined by
references/vendored/state/phase-status.schema.json
, and how it is created, validated, and updated across the lifecycle is defined in
INTERPRETER.md
§ The interpreter loop. The
.migration/
directory is protected by a
.gitignore
created at init.

迁移状态存储在
$MIGRATION_DIR
.migration/[MMDD-HHMM]/
)中,在第一阶段创建并在多次调用间持久化。状态文件为
.phase-status.json
;其结构由
references/vendored/state/phase-status.schema.json
定义,其在生命周期中的创建、验证和更新方式由
INTERPRETER.md
§ The interpreter loop定义。
.migration/
目录受初始化时创建的
.gitignore
保护。

MCP Servers

MCP服务

awspricing (for cost estimation):
  • Provides
    get_pricing
    ,
    get_pricing_service_codes
    ,
    get_pricing_service_attributes
    tools
  • Only needed during Estimate phase. Discover and Design do not require it.
  • Primary pricing source:
    references/vendored/pricing/aws-infra-pricing.json
    (cached AWS infrastructure rates, ±5-10% for infrastructure). MCP is secondary — used only for services not found in the pricing file.

awspricing(用于成本估算):
  • 提供
    get_pricing
    get_pricing_service_codes
    get_pricing_service_attributes
    工具
  • 仅在估算阶段需要。发现和设计阶段不需要。
  • 主要定价来源:
    references/vendored/pricing/aws-infra-pricing.json
    (缓存的AWS基础设施费率,基础设施误差±5-10%)。MCP为次要来源——仅用于定价文件中未找到的服务。

Files in This Skill

本Skill中的文件

heroku-to-aws/
├── SKILL.md                                    ← You are here (skill entry point)
├── references/
│   ├── phases/
│   │   ├── discover/
│   │   │   ├── discover.md                     # Phase 1: Discover orchestrator
│   │   │   ├── discover-terraform.md           # Terraform discovery
│   │   │   ├── discover-live-capture.md        # Live CLI capture (main-window pre-work, consent-gated)
│   │   │   ├── discover-live.md                # Live discovery fragment (parses live-capture/)
│   │   │   └── discover-billing.md             # Billing data parsing
│   │   ├── clarify/
│   │   │   └── clarify.md                      # Phase 2: Adaptive questions (12–15, batched ≤5)
│   │   ├── design/
│   │   │   └── design.md                       # Phase 3: Design orchestrator (flat single-pass mapping)
│   │   ├── estimate/
│   │   │   └── estimate.md                     # Phase 4: Cost projection
│   │   ├── workshop/
│   │   │   ├── workshop.md                     # Sidebar: optional post-Estimate what-if
│   │   │   ├── workshop-sheet.md               # Assumption sheet knobs
│   │   │   ├── workshop-refresh.md             # Patch prefs → Design → Estimate → snapshot
│   │   │   ├── workshop-compare.md             # Side-by-side scenarios
│   │   │   └── workshop-assemble.md            # Resolve sidebar → return to Generate
│   │   ├── generate/
│   │   │   ├── generate.md                     # Phase 5: Generate orchestrator
│   │   │   ├── generate-terraform.md           # Terraform configurations
│   │   │   ├── generate-docs.md                # MIGRATION_GUIDE.md + README.md
│   │   │   ├── generate-report.md              # migration-report.html (stakeholder + scenarios)
│   │   │   └── generate-eks.md                 # EKS manifests when design has EKS
│   │   └── feedback/
│   │       └── feedback.md                     # Phase 6: Feedback collection (reuses shared)
│   │
│   └── shared/                                 # heroku-to-aws's own shared references
│           ├── README.md                       # what lives here + pointers to plugin-neutral shared data
│           ├── heroku-pricing-cache.md          # Heroku plan pricing (source-side baseline)
│           ├── schema-discover-heroku.md        # heroku-resource-inventory.json schema
│           └── schema-workshop-scenarios.md     # scenarios/ + preferences.workshop contract
├── knowledge/design/                          # design lookup DATA (pure data, referenced by
│   │                                           #  design.md _knowledge, gated per _when)
│   ├── dyno-eb-sizing.json                     # Dyno type → Elastic Beanstalk EC2 instance type
│   ├── dyno-fargate-sizing.json                # Dyno type → Fargate CPU/memory
│   ├── eks-pod-sizing.json                     # Dyno type → EKS pod sizing + node selection
│   ├── postgres-rds-sizing.json                # Postgres plan → RDS/Aurora sizing
│   ├── redis-elasticache-sizing.json           # Redis plan → ElastiCache sizing
│   ├── kafka-msk-sizing.json                   # Kafka plan → MSK sizing
│   └── fast-path-addons.json                   # Add-on → AWS deterministic mappings (13+ entries)
ConditionAction
.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 attemptsDisplay user warning about ±5-10% accuracy. Use
references/vendored/pricing/aws-infra-pricing.json
. Add
pricing_source: "cached_fallback"
to
estimation-infra.json
.
User skips questions or says "use defaults for the rest"Apply documented defaults for remaining questions. Phase 2 completes either way.
Dyno type not in selected compute sizing tableReject mapping for that formation. Output: "Unsupported dyno type: {type}. Cannot map to target compute service."
Add-on not in Fast-Path TableMark as "Deferred — specialist engagement". No automated mapping produced.
heroku-to-aws/
├── SKILL.md                                    ← 当前位置(Skill入口点)
├── references/
│   ├── phases/
│   │   ├── discover/
│   │   │   ├── discover.md                     # 阶段1:发现编排器
│   │   │   ├── discover-terraform.md           # Terraform发现
│   │   │   ├── discover-live-capture.md        # 实时CLI捕获(主窗口预操作,需用户授权)
│   │   │   ├── discover-live.md                # 实时发现片段(解析live-capture/)
│   │   │   └── discover-billing.md             # 账单数据解析
│   │   ├── clarify/
│   │   │   └── clarify.md                      # 阶段2:自适应问题(12–15个,分批≤5个)
│   │   ├── design/
│   │   │   └── design.md                       # 阶段3:设计编排器(扁平单遍映射)
│   │   ├── estimate/
│   │   │   └── estimate.md                     # 阶段4:成本预估
│   │   ├── workshop/
│   │   │   ├── workshop.md                     # 侧边栏:估算后可选假设分析
│   │   │   ├── workshop-sheet.md               # 假设配置表选项
│   │   │   ├── workshop-refresh.md             # 更新偏好→设计→估算→快照
│   │   │   ├── workshop-compare.md             # 场景对比
│   │   │   └── workshop-assemble.md            # 完成侧边栏→返回生成阶段
│   │   ├── generate/
│   │   │   ├── generate.md                     # 阶段5:生成编排器
│   │   │   ├── generate-terraform.md           # Terraform配置
│   │   │   ├── generate-docs.md                # MIGRATION_GUIDE.md + README.md
│   │   │   ├── generate-report.md              # migration-report.html(利益相关者+场景)
│   │   │   └── generate-eks.md                 # 设计包含EKS时的EKS清单
│   │   └── feedback/
│   │       └── feedback.md                     # 阶段6:反馈收集(复用共享组件)
│   └── shared/                                 # heroku-to-aws专属共享参考文件
│           ├── README.md                       # 文件说明+插件中立共享数据指引
│           ├── heroku-pricing-cache.md          # Heroku计划定价(源端基准)
│           ├── schema-discover-heroku.md        # heroku-resource-inventory.json schema
│           └── schema-workshop-scenarios.md     # scenarios/ + preferences.workshop约定
├── knowledge/design/                          # 设计查找数据(纯数据,由design.md的_knowledge引用,按_when门控)
│   │                                           #
│   ├── dyno-eb-sizing.json                     # Dyno类型→Elastic Beanstalk EC2实例类型
│   ├── dyno-fargate-sizing.json                # Dyno类型→Fargate CPU/内存
│   ├── eks-pod-sizing.json                     # Dyno类型→EKS pod规格+节点选择
│   ├── postgres-rds-sizing.json                # Postgres计划→RDS/Aurora规格
│   ├── redis-elasticache-sizing.json           # Redis计划→ElastiCache规格
│   ├── kafka-msk-sizing.json                   # Kafka计划→MSK规格
│   └── fast-path-addons.json                   # 附加组件→AWS确定性映射(13+项)
触发条件对应操作
.phase-status.json
缺少阶段门控
停止操作。输出:"无法进入阶段X:阶段Y-1未完成。请从阶段Y开始或恢复阶段Y-1。"
尝试3次后awspricing仍不可用向用户显示警告,说明成本估算存在±5-10%的误差。使用
references/vendored/pricing/aws-infra-pricing.json
。在
estimation-infra.json
中添加
pricing_source: "cached_fallback"
用户跳过问题或说"其余使用默认值"对剩余问题应用文档中记录的默认值。无论如何,阶段2都会完成。
Dyno类型不在所选计算规格表中拒绝该应用实例的映射。输出:"不支持的dyno类型:{type}。无法映射到目标计算服务。"
附加组件不在快速路径表中标记为"延迟处理——需专家介入"。不生成自动映射。

Defaults

默认配置

  • IaC output: Terraform configurations, migration scripts, and documentation
  • Region:
    us-east-1
    (unless user specifies otherwise)
  • Sizing: Development tier (e.g.,
    db.t4g.micro
    for databases, 0.5 CPU for Fargate)
  • Migration mode: Adapts based on available inputs (live CLI discovery recommended, Terraform supported, Procfile/app.json supplementary, billing optional)
  • Cost currency: USD
  • Timeline assumption: 2-16 weeks depending on migration complexity — small (2-6 weeks), medium (6-12 weeks), large (12-18 weeks). Complexity tiers are classified per
    references/vendored/estimate/complexity-tiers.json
    .
  • 基础设施即代码输出:Terraform配置、迁移脚本和文档
  • 区域
    us-east-1
    (除非用户指定其他区域)
  • 规格:开发级(例如:数据库使用
    db.t4g.micro
    ,Fargate使用0.5 CPU)
  • 迁移模式:根据可用输入自适应(推荐实时CLI发现,支持Terraform,Procfile/app.json作为补充,账单可选)
  • 成本货币:美元
  • 时间线假设:根据迁移复杂度为2-16周——小型(2-6周)、中型(6-12周)、大型(12-18周)。复杂度分类参考
    references/vendored/estimate/complexity-tiers.json

Feedback & Sharing Sidebars

反馈与分享侧边栏

The interpreter loop (
INTERPRETER.md
§ The interpreter loop) drives phase sequencing, gates, and state. This section defines only the heroku-specific sidebar orchestration: WHERE the optional
workshop
and
feedback
sidebars are offered (placement is orchestration prose, not part of the phase contract). Both are
_kind: sidebar
— off-backbone, trigger-entered, never
current_phase
.
Plan-share links are GATED OFF. The share landing page (
https://aws.amazon.com/startups/migrate/connect
) is not yet live (404). Do NOT offer, generate, or present a share link at any sidebar. The share-link spec is preserved in
references/phases/feedback/feedback-collect.md
Step 3 (itself gated) for when the page ships; restoring the share prompts here is the un-gating change.
  • After Discover: No prompt. Proceed directly to Clarify.
  • After Estimate: First offer the what-if workshop sidebar per
    estimate-assemble.md
    (Enter workshop / Proceed toward Generate). Outer Estimate keeps
    current_phase: estimate
    until workshop is resolved (entered then exited via
    workshop-assemble.md
    , or declined). If the user enters workshop, follow
    references/phases/workshop/workshop.md
    . Then, if
    phases.feedback
    is
    "pending"
    :
    Would you like to share quick feedback? (5 optional questions +
    anonymized usage data — never resource names, file paths, or
    account IDs)
    
    [A] Yes, share feedback
    [B] No thanks, continue to Generate
    • If user picks A → Load
      references/phases/feedback/feedback.md
      , execute it. Set
      phases.feedback
      to
      "completed"
      . Continue to Generate.
    • If user picks B → Set
      phases.feedback
      to
      "completed"
      . Continue to Generate.
  • Workshop resume (mandatory): If
    current_phase == "estimate"
    AND
    phases.estimate == "completed"
    AND
    phases.workshop
    is
    "pending"
    or
    "in_progress"
    , do not recompute Estimate. If
    "pending"
    , re-present the post-Estimate workshop offer from
    estimate-assemble.md
    . If
    "in_progress"
    , load
    references/phases/workshop/workshop.md
    . Generate must wait until
    phases.workshop == "completed"
    (entered+exited or declined).
  • Warm start / explicit what-if: If the user says "what if", "reprice", "workshop mode", or "compare scenarios" and Estimate artifacts already exist, load
    references/phases/workshop/workshop.md
    directly (respect Generate
    _re_entry_guard
    when Terraform was already produced). Knobs on the pilot sheet: region, HA, compute target, cost optimization, CPU architecture (x86 vs Graviton). There is no traffic-multiplier knob in v1.
  • After Generate: No prompt. If
    phases.feedback
    is still
    "pending"
    , set it to
    "completed"
    and mark the migration complete.
Critical constraint: Follow each phase reference file's workflow exactly. If unable to complete a step, stop and report the specific issue. Do not fabricate or infer data.
解释器循环(
INTERPRETER.md
§ The interpreter loop)驱动阶段排序、门控和状态。本节仅定义Heroku特定的侧边栏编排:可选的
workshop
feedback
侧边栏的触发时机(位置属于编排内容,不属于阶段约定)。两者均为
_kind: sidebar
——偏离主流程,触发式进入,永远不会成为
current_phase
计划分享链接已禁用。分享落地页(
https://aws.amazon.com/startups/migrate/connect
)尚未上线(404)。任何侧边栏中均不得提供、生成或展示分享链接。分享链接规范保存在
references/phases/feedback/feedback-collect.md
第3步(本身已被门控),待页面上线后恢复;此处恢复分享提示即为取消门控的操作。
  • 发现阶段后:无提示。直接进入明确需求阶段。
  • 估算阶段后:首先根据
    estimate-assemble.md
    提供假设分析工作坊侧边栏选项(进入工作坊 / 继续前往生成阶段)。外部估算阶段保持
    current_phase: estimate
    ,直到工作坊处理完成(通过
    workshop-assemble.md
    进入并退出,或用户拒绝)。如果用户进入工作坊,遵循
    references/phases/workshop/workshop.md
    操作。然后,如果
    phases.feedback
    "pending"
    您是否愿意分享快速反馈?(5个可选问题 + 匿名使用数据——绝不包含资源名称、文件路径或账户ID)
    
    [A] 是,分享反馈
    [B] 不,谢谢,继续前往生成阶段
    • 如果用户选择A → 加载
      references/phases/feedback/feedback.md
      并执行。将
      phases.feedback
      设置为
      "completed"
      。继续前往生成阶段。
    • 如果用户选择B → 将
      phases.feedback
      设置为
      "completed"
      。继续前往生成阶段。
  • 工作坊恢复(必填):如果
    current_phase == "estimate"
    phases.estimate == "completed"
    phases.workshop
    "pending"
    "in_progress"
    不得重新计算估算。如果为
    "pending"
    ,重新展示估算阶段后的工作坊邀请(来自
    estimate-assemble.md
    )。如果为
    "in_progress"
    ,加载
    references/phases/workshop/workshop.md
    。生成阶段必须等待
    phases.workshop == "completed"
    (进入并退出或被拒绝)。
  • 热启动/显式假设分析:如果用户说“假设”、“重新定价”、“工作坊模式”或“对比场景”且估算工件已存在,直接加载
    references/phases/workshop/workshop.md
    (当已生成Terraform时,需遵守生成阶段的
    _re_entry_guard
    )。配置表选项:区域、高可用、计算目标、成本优化、CPU架构(x86 vs Graviton)。v1版本无流量乘数选项。
  • 生成阶段后:无提示。如果
    phases.feedback
    仍为
    "pending"
    ,将其设置为
    "completed"
    并标记迁移完成。
关键约束:严格遵循每个阶段参考文件的工作流程。如果无法完成某一步,停止操作并报告具体问题。不得编造或推断数据。