#include "HyperTwistTraining/HyperTwistTrainingHyperspeedcubeLibrary.h"

namespace HyperTwistTrainingHyperspeedcubeLibraryInternal
{
	const TCHAR* HyperspeedcubeLicense = TEXT("MIT OR Apache-2.0");

	FHyperTwistTrainingSourceAttribution MakeAttribution(
		const FString& TrackId,
		const FString& Notes
	)
	{
		FHyperTwistTrainingSourceAttribution Attribution;
		Attribution.SourceMode = EHyperTwistTrainingSourceMode::DirectDonor;
		Attribution.SourceRepo = TEXT("HactarCE/Hyperspeedcube");
		Attribution.SourceLicense = HyperspeedcubeLicense;
		Attribution.SourceTrackId = TrackId;
		Attribution.SourceNotes = Notes;
		return Attribution;
	}

	FHyperTwistTrainingHyperspeedcubePackageReference MakePackageReference(
		const FString& PackageId,
		const FString& Label,
		const FString& ExportPath,
		const FString& OwnershipRole,
		const FString& LicensePosture,
		const FString& Summary,
		const TArray<FString>& RetainedSurfaceTags,
		const TArray<FString>& RequiredNoticeActions,
		const TArray<FString>& ExplicitExclusions,
		const FHyperTwistTrainingSourceAttribution& SourceAttribution
	)
	{
		FHyperTwistTrainingHyperspeedcubePackageReference Reference;
		Reference.PackageId = PackageId;
		Reference.Label = Label;
		Reference.ExportPath = ExportPath;
		Reference.OwnershipRole = OwnershipRole;
		Reference.LicensePosture = LicensePosture;
		Reference.Summary = Summary;
		Reference.RetainedSurfaceTags = RetainedSurfaceTags;
		Reference.RequiredNoticeActions = RequiredNoticeActions;
		Reference.ExplicitExclusions = ExplicitExclusions;
		Reference.SourceAttribution = SourceAttribution;
		return Reference;
	}

	void AppendJoined(FString& OutText, const TArray<FString>& Values)
	{
		for (int32 Index = 0; Index < Values.Num(); ++Index)
		{
			if (Index > 0)
			{
				OutText.Append(TEXT(", "));
			}

			OutText.Append(Values[Index]);
		}
	}
}

FHyperTwistTrainingHyperspeedcubeReferenceBundle
UHyperTwistTrainingHyperspeedcubeLibrary::BuildBundledHyperspeedcubeReferenceBundle()
{
	using namespace HyperTwistTrainingHyperspeedcubeLibraryInternal;

	FHyperTwistTrainingHyperspeedcubeReferenceBundle Bundle;
	Bundle.ReferenceUtc = TEXT("2026-05-22T16:08:48Z");
	Bundle.PrimaryNotationContractId = TEXT("hyperspeedcube-notation-contract");
	Bundle.PrimarySerializationBoundaryId = TEXT("hyperspeedcube-log-serialization-boundary");
	Bundle.PrimaryReplayVerificationContractId = TEXT("hyperspeedcube-replay-verification-contract");
	Bundle.PrimaryReplayVerificationBoundaryId = TEXT("hyperspeedcube-replay-verification-boundary");
	Bundle.PrimaryStatsShapeContractId = TEXT("hyperspeedcube-stats-shape-contract");
	Bundle.PrimaryDslContractId = TEXT("hyperspeedcube-dsl-authoring-contract");
	Bundle.PrimaryDslBoundaryId = TEXT("hyperspeedcube-dsl-module-evaluation-boundary");
	Bundle.PrimarySolveRecordBoundaryId = TEXT("hyperspeedcube-solve-record-boundary");
	Bundle.PrimaryAttributionBoundaryId = TEXT("hyperspeedcube-dual-license-attribution-boundary");

	const TArray<FString> CommonNoticeActions =
	{
		TEXT("preserve the upstream copyright notice for HactarCE in third-party notices or equivalent release/legal materials"),
		TEXT("preserve the selected upstream MIT or Apache-2.0 license text and keep both available when the copied code path is not narrowed to one branch"),
		TEXT("preserve ordinary Apache redistribution obligations when Apache-covered code is copied directly")
	};

	Bundle.PackageReferences =
	{
		MakePackageReference(
			TEXT("package/hyperspeedcube-notation-core"),
			TEXT("crates/hypuz_notation/src/unspanned.rs"),
			TEXT("./crates/hypuz_notation/src/unspanned.rs"),
			TEXT("hyper-notation-contract-anchor"),
			TEXT("direct dual-license donor"),
			TEXT("Unspanned retained hyper-notation nodes, move and rotation tokens, layer-prefix parsing, canonical text formatting, and flatten/invert helpers beneath the first-party HyperTwist runtime anchor."),
			{
				TEXT("notation node-list parse"),
				TEXT("single-node parse"),
				TEXT("layer-prefix parse"),
				TEXT("node-list display round-trip"),
				TEXT("group flattening"),
				TEXT("invertible move tokens")
			},
			CommonNoticeActions,
			{
				TEXT("puzzle-definition DSL ownership"),
				TEXT("generic product-wide algorithm parser ownership"),
				TEXT("move-input UI shell ownership")
			},
			MakeAttribution(
				TEXT("hyperspeedcube/notation-core"),
				TEXT("Preserves the retained hyper-notation structure and canonical text round-trip beneath first-party HyperTwist puzzle/runtime ownership without widening into the donor UI shell.")
			)
		),
		MakePackageReference(
			TEXT("package/hyperspeedcube-notation-spans"),
			TEXT("crates/hypuz_notation/src/spanned.rs"),
			TEXT("./crates/hypuz_notation/src/spanned.rs"),
			TEXT("hyper-notation-span-support"),
			TEXT("direct dual-license donor"),
			TEXT("Span-preserving retained hyper-notation parse surface for node and layer-prefix mapping back to source text."),
			{
				TEXT("span-preserving notation parse"),
				TEXT("node source-span retention"),
				TEXT("layer-prefix source-span retention")
			},
			CommonNoticeActions,
			{
				TEXT("editor highlighting shell ownership"),
				TEXT("viewer playback highlighting ownership"),
				TEXT("generic annotation UI ownership")
			},
			MakeAttribution(
				TEXT("hyperspeedcube/notation-spans"),
				TEXT("Preserves the retained source-span seam for future highlight-aware use without claiming the donor editor or replay UI shell.")
			)
		),
		MakePackageReference(
			TEXT("package/hyperspeedcube-notation-parser"),
			TEXT("crates/hypuz_notation/src/parse.rs"),
			TEXT("./crates/hypuz_notation/src/parse.rs"),
			TEXT("hyper-notation-grammar-support"),
			TEXT("direct dual-license donor"),
			TEXT("Retained grammar surface for commutators, conjugates, bracketed transforms, layer prefixes, pause tokens, and family-specific move forms."),
			{
				TEXT("commutator and conjugate grammar"),
				TEXT("rotation token grammar"),
				TEXT("bracketed transform grammar"),
				TEXT("pause token grammar"),
				TEXT("family-specific move token grammar")
			},
			CommonNoticeActions,
			{
				TEXT("puzzle-definition DSL ownership"),
				TEXT("generic product-wide algorithm parser ownership"),
				TEXT("stats-shape ownership")
			},
			MakeAttribution(
				TEXT("hyperspeedcube/notation-parser"),
				TEXT("Preserves the retained grammar seam for the bounded HyperTwist hyper-notation contract without widening into whole puzzle-definition authoring or generic algorithm product ownership.")
			)
		),
		MakePackageReference(
			TEXT("package/hyperspeedcube-log-serialization"),
			TEXT("crates/hyperpuzzle_log/src/lib.rs"),
			TEXT("./crates/hyperpuzzle_log/src/lib.rs"),
			TEXT("hyper-replay-log-serialization-boundary"),
			TEXT("direct dual-license donor"),
			TEXT("Versioned retained log-file serialization/deserialization surface with warning-preserving migration into the latest schema."),
			{
				TEXT("versioned log-file serialize"),
				TEXT("versioned log-file deserialize"),
				TEXT("migration warning collection"),
				TEXT("single-solve log bundle"),
				TEXT("scramble metadata persistence")
			},
			CommonNoticeActions,
			{
				TEXT("first-party canonical replay verification ownership"),
				TEXT("broad puzzle-runtime persistence ownership"),
				TEXT("stats database ownership")
			},
			MakeAttribution(
				TEXT("hyperspeedcube/log-serialization"),
				TEXT("Preserves the retained replay-log serialization seam without promoting the donor verification, persistence, or stats stack into first-party product truth.")
			)
		),
		MakePackageReference(
			TEXT("package/hyperspeedcube-app-log-adapter"),
			TEXT("crates/hyperspeedcube/src/app.rs"),
			TEXT("./crates/hyperspeedcube/src/app.rs"),
			TEXT("runtime-log-save-load-adapter-support"),
			TEXT("direct dual-license donor"),
			TEXT("Retained donor app bridge showing active puzzle log export, import, and first-solve load behavior above the versioned log schema."),
			{
				TEXT("serialize active puzzle log"),
				TEXT("load first solve from log"),
				TEXT("replay-file export path"),
				TEXT("replay-file import path")
			},
			CommonNoticeActions,
			{
				TEXT("host file-dialog ownership"),
				TEXT("desktop application shell ownership"),
				TEXT("leaderboards ownership")
			},
			MakeAttribution(
				TEXT("hyperspeedcube/app-log-adapter"),
				TEXT("Preserves the bounded donor app save/load seam while keeping host dialogs, desktop shell, and broader runtime ownership outside HyperTwist product contract.")
			)
		),
		MakePackageReference(
			TEXT("package/hyperspeedcube-log-verifier"),
			TEXT("crates/hyperpuzzle_log/src/verify.rs"),
			TEXT("./crates/hyperpuzzle_log/src/verify.rs"),
			TEXT("hyper-replay-verification-anchor"),
			TEXT("direct dual-license donor"),
			TEXT("Retained replay verification seam for scramble-seed validation, solved-state checks, randomness-beacon verification, timestamp verification, and verification error routing above the bounded HyperTwist replay contract."),
			{
				TEXT("full verification options"),
				TEXT("quick verification options"),
				TEXT("scramble seed verification"),
				TEXT("solved-state verification"),
				TEXT("randomness-beacon verification"),
				TEXT("TSA completion timestamp verification")
			},
			CommonNoticeActions,
			{
				TEXT("puzzle-definition DSL ownership"),
				TEXT("whole puzzle-runtime ownership"),
				TEXT("stats dashboard ownership"),
				TEXT("host network-service ownership")
			},
			MakeAttribution(
				TEXT("hyperspeedcube/log-verifier"),
				TEXT("Preserves the retained replay-verification seam without promoting the donor network, shell, or analytics stack into first-party HyperTwist product truth.")
			)
		),
		MakePackageReference(
			TEXT("package/hyperspeedcube-verification-types"),
			TEXT("crates/hyperspeedcube_cli_types/src/verification.rs"),
			TEXT("./crates/hyperspeedcube_cli_types/src/verification.rs"),
			TEXT("hyper-replay-verification-result-shape"),
			TEXT("direct dual-license donor"),
			TEXT("Retained solve-verification result shape for canonical puzzle id, solution STM, timestamp ranges, duration eligibility, and surfaced verification errors."),
			{
				TEXT("puzzle canonical id"),
				TEXT("solution STM"),
				TEXT("verified scramble range"),
				TEXT("verified completion timestamp"),
				TEXT("duration eligibility"),
				TEXT("verification error list")
			},
			CommonNoticeActions,
			{
				TEXT("broader stats-shape ownership"),
				TEXT("leaderboard policy ownership"),
				TEXT("generic analytics ownership")
			},
			MakeAttribution(
				TEXT("hyperspeedcube/verification-types"),
				TEXT("Preserves the retained verification result shape for the bounded replay-verification lane without treating it as HyperTwist's whole stats or leaderboard contract.")
			)
		),
		MakePackageReference(
			TEXT("package/hyperspeedcube-replay-simulation"),
			TEXT("crates/hyperpuzzle_view/src/simulation/mod.rs"),
			TEXT("./crates/hyperpuzzle_view/src/simulation/mod.rs"),
			TEXT("hyper-replay-reconstruction-support"),
			TEXT("direct dual-license donor"),
			TEXT("Retained replay serialize/deserialize seam for grouped twist strings, replay-mode logs, interaction events, and session-end reconstruction beneath the bounded HyperTwist verification contract."),
			{
				TEXT("replay serialize"),
				TEXT("replay deserialize"),
				TEXT("grouped twist-string emission"),
				TEXT("grouped twist parse"),
				TEXT("replay-mode flag persistence"),
				TEXT("session-end append on replay export")
			},
			CommonNoticeActions,
			{
				TEXT("viewer shell ownership"),
				TEXT("whole simulation-platform ownership"),
				TEXT("desktop replay UI ownership")
			},
			MakeAttribution(
				TEXT("hyperspeedcube/replay-simulation"),
				TEXT("Preserves the retained replay reconstruction seam without promoting the donor viewer, simulation shell, or desktop replay UI into first-party HyperTwist product ownership.")
			)
		),
		MakePackageReference(
			TEXT("package/hyperspeedcube-replay-events"),
			TEXT("crates/hyperpuzzle_view/src/replay_event.rs"),
			TEXT("./crates/hyperpuzzle_view/src/replay_event.rs"),
			TEXT("hyper-replay-event-taxonomy-support"),
			TEXT("direct dual-license donor"),
			TEXT("Retained replay-event taxonomy for undo, redo, scramble, interaction, twist, blindfold, solve, and session events that feed the bounded verification lane."),
			{
				TEXT("undo event"),
				TEXT("redo event"),
				TEXT("scramble event"),
				TEXT("gizmo click event"),
				TEXT("drag twist event"),
				TEXT("twists event"),
				TEXT("blindfold event"),
				TEXT("solve start/end events"),
				TEXT("session start/end events")
			},
			CommonNoticeActions,
			{
				TEXT("generic review-shell ownership"),
				TEXT("device telemetry ownership"),
				TEXT("broad workflow-history ownership")
			},
			MakeAttribution(
				TEXT("hyperspeedcube/replay-events"),
				TEXT("Preserves the retained replay-event taxonomy for the bounded verification seam without overclaiming broader review, telemetry, or workflow-history ownership.")
			)
		),
		MakePackageReference(
			TEXT("package/hyperspeedcube-stats-db"),
			TEXT("crates/hyperstats/src/lib.rs"),
			TEXT("./crates/hyperstats/src/lib.rs"),
			TEXT("hyper-stats-shape-anchor"),
			TEXT("direct dual-license donor"),
			TEXT("Retained per-puzzle PB database seam for first-solve, FMC, speed, and blind records, KDL stats serialization, and new-PB classification beneath first-party HyperTwist analytics and publication owners."),
			{
				TEXT("per-puzzle PB database"),
				TEXT("first solve record"),
				TEXT("FMC PB record"),
				TEXT("speed PB record"),
				TEXT("blind PB record"),
				TEXT("new PB classification"),
				TEXT("solve-log file association"),
				TEXT("KDL stats serialize"),
				TEXT("KDL stats deserialize")
			},
			CommonNoticeActions,
			{
				TEXT("analytics dashboard ownership"),
				TEXT("publication/leaderboard ownership"),
				TEXT("product-wide training metrics ownership"),
				TEXT("first-party canonical repository ownership")
			},
			MakeAttribution(
				TEXT("hyperspeedcube/stats-db"),
				TEXT("Preserves the retained per-puzzle PB and solve-record seam without promoting the donor stats database, analytics shell, or publication behavior into first-party HyperTwist product truth.")
			)
		),
		MakePackageReference(
			TEXT("package/hyperspeedcube-solve-summary-shape"),
			TEXT("crates/hyperspeedcube/src/gui/modals/solve_summary.rs"),
			TEXT("./crates/hyperspeedcube/src/gui/modals/solve_summary.rs"),
			TEXT("stats-qualifier-shape-support"),
			TEXT("direct dual-license donor"),
			TEXT("Retained donor solve-summary integration evidence for new-PB comparison, blindsolve qualification, and used-filters or used-macros qualifier propagation above the bounded HyperTwist stats contract."),
			{
				TEXT("new PB comparison flow"),
				TEXT("blindsolve qualifier"),
				TEXT("used_filters qualifier"),
				TEXT("used_macros qualifier"),
				TEXT("best-solves request shape")
			},
			CommonNoticeActions,
			{
				TEXT("solve-summary UI shell ownership"),
				TEXT("leaderboard modal ownership"),
				TEXT("remote leaderboard service ownership"),
				TEXT("generic notification shell ownership")
			},
			MakeAttribution(
				TEXT("hyperspeedcube/solve-summary-shape"),
				TEXT("Preserves the retained solve-summary qualifier seam as bounded evidence for stats and solve-record routing without importing the donor modal, leaderboards shell, or broader desktop application behavior.")
			)
		),
		MakePackageReference(
			TEXT("package/hyperspeedcube-hps-entrypoints"),
			TEXT("crates/hyperpuzzlescript/src/lib.rs"),
			TEXT("./crates/hyperpuzzlescript/src/lib.rs"),
			TEXT("hyper-dsl-contract-anchor"),
			TEXT("direct dual-license donor"),
			TEXT("Retained Hyperpuzzlescript entrypoint surface for language naming, builtin file-extension rules, bundled file extraction, engine callback exports, and diagnostic type exports beneath the first-party HyperTwist runtime anchor."),
			{
				TEXT("Hyperpuzzlescript language name"),
				TEXT(".hps file extension"),
				TEXT("index-file module rule"),
				TEXT("built-in HPS extraction"),
				TEXT("puzzle engine callback export"),
				TEXT("full diagnostic export")
			},
			CommonNoticeActions,
			{
				TEXT("whole runtime-anchor ownership"),
				TEXT("generic scripting-platform ownership"),
				TEXT("viewer or editor shell ownership")
			},
			MakeAttribution(
				TEXT("hyperspeedcube/dsl-entrypoints"),
				TEXT("Preserves the retained Hyperpuzzlescript entrypoint and bundled-file seam for the bounded DSL authoring lane without promoting the donor scripting runtime or editor shell into first-party product truth.")
			)
		),
		MakePackageReference(
			TEXT("package/hyperspeedcube-hps-modules"),
			TEXT("crates/hyperpuzzlescript/src/runtime/file_store.rs"),
			TEXT("./crates/hyperpuzzlescript/src/runtime/file_store.rs"),
			TEXT("hyper-dsl-module-store-support"),
			TEXT("direct dual-license donor"),
			TEXT("Retained module-store seam for built-in HPS loading, user file discovery, module-path normalization, index-file folding, and submodule tree construction beneath the bounded HyperTwist DSL lane."),
			{
				TEXT("built-in file store load"),
				TEXT("user file discovery"),
				TEXT("module path normalization"),
				TEXT("index-file folding"),
				TEXT("submodule tree build"),
				TEXT("duplicate module-path warning")
			},
			CommonNoticeActions,
			{
				TEXT("host filesystem configuration ownership"),
				TEXT("whole runtime-anchor ownership"),
				TEXT("workspace recall or notebook ownership")
			},
			MakeAttribution(
				TEXT("hyperspeedcube/dsl-modules"),
				TEXT("Preserves the retained Hyperpuzzlescript module tree and file-discovery seam while keeping top-level file custody, workspace memory, and broader runtime ownership first-party.")
			)
		),
		MakePackageReference(
			TEXT("package/hyperspeedcube-hps-runtime-core"),
			TEXT("crates/hyperpuzzlescript/src/runtime/mod.rs"),
			TEXT("./crates/hyperpuzzlescript/src/runtime/mod.rs"),
			TEXT("hyper-dsl-runtime-evaluation-support"),
			TEXT("direct dual-license donor"),
			TEXT("Retained runtime seam for builtins scope injection, parse-all or exec-all file loading, puzzle-engine and twist-system registries, and diagnostic callback routing beneath the bounded DSL authoring lane."),
			{
				TEXT("builtins scope injection"),
				TEXT("parse_all preload"),
				TEXT("exec_all_files preload"),
				TEXT("puzzle engine registry"),
				TEXT("twist-system engine registry"),
				TEXT("diagnostic callback routing")
			},
			CommonNoticeActions,
			{
				TEXT("whole runtime-anchor ownership"),
				TEXT("generic simulation-platform ownership"),
				TEXT("host shell ownership")
			},
			MakeAttribution(
				TEXT("hyperspeedcube/dsl-runtime-core"),
				TEXT("Preserves the retained Hyperpuzzlescript runtime registration and diagnostic seam without promoting the donor simulation platform or host shell into first-party ownership.")
			)
		),
		MakePackageReference(
			TEXT("package/hyperspeedcube-hps-engines"),
			TEXT("crates/hyperpuzzlescript/src/engines.rs"),
			TEXT("./crates/hyperpuzzlescript/src/engines.rs"),
			TEXT("hyper-dsl-engine-bridge-support"),
			TEXT("direct dual-license donor"),
			TEXT("Retained engine callback seam for named puzzle or twist-system registration and lazy catalog construction beneath the bounded HyperTwist DSL authoring contract."),
			{
				TEXT("puzzle engine callback"),
				TEXT("twist-system engine callback"),
				TEXT("engine name registration"),
				TEXT("lazy catalog constructor"),
				TEXT("build deferral to catalog")
			},
			CommonNoticeActions,
			{
				TEXT("whole puzzle engine ownership"),
				TEXT("viewer shell ownership"),
				TEXT("whole runtime-anchor ownership")
			},
			MakeAttribution(
				TEXT("hyperspeedcube/dsl-engines"),
				TEXT("Preserves the retained engine-registration and lazy-build seam without transferring whole puzzle-engine, viewer, or runtime-anchor ownership.")
			)
		),
		MakePackageReference(
			TEXT("package/hyperspeedcube-hps-request-bridge"),
			TEXT("crates/hyperpuzzlescript/src/request.rs"),
			TEXT("./crates/hyperpuzzlescript/src/request.rs"),
			TEXT("hyper-dsl-eval-thread-bridge"),
			TEXT("direct dual-license donor"),
			TEXT("Retained HPS-thread request seam for blocking runtime evaluation and result handoff beneath the bounded HyperTwist DSL lane."),
			{
				TEXT("eval request channel"),
				TEXT("blocking HPS-thread eval"),
				TEXT("result handoff channel"),
				TEXT("non-reentrant eval rule")
			},
			CommonNoticeActions,
			{
				TEXT("generic background job system ownership"),
				TEXT("provider or network orchestration ownership"),
				TEXT("whole runtime-anchor ownership")
			},
			MakeAttribution(
				TEXT("hyperspeedcube/dsl-request-bridge"),
				TEXT("Preserves the retained HPS-thread evaluation bridge without promoting it into HyperTwist's generic job system or broader runtime ownership.")
			)
		),
		MakePackageReference(
			TEXT("package/hyperspeedcube-hps-parser"),
			TEXT("crates/hyperpuzzlescript/src/parse/parser.rs"),
			TEXT("./crates/hyperpuzzlescript/src/parse/parser.rs"),
			TEXT("hyper-dsl-grammar-support"),
			TEXT("direct dual-license donor"),
			TEXT("Retained Hyperpuzzlescript grammar seam for statement blocks, lists, maps, string interpolation, function parameters, and nested syntax recovery beneath the bounded HyperTwist DSL authoring lane."),
			{
				TEXT("statement block parse"),
				TEXT("list and map literal parse"),
				TEXT("string interpolation parse"),
				TEXT("function parameter parse"),
				TEXT("special identifier parse"),
				TEXT("nested syntax recovery labels")
			},
			CommonNoticeActions,
			{
				TEXT("generic scripting-platform ownership"),
				TEXT("notation contract ownership"),
				TEXT("whole runtime-anchor ownership")
			},
			MakeAttribution(
				TEXT("hyperspeedcube/dsl-parser"),
				TEXT("Preserves the retained Hyperpuzzlescript grammar seam for bounded DSL authoring without collapsing it into generic scripting-platform or broader runtime ownership.")
			)
		),
		MakePackageReference(
			TEXT("package/hyperspeedcube-hps-catalog-builtins"),
			TEXT("crates/hyperpuzzlescript/src/builtins/catalog/puzzles.rs"),
			TEXT("./crates/hyperpuzzlescript/src/builtins/catalog/puzzles.rs"),
			TEXT("hyper-dsl-generator-authoring-support"),
			TEXT("direct dual-license donor"),
			TEXT("Retained puzzle-authoring builtin seam for add_puzzle, add_puzzle_generator, generator parameter maps, example expansion, tag inheritance, and engine keyword routing beneath the bounded HyperTwist DSL authoring contract."),
			{
				TEXT("add_puzzle built-in"),
				TEXT("add_puzzle_generator built-in"),
				TEXT("generator parameter schema"),
				TEXT("generator example expansion"),
				TEXT("tag inheritance on generated puzzles"),
				TEXT("engine kwarg routing")
			},
			CommonNoticeActions,
			{
				TEXT("puzzle catalog contract ownership"),
				TEXT("whole runtime-anchor ownership"),
				TEXT("viewer or editor shell ownership")
			},
			MakeAttribution(
				TEXT("hyperspeedcube/dsl-catalog-builtins"),
				TEXT("Preserves the retained Hyperpuzzlescript puzzle-authoring builtin seam while keeping catalog ownership, runtime ownership, and donor shell behavior outside this bounded packet.")
			)
		),
		MakePackageReference(
			TEXT("package/hyperspeedcube-hps-codegen"),
			TEXT("crates/hyperpuzzlescript/src/codegen.rs"),
			TEXT("./crates/hyperpuzzlescript/src/codegen.rs"),
			TEXT("hyper-dsl-source-emission-support"),
			TEXT("direct dual-license donor"),
			TEXT("Retained source-emission seam for escaped string literals, quoted map keys, and orbit HPS code generation beneath the bounded HyperTwist DSL authoring lane."),
			{
				TEXT("HPS string literal escaping"),
				TEXT("map key quoting"),
				TEXT("orbit HPS code emission"),
				TEXT("compact orbit name emission")
			},
			CommonNoticeActions,
			{
				TEXT("editor code-action ownership"),
				TEXT("export shell ownership"),
				TEXT("whole runtime-anchor ownership")
			},
			MakeAttribution(
				TEXT("hyperspeedcube/dsl-codegen"),
				TEXT("Preserves the retained HPS source-emission seam without promoting editor code actions, export shell behavior, or broader runtime ownership into first-party product truth.")
			)
		),
		MakePackageReference(
			TEXT("package/hyperspeedcube-hps-ft-cube-example"),
			TEXT("hps/puzzles/ft_cube.hps"),
			TEXT("./hps/puzzles/ft_cube.hps"),
			TEXT("hyper-dsl-builtin-authoring-example"),
			TEXT("direct dual-license donor"),
			TEXT("Retained built-in authoring example for facet-turning cube generators, parameter lists, puzzle tags, example metadata, twist-system declarations, and vantage declarations beneath the bounded HyperTwist DSL lane."),
			{
				TEXT("add_puzzle_generator example"),
				TEXT("parameterized generator example"),
				TEXT("example alias tags"),
				TEXT("twist-system declaration example"),
				TEXT("vantage-set declaration example")
			},
			CommonNoticeActions,
			{
				TEXT("whole puzzle corpus ownership"),
				TEXT("whole runtime-anchor ownership"),
				TEXT("donor shell ownership")
			},
			MakeAttribution(
				TEXT("hyperspeedcube/dsl-ft-cube-example"),
				TEXT("Preserves the retained FT-cube built-in authoring example as bounded DSL evidence without transferring whole puzzle-corpus, runtime, or donor shell ownership.")
			)
		)
	};

	FHyperTwistTrainingHyperspeedcubeNotationContract NotationContract;
	NotationContract.ContractId = TEXT("hyperspeedcube-notation-contract");
	NotationContract.Title = TEXT("Hyperspeedcube notation and canonical text contract");
	NotationContract.Summary = TEXT("First-party HyperTwist contract for retained hyper-notation parse, format, and canonical text round-trip beneath the broader Hyperspeedcube runtime anchor.");
	NotationContract.RequiredPackageIds =
	{
		TEXT("package/hyperspeedcube-notation-core"),
		TEXT("package/hyperspeedcube-notation-spans"),
		TEXT("package/hyperspeedcube-notation-parser")
	};
	NotationContract.ParsingSurfaceTags =
	{
		TEXT("notation node-list parse"),
		TEXT("single-node parse"),
		TEXT("layer-prefix parse"),
		TEXT("commutator and conjugate grammar"),
		TEXT("rotation token grammar"),
		TEXT("bracketed transform grammar")
	};
	NotationContract.CanonicalizationSurfaceTags =
	{
		TEXT("node-list display round-trip"),
		TEXT("group flattening"),
		TEXT("invertible move tokens"),
		TEXT("pause token preservation"),
		TEXT("family-specific move token preservation")
	};
	NotationContract.ProvenanceCaveats =
	{
		TEXT("notation grammar remains narrower than whole puzzle-definition DSL authoring"),
		TEXT("span-preserving parse is retained for future highlight-aware use without landing highlight UI ownership"),
		TEXT("notation round-trip remains beneath the first-party HyperTwist runtime anchor rather than as a generic shell transplant")
	};
	NotationContract.ExplicitExclusions =
	{
		TEXT("puzzle-definition DSL ownership"),
		TEXT("first-party canonical replay verification ownership"),
		TEXT("generic product-wide algorithm parser ownership"),
		TEXT("move-input UI shell ownership"),
		TEXT("stats-shape ownership")
	};
	NotationContract.SourceAttribution = MakeAttribution(
		TEXT("hyperspeedcube/notation-contract"),
		TEXT("Preserves the retained Hyperspeedcube hyper-notation and canonical text seam while keeping DSL authoring, replay verification, and broader product parsing ownership out of this packet.")
	);
	Bundle.NotationContracts = {NotationContract};

	FHyperTwistTrainingHyperspeedcubeSerializationBoundary SerializationBoundary;
	SerializationBoundary.BoundaryId = TEXT("hyperspeedcube-log-serialization-boundary");
	SerializationBoundary.Title = TEXT("Hyperspeedcube replay-log serialization boundary");
	SerializationBoundary.Summary = TEXT("First-party HyperTwist boundary for retained versioned replay-log serialization, warning-preserving migration, and donor save/load adapter behavior.");
	SerializationBoundary.RequiredPackageIds =
	{
		TEXT("package/hyperspeedcube-log-serialization"),
		TEXT("package/hyperspeedcube-app-log-adapter")
	};
	SerializationBoundary.SerializationSurfaceTags =
	{
		TEXT("versioned log-file serialize"),
		TEXT("versioned log-file deserialize"),
		TEXT("single-solve log bundle"),
		TEXT("scramble metadata persistence"),
		TEXT("twist-event string persistence")
	};
	SerializationBoundary.WarningSurfaceTags =
	{
		TEXT("newer-version warning"),
		TEXT("migration warning collection"),
		TEXT("first-solve load fallback"),
		TEXT("replay-flag persistence")
	};
	SerializationBoundary.ProvenanceCaveats =
	{
		TEXT("deserialization migrates older versions into the latest schema rather than preserving raw version-specific payloads"),
		TEXT("the active donor app load path only consumes the first solve from a log bundle"),
		TEXT("host file-dialog prompts remain donor shell detail rather than first-party product contract")
	};
	SerializationBoundary.ExplicitExclusions =
	{
		TEXT("first-party canonical replay verification ownership"),
		TEXT("stats database ownership"),
		TEXT("leaderboards ownership"),
		TEXT("host file-dialog ownership"),
		TEXT("broad puzzle-runtime persistence ownership")
	};
	SerializationBoundary.SourceAttribution = MakeAttribution(
		TEXT("hyperspeedcube/log-serialization-boundary"),
		TEXT("Preserves the retained Hyperspeedcube replay-log serialization seam while keeping verification, stats, and broader persistence ownership first-party and separately packetized.")
	);
	Bundle.SerializationBoundaries = {SerializationBoundary};

	FHyperTwistTrainingHyperspeedcubeReplayVerificationContract ReplayVerificationContract;
	ReplayVerificationContract.ContractId = TEXT("hyperspeedcube-replay-verification-contract");
	ReplayVerificationContract.Title = TEXT("Hyperspeedcube replay verification and solve-proof contract");
	ReplayVerificationContract.Summary = TEXT("First-party HyperTwist contract for retained replay verification, replay reconstruction, timestamp proof routing, and bounded solve-proof diagnostics beneath the broader Hyperspeedcube runtime anchor.");
	ReplayVerificationContract.RequiredPackageIds =
	{
		TEXT("package/hyperspeedcube-log-verifier"),
		TEXT("package/hyperspeedcube-verification-types"),
		TEXT("package/hyperspeedcube-replay-simulation"),
		TEXT("package/hyperspeedcube-replay-events")
	};
	ReplayVerificationContract.VerificationSurfaceTags =
	{
		TEXT("full verification options"),
		TEXT("quick verification options"),
		TEXT("scramble seed verification"),
		TEXT("solved-state verification"),
		TEXT("randomness-beacon verification"),
		TEXT("TSA completion timestamp verification"),
		TEXT("unsupported scramble-version guard"),
		TEXT("notation parse verification")
	};
	ReplayVerificationContract.ReplaySurfaceTags =
	{
		TEXT("replay event reconstruction"),
		TEXT("grouped twist-string emission"),
		TEXT("grouped twist parse"),
		TEXT("undo/redo verification"),
		TEXT("blindsolve validity gate"),
		TEXT("single-session duration gate")
	};
	ReplayVerificationContract.TimestampSurfaceTags =
	{
		TEXT("scramble generation timestamp"),
		TEXT("inspection start timestamp"),
		TEXT("blindfold on timestamp"),
		TEXT("solve start timestamp"),
		TEXT("solve completion timestamp"),
		TEXT("verified scramble range"),
		TEXT("verified completion timestamp")
	};
	ReplayVerificationContract.ProvenanceCaveats =
	{
		TEXT("verification may block while constructing a puzzle and performing network-backed timestamp or randomness checks"),
		TEXT("quick verification skips expensive and network-dependent checks and is only safe for already trusted solves"),
		TEXT("duration derivation is only surfaced for replay logs that remain single-session"),
		TEXT("macro use is surfaced as verification error text rather than normalized into supported product behavior"),
		TEXT("used_filters and used_macros remain diagnostic facts rather than an approval policy")
	};
	ReplayVerificationContract.ExplicitExclusions =
	{
		TEXT("puzzle-definition DSL ownership"),
		TEXT("broader stats-shape ownership"),
		TEXT("leaderboard policy ownership"),
		TEXT("generic replay UI shell ownership"),
		TEXT("host network-service ownership")
	};
	ReplayVerificationContract.SourceAttribution = MakeAttribution(
		TEXT("hyperspeedcube/replay-verification-contract"),
		TEXT("Preserves the retained Hyperspeedcube replay-verification seam while keeping DSL authoring, broader stats-shape, and host shell ownership outside this packet.")
	);
	Bundle.ReplayVerificationContracts = {ReplayVerificationContract};

	FHyperTwistTrainingHyperspeedcubeReplayVerificationBoundary ReplayVerificationBoundary;
	ReplayVerificationBoundary.BoundaryId = TEXT("hyperspeedcube-replay-verification-boundary");
	ReplayVerificationBoundary.Title = TEXT("Hyperspeedcube replay reconstruction and verification boundary");
	ReplayVerificationBoundary.Summary = TEXT("First-party HyperTwist boundary for retained replay-event reconstruction, grouped twist serialization, verification diagnostics, and proof-caveat reporting above the bounded replay contract.");
	ReplayVerificationBoundary.RequiredPackageIds =
	{
		TEXT("package/hyperspeedcube-log-verifier"),
		TEXT("package/hyperspeedcube-replay-simulation"),
		TEXT("package/hyperspeedcube-replay-events")
	};
	ReplayVerificationBoundary.ReplayEventSurfaceTags =
	{
		TEXT("replay-mode flag persistence"),
		TEXT("scramble event"),
		TEXT("gizmo click event"),
		TEXT("drag twist event"),
		TEXT("twists event"),
		TEXT("blindfold event"),
		TEXT("solve start/end events"),
		TEXT("session start/end events"),
		TEXT("session-end append on replay export")
	};
	ReplayVerificationBoundary.DiagnosticsSurfaceTags =
	{
		TEXT("puzzle build error surface"),
		TEXT("notation parse error surface"),
		TEXT("solution STM"),
		TEXT("used_filters flag"),
		TEXT("used_macros flag"),
		TEXT("blindsolve validity gate"),
		TEXT("single-session duration gate")
	};
	ReplayVerificationBoundary.ProvenanceCaveats =
	{
		TEXT("verification assumes replay or solve logs already persist scramble metadata and solved state"),
		TEXT("the donor app load path still only consumes the first solve from a log bundle"),
		TEXT("click and drag events remain interaction diagnostics and do not themselves apply twists"),
		TEXT("replay export appends an EndSession marker on the replay path"),
		TEXT("unsupported notation and macro behavior remain surfaced as verification errors rather than product-owned macro support")
	};
	ReplayVerificationBoundary.ExplicitExclusions =
	{
		TEXT("whole simulation-platform ownership"),
		TEXT("desktop replay UI ownership"),
		TEXT("broader review-shell ownership"),
		TEXT("generic analytics dashboard ownership"),
		TEXT("host TSA or randomness-service ownership")
	};
	ReplayVerificationBoundary.SourceAttribution = MakeAttribution(
		TEXT("hyperspeedcube/replay-verification-boundary"),
		TEXT("Preserves the retained replay reconstruction and verification diagnostics seam without promoting the donor viewer shell, service configuration, or broader analytics stack into first-party product truth.")
	);
	Bundle.ReplayVerificationBoundaries = {ReplayVerificationBoundary};

	FHyperTwistTrainingHyperspeedcubeStatsShapeContract StatsShapeContract;
	StatsShapeContract.ContractId = TEXT("hyperspeedcube-stats-shape-contract");
	StatsShapeContract.Title = TEXT("Hyperspeedcube stats-shape and personal-best contract");
	StatsShapeContract.Summary = TEXT("First-party HyperTwist contract for retained per-puzzle PB categories, verification-derived qualifiers, and bounded solve-proof result shape beneath the broader Hyperspeedcube runtime anchor.");
	StatsShapeContract.RequiredPackageIds =
	{
		TEXT("package/hyperspeedcube-stats-db"),
		TEXT("package/hyperspeedcube-verification-types"),
		TEXT("package/hyperspeedcube-solve-summary-shape")
	};
	StatsShapeContract.StatCategorySurfaceTags =
	{
		TEXT("first solve category"),
		TEXT("FMC PB category"),
		TEXT("speed PB category"),
		TEXT("blind PB category"),
		TEXT("new PB classification")
	};
	StatsShapeContract.QualifierSurfaceTags =
	{
		TEXT("puzzle canonical id"),
		TEXT("puzzle version"),
		TEXT("blindsolve qualifier"),
		TEXT("used_filters qualifier"),
		TEXT("used_macros qualifier")
	};
	StatsShapeContract.SolveProofSurfaceTags =
	{
		TEXT("solution STM"),
		TEXT("solve completion timestamp"),
		TEXT("verified completion timestamp"),
		TEXT("speedsolve duration"),
		TEXT("blindsolve duration")
	};
	StatsShapeContract.ProvenanceCaveats =
	{
		TEXT("the donor stats database is keyed by puzzle canonical id and only preserves per-puzzle PB categories rather than whole product analytics"),
		TEXT("used_filters and used_macros remain bounded qualifiers rather than top-level policy or approval logic"),
		TEXT("the donor solve-summary source is retained only as qualifier-shape evidence and does not transfer modal, leaderboards, or notification-shell ownership")
	};
	StatsShapeContract.ExplicitExclusions =
	{
		TEXT("analytics dashboard ownership"),
		TEXT("publication/leaderboard ownership"),
		TEXT("whole training repository ownership"),
		TEXT("donor solve-summary UI shell ownership"),
		TEXT("deck-scoped or case-scoped stats ownership")
	};
	StatsShapeContract.SourceAttribution = MakeAttribution(
		TEXT("hyperspeedcube/stats-shape-contract"),
		TEXT("Preserves the retained Hyperspeedcube PB categories and qualifier/result shape while keeping broader analytics, publication, and first-party repository ownership outside this packet.")
	);
	Bundle.StatsShapeContracts = {StatsShapeContract};

	FHyperTwistTrainingHyperspeedcubeDslContract DslContract;
	DslContract.ContractId = TEXT("hyperspeedcube-dsl-authoring-contract");
	DslContract.Title = TEXT("Hyperspeedcube puzzle-definition DSL authoring contract");
	DslContract.Summary = TEXT("First-party HyperTwist contract for retained Hyperpuzzlescript syntax, generator-authoring builtins, example authoring surfaces, and bounded diagnostics beneath the broader Hyperspeedcube runtime anchor.");
	DslContract.RequiredPackageIds =
	{
		TEXT("package/hyperspeedcube-hps-entrypoints"),
		TEXT("package/hyperspeedcube-hps-parser"),
		TEXT("package/hyperspeedcube-hps-engines"),
		TEXT("package/hyperspeedcube-hps-catalog-builtins"),
		TEXT("package/hyperspeedcube-hps-codegen"),
		TEXT("package/hyperspeedcube-hps-ft-cube-example")
	};
	DslContract.SyntaxSurfaceTags =
	{
		TEXT("Hyperpuzzlescript language name"),
		TEXT(".hps file extension"),
		TEXT("statement block parse"),
		TEXT("list and map literal parse"),
		TEXT("string interpolation parse"),
		TEXT("function parameter parse"),
		TEXT("special identifier parse"),
		TEXT("nested syntax recovery labels")
	};
	DslContract.GeneratorAuthoringSurfaceTags =
	{
		TEXT("add_puzzle built-in"),
		TEXT("add_puzzle_generator built-in"),
		TEXT("generator parameter schema"),
		TEXT("generator example expansion"),
		TEXT("tag inheritance on generated puzzles"),
		TEXT("engine kwarg routing"),
		TEXT("orbit HPS code emission"),
		TEXT("add_puzzle_generator example")
	};
	DslContract.DiagnosticSurfaceTags =
	{
		TEXT("full diagnostic export"),
		TEXT("warning surface"),
		TEXT("invalid version warning"),
		TEXT("unknown engine diagnostic")
	};
	DslContract.ProvenanceCaveats =
	{
		TEXT("the retained Hyperpuzzlescript DSL stays bounded to authoring and diagnostics rather than transferring whole runtime-anchor ownership"),
		TEXT("the retained FT-cube file is evidence for bounded authoring shape rather than a transfer of whole puzzle-corpus ownership"),
		TEXT("notation, replay verification, stats-shape, and broader hyper-runtime ownership remain separately packetized even when the same donor row supplies adjacent evidence")
	};
	DslContract.ExplicitExclusions =
	{
		TEXT("whole runtime-anchor ownership"),
		TEXT("puzzle catalog contract ownership"),
		TEXT("notation contract ownership"),
		TEXT("replay verification ownership"),
		TEXT("stats-shape ownership"),
		TEXT("viewer or editor shell ownership")
	};
	DslContract.SourceAttribution = MakeAttribution(
		TEXT("hyperspeedcube/dsl-authoring-contract"),
		TEXT("Preserves the retained Hyperpuzzlescript authoring, generator, and diagnostics seam while keeping runtime, catalog, notation, replay, and stats ownership separately packetized.")
	);
	Bundle.DslContracts = {DslContract};

	FHyperTwistTrainingHyperspeedcubeDslBoundary DslBoundary;
	DslBoundary.BoundaryId = TEXT("hyperspeedcube-dsl-module-evaluation-boundary");
	DslBoundary.Title = TEXT("Hyperspeedcube puzzle-definition DSL module and evaluation boundary");
	DslBoundary.Summary = TEXT("First-party HyperTwist boundary for retained HPS file loading, module-path normalization, engine registration, and HPS-thread evaluation behavior above the bounded DSL authoring contract.");
	DslBoundary.RequiredPackageIds =
	{
		TEXT("package/hyperspeedcube-hps-entrypoints"),
		TEXT("package/hyperspeedcube-hps-modules"),
		TEXT("package/hyperspeedcube-hps-runtime-core"),
		TEXT("package/hyperspeedcube-hps-engines"),
		TEXT("package/hyperspeedcube-hps-request-bridge")
	};
	DslBoundary.ModuleSurfaceTags =
	{
		TEXT("built-in HPS extraction"),
		TEXT("built-in file store load"),
		TEXT("user file discovery"),
		TEXT("module path normalization"),
		TEXT("index-file folding"),
		TEXT("submodule tree build"),
		TEXT("duplicate module-path warning")
	};
	DslBoundary.EvaluationSurfaceTags =
	{
		TEXT("builtins scope injection"),
		TEXT("puzzle engine registry"),
		TEXT("twist-system engine registry"),
		TEXT("eval request channel"),
		TEXT("blocking HPS-thread eval"),
		TEXT("non-reentrant eval rule"),
		TEXT("parse_all preload"),
		TEXT("exec_all_files preload")
	};
	DslBoundary.ProvenanceCaveats =
	{
		TEXT("the donor module tree may load user files from a donor-configured path, but HyperTwist keeps top-level file custody first-party"),
		TEXT("engine callbacks defer object construction until build time and do not transfer whole runtime ownership"),
		TEXT("blocking eval requests are a bounded HPS-thread bridge rather than HyperTwist's generic job system"),
		TEXT("built-in HPS bundles remain bounded authoring support rather than first-party shell content")
	};
	DslBoundary.ExplicitExclusions =
	{
		TEXT("whole runtime-anchor ownership"),
		TEXT("host filesystem configuration ownership"),
		TEXT("generic background job system ownership"),
		TEXT("viewer or editor shell ownership"),
		TEXT("whole puzzle-runtime ownership")
	};
	DslBoundary.SourceAttribution = MakeAttribution(
		TEXT("hyperspeedcube/dsl-module-evaluation-boundary"),
		TEXT("Preserves the retained Hyperpuzzlescript file-loading and HPS-thread evaluation seam without promoting donor filesystem, background-job, or whole-runtime ownership into first-party product truth.")
	);
	Bundle.DslBoundaries = {DslBoundary};

	FHyperTwistTrainingHyperspeedcubeSolveRecordBoundary SolveRecordBoundary;
	SolveRecordBoundary.BoundaryId = TEXT("hyperspeedcube-solve-record-boundary");
	SolveRecordBoundary.Title = TEXT("Hyperspeedcube solve-record and PB persistence boundary");
	SolveRecordBoundary.Summary = TEXT("First-party HyperTwist boundary for retained per-puzzle solve-record fields, solve-log association, and PB persistence categories above the bounded stats-shape contract.");
	SolveRecordBoundary.RequiredPackageIds =
	{
		TEXT("package/hyperspeedcube-stats-db"),
		TEXT("package/hyperspeedcube-verification-types"),
		TEXT("package/hyperspeedcube-solve-summary-shape")
	};
	SolveRecordBoundary.RecordShapeSurfaceTags =
	{
		TEXT("puzzle canonical id"),
		TEXT("puzzle version"),
		TEXT("solve-log file association"),
		TEXT("solution STM"),
		TEXT("solve completion timestamp"),
		TEXT("verified completion timestamp")
	};
	SolveRecordBoundary.PersonalBestSurfaceTags =
	{
		TEXT("first solve timestamp"),
		TEXT("FMC PB file path"),
		TEXT("FMC PB STM"),
		TEXT("speed PB file path"),
		TEXT("speed PB duration"),
		TEXT("blind PB file path"),
		TEXT("blind PB duration"),
		TEXT("new PB classification")
	};
	SolveRecordBoundary.ProvenanceCaveats =
	{
		TEXT("the donor PB file references are paths within the donor solves directory rather than first-party product storage ownership"),
		TEXT("the donor stats serialization format is a bounded KDL persistence seam rather than HyperTwist's whole repository contract"),
		TEXT("blind, used_filters, and used_macros qualifiers remain bounded comparison facts that can inform later publication or leaderboard surfaces without transferring those owners")
	};
	SolveRecordBoundary.ExplicitExclusions =
	{
		TEXT("publication/leaderboard ownership"),
		TEXT("generic analytics dashboard ownership"),
		TEXT("whole repository stats persistence ownership"),
		TEXT("remote leaderboard request ownership"),
		TEXT("host filesystem shell ownership")
	};
	SolveRecordBoundary.SourceAttribution = MakeAttribution(
		TEXT("hyperspeedcube/solve-record-boundary"),
		TEXT("Preserves the retained Hyperspeedcube solve-record and PB persistence seam while keeping publication, analytics, and broader repository ownership first-party and separately packetized.")
	);
	Bundle.SolveRecordBoundaries = {SolveRecordBoundary};

	FHyperTwistTrainingHyperspeedcubeAttributionBoundary AttributionBoundary;
	AttributionBoundary.BoundaryId = TEXT("hyperspeedcube-dual-license-attribution-boundary");
	AttributionBoundary.Title = TEXT("Hyperspeedcube dual-license donor attribution boundary");
	AttributionBoundary.Summary = TEXT("First-party HyperTwist compliance boundary for using Hyperspeedcube as a direct dual-license donor for the bounded puzzle-catalog, notation, serialization, replay-verification, stats-shape, and DSL slices.");
	AttributionBoundary.AllowedUseTags =
	{
		TEXT("first-party reauthored subsystem implementation"),
		TEXT("direct permissive donor reference"),
		TEXT("bounded notation and serialization contract use"),
		TEXT("bounded replay verification contract use"),
		TEXT("bounded stats-shape and solve-record contract use"),
		TEXT("bounded puzzle-definition DSL authoring use")
	};
	AttributionBoundary.RequiredNoticeActions = CommonNoticeActions;
	AttributionBoundary.ProvenanceCaveats =
	{
		TEXT("Hyperspeedcube remains a partial retained row rather than a closed runtime platform"),
		TEXT("the landed puzzle-catalog contract remains a separate bounded Phase 6R-A slice"),
		TEXT("the landed replay verification contract remains a separate bounded Phase 6R-L slice"),
		TEXT("the landed stats-shape contract remains a separate bounded Phase 6R-M slice"),
		TEXT("the landed DSL authoring contract remains a separate bounded Phase 6R-N slice"),
		TEXT("the retained dual-license posture does not transfer generic hyper-runtime, analytics, publication, or host-shell ownership")
	};
	AttributionBoundary.ExplicitExclusions =
	{
		TEXT("silent attribution removal"),
		TEXT("pretending broad analytics or publication ownership landed in these packets"),
		TEXT("pretending whole-app runtime ownership transferred"),
		TEXT("pretending viewer or editor shell ownership transferred")
	};
	AttributionBoundary.SourceAttribution = MakeAttribution(
		TEXT("hyperspeedcube/attribution-boundary"),
		TEXT("Records dual-license attribution and packet bounds for the retained Hyperspeedcube catalog, notation, serialization, replay-verification, stats-shape, and DSL slices without overclaiming whole-row incorporation.")
	);
	Bundle.AttributionBoundaries = {AttributionBoundary};

	return Bundle;
}

bool UHyperTwistTrainingHyperspeedcubeLibrary::TryGetNotationContractById(
	const FHyperTwistTrainingHyperspeedcubeReferenceBundle& Bundle,
	const FString& ContractId,
	FHyperTwistTrainingHyperspeedcubeNotationContract& OutContract
)
{
	for (const FHyperTwistTrainingHyperspeedcubeNotationContract& Contract : Bundle.NotationContracts)
	{
		if (Contract.ContractId == ContractId)
		{
			OutContract = Contract;
			return true;
		}
	}

	OutContract = FHyperTwistTrainingHyperspeedcubeNotationContract();
	return false;
}

bool UHyperTwistTrainingHyperspeedcubeLibrary::TryGetSerializationBoundaryById(
	const FHyperTwistTrainingHyperspeedcubeReferenceBundle& Bundle,
	const FString& BoundaryId,
	FHyperTwistTrainingHyperspeedcubeSerializationBoundary& OutBoundary
)
{
	for (const FHyperTwistTrainingHyperspeedcubeSerializationBoundary& Boundary : Bundle.SerializationBoundaries)
	{
		if (Boundary.BoundaryId == BoundaryId)
		{
			OutBoundary = Boundary;
			return true;
		}
	}

	OutBoundary = FHyperTwistTrainingHyperspeedcubeSerializationBoundary();
	return false;
}

bool UHyperTwistTrainingHyperspeedcubeLibrary::TryGetReplayVerificationContractById(
	const FHyperTwistTrainingHyperspeedcubeReferenceBundle& Bundle,
	const FString& ContractId,
	FHyperTwistTrainingHyperspeedcubeReplayVerificationContract& OutContract
)
{
	for (const FHyperTwistTrainingHyperspeedcubeReplayVerificationContract& Contract : Bundle.ReplayVerificationContracts)
	{
		if (Contract.ContractId == ContractId)
		{
			OutContract = Contract;
			return true;
		}
	}

	OutContract = FHyperTwistTrainingHyperspeedcubeReplayVerificationContract();
	return false;
}

bool UHyperTwistTrainingHyperspeedcubeLibrary::TryGetReplayVerificationBoundaryById(
	const FHyperTwistTrainingHyperspeedcubeReferenceBundle& Bundle,
	const FString& BoundaryId,
	FHyperTwistTrainingHyperspeedcubeReplayVerificationBoundary& OutBoundary
)
{
	for (const FHyperTwistTrainingHyperspeedcubeReplayVerificationBoundary& Boundary : Bundle.ReplayVerificationBoundaries)
	{
		if (Boundary.BoundaryId == BoundaryId)
		{
			OutBoundary = Boundary;
			return true;
		}
	}

	OutBoundary = FHyperTwistTrainingHyperspeedcubeReplayVerificationBoundary();
	return false;
}

bool UHyperTwistTrainingHyperspeedcubeLibrary::TryGetStatsShapeContractById(
	const FHyperTwistTrainingHyperspeedcubeReferenceBundle& Bundle,
	const FString& ContractId,
	FHyperTwistTrainingHyperspeedcubeStatsShapeContract& OutContract
)
{
	for (const FHyperTwistTrainingHyperspeedcubeStatsShapeContract& Contract : Bundle.StatsShapeContracts)
	{
		if (Contract.ContractId == ContractId)
		{
			OutContract = Contract;
			return true;
		}
	}

	OutContract = FHyperTwistTrainingHyperspeedcubeStatsShapeContract();
	return false;
}

bool UHyperTwistTrainingHyperspeedcubeLibrary::TryGetDslContractById(
	const FHyperTwistTrainingHyperspeedcubeReferenceBundle& Bundle,
	const FString& ContractId,
	FHyperTwistTrainingHyperspeedcubeDslContract& OutContract
)
{
	for (const FHyperTwistTrainingHyperspeedcubeDslContract& Contract : Bundle.DslContracts)
	{
		if (Contract.ContractId == ContractId)
		{
			OutContract = Contract;
			return true;
		}
	}

	OutContract = FHyperTwistTrainingHyperspeedcubeDslContract();
	return false;
}

bool UHyperTwistTrainingHyperspeedcubeLibrary::TryGetDslBoundaryById(
	const FHyperTwistTrainingHyperspeedcubeReferenceBundle& Bundle,
	const FString& BoundaryId,
	FHyperTwistTrainingHyperspeedcubeDslBoundary& OutBoundary
)
{
	for (const FHyperTwistTrainingHyperspeedcubeDslBoundary& Boundary : Bundle.DslBoundaries)
	{
		if (Boundary.BoundaryId == BoundaryId)
		{
			OutBoundary = Boundary;
			return true;
		}
	}

	OutBoundary = FHyperTwistTrainingHyperspeedcubeDslBoundary();
	return false;
}

bool UHyperTwistTrainingHyperspeedcubeLibrary::TryGetSolveRecordBoundaryById(
	const FHyperTwistTrainingHyperspeedcubeReferenceBundle& Bundle,
	const FString& BoundaryId,
	FHyperTwistTrainingHyperspeedcubeSolveRecordBoundary& OutBoundary
)
{
	for (const FHyperTwistTrainingHyperspeedcubeSolveRecordBoundary& Boundary : Bundle.SolveRecordBoundaries)
	{
		if (Boundary.BoundaryId == BoundaryId)
		{
			OutBoundary = Boundary;
			return true;
		}
	}

	OutBoundary = FHyperTwistTrainingHyperspeedcubeSolveRecordBoundary();
	return false;
}

bool UHyperTwistTrainingHyperspeedcubeLibrary::TryGetAttributionBoundaryById(
	const FHyperTwistTrainingHyperspeedcubeReferenceBundle& Bundle,
	const FString& BoundaryId,
	FHyperTwistTrainingHyperspeedcubeAttributionBoundary& OutBoundary
)
{
	for (const FHyperTwistTrainingHyperspeedcubeAttributionBoundary& Boundary : Bundle.AttributionBoundaries)
	{
		if (Boundary.BoundaryId == BoundaryId)
		{
			OutBoundary = Boundary;
			return true;
		}
	}

	OutBoundary = FHyperTwistTrainingHyperspeedcubeAttributionBoundary();
	return false;
}

FString UHyperTwistTrainingHyperspeedcubeLibrary::BuildPackageChecklistTsv(
	const FHyperTwistTrainingHyperspeedcubeReferenceBundle& Bundle
)
{
	using namespace HyperTwistTrainingHyperspeedcubeLibraryInternal;

	FString Checklist = TEXT("PackageId\tLabel\tExportPath\tOwnershipRole\tLicensePosture\tRetainedSurfaceTags\tRequiredNoticeActions\tExplicitExclusions\n");
	for (const FHyperTwistTrainingHyperspeedcubePackageReference& Reference : Bundle.PackageReferences)
	{
		FString RetainedSurfaceTags;
		AppendJoined(RetainedSurfaceTags, Reference.RetainedSurfaceTags);

		FString NoticeActions;
		AppendJoined(NoticeActions, Reference.RequiredNoticeActions);

		FString Exclusions;
		AppendJoined(Exclusions, Reference.ExplicitExclusions);

		Checklist += FString::Printf(
			TEXT("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n"),
			*Reference.PackageId,
			*Reference.Label,
			*Reference.ExportPath,
			*Reference.OwnershipRole,
			*Reference.LicensePosture,
			*RetainedSurfaceTags,
			*NoticeActions,
			*Exclusions
		);
	}

	return Checklist;
}
