docs: deepen game UI animation and audio source studies

This commit is contained in:
2026-10-08 18:13:42 +08:00
parent 404936243a
commit a6a8975985
20 changed files with 3649 additions and 36 deletions
+58 -3
View File
@@ -63,7 +63,10 @@ def main():
'scripts/snapshot_github.py', '19_visual_consistency_workflow.md',
'templates/game_visual_contract.md', 'history/v3_content_manifest.json',
'skills/game-visual-consistency/SKILL.md',
'skills/game-visual-consistency/references/runtime-checks.md']
'skills/game-visual-consistency/references/runtime-checks.md',
'20_deep_source_studies.md', 'sources/research_v3_2.json',
'history/v3_1_content_manifest.json',
'history/v3_1_source_catalog.json', 'history/v3_1_skill_catalog.json']
for name in required:
if not (root / name).is_file():
failures.append('Missing required file: ' + name)
@@ -131,6 +134,13 @@ def main():
if item.get('references_or_scripts_inspected') is not False:
failures.append('V3 Skill reference claim expanded: ' + label)
v3_summary = research.get('summary', {})
# V3 totals describe its historical batch, not the growing current catalog.
v3_catalog = parsed.get('history/v3_1_source_catalog.json', catalog)
v3_skill_catalog = parsed.get('history/v3_1_skill_catalog.json', skill_catalog)
historical_ids = {item.get('id') for item in v3_catalog.get('entries', [])}
historical_skill_ids = {item.get('id') for item in v3_skill_catalog.get('entries', [])}
if not historical_ids.issubset(set(ids)) or not historical_skill_ids.issubset(set(skill_ids)):
failures.append('Historical catalog entries were removed')
actual_summary = {
'metadata_pinned': sum(bool(i.get('commit')) for i in researched_repos.values()),
'metadata_unavailable': sum(not i.get('commit') for i in researched_repos.values()),
@@ -138,7 +148,8 @@ def main():
'selected_files_inspected': sum(i.get('status') != 'downloaded_not_inspected' for i in researched_files),
'download_only': sum(i.get('status') == 'downloaded_not_inspected' for i in researched_files),
'new_public_skill_entrypoints': sum(i.get('status') == 'skill_entrypoint_inspected' for i in researched_files),
'source_entries_total': len(entries), 'skill_entries_total': len(skills)}
'source_entries_total': len(v3_catalog.get('entries', [])),
'skill_entries_total': len(v3_skill_catalog.get('entries', []))}
if v3_summary != actual_summary:
failures.append('V3 research totals disagree with actual records')
recipes = research.get('recipes', [])
@@ -152,10 +163,53 @@ def main():
failures.append('Recipe section missing: ' + str(recipe.get('id')))
if recipe.get('application_status') != 'recipe_not_executed':
failures.append('Unexpected V3 recipe runtime claim: ' + str(recipe.get('id')))
v32 = parsed.get('sources/research_v3_2.json', {})
v32_repos = {item.get('repository'): item for item in v32.get('repositories', [])}
v32_files = v32.get('files', [])
v32_keys = [(item.get('repository'), item.get('path')) for item in v32_files]
if len(v32_keys) != len(set(v32_keys)):
failures.append('V3.2 source files duplicated')
for item in v32_files:
label = '%s/%s' % (item.get('repository'), item.get('path'))
commit = item.get('commit', '')
expected_url = 'https://github.com/%s/blob/%s/%s' % (item.get('repository'), commit, item.get('path'))
if not re.fullmatch(r'[0-9a-f]{40}', commit) or commit != v32_repos.get(item.get('repository'), {}).get('commit') or item.get('url') != expected_url:
failures.append('V3.2 source not bound to pinned version: ' + label)
if not re.fullmatch(r'[0-9a-f]{64}', item.get('sha256', '')) or item.get('bytes', 0) <= 0:
failures.append('V3.2 source hash/size invalid: ' + label)
if item.get('status') not in v32.get('definitions', {}) or item.get('runtime_tested') is not False:
failures.append('V3.2 source inspection/runtime claim invalid: ' + label)
ranges = item.get('inspected_ranges', [])
if not ranges or any(len(span) != 2 or not 1 <= span[0] <= span[1] <= item.get('lines', 0) for span in ranges):
failures.append('V3.2 source read range invalid: ' + label)
known_urls.add(expected_url)
v32_recipes = v32.get('recipes', [])
v32_source_ids = set()
for recipe in v32_recipes:
source_ids = set(recipe.get('source_ids', []))
v32_source_ids.update(source_ids)
if not source_ids or not source_ids.issubset(set(ids)) or recipe.get('application_status') != 'recipe_not_executed':
failures.append('V3.2 recipe sources/runtime claim invalid: ' + str(recipe.get('id')))
chapter = root / recipe.get('chapter', '')
if not chapter.is_file() or '\n## %s.' % recipe.get('section') not in chapter.read_text(encoding='utf-8'):
failures.append('V3.2 recipe section missing: ' + str(recipe.get('id')))
if len(v32_recipes) != 7 or len({r.get('id') for r in v32_recipes}) != 7:
failures.append('V3.2 requires seven distinct recipes')
v32_expected_summary = {
'repositories_pinned': len(v32_repos), 'downloaded_files': len(v32_files),
'selected_files_inspected': sum(f.get('status') == 'selected_source_inspected' for f in v32_files),
'declarations_or_documents_inspected': sum(f.get('status') == 'declaration_or_document_inspected' for f in v32_files),
'download_only': 0, 'new_recipes': len(v32_recipes),
'new_source_entries': len(v32_source_ids),
'source_entries_total': len(historical_ids | v32_source_ids),
'external_runtime_runs': 0, 'paid_calls': 0}
if v32.get('summary') != v32_expected_summary:
failures.append('V3.2 totals disagree with inspection records')
# Catch guessed source paths in the new recipes/workflow, using the exact
# pinned files already inspected, without making fresh network requests.
new_docs = [root / name for name in ['15_source_recipes.md', '16_new_game_workflow.md',
'17_art_audio_implementation.md', '18_research_maintenance.md']]
'17_art_audio_implementation.md', '18_research_maintenance.md',
'20_deep_source_studies.md']]
new_docs.extend((root / 'skills/learn-from-game-source').rglob('*.md'))
for path in new_docs:
for url in re.findall(r'https://github\.com/[^\s)]+', path.read_text(encoding='utf-8')):
@@ -238,6 +292,7 @@ def main():
'skill_entries': len(skills), 'godot_lab_source_files': len(lab_files),
'copied_example_files': len(copies), 'manifest_files': len(manifest_paths),
'v3_research_files': len(researched_files), 'v3_source_recipes': len(recipes),
'v3_2_research_files': len(v32_files), 'v3_2_source_recipes': len(v32_recipes),
'failures': failures}
if args.report:
with args.report.open('x', encoding='utf-8') as handle: