{
  "backup_summary": {
    "category": "automatic_retention",
    "exists": true,
    "latest_snapshots": [
      "backups/20260519_131224_workspace_storage_cleanup_policy_pre_edit",
      "backups/20260519_122858_backup_retention_latest10_verify",
      "backups/20260519_122829_backup_retention_latest10_pre_edit",
      "backups/20260519_113418_02s_batch_schema_blocker_status_pre_edit",
      "backups/20260519_103526_02s_allowed_decision_refresh_pre_edit",
      "backups/20260519_100620_llm_semantic_adjudication_pre_edit",
      "backups/20260519_093145_02r_allowed_decision_guard_pre_edit",
      "backups/20260519_020354_operator_overlay_template_batch_pre_edit",
      "backups/20260519_015134_sense_informed_02p_pre_edit",
      "backups/20260519_013004_work_sense_registry_pre_edit"
    ],
    "path": "backups",
    "policy": "keep_latest_10_via_scripts_backup_core_state",
    "size_bytes": 79624394,
    "size_human": "75.9MiB",
    "snapshot_count": 10
  },
  "cache_entries": [
    {
      "category": "auto_delete_cache",
      "count": 0,
      "exists": false,
      "kind": "dir_glob",
      "path": "**/__pycache__",
      "reason": "regenerable Python bytecode cache",
      "size_bytes": 0,
      "size_human": "0B"
    }
  ],
  "output_entries": [
    {
      "category": "run_requires_disposition",
      "exists": true,
      "kind": "dir",
      "path": "outputs/_derived_inputs",
      "reason": "run directory; delete only if confirmed no reference value, otherwise cold-archive first",
      "size_bytes": 1666275,
      "size_human": "1.6MiB"
    },
    {
      "category": "cold_archive_or_delete_after_confirmation",
      "exists": true,
      "kind": "dir",
      "path": "outputs/archive",
      "reason": "output archive; delete only when confirmed disposable, otherwise compress with manifest and checksum",
      "size_bytes": 0,
      "size_human": "0B"
    },
    {
      "category": "run_requires_disposition",
      "exists": true,
      "kind": "dir",
      "path": "outputs/daozu_first50_chapters_chunks_20260513",
      "reason": "run directory; delete only if confirmed no reference value, otherwise cold-archive first",
      "size_bytes": 746551,
      "size_human": "729.1KiB"
    },
    {
      "category": "run_requires_disposition",
      "exists": true,
      "kind": "dir",
      "path": "outputs/daozu_first50_chapters_deepseek_screenplay_20260513",
      "reason": "run directory; delete only if confirmed no reference value, otherwise cold-archive first",
      "size_bytes": 107589599,
      "size_human": "102.6MiB"
    },
    {
      "category": "protected_active_or_user_kept",
      "exists": true,
      "kind": "dir",
      "path": "outputs/daozu_first50_deepseek_foundation_entity_20260515_094504",
      "reason": "active run or user-protected path",
      "size_bytes": 35039204,
      "size_human": "33.4MiB"
    },
    {
      "category": "run_requires_disposition",
      "exists": true,
      "kind": "dir",
      "path": "outputs/daozu_first50_kg_evidence_verbatim_recheck_20260514",
      "reason": "run directory; delete only if confirmed no reference value, otherwise cold-archive first",
      "size_bytes": 27890410,
      "size_human": "26.6MiB"
    },
    {
      "category": "run_requires_disposition",
      "exists": true,
      "kind": "dir",
      "path": "outputs/daozu_first50_ontology_kg_recheck_20260514",
      "reason": "run directory; delete only if confirmed no reference value, otherwise cold-archive first",
      "size_bytes": 1696795,
      "size_human": "1.6MiB"
    },
    {
      "category": "run_requires_disposition",
      "exists": true,
      "kind": "dir",
      "path": "outputs/daozu_first50_ontology_kg_recheck_20260514_parallel",
      "reason": "run directory; delete only if confirmed no reference value, otherwise cold-archive first",
      "size_bytes": 10970030,
      "size_human": "10.5MiB"
    },
    {
      "category": "run_requires_disposition",
      "exists": true,
      "kind": "dir",
      "path": "outputs/foundation_audits",
      "reason": "run directory; delete only if confirmed no reference value, otherwise cold-archive first",
      "size_bytes": 397068,
      "size_human": "387.8KiB"
    },
    {
      "category": "derived_index",
      "exists": true,
      "kind": "file",
      "path": "outputs/index-lite.json",
      "reason": "derived output index; rebuild or remove stale references after run cleanup",
      "size_bytes": 1131184,
      "size_human": "1.1MiB"
    },
    {
      "category": "derived_index",
      "exists": true,
      "kind": "file",
      "path": "outputs/index.json",
      "reason": "derived output index; rebuild or remove stale references after run cleanup",
      "size_bytes": 1995760,
      "size_human": "1.9MiB"
    },
    {
      "category": "run_requires_disposition",
      "exists": true,
      "kind": "dir",
      "path": "outputs/regression_reports",
      "reason": "run directory; delete only if confirmed no reference value, otherwise cold-archive first",
      "size_bytes": 1300336,
      "size_human": "1.2MiB"
    },
    {
      "category": "run_requires_disposition",
      "exists": true,
      "kind": "dir",
      "path": "outputs/stage_d_xiyouji_first10_prompt_guard_20260429_v60",
      "reason": "run directory; delete only if confirmed no reference value, otherwise cold-archive first",
      "size_bytes": 137589499,
      "size_human": "131.2MiB"
    },
    {
      "category": "run_requires_disposition",
      "exists": true,
      "kind": "dir",
      "path": "outputs/work_entity_pools",
      "reason": "run directory; delete only if confirmed no reference value, otherwise cold-archive first",
      "size_bytes": 45862,
      "size_human": "44.8KiB"
    },
    {
      "category": "run_requires_disposition",
      "exists": true,
      "kind": "dir",
      "path": "outputs/workflow_executor",
      "reason": "run directory; delete only if confirmed no reference value, otherwise cold-archive first",
      "size_bytes": 26071,
      "size_human": "25.5KiB"
    },
    {
      "category": "generated_output",
      "exists": true,
      "kind": "file",
      "path": "outputs/workspace_storage_audit_20260519.json",
      "reason": "ignored generated output; inspect before deletion",
      "size_bytes": 17534,
      "size_human": "17.1KiB"
    }
  ],
  "policy": {
    "backup_retention": "keep_latest_10",
    "cache_cleanup": "pytest and Python bytecode caches may be deleted without review",
    "output_index_rule": "after deleting or archiving output runs, check outputs/index*.json for stale references and rebuild or remove derived indexes",
    "protected_paths_are_not_deleted": [
      "Dramart-AI短剧漫剧创作平台 One Page【外】.zip",
      "docs/dramart_ai_onepage_assets",
      "docs/【对客】Doubao-Seedance-2.0：企业级业务场景指南.zip",
      "input",
      "outputs/daozu_first50_deepseek_foundation_entity_20260515_094504"
    ],
    "runs_cold_archive_rule": "if a run may retain reference value, compress it with manifest/checksum before deleting the original directory",
    "runs_delete_rule": "delete a run only after explicit confirmation that it has no reference value"
  },
  "protected_paths": [
    {
      "category": "protected_active_or_user_kept",
      "exists": true,
      "kind": "file",
      "path": "Dramart-AI短剧漫剧创作平台 One Page【外】.zip",
      "reason": "explicit cleanup policy protection",
      "size_bytes": 4792616,
      "size_human": "4.6MiB"
    },
    {
      "category": "protected_active_or_user_kept",
      "exists": true,
      "kind": "dir",
      "path": "docs/dramart_ai_onepage_assets",
      "reason": "explicit cleanup policy protection",
      "size_bytes": 39109294,
      "size_human": "37.3MiB"
    },
    {
      "category": "protected_active_or_user_kept",
      "exists": true,
      "kind": "file",
      "path": "docs/【对客】Doubao-Seedance-2.0：企业级业务场景指南.zip",
      "reason": "explicit cleanup policy protection",
      "size_bytes": 33320264,
      "size_human": "31.8MiB"
    },
    {
      "category": "protected_active_or_user_kept",
      "exists": true,
      "kind": "dir",
      "path": "input",
      "reason": "explicit cleanup policy protection",
      "size_bytes": 11953776,
      "size_human": "11.4MiB"
    },
    {
      "category": "protected_active_or_user_kept",
      "exists": true,
      "kind": "dir",
      "path": "outputs/daozu_first50_deepseek_foundation_entity_20260515_094504",
      "reason": "explicit cleanup policy protection",
      "size_bytes": 35039204,
      "size_human": "33.4MiB"
    }
  ],
  "recommended_flow": [
    "git status --short",
    "run this audit script and review protected/output/cache lanes",
    "delete cache lanes directly if needed",
    "for run directories, either explicitly confirm disposable deletion or create a cold archive with manifest/checksum first",
    "preserve protected paths unless the policy is explicitly changed by the operator",
    "after cleanup, check outputs/index*.json for stale run references",
    "run workflow_guard with PYTHONDONTWRITEBYTECODE=1"
  ],
  "root": "/wwwb/aitools/writer",
  "summary": {
    "output_entry_count": 16,
    "outputs_size_bytes": 328102178,
    "outputs_size_human": "312.9MiB",
    "protected_path_count": 5,
    "workspace_size_bytes": 581149335,
    "workspace_size_human": "554.2MiB"
  },
  "top_level_entries": [
    {
      "category": "top_level",
      "exists": true,
      "kind": "dir",
      "path": ".codex_mirror",
      "reason": "measured top-level workspace entry",
      "size_bytes": 189056,
      "size_human": "184.6KiB"
    },
    {
      "category": "top_level",
      "exists": true,
      "kind": "dir",
      "path": ".deploy_nginx",
      "reason": "measured top-level workspace entry",
      "size_bytes": 4096,
      "size_human": "4.0KiB"
    },
    {
      "category": "top_level",
      "exists": true,
      "kind": "dir",
      "path": ".deploy_novel2video_static",
      "reason": "measured top-level workspace entry",
      "size_bytes": 4096,
      "size_human": "4.0KiB"
    },
    {
      "category": "top_level",
      "exists": true,
      "kind": "dir",
      "path": ".deploy_systemd",
      "reason": "measured top-level workspace entry",
      "size_bytes": 4096,
      "size_human": "4.0KiB"
    },
    {
      "category": "top_level",
      "exists": true,
      "kind": "file",
      "path": ".env",
      "reason": "measured top-level workspace entry",
      "size_bytes": 882,
      "size_human": "882B"
    },
    {
      "category": "top_level",
      "exists": true,
      "kind": "file",
      "path": ".gitignore",
      "reason": "measured top-level workspace entry",
      "size_bytes": 888,
      "size_human": "888B"
    },
    {
      "category": "top_level",
      "exists": true,
      "kind": "dir",
      "path": ".venv",
      "reason": "measured top-level workspace entry",
      "size_bytes": 38962903,
      "size_human": "37.2MiB"
    },
    {
      "category": "top_level",
      "exists": true,
      "kind": "file",
      "path": "AGENTS.md",
      "reason": "measured top-level workspace entry",
      "size_bytes": 11029,
      "size_human": "10.8KiB"
    },
    {
      "category": "top_level",
      "exists": true,
      "kind": "file",
      "path": "Dramart-AI短剧漫剧创作平台 One Page【外】.zip",
      "reason": "measured top-level workspace entry",
      "size_bytes": 4792616,
      "size_human": "4.6MiB"
    },
    {
      "category": "top_level",
      "exists": true,
      "kind": "file",
      "path": "README.md",
      "reason": "measured top-level workspace entry",
      "size_bytes": 4012,
      "size_human": "3.9KiB"
    },
    {
      "category": "top_level",
      "exists": true,
      "kind": "dir",
      "path": "archive",
      "reason": "measured top-level workspace entry",
      "size_bytes": 13811138,
      "size_human": "13.2MiB"
    },
    {
      "category": "top_level",
      "exists": true,
      "kind": "dir",
      "path": "backups",
      "reason": "measured top-level workspace entry",
      "size_bytes": 79624394,
      "size_human": "75.9MiB"
    },
    {
      "category": "top_level",
      "exists": true,
      "kind": "dir",
      "path": "baselines",
      "reason": "measured top-level workspace entry",
      "size_bytes": 8009953,
      "size_human": "7.6MiB"
    },
    {
      "category": "top_level",
      "exists": true,
      "kind": "file",
      "path": "database_contract.md",
      "reason": "measured top-level workspace entry",
      "size_bytes": 27813,
      "size_human": "27.2KiB"
    },
    {
      "category": "top_level",
      "exists": true,
      "kind": "file",
      "path": "database_design.md",
      "reason": "measured top-level workspace entry",
      "size_bytes": 16577,
      "size_human": "16.2KiB"
    },
    {
      "category": "top_level",
      "exists": true,
      "kind": "dir",
      "path": "docs",
      "reason": "measured top-level workspace entry",
      "size_bytes": 77624626,
      "size_human": "74.0MiB"
    },
    {
      "category": "top_level",
      "exists": true,
      "kind": "file",
      "path": "entity_registry_retrofit.md",
      "reason": "measured top-level workspace entry",
      "size_bytes": 12628,
      "size_human": "12.3KiB"
    },
    {
      "category": "top_level",
      "exists": true,
      "kind": "dir",
      "path": "examples",
      "reason": "measured top-level workspace entry",
      "size_bytes": 141,
      "size_human": "141B"
    },
    {
      "category": "top_level",
      "exists": true,
      "kind": "file",
      "path": "execution_state.json",
      "reason": "measured top-level workspace entry",
      "size_bytes": 11496,
      "size_human": "11.2KiB"
    },
    {
      "category": "top_level",
      "exists": true,
      "kind": "dir",
      "path": "goldens",
      "reason": "measured top-level workspace entry",
      "size_bytes": 475873,
      "size_human": "464.7KiB"
    },
    {
      "category": "top_level",
      "exists": true,
      "kind": "dir",
      "path": "input",
      "reason": "measured top-level workspace entry",
      "size_bytes": 11953776,
      "size_human": "11.4MiB"
    },
    {
      "category": "top_level",
      "exists": true,
      "kind": "file",
      "path": "ontology_bootstrap_design.md",
      "reason": "measured top-level workspace entry",
      "size_bytes": 8590,
      "size_human": "8.4KiB"
    },
    {
      "category": "top_level",
      "exists": true,
      "kind": "dir",
      "path": "outputs",
      "reason": "measured top-level workspace entry",
      "size_bytes": 328102178,
      "size_human": "312.9MiB"
    },
    {
      "category": "top_level",
      "exists": true,
      "kind": "file",
      "path": "patchnote.md",
      "reason": "measured top-level workspace entry",
      "size_bytes": 88815,
      "size_human": "86.7KiB"
    },
    {
      "category": "top_level",
      "exists": true,
      "kind": "file",
      "path": "phase_acceptance.json",
      "reason": "measured top-level workspace entry",
      "size_bytes": 12019,
      "size_human": "11.7KiB"
    },
    {
      "category": "top_level",
      "exists": true,
      "kind": "file",
      "path": "projectreport.md",
      "reason": "measured top-level workspace entry",
      "size_bytes": 15483,
      "size_human": "15.1KiB"
    },
    {
      "category": "top_level",
      "exists": true,
      "kind": "file",
      "path": "requirements.txt",
      "reason": "measured top-level workspace entry",
      "size_bytes": 129,
      "size_human": "129B"
    },
    {
      "category": "top_level",
      "exists": true,
      "kind": "file",
      "path": "retrospective_state.json",
      "reason": "measured top-level workspace entry",
      "size_bytes": 3125,
      "size_human": "3.1KiB"
    },
    {
      "category": "top_level",
      "exists": true,
      "kind": "dir",
      "path": "scripts",
      "reason": "measured top-level workspace entry",
      "size_bytes": 484926,
      "size_human": "473.6KiB"
    },
    {
      "category": "top_level",
      "exists": true,
      "kind": "dir",
      "path": "sql",
      "reason": "measured top-level workspace entry",
      "size_bytes": 22022,
      "size_human": "21.5KiB"
    },
    {
      "category": "top_level",
      "exists": true,
      "kind": "dir",
      "path": "src",
      "reason": "measured top-level workspace entry",
      "size_bytes": 7534628,
      "size_human": "7.2MiB"
    },
    {
      "category": "top_level",
      "exists": true,
      "kind": "dir",
      "path": "tests",
      "reason": "measured top-level workspace entry",
      "size_bytes": 2920697,
      "size_human": "2.8MiB"
    },
    {
      "category": "top_level",
      "exists": true,
      "kind": "file",
      "path": "todo.md",
      "reason": "measured top-level workspace entry",
      "size_bytes": 17969,
      "size_human": "17.5KiB"
    },
    {
      "category": "top_level",
      "exists": true,
      "kind": "file",
      "path": "workflow.json",
      "reason": "measured top-level workspace entry",
      "size_bytes": 156860,
      "size_human": "153.2KiB"
    },
    {
      "category": "top_level",
      "exists": true,
      "kind": "file",
      "path": "workflow_index.json",
      "reason": "measured top-level workspace entry",
      "size_bytes": 2383,
      "size_human": "2.3KiB"
    }
  ],
  "version": "workspace_storage_audit.v1"
}
