Public/Test-CCReleaseWorkflow.ps1

function Test-CCReleaseWorkflow {
    <#
    .SYNOPSIS
        Reports the state of CodeCompass-managed workflows in a repository — without changing anything.
    .DESCRIPTION
        Read-only adoption assessment. For each workflow CodeCompass.Release would manage, reports
        Absent / Matches / Differs, and lists other (unmanaged) workflow files present so you can spot
        overlap before adopting. Safe to run across an organisation to see the lay of the land.
    .EXAMPLE
        Test-CCReleaseWorkflow -Path .
    #>

    [CmdletBinding()]
    [OutputType([pscustomobject])]
    param(
        [Parameter(Position = 0)]
        [string]$Path = '.'
    )

    $full = (Resolve-Path -LiteralPath $Path).Path
    $report = [CodeCompass.Core.Workflows.WorkflowService]::new().Assess($full, 'CodeCompass.Release')

    foreach ($workflow in $report.Workflows) {
        [pscustomobject]@{
            Path   = $workflow.TargetRelativePath
            Status = $workflow.Status.ToString()
            Detail = $workflow.Detail
        }
    }

    foreach ($other in $report.OtherWorkflows) {
        [pscustomobject]@{
            Path   = $other
            Status = 'Unmanaged'
            Detail = 'Not managed by CodeCompass; review for overlap.'
        }
    }
}