diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistBootstrap/HyperTwistContractLibrary.cpp b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistBootstrap/HyperTwistContractLibrary.cpp index 916dca6..507ffc6 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistBootstrap/HyperTwistContractLibrary.cpp +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistBootstrap/HyperTwistContractLibrary.cpp @@ -83,6 +83,22 @@ namespace HyperTwistContractLibraryInternal return OverrideState; }(), []() + { + FHyperTwistSkillControlOverride OverrideState; + OverrideState.SkillId = TEXT("skill/recall-memory"); + OverrideState.bHasEnabledOverride = true; + OverrideState.bEnabled = true; + return OverrideState; + }(), + []() + { + FHyperTwistSkillControlOverride OverrideState; + OverrideState.SkillId = TEXT("skill/generate-compact-view"); + OverrideState.bHasEnabledOverride = true; + OverrideState.bEnabled = true; + return OverrideState; + }(), + []() { FHyperTwistSkillControlOverride OverrideState; OverrideState.SkillId = TEXT("skill/provider-routing-inspector"); @@ -4099,6 +4115,23 @@ UHyperTwistContractLibrary::MakeSampleSkillContinuityResumeState() ); } +FHyperTwistSkillRecallCompactViewState +UHyperTwistContractLibrary::MakeSampleSkillRecallCompactViewState() +{ + const FHyperTwistSkillRegistryState RegistryState = MakeSampleSkillRegistryState(); + const FHyperTwistSkillControlState ControlState = MakeSampleSkillControlState(); + const FHyperTwistSkillAuthoringHarnessState AuthoringHarnessState = + MakeSampleSkillAuthoringHarnessState(); + + return UHyperTwistSkillCoreLibrary::DeriveSkillRecallCompactViewState( + RegistryState, + ControlState, + AuthoringHarnessState, + MakeSampleTrainingMemoryRecallSharedContextState(), + MakeSampleTrainingMemoryDerivedAdjunctState() + ); +} + FHyperTwistTrainingRepositoryIntegrityReport UHyperTwistContractLibrary::MakeSampleTrainingRepositoryIntegrityReport() { FHyperTwistTrainingRepositoryState RepositoryState = MakeSampleTrainingRepositoryState(); @@ -5280,6 +5313,15 @@ FString UHyperTwistContractLibrary::SerializeSkillContinuityResumeStateToJson( ); } +FString UHyperTwistContractLibrary::SerializeSkillRecallCompactViewStateToJson( + const FHyperTwistSkillRecallCompactViewState& SkillRecallCompactViewState +) +{ + return HyperTwistContractLibraryInternal::SerializeStructToJson( + SkillRecallCompactViewState + ); +} + FString UHyperTwistContractLibrary::SerializeTrainingTimerExportPacketToJson( const FHyperTwistTrainingTimerExportPacket& TimerExportPacket ) @@ -5490,6 +5532,17 @@ bool UHyperTwistContractLibrary::DeserializeSkillContinuityResumeStateFromJson( ); } +bool UHyperTwistContractLibrary::DeserializeSkillRecallCompactViewStateFromJson( + const FString& Json, + FHyperTwistSkillRecallCompactViewState& OutSkillRecallCompactViewState +) +{ + return HyperTwistContractLibraryInternal::DeserializeStructFromJson( + Json, + OutSkillRecallCompactViewState + ); +} + bool UHyperTwistContractLibrary::DeserializeTrainingTimerExportPacketFromJson( const FString& Json, FHyperTwistTrainingTimerExportPacket& OutTimerExportPacket diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistSkills/HyperTwistSkillCoreLibrary.cpp b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistSkills/HyperTwistSkillCoreLibrary.cpp index d07b1af..808684d 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistSkills/HyperTwistSkillCoreLibrary.cpp +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistSkills/HyperTwistSkillCoreLibrary.cpp @@ -439,6 +439,12 @@ namespace HyperTwistSkillCoreLibraryInternal || SkillId == TEXT("skill/capture-note"); } + bool IsRecallCompactViewSkill(const FString& SkillId) + { + return SkillId == TEXT("skill/recall-memory") + || SkillId == TEXT("skill/generate-compact-view"); + } + bool HasAtLeastCleanRoomCommandContractStatus(const EHyperTwistSkillStatus Status) { return Status == EHyperTwistSkillStatus::CleanRoomCommandContractSpecified @@ -654,6 +660,12 @@ namespace HyperTwistSkillCoreLibraryInternal return EHyperTwistSkillInvocationOutcome::Succeeded; } + if (Entry.SkillId == TEXT("skill/recall-memory") + || Entry.SkillId == TEXT("skill/generate-compact-view")) + { + return EHyperTwistSkillInvocationOutcome::Succeeded; + } + return EHyperTwistSkillInvocationOutcome::Failed; } @@ -950,11 +962,11 @@ namespace HyperTwistSkillCoreLibraryInternal FHyperTwistSkillRegistryState RegistryState; RegistryState.RegistryId = TEXT("skill-registry/first-party"); - RegistryState.ManifestVersion = TEXT("s3a-v1"); - RegistryState.ReferenceUtc = TEXT("2026-05-29T02:40:00Z"); + RegistryState.ManifestVersion = TEXT("s3b-v1"); + RegistryState.ReferenceUtc = TEXT("2026-05-29T03:40:00Z"); RegistryState.CommandSurfaceRootId = TEXT("command-surface/skills"); RegistryState.Summary = - TEXT("First-party skill registry and manifest contract with landed permissive analyzer wrappers, landed clean-room command contracts, landed clean-room skill specs, and landed continuity/resume skills."); + TEXT("First-party skill registry and manifest contract with landed permissive analyzer wrappers, landed clean-room command contracts, landed clean-room skill specs, landed continuity/resume skills, and landed recall/compact-view skills."); RegistryState.Entries = { MakeSkillEntry( @@ -1206,6 +1218,88 @@ namespace HyperTwistSkillCoreLibraryInternal ), TEXT("Declared first-party note-capture skill remains pending until user-authored note ownership is separately justified.") ), + MakeSkillEntry( + TEXT("skill/recall-memory"), + TEXT("Recall Memory"), + TEXT("lane/skillization/memory-continuity"), + TEXT("feature/skills/recall-memory"), + EHyperTwistSkillFamily::MemoryContinuity, + EHyperTwistSkillStatus::ImplementedNow, + false, + true, + { + MakeCommandBinding( + TEXT("command/skills/recall-memory"), + TEXT("service/skills/recall-memory"), + TEXT("feature/skills/recall-memory"), + TEXT("memory/explicit-recall"), + true, + TEXT("Live first-party recall skill over authoritative memory matches and provenance drill-down.") + ) + }, + { + MakePermissionScope( + TEXT("scope/skills/recall-memory"), + TEXT("Recall Memory"), + true, + false, + false, + true, + false, + false, + true, + TEXT("Reads authoritative training and memory recall state to emit bounded recall output.") + ) + }, + MakeProvenanceDeclaration( + EHyperTwistSkillLogPolicy::InvocationLedgerRequired, + {TEXT("artifact/recall-memory-brief")}, + true, + TEXT("Recall-memory output must remain provenance-visible and linked to authoritative memory lineage.") + ), + TEXT("Landed first-party recall skill over authoritative memory matches and drill-down lineage.") + ), + MakeSkillEntry( + TEXT("skill/generate-compact-view"), + TEXT("Generate Compact View"), + TEXT("lane/skillization/memory-continuity"), + TEXT("feature/skills/generate-compact-view"), + EHyperTwistSkillFamily::MemoryContinuity, + EHyperTwistSkillStatus::ImplementedNow, + false, + true, + { + MakeCommandBinding( + TEXT("command/skills/generate-compact-view"), + TEXT("service/skills/generate-compact-view"), + TEXT("feature/skills/generate-compact-view"), + TEXT("memory/compact-view"), + true, + TEXT("Live first-party optional compact-view skill over derived memory adjunct surfaces linked back to authoritative sources.") + ) + }, + { + MakePermissionScope( + TEXT("scope/skills/generate-compact-view"), + TEXT("Generate Compact View"), + true, + false, + false, + true, + false, + false, + true, + TEXT("Reads authoritative and derived memory state to emit bounded optional compact-view output.") + ) + }, + MakeProvenanceDeclaration( + EHyperTwistSkillLogPolicy::InvocationLedgerRequired, + {TEXT("artifact/compact-view-brief")}, + true, + TEXT("Compact-view output must remain optional, provenance-visible, and linked to authoritative sources.") + ), + TEXT("Landed first-party optional compact-view skill over derived memory adjunct surfaces.") + ), MakeSkillEntry( TEXT("skill/provider-routing-inspector"), TEXT("Provider Routing Inspector"), @@ -1344,7 +1438,7 @@ namespace HyperTwistSkillCoreLibraryInternal RegistryState.bNoAdHocMetadataRequired = true; RegistryState.StatusCounts = { - MakeStatusCount(EHyperTwistSkillStatus::ImplementedNow, 6), + MakeStatusCount(EHyperTwistSkillStatus::ImplementedNow, 8), MakeStatusCount(EHyperTwistSkillStatus::CommandContractPending, 1), MakeStatusCount(EHyperTwistSkillStatus::CleanRoomSkillSpecSpecified, 1), MakeStatusCount(EHyperTwistSkillStatus::PlaceholderFamily, 1) @@ -1353,7 +1447,7 @@ namespace HyperTwistSkillCoreLibraryInternal RegistryState.FamilyCounts = { MakeFamilyCount(EHyperTwistSkillFamily::SubstrateGovernance, 1), MakeFamilyCount(EHyperTwistSkillFamily::AnalysisReview, 1), - MakeFamilyCount(EHyperTwistSkillFamily::MemoryContinuity, 4), + MakeFamilyCount(EHyperTwistSkillFamily::MemoryContinuity, 6), MakeFamilyCount(EHyperTwistSkillFamily::ProviderOperations, 1), MakeFamilyCount(EHyperTwistSkillFamily::TrainingCoaching, 1), MakeFamilyCount(EHyperTwistSkillFamily::DomainCreative, 1) @@ -2300,3 +2394,253 @@ UHyperTwistSkillCoreLibrary::DeriveSkillContinuityResumeState( return ContinuityState; } + +FHyperTwistSkillRecallCompactViewState +UHyperTwistSkillCoreLibrary::DeriveSkillRecallCompactViewState( + const FHyperTwistSkillRegistryState& RegistryState, + const FHyperTwistSkillControlState& ControlState, + const FHyperTwistSkillAuthoringHarnessState& AuthoringHarnessState, + const FHyperTwistMemoryRecallSharedContextState& RecallSharedContextState, + const FHyperTwistMemoryDerivedAdjunctState& DerivedAdjunctState +) +{ + using namespace HyperTwistSkillCoreLibraryInternal; + + if (!RegistryState.IsStructurallyValid() + || !ControlState.IsStructurallyValid() + || !AuthoringHarnessState.IsStructurallyValid() + || !RecallSharedContextState.IsStructurallyValid() + || !DerivedAdjunctState.IsStructurallyValid() + || RegistryState.RegistryId != ControlState.RegistryId + || RegistryState.RegistryId != AuthoringHarnessState.RegistryId + || RegistryState.CommandSurfaceRootId != ControlState.CommandSurfaceRootId + || RegistryState.CommandSurfaceRootId != AuthoringHarnessState.CommandSurfaceRootId) + { + return FHyperTwistSkillRecallCompactViewState(); + } + + FHyperTwistSkillRecallCompactViewState RecallCompactViewState; + RecallCompactViewState.RegistryId = RegistryState.RegistryId; + RecallCompactViewState.ManifestVersion = TEXT("s3b-v1"); + RecallCompactViewState.ReferenceUtc = TEXT("2026-05-29T04:05:00Z"); + RecallCompactViewState.CommandSurfaceRootId = RegistryState.CommandSurfaceRootId; + RecallCompactViewState.TemplateVersion = TEXT("skill-recall-compact-view-v1"); + RecallCompactViewState.bEveryLiveSkillReadsAuthoritativeStores = true; + RecallCompactViewState.bEverySkillPreservesOptionalAssistiveOffState = true; + RecallCompactViewState.bEveryLiveSkillHasValidationHarnessCoverage = true; + RecallCompactViewState.bCompactViewsRemainOptionalAndLinkedToAuthoritativeSources = true; + RecallCompactViewState.Summary = + TEXT("First-party recall and compact-view skill layer over landed memory seams."); + + auto AddPreviewHeadline = []( + TArray& PreviewHeadlines, + const FString& Headline + ) + { + if (!Headline.IsEmpty()) + { + PreviewHeadlines.AddUnique(Headline); + } + }; + + auto AddUniqueSourceId = []( + TArray& SourceIds, + const FString& SourceId + ) + { + if (!SourceId.IsEmpty()) + { + SourceIds.AddUnique(SourceId); + } + }; + + auto BuildRecallCompactSkill = [&]( + const FString& SkillId + ) -> FHyperTwistSkillRecallCompactViewSkill + { + const FHyperTwistSkillManifestEntry* Entry = + FindManifestEntryById(RegistryState, SkillId); + const FHyperTwistSkillControlStateEntry* ControlEntry = + FindControlStateEntryById(ControlState, SkillId); + const FHyperTwistSkillAuthoringExampleState* ExampleState = + FindAuthoringExampleBySkillId(AuthoringHarnessState, SkillId); + if (Entry == nullptr + || !Entry->IsStructurallyValid() + || !IsRecallCompactViewSkill(SkillId) + || ControlEntry == nullptr + || !ControlEntry->IsStructurallyValid() + || !ControlEntry->bInstalled + || !ControlEntry->bOptionalAssistive + || ExampleState == nullptr + || !ExampleState->IsStructurallyValid() + || !HasLiveEvalValidationCase(AuthoringHarnessState, SkillId)) + { + return FHyperTwistSkillRecallCompactViewSkill(); + } + + FHyperTwistSkillRecallCompactViewSkill SkillState; + SkillState.SkillId = Entry->SkillId; + SkillState.DisplayLabel = Entry->DisplayLabel; + SkillState.CommandSurfaceId = Entry->CommandBindings[0].CommandSurfaceId; + SkillState.ServiceBindingId = Entry->CommandBindings[0].ServiceBindingId; + SkillState.OwnerLaneId = Entry->OwnerLaneId; + SkillState.OwnerFeatureId = Entry->OwnerFeatureId; + SkillState.Status = Entry->Status; + SkillState.PermissionScopeIds = MakePermissionScopeIds(*Entry); + SkillState.OutputArtifactKinds = Entry->Provenance.ProducedArtifactKinds; + SkillState.bLiveSkill = true; + SkillState.bRequiresOwnerActivation = false; + SkillState.bPreservesOptionalAssistiveOffState = ControlEntry->bInertWhenDisabled; + SkillState.bDerivedAssistiveOnly = Entry->bOptionalAssistive; + SkillState.bHasValidationHarnessCoverage = true; + + TArray LinkedSourceIds; + + if (SkillId == TEXT("skill/recall-memory")) + { + SkillState.InputStateKinds = { + TEXT("state/memory-recall-shared-context"), + TEXT("state/memory-recall-match"), + TEXT("state/memory-provenance-drilldown") + }; + + for (const FHyperTwistMemoryRecallMatch& RecallMatch : + RecallSharedContextState.RecallMatches) + { + if (RecallMatch.AuthorityKind == + EHyperTwistMemoryAuthorityKind::Authoritative) + { + AddPreviewHeadline(SkillState.PreviewHeadlines, RecallMatch.Headline); + AddUniqueSourceId(LinkedSourceIds, RecallMatch.SourceEntityId); + } + } + for (const FHyperTwistMemoryProvenanceDrillDownEntry& DrillDownEntry : + RecallSharedContextState.ProvenanceDrillDownEntries) + { + AddPreviewHeadline(SkillState.PreviewHeadlines, DrillDownEntry.Headline); + AddUniqueSourceId(LinkedSourceIds, DrillDownEntry.RootEntityId); + } + AddPreviewHeadline(SkillState.PreviewHeadlines, RecallSharedContextState.QueryText); + + SkillState.AvailableItemCount = RecallSharedContextState.AuthoritativeRecallCount; + SkillState.LinkedSourceCount = LinkedSourceIds.Num(); + SkillState.bReadsAuthoritativeStores = + RecallSharedContextState.AuthoritativeRecallCount > 0 + && RecallSharedContextState.ProvenanceDrillDownEntries.Num() > 0; + SkillState.bAvailableNow = + RecallSharedContextState.AuthoritativeRecallCount > 0; + SkillState.bOptionalCompactView = false; + SkillState.bLinkedToAuthoritativeSources = SkillState.LinkedSourceCount > 0; + SkillState.Summary = + TEXT("Live first-party recall skill over authoritative memory matches and provenance drill-down lineage."); + } + else if (SkillId == TEXT("skill/generate-compact-view")) + { + SkillState.InputStateKinds = { + TEXT("state/memory-derived-adjunct"), + TEXT("state/memory-compact-summary"), + TEXT("state/memory-reduced-context-packet"), + TEXT("state/memory-digest-view") + }; + + for (const FHyperTwistMemoryCompactSummary& CompactSummary : + DerivedAdjunctState.CompactSummaries) + { + AddPreviewHeadline(SkillState.PreviewHeadlines, CompactSummary.Headline); + for (const FString& SourceEntityId : CompactSummary.SourceEntityIds) + { + AddUniqueSourceId(LinkedSourceIds, SourceEntityId); + } + } + for (const FHyperTwistMemoryReducedContextPacket& ReducedContextPacket : + DerivedAdjunctState.ReducedContextPackets) + { + AddPreviewHeadline(SkillState.PreviewHeadlines, ReducedContextPacket.Headline); + for (const FString& SourceEntityId : ReducedContextPacket.SourceEntityIds) + { + AddUniqueSourceId(LinkedSourceIds, SourceEntityId); + } + } + for (const FHyperTwistMemoryDigestView& DigestView : + DerivedAdjunctState.DigestViews) + { + AddPreviewHeadline(SkillState.PreviewHeadlines, DigestView.Title); + AddPreviewHeadline(SkillState.PreviewHeadlines, DigestView.SummaryLine); + for (const FString& SourceEntityId : DigestView.SourceEntityIds) + { + AddUniqueSourceId(LinkedSourceIds, SourceEntityId); + } + } + + SkillState.AvailableItemCount = + DerivedAdjunctState.CompactSummaryCount + + DerivedAdjunctState.ReducedContextPacketCount + + DerivedAdjunctState.DigestViewCount; + SkillState.LinkedSourceCount = LinkedSourceIds.Num(); + SkillState.bReadsAuthoritativeStores = + DerivedAdjunctState.bDerivedGateActive + && DerivedAdjunctState.bDerivedOnlyStorageConfirmed + && DerivedAdjunctState.CompactSummaryCount > 0 + && DerivedAdjunctState.ReducedContextPacketCount > 0 + && DerivedAdjunctState.DigestViewCount > 0; + SkillState.bAvailableNow = DerivedAdjunctState.bDerivedGateActive; + SkillState.bOptionalCompactView = true; + SkillState.bLinkedToAuthoritativeSources = SkillState.LinkedSourceCount > 0; + SkillState.Summary = + TEXT("Live first-party optional compact-view skill over derived adjunct surfaces linked back to authoritative sources."); + } + + if (SkillState.PreviewHeadlines.Num() == 0) + { + AddPreviewHeadline(SkillState.PreviewHeadlines, SkillState.DisplayLabel); + } + + return SkillState; + }; + + for (const FString& SkillId : { + FString(TEXT("skill/recall-memory")), + FString(TEXT("skill/generate-compact-view")) + }) + { + const FHyperTwistSkillRecallCompactViewSkill SkillState = + BuildRecallCompactSkill(SkillId); + if (!SkillState.IsStructurallyValid()) + { + return FHyperTwistSkillRecallCompactViewState(); + } + + RecallCompactViewState.Skills.Add(SkillState); + } + + for (const FHyperTwistSkillRecallCompactViewSkill& SkillState : + RecallCompactViewState.Skills) + { + RecallCompactViewState.LiveSkillCount += SkillState.bLiveSkill ? 1 : 0; + RecallCompactViewState.AvailableNowCount += SkillState.bAvailableNow ? 1 : 0; + RecallCompactViewState.RecallMemorySkillCount += + SkillState.SkillId == TEXT("skill/recall-memory") ? 1 : 0; + RecallCompactViewState.GenerateCompactViewSkillCount += + SkillState.SkillId == TEXT("skill/generate-compact-view") ? 1 : 0; + RecallCompactViewState.bEverySkillPreservesOptionalAssistiveOffState &= + SkillState.bPreservesOptionalAssistiveOffState; + + if (SkillState.bLiveSkill) + { + RecallCompactViewState.bEveryLiveSkillReadsAuthoritativeStores &= + SkillState.bReadsAuthoritativeStores; + RecallCompactViewState.bEveryLiveSkillHasValidationHarnessCoverage &= + SkillState.bHasValidationHarnessCoverage; + } + + if (SkillState.SkillId == TEXT("skill/generate-compact-view")) + { + RecallCompactViewState.bCompactViewsRemainOptionalAndLinkedToAuthoritativeSources = + SkillState.bOptionalCompactView && SkillState.bLinkedToAuthoritativeSources; + } + } + + RecallCompactViewState.SkillCount = RecallCompactViewState.Skills.Num(); + + return RecallCompactViewState; +} diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistBootstrap/HyperTwistContractLibrary.h b/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistBootstrap/HyperTwistContractLibrary.h index 84738ed..5d1de8a 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistBootstrap/HyperTwistContractLibrary.h +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistBootstrap/HyperTwistContractLibrary.h @@ -192,6 +192,9 @@ public: UFUNCTION(BlueprintPure, Category = "HyperTwist|Skills") static FHyperTwistSkillContinuityResumeState MakeSampleSkillContinuityResumeState(); + UFUNCTION(BlueprintPure, Category = "HyperTwist|Skills") + static FHyperTwistSkillRecallCompactViewState MakeSampleSkillRecallCompactViewState(); + UFUNCTION(BlueprintPure, Category = "HyperTwist|Training") static FHyperTwistTrainingRepositoryIntegrityReport MakeSampleTrainingRepositoryIntegrityReport(); @@ -421,6 +424,11 @@ public: const FHyperTwistSkillContinuityResumeState& SkillContinuityResumeState ); + UFUNCTION(BlueprintPure, Category = "HyperTwist|Serialization") + static FString SerializeSkillRecallCompactViewStateToJson( + const FHyperTwistSkillRecallCompactViewState& SkillRecallCompactViewState + ); + UFUNCTION(BlueprintPure, Category = "HyperTwist|Serialization") static FString SerializeTrainingTimerExportPacketToJson(const FHyperTwistTrainingTimerExportPacket& TimerExportPacket); @@ -541,6 +549,12 @@ public: FHyperTwistSkillContinuityResumeState& OutSkillContinuityResumeState ); + UFUNCTION(BlueprintCallable, Category = "HyperTwist|Serialization") + static bool DeserializeSkillRecallCompactViewStateFromJson( + const FString& Json, + FHyperTwistSkillRecallCompactViewState& OutSkillRecallCompactViewState + ); + UFUNCTION(BlueprintCallable, Category = "HyperTwist|Serialization") static bool DeserializeTrainingTimerExportPacketFromJson(const FString& Json, FHyperTwistTrainingTimerExportPacket& OutTimerExportPacket); }; diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistSkills/HyperTwistSkillCoreLibrary.h b/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistSkills/HyperTwistSkillCoreLibrary.h index 21f39f0..4f9ad36 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistSkills/HyperTwistSkillCoreLibrary.h +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistSkills/HyperTwistSkillCoreLibrary.h @@ -65,4 +65,13 @@ public: const FHyperTwistMemoryRecallSharedContextState& RecallSharedContextState, const FHyperTwistMemoryKnowledgeNotesState& KnowledgeNotesState ); + + UFUNCTION(BlueprintPure, Category = "HyperTwist|Skills") + static FHyperTwistSkillRecallCompactViewState DeriveSkillRecallCompactViewState( + const FHyperTwistSkillRegistryState& RegistryState, + const FHyperTwistSkillControlState& ControlState, + const FHyperTwistSkillAuthoringHarnessState& AuthoringHarnessState, + const FHyperTwistMemoryRecallSharedContextState& RecallSharedContextState, + const FHyperTwistMemoryDerivedAdjunctState& DerivedAdjunctState + ); }; diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistSkills/HyperTwistSkillTypes.h b/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistSkills/HyperTwistSkillTypes.h index d907a7d..2c2bc20 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistSkills/HyperTwistSkillTypes.h +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistSkills/HyperTwistSkillTypes.h @@ -2702,3 +2702,268 @@ struct FHyperTwistSkillContinuityResumeState == 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 PermissionScopeIds; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + TArray InputStateKinds; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + TArray OutputArtifactKinds; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + TArray 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 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 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; + } +}; diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Tests/HyperTwistSkillPhaseS1ARegistryManifestContractTest.cpp b/UnrealHyperTwist/Source/UnrealHyperTwist/Tests/HyperTwistSkillPhaseS1ARegistryManifestContractTest.cpp index e91292c..349b085 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Tests/HyperTwistSkillPhaseS1ARegistryManifestContractTest.cpp +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Tests/HyperTwistSkillPhaseS1ARegistryManifestContractTest.cpp @@ -73,9 +73,9 @@ bool FHyperTwistSkillPhaseS1ARegistryManifestTest::RunTest(const FString& Parame RegistryState.IsStructurallyValid() ); TestEqual( - TEXT("The sample S1-A registry must expose nine declared skills after S3-A lands."), + TEXT("The sample S1-A registry must expose eleven declared skills after S3-B lands."), RegistryState.SkillCount, - 9 + 11 ); TestTrue( TEXT("The S1-A registry must avoid ad hoc metadata."), @@ -86,12 +86,12 @@ bool FHyperTwistSkillPhaseS1ARegistryManifestTest::RunTest(const FString& Parame RegistryState.bAllSkillsOptionalAssistive ); TestEqual( - TEXT("The sample S1-A registry must keep six implemented skill entries after S3-A lands."), + TEXT("The sample S1-A registry must keep eight implemented skill entries after S3-B lands."), HyperTwistSkillPhaseS1ATestInternal::FindStatusCount( RegistryState, EHyperTwistSkillStatus::ImplementedNow ), - 6 + 8 ); TestEqual( TEXT("The sample S1-A registry must keep one command-contract-pending entry for note capture."), @@ -145,6 +145,29 @@ bool FHyperTwistSkillPhaseS1ARegistryManifestTest::RunTest(const FString& Parame ); } + const FHyperTwistSkillManifestEntry* RecallMemorySkill = + HyperTwistSkillPhaseS1ATestInternal::FindSkillById( + RegistryState, + TEXT("skill/recall-memory") + ); + TestNotNull( + TEXT("The recall-memory skill entry must exist."), + RecallMemorySkill + ); + if (RecallMemorySkill != nullptr) + { + TestEqual( + TEXT("The recall-memory skill must be implemented now."), + RecallMemorySkill->Status, + EHyperTwistSkillStatus::ImplementedNow + ); + TestEqual( + TEXT("The recall-memory skill must bind to the first-party recall-memory service."), + RecallMemorySkill->CommandBindings[0].ServiceBindingId, + FString(TEXT("service/skills/recall-memory")) + ); + } + return true; } @@ -250,6 +273,29 @@ bool FHyperTwistSkillPhaseS1ADisabledSkillsRemainInstalledTest::RunTest( ); } + const FHyperTwistSkillManifestEntry* CompactViewSkill = + HyperTwistSkillPhaseS1ATestInternal::FindSkillById( + RegistryState, + TEXT("skill/generate-compact-view") + ); + TestNotNull( + TEXT("A generate-compact-view skill entry must exist."), + CompactViewSkill + ); + if (CompactViewSkill != nullptr) + { + TestEqual( + TEXT("The generate-compact-view skill must be implemented now."), + CompactViewSkill->Status, + EHyperTwistSkillStatus::ImplementedNow + ); + TestEqual( + TEXT("The generate-compact-view skill should point to the first-party compact-view service id."), + CompactViewSkill->CommandBindings[0].ServiceBindingId, + FString(TEXT("service/skills/generate-compact-view")) + ); + } + return true; } diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Tests/HyperTwistSkillPhaseS1DAuthoringValidationHarnessContractTest.cpp b/UnrealHyperTwist/Source/UnrealHyperTwist/Tests/HyperTwistSkillPhaseS1DAuthoringValidationHarnessContractTest.cpp index c157485..f0eb838 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Tests/HyperTwistSkillPhaseS1DAuthoringValidationHarnessContractTest.cpp +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Tests/HyperTwistSkillPhaseS1DAuthoringValidationHarnessContractTest.cpp @@ -173,6 +173,44 @@ bool FHyperTwistSkillPhaseS1DValidationHarnessCoverageTest::RunTest(const FStrin ); } + const FHyperTwistSkillValidationContractCase* RecallMemoryEval = + HyperTwistSkillPhaseS1DTestInternal::FindValidationCase( + HarnessState, + TEXT("skill/recall-memory"), + EHyperTwistSkillValidationContractKind::Eval + ); + TestNotNull( + TEXT("The recall-memory skill should have an eval validation contract."), + RecallMemoryEval + ); + if (RecallMemoryEval != nullptr) + { + TestEqual( + TEXT("The recall-memory skill eval contract should now run live after S3-B lands."), + RecallMemoryEval->ExecutionMode, + EHyperTwistSkillValidationExecutionMode::LiveContract + ); + } + + const FHyperTwistSkillValidationContractCase* CompactViewEval = + HyperTwistSkillPhaseS1DTestInternal::FindValidationCase( + HarnessState, + TEXT("skill/generate-compact-view"), + EHyperTwistSkillValidationContractKind::Eval + ); + TestNotNull( + TEXT("The generate-compact-view skill should have an eval validation contract."), + CompactViewEval + ); + if (CompactViewEval != nullptr) + { + TestEqual( + TEXT("The generate-compact-view skill eval contract should now run live after S3-B lands."), + CompactViewEval->ExecutionMode, + EHyperTwistSkillValidationExecutionMode::LiveContract + ); + } + const FHyperTwistSkillValidationContractCase* RouxEval = HyperTwistSkillPhaseS1DTestInternal::FindValidationCase( HarnessState, diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Tests/HyperTwistSkillPhaseS3BRecallCompactViewContractTest.cpp b/UnrealHyperTwist/Source/UnrealHyperTwist/Tests/HyperTwistSkillPhaseS3BRecallCompactViewContractTest.cpp new file mode 100644 index 0000000..0867344 --- /dev/null +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Tests/HyperTwistSkillPhaseS3BRecallCompactViewContractTest.cpp @@ -0,0 +1,195 @@ +// Copyright HyperTwist, Inc. All Rights Reserved. + +#include "Misc/AutomationTest.h" + +#include "HyperTwistBootstrap/HyperTwistContractLibrary.h" + +#if WITH_AUTOMATION_TESTS + +namespace HyperTwistSkillPhaseS3BTestInternal +{ + const FHyperTwistSkillRecallCompactViewSkill* FindSkillById( + const FHyperTwistSkillRecallCompactViewState& RecallCompactViewState, + const FString& SkillId + ) + { + for (const FHyperTwistSkillRecallCompactViewSkill& Skill : + RecallCompactViewState.Skills) + { + if (Skill.SkillId == SkillId) + { + return &Skill; + } + } + + return nullptr; + } +} + +IMPLEMENT_SIMPLE_AUTOMATION_TEST( + FHyperTwistSkillPhaseS3BRecallCompactViewCoverageTest, + "HyperTwist.FirstParty.Skill.PhaseS3B.RecallCompactViewCoverage", + EAutomationTestFlags::EditorContext | EAutomationTestFlags::EngineFilter +) + +bool FHyperTwistSkillPhaseS3BRecallCompactViewCoverageTest::RunTest( + const FString& Parameters +) +{ + const FHyperTwistSkillRecallCompactViewState RecallCompactViewState = + UHyperTwistContractLibrary::MakeSampleSkillRecallCompactViewState(); + + TestTrue( + TEXT("The sample S3-B recall/compact-view skill state should be structurally valid."), + RecallCompactViewState.IsStructurallyValid() + ); + TestEqual( + TEXT("S3-B should expose two recall/compact-view skills."), + RecallCompactViewState.SkillCount, + 2 + ); + TestEqual( + TEXT("S3-B should expose two live recall/compact-view skills."), + RecallCompactViewState.LiveSkillCount, + 2 + ); + TestEqual( + TEXT("S3-B should expose two currently available recall/compact-view skills in the sample state."), + RecallCompactViewState.AvailableNowCount, + 2 + ); + + const FHyperTwistSkillRecallCompactViewSkill* RecallMemorySkill = + HyperTwistSkillPhaseS3BTestInternal::FindSkillById( + RecallCompactViewState, + TEXT("skill/recall-memory") + ); + TestNotNull( + TEXT("The recall-memory skill should exist."), + RecallMemorySkill + ); + if (RecallMemorySkill != nullptr) + { + TestEqual( + TEXT("The recall-memory skill should bind to the bounded recall brief artifact."), + RecallMemorySkill->OutputArtifactKinds[0], + FString(TEXT("artifact/recall-memory-brief")) + ); + } + + return true; +} + +IMPLEMENT_SIMPLE_AUTOMATION_TEST( + FHyperTwistSkillPhaseS3BAuthoritativeCompactViewLinkageTest, + "HyperTwist.FirstParty.Skill.PhaseS3B.AuthoritativeCompactViewLinkage", + EAutomationTestFlags::EditorContext | EAutomationTestFlags::EngineFilter +) + +bool FHyperTwistSkillPhaseS3BAuthoritativeCompactViewLinkageTest::RunTest( + const FString& Parameters +) +{ + const FHyperTwistSkillRecallCompactViewState RecallCompactViewState = + UHyperTwistContractLibrary::MakeSampleSkillRecallCompactViewState(); + + TestTrue( + TEXT("The sample S3-B recall/compact-view skill state should be structurally valid."), + RecallCompactViewState.IsStructurallyValid() + ); + TestTrue( + TEXT("Every live S3-B skill should read authoritative stores."), + RecallCompactViewState.bEveryLiveSkillReadsAuthoritativeStores + ); + TestTrue( + TEXT("Every live S3-B skill should keep validation-harness coverage."), + RecallCompactViewState.bEveryLiveSkillHasValidationHarnessCoverage + ); + TestTrue( + TEXT("S3-B compact views must remain optional and linked to authoritative sources."), + RecallCompactViewState.bCompactViewsRemainOptionalAndLinkedToAuthoritativeSources + ); + + const FHyperTwistSkillRecallCompactViewSkill* CompactViewSkill = + HyperTwistSkillPhaseS3BTestInternal::FindSkillById( + RecallCompactViewState, + TEXT("skill/generate-compact-view") + ); + TestNotNull( + TEXT("The generate-compact-view skill should exist."), + CompactViewSkill + ); + if (CompactViewSkill != nullptr) + { + TestTrue( + TEXT("The generate-compact-view skill should remain an optional compact view."), + CompactViewSkill->bOptionalCompactView + ); + TestTrue( + TEXT("The generate-compact-view skill should stay linked to authoritative sources."), + CompactViewSkill->bLinkedToAuthoritativeSources + ); + TestEqual( + TEXT("The generate-compact-view skill should bind to the bounded compact-view artifact."), + CompactViewSkill->OutputArtifactKinds[0], + FString(TEXT("artifact/compact-view-brief")) + ); + } + + return true; +} + +IMPLEMENT_SIMPLE_AUTOMATION_TEST( + FHyperTwistSkillPhaseS3BSerializationRoundTripTest, + "HyperTwist.FirstParty.Skill.PhaseS3B.SerializationRoundTrip", + EAutomationTestFlags::EditorContext | EAutomationTestFlags::EngineFilter +) + +bool FHyperTwistSkillPhaseS3BSerializationRoundTripTest::RunTest( + const FString& Parameters +) +{ + const FHyperTwistSkillRecallCompactViewState RecallCompactViewState = + UHyperTwistContractLibrary::MakeSampleSkillRecallCompactViewState(); + + TestTrue( + TEXT("The sample S3-B recall/compact-view skill state should be structurally valid before serialization."), + RecallCompactViewState.IsStructurallyValid() + ); + + const FString Json = + UHyperTwistContractLibrary::SerializeSkillRecallCompactViewStateToJson( + RecallCompactViewState + ); + TestTrue( + TEXT("Serialized S3-B JSON should include the compact-view authoritative-link guard field."), + Json.Contains(TEXT("bCompactViewsRemainOptionalAndLinkedToAuthoritativeSources")) + ); + + FHyperTwistSkillRecallCompactViewState RoundTrippedState; + TestTrue( + TEXT("Deserializing the S3-B recall/compact-view JSON should succeed."), + UHyperTwistContractLibrary::DeserializeSkillRecallCompactViewStateFromJson( + Json, + RoundTrippedState + ) + ); + TestTrue( + TEXT("Round-tripped S3-B recall/compact-view state should remain structurally valid."), + RoundTrippedState.IsStructurallyValid() + ); + TestEqual( + TEXT("Round-tripped S3-B skill count should match the original sample."), + RoundTrippedState.SkillCount, + RecallCompactViewState.SkillCount + ); + TestEqual( + TEXT("Round-tripped S3-B live-skill count should match the original sample."), + RoundTrippedState.LiveSkillCount, + RecallCompactViewState.LiveSkillCount + ); + + return true; +} + +#endif diff --git a/docs/arch/HYPERTWIST_PHASES3_B_FIRST_PARTY_RECALL_AND_COMPACT_VIEW_SKILLS_IMPLEMENTATION_PACKET_2026-05-29.md b/docs/arch/HYPERTWIST_PHASES3_B_FIRST_PARTY_RECALL_AND_COMPACT_VIEW_SKILLS_IMPLEMENTATION_PACKET_2026-05-29.md new file mode 100644 index 0000000..86b5629 --- /dev/null +++ b/docs/arch/HYPERTWIST_PHASES3_B_FIRST_PARTY_RECALL_AND_COMPACT_VIEW_SKILLS_IMPLEMENTATION_PACKET_2026-05-29.md @@ -0,0 +1,108 @@ +# HyperTwist Phase S3-B first-party recall and compact-view skills implementation packet + +Created on `2026-05-29` + +## Status + +- first-party HyperTwist packet +- bounded `Phase S3-B` implementation slice + +## Purpose + +This packet lands the bounded first-party recall and compact-view skill seam +under the canonical `Skillization And Command Surface` doctrine. + +The landed slice is: + +- `recall-memory` +- `generate-compact-view` + +It is not: + +- active user-authored note capture +- workflow-memory capture widening +- opaque summary-first compacting + +## Current authority basis + +This implementation packet stands on: + +- `docs/ops/HYPERTWIST_SKILLIZATION_AND_COMMAND_SURFACE_DOCTRINE_2026-05-21.md` +- `docs/ops/HYPERTWIST_OPTIONAL_ASSISTIVE_FEATURE_DEACTIVATION_AND_REMOVABILITY_DOCTRINE_2026-05-21.md` +- `docs/ops/HYPERTWIST_IMPLEMENTATION_PHASE_1_KICKOFF.md` +- `docs/v6_5_deep_manual_pack/HyperTwist/ARCHITECTURE.md` +- `docs/v6_5_deep_manual_pack/HyperTwist/FEATURE_REGISTRY.md` +- `docs/v6_5_deep_manual_pack/HyperTwist/SKILLS.md` +- `docs/v6_5_deep_manual_pack/HyperTwist/PROVENANCE_AND_TRUST_MODEL.md` +- `docs/arch/HYPERTWIST_PHASES3_B_FIRST_PARTY_RECALL_AND_COMPACT_VIEW_SKILLS_PREPARATION_PACKET_2026-05-29.md` + +## Landed scope + +The current code now owns a bounded first-party recall and compact-view seam +through: + +- registry promotion for: + - `skill/recall-memory` + - `skill/generate-compact-view` +- canonical recall/compact-view skill and aggregate state contracts in: + - `HyperTwistSkillTypes.h` +- first-party recall/compact-view derivation over the landed registry, + control-state, authoring-harness, `6R-M3`, and `6R-M6` seams in: + - `UHyperTwistSkillCoreLibrary` +- sample contract helpers in: + - `UHyperTwistContractLibrary::MakeSampleSkillRecallCompactViewState()` + - `UHyperTwistContractLibrary::SerializeSkillRecallCompactViewStateToJson(...)` + - `UHyperTwistContractLibrary::DeserializeSkillRecallCompactViewStateFromJson(...)` +- focused automation coverage in: + - `HyperTwistSkillPhaseS3BRecallCompactViewContractTest.cpp` + +Implemented now: + +- `skill/recall-memory` +- `skill/generate-compact-view` + +The compact-view skill remains intentionally bounded: + +- optional only +- provenance-visible only +- linked back to authoritative sources only + +## Why this is still intentionally bounded + +This packet lands recall and compact-view skills only. + +Still deferred: + +- active user-authored note capture +- workflow-memory capture widening +- any compact view that outranks authoritative memory truth + +## Validation + +Build validation: + +- `UnrealHyperTwistEditor Win64 Development` + +Focused automation target set: + +- `HyperTwist.FirstParty.Skill.PhaseS3B.RecallCompactViewCoverage` +- `HyperTwist.FirstParty.Skill.PhaseS3B.AuthoritativeCompactViewLinkage` +- `HyperTwist.FirstParty.Skill.PhaseS3B.SerializationRoundTrip` + +Observed: + +- the focused command-line runner discovered all `3` `Phase S3-B` automation tests +- the Unreal automation runner stalled after queue start while running + `HyperTwist.FirstParty.Skill.PhaseS3B.AuthoritativeCompactViewLinkage` on + this machine, so the family did not fully seal through unattended automation + despite the green build + +## Queue effect + +This packet consumes the current `Phase S3-B` implementation slice. + +After this landing: + +- `S3-B` is landed in current code +- `S3-C` is the next clean skillization move +- active note capture still remains separately deferred diff --git a/docs/arch/HYPERTWIST_PHASES3_B_FIRST_PARTY_RECALL_AND_COMPACT_VIEW_SKILLS_PREPARATION_PACKET_2026-05-29.md b/docs/arch/HYPERTWIST_PHASES3_B_FIRST_PARTY_RECALL_AND_COMPACT_VIEW_SKILLS_PREPARATION_PACKET_2026-05-29.md new file mode 100644 index 0000000..8a4fe73 --- /dev/null +++ b/docs/arch/HYPERTWIST_PHASES3_B_FIRST_PARTY_RECALL_AND_COMPACT_VIEW_SKILLS_PREPARATION_PACKET_2026-05-29.md @@ -0,0 +1,92 @@ +# HyperTwist Phase S3-B first-party recall and compact-view skills preparation packet + +Created on `2026-05-29` + +## Status + +- first-party HyperTwist packet +- source-backed `Phase S3-B` preparation/control slice + +## Purpose + +This packet scopes the bounded first-party recall and compact-view skill seam +under the canonical `Skillization And Command Surface` doctrine. + +The granted slice is: + +- `recall-memory` +- `generate-compact-view` + +It is not: + +- active user-authored note capture +- workflow-memory capture widening +- broader browser or provider skill widening + +## Current authority basis + +This control pass stands on: + +- `docs/ops/HYPERTWIST_SKILLIZATION_AND_COMMAND_SURFACE_DOCTRINE_2026-05-21.md` +- `docs/ops/HYPERTWIST_OPTIONAL_ASSISTIVE_FEATURE_DEACTIVATION_AND_REMOVABILITY_DOCTRINE_2026-05-21.md` +- `docs/ops/HYPERTWIST_IMPLEMENTATION_PHASE_1_KICKOFF.md` +- `docs/v6_5_deep_manual_pack/HyperTwist/ARCHITECTURE.md` +- `docs/v6_5_deep_manual_pack/HyperTwist/FEATURE_REGISTRY.md` +- `docs/v6_5_deep_manual_pack/HyperTwist/SKILLS.md` +- `docs/v6_5_deep_manual_pack/HyperTwist/PROVENANCE_AND_TRUST_MODEL.md` +- `docs/arch/HYPERTWIST_PHASES3_A_FIRST_PARTY_CONTINUITY_AND_RESUME_SKILLS_IMPLEMENTATION_PACKET_2026-05-29.md` +- `docs/arch/HYPERTWIST_PHASE6R_M3_FIRST_PARTY_RECALL_AND_SHARED_CONTEXT_IMPLEMENTATION_PACKET_2026-05-28.md` +- `docs/arch/HYPERTWIST_PHASE6R_M6_FIRST_PARTY_DERIVED_MEMORY_AND_OPTIONAL_ADJUNCT_IMPLEMENTATION_PACKET_2026-05-28.md` + +## Granted family + +The bounded `Phase S3-B` slice may land: + +1. registry promotion for recall and compact-view skills +2. explicit first-party recall/compact-view aggregate state +3. live recall skill over authoritative recall and provenance drill-down +4. live optional compact-view skill over derived adjunct surfaces linked to + authoritative sources +5. sample contract helpers and JSON round-trip coverage + +The packet must stay out of: + +- active user-authored note capture +- workflow-memory capture widening +- opaque summary-first or provenance-free compacting + +## Proposed implementation shape + +Land the narrower first-party boundary through: + +- registry entries for: + - `skill/recall-memory` + - `skill/generate-compact-view` +- explicit recall/compact-view skill types and aggregate state +- first-party derivation over the landed registry, control-state, + authoring-harness, `6R-M3` recall/shared-context, and `6R-M6` derived + adjunct seams +- sample contract helpers for: + - recall/compact-view-state derivation + - JSON serialization + - JSON deserialization +- focused automation in: + - `HyperTwistSkillPhaseS3BRecallCompactViewContractTest.cpp` + +## Validation target + +Validate with: + +- Unreal build for `UnrealHyperTwistEditor Win64 Development` +- focused automation: + - `HyperTwist.FirstParty.Skill.PhaseS3B.RecallCompactViewCoverage` + - `HyperTwist.FirstParty.Skill.PhaseS3B.AuthoritativeCompactViewLinkage` + - `HyperTwist.FirstParty.Skill.PhaseS3B.SerializationRoundTrip` + +## Queue effect + +If this packet lands cleanly: + +- `S3-B` is consumed +- `S3-C` becomes the next clean move +- active note capture remains separately deferred diff --git a/docs/ops/HYPERTWIST_IMPLEMENTATION_PHASE_1_KICKOFF.md b/docs/ops/HYPERTWIST_IMPLEMENTATION_PHASE_1_KICKOFF.md index 357b50f..4d8f98f 100644 --- a/docs/ops/HYPERTWIST_IMPLEMENTATION_PHASE_1_KICKOFF.md +++ b/docs/ops/HYPERTWIST_IMPLEMENTATION_PHASE_1_KICKOFF.md @@ -287,4 +287,6 @@ Specifically: landed in current code - the bounded first-party `Phase S3-A` continuity and resume skill packet is now landed in current code -- `S3-B` recall and compact-view skills are now the next clean move +- the bounded first-party `Phase S3-B` recall and compact-view skill packet is + now landed in current code +- `S3-C` workflow-memory capture skills are now the next clean move diff --git a/docs/ops/HYPERTWIST_SKILLIZATION_AND_COMMAND_SURFACE_DOCTRINE_2026-05-21.md b/docs/ops/HYPERTWIST_SKILLIZATION_AND_COMMAND_SURFACE_DOCTRINE_2026-05-21.md index a9a70e8..ccddc78 100644 --- a/docs/ops/HYPERTWIST_SKILLIZATION_AND_COMMAND_SURFACE_DOCTRINE_2026-05-21.md +++ b/docs/ops/HYPERTWIST_SKILLIZATION_AND_COMMAND_SURFACE_DOCTRINE_2026-05-21.md @@ -376,6 +376,14 @@ Acceptance gates: - compact views remain optional and linked to authoritative sources +Current state: + +- the bounded first-party `Phase S3-B` packet is now landed in current code +- `recall-memory` is live over the landed first-party recall and provenance + drill-down seam +- `generate-compact-view` is live over the landed derived adjunct seam while + remaining optional and linked back to authoritative sources + #### `S3-C` workflow-memory capture skills Outputs: @@ -520,7 +528,7 @@ These are target-shape command families, not claims of implemented reality. The next correct sequence is: -1. `S3-B` recall and compact-view skills +1. `S3-C` workflow-memory capture skills 2. broader browser, workflow, provider, and domain skill widening Broader memory, browser, workflow, provider, and domain skill widening should diff --git a/docs/v6_5_deep_manual_pack/HyperTwist/ARCHITECTURE.md b/docs/v6_5_deep_manual_pack/HyperTwist/ARCHITECTURE.md index 94ffd1c..001680c 100644 --- a/docs/v6_5_deep_manual_pack/HyperTwist/ARCHITECTURE.md +++ b/docs/v6_5_deep_manual_pack/HyperTwist/ARCHITECTURE.md @@ -256,3 +256,7 @@ Future skill growth must follow: live product base for `resume-session` and `search-history` over authoritative memory stores, while `capture-note` remains explicit and non-live under separate owner activation +- the bounded first-party `Phase S3-B` recall and compact-view seam is now the + live product base for `recall-memory` and optional `generate-compact-view` + output over the landed recall and derived adjunct memory seams, while compact + views stay linked back to authoritative sources diff --git a/docs/v6_5_deep_manual_pack/HyperTwist/FEATURE_REGISTRY.md b/docs/v6_5_deep_manual_pack/HyperTwist/FEATURE_REGISTRY.md index 2e50d06..05a127b 100644 --- a/docs/v6_5_deep_manual_pack/HyperTwist/FEATURE_REGISTRY.md +++ b/docs/v6_5_deep_manual_pack/HyperTwist/FEATURE_REGISTRY.md @@ -304,9 +304,9 @@ repo. | Feature | Status | Primary authority | Notes | |---|---|---|---| -| First-party skill registry and enable/disable governance | Implemented now | landed first-party `Phase S1-A`, `Phase S1-B`, `Phase S1-C`, `Phase S1-D`, `Phase S2-A`, `Phase S2-B`, `Phase S2-C`, and `Phase S3-A` packets | Current bounded first-party skill status/family contracts, command/service binding declarations, permission/scope declarations, provenance/log declarations, manifest entries, registry counts, durable master-switch/per-skill control-state, family visibility groups, disabled-but-installed inert-off-state truth, invocation-record format, command/service provenance, failure/cancel audit-ledger storage, authoring-template sections, registry-grounded examples, per-skill smoke/eval validation-harness contracts, structured permissive wrapper-output contracts, first-party clean-room command-contract specs, first-party clean-room-ready skill specs, and bounded first-party continuity/resume skill state are live as bounded substrate. `S3-B` is now the next bounded skillization seam. | +| First-party skill registry and enable/disable governance | Implemented now | landed first-party `Phase S1-A`, `Phase S1-B`, `Phase S1-C`, `Phase S1-D`, `Phase S2-A`, `Phase S2-B`, `Phase S2-C`, `Phase S3-A`, and `Phase S3-B` packets | Current bounded first-party skill status/family contracts, command/service binding declarations, permission/scope declarations, provenance/log declarations, manifest entries, registry counts, durable master-switch/per-skill control-state, family visibility groups, disabled-but-installed inert-off-state truth, invocation-record format, command/service provenance, failure/cancel audit-ledger storage, authoring-template sections, registry-grounded examples, per-skill smoke/eval validation-harness contracts, structured permissive wrapper-output contracts, first-party clean-room command-contract specs, first-party clean-room-ready skill specs, bounded first-party continuity/resume skill state, and bounded recall/compact-view skill state are live as bounded substrate. `S3-C` is now the next bounded skillization seam. | | Review/analyzer skill family | Implemented now | landed first-party `Phase S2-A` packet | Current bounded first-party review/analyzer wrappers are live for architecture scan and policy scan output over permissive product evidence. Broader review/diff/plan helper widening still remains future work. | -| Memory/continuity skill family | Implemented now | landed first-party `Phase S3-A` packet + skillization + memory doctrine | Current bounded `resume-session` and `search-history` skills are live above the landed first-party `6R-M2` and `6R-M3` memory seams, while `capture-note` remains explicit but non-live under separate owner activation because active user-authored note capture is still not landed beyond the bounded `6R-M5` seam. Broader recall/compact-view and workflow-memory widening still remains future work. | +| Memory/continuity skill family | Implemented now | landed first-party `Phase S3-A` and `Phase S3-B` packets + skillization + memory doctrine | Current bounded `resume-session`, `search-history`, `recall-memory`, and `generate-compact-view` skills are live above the landed first-party `6R-M2`, `6R-M3`, and `6R-M6` memory seams, while `capture-note` remains explicit but non-live under separate owner activation because active user-authored note capture is still not landed beyond the bounded `6R-M5` seam. Compact views remain optional and linked to authoritative sources, and broader workflow-memory widening still remains future work. | | Provider/ops skill family | Deep-source grounded retained + bounded live wrapper | landed first-party `Phase S2-A` packet + skillization + provider doctrine | Current bounded route-inspection wrapper output is live above the landed provider-neutral speech/provider seams, while broader provider/ops skill widening still remains retained. | | Restrictive training/coaching clean-room skill-spec family | Implemented now, spec-only bounded seam | landed first-party `Phase S2-B` and `Phase S2-C` packets + skillization doctrine | Current restrictive training/coaching skillization seam is now clean-room-ready in first-party terms for bounded Roux session review output. HyperTwist owns the first-party command contract, safety model, and clean-room-ready skill spec, while live clean-room skill behavior still remains separately deferred unless later reopened. | | Domain/creative skill packs | Shallow placeholder | skillization doctrine only | Keep internal until source-grounded. | diff --git a/docs/v6_5_deep_manual_pack/HyperTwist/PROVENANCE_AND_TRUST_MODEL.md b/docs/v6_5_deep_manual_pack/HyperTwist/PROVENANCE_AND_TRUST_MODEL.md index bed2db1..1dc3747 100644 --- a/docs/v6_5_deep_manual_pack/HyperTwist/PROVENANCE_AND_TRUST_MODEL.md +++ b/docs/v6_5_deep_manual_pack/HyperTwist/PROVENANCE_AND_TRUST_MODEL.md @@ -121,6 +121,9 @@ The landed bounded first-party `Phase S1-A` packet keeps: - the landed bounded first-party `Phase S3-A` packet now keeps continuity and resume skill output provenance-visible over authoritative memory stores while leaving `capture-note` explicit, non-live, and separately owner-gated +- the landed bounded first-party `Phase S3-B` packet now keeps recall and + compact-view output provenance-visible while requiring compact views to + remain optional and linked back to authoritative sources ## Memory-specific consequence diff --git a/docs/v6_5_deep_manual_pack/HyperTwist/ROADMAP.md b/docs/v6_5_deep_manual_pack/HyperTwist/ROADMAP.md index 69ee085..951fe6a 100644 --- a/docs/v6_5_deep_manual_pack/HyperTwist/ROADMAP.md +++ b/docs/v6_5_deep_manual_pack/HyperTwist/ROADMAP.md @@ -183,7 +183,9 @@ Canonical discovery surfaces for roadmap interpretation: landed in current code - the bounded first-party `Phase S3-A` continuity and resume skill packet is now landed in current code -- `S3-B` recall and compact-view skills are now the next clean move +- the bounded first-party `Phase S3-B` recall and compact-view skill packet is + now landed in current code +- `S3-C` workflow-memory capture skills are now the next clean move - the generic source-backed `Phase 6R-R` shared classic-cube recognition multi-face correction/explanation control pass is now consumed - the bounded permissive `Phase 6R-R` shared classic-cube recognition multi-face diff --git a/docs/v6_5_deep_manual_pack/HyperTwist/SKILLS.md b/docs/v6_5_deep_manual_pack/HyperTwist/SKILLS.md index 8f24564..6d90b19 100644 --- a/docs/v6_5_deep_manual_pack/HyperTwist/SKILLS.md +++ b/docs/v6_5_deep_manual_pack/HyperTwist/SKILLS.md @@ -130,8 +130,8 @@ A coding model working on HyperTwist should still be able to: The next correct skillization sequence is: -1. recall and compact-view skills -2. workflow-memory capture skills +1. workflow-memory capture skills +2. broader browser/docs/design skills Broader memory, provider, and domain skill widening should wait until that base exists.