#pragma once

#include "CoreMinimal.h"
#include "HyperTwistSkillTypes.generated.h"

UENUM(BlueprintType)
enum class EHyperTwistSkillStatus : uint8
{
	None UMETA(DisplayName = "None"),
	ImplementedNow UMETA(DisplayName = "Implemented Now"),
	CommandContractPending UMETA(DisplayName = "Command Contract Pending"),
	CleanRoomSpecPending UMETA(DisplayName = "Clean-Room Spec Pending"),
	CleanRoomCommandContractSpecified UMETA(DisplayName = "Clean-Room Command Contract Specified"),
	CleanRoomSkillSpecSpecified UMETA(DisplayName = "Clean-Room Skill Spec Specified"),
	PlaceholderFamily UMETA(DisplayName = "Placeholder Family")
};

UENUM(BlueprintType)
enum class EHyperTwistSkillFamily : uint8
{
	None UMETA(DisplayName = "None"),
	SubstrateGovernance UMETA(DisplayName = "Substrate Governance"),
	AnalysisReview UMETA(DisplayName = "Analysis And Review"),
	MemoryContinuity UMETA(DisplayName = "Memory And Continuity"),
	ProviderOperations UMETA(DisplayName = "Provider And Operations"),
	TrainingCoaching UMETA(DisplayName = "Training And Coaching"),
	BrowserDocsDesign UMETA(DisplayName = "Browser Docs And Design"),
	DomainCreative UMETA(DisplayName = "Domain And Creative")
};

UENUM(BlueprintType)
enum class EHyperTwistSkillLogPolicy : uint8
{
	None UMETA(DisplayName = "None"),
	DeclarationOnly UMETA(DisplayName = "Declaration Only"),
	InvocationLedgerRequired UMETA(DisplayName = "Invocation Ledger Required")
};

UENUM(BlueprintType)
enum class EHyperTwistSkillInvocationOutcome : uint8
{
	None UMETA(DisplayName = "None"),
	Succeeded UMETA(DisplayName = "Succeeded"),
	Failed UMETA(DisplayName = "Failed"),
	Cancelled UMETA(DisplayName = "Cancelled")
};

UENUM(BlueprintType)
enum class EHyperTwistSkillValidationContractKind : uint8
{
	None UMETA(DisplayName = "None"),
	Smoke UMETA(DisplayName = "Smoke"),
	Eval UMETA(DisplayName = "Eval")
};

UENUM(BlueprintType)
enum class EHyperTwistSkillValidationExecutionMode : uint8
{
	None UMETA(DisplayName = "None"),
	LiveContract UMETA(DisplayName = "Live Contract"),
	DeclarationOnly UMETA(DisplayName = "Declaration Only"),
	DeferredUntilWrapper UMETA(DisplayName = "Deferred Until Wrapper"),
	DeferredUntilCleanRoomSpec UMETA(DisplayName = "Deferred Until Clean-Room Spec"),
	DeferredUntilCleanRoomSkillSpec UMETA(DisplayName = "Deferred Until Clean-Room Skill Spec"),
	PlaceholderStructureOnly UMETA(DisplayName = "Placeholder Structure Only")
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillCommandBindingDeclaration
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString CommandSurfaceId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ServiceBindingId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString BoundFeatureId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString InvocationPattern;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bRequiresImplementedService = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		return !CommandSurfaceId.IsEmpty()
			&& !ServiceBindingId.IsEmpty()
			&& !BoundFeatureId.IsEmpty()
			&& !InvocationPattern.IsEmpty();
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillPermissionScopeDeclaration
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ScopeId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString DisplayLabel;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bReadsTrainingState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bReadsRecognitionState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bReadsReplayState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bReadsMemoryState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bReadsProviderState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bMayToggleOptionalAssistiveState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bMayEmitDerivedAssistiveOutput = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		return !ScopeId.IsEmpty()
			&& !DisplayLabel.IsEmpty()
			&& (bReadsTrainingState
				|| bReadsRecognitionState
				|| bReadsReplayState
				|| bReadsMemoryState
				|| bReadsProviderState
				|| bMayToggleOptionalAssistiveState
				|| bMayEmitDerivedAssistiveOutput);
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillProvenanceDeclaration
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	EHyperTwistSkillLogPolicy LogPolicy = EHyperTwistSkillLogPolicy::None;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> ProducedArtifactKinds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bRequiresCommandProvenanceDeclaration = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bRequiresInvocationLoggingWhenEnabled = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		if (LogPolicy == EHyperTwistSkillLogPolicy::None
			|| !bRequiresCommandProvenanceDeclaration
			|| ProducedArtifactKinds.Num() == 0)
		{
			return false;
		}

		for (const FString& ArtifactKind : ProducedArtifactKinds)
		{
			if (ArtifactKind.IsEmpty())
			{
				return false;
			}
		}

		return true;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillManifestEntry
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString SkillId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Version;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString DisplayLabel;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString OwnerLaneId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString OwnerFeatureId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	EHyperTwistSkillFamily Family = EHyperTwistSkillFamily::None;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	EHyperTwistSkillStatus Status = EHyperTwistSkillStatus::None;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bOptionalAssistive = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEnabledByDefault = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bVisibleByDefault = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bInstalledWhenDisabled = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bInertWhenDisabled = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FHyperTwistSkillCommandBindingDeclaration> CommandBindings;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FHyperTwistSkillPermissionScopeDeclaration> PermissionScopes;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FHyperTwistSkillProvenanceDeclaration Provenance;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		if (SkillId.IsEmpty()
			|| Version.IsEmpty()
			|| DisplayLabel.IsEmpty()
			|| OwnerLaneId.IsEmpty()
			|| OwnerFeatureId.IsEmpty()
			|| Family == EHyperTwistSkillFamily::None
			|| Status == EHyperTwistSkillStatus::None
			|| !bOptionalAssistive
			|| !bInstalledWhenDisabled
			|| !bInertWhenDisabled
			|| CommandBindings.Num() == 0
			|| PermissionScopes.Num() == 0
			|| !Provenance.IsStructurallyValid())
		{
			return false;
		}

		for (const FHyperTwistSkillCommandBindingDeclaration& Binding : CommandBindings)
		{
			if (!Binding.IsStructurallyValid())
			{
				return false;
			}
		}

		for (const FHyperTwistSkillPermissionScopeDeclaration& Scope : PermissionScopes)
		{
			if (!Scope.IsStructurallyValid())
			{
				return false;
			}
		}

		return true;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillStatusCount
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	EHyperTwistSkillStatus Status = EHyperTwistSkillStatus::None;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 Count = 0;

	bool IsStructurallyValid() const
	{
		return Status != EHyperTwistSkillStatus::None && Count > 0;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillFamilyCount
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	EHyperTwistSkillFamily Family = EHyperTwistSkillFamily::None;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 Count = 0;

	bool IsStructurallyValid() const
	{
		return Family != EHyperTwistSkillFamily::None && Count > 0;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillRegistryState
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString RegistryId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ManifestVersion;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ReferenceUtc;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString CommandSurfaceRootId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FHyperTwistSkillManifestEntry> Entries;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FHyperTwistSkillStatusCount> StatusCounts;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FHyperTwistSkillFamilyCount> FamilyCounts;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 SkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 EnabledByDefaultCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 DisabledByDefaultCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bAllSkillsOptionalAssistive = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bDisabledSkillsRemainInstalled = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bDisabledSkillsAreInert = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bNoAdHocMetadataRequired = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		if (RegistryId.IsEmpty()
			|| ManifestVersion.IsEmpty()
			|| ReferenceUtc.IsEmpty()
			|| CommandSurfaceRootId.IsEmpty()
			|| Entries.Num() == 0
			|| SkillCount != Entries.Num()
			|| !bAllSkillsOptionalAssistive
			|| !bDisabledSkillsRemainInstalled
			|| !bDisabledSkillsAreInert
			|| !bNoAdHocMetadataRequired)
		{
			return false;
		}

		TArray<FString> SeenSkillIds;
		int32 ComputedEnabledByDefaultCount = 0;
		bool bComputedAllOptionalAssistive = true;
		bool bComputedDisabledRemainInstalled = true;
		bool bComputedDisabledAreInert = true;

		for (const FHyperTwistSkillManifestEntry& Entry : Entries)
		{
			if (!Entry.IsStructurallyValid() || SeenSkillIds.Contains(Entry.SkillId))
			{
				return false;
			}

			SeenSkillIds.Add(Entry.SkillId);
			ComputedEnabledByDefaultCount += Entry.bEnabledByDefault ? 1 : 0;
			bComputedAllOptionalAssistive &= Entry.bOptionalAssistive;
			bComputedDisabledRemainInstalled &= Entry.bInstalledWhenDisabled;
			bComputedDisabledAreInert &= Entry.bInertWhenDisabled;
		}

		if (EnabledByDefaultCount != ComputedEnabledByDefaultCount
			|| DisabledByDefaultCount != (Entries.Num() - ComputedEnabledByDefaultCount)
			|| bAllSkillsOptionalAssistive != bComputedAllOptionalAssistive
			|| bDisabledSkillsRemainInstalled != bComputedDisabledRemainInstalled
			|| bDisabledSkillsAreInert != bComputedDisabledAreInert)
		{
			return false;
		}

		TArray<EHyperTwistSkillStatus> SeenStatuses;
		for (const FHyperTwistSkillStatusCount& StatusCount : StatusCounts)
		{
			if (!StatusCount.IsStructurallyValid() || SeenStatuses.Contains(StatusCount.Status))
			{
				return false;
			}

			int32 ComputedCount = 0;
			for (const FHyperTwistSkillManifestEntry& Entry : Entries)
			{
				ComputedCount += Entry.Status == StatusCount.Status ? 1 : 0;
			}

			if (ComputedCount != StatusCount.Count)
			{
				return false;
			}

			SeenStatuses.Add(StatusCount.Status);
		}

		TArray<EHyperTwistSkillFamily> SeenFamilies;
		for (const FHyperTwistSkillFamilyCount& FamilyCount : FamilyCounts)
		{
			if (!FamilyCount.IsStructurallyValid() || SeenFamilies.Contains(FamilyCount.Family))
			{
				return false;
			}

			int32 ComputedCount = 0;
			for (const FHyperTwistSkillManifestEntry& Entry : Entries)
			{
				ComputedCount += Entry.Family == FamilyCount.Family ? 1 : 0;
			}

			if (ComputedCount != FamilyCount.Count)
			{
				return false;
			}

			SeenFamilies.Add(FamilyCount.Family);
		}

		return true;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillControlOverride
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString SkillId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bHasEnabledOverride = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEnabled = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bHasVisibilityOverride = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bVisible = false;

	bool IsStructurallyValid() const
	{
		return !SkillId.IsEmpty()
			&& (bHasEnabledOverride || bHasVisibilityOverride);
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillControlProfile
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ProfileId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString DisplayLabel;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bMasterEnabled = true;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bDurableSettingsExposed = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bImmediateMenuControlExposed = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FHyperTwistSkillControlOverride> Overrides;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		if (ProfileId.IsEmpty()
			|| DisplayLabel.IsEmpty()
			|| !bDurableSettingsExposed)
		{
			return false;
		}

		TArray<FString> SeenSkillIds;
		for (const FHyperTwistSkillControlOverride& Override : Overrides)
		{
			if (!Override.IsStructurallyValid() || SeenSkillIds.Contains(Override.SkillId))
			{
				return false;
			}

			SeenSkillIds.Add(Override.SkillId);
		}

		return true;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillMasterSwitchState
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString SettingsKey;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString DisplayLabel;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEnabled = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bDurableSettingExposed = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bImmediateMenuControlExposed = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bAllSkillsOffSafe = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		return !SettingsKey.IsEmpty()
			&& !DisplayLabel.IsEmpty()
			&& bDurableSettingExposed
			&& bAllSkillsOffSafe;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillControlStateEntry
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString SkillId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString DisplayLabel;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString EnableSettingsKey;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString VisibilitySettingsKey;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString VisibilityGroupId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	EHyperTwistSkillFamily Family = EHyperTwistSkillFamily::None;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	EHyperTwistSkillStatus Status = EHyperTwistSkillStatus::None;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bInstalled = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bOptionalAssistive = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bRequestedEnabled = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEffectiveEnabled = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bRequestedVisible = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEffectiveVisible = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bInertWhenDisabled = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bDurableSettingExposed = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bImmediateMenuControlExposed = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		return !SkillId.IsEmpty()
			&& !DisplayLabel.IsEmpty()
			&& !EnableSettingsKey.IsEmpty()
			&& !VisibilitySettingsKey.IsEmpty()
			&& !VisibilityGroupId.IsEmpty()
			&& Family != EHyperTwistSkillFamily::None
			&& Status != EHyperTwistSkillStatus::None
			&& bInstalled
			&& bOptionalAssistive
			&& bInertWhenDisabled
			&& bDurableSettingExposed
			&& (!bEffectiveEnabled || bRequestedEnabled);
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillVisibilityGroupState
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString GroupId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString DisplayLabel;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString VisibilitySettingsKey;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	EHyperTwistSkillFamily Family = EHyperTwistSkillFamily::None;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> SkillIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 VisibleSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 HiddenSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bGroupVisibleByDefault = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bDurableVisibilityControlExposed = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		return !GroupId.IsEmpty()
			&& !DisplayLabel.IsEmpty()
			&& !VisibilitySettingsKey.IsEmpty()
			&& Family != EHyperTwistSkillFamily::None
			&& SkillIds.Num() > 0
			&& VisibleSkillCount >= 0
			&& HiddenSkillCount >= 0
			&& (VisibleSkillCount + HiddenSkillCount) == SkillIds.Num()
			&& bDurableVisibilityControlExposed;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillControlState
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString RegistryId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ManifestVersion;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ReferenceUtc;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString CommandSurfaceRootId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ControlProfileId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FHyperTwistSkillMasterSwitchState MasterSwitch;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FHyperTwistSkillControlStateEntry> SkillStates;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FHyperTwistSkillVisibilityGroupState> VisibilityGroups;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 SkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 EffectiveEnabledSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 EffectiveDisabledSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 VisibleSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 HiddenSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bCoreProductWorksWithAllSkillsOff = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bNoPromptBabysittingToDisable = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bAllInstalledSkillsRemainReenableable = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		if (RegistryId.IsEmpty()
			|| ManifestVersion.IsEmpty()
			|| ReferenceUtc.IsEmpty()
			|| CommandSurfaceRootId.IsEmpty()
			|| ControlProfileId.IsEmpty()
			|| !MasterSwitch.IsStructurallyValid()
			|| SkillStates.Num() == 0
			|| SkillCount != SkillStates.Num()
			|| EffectiveDisabledSkillCount != (SkillCount - EffectiveEnabledSkillCount)
			|| HiddenSkillCount != (SkillCount - VisibleSkillCount)
			|| !bCoreProductWorksWithAllSkillsOff
			|| !bNoPromptBabysittingToDisable
			|| !bAllInstalledSkillsRemainReenableable)
		{
			return false;
		}

		TArray<FString> SeenSkillIds;
		int32 ComputedEnabledCount = 0;
		int32 ComputedVisibleCount = 0;
		bool bComputedNoBabysitting = true;
		bool bComputedReenableable = true;
		for (const FHyperTwistSkillControlStateEntry& SkillState : SkillStates)
		{
			if (!SkillState.IsStructurallyValid() || SeenSkillIds.Contains(SkillState.SkillId))
			{
				return false;
			}

			SeenSkillIds.Add(SkillState.SkillId);
			ComputedEnabledCount += SkillState.bEffectiveEnabled ? 1 : 0;
			ComputedVisibleCount += SkillState.bEffectiveVisible ? 1 : 0;
			bComputedNoBabysitting &= SkillState.bDurableSettingExposed;
			bComputedReenableable &= SkillState.bInstalled && SkillState.bInertWhenDisabled;
		}

		if (ComputedEnabledCount != EffectiveEnabledSkillCount
			|| ComputedVisibleCount != VisibleSkillCount
			|| bComputedNoBabysitting != bNoPromptBabysittingToDisable
			|| bComputedReenableable != bAllInstalledSkillsRemainReenableable)
		{
			return false;
		}

		TArray<FString> SeenGroupIds;
		for (const FHyperTwistSkillVisibilityGroupState& Group : VisibilityGroups)
		{
			if (!Group.IsStructurallyValid() || SeenGroupIds.Contains(Group.GroupId))
			{
				return false;
			}

			int32 ComputedGroupVisibleCount = 0;
			int32 ComputedGroupHiddenCount = 0;
			for (const FString& SkillId : Group.SkillIds)
			{
				const FHyperTwistSkillControlStateEntry* SkillState = SkillStates.FindByPredicate(
					[&SkillId](const FHyperTwistSkillControlStateEntry& Entry)
					{
						return Entry.SkillId == SkillId;
					}
				);
				if (SkillState == nullptr
					|| SkillState->Family != Group.Family
					|| SkillState->VisibilityGroupId != Group.GroupId)
				{
					return false;
				}

				ComputedGroupVisibleCount += SkillState->bEffectiveVisible ? 1 : 0;
				ComputedGroupHiddenCount += SkillState->bEffectiveVisible ? 0 : 1;
			}

			if (ComputedGroupVisibleCount != Group.VisibleSkillCount
				|| ComputedGroupHiddenCount != Group.HiddenSkillCount)
			{
				return false;
			}

			SeenGroupIds.Add(Group.GroupId);
		}

		return true;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillCommandProvenanceState
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString SkillId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString CommandSurfaceId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ServiceBindingId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString BoundFeatureId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString InvocationPattern;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString OwnerLaneId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString OwnerFeatureId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ProducerIdentity;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString CustodyClass;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> PermissionScopeIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> ProducedArtifactKinds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bCommandBindingDeclared = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bServiceBindingVisible = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		if (SkillId.IsEmpty()
			|| CommandSurfaceId.IsEmpty()
			|| ServiceBindingId.IsEmpty()
			|| BoundFeatureId.IsEmpty()
			|| InvocationPattern.IsEmpty()
			|| OwnerLaneId.IsEmpty()
			|| OwnerFeatureId.IsEmpty()
			|| ProducerIdentity.IsEmpty()
			|| CustodyClass.IsEmpty()
			|| PermissionScopeIds.Num() == 0
			|| ProducedArtifactKinds.Num() == 0
			|| !bCommandBindingDeclared
			|| !bServiceBindingVisible)
		{
			return false;
		}

		for (const FString& ScopeId : PermissionScopeIds)
		{
			if (ScopeId.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& ArtifactKind : ProducedArtifactKinds)
		{
			if (ArtifactKind.IsEmpty())
			{
				return false;
			}
		}

		return true;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillProducedArtifactState
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ArtifactId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ArtifactKind;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ArtifactOriginId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString EvidenceLinkId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString WarningState;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString CustodyClass;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bReplayLinked = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bTraceableToInvocation = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		return !ArtifactId.IsEmpty()
			&& !ArtifactKind.IsEmpty()
			&& !ArtifactOriginId.IsEmpty()
			&& !EvidenceLinkId.IsEmpty()
			&& !WarningState.IsEmpty()
			&& !CustodyClass.IsEmpty()
			&& bReplayLinked
			&& bTraceableToInvocation;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillInvocationRecord
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString InvocationId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString SkillId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString DisplayLabel;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString SessionId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString RunId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString StartedAtUtc;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString CompletedAtUtc;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	EHyperTwistSkillInvocationOutcome Outcome = EHyperTwistSkillInvocationOutcome::None;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FHyperTwistSkillCommandProvenanceState CommandProvenance;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FHyperTwistSkillProducedArtifactState> ProducedArtifacts;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString FailureReason;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString CancelReason;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString WarningState;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bInvocationTraceable = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bOutputBecameProductTruth = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bOutputTraceable = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bOutcomeRecorded = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		if (InvocationId.IsEmpty()
			|| SkillId.IsEmpty()
			|| DisplayLabel.IsEmpty()
			|| SessionId.IsEmpty()
			|| RunId.IsEmpty()
			|| StartedAtUtc.IsEmpty()
			|| CompletedAtUtc.IsEmpty()
			|| Outcome == EHyperTwistSkillInvocationOutcome::None
			|| WarningState.IsEmpty()
			|| !CommandProvenance.IsStructurallyValid()
			|| !bInvocationTraceable
			|| !bOutcomeRecorded)
		{
			return false;
		}

		for (const FHyperTwistSkillProducedArtifactState& Artifact : ProducedArtifacts)
		{
			if (!Artifact.IsStructurallyValid())
			{
				return false;
			}
		}

		switch (Outcome)
		{
		case EHyperTwistSkillInvocationOutcome::Succeeded:
			if (FailureReason.Len() > 0
				|| CancelReason.Len() > 0
				|| ProducedArtifacts.Num() == 0
				|| !bOutputBecameProductTruth
				|| !bOutputTraceable)
			{
				return false;
			}
			break;

		case EHyperTwistSkillInvocationOutcome::Failed:
			if (FailureReason.IsEmpty()
				|| CancelReason.Len() > 0
				|| ProducedArtifacts.Num() != 0
				|| bOutputBecameProductTruth)
			{
				return false;
			}
			break;

		case EHyperTwistSkillInvocationOutcome::Cancelled:
			if (CancelReason.IsEmpty()
				|| FailureReason.Len() > 0
				|| ProducedArtifacts.Num() != 0
				|| bOutputBecameProductTruth)
			{
				return false;
			}
			break;

		default:
			return false;
		}

		if (bOutputBecameProductTruth && !bOutputTraceable)
		{
			return false;
		}

		return true;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillAuditLedgerState
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString RegistryId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ManifestVersion;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ReferenceUtc;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString CommandSurfaceRootId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ControlProfileId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString LedgerId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FHyperTwistSkillInvocationRecord> InvocationRecords;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 EnabledSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 InvocationCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 SuccessfulInvocationCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 FailedInvocationCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 CancelledInvocationCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 TraceableInvocationCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 ProductTruthOutputCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 TraceableProductTruthOutputCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bNoUntraceableProductTruth = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bFailureRecordingSupported = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bCancelRecordingSupported = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bCommandServiceProvenanceVisible = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		if (RegistryId.IsEmpty()
			|| ManifestVersion.IsEmpty()
			|| ReferenceUtc.IsEmpty()
			|| CommandSurfaceRootId.IsEmpty()
			|| ControlProfileId.IsEmpty()
			|| LedgerId.IsEmpty()
			|| InvocationCount != InvocationRecords.Num()
			|| EnabledSkillCount < 0
			|| InvocationCount < 0
			|| SuccessfulInvocationCount < 0
			|| FailedInvocationCount < 0
			|| CancelledInvocationCount < 0
			|| TraceableInvocationCount < 0
			|| ProductTruthOutputCount < 0
			|| TraceableProductTruthOutputCount < 0
			|| !bNoUntraceableProductTruth
			|| !bCommandServiceProvenanceVisible)
		{
			return false;
		}

		TArray<FString> SeenInvocationIds;
		int32 ComputedSuccessCount = 0;
		int32 ComputedFailureCount = 0;
		int32 ComputedCancelCount = 0;
		int32 ComputedTraceableInvocationCount = 0;
		int32 ComputedProductTruthCount = 0;
		int32 ComputedTraceableProductTruthCount = 0;
		bool bComputedCommandProvenanceVisible = true;
		for (const FHyperTwistSkillInvocationRecord& Record : InvocationRecords)
		{
			if (!Record.IsStructurallyValid() || SeenInvocationIds.Contains(Record.InvocationId))
			{
				return false;
			}

			SeenInvocationIds.Add(Record.InvocationId);
			ComputedTraceableInvocationCount += Record.bInvocationTraceable ? 1 : 0;
			ComputedProductTruthCount += Record.bOutputBecameProductTruth ? 1 : 0;
			ComputedTraceableProductTruthCount +=
				(Record.bOutputBecameProductTruth && Record.bOutputTraceable) ? 1 : 0;
			bComputedCommandProvenanceVisible &= Record.CommandProvenance.bCommandBindingDeclared
				&& Record.CommandProvenance.bServiceBindingVisible;

			switch (Record.Outcome)
			{
			case EHyperTwistSkillInvocationOutcome::Succeeded:
				ComputedSuccessCount += 1;
				break;

			case EHyperTwistSkillInvocationOutcome::Failed:
				ComputedFailureCount += 1;
				break;

			case EHyperTwistSkillInvocationOutcome::Cancelled:
				ComputedCancelCount += 1;
				break;

			default:
				return false;
			}
		}

		return SuccessfulInvocationCount == ComputedSuccessCount
			&& FailedInvocationCount == ComputedFailureCount
			&& CancelledInvocationCount == ComputedCancelCount
			&& TraceableInvocationCount == ComputedTraceableInvocationCount
			&& ProductTruthOutputCount == ComputedProductTruthCount
			&& TraceableProductTruthOutputCount == ComputedTraceableProductTruthCount
			&& bNoUntraceableProductTruth
				== (ComputedProductTruthCount == ComputedTraceableProductTruthCount)
			&& bFailureRecordingSupported
			&& bCancelRecordingSupported
			&& bCommandServiceProvenanceVisible == bComputedCommandProvenanceVisible;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillAuthoringTemplateField
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString FieldId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString DisplayLabel;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ExpectedSource;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ExampleValue;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bRequired = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		return !FieldId.IsEmpty()
			&& !DisplayLabel.IsEmpty()
			&& !ExpectedSource.IsEmpty()
			&& !ExampleValue.IsEmpty()
			&& bRequired;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillAuthoringTemplateSection
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString SectionId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString DisplayLabel;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FHyperTwistSkillAuthoringTemplateField> Fields;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bRequiredForAllSkills = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		if (SectionId.IsEmpty()
			|| DisplayLabel.IsEmpty()
			|| Fields.Num() == 0
			|| !bRequiredForAllSkills)
		{
			return false;
		}

		TArray<FString> SeenFieldIds;
		for (const FHyperTwistSkillAuthoringTemplateField& Field : Fields)
		{
			if (!Field.IsStructurallyValid() || SeenFieldIds.Contains(Field.FieldId))
			{
				return false;
			}

			SeenFieldIds.Add(Field.FieldId);
		}

		return true;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillAuthoringExampleState
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ExampleId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString SkillId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ExampleLabel;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ExampleCommandSurfaceId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ExampleArtifactKind;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> TemplateSectionIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bGroundedInRegistry = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bHasTraceableAuditExample = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		if (ExampleId.IsEmpty()
			|| SkillId.IsEmpty()
			|| ExampleLabel.IsEmpty()
			|| ExampleCommandSurfaceId.IsEmpty()
			|| ExampleArtifactKind.IsEmpty()
			|| TemplateSectionIds.Num() == 0
			|| !bGroundedInRegistry)
		{
			return false;
		}

		for (const FString& SectionId : TemplateSectionIds)
		{
			if (SectionId.IsEmpty())
			{
				return false;
			}
		}

		return true;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillValidationContractCase
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString CaseId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString SkillId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	EHyperTwistSkillValidationContractKind Kind = EHyperTwistSkillValidationContractKind::None;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	EHyperTwistSkillValidationExecutionMode ExecutionMode = EHyperTwistSkillValidationExecutionMode::None;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ExpectedCommandSurfaceId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ExpectedServiceBindingId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> RequiredTemplateSectionIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> ExpectedArtifactKinds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bUsesAuditLedgerEvidence = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		if (CaseId.IsEmpty()
			|| SkillId.IsEmpty()
			|| Kind == EHyperTwistSkillValidationContractKind::None
			|| ExecutionMode == EHyperTwistSkillValidationExecutionMode::None
			|| ExpectedCommandSurfaceId.IsEmpty()
			|| ExpectedServiceBindingId.IsEmpty()
			|| RequiredTemplateSectionIds.Num() == 0
			|| ExpectedArtifactKinds.Num() == 0)
		{
			return false;
		}

		for (const FString& SectionId : RequiredTemplateSectionIds)
		{
			if (SectionId.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& ArtifactKind : ExpectedArtifactKinds)
		{
			if (ArtifactKind.IsEmpty())
			{
				return false;
			}
		}

		const bool bLiveMode =
			ExecutionMode == EHyperTwistSkillValidationExecutionMode::LiveContract;
		if (bLiveMode && !bUsesAuditLedgerEvidence)
		{
			return false;
		}

		return true;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillAuthoringHarnessState
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString RegistryId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ManifestVersion;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ReferenceUtc;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString CommandSurfaceRootId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString AuditLedgerId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString TemplateVersion;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FHyperTwistSkillAuthoringTemplateSection> TemplateSections;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FHyperTwistSkillAuthoringExampleState> Examples;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FHyperTwistSkillValidationContractCase> ValidationCases;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 SkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 ExampleCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 ValidationCaseCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 SkillsWithSmokeContractCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 SkillsWithEvalContractCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bNewSkillsCanBeAddedWithoutInventingStructure = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySkillHasSmokeContract = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySkillHasEvalContract = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bExamplesGroundedInFirstPartyRegistry = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bValidationHarnessUsesAuditLedgerWhenLive = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		if (RegistryId.IsEmpty()
			|| ManifestVersion.IsEmpty()
			|| ReferenceUtc.IsEmpty()
			|| CommandSurfaceRootId.IsEmpty()
			|| AuditLedgerId.IsEmpty()
			|| TemplateVersion.IsEmpty()
			|| TemplateSections.Num() == 0
			|| Examples.Num() == 0
			|| ValidationCases.Num() == 0
			|| SkillCount <= 0
			|| ExampleCount != Examples.Num()
			|| ValidationCaseCount != ValidationCases.Num()
			|| SkillsWithSmokeContractCount < 0
			|| SkillsWithEvalContractCount < 0
			|| !bNewSkillsCanBeAddedWithoutInventingStructure
			|| !bEverySkillHasSmokeContract
			|| !bEverySkillHasEvalContract
			|| !bExamplesGroundedInFirstPartyRegistry
			|| !bValidationHarnessUsesAuditLedgerWhenLive)
		{
			return false;
		}

		TArray<FString> SeenSectionIds;
		for (const FHyperTwistSkillAuthoringTemplateSection& Section : TemplateSections)
		{
			if (!Section.IsStructurallyValid() || SeenSectionIds.Contains(Section.SectionId))
			{
				return false;
			}

			SeenSectionIds.Add(Section.SectionId);
		}

		TArray<FString> SeenExampleIds;
		TArray<FString> ExampleSkillIds;
		bool bComputedExamplesGroundedInRegistry = true;
		for (const FHyperTwistSkillAuthoringExampleState& Example : Examples)
		{
			if (!Example.IsStructurallyValid() || SeenExampleIds.Contains(Example.ExampleId))
			{
				return false;
			}

			for (const FString& SectionId : Example.TemplateSectionIds)
			{
				if (!SeenSectionIds.Contains(SectionId))
				{
					return false;
				}
			}

			SeenExampleIds.Add(Example.ExampleId);
			ExampleSkillIds.Add(Example.SkillId);
			bComputedExamplesGroundedInRegistry &= Example.bGroundedInRegistry;
		}

		TArray<FString> SeenCaseIds;
		TArray<FString> SkillsWithSmokeContract;
		TArray<FString> SkillsWithEvalContract;
		bool bComputedValidationUsesAuditLedgerWhenLive = true;
		for (const FHyperTwistSkillValidationContractCase& ValidationCase : ValidationCases)
		{
			if (!ValidationCase.IsStructurallyValid() || SeenCaseIds.Contains(ValidationCase.CaseId))
			{
				return false;
			}

			if (!ExampleSkillIds.Contains(ValidationCase.SkillId))
			{
				return false;
			}

			for (const FString& SectionId : ValidationCase.RequiredTemplateSectionIds)
			{
				if (!SeenSectionIds.Contains(SectionId))
				{
					return false;
				}
			}

			if (ValidationCase.Kind == EHyperTwistSkillValidationContractKind::Smoke)
			{
				SkillsWithSmokeContract.AddUnique(ValidationCase.SkillId);
			}
			else if (ValidationCase.Kind == EHyperTwistSkillValidationContractKind::Eval)
			{
				SkillsWithEvalContract.AddUnique(ValidationCase.SkillId);
			}

			bComputedValidationUsesAuditLedgerWhenLive &=
				ValidationCase.ExecutionMode != EHyperTwistSkillValidationExecutionMode::LiveContract
				|| ValidationCase.bUsesAuditLedgerEvidence;

			SeenCaseIds.Add(ValidationCase.CaseId);
		}

		return SkillsWithSmokeContractCount == SkillsWithSmokeContract.Num()
			&& SkillsWithEvalContractCount == SkillsWithEvalContract.Num()
			&& SkillsWithSmokeContractCount == SkillCount
			&& SkillsWithEvalContractCount == SkillCount
			&& bExamplesGroundedInFirstPartyRegistry == bComputedExamplesGroundedInRegistry
			&& bValidationHarnessUsesAuditLedgerWhenLive
				== bComputedValidationUsesAuditLedgerWhenLive;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillAnalyzerWrapperOutput
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString WrapperOutputId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString SkillId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString DisplayLabel;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString OutputKindId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString CommandSurfaceId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ServiceBindingId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString OwnerLaneId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString OwnerFeatureId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ArtifactKind;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> PermissionScopeIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bLiveWrapper = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bStableInvocationPattern = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bStructuredOutput = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bDerivedAssistiveOnly = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		if (WrapperOutputId.IsEmpty()
			|| SkillId.IsEmpty()
			|| DisplayLabel.IsEmpty()
			|| OutputKindId.IsEmpty()
			|| CommandSurfaceId.IsEmpty()
			|| ServiceBindingId.IsEmpty()
			|| OwnerLaneId.IsEmpty()
			|| OwnerFeatureId.IsEmpty()
			|| ArtifactKind.IsEmpty()
			|| PermissionScopeIds.Num() == 0
			|| !bLiveWrapper
			|| !bStableInvocationPattern
			|| !bStructuredOutput
			|| !bDerivedAssistiveOnly)
		{
			return false;
		}

		for (const FString& ScopeId : PermissionScopeIds)
		{
			if (ScopeId.IsEmpty())
			{
				return false;
			}
		}

		return true;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillAnalyzerWrapperState
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString RegistryId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ManifestVersion;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ReferenceUtc;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString CommandSurfaceRootId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString TemplateVersion;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FHyperTwistSkillAnalyzerWrapperOutput> Outputs;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 SkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 OutputCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 ArchitectureScanCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 PolicyScanCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 RouteInspectionCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 WatchAndRecheckCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEveryWrapperMapsToStableInvocationPattern = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEveryWrapperEmitsStructuredOutput = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bOnlyImplementedPermissiveWrappersIncluded = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		if (RegistryId.IsEmpty()
			|| ManifestVersion.IsEmpty()
			|| ReferenceUtc.IsEmpty()
			|| CommandSurfaceRootId.IsEmpty()
			|| TemplateVersion.IsEmpty()
			|| Outputs.Num() == 0
			|| SkillCount <= 0
			|| OutputCount != Outputs.Num()
			|| ArchitectureScanCount < 0
			|| PolicyScanCount < 0
			|| RouteInspectionCount < 0
			|| WatchAndRecheckCount < 0
			|| !bEveryWrapperMapsToStableInvocationPattern
			|| !bEveryWrapperEmitsStructuredOutput
			|| !bOnlyImplementedPermissiveWrappersIncluded)
		{
			return false;
		}

		TArray<FString> SeenOutputIds;
		TArray<FString> SeenSkillIds;
		int32 ComputedArchitectureScanCount = 0;
		int32 ComputedPolicyScanCount = 0;
		int32 ComputedRouteInspectionCount = 0;
		int32 ComputedWatchAndRecheckCount = 0;
		bool bComputedStableInvocationPattern = true;
		bool bComputedStructuredOutput = true;
		bool bComputedOnlyImplementedPermissiveWrappersIncluded = true;

		for (const FHyperTwistSkillAnalyzerWrapperOutput& Output : Outputs)
		{
			if (!Output.IsStructurallyValid() || SeenOutputIds.Contains(Output.WrapperOutputId))
			{
				return false;
			}

			SeenOutputIds.Add(Output.WrapperOutputId);
			SeenSkillIds.AddUnique(Output.SkillId);
			bComputedStableInvocationPattern &= Output.bStableInvocationPattern;
			bComputedStructuredOutput &= Output.bStructuredOutput;
			bComputedOnlyImplementedPermissiveWrappersIncluded &=
				Output.SkillId == TEXT("skill/review-architecture")
				|| Output.SkillId == TEXT("skill/memory-resume-briefing")
				|| Output.SkillId == TEXT("skill/provider-routing-inspector");

			if (Output.OutputKindId == TEXT("wrapper-output/architecture-scan"))
			{
				ComputedArchitectureScanCount += 1;
			}
			else if (Output.OutputKindId == TEXT("wrapper-output/policy-scan"))
			{
				ComputedPolicyScanCount += 1;
			}
			else if (Output.OutputKindId == TEXT("wrapper-output/route-inspection"))
			{
				ComputedRouteInspectionCount += 1;
			}
			else if (Output.OutputKindId == TEXT("wrapper-output/watch-and-recheck"))
			{
				ComputedWatchAndRecheckCount += 1;
			}
			else
			{
				return false;
			}
		}

		return SkillCount == SeenSkillIds.Num()
			&& ArchitectureScanCount == ComputedArchitectureScanCount
			&& PolicyScanCount == ComputedPolicyScanCount
			&& RouteInspectionCount == ComputedRouteInspectionCount
			&& WatchAndRecheckCount == ComputedWatchAndRecheckCount
			&& bEveryWrapperMapsToStableInvocationPattern == bComputedStableInvocationPattern
			&& bEveryWrapperEmitsStructuredOutput == bComputedStructuredOutput
			&& bOnlyImplementedPermissiveWrappersIncluded
				== bComputedOnlyImplementedPermissiveWrappersIncluded;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillCleanRoomCommandContractSpec
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString SpecId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString SkillId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString DisplayLabel;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString CommandSurfaceId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ServiceBindingId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString OwnerLaneId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString OwnerFeatureId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString InvocationPattern;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ArtifactKind;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> PermissionScopeIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> RequiredTemplateSectionIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> SafetyRuleIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	EHyperTwistSkillValidationExecutionMode SmokeExecutionMode =
		EHyperTwistSkillValidationExecutionMode::None;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	EHyperTwistSkillValidationExecutionMode EvalExecutionMode =
		EHyperTwistSkillValidationExecutionMode::None;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bUsesFirstPartyTermsOnly = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bAvoidsDonorWording = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bPreservesOptionalAssistiveOffState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bDerivedAssistiveOnly = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bRequiresProvenanceLedger = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bNoProductTruthMutation = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bFutureWrapperMayBindWithoutContractRewrite = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		if (SpecId.IsEmpty()
			|| SkillId.IsEmpty()
			|| DisplayLabel.IsEmpty()
			|| CommandSurfaceId.IsEmpty()
			|| ServiceBindingId.IsEmpty()
			|| OwnerLaneId.IsEmpty()
			|| OwnerFeatureId.IsEmpty()
			|| InvocationPattern.IsEmpty()
			|| ArtifactKind.IsEmpty()
			|| PermissionScopeIds.Num() == 0
			|| RequiredTemplateSectionIds.Num() == 0
			|| SafetyRuleIds.Num() == 0
			|| SmokeExecutionMode != EHyperTwistSkillValidationExecutionMode::DeclarationOnly
			|| EvalExecutionMode
				!= EHyperTwistSkillValidationExecutionMode::DeferredUntilCleanRoomSkillSpec
			|| !bUsesFirstPartyTermsOnly
			|| !bAvoidsDonorWording
			|| !bPreservesOptionalAssistiveOffState
			|| !bDerivedAssistiveOnly
			|| !bRequiresProvenanceLedger
			|| !bNoProductTruthMutation
			|| !bFutureWrapperMayBindWithoutContractRewrite)
		{
			return false;
		}

		for (const FString& ScopeId : PermissionScopeIds)
		{
			if (ScopeId.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& SectionId : RequiredTemplateSectionIds)
		{
			if (SectionId.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& SafetyRuleId : SafetyRuleIds)
		{
			if (SafetyRuleId.IsEmpty())
			{
				return false;
			}
		}

		return true;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillCleanRoomCommandContractState
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString RegistryId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ManifestVersion;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ReferenceUtc;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString CommandSurfaceRootId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString TemplateVersion;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FHyperTwistSkillCleanRoomCommandContractSpec> Specs;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 SkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 SpecCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 SafetyRuleCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySpecUsesFirstPartyTerms = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySpecAvoidsDonorWording = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySpecPreservesOptionalAssistiveOffState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySpecRestrictsToDerivedAssistiveOutput = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySpecRequiresProvenanceLedger = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySpecAvoidsProductTruthMutation = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySpecMayBindFutureWrapperWithoutContractRewrite = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySpecHasAuthoringHarnessCoverage = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySpecDefersEvalUntilCleanRoomSkillSpec = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		if (RegistryId.IsEmpty()
			|| ManifestVersion.IsEmpty()
			|| ReferenceUtc.IsEmpty()
			|| CommandSurfaceRootId.IsEmpty()
			|| TemplateVersion.IsEmpty()
			|| Specs.Num() == 0
			|| SkillCount <= 0
			|| SpecCount != Specs.Num()
			|| SafetyRuleCount <= 0
			|| !bEverySpecUsesFirstPartyTerms
			|| !bEverySpecAvoidsDonorWording
			|| !bEverySpecPreservesOptionalAssistiveOffState
			|| !bEverySpecRestrictsToDerivedAssistiveOutput
			|| !bEverySpecRequiresProvenanceLedger
			|| !bEverySpecAvoidsProductTruthMutation
			|| !bEverySpecMayBindFutureWrapperWithoutContractRewrite
			|| !bEverySpecHasAuthoringHarnessCoverage
			|| !bEverySpecDefersEvalUntilCleanRoomSkillSpec)
		{
			return false;
		}

		TArray<FString> SeenSpecIds;
		TArray<FString> SeenSkillIds;
		TArray<FString> SeenSafetyRuleIds;
		bool bComputedFirstPartyTerms = true;
		bool bComputedAvoidsDonorWording = true;
		bool bComputedPreservesOffState = true;
		bool bComputedDerivedAssistiveOnly = true;
		bool bComputedRequiresProvenanceLedger = true;
		bool bComputedAvoidsProductTruthMutation = true;
		bool bComputedMayBindWithoutRewrite = true;
		bool bComputedHasHarnessCoverage = true;
		bool bComputedDefersEvalUntilSkillSpec = true;

		for (const FHyperTwistSkillCleanRoomCommandContractSpec& Spec : Specs)
		{
			if (!Spec.IsStructurallyValid() || SeenSpecIds.Contains(Spec.SpecId))
			{
				return false;
			}

			SeenSpecIds.Add(Spec.SpecId);
			SeenSkillIds.AddUnique(Spec.SkillId);
			bComputedFirstPartyTerms &= Spec.bUsesFirstPartyTermsOnly;
			bComputedAvoidsDonorWording &= Spec.bAvoidsDonorWording;
			bComputedPreservesOffState &= Spec.bPreservesOptionalAssistiveOffState;
			bComputedDerivedAssistiveOnly &= Spec.bDerivedAssistiveOnly;
			bComputedRequiresProvenanceLedger &= Spec.bRequiresProvenanceLedger;
			bComputedAvoidsProductTruthMutation &= Spec.bNoProductTruthMutation;
			bComputedMayBindWithoutRewrite &= Spec.bFutureWrapperMayBindWithoutContractRewrite;
			bComputedHasHarnessCoverage &= Spec.RequiredTemplateSectionIds.Num() > 0;
			bComputedDefersEvalUntilSkillSpec &=
				Spec.EvalExecutionMode
				== EHyperTwistSkillValidationExecutionMode::DeferredUntilCleanRoomSkillSpec;

			for (const FString& SafetyRuleId : Spec.SafetyRuleIds)
			{
				SeenSafetyRuleIds.AddUnique(SafetyRuleId);
			}
		}

		return SkillCount == SeenSkillIds.Num()
			&& SafetyRuleCount == SeenSafetyRuleIds.Num()
			&& bEverySpecUsesFirstPartyTerms == bComputedFirstPartyTerms
			&& bEverySpecAvoidsDonorWording == bComputedAvoidsDonorWording
			&& bEverySpecPreservesOptionalAssistiveOffState == bComputedPreservesOffState
			&& bEverySpecRestrictsToDerivedAssistiveOutput == bComputedDerivedAssistiveOnly
			&& bEverySpecRequiresProvenanceLedger == bComputedRequiresProvenanceLedger
			&& bEverySpecAvoidsProductTruthMutation == bComputedAvoidsProductTruthMutation
			&& bEverySpecMayBindFutureWrapperWithoutContractRewrite == bComputedMayBindWithoutRewrite
			&& bEverySpecHasAuthoringHarnessCoverage == bComputedHasHarnessCoverage
			&& bEverySpecDefersEvalUntilCleanRoomSkillSpec == bComputedDefersEvalUntilSkillSpec;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillCleanRoomSkillSpec
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString SkillSpecId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString SkillId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString DisplayLabel;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString CommandContractSpecId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString CommandSurfaceId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ServiceBindingId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString OwnerLaneId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString OwnerFeatureId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> InputStateKinds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> OutputArtifactKinds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> SpecStepIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> SafetyRuleIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> RequiredTemplateSectionIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	EHyperTwistSkillValidationExecutionMode SmokeExecutionMode =
		EHyperTwistSkillValidationExecutionMode::None;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	EHyperTwistSkillValidationExecutionMode EvalExecutionMode =
		EHyperTwistSkillValidationExecutionMode::None;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bUsesFirstPartyTermsOnly = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bAvoidsDonorWording = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bSpecReadyForFutureImplementation = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bNotLiveImplementationYet = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bPreservesOptionalAssistiveOffState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bDerivedAssistiveOnly = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bRequiresProvenanceLedger = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bNoProductTruthMutation = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		if (SkillSpecId.IsEmpty()
			|| SkillId.IsEmpty()
			|| DisplayLabel.IsEmpty()
			|| CommandContractSpecId.IsEmpty()
			|| CommandSurfaceId.IsEmpty()
			|| ServiceBindingId.IsEmpty()
			|| OwnerLaneId.IsEmpty()
			|| OwnerFeatureId.IsEmpty()
			|| InputStateKinds.Num() == 0
			|| OutputArtifactKinds.Num() == 0
			|| SpecStepIds.Num() == 0
			|| SafetyRuleIds.Num() == 0
			|| RequiredTemplateSectionIds.Num() == 0
			|| SmokeExecutionMode != EHyperTwistSkillValidationExecutionMode::DeclarationOnly
			|| EvalExecutionMode != EHyperTwistSkillValidationExecutionMode::DeclarationOnly
			|| !bUsesFirstPartyTermsOnly
			|| !bAvoidsDonorWording
			|| !bSpecReadyForFutureImplementation
			|| !bNotLiveImplementationYet
			|| !bPreservesOptionalAssistiveOffState
			|| !bDerivedAssistiveOnly
			|| !bRequiresProvenanceLedger
			|| !bNoProductTruthMutation)
		{
			return false;
		}

		for (const FString& Value : InputStateKinds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : OutputArtifactKinds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : SpecStepIds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : SafetyRuleIds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : RequiredTemplateSectionIds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		return true;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillCleanRoomSkillSpecState
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString RegistryId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ManifestVersion;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ReferenceUtc;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString CommandSurfaceRootId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString TemplateVersion;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FHyperTwistSkillCleanRoomSkillSpec> Specs;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 SkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 SpecCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 StepCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 SafetyRuleCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySpecUsesFirstPartyTerms = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySpecAvoidsDonorWording = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySpecBindsToCommandContractState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySpecReadyForFutureImplementation = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bNoSpecClaimsLiveImplementation = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySpecPreservesOptionalAssistiveOffState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySpecRestrictsToDerivedAssistiveOutput = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySpecRequiresProvenanceLedger = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySpecAvoidsProductTruthMutation = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySpecHasAuthoringHarnessCoverage = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySpecUsesDeclarationOnlyValidation = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		if (RegistryId.IsEmpty()
			|| ManifestVersion.IsEmpty()
			|| ReferenceUtc.IsEmpty()
			|| CommandSurfaceRootId.IsEmpty()
			|| TemplateVersion.IsEmpty()
			|| Specs.Num() == 0
			|| SkillCount <= 0
			|| SpecCount != Specs.Num()
			|| StepCount <= 0
			|| SafetyRuleCount <= 0
			|| !bEverySpecUsesFirstPartyTerms
			|| !bEverySpecAvoidsDonorWording
			|| !bEverySpecBindsToCommandContractState
			|| !bEverySpecReadyForFutureImplementation
			|| !bNoSpecClaimsLiveImplementation
			|| !bEverySpecPreservesOptionalAssistiveOffState
			|| !bEverySpecRestrictsToDerivedAssistiveOutput
			|| !bEverySpecRequiresProvenanceLedger
			|| !bEverySpecAvoidsProductTruthMutation
			|| !bEverySpecHasAuthoringHarnessCoverage
			|| !bEverySpecUsesDeclarationOnlyValidation)
		{
			return false;
		}

		TArray<FString> SeenSpecIds;
		TArray<FString> SeenSkillIds;
		TArray<FString> SeenStepIds;
		TArray<FString> SeenSafetyRuleIds;
		bool bComputedFirstPartyTerms = true;
		bool bComputedAvoidsDonorWording = true;
		bool bComputedBindsToCommandContractState = true;
		bool bComputedReadyForFutureImplementation = true;
		bool bComputedNoLiveImplementation = true;
		bool bComputedPreservesOffState = true;
		bool bComputedDerivedAssistiveOnly = true;
		bool bComputedRequiresProvenanceLedger = true;
		bool bComputedAvoidsProductTruthMutation = true;
		bool bComputedHasHarnessCoverage = true;
		bool bComputedUsesDeclarationOnlyValidation = true;

		for (const FHyperTwistSkillCleanRoomSkillSpec& Spec : Specs)
		{
			if (!Spec.IsStructurallyValid() || SeenSpecIds.Contains(Spec.SkillSpecId))
			{
				return false;
			}

			SeenSpecIds.Add(Spec.SkillSpecId);
			SeenSkillIds.AddUnique(Spec.SkillId);
			bComputedFirstPartyTerms &= Spec.bUsesFirstPartyTermsOnly;
			bComputedAvoidsDonorWording &= Spec.bAvoidsDonorWording;
			bComputedBindsToCommandContractState &= !Spec.CommandContractSpecId.IsEmpty();
			bComputedReadyForFutureImplementation &= Spec.bSpecReadyForFutureImplementation;
			bComputedNoLiveImplementation &= Spec.bNotLiveImplementationYet;
			bComputedPreservesOffState &= Spec.bPreservesOptionalAssistiveOffState;
			bComputedDerivedAssistiveOnly &= Spec.bDerivedAssistiveOnly;
			bComputedRequiresProvenanceLedger &= Spec.bRequiresProvenanceLedger;
			bComputedAvoidsProductTruthMutation &= Spec.bNoProductTruthMutation;
			bComputedHasHarnessCoverage &= Spec.RequiredTemplateSectionIds.Num() > 0;
			bComputedUsesDeclarationOnlyValidation &=
				Spec.SmokeExecutionMode == EHyperTwistSkillValidationExecutionMode::DeclarationOnly
				&& Spec.EvalExecutionMode == EHyperTwistSkillValidationExecutionMode::DeclarationOnly;

			for (const FString& StepId : Spec.SpecStepIds)
			{
				SeenStepIds.AddUnique(StepId);
			}

			for (const FString& SafetyRuleId : Spec.SafetyRuleIds)
			{
				SeenSafetyRuleIds.AddUnique(SafetyRuleId);
			}
		}

		return SkillCount == SeenSkillIds.Num()
			&& StepCount == SeenStepIds.Num()
			&& SafetyRuleCount == SeenSafetyRuleIds.Num()
			&& bEverySpecUsesFirstPartyTerms == bComputedFirstPartyTerms
			&& bEverySpecAvoidsDonorWording == bComputedAvoidsDonorWording
			&& bEverySpecBindsToCommandContractState == bComputedBindsToCommandContractState
			&& bEverySpecReadyForFutureImplementation == bComputedReadyForFutureImplementation
			&& bNoSpecClaimsLiveImplementation == bComputedNoLiveImplementation
			&& bEverySpecPreservesOptionalAssistiveOffState == bComputedPreservesOffState
			&& bEverySpecRestrictsToDerivedAssistiveOutput == bComputedDerivedAssistiveOnly
			&& bEverySpecRequiresProvenanceLedger == bComputedRequiresProvenanceLedger
			&& bEverySpecAvoidsProductTruthMutation == bComputedAvoidsProductTruthMutation
			&& bEverySpecHasAuthoringHarnessCoverage == bComputedHasHarnessCoverage
			&& bEverySpecUsesDeclarationOnlyValidation == bComputedUsesDeclarationOnlyValidation;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillContinuityResumeSkill
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString SkillId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString DisplayLabel;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString CommandSurfaceId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ServiceBindingId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString OwnerLaneId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString OwnerFeatureId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	EHyperTwistSkillStatus Status = EHyperTwistSkillStatus::None;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> PermissionScopeIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> InputStateKinds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> OutputArtifactKinds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> PreviewHeadlines;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 AvailableItemCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 BlockingItemCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bLiveSkill = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bReadsAuthoritativeStores = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bAvailableNow = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bRequiresOwnerActivation = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bPreservesOptionalAssistiveOffState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bDerivedAssistiveOnly = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bHasValidationHarnessCoverage = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		if (SkillId.IsEmpty()
			|| DisplayLabel.IsEmpty()
			|| CommandSurfaceId.IsEmpty()
			|| ServiceBindingId.IsEmpty()
			|| OwnerLaneId.IsEmpty()
			|| OwnerFeatureId.IsEmpty()
			|| Status == EHyperTwistSkillStatus::None
			|| PermissionScopeIds.Num() == 0
			|| InputStateKinds.Num() == 0
			|| OutputArtifactKinds.Num() == 0
			|| PreviewHeadlines.Num() == 0
			|| AvailableItemCount < 0
			|| BlockingItemCount < 0
			|| !bReadsAuthoritativeStores
			|| !bPreservesOptionalAssistiveOffState
			|| !bDerivedAssistiveOnly
			|| !bHasValidationHarnessCoverage)
		{
			return false;
		}

		for (const FString& Value : PermissionScopeIds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : InputStateKinds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : OutputArtifactKinds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : PreviewHeadlines)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		if (Status == EHyperTwistSkillStatus::ImplementedNow)
		{
			return bLiveSkill && bAvailableNow && !bRequiresOwnerActivation;
		}

		if (Status == EHyperTwistSkillStatus::CommandContractPending)
		{
			return !bLiveSkill && !bAvailableNow && bRequiresOwnerActivation;
		}

		return false;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillContinuityResumeState
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString RegistryId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ManifestVersion;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ReferenceUtc;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString CommandSurfaceRootId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString TemplateVersion;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FHyperTwistSkillContinuityResumeSkill> Skills;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 SkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 LiveSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 AvailableNowCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 PendingSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 ResumeSessionSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 SearchHistorySkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 CaptureNoteSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEveryLiveSkillReadsAuthoritativeStores = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySkillPreservesOptionalAssistiveOffState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEveryLiveSkillHasValidationHarnessCoverage = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bNoSkillClaimsActiveUserNoteCaptureWithoutOwnerActivation = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		if (RegistryId.IsEmpty()
			|| ManifestVersion.IsEmpty()
			|| ReferenceUtc.IsEmpty()
			|| CommandSurfaceRootId.IsEmpty()
			|| TemplateVersion.IsEmpty()
			|| Skills.Num() == 0
			|| SkillCount != Skills.Num()
			|| !bEveryLiveSkillReadsAuthoritativeStores
			|| !bEverySkillPreservesOptionalAssistiveOffState
			|| !bEveryLiveSkillHasValidationHarnessCoverage
			|| !bNoSkillClaimsActiveUserNoteCaptureWithoutOwnerActivation)
		{
			return false;
		}

		TArray<FString> SeenSkillIds;
		int32 ComputedLiveSkillCount = 0;
		int32 ComputedAvailableNowCount = 0;
		int32 ComputedPendingSkillCount = 0;
		int32 ComputedResumeSessionSkillCount = 0;
		int32 ComputedSearchHistorySkillCount = 0;
		int32 ComputedCaptureNoteSkillCount = 0;
		bool bComputedEveryLiveSkillReadsAuthoritativeStores = true;
		bool bComputedEverySkillPreservesOptionalAssistiveOffState = true;
		bool bComputedEveryLiveSkillHasValidationHarnessCoverage = true;
		bool bComputedCaptureNoteGuard = false;

		for (const FHyperTwistSkillContinuityResumeSkill& Skill : Skills)
		{
			if (!Skill.IsStructurallyValid() || SeenSkillIds.Contains(Skill.SkillId))
			{
				return false;
			}

			SeenSkillIds.Add(Skill.SkillId);
			ComputedLiveSkillCount += Skill.bLiveSkill ? 1 : 0;
			ComputedAvailableNowCount += Skill.bAvailableNow ? 1 : 0;
			ComputedPendingSkillCount +=
				Skill.Status == EHyperTwistSkillStatus::CommandContractPending ? 1 : 0;
			ComputedResumeSessionSkillCount +=
				Skill.SkillId == TEXT("skill/resume-session") ? 1 : 0;
			ComputedSearchHistorySkillCount +=
				Skill.SkillId == TEXT("skill/search-history") ? 1 : 0;
			ComputedCaptureNoteSkillCount +=
				Skill.SkillId == TEXT("skill/capture-note") ? 1 : 0;
			bComputedEverySkillPreservesOptionalAssistiveOffState &=
				Skill.bPreservesOptionalAssistiveOffState;

			if (Skill.bLiveSkill)
			{
				bComputedEveryLiveSkillReadsAuthoritativeStores &= Skill.bReadsAuthoritativeStores;
				bComputedEveryLiveSkillHasValidationHarnessCoverage &=
					Skill.bHasValidationHarnessCoverage;
			}

			if (Skill.SkillId == TEXT("skill/capture-note"))
			{
				bComputedCaptureNoteGuard =
					!Skill.bLiveSkill && !Skill.bAvailableNow && Skill.bRequiresOwnerActivation;
			}
		}

		return LiveSkillCount == ComputedLiveSkillCount
			&& AvailableNowCount == ComputedAvailableNowCount
			&& PendingSkillCount == ComputedPendingSkillCount
			&& ResumeSessionSkillCount == ComputedResumeSessionSkillCount
			&& SearchHistorySkillCount == ComputedSearchHistorySkillCount
			&& CaptureNoteSkillCount == ComputedCaptureNoteSkillCount
			&& bEveryLiveSkillReadsAuthoritativeStores
				== bComputedEveryLiveSkillReadsAuthoritativeStores
			&& bEverySkillPreservesOptionalAssistiveOffState
				== bComputedEverySkillPreservesOptionalAssistiveOffState
			&& bEveryLiveSkillHasValidationHarnessCoverage
				== bComputedEveryLiveSkillHasValidationHarnessCoverage
			&& bNoSkillClaimsActiveUserNoteCaptureWithoutOwnerActivation
				== bComputedCaptureNoteGuard;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillRecallCompactViewSkill
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString SkillId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString DisplayLabel;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString CommandSurfaceId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ServiceBindingId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString OwnerLaneId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString OwnerFeatureId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	EHyperTwistSkillStatus Status = EHyperTwistSkillStatus::None;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> PermissionScopeIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> InputStateKinds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> OutputArtifactKinds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> PreviewHeadlines;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 AvailableItemCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 LinkedSourceCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bLiveSkill = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bReadsAuthoritativeStores = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bAvailableNow = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bRequiresOwnerActivation = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bPreservesOptionalAssistiveOffState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bDerivedAssistiveOnly = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bHasValidationHarnessCoverage = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bOptionalCompactView = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bLinkedToAuthoritativeSources = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		if (SkillId.IsEmpty()
			|| DisplayLabel.IsEmpty()
			|| CommandSurfaceId.IsEmpty()
			|| ServiceBindingId.IsEmpty()
			|| OwnerLaneId.IsEmpty()
			|| OwnerFeatureId.IsEmpty()
			|| Status == EHyperTwistSkillStatus::None
			|| PermissionScopeIds.Num() == 0
			|| InputStateKinds.Num() == 0
			|| OutputArtifactKinds.Num() == 0
			|| PreviewHeadlines.Num() == 0
			|| AvailableItemCount < 0
			|| LinkedSourceCount <= 0
			|| !bReadsAuthoritativeStores
			|| !bPreservesOptionalAssistiveOffState
			|| !bDerivedAssistiveOnly
			|| !bHasValidationHarnessCoverage
			|| !bLinkedToAuthoritativeSources)
		{
			return false;
		}

		for (const FString& Value : PermissionScopeIds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : InputStateKinds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : OutputArtifactKinds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : PreviewHeadlines)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		if (Status == EHyperTwistSkillStatus::ImplementedNow)
		{
			return bLiveSkill && bAvailableNow && !bRequiresOwnerActivation;
		}

		return false;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillRecallCompactViewState
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString RegistryId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ManifestVersion;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ReferenceUtc;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString CommandSurfaceRootId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString TemplateVersion;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FHyperTwistSkillRecallCompactViewSkill> Skills;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 SkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 LiveSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 AvailableNowCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 RecallMemorySkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 GenerateCompactViewSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEveryLiveSkillReadsAuthoritativeStores = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySkillPreservesOptionalAssistiveOffState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEveryLiveSkillHasValidationHarnessCoverage = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bCompactViewsRemainOptionalAndLinkedToAuthoritativeSources = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		if (RegistryId.IsEmpty()
			|| ManifestVersion.IsEmpty()
			|| ReferenceUtc.IsEmpty()
			|| CommandSurfaceRootId.IsEmpty()
			|| TemplateVersion.IsEmpty()
			|| Skills.Num() == 0
			|| SkillCount != Skills.Num()
			|| !bEveryLiveSkillReadsAuthoritativeStores
			|| !bEverySkillPreservesOptionalAssistiveOffState
			|| !bEveryLiveSkillHasValidationHarnessCoverage
			|| !bCompactViewsRemainOptionalAndLinkedToAuthoritativeSources)
		{
			return false;
		}

		TArray<FString> SeenSkillIds;
		int32 ComputedLiveSkillCount = 0;
		int32 ComputedAvailableNowCount = 0;
		int32 ComputedRecallMemorySkillCount = 0;
		int32 ComputedGenerateCompactViewSkillCount = 0;
		bool bComputedEveryLiveSkillReadsAuthoritativeStores = true;
		bool bComputedEverySkillPreservesOptionalAssistiveOffState = true;
		bool bComputedEveryLiveSkillHasValidationHarnessCoverage = true;
		bool bComputedCompactViewGuard = false;

		for (const FHyperTwistSkillRecallCompactViewSkill& Skill : Skills)
		{
			if (!Skill.IsStructurallyValid() || SeenSkillIds.Contains(Skill.SkillId))
			{
				return false;
			}

			SeenSkillIds.Add(Skill.SkillId);
			ComputedLiveSkillCount += Skill.bLiveSkill ? 1 : 0;
			ComputedAvailableNowCount += Skill.bAvailableNow ? 1 : 0;
			ComputedRecallMemorySkillCount +=
				Skill.SkillId == TEXT("skill/recall-memory") ? 1 : 0;
			ComputedGenerateCompactViewSkillCount +=
				Skill.SkillId == TEXT("skill/generate-compact-view") ? 1 : 0;
			bComputedEverySkillPreservesOptionalAssistiveOffState &=
				Skill.bPreservesOptionalAssistiveOffState;

			if (Skill.bLiveSkill)
			{
				bComputedEveryLiveSkillReadsAuthoritativeStores &= Skill.bReadsAuthoritativeStores;
				bComputedEveryLiveSkillHasValidationHarnessCoverage &=
					Skill.bHasValidationHarnessCoverage;
			}

			if (Skill.SkillId == TEXT("skill/generate-compact-view"))
			{
				bComputedCompactViewGuard =
					Skill.bOptionalCompactView && Skill.bLinkedToAuthoritativeSources;
			}
		}

		return LiveSkillCount == ComputedLiveSkillCount
			&& AvailableNowCount == ComputedAvailableNowCount
			&& RecallMemorySkillCount == ComputedRecallMemorySkillCount
			&& GenerateCompactViewSkillCount == ComputedGenerateCompactViewSkillCount
			&& bEveryLiveSkillReadsAuthoritativeStores
				== bComputedEveryLiveSkillReadsAuthoritativeStores
			&& bEverySkillPreservesOptionalAssistiveOffState
				== bComputedEverySkillPreservesOptionalAssistiveOffState
			&& bEveryLiveSkillHasValidationHarnessCoverage
				== bComputedEveryLiveSkillHasValidationHarnessCoverage
			&& bCompactViewsRemainOptionalAndLinkedToAuthoritativeSources
				== bComputedCompactViewGuard;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillWorkflowMemoryCaptureSkill
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString SkillId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString DisplayLabel;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString CommandSurfaceId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ServiceBindingId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString OwnerLaneId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString OwnerFeatureId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	EHyperTwistSkillStatus Status = EHyperTwistSkillStatus::None;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> PermissionScopeIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> InputStateKinds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> OutputArtifactKinds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> PreviewHeadlines;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 AvailableItemCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 LinkedWorkflowEntityCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 BlockingItemCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bLiveSkill = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bReadsAuthoritativeStores = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bAvailableNow = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bRequiresOwnerActivation = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bPreservesOptionalAssistiveOffState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bDerivedAssistiveOnly = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bHasValidationHarnessCoverage = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bAvoidsUserAuthoredNoteCapture = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bAvoidsOpaqueSummaryCollapse = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		if (SkillId.IsEmpty()
			|| DisplayLabel.IsEmpty()
			|| CommandSurfaceId.IsEmpty()
			|| ServiceBindingId.IsEmpty()
			|| OwnerLaneId.IsEmpty()
			|| OwnerFeatureId.IsEmpty()
			|| Status == EHyperTwistSkillStatus::None
			|| PermissionScopeIds.Num() == 0
			|| InputStateKinds.Num() == 0
			|| OutputArtifactKinds.Num() == 0
			|| PreviewHeadlines.Num() == 0
			|| AvailableItemCount <= 0
			|| LinkedWorkflowEntityCount <= 0
			|| BlockingItemCount < 0
			|| !bReadsAuthoritativeStores
			|| !bPreservesOptionalAssistiveOffState
			|| !bDerivedAssistiveOnly
			|| !bHasValidationHarnessCoverage
			|| !bAvoidsUserAuthoredNoteCapture
			|| !bAvoidsOpaqueSummaryCollapse)
		{
			return false;
		}

		for (const FString& Value : PermissionScopeIds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : InputStateKinds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : OutputArtifactKinds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : PreviewHeadlines)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		return Status == EHyperTwistSkillStatus::ImplementedNow
			&& bLiveSkill
			&& bAvailableNow
			&& !bRequiresOwnerActivation;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillWorkflowMemoryCaptureState
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString RegistryId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ManifestVersion;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ReferenceUtc;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString CommandSurfaceRootId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString TemplateVersion;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FHyperTwistSkillWorkflowMemoryCaptureSkill> Skills;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 SkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 LiveSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 AvailableNowCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 CaptureSessionTemplateSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 CaptureFollowUpRoutineSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEveryLiveSkillReadsAuthoritativeStores = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySkillPreservesOptionalAssistiveOffState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEveryLiveSkillHasValidationHarnessCoverage = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bWorkflowMemoryRemainsSeparateFromUserAuthoredNotes = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bWorkflowMemoryDoesNotCollapseIntoOpaqueSummaries = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		if (RegistryId.IsEmpty()
			|| ManifestVersion.IsEmpty()
			|| ReferenceUtc.IsEmpty()
			|| CommandSurfaceRootId.IsEmpty()
			|| TemplateVersion.IsEmpty()
			|| Skills.Num() == 0
			|| SkillCount != Skills.Num()
			|| !bEveryLiveSkillReadsAuthoritativeStores
			|| !bEverySkillPreservesOptionalAssistiveOffState
			|| !bEveryLiveSkillHasValidationHarnessCoverage
			|| !bWorkflowMemoryRemainsSeparateFromUserAuthoredNotes
			|| !bWorkflowMemoryDoesNotCollapseIntoOpaqueSummaries)
		{
			return false;
		}

		TArray<FString> SeenSkillIds;
		int32 ComputedLiveSkillCount = 0;
		int32 ComputedAvailableNowCount = 0;
		int32 ComputedCaptureSessionTemplateSkillCount = 0;
		int32 ComputedCaptureFollowUpRoutineSkillCount = 0;
		bool bComputedEveryLiveSkillReadsAuthoritativeStores = true;
		bool bComputedEverySkillPreservesOptionalAssistiveOffState = true;
		bool bComputedEveryLiveSkillHasValidationHarnessCoverage = true;
		bool bComputedUserNoteSeparation = true;
		bool bComputedOpaqueSummaryGuard = true;

		for (const FHyperTwistSkillWorkflowMemoryCaptureSkill& Skill : Skills)
		{
			if (!Skill.IsStructurallyValid() || SeenSkillIds.Contains(Skill.SkillId))
			{
				return false;
			}

			SeenSkillIds.Add(Skill.SkillId);
			ComputedLiveSkillCount += Skill.bLiveSkill ? 1 : 0;
			ComputedAvailableNowCount += Skill.bAvailableNow ? 1 : 0;
			ComputedCaptureSessionTemplateSkillCount +=
				Skill.SkillId == TEXT("skill/capture-session-template") ? 1 : 0;
			ComputedCaptureFollowUpRoutineSkillCount +=
				Skill.SkillId == TEXT("skill/capture-follow-up-routine") ? 1 : 0;
			bComputedEverySkillPreservesOptionalAssistiveOffState &=
				Skill.bPreservesOptionalAssistiveOffState;
			bComputedUserNoteSeparation &= Skill.bAvoidsUserAuthoredNoteCapture;
			bComputedOpaqueSummaryGuard &= Skill.bAvoidsOpaqueSummaryCollapse;

			if (Skill.bLiveSkill)
			{
				bComputedEveryLiveSkillReadsAuthoritativeStores &= Skill.bReadsAuthoritativeStores;
				bComputedEveryLiveSkillHasValidationHarnessCoverage &=
					Skill.bHasValidationHarnessCoverage;
			}
		}

		return LiveSkillCount == ComputedLiveSkillCount
			&& AvailableNowCount == ComputedAvailableNowCount
			&& CaptureSessionTemplateSkillCount
				== ComputedCaptureSessionTemplateSkillCount
			&& CaptureFollowUpRoutineSkillCount
				== ComputedCaptureFollowUpRoutineSkillCount
			&& bEveryLiveSkillReadsAuthoritativeStores
				== bComputedEveryLiveSkillReadsAuthoritativeStores
			&& bEverySkillPreservesOptionalAssistiveOffState
				== bComputedEverySkillPreservesOptionalAssistiveOffState
			&& bEveryLiveSkillHasValidationHarnessCoverage
				== bComputedEveryLiveSkillHasValidationHarnessCoverage
			&& bWorkflowMemoryRemainsSeparateFromUserAuthoredNotes
				== bComputedUserNoteSeparation
			&& bWorkflowMemoryDoesNotCollapseIntoOpaqueSummaries
				== bComputedOpaqueSummaryGuard;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillExtractionSkill
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString SkillId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString DisplayLabel;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString CommandSurfaceId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ServiceBindingId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString OwnerLaneId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString OwnerFeatureId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	EHyperTwistSkillStatus Status = EHyperTwistSkillStatus::None;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> PermissionScopeIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> SourceSurfaceIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> StructuredFieldIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> OutputArtifactKinds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> PreviewHeadlines;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 SourceSurfaceCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 StructuredFieldCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bLiveSkill = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bReadsAuthoritativeSourceSurfaces = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bAvailableNow = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bRequiresOwnerActivation = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bPreservesOptionalAssistiveOffState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bDerivedAssistiveOnly = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bHasValidationHarnessCoverage = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bStructuredExtractionOnly = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bAvoidsBrowserDiagnosticsWidening = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bAvoidsDesignTranslationWidening = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bExtractsDocumentation = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bExtractsDesignSpecs = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		if (SkillId.IsEmpty()
			|| DisplayLabel.IsEmpty()
			|| CommandSurfaceId.IsEmpty()
			|| ServiceBindingId.IsEmpty()
			|| OwnerLaneId.IsEmpty()
			|| OwnerFeatureId.IsEmpty()
			|| Status == EHyperTwistSkillStatus::None
			|| PermissionScopeIds.Num() == 0
			|| SourceSurfaceIds.Num() == 0
			|| StructuredFieldIds.Num() == 0
			|| OutputArtifactKinds.Num() == 0
			|| PreviewHeadlines.Num() == 0
			|| SourceSurfaceCount != SourceSurfaceIds.Num()
			|| StructuredFieldCount != StructuredFieldIds.Num()
			|| !bReadsAuthoritativeSourceSurfaces
			|| !bPreservesOptionalAssistiveOffState
			|| !bDerivedAssistiveOnly
			|| !bHasValidationHarnessCoverage
			|| !bStructuredExtractionOnly
			|| !bAvoidsBrowserDiagnosticsWidening
			|| !bAvoidsDesignTranslationWidening
			|| bExtractsDocumentation == bExtractsDesignSpecs)
		{
			return false;
		}

		for (const FString& Value : PermissionScopeIds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : SourceSurfaceIds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : StructuredFieldIds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : OutputArtifactKinds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : PreviewHeadlines)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		return Status == EHyperTwistSkillStatus::ImplementedNow
			&& bLiveSkill
			&& bAvailableNow
			&& !bRequiresOwnerActivation;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillExtractionState
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString RegistryId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ManifestVersion;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ReferenceUtc;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString CommandSurfaceRootId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString TemplateVersion;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FHyperTwistSkillExtractionSkill> Skills;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 SkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 LiveSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 AvailableNowCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 DocsExtractionSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 DesignSpecExtractionSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEveryLiveSkillReadsAuthoritativeSourceSurfaces = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySkillPreservesOptionalAssistiveOffState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEveryLiveSkillHasValidationHarnessCoverage = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bStructuredExtractionRemainsBounded = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bNoBrowserDiagnosticsWidening = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bNoDesignTranslationWidening = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		if (RegistryId.IsEmpty()
			|| ManifestVersion.IsEmpty()
			|| ReferenceUtc.IsEmpty()
			|| CommandSurfaceRootId.IsEmpty()
			|| TemplateVersion.IsEmpty()
			|| Skills.Num() == 0
			|| SkillCount != Skills.Num()
			|| !bEveryLiveSkillReadsAuthoritativeSourceSurfaces
			|| !bEverySkillPreservesOptionalAssistiveOffState
			|| !bEveryLiveSkillHasValidationHarnessCoverage
			|| !bStructuredExtractionRemainsBounded
			|| !bNoBrowserDiagnosticsWidening
			|| !bNoDesignTranslationWidening)
		{
			return false;
		}

		TArray<FString> SeenSkillIds;
		int32 ComputedLiveSkillCount = 0;
		int32 ComputedAvailableNowCount = 0;
		int32 ComputedDocsExtractionSkillCount = 0;
		int32 ComputedDesignSpecExtractionSkillCount = 0;
		bool bComputedEveryLiveSkillReadsAuthoritativeSourceSurfaces = true;
		bool bComputedEverySkillPreservesOptionalAssistiveOffState = true;
		bool bComputedEveryLiveSkillHasValidationHarnessCoverage = true;
		bool bComputedStructuredExtractionBounded = true;
		bool bComputedNoBrowserDiagnosticsWidening = true;
		bool bComputedNoDesignTranslationWidening = true;

		for (const FHyperTwistSkillExtractionSkill& Skill : Skills)
		{
			if (!Skill.IsStructurallyValid() || SeenSkillIds.Contains(Skill.SkillId))
			{
				return false;
			}

			SeenSkillIds.Add(Skill.SkillId);
			ComputedLiveSkillCount += Skill.bLiveSkill ? 1 : 0;
			ComputedAvailableNowCount += Skill.bAvailableNow ? 1 : 0;
			ComputedDocsExtractionSkillCount += Skill.bExtractsDocumentation ? 1 : 0;
			ComputedDesignSpecExtractionSkillCount += Skill.bExtractsDesignSpecs ? 1 : 0;
			bComputedEverySkillPreservesOptionalAssistiveOffState &=
				Skill.bPreservesOptionalAssistiveOffState;
			bComputedStructuredExtractionBounded &= Skill.bStructuredExtractionOnly;
			bComputedNoBrowserDiagnosticsWidening &=
				Skill.bAvoidsBrowserDiagnosticsWidening;
			bComputedNoDesignTranslationWidening &=
				Skill.bAvoidsDesignTranslationWidening;

			if (Skill.bLiveSkill)
			{
				bComputedEveryLiveSkillReadsAuthoritativeSourceSurfaces &=
					Skill.bReadsAuthoritativeSourceSurfaces;
				bComputedEveryLiveSkillHasValidationHarnessCoverage &=
					Skill.bHasValidationHarnessCoverage;
			}
		}

		return LiveSkillCount == ComputedLiveSkillCount
			&& AvailableNowCount == ComputedAvailableNowCount
			&& DocsExtractionSkillCount == ComputedDocsExtractionSkillCount
			&& DesignSpecExtractionSkillCount == ComputedDesignSpecExtractionSkillCount
			&& bEveryLiveSkillReadsAuthoritativeSourceSurfaces
				== bComputedEveryLiveSkillReadsAuthoritativeSourceSurfaces
			&& bEverySkillPreservesOptionalAssistiveOffState
				== bComputedEverySkillPreservesOptionalAssistiveOffState
			&& bEveryLiveSkillHasValidationHarnessCoverage
				== bComputedEveryLiveSkillHasValidationHarnessCoverage
			&& bStructuredExtractionRemainsBounded
				== bComputedStructuredExtractionBounded
			&& bNoBrowserDiagnosticsWidening
				== bComputedNoBrowserDiagnosticsWidening
			&& bNoDesignTranslationWidening
				== bComputedNoDesignTranslationWidening;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillBrowserDiagnosticSkill
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString SkillId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString DisplayLabel;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString CommandSurfaceId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ServiceBindingId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString OwnerLaneId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString OwnerFeatureId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	EHyperTwistSkillStatus Status = EHyperTwistSkillStatus::None;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> PermissionScopeIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> SourceSurfaceIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> RequiredExtractionSkillIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> OutputArtifactKinds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> PreviewHeadlines;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 SourceSurfaceCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 RequiredExtractionSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bLiveSkill = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bReadsAuthoritativeBrowserAndDocSurfaces = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bAvailableNow = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bRequiresOwnerActivation = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bPreservesOptionalAssistiveOffState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bDerivedAssistiveOnly = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bHasValidationHarnessCoverage = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bBoundedToDiagnosticsOnly = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bRequiresExtractionSubstrate = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bAvoidsDesignTranslationWidening = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bCapturesBrowserTrace = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bPerformsBrowserApiDiscovery = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		if (SkillId.IsEmpty()
			|| DisplayLabel.IsEmpty()
			|| CommandSurfaceId.IsEmpty()
			|| ServiceBindingId.IsEmpty()
			|| OwnerLaneId.IsEmpty()
			|| OwnerFeatureId.IsEmpty()
			|| Status == EHyperTwistSkillStatus::None
			|| PermissionScopeIds.Num() == 0
			|| SourceSurfaceIds.Num() == 0
			|| RequiredExtractionSkillIds.Num() == 0
			|| OutputArtifactKinds.Num() == 0
			|| PreviewHeadlines.Num() == 0
			|| SourceSurfaceCount != SourceSurfaceIds.Num()
			|| RequiredExtractionSkillCount != RequiredExtractionSkillIds.Num()
			|| !bReadsAuthoritativeBrowserAndDocSurfaces
			|| !bPreservesOptionalAssistiveOffState
			|| !bDerivedAssistiveOnly
			|| !bHasValidationHarnessCoverage
			|| !bBoundedToDiagnosticsOnly
			|| !bRequiresExtractionSubstrate
			|| !bAvoidsDesignTranslationWidening
			|| bCapturesBrowserTrace == bPerformsBrowserApiDiscovery)
		{
			return false;
		}

		for (const FString& Value : PermissionScopeIds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : SourceSurfaceIds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : RequiredExtractionSkillIds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : OutputArtifactKinds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : PreviewHeadlines)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		return Status == EHyperTwistSkillStatus::ImplementedNow
			&& bLiveSkill
			&& bAvailableNow
			&& !bRequiresOwnerActivation;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillBrowserDiagnosticsState
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString RegistryId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ManifestVersion;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ReferenceUtc;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString CommandSurfaceRootId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString TemplateVersion;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FHyperTwistSkillBrowserDiagnosticSkill> Skills;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 SkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 LiveSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 AvailableNowCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 BrowserTraceCaptureSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 BrowserApiDiscoverySkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEveryLiveSkillReadsAuthoritativeBrowserAndDocSurfaces = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySkillPreservesOptionalAssistiveOffState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEveryLiveSkillHasValidationHarnessCoverage = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bDiagnosticsRemainBounded = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySkillRequiresExtractionSubstrate = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bNoDesignTranslationWidening = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		if (RegistryId.IsEmpty()
			|| ManifestVersion.IsEmpty()
			|| ReferenceUtc.IsEmpty()
			|| CommandSurfaceRootId.IsEmpty()
			|| TemplateVersion.IsEmpty()
			|| Skills.Num() == 0
			|| SkillCount != Skills.Num()
			|| !bEveryLiveSkillReadsAuthoritativeBrowserAndDocSurfaces
			|| !bEverySkillPreservesOptionalAssistiveOffState
			|| !bEveryLiveSkillHasValidationHarnessCoverage
			|| !bDiagnosticsRemainBounded
			|| !bEverySkillRequiresExtractionSubstrate
			|| !bNoDesignTranslationWidening)
		{
			return false;
		}

		TArray<FString> SeenSkillIds;
		int32 ComputedLiveSkillCount = 0;
		int32 ComputedAvailableNowCount = 0;
		int32 ComputedBrowserTraceCaptureSkillCount = 0;
		int32 ComputedBrowserApiDiscoverySkillCount = 0;
		bool bComputedEveryLiveSkillReadsAuthoritativeBrowserAndDocSurfaces = true;
		bool bComputedEverySkillPreservesOptionalAssistiveOffState = true;
		bool bComputedEveryLiveSkillHasValidationHarnessCoverage = true;
		bool bComputedDiagnosticsRemainBounded = true;
		bool bComputedEverySkillRequiresExtractionSubstrate = true;
		bool bComputedNoDesignTranslationWidening = true;

		for (const FHyperTwistSkillBrowserDiagnosticSkill& Skill : Skills)
		{
			if (!Skill.IsStructurallyValid() || SeenSkillIds.Contains(Skill.SkillId))
			{
				return false;
			}

			SeenSkillIds.Add(Skill.SkillId);
			ComputedLiveSkillCount += Skill.bLiveSkill ? 1 : 0;
			ComputedAvailableNowCount += Skill.bAvailableNow ? 1 : 0;
			ComputedBrowserTraceCaptureSkillCount += Skill.bCapturesBrowserTrace ? 1 : 0;
			ComputedBrowserApiDiscoverySkillCount += Skill.bPerformsBrowserApiDiscovery ? 1 : 0;
			bComputedEverySkillPreservesOptionalAssistiveOffState &=
				Skill.bPreservesOptionalAssistiveOffState;
			bComputedDiagnosticsRemainBounded &= Skill.bBoundedToDiagnosticsOnly;
			bComputedEverySkillRequiresExtractionSubstrate &= Skill.bRequiresExtractionSubstrate;
			bComputedNoDesignTranslationWidening &= Skill.bAvoidsDesignTranslationWidening;

			if (Skill.bLiveSkill)
			{
				bComputedEveryLiveSkillReadsAuthoritativeBrowserAndDocSurfaces &=
					Skill.bReadsAuthoritativeBrowserAndDocSurfaces;
				bComputedEveryLiveSkillHasValidationHarnessCoverage &=
					Skill.bHasValidationHarnessCoverage;
			}
		}

		return LiveSkillCount == ComputedLiveSkillCount
			&& AvailableNowCount == ComputedAvailableNowCount
			&& BrowserTraceCaptureSkillCount == ComputedBrowserTraceCaptureSkillCount
			&& BrowserApiDiscoverySkillCount == ComputedBrowserApiDiscoverySkillCount
			&& bEveryLiveSkillReadsAuthoritativeBrowserAndDocSurfaces
				== bComputedEveryLiveSkillReadsAuthoritativeBrowserAndDocSurfaces
			&& bEverySkillPreservesOptionalAssistiveOffState
				== bComputedEverySkillPreservesOptionalAssistiveOffState
			&& bEveryLiveSkillHasValidationHarnessCoverage
				== bComputedEveryLiveSkillHasValidationHarnessCoverage
			&& bDiagnosticsRemainBounded == bComputedDiagnosticsRemainBounded
			&& bEverySkillRequiresExtractionSubstrate
				== bComputedEverySkillRequiresExtractionSubstrate
			&& bNoDesignTranslationWidening == bComputedNoDesignTranslationWidening;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillDesignShellSkill
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString SkillId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString DisplayLabel;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString CommandSurfaceId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ServiceBindingId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString OwnerLaneId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString OwnerFeatureId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	EHyperTwistSkillStatus Status = EHyperTwistSkillStatus::None;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> PermissionScopeIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> SourceSurfaceIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> RequiredExtractionSkillIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> RequiredBrowserDiagnosticSkillIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> OutputArtifactKinds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> PreviewHeadlines;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 SourceSurfaceCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 RequiredExtractionSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 RequiredBrowserDiagnosticSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bLiveSkill = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bReadsAuthoritativeDocsBrowserAndDesignSurfaces = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bAvailableNow = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bRequiresOwnerActivation = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bPreservesOptionalAssistiveOffState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bDerivedAssistiveOnly = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bHasValidationHarnessCoverage = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bBoundedToDesignShellOnly = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bRequiresExtractionSubstrate = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bRequiresBrowserDiagnosticsSubstrate = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bAvoidsGenericBrowserShellWidening = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bTranslatesDesignShell = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bTranslatesInteractionContract = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		if (SkillId.IsEmpty()
			|| DisplayLabel.IsEmpty()
			|| CommandSurfaceId.IsEmpty()
			|| ServiceBindingId.IsEmpty()
			|| OwnerLaneId.IsEmpty()
			|| OwnerFeatureId.IsEmpty()
			|| Status == EHyperTwistSkillStatus::None
			|| PermissionScopeIds.Num() == 0
			|| SourceSurfaceIds.Num() == 0
			|| RequiredExtractionSkillIds.Num() == 0
			|| RequiredBrowserDiagnosticSkillIds.Num() == 0
			|| OutputArtifactKinds.Num() == 0
			|| PreviewHeadlines.Num() == 0
			|| SourceSurfaceCount != SourceSurfaceIds.Num()
			|| RequiredExtractionSkillCount != RequiredExtractionSkillIds.Num()
			|| RequiredBrowserDiagnosticSkillCount != RequiredBrowserDiagnosticSkillIds.Num()
			|| !bReadsAuthoritativeDocsBrowserAndDesignSurfaces
			|| !bPreservesOptionalAssistiveOffState
			|| !bDerivedAssistiveOnly
			|| !bHasValidationHarnessCoverage
			|| !bBoundedToDesignShellOnly
			|| !bRequiresExtractionSubstrate
			|| !bRequiresBrowserDiagnosticsSubstrate
			|| !bAvoidsGenericBrowserShellWidening
			|| bTranslatesDesignShell == bTranslatesInteractionContract)
		{
			return false;
		}

		for (const FString& Value : PermissionScopeIds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : SourceSurfaceIds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : RequiredExtractionSkillIds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : RequiredBrowserDiagnosticSkillIds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : OutputArtifactKinds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : PreviewHeadlines)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		return Status == EHyperTwistSkillStatus::ImplementedNow
			&& bLiveSkill
			&& bAvailableNow
			&& !bRequiresOwnerActivation;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillDesignShellState
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString RegistryId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ManifestVersion;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ReferenceUtc;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString CommandSurfaceRootId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString TemplateVersion;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FHyperTwistSkillDesignShellSkill> Skills;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 SkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 LiveSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 AvailableNowCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 DesignShellTranslationSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 InteractionContractTranslationSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEveryLiveSkillReadsAuthoritativeDocsBrowserAndDesignSurfaces = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySkillPreservesOptionalAssistiveOffState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEveryLiveSkillHasValidationHarnessCoverage = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bDesignShellTranslationRemainsBounded = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySkillRequiresExtractionSubstrate = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySkillRequiresBrowserDiagnosticsSubstrate = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bNoGenericBrowserShellWidening = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		if (RegistryId.IsEmpty()
			|| ManifestVersion.IsEmpty()
			|| ReferenceUtc.IsEmpty()
			|| CommandSurfaceRootId.IsEmpty()
			|| TemplateVersion.IsEmpty()
			|| Skills.Num() == 0
			|| SkillCount != Skills.Num()
			|| !bEveryLiveSkillReadsAuthoritativeDocsBrowserAndDesignSurfaces
			|| !bEverySkillPreservesOptionalAssistiveOffState
			|| !bEveryLiveSkillHasValidationHarnessCoverage
			|| !bDesignShellTranslationRemainsBounded
			|| !bEverySkillRequiresExtractionSubstrate
			|| !bEverySkillRequiresBrowserDiagnosticsSubstrate
			|| !bNoGenericBrowserShellWidening)
		{
			return false;
		}

		TArray<FString> SeenSkillIds;
		int32 ComputedLiveSkillCount = 0;
		int32 ComputedAvailableNowCount = 0;
		int32 ComputedDesignShellTranslationSkillCount = 0;
		int32 ComputedInteractionContractTranslationSkillCount = 0;
		bool bComputedEveryLiveSkillReadsAuthoritativeDocsBrowserAndDesignSurfaces = true;
		bool bComputedEverySkillPreservesOptionalAssistiveOffState = true;
		bool bComputedEveryLiveSkillHasValidationHarnessCoverage = true;
		bool bComputedDesignShellTranslationRemainsBounded = true;
		bool bComputedEverySkillRequiresExtractionSubstrate = true;
		bool bComputedEverySkillRequiresBrowserDiagnosticsSubstrate = true;
		bool bComputedNoGenericBrowserShellWidening = true;

		for (const FHyperTwistSkillDesignShellSkill& Skill : Skills)
		{
			if (!Skill.IsStructurallyValid() || SeenSkillIds.Contains(Skill.SkillId))
			{
				return false;
			}

			SeenSkillIds.Add(Skill.SkillId);
			ComputedLiveSkillCount += Skill.bLiveSkill ? 1 : 0;
			ComputedAvailableNowCount += Skill.bAvailableNow ? 1 : 0;
			ComputedDesignShellTranslationSkillCount += Skill.bTranslatesDesignShell ? 1 : 0;
			ComputedInteractionContractTranslationSkillCount +=
				Skill.bTranslatesInteractionContract ? 1 : 0;
			bComputedEverySkillPreservesOptionalAssistiveOffState &=
				Skill.bPreservesOptionalAssistiveOffState;
			bComputedDesignShellTranslationRemainsBounded &=
				Skill.bBoundedToDesignShellOnly;
			bComputedEverySkillRequiresExtractionSubstrate &=
				Skill.bRequiresExtractionSubstrate;
			bComputedEverySkillRequiresBrowserDiagnosticsSubstrate &=
				Skill.bRequiresBrowserDiagnosticsSubstrate;
			bComputedNoGenericBrowserShellWidening &=
				Skill.bAvoidsGenericBrowserShellWidening;

			if (Skill.bLiveSkill)
			{
				bComputedEveryLiveSkillReadsAuthoritativeDocsBrowserAndDesignSurfaces &=
					Skill.bReadsAuthoritativeDocsBrowserAndDesignSurfaces;
				bComputedEveryLiveSkillHasValidationHarnessCoverage &=
					Skill.bHasValidationHarnessCoverage;
			}
		}

		return LiveSkillCount == ComputedLiveSkillCount
			&& AvailableNowCount == ComputedAvailableNowCount
			&& DesignShellTranslationSkillCount
				== ComputedDesignShellTranslationSkillCount
			&& InteractionContractTranslationSkillCount
				== ComputedInteractionContractTranslationSkillCount
			&& bEveryLiveSkillReadsAuthoritativeDocsBrowserAndDesignSurfaces
				== bComputedEveryLiveSkillReadsAuthoritativeDocsBrowserAndDesignSurfaces
			&& bEverySkillPreservesOptionalAssistiveOffState
				== bComputedEverySkillPreservesOptionalAssistiveOffState
			&& bEveryLiveSkillHasValidationHarnessCoverage
				== bComputedEveryLiveSkillHasValidationHarnessCoverage
			&& bDesignShellTranslationRemainsBounded
				== bComputedDesignShellTranslationRemainsBounded
			&& bEverySkillRequiresExtractionSubstrate
				== bComputedEverySkillRequiresExtractionSubstrate
			&& bEverySkillRequiresBrowserDiagnosticsSubstrate
				== bComputedEverySkillRequiresBrowserDiagnosticsSubstrate
			&& bNoGenericBrowserShellWidening
				== bComputedNoGenericBrowserShellWidening;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillWorkflowReviewSkill
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString SkillId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString DisplayLabel;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString CommandSurfaceId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ServiceBindingId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString OwnerLaneId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString OwnerFeatureId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	EHyperTwistSkillStatus Status = EHyperTwistSkillStatus::None;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> PermissionScopeIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> SourceSurfaceIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> RequiredExtractionSkillIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> RequiredWorkflowMemorySkillIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> RequiredDesignShellSkillIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> OutputArtifactKinds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> PreviewHeadlines;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 SourceSurfaceCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 RequiredExtractionSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 RequiredWorkflowMemorySkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 RequiredDesignShellSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bLiveSkill = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bReadsAuthoritativeWorkflowAndReviewSurfaces = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bAvailableNow = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bRequiresOwnerActivation = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bPreservesOptionalAssistiveOffState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bDerivedAssistiveOnly = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bHasValidationHarnessCoverage = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bBoundedToWorkflowReviewOnly = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bRequiresExtractionSubstrate = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bRequiresWorkflowMemorySubstrate = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bRequiresDesignShellSubstrate = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bAvoidsImplementationReviewDelegationWidening = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bAvoidsPlanSynthesisWidening = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bReviewsProposal = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bReviewsDiff = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bWrapsBoundedWorkflow = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		if (SkillId.IsEmpty()
			|| DisplayLabel.IsEmpty()
			|| CommandSurfaceId.IsEmpty()
			|| ServiceBindingId.IsEmpty()
			|| OwnerLaneId.IsEmpty()
			|| OwnerFeatureId.IsEmpty()
			|| Status == EHyperTwistSkillStatus::None
			|| PermissionScopeIds.Num() == 0
			|| SourceSurfaceIds.Num() == 0
			|| RequiredExtractionSkillIds.Num() == 0
			|| RequiredWorkflowMemorySkillIds.Num() == 0
			|| RequiredDesignShellSkillIds.Num() == 0
			|| OutputArtifactKinds.Num() == 0
			|| PreviewHeadlines.Num() == 0
			|| SourceSurfaceCount != SourceSurfaceIds.Num()
			|| RequiredExtractionSkillCount != RequiredExtractionSkillIds.Num()
			|| RequiredWorkflowMemorySkillCount != RequiredWorkflowMemorySkillIds.Num()
			|| RequiredDesignShellSkillCount != RequiredDesignShellSkillIds.Num()
			|| !bReadsAuthoritativeWorkflowAndReviewSurfaces
			|| !bPreservesOptionalAssistiveOffState
			|| !bDerivedAssistiveOnly
			|| !bHasValidationHarnessCoverage
			|| !bBoundedToWorkflowReviewOnly
			|| !bRequiresExtractionSubstrate
			|| !bRequiresWorkflowMemorySubstrate
			|| !bRequiresDesignShellSubstrate
			|| !bAvoidsImplementationReviewDelegationWidening
			|| !bAvoidsPlanSynthesisWidening)
		{
			return false;
		}

		for (const FString& Value : PermissionScopeIds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : SourceSurfaceIds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : RequiredExtractionSkillIds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : RequiredWorkflowMemorySkillIds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : RequiredDesignShellSkillIds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : OutputArtifactKinds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : PreviewHeadlines)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		const int32 ReviewModeCount =
			(bReviewsProposal ? 1 : 0) + (bReviewsDiff ? 1 : 0) + (bWrapsBoundedWorkflow ? 1 : 0);
		return ReviewModeCount == 1
			&& Status == EHyperTwistSkillStatus::ImplementedNow
			&& bLiveSkill
			&& bAvailableNow
			&& !bRequiresOwnerActivation;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillWorkflowReviewState
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString RegistryId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ManifestVersion;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ReferenceUtc;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString CommandSurfaceRootId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString TemplateVersion;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FHyperTwistSkillWorkflowReviewSkill> Skills;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 SkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 LiveSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 AvailableNowCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 ProposalReviewSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 DiffReviewSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 BoundedWorkflowWrapperSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEveryLiveSkillReadsAuthoritativeWorkflowAndReviewSurfaces = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySkillPreservesOptionalAssistiveOffState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEveryLiveSkillHasValidationHarnessCoverage = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bWorkflowReviewRemainsBounded = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySkillRequiresExtractionSubstrate = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySkillRequiresWorkflowMemorySubstrate = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySkillRequiresDesignShellSubstrate = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bNoImplementationReviewDelegationWidening = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bNoPlanSynthesisWidening = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		if (RegistryId.IsEmpty()
			|| ManifestVersion.IsEmpty()
			|| ReferenceUtc.IsEmpty()
			|| CommandSurfaceRootId.IsEmpty()
			|| TemplateVersion.IsEmpty()
			|| Skills.Num() == 0
			|| SkillCount != Skills.Num()
			|| !bEveryLiveSkillReadsAuthoritativeWorkflowAndReviewSurfaces
			|| !bEverySkillPreservesOptionalAssistiveOffState
			|| !bEveryLiveSkillHasValidationHarnessCoverage
			|| !bWorkflowReviewRemainsBounded
			|| !bEverySkillRequiresExtractionSubstrate
			|| !bEverySkillRequiresWorkflowMemorySubstrate
			|| !bEverySkillRequiresDesignShellSubstrate
			|| !bNoImplementationReviewDelegationWidening
			|| !bNoPlanSynthesisWidening)
		{
			return false;
		}

		TArray<FString> SeenSkillIds;
		int32 ComputedLiveSkillCount = 0;
		int32 ComputedAvailableNowCount = 0;
		int32 ComputedProposalReviewSkillCount = 0;
		int32 ComputedDiffReviewSkillCount = 0;
		int32 ComputedBoundedWorkflowWrapperSkillCount = 0;
		bool bComputedEveryLiveSkillReadsAuthoritativeWorkflowAndReviewSurfaces = true;
		bool bComputedEverySkillPreservesOptionalAssistiveOffState = true;
		bool bComputedEveryLiveSkillHasValidationHarnessCoverage = true;
		bool bComputedWorkflowReviewRemainsBounded = true;
		bool bComputedEverySkillRequiresExtractionSubstrate = true;
		bool bComputedEverySkillRequiresWorkflowMemorySubstrate = true;
		bool bComputedEverySkillRequiresDesignShellSubstrate = true;
		bool bComputedNoImplementationReviewDelegationWidening = true;
		bool bComputedNoPlanSynthesisWidening = true;

		for (const FHyperTwistSkillWorkflowReviewSkill& Skill : Skills)
		{
			if (!Skill.IsStructurallyValid() || SeenSkillIds.Contains(Skill.SkillId))
			{
				return false;
			}

			SeenSkillIds.Add(Skill.SkillId);
			ComputedLiveSkillCount += Skill.bLiveSkill ? 1 : 0;
			ComputedAvailableNowCount += Skill.bAvailableNow ? 1 : 0;
			ComputedProposalReviewSkillCount += Skill.bReviewsProposal ? 1 : 0;
			ComputedDiffReviewSkillCount += Skill.bReviewsDiff ? 1 : 0;
			ComputedBoundedWorkflowWrapperSkillCount += Skill.bWrapsBoundedWorkflow ? 1 : 0;
			bComputedEverySkillPreservesOptionalAssistiveOffState &=
				Skill.bPreservesOptionalAssistiveOffState;
			bComputedWorkflowReviewRemainsBounded &= Skill.bBoundedToWorkflowReviewOnly;
			bComputedEverySkillRequiresExtractionSubstrate &= Skill.bRequiresExtractionSubstrate;
			bComputedEverySkillRequiresWorkflowMemorySubstrate &=
				Skill.bRequiresWorkflowMemorySubstrate;
			bComputedEverySkillRequiresDesignShellSubstrate &=
				Skill.bRequiresDesignShellSubstrate;
			bComputedNoImplementationReviewDelegationWidening &=
				Skill.bAvoidsImplementationReviewDelegationWidening;
			bComputedNoPlanSynthesisWidening &= Skill.bAvoidsPlanSynthesisWidening;

			if (Skill.bLiveSkill)
			{
				bComputedEveryLiveSkillReadsAuthoritativeWorkflowAndReviewSurfaces &=
					Skill.bReadsAuthoritativeWorkflowAndReviewSurfaces;
				bComputedEveryLiveSkillHasValidationHarnessCoverage &=
					Skill.bHasValidationHarnessCoverage;
			}
		}

		return LiveSkillCount == ComputedLiveSkillCount
			&& AvailableNowCount == ComputedAvailableNowCount
			&& ProposalReviewSkillCount == ComputedProposalReviewSkillCount
			&& DiffReviewSkillCount == ComputedDiffReviewSkillCount
			&& BoundedWorkflowWrapperSkillCount
				== ComputedBoundedWorkflowWrapperSkillCount
			&& bEveryLiveSkillReadsAuthoritativeWorkflowAndReviewSurfaces
				== bComputedEveryLiveSkillReadsAuthoritativeWorkflowAndReviewSurfaces
			&& bEverySkillPreservesOptionalAssistiveOffState
				== bComputedEverySkillPreservesOptionalAssistiveOffState
			&& bEveryLiveSkillHasValidationHarnessCoverage
				== bComputedEveryLiveSkillHasValidationHarnessCoverage
			&& bWorkflowReviewRemainsBounded
				== bComputedWorkflowReviewRemainsBounded
			&& bEverySkillRequiresExtractionSubstrate
				== bComputedEverySkillRequiresExtractionSubstrate
			&& bEverySkillRequiresWorkflowMemorySubstrate
				== bComputedEverySkillRequiresWorkflowMemorySubstrate
			&& bEverySkillRequiresDesignShellSubstrate
				== bComputedEverySkillRequiresDesignShellSubstrate
			&& bNoImplementationReviewDelegationWidening
				== bComputedNoImplementationReviewDelegationWidening
			&& bNoPlanSynthesisWidening
				== bComputedNoPlanSynthesisWidening;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillImplementationDelegationSpec
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString SpecId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString SkillId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString DisplayLabel;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString CommandSurfaceId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ServiceBindingId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString OwnerLaneId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString OwnerFeatureId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> InputArtifactKinds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> OutputArtifactKinds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> RequiredWorkflowReviewSkillIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 RequiredWorkflowReviewSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> RequiredDesignShellSkillIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 RequiredDesignShellSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> SpecStepIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> SafetyRuleIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bUsesFirstPartyTermsOnly = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bPreservesOptionalAssistiveOffState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bDerivedAssistiveOnly = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bRequiresProvenanceLedger = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bBoundedToImplementationReviewAndDelegationOnly = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bAvoidsPlanSynthesisWidening = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bAvoidsAutonomousExecutionClaims = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bReadyForFutureWrapperBinding = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bCoversImplementationReview = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bDefinesBoundedDelegationSpec = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		if (SpecId.IsEmpty()
			|| SkillId.IsEmpty()
			|| DisplayLabel.IsEmpty()
			|| CommandSurfaceId.IsEmpty()
			|| ServiceBindingId.IsEmpty()
			|| OwnerLaneId.IsEmpty()
			|| OwnerFeatureId.IsEmpty()
			|| InputArtifactKinds.Num() == 0
			|| OutputArtifactKinds.Num() == 0
			|| RequiredWorkflowReviewSkillIds.Num() == 0
			|| RequiredWorkflowReviewSkillCount != RequiredWorkflowReviewSkillIds.Num()
			|| RequiredDesignShellSkillIds.Num() == 0
			|| RequiredDesignShellSkillCount != RequiredDesignShellSkillIds.Num()
			|| SpecStepIds.Num() == 0
			|| SafetyRuleIds.Num() == 0
			|| !bUsesFirstPartyTermsOnly
			|| !bPreservesOptionalAssistiveOffState
			|| !bDerivedAssistiveOnly
			|| !bRequiresProvenanceLedger
			|| !bBoundedToImplementationReviewAndDelegationOnly
			|| !bAvoidsPlanSynthesisWidening
			|| !bAvoidsAutonomousExecutionClaims
			|| !bReadyForFutureWrapperBinding)
		{
			return false;
		}

		for (const FString& Value : InputArtifactKinds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : OutputArtifactKinds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : RequiredWorkflowReviewSkillIds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : RequiredDesignShellSkillIds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : SpecStepIds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : SafetyRuleIds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		const int32 SpecModeCount =
			(bCoversImplementationReview ? 1 : 0)
			+ (bDefinesBoundedDelegationSpec ? 1 : 0);
		return SpecModeCount == 1;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillImplementationDelegationState
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString RegistryId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ManifestVersion;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ReferenceUtc;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString CommandSurfaceRootId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString TemplateVersion;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FHyperTwistSkillImplementationDelegationSpec> Specs;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 SkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 SpecCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 StepCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 SafetyRuleCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 ImplementationReviewSpecCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 DelegationSpecCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySpecUsesFirstPartyTerms = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySpecPreservesOptionalAssistiveOffState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySpecRequiresProvenanceLedger = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySpecRemainsBounded = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySpecRequiresWorkflowReviewSubstrate = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySpecRequiresDesignShellSubstrate = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bNoPlanSynthesisWidening = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bNoAutonomousExecutionClaims = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySpecReadyForFutureWrapperBinding = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		if (RegistryId.IsEmpty()
			|| ManifestVersion.IsEmpty()
			|| ReferenceUtc.IsEmpty()
			|| CommandSurfaceRootId.IsEmpty()
			|| TemplateVersion.IsEmpty()
			|| Specs.Num() == 0
			|| SkillCount <= 0
			|| SpecCount != Specs.Num()
			|| StepCount <= 0
			|| SafetyRuleCount <= 0
			|| !bEverySpecUsesFirstPartyTerms
			|| !bEverySpecPreservesOptionalAssistiveOffState
			|| !bEverySpecRequiresProvenanceLedger
			|| !bEverySpecRemainsBounded
			|| !bEverySpecRequiresWorkflowReviewSubstrate
			|| !bEverySpecRequiresDesignShellSubstrate
			|| !bNoPlanSynthesisWidening
			|| !bNoAutonomousExecutionClaims
			|| !bEverySpecReadyForFutureWrapperBinding)
		{
			return false;
		}

		TArray<FString> SeenSpecIds;
		TArray<FString> SeenSkillIds;
		TArray<FString> SeenStepIds;
		TArray<FString> SeenSafetyRuleIds;
		int32 ComputedImplementationReviewSpecCount = 0;
		int32 ComputedDelegationSpecCount = 0;
		bool bComputedFirstPartyTerms = true;
		bool bComputedPreservesOffState = true;
		bool bComputedRequiresProvenanceLedger = true;
		bool bComputedRemainsBounded = true;
		bool bComputedRequiresWorkflowReview = true;
		bool bComputedRequiresDesignShell = true;
		bool bComputedNoPlanSynthesisWidening = true;
		bool bComputedNoAutonomousExecutionClaims = true;
		bool bComputedReadyForFutureWrapperBinding = true;

		for (const FHyperTwistSkillImplementationDelegationSpec& Spec : Specs)
		{
			if (!Spec.IsStructurallyValid() || SeenSpecIds.Contains(Spec.SpecId))
			{
				return false;
			}

			SeenSpecIds.Add(Spec.SpecId);
			SeenSkillIds.AddUnique(Spec.SkillId);
			ComputedImplementationReviewSpecCount +=
				Spec.bCoversImplementationReview ? 1 : 0;
			ComputedDelegationSpecCount +=
				Spec.bDefinesBoundedDelegationSpec ? 1 : 0;
			bComputedFirstPartyTerms &= Spec.bUsesFirstPartyTermsOnly;
			bComputedPreservesOffState &= Spec.bPreservesOptionalAssistiveOffState;
			bComputedRequiresProvenanceLedger &= Spec.bRequiresProvenanceLedger;
			bComputedRemainsBounded &=
				Spec.bBoundedToImplementationReviewAndDelegationOnly;
			bComputedRequiresWorkflowReview &=
				Spec.RequiredWorkflowReviewSkillIds.Num() > 0;
			bComputedRequiresDesignShell &=
				Spec.RequiredDesignShellSkillIds.Num() > 0;
			bComputedNoPlanSynthesisWidening &=
				Spec.bAvoidsPlanSynthesisWidening;
			bComputedNoAutonomousExecutionClaims &=
				Spec.bAvoidsAutonomousExecutionClaims;
			bComputedReadyForFutureWrapperBinding &=
				Spec.bReadyForFutureWrapperBinding;

			for (const FString& StepId : Spec.SpecStepIds)
			{
				SeenStepIds.AddUnique(StepId);
			}

			for (const FString& SafetyRuleId : Spec.SafetyRuleIds)
			{
				SeenSafetyRuleIds.AddUnique(SafetyRuleId);
			}
		}

		return SkillCount == SeenSkillIds.Num()
			&& StepCount == SeenStepIds.Num()
			&& SafetyRuleCount == SeenSafetyRuleIds.Num()
			&& ImplementationReviewSpecCount == ComputedImplementationReviewSpecCount
			&& DelegationSpecCount == ComputedDelegationSpecCount
			&& bEverySpecUsesFirstPartyTerms == bComputedFirstPartyTerms
			&& bEverySpecPreservesOptionalAssistiveOffState == bComputedPreservesOffState
			&& bEverySpecRequiresProvenanceLedger == bComputedRequiresProvenanceLedger
			&& bEverySpecRemainsBounded == bComputedRemainsBounded
			&& bEverySpecRequiresWorkflowReviewSubstrate
				== bComputedRequiresWorkflowReview
			&& bEverySpecRequiresDesignShellSubstrate
				== bComputedRequiresDesignShell
			&& bNoPlanSynthesisWidening == bComputedNoPlanSynthesisWidening
			&& bNoAutonomousExecutionClaims
				== bComputedNoAutonomousExecutionClaims
			&& bEverySpecReadyForFutureWrapperBinding
				== bComputedReadyForFutureWrapperBinding;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillPlanOrchestrationSkill
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString SkillId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString DisplayLabel;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString CommandSurfaceId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ServiceBindingId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString OwnerLaneId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString OwnerFeatureId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	EHyperTwistSkillStatus Status = EHyperTwistSkillStatus::None;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> PermissionScopeIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> SourceSurfaceIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> RequiredImplementationDelegationSkillIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> RequiredWorkflowMemorySkillIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> RequiredWorkflowReviewSkillIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> OutputArtifactKinds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> PreviewHeadlines;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 SourceSurfaceCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 RequiredImplementationDelegationSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 RequiredWorkflowMemorySkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 RequiredWorkflowReviewSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bLiveSkill = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bReadsAuthoritativeWorkflowImplementationAndMemorySurfaces = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bAvailableNow = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bRequiresOwnerActivation = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bPreservesOptionalAssistiveOffState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bDerivedAssistiveOnly = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bHasValidationHarnessCoverage = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bBoundedToPlanOrchestrationOnly = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bRequiresImplementationDelegationSubstrate = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bRequiresWorkflowMemorySubstrate = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bRequiresWorkflowReviewSubstrate = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bAvoidsProviderWidening = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bAvoidsDomainSkillPackWidening = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bAvoidsAutonomousExecutionClaims = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bSynthesizesBoundedPlan = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bChainsBoundedWorkflow = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		if (SkillId.IsEmpty()
			|| DisplayLabel.IsEmpty()
			|| CommandSurfaceId.IsEmpty()
			|| ServiceBindingId.IsEmpty()
			|| OwnerLaneId.IsEmpty()
			|| OwnerFeatureId.IsEmpty()
			|| Status == EHyperTwistSkillStatus::None
			|| PermissionScopeIds.Num() == 0
			|| SourceSurfaceIds.Num() == 0
			|| RequiredImplementationDelegationSkillIds.Num() == 0
			|| RequiredWorkflowMemorySkillIds.Num() == 0
			|| RequiredWorkflowReviewSkillIds.Num() == 0
			|| OutputArtifactKinds.Num() == 0
			|| PreviewHeadlines.Num() == 0
			|| SourceSurfaceCount != SourceSurfaceIds.Num()
			|| RequiredImplementationDelegationSkillCount
				!= RequiredImplementationDelegationSkillIds.Num()
			|| RequiredWorkflowMemorySkillCount != RequiredWorkflowMemorySkillIds.Num()
			|| RequiredWorkflowReviewSkillCount != RequiredWorkflowReviewSkillIds.Num()
			|| !bReadsAuthoritativeWorkflowImplementationAndMemorySurfaces
			|| !bPreservesOptionalAssistiveOffState
			|| !bDerivedAssistiveOnly
			|| !bHasValidationHarnessCoverage
			|| !bBoundedToPlanOrchestrationOnly
			|| !bRequiresImplementationDelegationSubstrate
			|| !bRequiresWorkflowMemorySubstrate
			|| !bRequiresWorkflowReviewSubstrate
			|| !bAvoidsProviderWidening
			|| !bAvoidsDomainSkillPackWidening
			|| !bAvoidsAutonomousExecutionClaims)
		{
			return false;
		}

		for (const FString& Value : PermissionScopeIds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : SourceSurfaceIds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : RequiredImplementationDelegationSkillIds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : RequiredWorkflowMemorySkillIds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : RequiredWorkflowReviewSkillIds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : OutputArtifactKinds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : PreviewHeadlines)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		const int32 OrchestrationModeCount =
			(bSynthesizesBoundedPlan ? 1 : 0) + (bChainsBoundedWorkflow ? 1 : 0);
		return OrchestrationModeCount == 1
			&& Status == EHyperTwistSkillStatus::ImplementedNow
			&& bLiveSkill
			&& bAvailableNow
			&& !bRequiresOwnerActivation;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillPlanOrchestrationState
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString RegistryId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ManifestVersion;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ReferenceUtc;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString CommandSurfaceRootId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString TemplateVersion;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FHyperTwistSkillPlanOrchestrationSkill> Skills;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 SkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 LiveSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 AvailableNowCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 PlanSynthesisSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 WorkflowChainingSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEveryLiveSkillReadsAuthoritativeWorkflowImplementationAndMemorySurfaces = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySkillPreservesOptionalAssistiveOffState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEveryLiveSkillHasValidationHarnessCoverage = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bPlanOrchestrationRemainsBounded = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySkillRequiresImplementationDelegationSubstrate = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySkillRequiresWorkflowMemorySubstrate = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySkillRequiresWorkflowReviewSubstrate = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bNoProviderWidening = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bNoDomainSkillPackWidening = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bNoAutonomousExecutionClaims = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		if (RegistryId.IsEmpty()
			|| ManifestVersion.IsEmpty()
			|| ReferenceUtc.IsEmpty()
			|| CommandSurfaceRootId.IsEmpty()
			|| TemplateVersion.IsEmpty()
			|| Skills.Num() == 0
			|| SkillCount != Skills.Num()
			|| !bEveryLiveSkillReadsAuthoritativeWorkflowImplementationAndMemorySurfaces
			|| !bEverySkillPreservesOptionalAssistiveOffState
			|| !bEveryLiveSkillHasValidationHarnessCoverage
			|| !bPlanOrchestrationRemainsBounded
			|| !bEverySkillRequiresImplementationDelegationSubstrate
			|| !bEverySkillRequiresWorkflowMemorySubstrate
			|| !bEverySkillRequiresWorkflowReviewSubstrate
			|| !bNoProviderWidening
			|| !bNoDomainSkillPackWidening
			|| !bNoAutonomousExecutionClaims)
		{
			return false;
		}

		TArray<FString> SeenSkillIds;
		int32 ComputedLiveSkillCount = 0;
		int32 ComputedAvailableNowCount = 0;
		int32 ComputedPlanSynthesisSkillCount = 0;
		int32 ComputedWorkflowChainingSkillCount = 0;
		bool bComputedEveryLiveSkillReadsAuthoritativeWorkflowImplementationAndMemorySurfaces =
			true;
		bool bComputedEverySkillPreservesOptionalAssistiveOffState = true;
		bool bComputedEveryLiveSkillHasValidationHarnessCoverage = true;
		bool bComputedPlanOrchestrationRemainsBounded = true;
		bool bComputedEverySkillRequiresImplementationDelegationSubstrate = true;
		bool bComputedEverySkillRequiresWorkflowMemorySubstrate = true;
		bool bComputedEverySkillRequiresWorkflowReviewSubstrate = true;
		bool bComputedNoProviderWidening = true;
		bool bComputedNoDomainSkillPackWidening = true;
		bool bComputedNoAutonomousExecutionClaims = true;

		for (const FHyperTwistSkillPlanOrchestrationSkill& Skill : Skills)
		{
			if (!Skill.IsStructurallyValid() || SeenSkillIds.Contains(Skill.SkillId))
			{
				return false;
			}

			SeenSkillIds.Add(Skill.SkillId);
			ComputedLiveSkillCount += Skill.bLiveSkill ? 1 : 0;
			ComputedAvailableNowCount += Skill.bAvailableNow ? 1 : 0;
			ComputedPlanSynthesisSkillCount += Skill.bSynthesizesBoundedPlan ? 1 : 0;
			ComputedWorkflowChainingSkillCount += Skill.bChainsBoundedWorkflow ? 1 : 0;
			bComputedEverySkillPreservesOptionalAssistiveOffState &=
				Skill.bPreservesOptionalAssistiveOffState;
			bComputedPlanOrchestrationRemainsBounded &=
				Skill.bBoundedToPlanOrchestrationOnly;
			bComputedEverySkillRequiresImplementationDelegationSubstrate &=
				Skill.bRequiresImplementationDelegationSubstrate;
			bComputedEverySkillRequiresWorkflowMemorySubstrate &=
				Skill.bRequiresWorkflowMemorySubstrate;
			bComputedEverySkillRequiresWorkflowReviewSubstrate &=
				Skill.bRequiresWorkflowReviewSubstrate;
			bComputedNoProviderWidening &= Skill.bAvoidsProviderWidening;
			bComputedNoDomainSkillPackWidening &= Skill.bAvoidsDomainSkillPackWidening;
			bComputedNoAutonomousExecutionClaims &=
				Skill.bAvoidsAutonomousExecutionClaims;

			if (Skill.bLiveSkill)
			{
				bComputedEveryLiveSkillReadsAuthoritativeWorkflowImplementationAndMemorySurfaces &=
					Skill.bReadsAuthoritativeWorkflowImplementationAndMemorySurfaces;
				bComputedEveryLiveSkillHasValidationHarnessCoverage &=
					Skill.bHasValidationHarnessCoverage;
			}
		}

		return LiveSkillCount == ComputedLiveSkillCount
			&& AvailableNowCount == ComputedAvailableNowCount
			&& PlanSynthesisSkillCount == ComputedPlanSynthesisSkillCount
			&& WorkflowChainingSkillCount == ComputedWorkflowChainingSkillCount
			&& bEveryLiveSkillReadsAuthoritativeWorkflowImplementationAndMemorySurfaces
				== bComputedEveryLiveSkillReadsAuthoritativeWorkflowImplementationAndMemorySurfaces
			&& bEverySkillPreservesOptionalAssistiveOffState
				== bComputedEverySkillPreservesOptionalAssistiveOffState
			&& bEveryLiveSkillHasValidationHarnessCoverage
				== bComputedEveryLiveSkillHasValidationHarnessCoverage
			&& bPlanOrchestrationRemainsBounded
				== bComputedPlanOrchestrationRemainsBounded
			&& bEverySkillRequiresImplementationDelegationSubstrate
				== bComputedEverySkillRequiresImplementationDelegationSubstrate
			&& bEverySkillRequiresWorkflowMemorySubstrate
				== bComputedEverySkillRequiresWorkflowMemorySubstrate
			&& bEverySkillRequiresWorkflowReviewSubstrate
				== bComputedEverySkillRequiresWorkflowReviewSubstrate
			&& bNoProviderWidening == bComputedNoProviderWidening
			&& bNoDomainSkillPackWidening == bComputedNoDomainSkillPackWidening
			&& bNoAutonomousExecutionClaims
				== bComputedNoAutonomousExecutionClaims;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillProviderProfileRoutingSkill
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString SkillId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString DisplayLabel;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString CommandSurfaceId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ServiceBindingId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString OwnerLaneId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString OwnerFeatureId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	EHyperTwistSkillStatus Status = EHyperTwistSkillStatus::None;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> PermissionScopeIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> SourceSurfaceIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> RequiredAnalyzerWrapperSkillIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> OutputArtifactKinds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> PreviewHeadlines;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 SourceSurfaceCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 RequiredAnalyzerWrapperSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bLiveSkill = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bReadsAuthoritativeProviderNeutralState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bAvailableNow = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bRequiresOwnerActivation = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bPreservesOptionalAssistiveOffState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bDerivedAssistiveOnly = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bHasValidationHarnessCoverage = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bBoundedToProviderProfileRoutingOnly = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bRequiresAnalyzerWrapperSubstrate = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bRequiresProviderSessionConfigState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bRequiresProviderServiceHealthState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bPreservesOpenAiCompatibleCustomEndpointFirstClass = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bPreservesUserLabeledByokProfiles = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bPreservesProviderNeutrality = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bAvoidsProviderSpecificOverlayWidening = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bInspectsProviderProfile = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bSetsUpByokProfile = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bDiagnosesRouting = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		if (SkillId.IsEmpty()
			|| DisplayLabel.IsEmpty()
			|| CommandSurfaceId.IsEmpty()
			|| ServiceBindingId.IsEmpty()
			|| OwnerLaneId.IsEmpty()
			|| OwnerFeatureId.IsEmpty()
			|| Status == EHyperTwistSkillStatus::None
			|| PermissionScopeIds.Num() == 0
			|| SourceSurfaceIds.Num() == 0
			|| RequiredAnalyzerWrapperSkillIds.Num() == 0
			|| OutputArtifactKinds.Num() == 0
			|| PreviewHeadlines.Num() == 0
			|| SourceSurfaceCount != SourceSurfaceIds.Num()
			|| RequiredAnalyzerWrapperSkillCount
				!= RequiredAnalyzerWrapperSkillIds.Num()
			|| !bReadsAuthoritativeProviderNeutralState
			|| !bPreservesOptionalAssistiveOffState
			|| !bDerivedAssistiveOnly
			|| !bHasValidationHarnessCoverage
			|| !bBoundedToProviderProfileRoutingOnly
			|| !bRequiresAnalyzerWrapperSubstrate
			|| !bRequiresProviderSessionConfigState
			|| !bRequiresProviderServiceHealthState
			|| !bPreservesOpenAiCompatibleCustomEndpointFirstClass
			|| !bPreservesUserLabeledByokProfiles
			|| !bPreservesProviderNeutrality
			|| !bAvoidsProviderSpecificOverlayWidening)
		{
			return false;
		}

		for (const FString& Value : PermissionScopeIds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : SourceSurfaceIds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : RequiredAnalyzerWrapperSkillIds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : OutputArtifactKinds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : PreviewHeadlines)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		const int32 ProviderModeCount =
			(bInspectsProviderProfile ? 1 : 0)
			+ (bSetsUpByokProfile ? 1 : 0)
			+ (bDiagnosesRouting ? 1 : 0);
		return ProviderModeCount == 1
			&& Status == EHyperTwistSkillStatus::ImplementedNow
			&& bLiveSkill
			&& bAvailableNow
			&& !bRequiresOwnerActivation;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillProviderProfileRoutingState
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString RegistryId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ManifestVersion;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ReferenceUtc;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString CommandSurfaceRootId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString TemplateVersion;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FHyperTwistSkillProviderProfileRoutingSkill> Skills;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 SkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 LiveSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 AvailableNowCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 ProviderProfileInspectionSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 ByokProfileSetupSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 RoutingDiagnosticSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEveryLiveSkillReadsAuthoritativeProviderNeutralState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySkillPreservesOptionalAssistiveOffState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEveryLiveSkillHasValidationHarnessCoverage = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bProviderProfileRoutingRemainsBounded = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySkillRequiresAnalyzerWrapperSubstrate = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySkillRequiresProviderSessionConfigState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySkillRequiresProviderServiceHealthState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bOpenAiCompatibleCustomEndpointsRemainFirstClass = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bUserLabeledByokProfilesRemainSupported = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bProviderNeutralityRemainsPreserved = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bNoProviderSpecificOverlayWidening = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		if (RegistryId.IsEmpty()
			|| ManifestVersion.IsEmpty()
			|| ReferenceUtc.IsEmpty()
			|| CommandSurfaceRootId.IsEmpty()
			|| TemplateVersion.IsEmpty()
			|| Skills.Num() == 0
			|| SkillCount != Skills.Num()
			|| !bEveryLiveSkillReadsAuthoritativeProviderNeutralState
			|| !bEverySkillPreservesOptionalAssistiveOffState
			|| !bEveryLiveSkillHasValidationHarnessCoverage
			|| !bProviderProfileRoutingRemainsBounded
			|| !bEverySkillRequiresAnalyzerWrapperSubstrate
			|| !bEverySkillRequiresProviderSessionConfigState
			|| !bEverySkillRequiresProviderServiceHealthState
			|| !bOpenAiCompatibleCustomEndpointsRemainFirstClass
			|| !bUserLabeledByokProfilesRemainSupported
			|| !bProviderNeutralityRemainsPreserved
			|| !bNoProviderSpecificOverlayWidening)
		{
			return false;
		}

		TArray<FString> SeenSkillIds;
		int32 ComputedLiveSkillCount = 0;
		int32 ComputedAvailableNowCount = 0;
		int32 ComputedProviderProfileInspectionSkillCount = 0;
		int32 ComputedByokProfileSetupSkillCount = 0;
		int32 ComputedRoutingDiagnosticSkillCount = 0;
		bool bComputedEveryLiveSkillReadsAuthoritativeProviderNeutralState = true;
		bool bComputedEverySkillPreservesOptionalAssistiveOffState = true;
		bool bComputedEveryLiveSkillHasValidationHarnessCoverage = true;
		bool bComputedProviderProfileRoutingRemainsBounded = true;
		bool bComputedEverySkillRequiresAnalyzerWrapperSubstrate = true;
		bool bComputedEverySkillRequiresProviderSessionConfigState = true;
		bool bComputedEverySkillRequiresProviderServiceHealthState = true;
		bool bComputedOpenAiCompatibleCustomEndpointsRemainFirstClass = true;
		bool bComputedUserLabeledByokProfilesRemainSupported = true;
		bool bComputedProviderNeutralityRemainsPreserved = true;
		bool bComputedNoProviderSpecificOverlayWidening = true;

		for (const FHyperTwistSkillProviderProfileRoutingSkill& Skill : Skills)
		{
			if (!Skill.IsStructurallyValid() || SeenSkillIds.Contains(Skill.SkillId))
			{
				return false;
			}

			SeenSkillIds.Add(Skill.SkillId);
			ComputedLiveSkillCount += Skill.bLiveSkill ? 1 : 0;
			ComputedAvailableNowCount += Skill.bAvailableNow ? 1 : 0;
			ComputedProviderProfileInspectionSkillCount +=
				Skill.bInspectsProviderProfile ? 1 : 0;
			ComputedByokProfileSetupSkillCount += Skill.bSetsUpByokProfile ? 1 : 0;
			ComputedRoutingDiagnosticSkillCount += Skill.bDiagnosesRouting ? 1 : 0;
			bComputedEverySkillPreservesOptionalAssistiveOffState &=
				Skill.bPreservesOptionalAssistiveOffState;
			bComputedProviderProfileRoutingRemainsBounded &=
				Skill.bBoundedToProviderProfileRoutingOnly;
			bComputedEverySkillRequiresAnalyzerWrapperSubstrate &=
				Skill.bRequiresAnalyzerWrapperSubstrate;
			bComputedEverySkillRequiresProviderSessionConfigState &=
				Skill.bRequiresProviderSessionConfigState;
			bComputedEverySkillRequiresProviderServiceHealthState &=
				Skill.bRequiresProviderServiceHealthState;
			bComputedOpenAiCompatibleCustomEndpointsRemainFirstClass &=
				Skill.bPreservesOpenAiCompatibleCustomEndpointFirstClass;
			bComputedUserLabeledByokProfilesRemainSupported &=
				Skill.bPreservesUserLabeledByokProfiles;
			bComputedProviderNeutralityRemainsPreserved &=
				Skill.bPreservesProviderNeutrality;
			bComputedNoProviderSpecificOverlayWidening &=
				Skill.bAvoidsProviderSpecificOverlayWidening;

			if (Skill.bLiveSkill)
			{
				bComputedEveryLiveSkillReadsAuthoritativeProviderNeutralState &=
					Skill.bReadsAuthoritativeProviderNeutralState;
				bComputedEveryLiveSkillHasValidationHarnessCoverage &=
					Skill.bHasValidationHarnessCoverage;
			}
		}

		return LiveSkillCount == ComputedLiveSkillCount
			&& AvailableNowCount == ComputedAvailableNowCount
			&& ProviderProfileInspectionSkillCount
				== ComputedProviderProfileInspectionSkillCount
			&& ByokProfileSetupSkillCount == ComputedByokProfileSetupSkillCount
			&& RoutingDiagnosticSkillCount == ComputedRoutingDiagnosticSkillCount
			&& bEveryLiveSkillReadsAuthoritativeProviderNeutralState
				== bComputedEveryLiveSkillReadsAuthoritativeProviderNeutralState
			&& bEverySkillPreservesOptionalAssistiveOffState
				== bComputedEverySkillPreservesOptionalAssistiveOffState
			&& bEveryLiveSkillHasValidationHarnessCoverage
				== bComputedEveryLiveSkillHasValidationHarnessCoverage
			&& bProviderProfileRoutingRemainsBounded
				== bComputedProviderProfileRoutingRemainsBounded
			&& bEverySkillRequiresAnalyzerWrapperSubstrate
				== bComputedEverySkillRequiresAnalyzerWrapperSubstrate
			&& bEverySkillRequiresProviderSessionConfigState
				== bComputedEverySkillRequiresProviderSessionConfigState
			&& bEverySkillRequiresProviderServiceHealthState
				== bComputedEverySkillRequiresProviderServiceHealthState
			&& bOpenAiCompatibleCustomEndpointsRemainFirstClass
				== bComputedOpenAiCompatibleCustomEndpointsRemainFirstClass
			&& bUserLabeledByokProfilesRemainSupported
				== bComputedUserLabeledByokProfilesRemainSupported
			&& bProviderNeutralityRemainsPreserved
				== bComputedProviderNeutralityRemainsPreserved
			&& bNoProviderSpecificOverlayWidening
				== bComputedNoProviderSpecificOverlayWidening;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillProviderUsageOperationsAuditSkill
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString SkillId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString DisplayLabel;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString CommandSurfaceId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ServiceBindingId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString OwnerLaneId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString OwnerFeatureId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	EHyperTwistSkillStatus Status = EHyperTwistSkillStatus::None;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> PermissionScopeIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> SourceSurfaceIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> RequiredProviderProfileRoutingSkillIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> OutputArtifactKinds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> PreviewHeadlines;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 SourceSurfaceCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 RequiredProviderProfileRoutingSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bLiveSkill = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bReadsNormalizedFirstPartyState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bAvailableNow = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bRequiresOwnerActivation = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bPreservesOptionalAssistiveOffState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bDerivedAssistiveOnly = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bHasValidationHarnessCoverage = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bBoundedToUsageOperationsAuditOnly = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bRequiresProviderProfileRoutingSubstrate = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bRequiresUsageCostAccountingState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bRequiresRouteAndServiceHealthState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bPreservesNormalizedFirstPartyAccountingOwnership = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bAvoidsSettlementExecutionWidening = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bAvoidsProviderPortalWidening = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bAuditsUsage = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bInspectsTopology = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bDiagnosesRouteService = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		if (SkillId.IsEmpty()
			|| DisplayLabel.IsEmpty()
			|| CommandSurfaceId.IsEmpty()
			|| ServiceBindingId.IsEmpty()
			|| OwnerLaneId.IsEmpty()
			|| OwnerFeatureId.IsEmpty()
			|| Status == EHyperTwistSkillStatus::None
			|| PermissionScopeIds.Num() == 0
			|| SourceSurfaceIds.Num() == 0
			|| RequiredProviderProfileRoutingSkillIds.Num() == 0
			|| OutputArtifactKinds.Num() == 0
			|| PreviewHeadlines.Num() == 0
			|| SourceSurfaceCount != SourceSurfaceIds.Num()
			|| RequiredProviderProfileRoutingSkillCount
				!= RequiredProviderProfileRoutingSkillIds.Num()
			|| !bReadsNormalizedFirstPartyState
			|| !bPreservesOptionalAssistiveOffState
			|| !bDerivedAssistiveOnly
			|| !bHasValidationHarnessCoverage
			|| !bBoundedToUsageOperationsAuditOnly
			|| !bRequiresProviderProfileRoutingSubstrate
			|| !bRequiresUsageCostAccountingState
			|| !bRequiresRouteAndServiceHealthState
			|| !bPreservesNormalizedFirstPartyAccountingOwnership
			|| !bAvoidsSettlementExecutionWidening
			|| !bAvoidsProviderPortalWidening)
		{
			return false;
		}

		for (const FString& Value : PermissionScopeIds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : SourceSurfaceIds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : RequiredProviderProfileRoutingSkillIds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : OutputArtifactKinds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : PreviewHeadlines)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		const int32 AuditModeCount =
			(bAuditsUsage ? 1 : 0)
			+ (bInspectsTopology ? 1 : 0)
			+ (bDiagnosesRouteService ? 1 : 0);
		return AuditModeCount == 1
			&& Status == EHyperTwistSkillStatus::ImplementedNow
			&& bLiveSkill
			&& bAvailableNow
			&& !bRequiresOwnerActivation;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillProviderUsageOperationsAuditState
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString RegistryId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ManifestVersion;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ReferenceUtc;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString CommandSurfaceRootId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString TemplateVersion;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FHyperTwistSkillProviderUsageOperationsAuditSkill> Skills;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 SkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 LiveSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 AvailableNowCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 UsageAuditSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 TopologyInspectionSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 RouteServiceDiagnosticSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEveryLiveSkillReadsNormalizedFirstPartyState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySkillPreservesOptionalAssistiveOffState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEveryLiveSkillHasValidationHarnessCoverage = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bUsageOperationsAuditRemainsBounded = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySkillRequiresProviderProfileRoutingSubstrate = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySkillRequiresUsageCostAccountingState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySkillRequiresRouteAndServiceHealthState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bNormalizedFirstPartyAccountingOwnershipPreserved = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bNoSettlementExecutionWidening = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bNoProviderPortalWidening = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		if (RegistryId.IsEmpty()
			|| ManifestVersion.IsEmpty()
			|| ReferenceUtc.IsEmpty()
			|| CommandSurfaceRootId.IsEmpty()
			|| TemplateVersion.IsEmpty()
			|| Skills.Num() == 0
			|| SkillCount != Skills.Num()
			|| !bEveryLiveSkillReadsNormalizedFirstPartyState
			|| !bEverySkillPreservesOptionalAssistiveOffState
			|| !bEveryLiveSkillHasValidationHarnessCoverage
			|| !bUsageOperationsAuditRemainsBounded
			|| !bEverySkillRequiresProviderProfileRoutingSubstrate
			|| !bEverySkillRequiresUsageCostAccountingState
			|| !bEverySkillRequiresRouteAndServiceHealthState
			|| !bNormalizedFirstPartyAccountingOwnershipPreserved
			|| !bNoSettlementExecutionWidening
			|| !bNoProviderPortalWidening)
		{
			return false;
		}

		TArray<FString> SeenSkillIds;
		int32 ComputedLiveSkillCount = 0;
		int32 ComputedAvailableNowCount = 0;
		int32 ComputedUsageAuditSkillCount = 0;
		int32 ComputedTopologyInspectionSkillCount = 0;
		int32 ComputedRouteServiceDiagnosticSkillCount = 0;
		bool bComputedEveryLiveSkillReadsNormalizedFirstPartyState = true;
		bool bComputedEverySkillPreservesOptionalAssistiveOffState = true;
		bool bComputedEveryLiveSkillHasValidationHarnessCoverage = true;
		bool bComputedUsageOperationsAuditRemainsBounded = true;
		bool bComputedEverySkillRequiresProviderProfileRoutingSubstrate = true;
		bool bComputedEverySkillRequiresUsageCostAccountingState = true;
		bool bComputedEverySkillRequiresRouteAndServiceHealthState = true;
		bool bComputedNormalizedFirstPartyAccountingOwnershipPreserved = true;
		bool bComputedNoSettlementExecutionWidening = true;
		bool bComputedNoProviderPortalWidening = true;

		for (const FHyperTwistSkillProviderUsageOperationsAuditSkill& Skill : Skills)
		{
			if (!Skill.IsStructurallyValid() || SeenSkillIds.Contains(Skill.SkillId))
			{
				return false;
			}

			SeenSkillIds.Add(Skill.SkillId);
			ComputedLiveSkillCount += Skill.bLiveSkill ? 1 : 0;
			ComputedAvailableNowCount += Skill.bAvailableNow ? 1 : 0;
			ComputedUsageAuditSkillCount += Skill.bAuditsUsage ? 1 : 0;
			ComputedTopologyInspectionSkillCount += Skill.bInspectsTopology ? 1 : 0;
			ComputedRouteServiceDiagnosticSkillCount +=
				Skill.bDiagnosesRouteService ? 1 : 0;
			bComputedEverySkillPreservesOptionalAssistiveOffState &=
				Skill.bPreservesOptionalAssistiveOffState;
			bComputedUsageOperationsAuditRemainsBounded &=
				Skill.bBoundedToUsageOperationsAuditOnly;
			bComputedEverySkillRequiresProviderProfileRoutingSubstrate &=
				Skill.bRequiresProviderProfileRoutingSubstrate;
			bComputedEverySkillRequiresUsageCostAccountingState &=
				Skill.bRequiresUsageCostAccountingState;
			bComputedEverySkillRequiresRouteAndServiceHealthState &=
				Skill.bRequiresRouteAndServiceHealthState;
			bComputedNormalizedFirstPartyAccountingOwnershipPreserved &=
				Skill.bPreservesNormalizedFirstPartyAccountingOwnership;
			bComputedNoSettlementExecutionWidening &=
				Skill.bAvoidsSettlementExecutionWidening;
			bComputedNoProviderPortalWidening &=
				Skill.bAvoidsProviderPortalWidening;

			if (Skill.bLiveSkill)
			{
				bComputedEveryLiveSkillReadsNormalizedFirstPartyState &=
					Skill.bReadsNormalizedFirstPartyState;
				bComputedEveryLiveSkillHasValidationHarnessCoverage &=
					Skill.bHasValidationHarnessCoverage;
			}
		}

		return LiveSkillCount == ComputedLiveSkillCount
			&& AvailableNowCount == ComputedAvailableNowCount
			&& UsageAuditSkillCount == ComputedUsageAuditSkillCount
			&& TopologyInspectionSkillCount == ComputedTopologyInspectionSkillCount
			&& RouteServiceDiagnosticSkillCount
				== ComputedRouteServiceDiagnosticSkillCount
			&& bEveryLiveSkillReadsNormalizedFirstPartyState
				== bComputedEveryLiveSkillReadsNormalizedFirstPartyState
			&& bEverySkillPreservesOptionalAssistiveOffState
				== bComputedEverySkillPreservesOptionalAssistiveOffState
			&& bEveryLiveSkillHasValidationHarnessCoverage
				== bComputedEveryLiveSkillHasValidationHarnessCoverage
			&& bUsageOperationsAuditRemainsBounded
				== bComputedUsageOperationsAuditRemainsBounded
			&& bEverySkillRequiresProviderProfileRoutingSubstrate
				== bComputedEverySkillRequiresProviderProfileRoutingSubstrate
			&& bEverySkillRequiresUsageCostAccountingState
				== bComputedEverySkillRequiresUsageCostAccountingState
			&& bEverySkillRequiresRouteAndServiceHealthState
				== bComputedEverySkillRequiresRouteAndServiceHealthState
			&& bNormalizedFirstPartyAccountingOwnershipPreserved
				== bComputedNormalizedFirstPartyAccountingOwnershipPreserved
			&& bNoSettlementExecutionWidening
				== bComputedNoSettlementExecutionWidening
			&& bNoProviderPortalWidening
				== bComputedNoProviderPortalWidening;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillDomainPackFrameworkSkill
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString SkillId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString DisplayLabel;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString CommandSurfaceId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ServiceBindingId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString OwnerLaneId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString OwnerFeatureId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	EHyperTwistSkillStatus Status = EHyperTwistSkillStatus::None;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> PermissionScopeIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> SourceSurfaceIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> RequiredPlanOrchestrationSkillIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> RequiredProviderUsageAuditSkillIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> OutputArtifactKinds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> PreviewHeadlines;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 SourceSurfaceCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 RequiredPlanOrchestrationSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 RequiredProviderUsageAuditSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bLiveSkill = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bReadsAuthoritativeSkillAndFrameworkState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bAvailableNow = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bRequiresOwnerActivation = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bPreservesOptionalAssistiveOffState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bDerivedAssistiveOnly = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bHasValidationHarnessCoverage = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bBoundedToDomainPackFrameworkOnly = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bRequiresPlanOrchestrationSubstrate = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bRequiresProviderUsageOperationsAuditSubstrate = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bPreservesPlaceholderDomainPackDeferral = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bAvoidsRetainedDomainPackClaims = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bAvoidsCreativeMediaWidening = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bSpecifiesPackagingRules = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bSpecifiesEnableDisableGrouping = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		if (SkillId.IsEmpty()
			|| DisplayLabel.IsEmpty()
			|| CommandSurfaceId.IsEmpty()
			|| ServiceBindingId.IsEmpty()
			|| OwnerLaneId.IsEmpty()
			|| OwnerFeatureId.IsEmpty()
			|| Status == EHyperTwistSkillStatus::None
			|| PermissionScopeIds.Num() == 0
			|| SourceSurfaceIds.Num() == 0
			|| RequiredPlanOrchestrationSkillIds.Num() == 0
			|| RequiredProviderUsageAuditSkillIds.Num() == 0
			|| OutputArtifactKinds.Num() == 0
			|| PreviewHeadlines.Num() == 0
			|| SourceSurfaceCount != SourceSurfaceIds.Num()
			|| RequiredPlanOrchestrationSkillCount
				!= RequiredPlanOrchestrationSkillIds.Num()
			|| RequiredProviderUsageAuditSkillCount
				!= RequiredProviderUsageAuditSkillIds.Num()
			|| !bReadsAuthoritativeSkillAndFrameworkState
			|| !bPreservesOptionalAssistiveOffState
			|| !bDerivedAssistiveOnly
			|| !bHasValidationHarnessCoverage
			|| !bBoundedToDomainPackFrameworkOnly
			|| !bRequiresPlanOrchestrationSubstrate
			|| !bRequiresProviderUsageOperationsAuditSubstrate
			|| !bPreservesPlaceholderDomainPackDeferral
			|| !bAvoidsRetainedDomainPackClaims
			|| !bAvoidsCreativeMediaWidening)
		{
			return false;
		}

		for (const FString& Value : PermissionScopeIds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : SourceSurfaceIds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : RequiredPlanOrchestrationSkillIds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : RequiredProviderUsageAuditSkillIds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : OutputArtifactKinds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : PreviewHeadlines)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		const int32 FrameworkModeCount =
			(bSpecifiesPackagingRules ? 1 : 0)
			+ (bSpecifiesEnableDisableGrouping ? 1 : 0);
		return FrameworkModeCount == 1
			&& Status == EHyperTwistSkillStatus::ImplementedNow
			&& bLiveSkill
			&& bAvailableNow
			&& !bRequiresOwnerActivation;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillDomainPackFrameworkState
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString RegistryId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ManifestVersion;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ReferenceUtc;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString CommandSurfaceRootId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString TemplateVersion;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FHyperTwistSkillDomainPackFrameworkSkill> Skills;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 SkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 LiveSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 AvailableNowCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 PackagingRuleSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 EnableDisableGroupingSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEveryLiveSkillReadsAuthoritativeSkillAndFrameworkState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySkillPreservesOptionalAssistiveOffState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEveryLiveSkillHasValidationHarnessCoverage = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bDomainPackFrameworkRemainsBounded = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySkillRequiresPlanOrchestrationSubstrate = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySkillRequiresProviderUsageOperationsAuditSubstrate = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bPlaceholderDomainPackDeferralRemainsPreserved = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bNoRetainedDomainPackClaims = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bNoCreativeMediaWidening = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		if (RegistryId.IsEmpty()
			|| ManifestVersion.IsEmpty()
			|| ReferenceUtc.IsEmpty()
			|| CommandSurfaceRootId.IsEmpty()
			|| TemplateVersion.IsEmpty()
			|| Skills.Num() == 0
			|| SkillCount != Skills.Num()
			|| !bEveryLiveSkillReadsAuthoritativeSkillAndFrameworkState
			|| !bEverySkillPreservesOptionalAssistiveOffState
			|| !bEveryLiveSkillHasValidationHarnessCoverage
			|| !bDomainPackFrameworkRemainsBounded
			|| !bEverySkillRequiresPlanOrchestrationSubstrate
			|| !bEverySkillRequiresProviderUsageOperationsAuditSubstrate
			|| !bPlaceholderDomainPackDeferralRemainsPreserved
			|| !bNoRetainedDomainPackClaims
			|| !bNoCreativeMediaWidening)
		{
			return false;
		}

		TArray<FString> SeenSkillIds;
		int32 ComputedLiveSkillCount = 0;
		int32 ComputedAvailableNowCount = 0;
		int32 ComputedPackagingRuleSkillCount = 0;
		int32 ComputedEnableDisableGroupingSkillCount = 0;
		bool bComputedEveryLiveSkillReadsAuthoritativeSkillAndFrameworkState = true;
		bool bComputedEverySkillPreservesOptionalAssistiveOffState = true;
		bool bComputedEveryLiveSkillHasValidationHarnessCoverage = true;
		bool bComputedDomainPackFrameworkRemainsBounded = true;
		bool bComputedEverySkillRequiresPlanOrchestrationSubstrate = true;
		bool bComputedEverySkillRequiresProviderUsageOperationsAuditSubstrate = true;
		bool bComputedPlaceholderDomainPackDeferralRemainsPreserved = true;
		bool bComputedNoRetainedDomainPackClaims = true;
		bool bComputedNoCreativeMediaWidening = true;

		for (const FHyperTwistSkillDomainPackFrameworkSkill& Skill : Skills)
		{
			if (!Skill.IsStructurallyValid() || SeenSkillIds.Contains(Skill.SkillId))
			{
				return false;
			}

			SeenSkillIds.Add(Skill.SkillId);
			ComputedLiveSkillCount += Skill.bLiveSkill ? 1 : 0;
			ComputedAvailableNowCount += Skill.bAvailableNow ? 1 : 0;
			ComputedPackagingRuleSkillCount += Skill.bSpecifiesPackagingRules ? 1 : 0;
			ComputedEnableDisableGroupingSkillCount +=
				Skill.bSpecifiesEnableDisableGrouping ? 1 : 0;
			bComputedEverySkillPreservesOptionalAssistiveOffState &=
				Skill.bPreservesOptionalAssistiveOffState;
			bComputedDomainPackFrameworkRemainsBounded &=
				Skill.bBoundedToDomainPackFrameworkOnly;
			bComputedEverySkillRequiresPlanOrchestrationSubstrate &=
				Skill.bRequiresPlanOrchestrationSubstrate;
			bComputedEverySkillRequiresProviderUsageOperationsAuditSubstrate &=
				Skill.bRequiresProviderUsageOperationsAuditSubstrate;
			bComputedPlaceholderDomainPackDeferralRemainsPreserved &=
				Skill.bPreservesPlaceholderDomainPackDeferral;
			bComputedNoRetainedDomainPackClaims &=
				Skill.bAvoidsRetainedDomainPackClaims;
			bComputedNoCreativeMediaWidening &=
				Skill.bAvoidsCreativeMediaWidening;

			if (Skill.bLiveSkill)
			{
				bComputedEveryLiveSkillReadsAuthoritativeSkillAndFrameworkState &=
					Skill.bReadsAuthoritativeSkillAndFrameworkState;
				bComputedEveryLiveSkillHasValidationHarnessCoverage &=
					Skill.bHasValidationHarnessCoverage;
			}
		}

		return LiveSkillCount == ComputedLiveSkillCount
			&& AvailableNowCount == ComputedAvailableNowCount
			&& PackagingRuleSkillCount == ComputedPackagingRuleSkillCount
			&& EnableDisableGroupingSkillCount
				== ComputedEnableDisableGroupingSkillCount
			&& bEveryLiveSkillReadsAuthoritativeSkillAndFrameworkState
				== bComputedEveryLiveSkillReadsAuthoritativeSkillAndFrameworkState
			&& bEverySkillPreservesOptionalAssistiveOffState
				== bComputedEverySkillPreservesOptionalAssistiveOffState
			&& bEveryLiveSkillHasValidationHarnessCoverage
				== bComputedEveryLiveSkillHasValidationHarnessCoverage
			&& bDomainPackFrameworkRemainsBounded
				== bComputedDomainPackFrameworkRemainsBounded
			&& bEverySkillRequiresPlanOrchestrationSubstrate
				== bComputedEverySkillRequiresPlanOrchestrationSubstrate
			&& bEverySkillRequiresProviderUsageOperationsAuditSubstrate
				== bComputedEverySkillRequiresProviderUsageOperationsAuditSubstrate
			&& bPlaceholderDomainPackDeferralRemainsPreserved
				== bComputedPlaceholderDomainPackDeferralRemainsPreserved
			&& bNoRetainedDomainPackClaims == bComputedNoRetainedDomainPackClaims
			&& bNoCreativeMediaWidening == bComputedNoCreativeMediaWidening;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillRetainedDomainPackSkill
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString SkillId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString DisplayLabel;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString CommandSurfaceId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ServiceBindingId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString OwnerLaneId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString OwnerFeatureId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	EHyperTwistSkillStatus Status = EHyperTwistSkillStatus::None;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> PermissionScopeIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> SourceSurfaceIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> RequiredDomainPackFrameworkSkillIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> OutputArtifactKinds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> PreviewHeadlines;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 SourceSurfaceCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 RequiredDomainPackFrameworkSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bLiveSkill = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bReadsAuthoritativeFirstPartyDomainState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bAvailableNow = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bRequiresOwnerActivation = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bPreservesOptionalAssistiveOffState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bDerivedAssistiveOnly = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bHasValidationHarnessCoverage = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bBoundedToRetainedDomainPackOnly = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bRequiresDomainPackFrameworkSubstrate = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bPreservesFirstPartyRetainedPackGrounding = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bPreservesUnlandedPackDeferral = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bAvoidsCreativeAdjunctWidening = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bReadsTrainingReplayState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bReadsCurriculumContentState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bReadsMediaExportState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		if (SkillId.IsEmpty()
			|| DisplayLabel.IsEmpty()
			|| CommandSurfaceId.IsEmpty()
			|| ServiceBindingId.IsEmpty()
			|| OwnerLaneId.IsEmpty()
			|| OwnerFeatureId.IsEmpty()
			|| Status == EHyperTwistSkillStatus::None
			|| PermissionScopeIds.Num() == 0
			|| SourceSurfaceIds.Num() == 0
			|| RequiredDomainPackFrameworkSkillIds.Num() == 0
			|| OutputArtifactKinds.Num() == 0
			|| PreviewHeadlines.Num() == 0
			|| SourceSurfaceCount != SourceSurfaceIds.Num()
			|| RequiredDomainPackFrameworkSkillCount
				!= RequiredDomainPackFrameworkSkillIds.Num()
			|| !bReadsAuthoritativeFirstPartyDomainState
			|| !bPreservesOptionalAssistiveOffState
			|| !bDerivedAssistiveOnly
			|| !bHasValidationHarnessCoverage
			|| !bBoundedToRetainedDomainPackOnly
			|| !bRequiresDomainPackFrameworkSubstrate
			|| !bPreservesFirstPartyRetainedPackGrounding
			|| !bPreservesUnlandedPackDeferral
			|| !bAvoidsCreativeAdjunctWidening)
		{
			return false;
		}

		for (const FString& Value : PermissionScopeIds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : SourceSurfaceIds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : RequiredDomainPackFrameworkSkillIds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : OutputArtifactKinds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : PreviewHeadlines)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		const int32 PackModeCount =
			(bReadsTrainingReplayState ? 1 : 0)
			+ (bReadsCurriculumContentState ? 1 : 0)
			+ (bReadsMediaExportState ? 1 : 0);
		return PackModeCount == 1
			&& Status == EHyperTwistSkillStatus::ImplementedNow
			&& bLiveSkill
			&& bAvailableNow
			&& !bRequiresOwnerActivation;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillRetainedDomainPackState
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString RegistryId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ManifestVersion;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ReferenceUtc;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString CommandSurfaceRootId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString TemplateVersion;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FHyperTwistSkillRetainedDomainPackSkill> Skills;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 SkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 LiveSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 AvailableNowCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 TrainingReplayPackSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 CurriculumContentPackSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 MediaExportPackSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEveryLiveSkillReadsAuthoritativeFirstPartyDomainState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySkillPreservesOptionalAssistiveOffState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEveryLiveSkillHasValidationHarnessCoverage = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bRetainedDomainPackLayerRemainsBounded = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySkillRequiresDomainPackFrameworkSubstrate = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bRetainedPackClaimsRemainFirstPartyGrounded = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bUnlandedPackDeferralRemainsPreserved = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bNoCreativeAdjunctWidening = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		if (RegistryId.IsEmpty()
			|| ManifestVersion.IsEmpty()
			|| ReferenceUtc.IsEmpty()
			|| CommandSurfaceRootId.IsEmpty()
			|| TemplateVersion.IsEmpty()
			|| Skills.Num() == 0
			|| SkillCount != Skills.Num()
			|| !bEveryLiveSkillReadsAuthoritativeFirstPartyDomainState
			|| !bEverySkillPreservesOptionalAssistiveOffState
			|| !bEveryLiveSkillHasValidationHarnessCoverage
			|| !bRetainedDomainPackLayerRemainsBounded
			|| !bEverySkillRequiresDomainPackFrameworkSubstrate
			|| !bRetainedPackClaimsRemainFirstPartyGrounded
			|| !bUnlandedPackDeferralRemainsPreserved
			|| !bNoCreativeAdjunctWidening)
		{
			return false;
		}

		TArray<FString> SeenSkillIds;
		int32 ComputedLiveSkillCount = 0;
		int32 ComputedAvailableNowCount = 0;
		int32 ComputedTrainingReplayPackSkillCount = 0;
		int32 ComputedCurriculumContentPackSkillCount = 0;
		int32 ComputedMediaExportPackSkillCount = 0;
		bool bComputedEveryLiveSkillReadsAuthoritativeFirstPartyDomainState = true;
		bool bComputedEverySkillPreservesOptionalAssistiveOffState = true;
		bool bComputedEveryLiveSkillHasValidationHarnessCoverage = true;
		bool bComputedRetainedDomainPackLayerRemainsBounded = true;
		bool bComputedEverySkillRequiresDomainPackFrameworkSubstrate = true;
		bool bComputedRetainedPackClaimsRemainFirstPartyGrounded = true;
		bool bComputedUnlandedPackDeferralRemainsPreserved = true;
		bool bComputedNoCreativeAdjunctWidening = true;

		for (const FHyperTwistSkillRetainedDomainPackSkill& Skill : Skills)
		{
			if (!Skill.IsStructurallyValid() || SeenSkillIds.Contains(Skill.SkillId))
			{
				return false;
			}

			SeenSkillIds.Add(Skill.SkillId);
			ComputedLiveSkillCount += Skill.bLiveSkill ? 1 : 0;
			ComputedAvailableNowCount += Skill.bAvailableNow ? 1 : 0;
			ComputedTrainingReplayPackSkillCount +=
				Skill.bReadsTrainingReplayState ? 1 : 0;
			ComputedCurriculumContentPackSkillCount +=
				Skill.bReadsCurriculumContentState ? 1 : 0;
			ComputedMediaExportPackSkillCount +=
				Skill.bReadsMediaExportState ? 1 : 0;
			bComputedEverySkillPreservesOptionalAssistiveOffState &=
				Skill.bPreservesOptionalAssistiveOffState;
			bComputedRetainedDomainPackLayerRemainsBounded &=
				Skill.bBoundedToRetainedDomainPackOnly;
			bComputedEverySkillRequiresDomainPackFrameworkSubstrate &=
				Skill.bRequiresDomainPackFrameworkSubstrate;
			bComputedRetainedPackClaimsRemainFirstPartyGrounded &=
				Skill.bPreservesFirstPartyRetainedPackGrounding;
			bComputedUnlandedPackDeferralRemainsPreserved &=
				Skill.bPreservesUnlandedPackDeferral;
			bComputedNoCreativeAdjunctWidening &=
				Skill.bAvoidsCreativeAdjunctWidening;

			if (Skill.bLiveSkill)
			{
				bComputedEveryLiveSkillReadsAuthoritativeFirstPartyDomainState &=
					Skill.bReadsAuthoritativeFirstPartyDomainState;
				bComputedEveryLiveSkillHasValidationHarnessCoverage &=
					Skill.bHasValidationHarnessCoverage;
			}
		}

		return LiveSkillCount == ComputedLiveSkillCount
			&& AvailableNowCount == ComputedAvailableNowCount
			&& TrainingReplayPackSkillCount
				== ComputedTrainingReplayPackSkillCount
			&& CurriculumContentPackSkillCount
				== ComputedCurriculumContentPackSkillCount
			&& MediaExportPackSkillCount == ComputedMediaExportPackSkillCount
			&& bEveryLiveSkillReadsAuthoritativeFirstPartyDomainState
				== bComputedEveryLiveSkillReadsAuthoritativeFirstPartyDomainState
			&& bEverySkillPreservesOptionalAssistiveOffState
				== bComputedEverySkillPreservesOptionalAssistiveOffState
			&& bEveryLiveSkillHasValidationHarnessCoverage
				== bComputedEveryLiveSkillHasValidationHarnessCoverage
			&& bRetainedDomainPackLayerRemainsBounded
				== bComputedRetainedDomainPackLayerRemainsBounded
			&& bEverySkillRequiresDomainPackFrameworkSubstrate
				== bComputedEverySkillRequiresDomainPackFrameworkSubstrate
			&& bRetainedPackClaimsRemainFirstPartyGrounded
				== bComputedRetainedPackClaimsRemainFirstPartyGrounded
			&& bUnlandedPackDeferralRemainsPreserved
				== bComputedUnlandedPackDeferralRemainsPreserved
			&& bNoCreativeAdjunctWidening
				== bComputedNoCreativeAdjunctWidening;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillCreativeMediaPackSkill
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString SkillId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString DisplayLabel;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString CommandSurfaceId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ServiceBindingId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString OwnerLaneId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString OwnerFeatureId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	EHyperTwistSkillStatus Status = EHyperTwistSkillStatus::None;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> PermissionScopeIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> SourceSurfaceIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> RequiredRetainedDomainPackSkillIds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> OutputArtifactKinds;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FString> PreviewHeadlines;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 SourceSurfaceCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 RequiredRetainedDomainPackSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bLiveSkill = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bReadsAuthoritativeFirstPartyCreativeMediaState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bAvailableNow = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bRequiresOwnerActivation = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bPreservesOptionalAssistiveOffState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bDerivedAssistiveOnly = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bHasValidationHarnessCoverage = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bBoundedToCreativeMediaPackOnly = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bRequiresRetainedDomainPackSubstrate = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bCreativeMediaAdjunctOnly = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bAvoidsCoreRuntimePromotion = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bBoundarySensitiveLicensingRemainsExplicit = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bReadsReplayExplainerState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bReadsMediaParserState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bReadsSharedFixtureState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		if (SkillId.IsEmpty()
			|| DisplayLabel.IsEmpty()
			|| CommandSurfaceId.IsEmpty()
			|| ServiceBindingId.IsEmpty()
			|| OwnerLaneId.IsEmpty()
			|| OwnerFeatureId.IsEmpty()
			|| Status == EHyperTwistSkillStatus::None
			|| PermissionScopeIds.Num() == 0
			|| SourceSurfaceIds.Num() == 0
			|| RequiredRetainedDomainPackSkillIds.Num() == 0
			|| OutputArtifactKinds.Num() == 0
			|| PreviewHeadlines.Num() == 0
			|| SourceSurfaceCount != SourceSurfaceIds.Num()
			|| RequiredRetainedDomainPackSkillCount
				!= RequiredRetainedDomainPackSkillIds.Num()
			|| !bReadsAuthoritativeFirstPartyCreativeMediaState
			|| !bPreservesOptionalAssistiveOffState
			|| !bDerivedAssistiveOnly
			|| !bHasValidationHarnessCoverage
			|| !bBoundedToCreativeMediaPackOnly
			|| !bRequiresRetainedDomainPackSubstrate
			|| !bCreativeMediaAdjunctOnly
			|| !bAvoidsCoreRuntimePromotion
			|| !bBoundarySensitiveLicensingRemainsExplicit)
		{
			return false;
		}

		for (const FString& Value : PermissionScopeIds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : SourceSurfaceIds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : RequiredRetainedDomainPackSkillIds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : OutputArtifactKinds)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		for (const FString& Value : PreviewHeadlines)
		{
			if (Value.IsEmpty())
			{
				return false;
			}
		}

		const int32 PackModeCount =
			(bReadsReplayExplainerState ? 1 : 0)
			+ (bReadsMediaParserState ? 1 : 0)
			+ (bReadsSharedFixtureState ? 1 : 0);
		return PackModeCount == 1
			&& Status == EHyperTwistSkillStatus::ImplementedNow
			&& bLiveSkill
			&& bAvailableNow
			&& !bRequiresOwnerActivation;
	}
};

USTRUCT(BlueprintType)
struct FHyperTwistSkillCreativeMediaPackState
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString RegistryId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ManifestVersion;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString ReferenceUtc;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString CommandSurfaceRootId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString TemplateVersion;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	TArray<FHyperTwistSkillCreativeMediaPackSkill> Skills;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 SkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 LiveSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 AvailableNowCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 ReplayExplainerPackSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 MediaParserPackSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	int32 SharedFixturePackSkillCount = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEveryLiveSkillReadsAuthoritativeFirstPartyCreativeMediaState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySkillPreservesOptionalAssistiveOffState = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEveryLiveSkillHasValidationHarnessCoverage = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bCreativeMediaPackLayerRemainsBounded = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bEverySkillRequiresRetainedDomainPackSubstrate = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bCreativeMediaAdjunctsRemainOptional = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bNoCoreRuntimePromotion = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	bool bBoundarySensitiveLicensingRemainsExplicit = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
	FString Summary;

	bool IsStructurallyValid() const
	{
		if (RegistryId.IsEmpty()
			|| ManifestVersion.IsEmpty()
			|| ReferenceUtc.IsEmpty()
			|| CommandSurfaceRootId.IsEmpty()
			|| TemplateVersion.IsEmpty()
			|| Skills.Num() == 0
			|| SkillCount != Skills.Num()
			|| !bEveryLiveSkillReadsAuthoritativeFirstPartyCreativeMediaState
			|| !bEverySkillPreservesOptionalAssistiveOffState
			|| !bEveryLiveSkillHasValidationHarnessCoverage
			|| !bCreativeMediaPackLayerRemainsBounded
			|| !bEverySkillRequiresRetainedDomainPackSubstrate
			|| !bCreativeMediaAdjunctsRemainOptional
			|| !bNoCoreRuntimePromotion
			|| !bBoundarySensitiveLicensingRemainsExplicit)
		{
			return false;
		}

		TArray<FString> SeenSkillIds;
		int32 ComputedLiveSkillCount = 0;
		int32 ComputedAvailableNowCount = 0;
		int32 ComputedReplayExplainerPackSkillCount = 0;
		int32 ComputedMediaParserPackSkillCount = 0;
		int32 ComputedSharedFixturePackSkillCount = 0;
		bool bComputedEveryLiveSkillReadsAuthoritativeFirstPartyCreativeMediaState =
			true;
		bool bComputedEverySkillPreservesOptionalAssistiveOffState = true;
		bool bComputedEveryLiveSkillHasValidationHarnessCoverage = true;
		bool bComputedCreativeMediaPackLayerRemainsBounded = true;
		bool bComputedEverySkillRequiresRetainedDomainPackSubstrate = true;
		bool bComputedCreativeMediaAdjunctsRemainOptional = true;
		bool bComputedNoCoreRuntimePromotion = true;
		bool bComputedBoundarySensitiveLicensingRemainsExplicit = true;

		for (const FHyperTwistSkillCreativeMediaPackSkill& Skill : Skills)
		{
			if (!Skill.IsStructurallyValid() || SeenSkillIds.Contains(Skill.SkillId))
			{
				return false;
			}

			SeenSkillIds.Add(Skill.SkillId);
			ComputedLiveSkillCount += Skill.bLiveSkill ? 1 : 0;
			ComputedAvailableNowCount += Skill.bAvailableNow ? 1 : 0;
			ComputedReplayExplainerPackSkillCount +=
				Skill.bReadsReplayExplainerState ? 1 : 0;
			ComputedMediaParserPackSkillCount +=
				Skill.bReadsMediaParserState ? 1 : 0;
			ComputedSharedFixturePackSkillCount +=
				Skill.bReadsSharedFixtureState ? 1 : 0;
			bComputedEverySkillPreservesOptionalAssistiveOffState &=
				Skill.bPreservesOptionalAssistiveOffState;
			bComputedCreativeMediaPackLayerRemainsBounded &=
				Skill.bBoundedToCreativeMediaPackOnly;
			bComputedEverySkillRequiresRetainedDomainPackSubstrate &=
				Skill.bRequiresRetainedDomainPackSubstrate;
			bComputedCreativeMediaAdjunctsRemainOptional &=
				Skill.bCreativeMediaAdjunctOnly;
			bComputedNoCoreRuntimePromotion &= Skill.bAvoidsCoreRuntimePromotion;
			bComputedBoundarySensitiveLicensingRemainsExplicit &=
				Skill.bBoundarySensitiveLicensingRemainsExplicit;

			if (Skill.bLiveSkill)
			{
				bComputedEveryLiveSkillReadsAuthoritativeFirstPartyCreativeMediaState &=
					Skill.bReadsAuthoritativeFirstPartyCreativeMediaState;
				bComputedEveryLiveSkillHasValidationHarnessCoverage &=
					Skill.bHasValidationHarnessCoverage;
			}
		}

		return LiveSkillCount == ComputedLiveSkillCount
			&& AvailableNowCount == ComputedAvailableNowCount
			&& ReplayExplainerPackSkillCount
				== ComputedReplayExplainerPackSkillCount
			&& MediaParserPackSkillCount == ComputedMediaParserPackSkillCount
			&& SharedFixturePackSkillCount == ComputedSharedFixturePackSkillCount
			&& bEveryLiveSkillReadsAuthoritativeFirstPartyCreativeMediaState
				== bComputedEveryLiveSkillReadsAuthoritativeFirstPartyCreativeMediaState
			&& bEverySkillPreservesOptionalAssistiveOffState
				== bComputedEverySkillPreservesOptionalAssistiveOffState
			&& bEveryLiveSkillHasValidationHarnessCoverage
				== bComputedEveryLiveSkillHasValidationHarnessCoverage
			&& bCreativeMediaPackLayerRemainsBounded
				== bComputedCreativeMediaPackLayerRemainsBounded
			&& bEverySkillRequiresRetainedDomainPackSubstrate
				== bComputedEverySkillRequiresRetainedDomainPackSubstrate
			&& bCreativeMediaAdjunctsRemainOptional
				== bComputedCreativeMediaAdjunctsRemainOptional
			&& bNoCoreRuntimePromotion == bComputedNoCoreRuntimePromotion
			&& bBoundarySensitiveLicensingRemainsExplicit
				== bComputedBoundarySensitiveLicensingRemainsExplicit;
	}
};
