Skip to content

foryourhealth111-pixel/Vibe-Skills

Vibe Code Orchestrator (VCO) is a governed runtime entry that freezes requirements, bounds execution, and enforces verification and phase cleanup.

FileKindSize
SKILL.mdskill md17.2 KB
agents/templates/debugger.mdmarkdown323 B
agents/templates/planner.mdmarkdown313 B
agents/templates/reviewer.mdmarkdown331 B
agents/templates/security-reviewer.mdmarkdown341 B
references/change-proof-matrix.mdmarkdown2.6 KB
references/contributor-zone-decision-table.mdmarkdown2.2 KB
references/developer-entry-contract.mdmarkdown2.7 KB
references/fixtures/external-corpus/external-corpus-gate.jsonconfig8.6 KB
references/fixtures/external-corpus/prompt-signals.jsonconfig412.4 KB
references/fixtures/external-corpus/skill-keyword-index.backup.jsonconfig30.6 KB
references/fixtures/external-corpus/skill-keyword-index.candidate.jsonconfig26.5 KB
references/fixtures/external-corpus/vco-suggestions.jsonconfig16.6 KB
references/fixtures/migration-map.jsonconfig7.8 KB
references/fixtures/retro-compare/safety-gate/baseline-cer.jsonconfig294 B
references/fixtures/retro-compare/safety-gate/current-cer.jsonconfig1.1 KB
references/fixtures/retro-compare/safety-gate/delta.jsonconfig1.0 KB
references/fixtures/retro-compare/sample-run/baseline-cer.jsonconfig324 B
references/fixtures/retro-compare/sample-run/current-cer.jsonconfig1.2 KB
references/fixtures/retro-compare/sample-run/delta.jsonconfig1.0 KB
references/fixtures/retro-compare/smoke/baseline-smoke.jsonconfig266 B
references/fixtures/retro-compare/smoke/current-smoke.jsonconfig1.0 KB
references/fixtures/retro-compare/smoke/delta-smoke.jsonconfig1.0 KB
references/fixtures/runtime/vibe-sessions/20260413T131910Z-pr153-rabbit-review-fix/cleanup-receipt.jsonconfig1.3 KB
references/fixtures/runtime/vibe-sessions/20260413T131910Z-pr153-rabbit-review-fix/governance-capsule.jsonconfig408 B
references/fixtures/runtime/vibe-sessions/20260413T131910Z-pr153-rabbit-review-fix/intent-contract.jsonconfig2.2 KB
references/fixtures/runtime/vibe-sessions/20260413T131910Z-pr153-rabbit-review-fix/phase-plan-execute.jsonconfig2.4 KB
references/fixtures/runtime/vibe-sessions/20260413T131910Z-pr153-rabbit-review-fix/skeleton-receipt.jsonconfig722 B
references/fixtures/runtime/vibe-sessions/20260413T131910Z-pr153-rabbit-review-fix/stage-lineage.jsonconfig1.3 KB
references/fixtures/skills-audit/bio-science-problem/bio-science-problem-map.csvother9.2 KB
references/fixtures/skills-audit/bio-science-problem/bio-science-problem-map.jsonconfig18.1 KB
references/fixtures/verify/routing-stability/vibe-routing-stability-gate.jsonconfig24.4 KB
references/index.mdmarkdown1.3 KB
references/proof-bundles/claude-code-managed-closure-candidate/linux-managed-run-01-local-host/installed-runtime-outputs/runtime-freshness-receipt.jsonconfig262 B
references/proof-bundles/claude-code-managed-closure-candidate/manifest.jsonconfig2.6 KB
references/proof-bundles/linux-full-authoritative-candidate/linux-pwsh-run-01-wsl/installed-runtime-outputs/runtime-freshness-receipt.jsonconfig298 B
references/proof-bundles/linux-full-authoritative-candidate/linux-pwsh-run-02-docker/installed-runtime-outputs/runtime-freshness-receipt.jsonconfig298 B
references/proof-bundles/linux-full-authoritative-candidate/manifest.jsonconfig3.3 KB
references/proof-bundles/openclaw-runtime-core-preview-candidate/manifest.jsonconfig1.9 KB
references/release-ledger.jsonlother5.1 KB
scripts/README.mdmarkdown1.7 KB
scripts/bootstrap/one-shot-setup.ps1script797 B
scripts/bootstrap/one-shot-setup.shscript482 B
scripts/bootstrap/scaffold-claude-preview.ps1script875 B
scripts/bootstrap/scaffold-claude-preview.shexecutablescript866 B
scripts/bootstrap/sync-local-compat.ps1script2.6 KB
scripts/common/AntiProxyGoalDrift.ps1script15.1 KB
scripts/common/NodeLaunchWrapper.ps1script13.1 KB
scripts/common/ProcessLedger.ps1script27.1 KB
scripts/common/ProtectedDocumentCleanup.ps1script6.9 KB
scripts/common/README.mdmarkdown1.9 KB
scripts/common/Resolve-VgoAdapter.ps1script4.3 KB
scripts/common/adapter_registry_query.pyexecutablescript3.8 KB
scripts/common/python_helpers.shscript2.8 KB
scripts/common/resolve_vgo_adapter.pyexecutablescript2.4 KB
scripts/common/runtime_contracts.pyscript3.7 KB
scripts/common/vibe-governance-helpers.ps1script75.6 KB
scripts/common/vibe-wave-gate-runner.ps1script28.3 KB
scripts/governance/Invoke-NodeProcessAudit.ps1script3.6 KB
scripts/governance/Invoke-NodeZombieCleanup.ps1script3.7 KB
scripts/governance/README.mdmarkdown5.1 KB
scripts/governance/audit-upstream.ps1script22.7 KB
scripts/governance/export-repo-cleanliness-inventory.ps1script8.6 KB
scripts/governance/install-local-worktree-excludes.ps1script2.0 KB
scripts/governance/invoke-mem0-policy.ps1script1.0 KB
scripts/governance/invoke-openspec-governance.ps1script8.6 KB
scripts/governance/new-origin-record.ps1script3.3 KB
scripts/governance/phase-end-cleanup.ps1script10.7 KB
scripts/governance/publish-absorption-soft-rollout.ps1script3.2 KB
scripts/governance/publish-openspec-soft-rollout.ps1script9.3 KB
scripts/governance/release-cut.ps1script25.1 KB
scripts/governance/set-gsd-overlay-rollout.ps1script3.9 KB
scripts/governance/set-openspec-rollout.ps1script3.1 KB
scripts/governance/sync-bundled-vibe.ps1script20.3 KB
scripts/install/Install-VgoAdapter.ps1script2.0 KB
scripts/install/install_vgo_adapter.pyexecutablescript524 B
scripts/overlay/README.mdmarkdown885 B
scripts/overlay/suggest-browserops-provider.ps1script9.3 KB
scripts/overlay/suggest-overlays.ps1script17.3 KB
scripts/release/build_release_bundle.pyscript6.5 KB
scripts/research/README.mdmarkdown1.1 KB
scripts/research/build-eval-slicing-catalog.ps1script2.6 KB
scripts/research/build-watch-portfolio-review.ps1script3.5 KB
scripts/research/build-xl-operator-checklist.ps1script2.3 KB
scripts/research/extract-prompt-signals.ps1script6.7 KB
scripts/research/generate-vco-suggestions.ps1script9.7 KB
scripts/research/sync-mcp-catalog.ps1script3.5 KB
scripts/research/vibe-adaptive-train.ps1script10.1 KB
scripts/router/README.mdmarkdown1.8 KB
scripts/router/invoke-pack-route.pyscript428 B
scripts/router/modules/00-core-utils.ps1script14.6 KB
scripts/router/modules/01-openai-responses.ps1script17.9 KB
scripts/router/modules/10-observability.ps1script11.7 KB
scripts/router/modules/11-route-probe.ps1script20.7 KB
scripts/router/modules/12-heartbeat.ps1script19.9 KB
scripts/router/modules/19-custom-admission.ps1script16.3 KB
scripts/router/modules/20-routing-rules.ps1script1.7 KB
scripts/router/modules/21-capability-interview.ps1script11.8 KB
scripts/router/modules/22-intent-contract.ps1script18.2 KB
scripts/router/modules/30-openspec.ps1script8.3 KB
scripts/router/modules/31-gsd-overlay.ps1script5.5 KB
scripts/router/modules/32-prompt-overlay.ps1script8.0 KB
scripts/router/modules/33-memory-governance.ps1script5.5 KB
scripts/router/modules/34-data-scale-overlay.ps1script25.8 KB
scripts/router/modules/35-quality-debt-overlay.ps1script13.4 KB
scripts/router/modules/36-framework-interop-overlay.ps1script16.9 KB
scripts/router/modules/37-ml-lifecycle-overlay.ps1script22.4 KB
scripts/router/modules/38-python-clean-code-overlay.ps1script16.2 KB
scripts/router/modules/39-system-design-overlay.ps1script15.5 KB
scripts/router/modules/40-cuda-kernel-overlay.ps1script17.7 KB
scripts/router/modules/42-ai-rerank-overlay.ps1script14.0 KB
scripts/router/modules/43-retrieval-overlay.ps1script22.4 KB
scripts/router/modules/44-dialectic-team-gate.ps1script7.5 KB
scripts/router/modules/44-exploration-overlay.ps1script17.7 KB
scripts/router/modules/45-daily-dialectic-guard.ps1script6.6 KB
scripts/router/modules/47-closure-overlay.ps1script9.2 KB
scripts/router/modules/48-llm-acceleration-overlay.ps1script104.6 KB
scripts/router/modules/49-prompt-asset-boost.ps1script28.3 KB
scripts/router/resolve-pack-route.ps1script4.1 KB
scripts/router/runtime_neutral/custom_admission.pyscript349 B
scripts/router/runtime_neutral/router_contract.pyscript356 B
scripts/ruc-nlpir/preflight.ps1script5.3 KB
scripts/runtime/Freeze-RuntimeInputPacket.ps1script33.0 KB
scripts/runtime/Invoke-AntiProxyGoalDriftCompaction.ps1script551 B
scripts/runtime/Invoke-DeepInterview.ps1script1.1 KB
scripts/runtime/Invoke-PhaseCleanup.ps1script11.1 KB
scripts/runtime/Invoke-PlanExecute.ps1script13.7 KB
scripts/runtime/Invoke-SkeletonCheck.ps1script3.1 KB
scripts/runtime/Invoke-VibeCanonicalEntry.ps1script12.9 KB
scripts/runtime/VibeMemoryActivation.Common.ps1script41.3 KB
scripts/runtime/VibeMemoryBackends.Common.ps1script12.4 KB
scripts/runtime/VibeRuntime.Common.ps1script298.6 KB
scripts/runtime/VibeSkillRouting.Common.ps1script19.0 KB
scripts/runtime/VibeWorkspaceMemory.Common.ps1script6.9 KB
scripts/runtime/Write-RequirementDoc.ps1script23.7 KB
scripts/runtime/Write-XlPlan.ps1script32.3 KB
scripts/runtime/invoke-vibe-runtime.ps1script69.7 KB
scripts/runtime/memory_backend_driver.pyscript14.2 KB
scripts/runtime/skill_authority_driver.pyscript375 B
scripts/runtime/workspace_memory_driver.pyscript24.8 KB
scripts/setup/check-kvm-host-readiness.shscript3.4 KB
scripts/setup/check-windows-eval-iso-readiness.shexecutablescript2.2 KB
scripts/setup/check-windows-proof-vm-state.shexecutablescript2.0 KB
scripts/setup/export-codex-settings-sanitized.ps1script2.6 KB
scripts/setup/fetch-windows11-eval-iso.shexecutablescript4.1 KB
scripts/setup/install-local-vm-host.shexecutablescript1.6 KB
scripts/setup/persist-codex-openai-env.ps1script2.4 KB
scripts/setup/run-windows-proof-vm.shexecutablescript11.4 KB
scripts/setup/send-qmp-boot-keys.pyexecutablescript3.0 KB
scripts/setup/send-qmp-text.pyexecutablescript3.0 KB
scripts/setup/show-windows-proof-media-options.shexecutablescript1.6 KB
scripts/setup/stop-windows-proof-vm.shexecutablescript1.6 KB
scripts/setup/sync-codex-settings-to-user-env.ps1script2.6 KB
scripts/uninstall/Uninstall-VgoAdapter.ps1script1.4 KB
scripts/uninstall/uninstall_vgo_adapter.pyscript526 B
scripts/verify/README.mdmarkdown3.8 KB
scripts/verify/cer-compare.ps1script8.5 KB
scripts/verify/fixtures/README.mdmarkdown1.1 KB
scripts/verify/fixtures/document-cleanup-safety/README.mdmarkdown527 B
scripts/verify/fixtures/document-cleanup-safety/ambiguous-cn-set/metadata.jsonconfig101 B
scripts/verify/fixtures/document-cleanup-safety/ambiguous-cn-set/source/.tmp/docs/重庆市永川区技术预见与制度创新项目申报书1-修订版.docxbinary56 B
scripts/verify/fixtures/document-cleanup-safety/ambiguous-cn-set/source/.tmp/docs/重庆市永川区技术预见与制度创新项目申报书1-补充材料.pdfbinary56 B
scripts/verify/fixtures/document-cleanup-safety/ambiguous-cn-set/source/docs/重庆市永川区技术预见与制度创新项目申报书1-正式版.docxbinary36 B
scripts/verify/fixtures/document-cleanup-safety/mixed-office-assets/metadata.jsonconfig101 B
scripts/verify/fixtures/document-cleanup-safety/mixed-office-assets/source/.tmp/staging/budget-review.xlsxbinary59 B
scripts/verify/fixtures/document-cleanup-safety/mixed-office-assets/source/.tmp/staging/quarterly-review-deck.pptxbinary60 B
scripts/verify/fixtures/document-cleanup-safety/mixed-office-assets/source/docs/reference-manual.pdfbinary21 B
scripts/verify/fixtures/document-cleanup-safety/non-protected-control/metadata.jsonconfig101 B
scripts/verify/fixtures/document-cleanup-safety/non-protected-control/source/.tmp/control.txtmarkdown54 B
scripts/verify/fixtures/llm-acceleration.mock.jsonconfig1.0 KB
scripts/verify/fixtures/pilot-browserops.jsonconfig541 B
scripts/verify/fixtures/pilot-deep-extraction.jsonconfig731 B
scripts/verify/fixtures/pilot-desktopops.jsonconfig587 B
scripts/verify/fixtures/pilot-memory.jsonconfig575 B
scripts/verify/fixtures/pilot-prompt.jsonconfig525 B
scripts/verify/fixtures/process-health/external-node-protected-fixture.jsonconfig345 B
scripts/verify/fixtures/process-health/healthy-managed-fixture.jsonconfig1.1 KB
scripts/verify/fixtures/process-health/managed-completed-alive-fixture.jsonconfig1.2 KB
scripts/verify/fixtures/process-health/managed-stale-fixture.jsonconfig1.1 KB
scripts/verify/fixtures/process-health/no-node-processes-fixture.jsonconfig131 B
scripts/verify/fixtures/prompt-asset-boost.mock.jsonconfig1.2 KB
scripts/verify/gate-family-index.mdmarkdown2.5 KB
scripts/verify/lib/VibeOfflineSkillsAudit.Suites.ps1script11.8 KB
scripts/verify/lib/VibeOfflineSkillsAudit.ps1script12.2 KB
scripts/verify/lib/VibeRouteAudit.Suites.ps1script7.9 KB
scripts/verify/lib/VibeRouteAudit.ps1script5.2 KB
scripts/verify/live-document-gate.pyscript7.6 KB
scripts/verify/probe-scientific-packs.ps1script55.1 KB
scripts/verify/publish-proof.pyscript409 B
scripts/verify/runtime_neutral/README.mdmarkdown2.5 KB
scripts/verify/runtime_neutral/_bootstrap.pyscript321 B
scripts/verify/runtime_neutral/bio_science_pack_consolidation_audit.pyscript421 B
scripts/verify/runtime_neutral/bootstrap_doctor.pyscript494 B
scripts/verify/runtime_neutral/code_quality_pack_consolidation_audit.pyscript717 B
scripts/verify/runtime_neutral/coherence_gate.pyscript529 B
scripts/verify/runtime_neutral/freshness_gate.pyscript494 B
scripts/verify/runtime_neutral/global_pack_consolidation_audit.pyscript635 B
scripts/verify/runtime_neutral/ml_skills_pruning_audit.pyscript574 B
scripts/verify/runtime_neutral/opencode_preview_smoke.pyscript674 B
scripts/verify/runtime_neutral/release_notes_quality.pyscript701 B

scripts/common/vibe-wave-gate-runner.ps1

View on GitHub
param(
    [Parameter(Mandatory)] [int]$Wave,
    [switch]$WriteArtifacts,
    [string]$OutputDirectory = ''
)

$ErrorActionPreference = 'Stop'
. (Join-Path $PSScriptRoot 'vibe-governance-helpers.ps1')

function Add-Assertion {
    param(
        [System.Collections.Generic.List[object]]$Assertions,
        [bool]$Pass,
        [string]$Message,
        [object]$Details = $null
    )

    $Assertions.Add([pscustomobject]@{
        pass = [bool]$Pass
        message = $Message
        details = $Details
    }) | Out-Null

    $color = if ($Pass) { 'Green' } else { 'Red' }
    $status = if ($Pass) { 'PASS' } else { 'FAIL' }
    Write-Host ('[{0}] {1}' -f $status, $Message) -ForegroundColor $color
}

function Get-WaveManifestEntry {
    param(
        [Parameter(Mandatory)] [string]$RepoRoot,
        [Parameter(Mandatory)] [int]$Wave
    )

    $configRoot = Join-Path $RepoRoot 'config'
    $manifestPaths = @(
        Get-ChildItem -LiteralPath $configRoot -Filter 'wave*-gate-manifest.json' -File -ErrorAction SilentlyContinue |
            Sort-Object Name |
            ForEach-Object { $_.FullName }
    )
    if ($manifestPaths.Count -eq 0) {
        throw "no wave gate manifests found under: $configRoot"
    }

    $matches = @()
    foreach ($manifestPath in $manifestPaths) {
        $manifest = Get-Content -LiteralPath $manifestPath -Raw -Encoding UTF8 | ConvertFrom-Json
        $matchedEntries = @($manifest.waves | Where-Object { [int]$_.wave -eq $Wave } | Select-Object -First 1)
        if ($matchedEntries.Count -gt 0) {
            $entry = $matchedEntries[0]
            $matches += [pscustomobject]@{
                manifest_path = $manifestPath
                entry = $entry
            }
        }
    }

    if ($matches.Count -eq 0) {
        throw "wave not found in any manifest: $Wave"
    }
    if ($matches.Count -gt 1) {
        $paths = @($matches | ForEach-Object { $_.manifest_path }) -join ', '
        throw "wave found in multiple manifests: $Wave -> $paths"
    }

    $selected = $matches[0]
    if (-not ($selected.entry.PSObject.Properties.Name -contains 'manifest_path')) {
        $selected.entry | Add-Member -NotePropertyName manifest_path -NotePropertyValue $selected.manifest_path
    }
    return $selected.entry
}

function Test-FileContainsKeywords {
    param(
        [Parameter(Mandatory)] [string]$Path,
        [Parameter(Mandatory)] [object[]]$Keywords,
        [Parameter(Mandatory)] [System.Collections.Generic.List[object]]$Assertions
    )

    if (-not (Test-Path -LiteralPath $Path)) {
        foreach ($keyword in $Keywords) {
            Add-Assertion -Assertions $Assertions -Pass $false -Message ('missing file for keyword check: ' + $keyword) -Details $Path
        }
        return
    }

    $raw = Get-Content -LiteralPath $Path -Raw -Encoding UTF8
    $normalizedRaw = (($raw.ToLowerInvariant() -replace '[_-]+', ' ') -replace '\s+', ' ').Trim()
    foreach ($keyword in $Keywords) {
        $keywordText = [string]$keyword
        $normalizedKeyword = (($keywordText.ToLowerInvariant() -replace '[_-]+', ' ') -replace '\s+', ' ').Trim()
        $pass = $raw.Contains($keywordText) -or $normalizedRaw.Contains($normalizedKeyword)
        Add-Assertion -Assertions $Assertions -Pass $pass -Message ('keyword present: {0} -> {1}' -f $keyword, (Get-VgoRelativePathPortable -BasePath $RepoRoot -TargetPath $Path)) -Details $keyword
    }
}

function Get-LatestReleaseLedgerEntry {
    param([string]$RepoRoot)
    $ledgerPath = Join-Path $RepoRoot 'references\release-ledger.jsonl'
    if (-not (Test-Path -LiteralPath $ledgerPath)) {
        return $null
    }
    $lines = @(Get-Content -LiteralPath $ledgerPath -Encoding UTF8 | Where-Object { -not [string]::IsNullOrWhiteSpace($_) })
    if ($lines.Count -eq 0) {
        return $null
    }
    return ($lines[-1] | ConvertFrom-Json)
}

function Get-ShortGitHead {
    param([string]$RepoRoot)
    try {
        return ((git -C $RepoRoot rev-parse --short HEAD) | Select-Object -First 1).Trim()
    } catch {
        return $null
    }
}

function Get-OpsCockpitGapMatrixRows {
    param([string]$RepoRoot)

    $gapMatrixPath = Join-Path $RepoRoot 'references\ops-cockpit-gap-matrix.md'
    if (-not (Test-Path -LiteralPath $gapMatrixPath)) {
        return @()
    }

    $rows = @()
    foreach ($line in Get-Content -LiteralPath $gapMatrixPath -Encoding UTF8) {
        $trimmed = [string]$line
        if (-not $trimmed.Trim().StartsWith('|')) {
            continue
        }

        $cells = @($trimmed.Trim().Trim('|').Split('|') | ForEach-Object { $_.Trim() })
        if ($cells.Count -lt 5) {
            continue
        }

        if ($cells[0] -eq 'plane_id' -or $cells[0] -eq '---') {
            continue
        }

        $rows += [pscustomobject]@{
            plane_id = $cells[0].Trim('`')
            panel = $cells[1].Trim('`')
            blocker = $cells[2]
            evidence_ref = $cells[3].Trim('`')
            next_action = $cells[4]
        }
    }

    return @($rows)
}

function New-OpsCockpitPanelArtifact {
    param(
        [Parameter(Mandatory)] [string]$PanelId,
        [Parameter(Mandatory)] [object[]]$PlaneRows,
        [Parameter(Mandatory)] [object[]]$GapRows,
        [string]$BoardMode,
        [object]$ReleaseEntry,
        [string]$GitHead,
        [int]$VerifyArtifactCount,
        [string]$ObservabilityMode
    )

    $panelGapRows = @($GapRows | Where-Object { $_.panel -eq $PanelId })
    $planeCount = $PlaneRows.Count
    $scorecardReady = @($PlaneRows | Where-Object {
        $_.PSObject.Properties.Name -contains 'evidence' -and $_.evidence -and
        $_.evidence.PSObject.Properties.Name -contains 'scorecard_ready' -and $_.evidence.scorecard_ready -eq $true
    }).Count
    $replayReady = @($PlaneRows | Where-Object {
        $_.PSObject.Properties.Name -contains 'evidence' -and $_.evidence -and
        $_.evidence.PSObject.Properties.Name -contains 'replay_ready' -and $_.evidence.replay_ready -eq $true
    }).Count
    $rollbackReady = @($PlaneRows | Where-Object {
        $_.PSObject.Properties.Name -contains 'evidence' -and $_.evidence -and
        $_.evidence.PSObject.Properties.Name -contains 'rollback_ready' -and $_.evidence.rollback_ready -eq $true
    }).Count
    $releaseReady = @($PlaneRows | Where-Object {
        $_.PSObject.Properties.Name -contains 'evidence' -and $_.evidence -and
        $_.evidence.PSObject.Properties.Name -contains 'release_train_ready' -and $_.evidence.release_train_ready -eq $true
    }).Count

    $scorecardMissing = @($PlaneRows | Where-Object {
        -not ($_.PSObject.Properties.Name -contains 'evidence') -or
        -not $_.evidence -or
        -not ($_.evidence.PSObject.Properties.Name -contains 'scorecard_ready') -or
        $_.evidence.scorecard_ready -ne $true -or
        -not ($_.evidence.PSObject.Properties.Name -contains 'ops_cockpit_ready') -or
        $_.evidence.ops_cockpit_ready -ne $true
    })
    $replayMissing = @($PlaneRows | Where-Object {
        -not ($_.PSObject.Properties.Name -contains 'evidence') -or
        -not $_.evidence -or
        -not ($_.evidence.PSObject.Properties.Name -contains 'replay_ready') -or
        $_.evidence.replay_ready -ne $true
    })
    $rollbackMissing = @($PlaneRows | Where-Object {
        -not ($_.PSObject.Properties.Name -contains 'evidence') -or
        -not $_.evidence -or
        -not ($_.evidence.PSObject.Properties.Name -contains 'rollback_ready') -or
        $_.evidence.rollback_ready -ne $true
    })
    $releaseMissing = @($PlaneRows | Where-Object {
        -not ($_.PSObject.Properties.Name -contains 'evidence') -or
        -not $_.evidence -or
        -not ($_.evidence.PSObject.Properties.Name -contains 'release_train_ready') -or
        $_.evidence.release_train_ready -ne $true
    })

    $blockers = [System.Collections.Generic.List[string]]::new()
    $evidenceRefs = [System.Collections.Generic.List[string]]::new()
    $nextActions = [System.Collections.Generic.List[string]]::new()
    foreach ($row in $panelGapRows) {
        if (-not [string]::IsNullOrWhiteSpace([string]$row.blocker)) { $blockers.Add([string]$row.blocker) | Out-Null }
        if (-not [string]::IsNullOrWhiteSpace([string]$row.evidence_ref)) { $evidenceRefs.Add([string]$row.evidence_ref) | Out-Null }
        if (-not [string]::IsNullOrWhiteSpace([string]$row.next_action)) { $nextActions.Add([string]$row.next_action) | Out-Null }
    }

    switch ($PanelId) {
        'freshness' {
            if ($null -eq $ReleaseEntry) {
                $blockers.Add('release ledger entry missing for runtime freshness comparison') | Out-Null
            }
            $conclusion = if ($blockers.Count -gt 0) {
                'Freshness evidence still has open blockers and requires operator review before widening runtime changes.'
            } else {
                'Freshness evidence is present with no recorded cockpit blockers.'
            }
            $metrics = [ordered]@{
                git_head = $GitHead
                release_ledger_present = ($null -ne $ReleaseEntry)
                verify_artifact_count = $VerifyArtifactCount
                observability_mode = $ObservabilityMode
            }
            if ($evidenceRefs.Count -eq 0) {
                $evidenceRefs.Add('references/release-ledger.jsonl') | Out-Null
                $evidenceRefs.Add('outputs/verify/vibe-installed-runtime-freshness-gate.json') | Out-Null
            }
            if ($nextActions.Count -eq 0) {
                $nextActions.Add('re-run runtime freshness and packaging coherence gates before release review.') | Out-Null
            }
        }
        'promotion' {
            if ($scorecardMissing.Count -gt 0) {
                $blockers.Add(('{0} plane(s) still lack scorecard or cockpit readiness' -f $scorecardMissing.Count)) | Out-Null
            }
            $conclusion = if ($blockers.Count -gt 0) {
                ('Promotion posture is incomplete: {0}/{1} planes are scorecard-ready under board mode {2}.' -f $scorecardReady, $planeCount, $BoardMode)
            } else {
                'Promotion posture is fully evidenced for the current tracked planes.'
            }
            $metrics = [ordered]@{
                board_mode = $BoardMode
                tracked_planes = $planeCount
                scorecard_ready_planes = $scorecardReady
                planes_needing_attention = @($scorecardMissing | ForEach-Object { $_.plane_id })
            }
            if ($evidenceRefs.Count -eq 0) {
                $evidenceRefs.Add('config/promotion-board.json') | Out-Null
            }
            if ($nextActions.Count -eq 0) {
                $nextActions.Add('close promotion-board blockers before considering strict or promote stages.') | Out-Null
            }
        }
        'replay' {
            if ($replayMissing.Count -gt 0) {
                $blockers.Add(('{0} plane(s) still lack replay readiness' -f $replayMissing.Count)) | Out-Null
            }
            $conclusion = if ($blockers.Count -gt 0) {
                ('Replay coverage remains partial: {0}/{1} planes are replay-ready.' -f $replayReady, $planeCount)
            } else {
                'Replay coverage is visible and replay blockers are cleared in the cockpit.'
            }
            $metrics = [ordered]@{
                tracked_planes = $planeCount
                replay_ready_planes = $replayReady
                planes_needing_attention = @($replayMissing | ForEach-Object { $_.plane_id })
            }
            if ($evidenceRefs.Count -eq 0) {
                $evidenceRefs.Add('outputs/verify') | Out-Null
            }
            if ($nextActions.Count -eq 0) {
                $nextActions.Add('surface replay evidence for any plane that is not yet replay-ready.') | Out-Null
            }
        }
        'rollback' {
            if ($rollbackMissing.Count -gt 0) {
                $blockers.Add(('{0} plane(s) still lack rollback readiness' -f $rollbackMissing.Count)) | Out-Null
            }
            $conclusion = if ($blockers.Count -gt 0) {
                ('Rollback readiness is incomplete: {0}/{1} planes are rollback-ready.' -f $rollbackReady, $planeCount)
            } else {
                'Rollback posture is visible and no rollback blockers are currently recorded.'
            }
            $metrics = [ordered]@{
                tracked_planes = $planeCount
                rollback_ready_planes = $rollbackReady
                planes_needing_attention = @($rollbackMissing | ForEach-Object { $_.plane_id })
            }
            if ($evidenceRefs.Count -eq 0) {
                $evidenceRefs.Add('outputs/verify/vibe-rollback-drill-gate.json') | Out-Null
            }
            if ($nextActions.Count -eq 0) {
                $nextActions.Add('keep rollback drill evidence attached to every soft/strict candidate review.') | Out-Null
            }
        }
        'release' {
            if ($releaseMissing.Count -gt 0) {
                $blockers.Add(('{0} plane(s) still lack release_train_ready evidence' -f $releaseMissing.Count)) | Out-Null
            }
            if ($null -eq $ReleaseEntry) {
                $blockers.Add('release ledger entry missing') | Out-Null
            }
            $conclusion = if ($blockers.Count -gt 0) {
                'Release train is not ready; stop-ship blockers remain in plane evidence and/or release ledger state.'
            } else {
                'Release train evidence is present and no cockpit release blockers are recorded.'
            }
            $metrics = [ordered]@{
                tracked_planes = $planeCount
                release_ready_planes = $releaseReady
                release_ledger_present = ($null -ne $ReleaseEntry)
                planes_needing_attention = @($releaseMissing | ForEach-Object { $_.plane_id })
            }
            if ($evidenceRefs.Count -eq 0) {
                $evidenceRefs.Add('references/release-ledger.jsonl') | Out-Null
                $evidenceRefs.Add('config/promotion-board.json') | Out-Null
            }
            if ($nextActions.Count -eq 0) {
                $nextActions.Add('finish release evidence bundle and operator handoff review before any release cut.') | Out-Null
            }
        }
        default {
            $conclusion = 'panel is governed but does not yet have a specialized summary.'
            $metrics = [ordered]@{}
            if ($nextActions.Count -eq 0) {
                $nextActions.Add('extend ops cockpit synthesis for this governed panel.') | Out-Null
            }
        }
    }

    $dedupedBlockers = @($blockers | Where-Object { -not [string]::IsNullOrWhiteSpace($_) } | Sort-Object -Unique)
    $dedupedEvidence = @($evidenceRefs | Where-Object { -not [string]::IsNullOrWhiteSpace($_) } | Sort-Object -Unique)
    $dedupedNextActions = @($nextActions | Where-Object { -not [string]::IsNullOrWhiteSpace($_) } | Sort-Object -Unique)
    if ($dedupedBlockers.Count -eq 0) { $dedupedBlockers = @('none') }
    if ($dedupedEvidence.Count -eq 0) { $dedupedEvidence = @('config/ops-cockpit-panel-contract.json') }
    if ($dedupedNextActions.Count -eq 0) { $dedupedNextActions = @('maintain governed evidence and re-run cockpit generation as part of release review.') }

    return [ordered]@{
        panel_id = $PanelId
        conclusion = $conclusion
        blockers = @($dedupedBlockers)
        evidence_ref = @($dedupedEvidence)
        next_action = @($dedupedNextActions)
        metrics = $metrics
    }
}

function New-OpsDashboardArtifacts {
    param([string]$RepoRoot)

    $boardPath = Join-Path $RepoRoot 'config\promotion-board.json'
    $contractPath = Join-Path $RepoRoot 'config\ops-cockpit-panel-contract.json'
    $observabilityPath = Join-Path $RepoRoot 'config\observability-policy.json'
    $verifyDir = Join-Path $RepoRoot 'outputs\verify'
    $dashboardDir = Join-Path $RepoRoot 'outputs\dashboard'
    $releaseEntry = Get-LatestReleaseLedgerEntry -RepoRoot $RepoRoot
    $gitHead = Get-ShortGitHead -RepoRoot $RepoRoot

    $board = if (Test-Path -LiteralPath $boardPath) { Get-Content -LiteralPath $boardPath -Raw -Encoding UTF8 | ConvertFrom-Json } else { $null }
    $contract = if (Test-Path -LiteralPath $contractPath) { Get-Content -LiteralPath $contractPath -Raw -Encoding UTF8 | ConvertFrom-Json } else { $null }
    $observability = if (Test-Path -LiteralPath $observabilityPath) { Get-Content -LiteralPath $observabilityPath -Raw -Encoding UTF8 | ConvertFrom-Json } else { $null }
    $verifyJson = if (Test-Path -LiteralPath $verifyDir) { @(Get-ChildItem -LiteralPath $verifyDir -Filter '*.json' | Sort-Object Name) } else { @() }
    $planeRows = if ($null -ne $board) { @($board.planes) } else { @() }
    $gapRows = Get-OpsCockpitGapMatrixRows -RepoRoot $RepoRoot
    $panelDefinitions = if ($null -ne $contract) { @($contract.panels) } else { @() }
    $verifyArtifactCount = @($verifyJson).Count
    $trackedPlaneCount = @($planeRows).Count
    $boardMode = if ($null -ne $board) { [string]$board.board_policy.mode } else { $null }
    $observabilityMode = if ($null -ne $observability) { [string]$observability.mode } else { $null }

    $actionablePanels = @()
    foreach ($panelDef in $panelDefinitions) {
        $actionablePanels += [pscustomobject](New-OpsCockpitPanelArtifact -PanelId ([string]$panelDef.panel_id) -PlaneRows $planeRows -GapRows $gapRows -BoardMode $boardMode -ReleaseEntry $releaseEntry -GitHead $gitHead -VerifyArtifactCount $verifyArtifactCount -ObservabilityMode $observabilityMode)
    }

    $artifact = [ordered]@{
        generated_at = (Get-Date).ToString('s')
        source = 'wave124_ops_dashboard_v2'
        contract = 'config/ops-cockpit-panel-contract.json'
        promotion_board = 'config/promotion-board.json'
        gap_matrix = 'references/ops-cockpit-gap-matrix.md'
        actionable_panels = @($actionablePanels)
        summary = [ordered]@{
            panel_count = @($actionablePanels).Count
            tracked_planes = $trackedPlaneCount
            release_ledger_present = ($null -ne $releaseEntry)
            verify_artifact_count = $verifyArtifactCount
        }
        evidence_refs = @(
            'config/ops-cockpit-panel-contract.json',
            'config/promotion-board.json',
            'references/ops-cockpit-gap-matrix.md',
            'references/release-ledger.jsonl',
            'outputs/verify'
        )
    }

    New-Item -ItemType Directory -Force -Path $dashboardDir | Out-Null
    $jsonPath = Join-Path $dashboardDir 'ops-dashboard.json'
    $mdPath = Join-Path $dashboardDir 'ops-dashboard.md'
    Write-VgoUtf8NoBomText -Path $jsonPath -Content ($artifact | ConvertTo-Json -Depth 50)

    $mdLines = @(
        '# Ops Dashboard',
        '',
        ('- Generated at: `{0}`' -f $artifact.generated_at),
        ('- Contract: `{0}`' -f $artifact.contract),
        ('- Tracked planes: `{0}`' -f $artifact.summary.tracked_planes),
        '',
        '## Actionable Panels',
        ''
    )
    foreach ($panel in $artifact.actionable_panels) {
        $mdLines += ('### {0}' -f $panel.panel_id)
        $mdLines += ''
        $mdLines += ('- Conclusion: {0}' -f $panel.conclusion)
        $mdLines += '- Blockers:'
        foreach ($blocker in @($panel.blockers)) {
            $mdLines += ('  - {0}' -f $blocker)
        }
        $mdLines += '- Evidence:'
        foreach ($evidence in @($panel.evidence_ref)) {
            $mdLines += ('  - `{0}`' -f $evidence)
        }
        $mdLines += '- Next Action:'
        foreach ($nextAction in @($panel.next_action)) {
            $mdLines += ('  - {0}' -f $nextAction)
        }
        $mdLines += ''
    }

    Write-VgoUtf8NoBomText -Path $mdPath -Content ($mdLines -join "`n")
}

function New-ReleaseEvidenceBundle {
    param([string]$RepoRoot)
    $governancePath = Join-Path $RepoRoot 'config\version-governance.json'
    $boardPath = Join-Path $RepoRoot 'config\promotion-board.json'
    $dashboardPath = Join-Path $RepoRoot 'outputs\dashboard\ops-dashboard.json'
    $releaseReadme = Join-Path $RepoRoot 'docs\releases\README.md'
    $verifyDir = Join-Path $RepoRoot 'outputs\verify'
    $gitHead = Get-ShortGitHead -RepoRoot $RepoRoot
    $releaseEntry = Get-LatestReleaseLedgerEntry -RepoRoot $RepoRoot
    $governance = if (Test-Path -LiteralPath $governancePath) { Get-Content -LiteralPath $governancePath -Raw -Encoding UTF8 | ConvertFrom-Json } else { $null }
    $board = if (Test-Path -LiteralPath $boardPath) { Get-Content -LiteralPath $boardPath -Raw -Encoding UTF8 | ConvertFrom-Json } else { $null }
    $verifyRefs = if (Test-Path -LiteralPath $verifyDir) { @(Get-ChildItem -LiteralPath $verifyDir -Filter '*.json' | Sort-Object Name | ForEach-Object { Get-VgoRelativePathPortable -BasePath $RepoRoot -TargetPath $_.FullName }) } else { @() }

    $artifact = [ordered]@{
        bundle_version = 'v3'
        generated_at = (Get-Date).ToString('s')
        version = if ($null -ne $governance) { $governance.release.version } else { $null }
        updated = if ($null -ne $governance) { $governance.release.updated } else { $null }
        git_head = $gitHead
        board_mode = if ($null -ne $board) { $board.board_policy.mode } else { $null }
        ledger_tail = $releaseEntry
        evidence_refs = [ordered]@{
            release_readme = 'docs/releases/README.md'
            promotion_board = 'config/promotion-board.json'
            ops_dashboard = 'outputs/dashboard/ops-dashboard.json'
            verify_artifacts = $verifyRefs
            release_ledger = 'references/release-ledger.jsonl'
        }
    }

    $jsonPath = Join-Path $RepoRoot 'outputs\release\release-evidence-bundle.json'
    Write-VgoUtf8NoBomText -Path $jsonPath -Content ($artifact | ConvertTo-Json -Depth 100)
}

function New-RolloutSuggestionBundle {
    param([string]$RepoRoot)
    $routerPath = Join-Path $RepoRoot 'config\router-thresholds.json'
    $observabilityPath = Join-Path $RepoRoot 'config\observability-policy.json'
    if (-not (Test-Path -LiteralPath $routerPath) -or -not (Test-Path -LiteralPath $observabilityPath)) {
        throw 'router thresholds or observability policy missing for wave98 output generation.'
    }
    $router = Get-Content -LiteralPath $routerPath -Raw -Encoding UTF8 | ConvertFrom-Json
    $observability = Get-Content -LiteralPath $observabilityPath -Raw -Encoding UTF8 | ConvertFrom-Json
    $bounds = $observability.learning.bounded_adjustments
    $recommendations = @(
        [ordered]@{
            knob = 'confirm_required'
            current = [double]$router.thresholds.confirm_required
            proposed = [math]::Round([double]$router.thresholds.confirm_required + 0.02, 2)
            delta = 0.02
            rationale = 'slightly widen confirm-required posture for borderline ambiguous routes'
            apply_policy = 'manual_review_required'
        },
        [ordered]@{
            knob = 'fallback_to_legacy_below'
            current = [double]$router.thresholds.fallback_to_legacy_below
            proposed = [math]::Round([double]$router.thresholds.fallback_to_legacy_below - 0.02, 2)
            delta = -0.02
            rationale = 'reduce premature fallback while remaining bounded'
            apply_policy = 'manual_review_required'
        },
        [ordered]@{
            knob = 'min_top1_top2_gap'
            current = [double]$router.thresholds.min_top1_top2_gap
            proposed = [math]::Round([double]$router.thresholds.min_top1_top2_gap + 0.02, 2)
            delta = 0.02
            rationale = 'increase gap sensitivity for near-tied candidates without bypassing manual review'
            apply_policy = 'manual_review_required'
        }
    )
    $artifact = [ordered]@{
        generated_at = (Get-Date).ToString('s')
        source = 'wave98_rollout_proposal_gate'
        apply_policy = 'manual_review_required'
        bounded_adjustments = $bounds
        recommendations = $recommendations
    }
    $outPath = Join-Path $RepoRoot 'outputs\learn\vibe-adaptive-suggestions.json'
    Write-VgoUtf8NoBomText -Path $outPath -Content ($artifact | ConvertTo-Json -Depth 50)
}

function Write-GateArtifacts {
    param(
        [string]$RepoRoot,
        [string]$OutputDirectory,
        [psobject]$Artifact,
        [string]$BaseName
    )
    $dir = if ([string]::IsNullOrWhiteSpace($OutputDirectory)) { Join-Path $RepoRoot 'outputs\verify' } else { $OutputDirectory }
    New-Item -ItemType Directory -Force -Path $dir | Out-Null
    $jsonPath = Join-Path $dir ($BaseName + '.json')
    $mdPath = Join-Path $dir ($BaseName + '.md')
    Write-VgoUtf8NoBomText -Path $jsonPath -Content ($Artifact | ConvertTo-Json -Depth 100)
    $lines = @(
        ('# ' + $Artifact.title),
        '',
        ('- Gate Result: **{0}**' -f $Artifact.gate_result),
        ('- Wave: `{0}`' -f $Artifact.wave),
        ('- Repo Root: `{0}`' -f $Artifact.repo_root),
        ('- Failures: {0}' -f $Artifact.summary.failure_count),
        '',
        '## Assertions',
        ''
    )
    foreach ($assertion in $Artifact.assertions) {
        $lines += ('- `{0}` {1}' -f $(if ($assertion.pass) { 'PASS' } else { 'FAIL' }), $assertion.message)
    }
    Write-VgoUtf8NoBomText -Path $mdPath -Content ($lines -join "`n")
}

$context = Get-VgoGovernanceContext -ScriptPath $PSCommandPath -EnforceExecutionContext
$repoRoot = $context.repoRoot
$entry = Get-WaveManifestEntry -RepoRoot $repoRoot -Wave $Wave
$assertions = [System.Collections.Generic.List[object]]::new()

if ($WriteArtifacts -and $entry.PSObject.Properties.Name -contains 'write_artifacts_action') {
    switch ([string]$entry.write_artifacts_action) {
        'ops_dashboard' { New-OpsDashboardArtifacts -RepoRoot $repoRoot }
        'release_bundle' { New-ReleaseEvidenceBundle -RepoRoot $repoRoot }
        'rollout_suggestions' { New-RolloutSuggestionBundle -RepoRoot $repoRoot }
    }
}

foreach ($asset in @($entry.required_assets)) {
    $full = Join-Path $repoRoot ([string]$asset)
    Add-Assertion -Assertions $assertions -Pass (Test-Path -LiteralPath $full) -Message ('required asset exists: ' + $asset) -Details $asset
}
if ($entry.PSObject.Properties.Name -contains 'generated_outputs') {
    foreach ($asset in @($entry.generated_outputs)) {
        $full = Join-Path $repoRoot ([string]$asset)
        Add-Assertion -Assertions $assertions -Pass (Test-Path -LiteralPath $full) -Message ('generated output exists: ' + $asset) -Details $asset
    }
}

foreach ($check in @($entry.keyword_checks)) {
    $path = Join-Path $repoRoot ([string]$check.path)
    Test-FileContainsKeywords -Path $path -Keywords @($check.keywords) -Assertions $assertions
}
if ($entry.PSObject.Properties.Name -contains 'generated_output_keywords') {
    foreach ($check in @($entry.generated_output_keywords)) {
        $path = Join-Path $repoRoot ([string]$check.path)
        Test-FileContainsKeywords -Path $path -Keywords @($check.keywords) -Assertions $assertions
    }
}

if ($Wave -eq 98) {
    $suggestionsPath = Join-Path $repoRoot 'outputs\learn\vibe-adaptive-suggestions.json'
    if (Test-Path -LiteralPath $suggestionsPath) {
        $artifact = Get-Content -LiteralPath $suggestionsPath -Raw -Encoding UTF8 | ConvertFrom-Json
        $bounds = $artifact.bounded_adjustments
        foreach ($row in @($artifact.recommendations)) {
            if ($row.knob -eq 'confirm_required') {
                Add-Assertion -Assertions $assertions -Pass ([math]::Abs([double]$row.delta) -le [double]$bounds.confirm_required_max_delta) -Message 'confirm_required delta stays bounded' -Details $row.delta
            }
            if ($row.knob -eq 'fallback_to_legacy_below') {
                Add-Assertion -Assertions $assertions -Pass ([math]::Abs([double]$row.delta) -le [double]$bounds.fallback_threshold_max_delta) -Message 'fallback threshold delta stays bounded' -Details $row.delta
            }
            if ($row.knob -eq 'min_top1_top2_gap') {
                Add-Assertion -Assertions $assertions -Pass ([math]::Abs([double]$row.delta) -le [double]$bounds.min_top_gap_max_delta) -Message 'top-gap delta stays bounded' -Details $row.delta
            }
        }
    }
}

$failureCount = @($assertions | Where-Object { -not $_.pass }).Count
$result = if ($failureCount -eq 0) { 'PASS' } else { 'FAIL' }
$artifact = [pscustomobject]@{
    gate = [string]$entry.artifact_basename
    title = [string]$entry.title
    wave = $Wave
    repo_root = $repoRoot
    generated_at = (Get-Date).ToString('s')
    gate_result = $result
    assertions = @($assertions)
    summary = [ordered]@{ total = $assertions.Count; failure_count = $failureCount }
}

if ($WriteArtifacts) {
    Write-GateArtifacts -RepoRoot $repoRoot -OutputDirectory $OutputDirectory -Artifact $artifact -BaseName ([string]$entry.artifact_basename)
}

if ($failureCount -gt 0) {
    exit 1
}
receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementationStars: 322kUpdated Claude CodeCodexVerifiedInstall
requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirementsStars: 322kUpdated Claude CodeCodexVerifiedInstall
using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallbackStars: 322kUpdated Claude CodeCodexVerifiedInstall
verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions alwaysStars: 322kUpdated Claude CodeCodexVerifiedInstall