Subchapter 28.4
references/phases/design/design-assemble.mdMarkdown5 KBView on GitHub
Assembler unit. Runs after the mapping fragments (
design-mapping.md, anddesign-eks.mdwhen EKS is selected) have populated the in-memory design object. It writes the final , runs the output route gates + completion handoff gate, and updates . It owns the artifact-level contract for this phase (its postconditions ARE the handoff gate).
aws-design.json.phase-status.jsonWrite the completed design object to $MIGRATION_DIR/aws-design.json. The written
artifact’s structure (valid JSON; services[] or deferred[] non-empty;
vpc_design present; per-entry required fields) is validated by the Completion
Handoff Gate below (this phase’s _postconditions, re-read from disk).
Route output gates (fail closed):
services[] MUST contain at least one Elastic Beanstalk, Fargate, or EKS entry (unless all dyno types were unrecognized or all formations were release processes).heroku-postgresql add-ons with recognized plans → services[] MUST contain RDS or Aurora entries.heroku-redis add-ons with recognized plans → services[] MUST contain ElastiCache entries.heroku-kafka add-ons with recognized plans → services[] MUST contain MSK entries.warnings[] MUST contain pipeline detect-only warnings.The completion checks are declared in this phase’s _postconditions frontmatter and
enforced per INTERPRETER.md § Gate protocol: re-read aws-design.json from disk, run
the mechanical checks (_check_file_exists / _validate_json) and the _assert
judgment checks (phase/timestamp/services shape, per-entry required fields, vpc_design
mode, total_services match, no Fir-specific Terraform), plus the route output gates from
Step 7, then emit GATE_FAIL (STOP; do not patch artifacts) or
HANDOFF_OK | phase=design | artifacts=aws-design.json and advance.
Inner workshop reprice: When Design is invoked from
workshop-refresh.md, stop after writingaws-design.json(and soft validation). Skip this Step 8 and do not emitHANDOFF_OK— seeworkshop-refresh.md§ Inner runs.
Only after HANDOFF_OK, apply the phase-status update protocol (INTERPRETER.md § The interpreter loop) — mark phases.design completed and advance per _advances_to — in the same turn as the output message below.
Output to user — build message from design contents:
Format: “Phase 3 of 6 complete (Design). [artifact summaries] Remaining: Estimate → Generate (+ optional Feedback). Next required step: Phase 4 — Estimate. Load references/phases/estimate/estimate.md now.”
This phase’s artifacts are declared in _produces (aws-design.json; .phase-status.json is updated per Step 8) and its scope boundary (files it must NOT create) in _forbids_files. All user communication is via output messages only (no report/summary files).
Non-fatal mapping errors and their handling (fatal predecessor/input/gate failures are handled by _preconditions/_postconditions + INTERPRETER.md § _on_error):
| Error Category | Behavior |
|---|---|
| Unrecognized dyno type | Reject formation, add warning, continue |
| Empty Procfile (no process types) | Reject app formations, add warning, continue |
| Unrecognized Postgres/Redis/Kafka plan | Defer to specialist gate, add warning, continue |
| Unrecognized availability preference | Default to multi-az + RDS + warning, continue |
| Add-on not in Fast-Path Table | Specialist gate (deferred), continue |
| Partial match on Fast-Path Table | Specialist gate (NOT a match), continue |
A no-services-and-no-deferred outcome is an unrecoverable error and a failing handoff gate halts per the gate protocol (INTERPRETER.md § _on_error); do not patch artifacts to force a pass.