Artifact write procedures for the prereq phase exit. Read at Step 4 of the readiness gate.
Write Artifacts
⛔ Write all 3 artifacts before exiting prereq. Downstream phases read these. ⛔ Use
createtool for ALL session files — NEVERpowershell. Terminal is OK ONLY for read-only ops: UUID generation, git info, file existence checks. ⛔ Path scoping: ALLcreatecalls target.copilot-azure/sessions/{uuid}/. After writing, read back to confirm correct path.
prereq-output.json— ⛔ Readprereq-schemas.tsforPrereqOutputinterface.⛔ Per-component verdicts MUST persist. Every entry in
components[]MUST include averdictsobject:{ "build", "completeness", "deployability" }with valuesPASS/WARN/FAIL(buildmay beSKIPPEDwhen build validation was skipped;completeness/deployabilityare neverSKIPPED). Downstream readiness scoring and the prepare phase read these — never omit them.⛔ Warnings MUST persist. Every ⚠️ WARN →
warnings[]:{ "id": "W-{ID}", "component", "axis", "summary", "detail", "fix", "fixPhase" }. BothfixandfixPhaseare required — validate before writing.⛔ Health endpoint: Write detected path to
healthEndpoint(e.g.,"/api/v1/health/"). If none →null+W-HEALTHwarning withfixPhase: "scaffold".⛔ Entry point: Write to
entryPoint(e.g.,"index.js").nullfor .NET/Go/Java (Oryx handles startup).⛔
postDeployRecommendations[]: For each ⚠️ WARN, write perPostDeployRecommendationschema fromsession-schemas.ts:{ "title", "reason", "effort": "low|medium|high", "services": [] }.context.json— ⛔ Useedit(notcreate— Step 1 already created it). Populatecomponents[],repo,detectedInfra[],detectedServices[],app.name(from primary component's project manifest or workspace root dir name). Append"prereq"tocompletedPhasesNOW (before presenting), setcurrentPhase: null, updatelastModifiedUtc.readiness-report.md— Summary table (Build/Completeness/Deployability verdicts), detected stack, all warnings with actionable detail. Clean markdown, no rigid template.
⛔ Phase exit gate: All 3 artifacts must exist. If any missing, write NOW.