{
  "protocol": "mxy-offline-art/1",
  "classificationVersion": 1,
  "programProtocol": "mxy-program/1",
  "programManifestPath": "program-v1/manifest.json",
  "optionalList": "tools/manual_patch_wdf.txt",
  "optionalPrefix": "client/assets/wdf/",
  "rules": [
    {"pattern": "(^|/)\\.(gdignore|gitignore)$", "kind": "excluded"},
    {"pattern": "^client/data/经典风格/(resource_mapping\\.json|panel_layouts/[^/]+\\.json)$", "kind": "excluded"},
    {"pattern": "^client/assets/官服试衣/[^/]+/原始/[^/]+\\.(spr|pal|tcp)$", "kind": "excluded"},
    {"pattern": "(^|/)(_logs|cache|__pycache__)(/|$)|\\.(gsm_backup|bak[0-9]*|tmp[0-9]*|log|pdb|import|uid)$|\\.bak_|\\.tmp_", "kind": "excluded"},
    {"pattern": "^(client/assets/(_tcp_test|模型|wdf/audio)/|wdf_entries/|client/data/diagnostics/)", "kind": "excluded"},
    {"pattern": "(^|/)[^/]*Tests?\\.dll$", "kind": "excluded"},
    {"pattern": "^client/assets/wdf/官服原始_.+\\.wdf$", "kind": "excluded", "source": "Raw NetEase official packs held locally; excluded from online manifest"},
    {"pattern": "^client/assets/wdf/模型_(补充角色武器HD|补充官服NPC|补充官服NPC权威|补充官服传送NPC)\\.wdf$", "kind": "excluded", "source": "Retired legacy model packs deleted on client startup; excluded from online manifest and bundles"},
    {"pattern": "^client/assets/(official-wardrobe-staging/|wdf/官服外观_([0-9a-f]{2}|目录)\\.wdf$)", "kind": "excluded", "source": "Import staging and legacy wardrobe research packs; no references from published appearance indices"},
    {"pattern": "^client/assets/wdf/官服外观_当前_(320430f290fa56cf281c81fd|6494013ea178f2596b661339|67c569b3bbc7db71ecd2738a|d9f687364e9f5ef462e37a90)\\.wdf$", "kind": "excluded", "source": "server originals.sqlite format=p; pure code packages only"},
    {"pattern": "^client/assets/wdf/官服外观_基础_05ba9fad66c5c8128cb801c8\\.wdf$", "kind": "excluded", "source": "Retired base with original icon palettes; retained locally for rollback"},
    {"pattern": "^client/assets/wdf/官服外观_当前_[0-9a-f]{24}\\.wdf$", "kind": "optional_art", "source": "SPEC component reuse: optional official wardrobe originals; default roles and icons use separate required base packs"},
    {"pattern": "^client/assets/wdf/锦衣祥瑞_预览图_[0-9]{3}_[0-9a-f]{16}\\.wdf$", "kind": "art", "source": "Lossless official thumbnails moved into wdf/; no original palette data"},
    {"pattern": "^client/assets/wdf/锦衣祥瑞_[^/]+_(?:[0-9]{3}_[0-9a-f]{16}|[0-9a-f]{16}|[0-9]{3})\\.wdf$", "kind": "optional_art", "source": "Indexed wardrobe and mount originals in wdf/; optional local pack or NetEase CDN + server backup"},
    {"pattern": "^client/assets/skin/锦衣祥瑞_预览图_[0-9]{3}_[0-9a-f]{16}\\.wdf$", "kind": "art", "source": "Lossless official thumbnails for the catalogue; no original palette data"},
    {"pattern": "^client/assets/skin/锦衣祥瑞_[^/]+_(?:[0-9]{3}_[0-9a-f]{16}|[0-9a-f]{16}|[0-9]{3})\\.wdf$", "kind": "optional_art", "source": "Indexed wardrobe and mount originals; optional local pack or NetEase CDN + server backup"},
    {"pattern": "^(client/data/client_config\\.cfg|\\.manifest\\.local\\.json|\\.notice_cache\\.txt)$", "kind": "private"},
    {"pattern":"^client/runtime/official_rules/.+","kind":"excluded"},
    {"pattern":"^client/data/appearance/public/(catalog|controls|[0-9]+)\\.json$","kind":"art"},
    {"pattern":"^client/data/appearance/.+","kind":"excluded"},
    {"pattern": "^client/data/ui/[^/]+\\.json$", "kind": "program_embedded"},
    {"pattern": "^client/data/(map_environment_effects\\.json|official_battle/[^/]+\\.json)$", "kind": "program"},
    {"pattern":"^client/data/official_assets/(catalog\\.sqlite.*|catalog\\.ready\\.json|import_state\\.json|cache_manifest\\.json)$","kind":"excluded"},
    {"pattern":"^client/data/official_assets/(base_model_hd\\.json|manifest\\.json|runtime_pack_map\\.json|model_keys\\.json|asset_pack_catalog\\.json|(objects|keys|bindings|aliases|audio)/.+\\.json)$","kind":"art"},
    {"pattern":"^client/data/official_items/_icon_index\\.json$","kind":"art"},
    {"pattern":"^client/data/经典风格/manifest\\.json$","kind":"art"},
    {"pattern": "^client/assets/maps/[^/]+\\.map$", "kind": "art"},
    {"pattern": "^client/assets/官服试衣/[^/]+/(catalog\\.json|播放/[^/]+\\.owc)$", "kind": "art"},
    {"pattern": "^client/assets/wdf/[^/]+\\.wdf$", "kind": "art"},
    {"pattern": "^client/assets/fonts/(classic/)?[^/]+\\.(ttf|otf)$", "kind": "art"},
    {"pattern": "^client/assets/(icons|login|pic|图标|地图特效|家具|技能|特效|经典风格|经脉图标|道具|音效)/.+\\.(png|jpg|jpeg|bmp|webp|svg|was|tcp|tca|ttf|otf|wav|mp3|ogg|json)$", "kind": "art"},
    {"pattern": "^(ABENXYQ\\.(exe|pck)|program_version\\.txt|server_default\\.txt|[^/]+\\.dll)$", "kind": "program"},
    {"pattern": "^data_ABENXYQ_windows_x86_64/.+\\.(dll|exe|json|dat|bin)$", "kind": "program"}
  ],
  "artifactLayout": {
    "program": "updates/program-v1/manifest.json and files/; separate from legacy updates/manifest.json",
    "art": "updates/art-v1/candidates/<candidateDigest>/patch.zip and candidate.json",
    "state": "updates/art-v1/state/<baseId>.json; confirm writes atomically after verifying frozen ZIP bytes and candidate metadata",
    "zip": "Root manifest.json plus payload/<canonical art path>; no other entries. Payload hashes and sizes must match manifest.payload.",
    "firstBase": "Explicit full required-art snapshot and independently distributed full base files; establish baseId once, never advance during candidate generation.",
    "candidatePackaging": "P2 records ZIP sha256 and size alongside candidateDigest and verifies both at confirmation; pure P1 confirmation validates metadata only."
  },
  "recordKinds": {
    "base": "Immutable full required-art snapshot; baseId changes on explicit reset, sequence 0.",
    "published": "Append-only confirmed target snapshots under the same baseId; never includes candidates.",
    "candidate": "Frozen manifest and target snapshot, parent state digest, candidate digest; no state advancement at packaging."
  },
  "manifestFields": ["protocol", "classificationVersion", "baseId", "targetVersion", "sequence", "targetDigest", "targetFiles", "payload", "delete"],
  "shippingContract": {
    "unclassified": "Block publication until the exact path or family has reviewed classification; never silently skip or include unknown files.",
    "program_embedded": "Deliver through the exported PCK, not as loose updater files; P2 must verify actual PCK inclusion.",
    "paths": "Canonical relative paths use forward slashes; reject case-only renames and file/directory changes across supported releases.",
    "classificationSources": ["client/scripts/core/AssetPaths.cs", "client/scripts/Battle/visual/OfficialPerformanceDefinition.cs", "client/scripts/Systems/MapEnvironmentEffectManager.cs", "client/scripts/ui/classic/ClassicPanelTemplate.OfficialButtons.cs", "client/scripts/ui/core/text/EmojiAnimCache.cs", "client/scripts/IO/OfficialWardrobeLibrary.cs", "tools/manual_patch_wdf.txt", "tools/pack_release.ps1", "export_presets.cfg"]
  },
  "installContract": {
    "unknownBase": "Explicit installation hashes every required base file before adoption; version text is insufficient. Extra private paths remain unmanaged.",
    "sameSequence": "Accept only identical targetDigest as already_installed; verify/repair bytes in installer before reporting success.",
    "olderSequence": "Reject; no silent downgrade.",
    "reset": "Explicit new immutable baseId and full base distribution; old-base patches rejected. No automatic reset from a candidate.",
    "optional": "Optional list entries are excluded from required snapshots, payloads and deletion scopes; retain opt-in delivery.",
    "commit": "Verify ZIP entries, sizes, hashes, paths and reparse points before replacement; persist staged/backed-up/committed transaction state; recover before game launch.",
    "trust": "SHA-256 provides integrity only, not publisher authentication."
  }
}
