docs/operations/review-guide.md 의 6단계를 3레인(읽기·근거 확인 / 판정 / 기준 DB 에 남는 것) workflow 로: 한 줄 요약 → 점수 구성 → 증거 열기 → 근거 표시 → 판정 → 다음 미심사. 분기는 미수행 하한(보류 후 재분석)과 판정 뒤 DB(주의 후보 자동 · 클리어 기준 등록 수동). 첫 안은 4레인·3항목 카드로 1440x900 에서 127px 넘쳐 레인 병합·제목 한 줄·카드 2항목으로 압축했고, 노드 폭 148 로 높이 예산(종횡비 1.52)을 맞췄다. validate 9/9 showcase, visual-check 4개 뷰포트 containment pass, manifest 5종 갱신. rebuild 스크립트·manifest 갱신기 목록에 등록, PROJECT_MAP 표 추가. 문서·다이어그램만 변경. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BStHFrjQj2VypecSG9ex1V
99 lines
3.7 KiB
PowerShell
99 lines
3.7 KiB
PowerShell
<#
|
|
.SYNOPSIS
|
|
docs/diagrams 의 다이어그램 4종을 spec JSON 에서 다시 생성한다.
|
|
|
|
.DESCRIPTION
|
|
PROJECT_MAP 에 적혀 있던 "archify validate -> deliver -> visual-check" 절차는
|
|
그대로는 실행되지 않았다 - archify 라는 실행 파일이 PATH 에 없고, 실제로는
|
|
저장소 밖 사용자 전역 스킬을 node 로 불러야 한다. 이 스크립트가 그 절차다.
|
|
|
|
순서:
|
|
1. validate (--quality showcase) 합성/기하 검증
|
|
2. deliver 산출물 HTML 을 원자적으로 교체
|
|
3. visual-check 실제 브라우저 증거 (Chrome 필요)
|
|
4. manifest 갱신 tests/test_diagram_sync.py 의 수신증
|
|
|
|
산출물은 바이트 결정적이다. 그래서 4번의 수신증만으로 드리프트를 잡을 수 있고,
|
|
테스트는 브라우저도 Node 도 없이 돈다.
|
|
|
|
.PARAMETER SkipVisualCheck
|
|
3단계를 건너뛴다. Chrome 이 없는 빌드 호스트용. 건너뛰면 그 사실을 출력한다
|
|
(조용한 통과 금지).
|
|
|
|
.PARAMETER ArchifyHome
|
|
archify 스킬 경로. 기본값은 $env:ARCHIFY_HOME, 없으면 ~/.claude/skills/archify.
|
|
|
|
.EXAMPLE
|
|
.\scripts
|
|
ebuild-diagrams.ps1
|
|
.EXAMPLE
|
|
.\scripts
|
|
ebuild-diagrams.ps1 -SkipVisualCheck
|
|
#>
|
|
[CmdletBinding()]
|
|
param(
|
|
[switch]$SkipVisualCheck,
|
|
[string]$ArchifyHome
|
|
)
|
|
|
|
$ErrorActionPreference = 'Stop'
|
|
$repoRoot = Split-Path -Parent $PSScriptRoot
|
|
Set-Location -LiteralPath $repoRoot
|
|
|
|
if (-not $ArchifyHome) {
|
|
if ($env:ARCHIFY_HOME) { $ArchifyHome = $env:ARCHIFY_HOME }
|
|
else { $ArchifyHome = Join-Path $HOME '.claude/skills/archify' }
|
|
}
|
|
$cli = Join-Path $ArchifyHome 'bin/archify.mjs'
|
|
if (-not (Test-Path -LiteralPath $cli)) {
|
|
Write-Host "archify CLI not found: $cli" -ForegroundColor Red
|
|
Write-Host 'Set -ArchifyHome or $env:ARCHIFY_HOME to the archify skill directory.' -ForegroundColor Red
|
|
exit 1
|
|
}
|
|
|
|
# (type, basename) - tests/test_diagram_sync.py 및 update_diagram_manifest.py 와 같은 목록
|
|
$diagrams = @(
|
|
@{ Type = 'architecture'; Base = 'system-architecture' },
|
|
@{ Type = 'dataflow'; Base = 'evidence-dataflow' },
|
|
@{ Type = 'workflow'; Base = 'operator-review-workflow' },
|
|
@{ Type = 'workflow'; Base = 'review-guide' },
|
|
@{ Type = 'lifecycle'; Base = 'submission-lifecycle' }
|
|
)
|
|
|
|
$failures = @()
|
|
$skipped = @()
|
|
|
|
foreach ($d in $diagrams) {
|
|
$spec = Join-Path $repoRoot ("docs/diagrams/{0}.{1}.json" -f $d.Base, $d.Type)
|
|
$html = Join-Path $repoRoot ("docs/diagrams/{0}.html" -f $d.Base)
|
|
|
|
Write-Host "`n=== $($d.Base) ($($d.Type)) ===" -ForegroundColor Cyan
|
|
|
|
& node $cli validate $d.Type $spec --quality showcase
|
|
if ($LASTEXITCODE -ne 0) { $failures += "validate:$($d.Base)"; continue }
|
|
|
|
& node $cli deliver $d.Type $spec $html --quality showcase
|
|
if ($LASTEXITCODE -ne 0) { $failures += "deliver:$($d.Base)"; continue }
|
|
|
|
if ($SkipVisualCheck) { $skipped += $d.Base; continue }
|
|
|
|
& node $cli visual-check $html
|
|
# exit 2 = skipped (Chrome/Chromium 부재). 실패와 구분해 기록한다.
|
|
if ($LASTEXITCODE -eq 2) { $skipped += $d.Base }
|
|
elseif ($LASTEXITCODE -ne 0) { $failures += "visual-check:$($d.Base)" }
|
|
}
|
|
|
|
Write-Host "`n=== manifest ===" -ForegroundColor Cyan
|
|
& python (Join-Path $PSScriptRoot 'update_diagram_manifest.py')
|
|
if ($LASTEXITCODE -ne 0) { $failures += 'manifest' }
|
|
|
|
Write-Host ''
|
|
if ($skipped.Count -gt 0) {
|
|
Write-Host "VISUAL-CHECK SKIPPED (no browser evidence): $($skipped -join ', ')" -ForegroundColor Yellow
|
|
}
|
|
if ($failures.Count -gt 0) {
|
|
Write-Host "REBUILD FAILED: $($failures -join ', ')" -ForegroundColor Red
|
|
exit 1
|
|
}
|
|
Write-Host 'REBUILD OK - run verify.ps1 to confirm the diagram gate' -ForegroundColor Green
|
|
exit 0
|