78 lines
1.8 KiB
PowerShell
78 lines
1.8 KiB
PowerShell
param(
|
|
[Parameter(Mandatory = $false)]
|
|
[string]$ArtifactDir = "workspace/artifacts/wireframe-gen"
|
|
)
|
|
|
|
$ErrorActionPreference = "Stop"
|
|
New-Item -ItemType Directory -Force -Path $ArtifactDir | Out-Null
|
|
|
|
function Write-IfMissing {
|
|
param(
|
|
[string]$Path,
|
|
[string]$Value
|
|
)
|
|
if (-not (Test-Path -LiteralPath $Path)) {
|
|
Set-Content -LiteralPath $Path -Value $Value -Encoding UTF8
|
|
}
|
|
}
|
|
|
|
Write-IfMissing (Join-Path $ArtifactDir "source_inventory.json") @'
|
|
{
|
|
"generated_at": "",
|
|
"input_path": "",
|
|
"output_dir": "",
|
|
"sources": []
|
|
}
|
|
'@
|
|
|
|
Write-IfMissing (Join-Path $ArtifactDir "normalized_project.json") @'
|
|
{
|
|
"project": {},
|
|
"audiences": [],
|
|
"goals": [],
|
|
"actors": [],
|
|
"functional_modules": [],
|
|
"entities": [],
|
|
"rules": [],
|
|
"constraints": [],
|
|
"risks": [],
|
|
"open_questions": [],
|
|
"source_trace": []
|
|
}
|
|
'@
|
|
|
|
Write-IfMissing (Join-Path $ArtifactDir "ux_spec.json") @'
|
|
{
|
|
"information_architecture": [],
|
|
"user_flows": [],
|
|
"screen_inventory": [],
|
|
"screen_purposes": [],
|
|
"ux_decisions": [],
|
|
"research_citations": [],
|
|
"acceptance_criteria": []
|
|
}
|
|
'@
|
|
|
|
Write-IfMissing (Join-Path $ArtifactDir "screen_blueprints.json") "[]"
|
|
|
|
Write-IfMissing (Join-Path $ArtifactDir "figma_build_manifest.json") @'
|
|
{
|
|
"file_key": "",
|
|
"page": "",
|
|
"screen_ids": [],
|
|
"created_node_ids": [],
|
|
"mutated_node_ids": [],
|
|
"annotation_node_ids": [],
|
|
"screenshots": [],
|
|
"validation_notes": [],
|
|
"known_issues": []
|
|
}
|
|
'@
|
|
|
|
Write-IfMissing (Join-Path $ArtifactDir "normalized_project.summary.md") "# Normalized Project Summary`n"
|
|
Write-IfMissing (Join-Path $ArtifactDir "ux_spec.summary.md") "# UX Spec Summary`n"
|
|
Write-IfMissing (Join-Path $ArtifactDir "figma_validation.md") "# Figma Validation`n"
|
|
Write-IfMissing (Join-Path $ArtifactDir "decision_log.md") "# Decision Log`n"
|
|
|
|
Write-Output "Initialized artifacts in $ArtifactDir"
|