Subchapter 8.23
references/validation-and-manifest.mdMarkdown5 KBView on GitHub
Do NOT auto-generate workflow files or create branches/PRs. Scaffold only writes IaC files. This step activates only when context.json.repo.remote is non-null AND user explicitly requests branch/PR creation. When repo.remote is absent or user declines, write IaC directly to working tree. If the user asks for CI/CD, or after deploy completes, suggest it as a follow-up: call mcp_azure_mcp_deploy → deploy_pipeline_guidance_get with is-azd-project: false, pipeline-platform: "github-actions", deploy-option: "provision-and-deploy" and present the guidance for the user to apply.
⛔ Validation MUST happen BEFORE the manifest is written. The manifest requires
validationResult— you cannot write it without completing validation first. Do NOT writescaffold-manifest.jsonuntil validation has run.
⛔ Do NOT call other skills during scaffold/deploy — see pipeline-rules.md (opens in a new tab).
Run these checks directly. All must pass.
11a. Bicep compilation:
az bicep build --file infra/main.bicep --stdout > $null(Bash: redirect to /dev/null instead of $null.) Pass: exit 0. Fail: fix errors and retry.
11b. Static RBAC review — review generated Bicep for correct role assignments per rbac-roles.md. Every managed identity ↔ resource pair must have a Microsoft.Authorization/roleAssignments resource with the correct role GUID.
11c. Write validationResult — after all checks pass, write:
{
"validationResult": {
"status": "Validated",
"checks": [
{ "name": "bicep build", "result": "PASS" },
{ "name": "RBAC review", "result": "PASS" }
]
}
}Terraform path: Replace 11a with terraform init -backend=false && terraform validate.
⛔ You MUST read scaffold-schemas.ts to get the exact ScaffoldManifest interface. Write to the session folder with ALL fields populated: files[], selfReview.findings[], AND validationResult (from Step 11). This is a single write — validation is already complete.
⛔ Phase exit gate:
scaffold-manifest.json.validationResultMUST NOT be null. If validation ran:{ status: 'Validated'/'Partial'/'Failed', details }(perValidationResultinscaffold-schemas.ts). Null = incomplete scaffold.
You MUST also update context.json per AppOnboardContext in session-schemas.ts (opens in a new tab): append "scaffold" to completedPhases, set currentPhase to "deploy", update lastModifiedUtc.
Present the user with: files generated, selfReview findings, validation results (pass/fail per check from Step 11), services + SKUs, secure-defaults applied. End with: “Ready to deploy? (Yes / Run manually / Edit plan / Cancel)” — do not continue until the user approves.
⛔ Self-check before presenting the deploy gate. Does
scaffold-manifest.jsoncontain avalidationResultfield withstatusset? If NO → you skipped Step 11. Go back and run validation. Do NOT present the deploy gate withvalidationResult: null.
⛔ Quota gate — MANDATORY. Read
prepare-plan.json.quotaValidation. Ifverified == false,method == "unverifiable", ormethodis not"cli"for quota-constrained services: readsku-quota-validation.md(opens in a new tab) § Deploy Gate Re-Validation and follow the procedure. ⛔ Do NOT useaz vm list-usage,az appservice list-locations, ormcp_azure_mcp_quotafor quota checks — see Anti-Patterns insku-quota-validation.md(opens in a new tab).
⛔ Azure service compatibility warnings. Read
prereq-output.json.warnings[]for any warnings withfixPhase: "deploy-gate". Surface EACH at the deploy gate: “⚠️ Azure compatibility: {warning.summary}. Fix: {warning.fix}. Approve? (Yes / Skip / Cancel)”. If the user skips, add topostDeployRecommendations[].
⛔ Phase exit — NOT complete until ALL done:
scaffold-manifest.jsonwritten withfiles[],selfReview.findings[], ANDvalidationResultcontext.json:"scaffold"appended tocompletedPhases,currentPhase→"deploy",lastModifiedUtcupdateddeploy-checklist.mdexists in session folder — written by the parallel checklist subagent at scaffold Step 5b (before IaC gen completes). Verify it exists. If missing (subagent failed), write it now fromdeploy-checklist-template.md(opens in a new tab) — fill in real values fromprepare-plan.json, delete unrelated compute sections.